|
From: <tr...@us...> - 2012-12-01 22:36:48
|
Revision: 10297
http://sourceforge.net/p/xoops/svn/10297
Author: trabis
Date: 2012-12-01 22:36:45 +0000 (Sat, 01 Dec 2012)
Log Message:
-----------
publisher - updating permissions and category for performance
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/admin/category.php
XoopsModules/publisher/trunk/publisher/archive.php
XoopsModules/publisher/trunk/publisher/category.php
XoopsModules/publisher/trunk/publisher/class/category.php
XoopsModules/publisher/trunk/publisher/class/item.php
XoopsModules/publisher/trunk/publisher/class/permission.php
XoopsModules/publisher/trunk/publisher/include/common.php
Modified: XoopsModules/publisher/trunk/publisher/admin/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/category.php 2012-12-01 15:55:26 UTC (rev 10296)
+++ XoopsModules/publisher/trunk/publisher/admin/category.php 2012-12-01 22:36:45 UTC (rev 10297)
@@ -109,25 +109,8 @@
$categoryObj->setVar('weight', isset($_POST['weight']) ? intval($_POST['weight']) : 1);
// Groups and permissions
- if (isset($_POST['groups_read'])) {
- $categoryObj->setGroups_read($_POST['groups_read']);
- } else {
- $categoryObj->setGroups_read();
- }
$grpread = isset($_POST['groups_read']) ? $_POST['groups_read'] : array();
-
- if (isset($_POST['groups_submit'])) {
- $categoryObj->setGroups_submit($_POST['groups_submit']);
- } else {
- $categoryObj->setGroups_submit();
- }
$grpsubmit = isset($_POST['groups_submit']) ? $_POST['groups_submit'] : array();
-
- if (isset($_POST['groups_moderation'])) {
- $categoryObj->setGroups_moderation($_POST['groups_moderation']);
- } else {
- $categoryObj->setGroups_moderation();
- }
$grpmoderation = isset($_POST['groups_moderation']) ? $_POST['groups_moderation'] : array();
@@ -167,9 +150,9 @@
exit;
}
// TODO : put this function in the category class
- publisher_saveCategoryPermissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read');
- publisher_saveCategoryPermissions($categoryObj->getGroups_submit(), $categoryObj->categoryid(), 'item_submit');
- publisher_saveCategoryPermissions($categoryObj->getGroups_moderation(), $categoryObj->categoryid(), 'category_moderation');
+ publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
+ publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
+ publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
//Added by fx2024
@@ -180,18 +163,15 @@
$categoryObj = $publisher->getHandler('category')->create();
$categoryObj->setVar('name', $_POST['scname'][$i]);
$categoryObj->setVar('parentid', $parentCat);
- $categoryObj->setGroups_read($grpread);
- $categoryObj->setGroups_submit($grpsubmit);
- $categoryObj->setGroups_moderation($grpmoderation);
if (!$categoryObj->store()) {
redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors()));
exit;
}
// TODO : put this function in the category class
- publisher_saveCategoryPermissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read');
- publisher_saveCategoryPermissions($categoryObj->getGroups_submit(), $categoryObj->categoryid(), 'item_submit');
- publisher_saveCategoryPermissions($categoryObj->getGroups_moderation(), $categoryObj->categoryid(), 'category_moderation');
+ publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
+ publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
+ publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
}
}
//end of fx2024 code
@@ -209,7 +189,6 @@
$categoryObj->setVar('name', $_POST['name']);
$categoryObj->setVar('description', $_POST['description']);
$categoryObj->setVar('weight', $_POST['weight']);
- $categoryObj->setGroups_read(isset($_POST['groups_read']) ? $_POST['groups_read'] : array());
if (isset($parentCat)) {
$categoryObj->setVar('parentid', $parentCat);
}
Modified: XoopsModules/publisher/trunk/publisher/archive.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/archive.php 2012-12-01 15:55:26 UTC (rev 10296)
+++ XoopsModules/publisher/trunk/publisher/archive.php 2012-12-01 22:36:45 UTC (rev 10297)
@@ -70,6 +70,7 @@
//Get all articles dates as an array to save memory
$items = $publisher->getHandler('item')->getAll($criteria, array('datesub'), false);
$itemsCount = count($items);
+
if (!($itemsCount > 0)) {
redirect_header(XOOPS_URL, 2, _MD_PUBLISHER_NO_TOP_PERMISSIONS);
exit;
@@ -144,6 +145,7 @@
$criteria->add($critdatesub);
$criteria->setSort('o.datesub');
$criteria->setOrder('DESC');
+ $criteria->setLimit(3000);
$storyarray = $itemhandler->getByLink($criteria); //Query Efficiency?
$count = count($storyarray);
Modified: XoopsModules/publisher/trunk/publisher/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/category.php 2012-12-01 15:55:26 UTC (rev 10296)
+++ XoopsModules/publisher/trunk/publisher/category.php 2012-12-01 22:36:45 UTC (rev 10297)
@@ -162,7 +162,7 @@
$category['total'] = $thiscategory_itemcount;
if (count($itemsObj) > 0) {
- $userids = array();
+ /*$userids = array();
if ($itemsObj) {
foreach ($itemsObj as $key => $thisitem) {
$itemids[] = $thisitem->getVar('itemid');
@@ -170,7 +170,8 @@
}
}
$member_handler = xoops_gethandler('member');
- $users = $member_handler->getUsers(new Criteria('uid', "(" . implode(',', array_keys($userids)) . ")", "IN"), true);
+ //$users = $member_handler->getUsers(new Criteria('uid', "(" . implode(',', array_keys($userids)) . ")", "IN"), true);
+ */
// Adding the items of the selected category
for ($i = 0; $i < $totalItemOnPage; $i++) {
Modified: XoopsModules/publisher/trunk/publisher/class/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/category.php 2012-12-01 15:55:26 UTC (rev 10296)
+++ XoopsModules/publisher/trunk/publisher/class/category.php 2012-12-01 22:36:45 UTC (rev 10297)
@@ -32,21 +32,6 @@
/**
* @var array
*/
- public $_groups_read = null;
-
- /**
- * @var array
- */
- public $_groups_submit = null;
-
- /**
- * @var array
- */
- public $_groups_moderation = null;
-
- /**
- * @var array
- */
public $_categoryPath = false;
/**
@@ -97,16 +82,6 @@
}
/**
- * Assigns permissions
- */
- public function assignOtherProperties()
- {
- $this->_groups_read = $this->publisher->getHandler('permission')->getGrantedGroupsById('category_read', $this->categoryid());
- $this->_groups_submit = $this->publisher->getHandler('permission')->getGrantedGroupsById('item_submit', $this->categoryid());
- $this->_groups_moderation = $this->publisher->getHandler('permission')->getGrantedGroupsById('category_moderation', $this->categoryid());
- }
-
- /**
* @return bool
*/
public function checkPermission()
@@ -119,7 +94,7 @@
if (is_object($xoopsUser) && $xoopsUser->getVar('uid') == $this->moderator()) {
return true;
}
- $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted = $this->publisher->getHandler('permission')->isGranted('category_read');
if (in_array($this->categoryid(), $categoriesGranted)) {
$ret = true;
}
@@ -199,59 +174,26 @@
*/
public function getGroups_read()
{
- if (count($this->_groups_read) < 1) {
- $this->assignOtherProperties();
- }
- return $this->_groups_read;
+ return $this->publisher->getHandler('permission')->getGrantedGroupsById('category_read', $this->categoryid());
}
/**
- * @param array $groups_read
- */
- public function setGroups_read($groups_read = array('0'))
- {
- $this->_groups_read = $groups_read;
- }
-
- /**
* @return array|null
*/
public function getGroups_submit()
{
- if (count($this->_groups_submit) < 1) {
- $this->assignOtherProperties();
- }
- return $this->_groups_submit;
+ return $this->publisher->getHandler('permission')->getGrantedGroupsById('item_submit', $this->categoryid());
}
/**
- * @param array $groups_submit
- */
- public function setGroups_submit($groups_submit = array('0'))
- {
- $this->_groups_submit = $groups_submit;
- }
-
- /**
* @return array|null
*/
public function getGroups_moderation()
{
- if (count($this->_groups_moderation) < 1) {
- $this->assignOtherProperties();
- }
- return $this->_groups_moderation;
+ return $this->publisher->getHandler('permission')->getGrantedGroupsById('category_moderation', $this->categoryid());
}
/**
- * @param array $groups_moderation
- */
- public function setGroups_moderation($groups_moderation = array('0'))
- {
- $this->_groups_moderation = $groups_moderation;
- }
-
- /**
* @return string
*/
public function getCategoryUrl()
@@ -412,10 +354,12 @@
*/
public function &get($id)
{
- $obj = parent::get($id);
- if (is_object($obj)) {
- $obj->assignOtherProperties();
+ static $cats;
+ if (isset($cats[$id])) {
+ return $cats[$id];
}
+ $obj = parent::get($id);
+ $cats[$id] = $obj;
return $obj;
}
@@ -489,10 +433,7 @@
{
$ret = array();
$theObjects = parent::getObjects($criteria, true);
- $publisher_category_group = $this->publisher->getHandler('permission')->getGrantedGroups();
foreach ($theObjects as $theObject) {
- $theObject->_groups_read = isset($publisher_category_group['category_read'][$theObject->categoryid()]) ? $publisher_category_group['category_read'][$theObject->categoryid()] : array();
- $theObject->_groups_submit = isset($publisher_category_group['item_submit'][$theObject->categoryid()]) ? $publisher_category_group['item_submit'][$theObject->categoryid()] : array();
if (!$id_as_key) {
$ret[] = $theObject;
} else {
@@ -504,19 +445,6 @@
}
/**
- * @return array
- */
- public function getAllCategoriesObj()
- {
- static $publisher_allCategoriesObj;
- if (!isset($publisher_allCategoriesObj)) {
- $publisher_allCategoriesObj = $this->getObjects(null, true);
- $publisher_allCategoriesObj[0] = array();
- }
- return $publisher_allCategoriesObj;
- }
-
- /**
* @param int $limit
* @param int $start
* @param int $parentid
Modified: XoopsModules/publisher/trunk/publisher/class/item.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/item.php 2012-12-01 15:55:26 UTC (rev 10296)
+++ XoopsModules/publisher/trunk/publisher/class/item.php 2012-12-01 22:36:45 UTC (rev 10297)
@@ -77,7 +77,6 @@
foreach ($item->vars as $k => $v) {
$this->assignVar($k, $v['value']);
}
- $this->assignOtherProperties();
}
}
@@ -94,15 +93,6 @@
}
/**
- * Just like the name says
- */
- public function assignOtherProperties()
- {
- $publisher_allCategoriesObj = $this->publisher->getHandler('category')->getAllCategoriesObj();
- $this->_category = $publisher_allCategoriesObj[$this->getVar('categoryid')];
- }
-
- /**
* @return null|PublisherCategory
*/
public function category()
@@ -426,11 +416,7 @@
{
global $xoopsConfig, $xoopsUser;
$adminLinks = '';
- $groups = ($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
- $gperm_handler = xoops_gethandler('groupperm');
- $module_id = $this->publisher->getModule()->getVar('mid');
- // Do we have access to the parent category
- if (is_object($xoopsUser) && (publisher_userIsAdmin() || publisher_userIsAuthor($this) || $gperm_handler->checkRight('item_submit', $this->categoryid(), $groups, $module_id))) {
+ if (is_object($xoopsUser) && (publisher_userIsAdmin() || publisher_userIsAuthor($this) || $this->publisher->getHandler('permission')->isGranted('item_submit', $this->categoryid()))) {
if (publisher_userIsAdmin() || publisher_userIsAuthor($this) || publisher_userIsModerator($this)) {
if ($this->publisher->getConfig('perm_edit') || publisher_userIsModerator($this) || publisher_userIsAdmin()) {
// Edit button
@@ -890,18 +876,14 @@
*/
public function accessGranted()
{
- global $xoopsUser;
if (publisher_userIsAdmin()) {
return true;
}
if ($this->status() != _PUBLISHER_STATUS_PUBLISHED) {
return false;
}
- $gperm_handler = xoops_gethandler('groupperm');
- $groups = $xoopsUser ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
- $module_id = $this->publisher->getModule()->getVar('mid');
// Do we have access to the parent category
- if ($gperm_handler->checkRight('category_read', $this->categoryid(), $groups, $module_id)) {
+ if ($this->publisher->getHandler('permission')->isGranted('category_read', $this->categoryid())) {
return true;
}
return false;
@@ -1181,11 +1163,7 @@
$theObjects[$myrow['itemid']] = $item;
unset($item);
}
- // since we need the categoryObj and the items permissions for all these items, let's
- // fetch them only once ;-)
- $publisher_allCategoriesObj = $this->publisher->getHandler('category')->getAllCategoriesObj();
foreach ($theObjects as $theObject) {
- $theObject->_category = isset($publisher_allCategoriesObj[$theObject->getVar('categoryid')]) ? $publisher_allCategoriesObj[$theObject->getVar('categoryid')] : null;
if ($id_key == 'none') {
$ret[] = $theObject;
} elseif ($id_key == 'itemid') {
@@ -1621,7 +1599,8 @@
public function getLastPublishedByCat($status = array(_PUBLISHER_STATUS_PUBLISHED))
{
$ret = array();
- $cat = array();
+ /*$cat = array();
+
$sql = "SELECT categoryid, MAX(datesub) as date FROM " . $this->db->prefix('publisher_items') . " WHERE status IN (" . implode(',', $status) . ") GROUP BY categoryid";
$result = $this->db->query($sql);
while ($row = $this->db->fetchArray($result)) {
@@ -1644,6 +1623,19 @@
$ret[$row['categoryid']] = $item;
unset($item);
}
+ */
+ $sql = "SELECT mi.categoryid, mi.itemid, mi.title, mi.short_url, mi.uid, mi.datesub";
+ $sql .= " FROM (SELECT categoryid, MAX(datesub) AS date FROM " . $this->db->prefix('publisher_items');
+ $sql .= " WHERE status IN (" . implode(',', $status) . ")";
+ $sql .= " GROUP BY categoryid)mo";
+ $sql .= " JOIN " . $this->db->prefix('publisher_items') . " mi ON mi.datesub = mo.date";
+ $result = $this->db->query($sql);
+ while ($row = $this->db->fetchArray($result)) {
+ $item = new PublisherItem();
+ $item->assignVars($row);
+ $ret[$row['categoryid']] = $item;
+ unset($item);
+ }
return $ret;
}
Modified: XoopsModules/publisher/trunk/publisher/class/permission.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/permission.php 2012-12-01 15:55:26 UTC (rev 10296)
+++ XoopsModules/publisher/trunk/publisher/class/permission.php 2012-12-01 22:36:45 UTC (rev 10297)
@@ -21,9 +21,7 @@
* @version $Id$
*/
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
-
include_once dirname(dirname(__FILE__)) . '/include/common.php';
-
class PublisherPermissionHandler extends XoopsObjectHandler
{
/**
@@ -47,8 +45,30 @@
*/
public function getGrantedGroupsById($gperm_name, $id)
{
- $groups = $this->getGrantedGroups($gperm_name);
- return isset($groups[$id]) ? $groups[$id] : array();
+ static $items;
+ if (isset($items[$gperm_name][$id])) {
+ return $items[$gperm_name][$id];
+ }
+ $groups = array();
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('gperm_modid', $this->publisher->getModule()->getVar('mid')));
+ $criteria->add(new Criteria('gperm_name', $gperm_name));
+ $criteria->add(new Criteria('gperm_itemid', $id));
+ //Instead of calling groupperm handler and get objects, we will save some memory and do it our way
+ $db = XoopsDatabaseFactory::getDatabaseConnection();
+ $limit = $start = 0;
+ $sql = 'SELECT gperm_groupid FROM ' . $db->prefix('group_permission');
+ if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
+ $sql .= ' ' . $criteria->renderWhere();
+ $limit = $criteria->getLimit();
+ $start = $criteria->getStart();
+ }
+ $result = $db->query($sql, $limit, $start);
+ while ($myrow = $db->fetchArray($result)) {
+ $groups[$myrow['gperm_groupid']] = $myrow['gperm_groupid'];
+ }
+ $items[$gperm_name][$id] = $groups;
+ return $groups;
}
/**
@@ -56,27 +76,20 @@
*
* @return array
*/
- public function getGrantedGroups($gperm_name = '')
+ public function getGrantedGroups($gperm_name)
{
- static $groups;
- static $publisher_all_permissions_fetched;
- if ($gperm_name) {
- if (isset($groups[$gperm_name])) {
- return $groups[$gperm_name];
- } elseif (true === $publisher_all_permissions_fetched) {
- //trying to get non existing permission
- return array();
- }
- } else if (true === $publisher_all_permissions_fetched) {
- return $groups;
+ static $items;
+ if (isset($items[$gperm_name])) {
+ return $items[$gperm_name];
}
- $publisher_all_permissions_fetched = true;
+ $groups = array();
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('gperm_modid', $this->publisher->getModule()->getVar('mid')));
+ $criteria->add(new Criteria('gperm_name', $gperm_name));
//Instead of calling groupperm handler and get objects, we will save some memory and do it our way
$db = XoopsDatabaseFactory::getDatabaseConnection();
$limit = $start = 0;
- $sql = 'SELECT * FROM ' . $db->prefix('group_permission');
+ $sql = 'SELECT gperm_groupid FROM ' . $db->prefix('group_permission');
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
$sql .= ' ' . $criteria->renderWhere();
$limit = $criteria->getLimit();
@@ -84,10 +97,11 @@
}
$result = $db->query($sql, $limit, $start);
while ($myrow = $db->fetchArray($result)) {
- $groups[$myrow['gperm_name']][$myrow['gperm_itemid']][] = $myrow['gperm_groupid'];
+ $groups[$myrow['gperm_groupid']] = $myrow['gperm_groupid'];
}
+ $items[$gperm_name] = $groups;
//Return the permission array
- return $this->getGrantedGroups($gperm_name);
+ return $groups;
}
/**
@@ -98,33 +112,36 @@
*
* @return array
*/
- public function getGrantedItems($gperm_name, $id = null)
+ public function getGrantedItems($gperm_name, $id = 0)
{
+ static $items;
+ if (isset($items[$gperm_name][$id])) {
+ return $items[$gperm_name][$id];
+ }
global $xoopsUser;
- static $permissions;
- if (!isset($permissions[$gperm_name]) || ($id != null && !isset($permissions[$gperm_name][$id]))) {
- //Instead of calling groupperm handler and get objects, we will save some memory and do it our way
- $criteria = new CriteriaCompo(new Criteria('gperm_name', $gperm_name));
- $criteria->add(new Criteria('gperm_modid', $this->publisher->getModule()->getVar('mid')));
- //Get user's groups
- $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
- $criteria2 = new CriteriaCompo();
- foreach ($groups as $gid) {
- $criteria2->add(new Criteria('gperm_groupid', $gid), 'OR');
- }
- $criteria->add($criteria2);
- $db = XoopsDatabaseFactory::getDatabaseConnection();
- $sql = 'SELECT * FROM ' . $db->prefix('group_permission');
- $sql .= ' ' . $criteria->renderWhere();
- $result = $db->query($sql, 0, 0);
- $permissions[$gperm_name] = array();
- while ($myrow = $db->fetchArray($result)) {
- $permissions[$gperm_name][] = $myrow['gperm_itemid'];
- }
- $permissions[$gperm_name] = array_unique($permissions[$gperm_name]);
+ $ret = array();
+ //Instead of calling groupperm handler and get objects, we will save some memory and do it our way
+ $criteria = new CriteriaCompo(new Criteria('gperm_name', $gperm_name));
+ $criteria->add(new Criteria('gperm_modid', $this->publisher->getModule()->getVar('mid')));
+ if ($id != 0) {
+ $criteria->add(new Criteria('gperm_itemid', $id));
}
- //Return the permission array
- return isset($permissions[$gperm_name]) ? $permissions[$gperm_name] : array();
+ //Get user's groups
+ $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
+ $criteria2 = new CriteriaCompo();
+ foreach ($groups as $gid) {
+ $criteria2->add(new Criteria('gperm_groupid', $gid), 'OR');
+ }
+ $criteria->add($criteria2);
+ $db = XoopsDatabaseFactory::getDatabaseConnection();
+ $sql = 'SELECT gperm_itemid FROM ' . $db->prefix('group_permission');
+ $sql .= ' ' . $criteria->renderWhere();
+ $result = $db->query($sql, 0, 0);
+ while ($myrow = $db->fetchArray($result)) {
+ $ret[$myrow['gperm_itemid']] = $myrow['gperm_itemid'];
+ }
+ $items[$gperm_name][$id] = $ret;
+ return $ret;
}
/**
@@ -135,13 +152,20 @@
*/
public function isGranted($gperm_name, $id = null)
{
- static $permissions;
- if ($id == null) return false;
- if (!isset($permissions[$gperm_name]) || !isset($permissions[$gperm_name][$id])) {
- $userpermissions = in_array($id, $this->getGrantedItems($gperm_name)) ? true : false;
- $permissions[$gperm_name][$id] = $userpermissions;
+ $permissions = $this->getGrantedItems($gperm_name, $id);
+ if ($id == null) {
+ if (!empty($permissions)) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ if (!empty($permissions) && isset ($permissions[$id])) {
+ return true;
+ } else {
+ return false;
+ }
}
- return $permissions[$gperm_name][$id];
}
/**
Modified: XoopsModules/publisher/trunk/publisher/include/common.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/include/common.php 2012-12-01 15:55:26 UTC (rev 10296)
+++ XoopsModules/publisher/trunk/publisher/include/common.php 2012-12-01 22:36:45 UTC (rev 10297)
@@ -39,7 +39,7 @@
include_once PUBLISHER_ROOT_PATH . '/class/publisher.php';
include_once PUBLISHER_ROOT_PATH . '/class/request.php';
-$debug = true;
+$debug = false;
$publisher = PublisherPublisher::getInstance($debug);
//This is needed or it will not work in blocks.
|
|
From: <tr...@us...> - 2012-12-12 23:26:44
|
Revision: 10373
http://sourceforge.net/p/xoops/svn/10373
Author: trabis
Date: 2012-12-12 23:26:38 +0000 (Wed, 12 Dec 2012)
Log Message:
-----------
First publisher revision
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/admin/about.php
XoopsModules/publisher/trunk/publisher/admin/admin_header.php
XoopsModules/publisher/trunk/publisher/admin/category.php
XoopsModules/publisher/trunk/publisher/admin/clone.php
XoopsModules/publisher/trunk/publisher/admin/file.php
XoopsModules/publisher/trunk/publisher/admin/import/news.php
XoopsModules/publisher/trunk/publisher/admin/import/smartsection.php
XoopsModules/publisher/trunk/publisher/admin/import/wfsection.php
XoopsModules/publisher/trunk/publisher/admin/import/xfsection.php
XoopsModules/publisher/trunk/publisher/admin/import.php
XoopsModules/publisher/trunk/publisher/admin/index.php
XoopsModules/publisher/trunk/publisher/admin/item.php
XoopsModules/publisher/trunk/publisher/admin/main.php
XoopsModules/publisher/trunk/publisher/admin/menu.php
XoopsModules/publisher/trunk/publisher/admin/mimetypes.php
XoopsModules/publisher/trunk/publisher/admin/pagewrap.php
XoopsModules/publisher/trunk/publisher/admin/permissions.php
XoopsModules/publisher/trunk/publisher/admin/preferences.php
XoopsModules/publisher/trunk/publisher/admin/pw_delete_file.php
XoopsModules/publisher/trunk/publisher/admin/pw_upload_file.php
XoopsModules/publisher/trunk/publisher/archive.php
XoopsModules/publisher/trunk/publisher/author_items.php
XoopsModules/publisher/trunk/publisher/backend.php
XoopsModules/publisher/trunk/publisher/blocks/category_items_sel.php
XoopsModules/publisher/trunk/publisher/blocks/date_to_date.php
XoopsModules/publisher/trunk/publisher/blocks/items_columns.php
XoopsModules/publisher/trunk/publisher/blocks/items_menu.php
XoopsModules/publisher/trunk/publisher/blocks/items_new.php
XoopsModules/publisher/trunk/publisher/blocks/items_random_item.php
XoopsModules/publisher/trunk/publisher/blocks/items_recent.php
XoopsModules/publisher/trunk/publisher/blocks/items_spot.php
XoopsModules/publisher/trunk/publisher/blocks/latest_files.php
XoopsModules/publisher/trunk/publisher/blocks/latest_news.php
XoopsModules/publisher/trunk/publisher/blocks/search.php
XoopsModules/publisher/trunk/publisher/category.php
XoopsModules/publisher/trunk/publisher/class/blockform.php
XoopsModules/publisher/trunk/publisher/class/category.php
XoopsModules/publisher/trunk/publisher/class/file.php
XoopsModules/publisher/trunk/publisher/class/form/category.php
XoopsModules/publisher/trunk/publisher/class/form/file.php
XoopsModules/publisher/trunk/publisher/class/form/item.php
XoopsModules/publisher/trunk/publisher/class/groupperm.php
XoopsModules/publisher/trunk/publisher/class/item.php
XoopsModules/publisher/trunk/publisher/class/metagen.php
XoopsModules/publisher/trunk/publisher/class/mimetype.php
XoopsModules/publisher/trunk/publisher/class/permission.php
XoopsModules/publisher/trunk/publisher/class/publisher.php
XoopsModules/publisher/trunk/publisher/class/rating.php
XoopsModules/publisher/trunk/publisher/class/request.php
XoopsModules/publisher/trunk/publisher/class/themetabform.php
XoopsModules/publisher/trunk/publisher/class/uploader.php
XoopsModules/publisher/trunk/publisher/comment_delete.php
XoopsModules/publisher/trunk/publisher/comment_edit.php
XoopsModules/publisher/trunk/publisher/comment_new.php
XoopsModules/publisher/trunk/publisher/comment_post.php
XoopsModules/publisher/trunk/publisher/comment_reply.php
XoopsModules/publisher/trunk/publisher/file.php
XoopsModules/publisher/trunk/publisher/footer.php
XoopsModules/publisher/trunk/publisher/header.php
XoopsModules/publisher/trunk/publisher/include/ajax_rating.php
XoopsModules/publisher/trunk/publisher/include/ajax_upload.php
XoopsModules/publisher/trunk/publisher/include/comment_functions.php
XoopsModules/publisher/trunk/publisher/include/common.php
XoopsModules/publisher/trunk/publisher/include/notification.inc.php
XoopsModules/publisher/trunk/publisher/include/plugin.tag.php
XoopsModules/publisher/trunk/publisher/include/search.inc.php
XoopsModules/publisher/trunk/publisher/include/seo.inc.php
XoopsModules/publisher/trunk/publisher/include/update.php
XoopsModules/publisher/trunk/publisher/index.php
XoopsModules/publisher/trunk/publisher/item.php
XoopsModules/publisher/trunk/publisher/list.tag.php
XoopsModules/publisher/trunk/publisher/makepdf.php
XoopsModules/publisher/trunk/publisher/notification_update.php
XoopsModules/publisher/trunk/publisher/pop.php
XoopsModules/publisher/trunk/publisher/print.php
XoopsModules/publisher/trunk/publisher/rate.php
XoopsModules/publisher/trunk/publisher/search.php
XoopsModules/publisher/trunk/publisher/submit.php
XoopsModules/publisher/trunk/publisher/view.tag.php
XoopsModules/publisher/trunk/publisher/visit.php
XoopsModules/publisher/trunk/publisher/xoops_version.php
Added Paths:
-----------
XoopsModules/publisher/trunk/publisher/class/utils.php
XoopsModules/publisher/trunk/publisher/preloads/
XoopsModules/publisher/trunk/publisher/preloads/core.php
XoopsModules/publisher/trunk/publisher/preloads/index.html
Removed Paths:
-------------
XoopsModules/publisher/trunk/publisher/class/highlighter.php
XoopsModules/publisher/trunk/publisher/include/constants.php
XoopsModules/publisher/trunk/publisher/include/functions.php
XoopsModules/publisher/trunk/publisher/include/media.textsanitizer.php
XoopsModules/publisher/trunk/publisher/include/seo_functions.php
Modified: XoopsModules/publisher/trunk/publisher/admin/about.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/about.php 2012-12-12 22:08:20 UTC (rev 10372)
+++ XoopsModules/publisher/trunk/publisher/admin/about.php 2012-12-12 23:26:38 UTC (rev 10373)
@@ -20,13 +20,12 @@
* @version $Id$
*/
-include_once dirname(__FILE__) . '/admin_header.php';
+include dirname(__FILE__) . '/admin_header.php';
+$xoops = Xoops::getInstance();
+$xoops->header();
-xoops_cp_header();
+$aboutAdmin = new XoopsModuleAdmin();
+$aboutAdmin->displayNavigation('about.php');
+$aboutAdmin->displayAbout('6KJ7RW5DR3VTJ', false);
-$aboutAdmin = new ModuleAdmin();
-
-echo $aboutAdmin->addNavigation('about.php');
-echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
-
-xoops_cp_footer();
\ No newline at end of file
+$xoops->footer();
\ No newline at end of file
Modified: XoopsModules/publisher/trunk/publisher/admin/admin_header.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/admin_header.php 2012-12-12 22:08:20 UTC (rev 10372)
+++ XoopsModules/publisher/trunk/publisher/admin/admin_header.php 2012-12-12 23:26:38 UTC (rev 10373)
@@ -20,27 +20,10 @@
*/
include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
-include_once dirname(dirname(__FILE__)) . '/include/common.php';
-include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
-//xoops_loadLanguage('admin', PUBLISHER_DIRNAME);
-xoops_loadLanguage('modinfo', PUBLISHER_DIRNAME);
+$xoops = Xoops::getInstance();
+$publisher = Publisher::getInstance();
+$publisher->loadLanguage('modinfo');
-$imagearray = array(
- 'editimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_edit.png' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle' />",
- 'deleteimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_delete.png' alt='" . _AM_PUBLISHER_ICO_DELETE . "' align='middle' />",
- 'online' => "<img src='" . PUBLISHER_IMAGES_URL . "/on.png' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle' />",
- 'offline' => "<img src='" . PUBLISHER_IMAGES_URL . "/off.png' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle' />",
-);
-if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){
- include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php');
-}else{
- echo xoops_error('/Frameworks/moduleclasses/moduleadmin/ is required!!!');
-}
-/*
-$myts =& MyTextSanitizer::getInstance();
-
-if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH."/class/template.php");
- $xoopsTpl = new XoopsTpl();
-} */
\ No newline at end of file
+XoopsLoad::loadFile($xoops->path(dirname(dirname(__FILE__)) . '/include/common.php'));
+XoopsLoad::loadFile($xoops->path(XOOPS_ROOT_PATH . '/include/cp_header.php'));
Modified: XoopsModules/publisher/trunk/publisher/admin/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/category.php 2012-12-12 22:08:20 UTC (rev 10372)
+++ XoopsModules/publisher/trunk/publisher/admin/category.php 2012-12-12 23:26:38 UTC (rev 10373)
@@ -21,6 +21,7 @@
include_once dirname(__FILE__) . '/admin_header.php';
+$xoops = Xoops::getInstance();
$op = PublisherRequest::getString('op');
$op = isset($_POST['editor']) ? 'mod' : $op;
@@ -35,20 +36,19 @@
switch ($op) {
case "del":
- $categoryObj = $publisher->getHandler('category')->get($categoryid);
+ /* @var $categoryObj PublisherCategory */
+ $categoryObj = $publisher->getCategoryHandler()->get($categoryid);
$confirm = (isset($_POST['confirm'])) ? $_POST['confirm'] : 0;
$name = (isset($_POST['name'])) ? $_POST['name'] : '';
if ($confirm) {
- if (!$publisher->getHandler('category')->delete($categoryObj)) {
- redirect_header("category.php", 1, _AM_PUBLISHER_DELETE_CAT_ERROR);
- exit();
+ if (!$publisher->getCategoryHandler()->delete($categoryObj)) {
+ $xoops->redirect("category.php", 1, _AM_PUBLISHER_DELETE_CAT_ERROR);
}
- redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_COLISDELETED, $name));
- exit();
+ $xoops->redirect("category.php", 1, sprintf(_AM_PUBLISHER_COLISDELETED, $name));
} else {
- xoops_cp_header();
- xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->name() . "'. <br /> <br />" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE);
- xoops_cp_footer();
+ $xoops->header();
+ $xoops->confirm(array('op' => 'del', 'categoryid' => $categoryObj->getVar('categoryid'), 'confirm' => 1, 'name' => $categoryObj->getVar('name')), 'category.php', _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->getVar('name') . "'. <br /> <br />" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE);
+ $xoops->footer();
}
break;
@@ -58,7 +58,7 @@
$nb_subcats = $nb_subcats + (isset($_POST['nb_sub_yet']) ? intval($_POST['nb_sub_yet']) : 4);
//end of fx2024 code
- publisher_cpHeader();
+ PublisherUtils::cpHeader();
publisher_editCat(true, $categoryid, $nb_subcats);
break;
@@ -66,11 +66,11 @@
global $modify;
$parentid = PublisherRequest::getInt('parentid');
-
+ /* @var $categoryObj PublisherCategory */
if ($categoryid != 0) {
- $categoryObj = $publisher->getHandler('category')->get($categoryid);
+ $categoryObj = $publisher->getCategoryHandler()->get($categoryid);
} else {
- $categoryObj = $publisher->getHandler('category')->create();
+ $categoryObj = $publisher->getCategoryHandler()->create();
}
// Uploading the image, if any
@@ -82,20 +82,17 @@
$max_size = $publisher->getConfig('maximum_filesize');
$max_imgwidth = $publisher->getConfig('maximum_image_width');
$max_imgheight = $publisher->getConfig('maximum_image_height');
- $allowed_mimetypes = publisher_getAllowedImagesTypes();
+ $allowed_mimetypes = PublisherUtils::getAllowedImagesTypes();
if ($_FILES[$filename]['tmp_name'] == "" || !is_readable($_FILES[$filename]['tmp_name'])) {
- redirect_header('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR);
- exit();
+ $xoops->redirect('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR);
}
- xoops_load('XoopsMediaUploader');
- $uploader = new XoopsMediaUploader(publisher_getImageDir('category'), $allowed_mimetypes, $max_size, $max_imgwidth, $max_imgheight);
+ $uploader = new PublisherUploader(PublisherUtils::getImageDir('category'), $allowed_mimetypes, $max_size, $max_imgwidth, $max_imgheight);
if ($uploader->fetchMedia($filename) && $uploader->upload()) {
$categoryObj->setVar('image', $uploader->getSavedFileName());
} else {
- redirect_header('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR . $uploader->getErrors());
- exit();
+ $xoops->redirect('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR . $uploader->getErrors());
}
}
} else {
@@ -146,37 +143,34 @@
}
if (!$categoryObj->store()) {
- redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_CATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors()));
- exit;
+ $xoops->redirect("javascript:history.go(-1)", 3, _AM_PUBLISHER_CATEGORY_SAVE_ERROR . PublisherUtils::formatErrors($categoryObj->getErrors()));
}
// TODO : put this function in the category class
- publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
- publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
- publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
+ PublisherUtils::saveCategoryPermissions($grpread, $categoryObj->getVar('categoryid'), 'category_read');
+ PublisherUtils::saveCategoryPermissions($grpsubmit, $categoryObj->getVar('categoryid'), 'item_submit');
+ PublisherUtils::saveCategoryPermissions($grpmoderation, $categoryObj->getVar('categoryid'), 'category_moderation');
//Added by fx2024
- $parentCat = $categoryObj->categoryid();
+ $parentCat = $categoryObj->getVar('categoryid');
$sizeof = sizeof($_POST['scname']);
for ($i = 0; $i < $sizeof; $i++) {
if ($_POST['scname'][$i] != '') {
- $categoryObj = $publisher->getHandler('category')->create();
+ $categoryObj = $publisher->getCategoryHandler()->create();
$categoryObj->setVar('name', $_POST['scname'][$i]);
$categoryObj->setVar('parentid', $parentCat);
if (!$categoryObj->store()) {
- redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors()));
- exit;
+ $xoops->redirect("javascript:history.go(-1)", 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR . PublisherUtils::formatErrors($categoryObj->getErrors()));
}
// TODO : put this function in the category class
- publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
- publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
- publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
+ PublisherUtils::saveCategoryPermissions($grpread, $categoryObj->getVar('categoryid'), 'category_read');
+ PublisherUtils::saveCategoryPermissions($grpsubmit, $categoryObj->getVar('categoryid'), 'item_submit');
+ PublisherUtils::saveCategoryPermissions($grpmoderation, $categoryObj->getVar('categoryid'), 'category_moderation');
}
}
//end of fx2024 code
- redirect_header($redirect_to, 2, $redirect_msg);
- exit();
+ $xoops->redirect($redirect_to, 2, $redirect_msg);
break;
//Added by fx2024
@@ -185,7 +179,7 @@
$categoryid = 0;
$nb_subcats = intval($_POST['nb_subcats']) + $_POST['nb_sub_yet'];
- $categoryObj = $publisher->getHandler('category')->create();
+ $categoryObj = $publisher->getCategoryHandler()->create();
$categoryObj->setVar('name', $_POST['name']);
$categoryObj->setVar('description', $_POST['description']);
$categoryObj->setVar('weight', $_POST['weight']);
@@ -193,7 +187,7 @@
$categoryObj->setVar('parentid', $parentCat);
}
- publisher_cpHeader();
+ PublisherUtils::cpHeader();
publisher_editCat(true, $categoryid, $nb_subcats, $categoryObj);
exit();
@@ -201,12 +195,11 @@
//end of fx2024 code
case "cancel":
- redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_BACK2IDX, ''));
- exit();
-
+ $xoops->redirect("category.php", 1, sprintf(_AM_PUBLISHER_BACK2IDX, ''));
+ break;
case "default":
default:
- publisher_cpHeader();
+ PublisherUtils::cpHeader();
//publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES);
echo "<br />\n";
@@ -216,9 +209,9 @@
echo "</div></form>";
// Creating the objects for top categories
- $categoriesObj = $publisher->getHandler('category')->getCategories($publisher->getConfig('idxcat_perpage'), $startcategory, 0);
+ $categoriesObj = $publisher->getCategoryHandler()->getCategories($publisher->getConfig('idxcat_perpage'), $startcategory, 0);
- publisher_openCollapsableBar('createdcategories', 'createdcategoriesicon', _AM_PUBLISHER_CATEGORIES_TITLE, _AM_PUBLISHER_CATEGORIES_DSC);
+ PublisherUtils::openCollapsableBar('createdcategories', 'createdcategoriesicon', _AM_PUBLISHER_CATEGORIES_TITLE, _AM_PUBLISHER_CATEGORIES_DSC);
echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
echo "<tr>";
@@ -226,7 +219,7 @@
echo "<td width='60' class='bg3' width='65' align='center'><strong>" . _CO_PUBLISHER_WEIGHT . "</strong></td>";
echo "<td width='60' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . "</strong></td>";
echo "</tr>";
- $totalCategories = $publisher->getHandler('category')->getCategoriesCount(0);
+ $totalCategories = $publisher->getCategoryHandler()->getCategoriesCount(0);
if (count($categoriesObj) > 0) {
foreach ($categoriesObj as $key => $thiscat) {
publisher_displayCategory($thiscat);
@@ -238,30 +231,29 @@
$categoryid = '0';
}
echo "</table>\n";
- include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
$pagenav = new XoopsPageNav($totalCategories, $publisher->getConfig('idxcat_perpage'), $startcategory, 'startcategory');
echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
echo "<br />";
- publisher_closeCollapsableBar('createdcategories', 'createdcategoriesicon');
+ PublisherUtils::closeCollapsableBar('createdcategories', 'createdcategoriesicon');
echo "<br>";
//editcat(false);
break;
}
-xoops_cp_footer();
+$xoops->footer();
-function publisher_displayCategory($categoryObj, $level = 0)
+function publisher_displayCategory(PublisherCategory $categoryObj, $level = 0)
{
- $publisher = PublisherPublisher::getInstance();
+ $publisher = Publisher::getInstance();
- $description = $categoryObj->description();
+ $description = $categoryObj->getVar('description');
if (!XOOPS_USE_MULTIBYTES) {
if (strlen($description) >= 100) {
$description = substr($description, 0, (100 - 1)) . "...";
}
}
- $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->categoryid() . "&parentid=" . $categoryObj->parentid() . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITCOL . "' alt='" . _AM_PUBLISHER_EDITCOL . "' /></a>";
- $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->categoryid() . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETECOL . "' alt='" . _AM_PUBLISHER_DELETECOL . "' /></a>";
+ $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->getVar('categoryid') . "&parentid=" . $categoryObj->getVar('parentid') . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITCOL . "' alt='" . _AM_PUBLISHER_EDITCOL . "' /></a>";
+ $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->getVar('categoryid') . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETECOL . "' alt='" . _AM_PUBLISHER_DELETECOL . "' /></a>";
$spaces = '';
for ($j = 0; $j < $level; $j++) {
@@ -269,14 +261,14 @@
}
echo "<tr>";
- echo "<td class='even' align='left'>" . $spaces . "<a href='" . PUBLISHER_URL . "/category.php?categoryid=" . $categoryObj->categoryid() . "'><img src='" . PUBLISHER_URL . "/images/links/subcat.gif' alt='' /> " . $categoryObj->name() . "</a></td>";
- echo "<td class='even' align='center'>" . $categoryObj->weight() . "</td>";
+ echo "<td class='even' align='left'>" . $spaces . "<a href='" . PUBLISHER_URL . "/category.php?categoryid=" . $categoryObj->getVar('categoryid') . "'><img src='" . PUBLISHER_URL . "/images/links/subcat.gif' alt='' /> " . $categoryObj->getVar('name') . "</a></td>";
+ echo "<td class='even' align='center'>" . $categoryObj->getVar('weight') . "</td>";
echo "<td class='even' align='center'> $modify $delete </td>";
echo "</tr>";
- $subCategoriesObj = $publisher->getHandler('category')->getCategories(0, 0, $categoryObj->categoryid());
+ $subCategoriesObj = $publisher->getCategoryHandler()->getCategories(0, 0, $categoryObj->getVar('categoryid'));
if (count($subCategoriesObj) > 0) {
$level++;
- foreach ($subCategoriesObj as $key => $thiscat) {
+ foreach ($subCategoriesObj as $thiscat) {
publisher_displayCategory($thiscat, $level);
}
}
@@ -285,19 +277,20 @@
function publisher_editCat($showmenu = false, $categoryid = 0, $nb_subcats = 4, $categoryObj = null)
{
- $publisher = PublisherPublisher::getInstance();
+ $xoops = Xoops::getInstance();
+ $publisher = Publisher::getInstance();
+ /* @var $categoryObj PublisherCategory */
// if there is a parameter, and the id exists, retrieve data: we're editing a category
if ($categoryid != 0) {
// Creating the category object for the selected category
- $categoryObj = $publisher->getHandler('category')->get($categoryid);
+ $categoryObj = $publisher->getCategoryHandler()->get($categoryid);
if ($categoryObj->notLoaded()) {
- redirect_header("category.php", 1, _AM_PUBLISHER_NOCOLTOEDIT);
- exit();
+ $xoops->redirect("category.php", 1, _AM_PUBLISHER_NOCOLTOEDIT);
}
} else {
if (!$categoryObj) {
- $categoryObj = $publisher->getHandler('category')->create();
+ $categoryObj = $publisher->getCategoryHandler()->create();
}
}
@@ -306,34 +299,36 @@
//publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES . " > " . _AM_PUBLISHER_EDITING);
}
echo "<br />\n";
- publisher_openCollapsableBar('edittable', 'edittableicon', _AM_PUBLISHER_EDITCOL, _AM_PUBLISHER_CATEGORY_EDIT_INFO);
+ PublisherUtils::openCollapsableBar('edittable', 'edittableicon', _AM_PUBLISHER_EDITCOL, _AM_PUBLISHER_CATEGORY_EDIT_INFO);
} else {
if ($showmenu) {
//publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES . " > " . _AM_PUBLISHER_CREATINGNEW);
}
- publisher_openCollapsableBar('createtable', 'createtableicon', _AM_PUBLISHER_CATEGORY_CREATE, _AM_PUBLISHER_CATEGORY_CREATE_INFO);
+ PublisherUtils::openCollapsableBar('createtable', 'createtableicon', _AM_PUBLISHER_CATEGORY_CREATE, _AM_PUBLISHER_CATEGORY_CREATE_INFO);
}
- $sform = $categoryObj->getForm($nb_subcats);
+ /* @var $sform PublisherCategoryForm */
+ $sform = $publisher->getForm($categoryObj, 'category');
+ $sform->setSubCatsCount($nb_subcats);
$sform->display();
if (!$categoryid) {
- publisher_closeCollapsableBar('createtable', 'createtableicon');
+ PublisherUtils::closeCollapsableBar('createtable', 'createtableicon');
} else {
- publisher_closeCollapsableBar('edittable', 'edittableicon');
+ PublisherUtils::closeCollapsableBar('edittable', 'edittableicon');
}
//Added by fx2024
if ($categoryid) {
$sel_cat = $categoryid;
- publisher_openCollapsableBar('subcatstable', 'subcatsicon', _AM_PUBLISHER_SUBCAT_CAT, _AM_PUBLISHER_SUBCAT_CAT_DSC);
+ PublisherUtils::openCollapsableBar('subcatstable', 'subcatsicon', _AM_PUBLISHER_SUBCAT_CAT, _AM_PUBLISHER_SUBCAT_CAT_DSC);
// Get the total number of sub-categories
- $categoriesObj = $publisher->getHandler('category')->get($sel_cat);
- $totalsubs = $publisher->getHandler('category')->getCategoriesCount($sel_cat);
+ $categoriesObj = $publisher->getCategoryHandler()->get($sel_cat);
+ $totalsubs = $publisher->getCategoryHandler()->getCategoriesCount($sel_cat);
// creating the categories objects that are published
- $subcatsObj = $publisher->getHandler('category')->getCategories(0, 0, $categoriesObj->categoryid());
- $totalSCOnPage = count($subcatsObj);
+ $subcatsObj = $publisher->getCategoryHandler()->getCategories(0, 0, $categoriesObj->getVar('categoryid'));
+
echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
echo "<tr>";
echo "<td width='60' class='bg3' align='left'><strong>" . _AM_PUBLISHER_CATID . "</strong></td>";
@@ -342,13 +337,14 @@
echo "<td width='60' class='bg3' align='right'><strong>" . _AM_PUBLISHER_ACTION . "</strong></td>";
echo "</tr>";
if ($totalsubs > 0) {
+ /* @var $subcat PublisherCategory */
foreach ($subcatsObj as $subcat) {
- $modify = "<a href='category.php?op=mod&categoryid=" . $subcat->categoryid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/edit.gif' title='" . _AM_PUBLISHER_MODIFY . "' alt='" . _AM_PUBLISHER_MODIFY . "' /></a>";
- $delete = "<a href='category.php?op=del&categoryid=" . $subcat->categoryid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETE . "' alt='" . _AM_PUBLISHER_DELETE . "' /></a>";
+ $modify = "<a href='category.php?op=mod&categoryid=" . $subcat->getVar('categoryid') . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/edit.gif' title='" . _AM_PUBLISHER_MODIFY . "' alt='" . _AM_PUBLISHER_MODIFY . "' /></a>";
+ $delete = "<a href='category.php?op=del&categoryid=" . $subcat->getVar('categoryid') . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETE . "' alt='" . _AM_PUBLISHER_DELETE . "' /></a>";
echo "<tr>";
- echo "<td class='head' align='left'>" . $subcat->categoryid() . "</td>";
- echo "<td class='even' align='left'><a href='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/category.php?categoryid=" . $subcat->categoryid() . "&parentid=" . $subcat->parentid() . "'>" . $subcat->name() . "</a></td>";
- echo "<td class='even' align='left'>" . $subcat->description() . "</td>";
+ echo "<td class='head' align='left'>" . $subcat->getVar('categoryid') . "</td>";
+ echo "<td class='even' align='left'><a href='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/category.php?categoryid=" . $subcat->getVar('categoryid') . "&parentid=" . $subcat->getVar('parentid'). "'>" . $subcat->getVar('name') . "</a></td>";
+ echo "<td class='even' align='left'>" . $subcat->getVar('description') . "</td>";
echo "<td class='even' align='right'> {$modify} {$delete} </td>";
echo "</tr>";
}
@@ -359,16 +355,16 @@
}
echo "</table>\n";
echo "<br />\n";
- publisher_closeCollapsableBar('subcatstable', 'subcatsicon');
+ PublisherUtils::closeCollapsableBar('subcatstable', 'subcatsicon');
- publisher_openCollapsableBar('bottomtable', 'bottomtableicon', _AM_PUBLISHER_CAT_ITEMS, _AM_PUBLISHER_CAT_ITEMS_DSC);
+ PublisherUtils::openCollapsableBar('bottomtable', 'bottomtableicon', _AM_PUBLISHER_CAT_ITEMS, _AM_PUBLISHER_CAT_ITEMS_DSC);
$startitem = PublisherRequest::getInt('startitem');
// Get the total number of published ITEMS
- $totalitems = $publisher->getHandler('item')->getItemsCount($sel_cat, array(_PUBLISHER_STATUS_PUBLISHED));
+ $totalitems = $publisher->getItemHandler()->getItemsCount($sel_cat, array(_PUBLISHER_STATUS_PUBLISHED));
// creating the items objects that are published
- $itemsObj = $publisher->getHandler('item')->getAllPublished($publisher->getConfig('idxcat_perpage'), $startitem, $sel_cat);
+ $itemsObj = $publisher->getItemHandler()->getAllPublished($pu...
[truncated message content] |
|
From: <tr...@us...> - 2012-12-12 23:39:53
|
Revision: 10374
http://sourceforge.net/p/xoops/svn/10374
Author: trabis
Date: 2012-12-12 23:39:48 +0000 (Wed, 12 Dec 2012)
Log Message:
-----------
I've accidentally committed 2.6 changes into this revision. I'm reverting it to 2.5.x state. New 2.6 publisher will be on 2.6 trunk
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/admin/about.php
XoopsModules/publisher/trunk/publisher/admin/admin_header.php
XoopsModules/publisher/trunk/publisher/admin/category.php
XoopsModules/publisher/trunk/publisher/admin/clone.php
XoopsModules/publisher/trunk/publisher/admin/file.php
XoopsModules/publisher/trunk/publisher/admin/import/news.php
XoopsModules/publisher/trunk/publisher/admin/import/smartsection.php
XoopsModules/publisher/trunk/publisher/admin/import/wfsection.php
XoopsModules/publisher/trunk/publisher/admin/import/xfsection.php
XoopsModules/publisher/trunk/publisher/admin/import.php
XoopsModules/publisher/trunk/publisher/admin/index.php
XoopsModules/publisher/trunk/publisher/admin/item.php
XoopsModules/publisher/trunk/publisher/admin/main.php
XoopsModules/publisher/trunk/publisher/admin/menu.php
XoopsModules/publisher/trunk/publisher/admin/mimetypes.php
XoopsModules/publisher/trunk/publisher/admin/pagewrap.php
XoopsModules/publisher/trunk/publisher/admin/permissions.php
XoopsModules/publisher/trunk/publisher/admin/preferences.php
XoopsModules/publisher/trunk/publisher/admin/pw_delete_file.php
XoopsModules/publisher/trunk/publisher/admin/pw_upload_file.php
XoopsModules/publisher/trunk/publisher/archive.php
XoopsModules/publisher/trunk/publisher/author_items.php
XoopsModules/publisher/trunk/publisher/backend.php
XoopsModules/publisher/trunk/publisher/blocks/category_items_sel.php
XoopsModules/publisher/trunk/publisher/blocks/date_to_date.php
XoopsModules/publisher/trunk/publisher/blocks/items_columns.php
XoopsModules/publisher/trunk/publisher/blocks/items_menu.php
XoopsModules/publisher/trunk/publisher/blocks/items_new.php
XoopsModules/publisher/trunk/publisher/blocks/items_random_item.php
XoopsModules/publisher/trunk/publisher/blocks/items_recent.php
XoopsModules/publisher/trunk/publisher/blocks/items_spot.php
XoopsModules/publisher/trunk/publisher/blocks/latest_files.php
XoopsModules/publisher/trunk/publisher/blocks/latest_news.php
XoopsModules/publisher/trunk/publisher/blocks/search.php
XoopsModules/publisher/trunk/publisher/category.php
XoopsModules/publisher/trunk/publisher/class/blockform.php
XoopsModules/publisher/trunk/publisher/class/category.php
XoopsModules/publisher/trunk/publisher/class/file.php
XoopsModules/publisher/trunk/publisher/class/form/category.php
XoopsModules/publisher/trunk/publisher/class/form/file.php
XoopsModules/publisher/trunk/publisher/class/form/item.php
XoopsModules/publisher/trunk/publisher/class/groupperm.php
XoopsModules/publisher/trunk/publisher/class/item.php
XoopsModules/publisher/trunk/publisher/class/metagen.php
XoopsModules/publisher/trunk/publisher/class/mimetype.php
XoopsModules/publisher/trunk/publisher/class/permission.php
XoopsModules/publisher/trunk/publisher/class/publisher.php
XoopsModules/publisher/trunk/publisher/class/rating.php
XoopsModules/publisher/trunk/publisher/class/request.php
XoopsModules/publisher/trunk/publisher/class/themetabform.php
XoopsModules/publisher/trunk/publisher/class/uploader.php
XoopsModules/publisher/trunk/publisher/comment_delete.php
XoopsModules/publisher/trunk/publisher/comment_edit.php
XoopsModules/publisher/trunk/publisher/comment_new.php
XoopsModules/publisher/trunk/publisher/comment_post.php
XoopsModules/publisher/trunk/publisher/comment_reply.php
XoopsModules/publisher/trunk/publisher/file.php
XoopsModules/publisher/trunk/publisher/footer.php
XoopsModules/publisher/trunk/publisher/header.php
XoopsModules/publisher/trunk/publisher/include/ajax_rating.php
XoopsModules/publisher/trunk/publisher/include/ajax_upload.php
XoopsModules/publisher/trunk/publisher/include/comment_functions.php
XoopsModules/publisher/trunk/publisher/include/common.php
XoopsModules/publisher/trunk/publisher/include/notification.inc.php
XoopsModules/publisher/trunk/publisher/include/plugin.tag.php
XoopsModules/publisher/trunk/publisher/include/search.inc.php
XoopsModules/publisher/trunk/publisher/include/seo.inc.php
XoopsModules/publisher/trunk/publisher/include/update.php
XoopsModules/publisher/trunk/publisher/index.php
XoopsModules/publisher/trunk/publisher/item.php
XoopsModules/publisher/trunk/publisher/list.tag.php
XoopsModules/publisher/trunk/publisher/makepdf.php
XoopsModules/publisher/trunk/publisher/notification_update.php
XoopsModules/publisher/trunk/publisher/pop.php
XoopsModules/publisher/trunk/publisher/print.php
XoopsModules/publisher/trunk/publisher/rate.php
XoopsModules/publisher/trunk/publisher/search.php
XoopsModules/publisher/trunk/publisher/submit.php
XoopsModules/publisher/trunk/publisher/view.tag.php
XoopsModules/publisher/trunk/publisher/visit.php
XoopsModules/publisher/trunk/publisher/xoops_version.php
Added Paths:
-----------
XoopsModules/publisher/trunk/publisher/class/highlighter.php
XoopsModules/publisher/trunk/publisher/include/constants.php
XoopsModules/publisher/trunk/publisher/include/functions.php
XoopsModules/publisher/trunk/publisher/include/media.textsanitizer.php
XoopsModules/publisher/trunk/publisher/include/seo_functions.php
Removed Paths:
-------------
XoopsModules/publisher/trunk/publisher/class/utils.php
XoopsModules/publisher/trunk/publisher/preloads/
Modified: XoopsModules/publisher/trunk/publisher/admin/about.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/about.php 2012-12-12 23:26:38 UTC (rev 10373)
+++ XoopsModules/publisher/trunk/publisher/admin/about.php 2012-12-12 23:39:48 UTC (rev 10374)
@@ -20,12 +20,13 @@
* @version $Id$
*/
-include dirname(__FILE__) . '/admin_header.php';
-$xoops = Xoops::getInstance();
-$xoops->header();
+include_once dirname(__FILE__) . '/admin_header.php';
-$aboutAdmin = new XoopsModuleAdmin();
-$aboutAdmin->displayNavigation('about.php');
-$aboutAdmin->displayAbout('6KJ7RW5DR3VTJ', false);
+xoops_cp_header();
-$xoops->footer();
\ No newline at end of file
+$aboutAdmin = new ModuleAdmin();
+
+echo $aboutAdmin->addNavigation('about.php');
+echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false);
+
+xoops_cp_footer();
\ No newline at end of file
Modified: XoopsModules/publisher/trunk/publisher/admin/admin_header.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/admin_header.php 2012-12-12 23:26:38 UTC (rev 10373)
+++ XoopsModules/publisher/trunk/publisher/admin/admin_header.php 2012-12-12 23:39:48 UTC (rev 10374)
@@ -20,10 +20,27 @@
*/
include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
+include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
-$xoops = Xoops::getInstance();
-$publisher = Publisher::getInstance();
-$publisher->loadLanguage('modinfo');
+//xoops_loadLanguage('admin', PUBLISHER_DIRNAME);
+xoops_loadLanguage('modinfo', PUBLISHER_DIRNAME);
-XoopsLoad::loadFile($xoops->path(dirname(dirname(__FILE__)) . '/include/common.php'));
-XoopsLoad::loadFile($xoops->path(XOOPS_ROOT_PATH . '/include/cp_header.php'));
+$imagearray = array(
+ 'editimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_edit.png' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle' />",
+ 'deleteimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_delete.png' alt='" . _AM_PUBLISHER_ICO_DELETE . "' align='middle' />",
+ 'online' => "<img src='" . PUBLISHER_IMAGES_URL . "/on.png' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle' />",
+ 'offline' => "<img src='" . PUBLISHER_IMAGES_URL . "/off.png' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle' />",
+);
+if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){
+ include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php');
+}else{
+ echo xoops_error('/Frameworks/moduleclasses/moduleadmin/ is required!!!');
+}
+/*
+$myts =& MyTextSanitizer::getInstance();
+
+if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $xoopsTpl = new XoopsTpl();
+} */
\ No newline at end of file
Modified: XoopsModules/publisher/trunk/publisher/admin/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/category.php 2012-12-12 23:26:38 UTC (rev 10373)
+++ XoopsModules/publisher/trunk/publisher/admin/category.php 2012-12-12 23:39:48 UTC (rev 10374)
@@ -21,7 +21,6 @@
include_once dirname(__FILE__) . '/admin_header.php';
-$xoops = Xoops::getInstance();
$op = PublisherRequest::getString('op');
$op = isset($_POST['editor']) ? 'mod' : $op;
@@ -36,19 +35,20 @@
switch ($op) {
case "del":
- /* @var $categoryObj PublisherCategory */
- $categoryObj = $publisher->getCategoryHandler()->get($categoryid);
+ $categoryObj = $publisher->getHandler('category')->get($categoryid);
$confirm = (isset($_POST['confirm'])) ? $_POST['confirm'] : 0;
$name = (isset($_POST['name'])) ? $_POST['name'] : '';
if ($confirm) {
- if (!$publisher->getCategoryHandler()->delete($categoryObj)) {
- $xoops->redirect("category.php", 1, _AM_PUBLISHER_DELETE_CAT_ERROR);
+ if (!$publisher->getHandler('category')->delete($categoryObj)) {
+ redirect_header("category.php", 1, _AM_PUBLISHER_DELETE_CAT_ERROR);
+ exit();
}
- $xoops->redirect("category.php", 1, sprintf(_AM_PUBLISHER_COLISDELETED, $name));
+ redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_COLISDELETED, $name));
+ exit();
} else {
- $xoops->header();
- $xoops->confirm(array('op' => 'del', 'categoryid' => $categoryObj->getVar('categoryid'), 'confirm' => 1, 'name' => $categoryObj->getVar('name')), 'category.php', _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->getVar('name') . "'. <br /> <br />" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE);
- $xoops->footer();
+ xoops_cp_header();
+ xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->name() . "'. <br /> <br />" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE);
+ xoops_cp_footer();
}
break;
@@ -58,7 +58,7 @@
$nb_subcats = $nb_subcats + (isset($_POST['nb_sub_yet']) ? intval($_POST['nb_sub_yet']) : 4);
//end of fx2024 code
- PublisherUtils::cpHeader();
+ publisher_cpHeader();
publisher_editCat(true, $categoryid, $nb_subcats);
break;
@@ -66,11 +66,11 @@
global $modify;
$parentid = PublisherRequest::getInt('parentid');
- /* @var $categoryObj PublisherCategory */
+
if ($categoryid != 0) {
- $categoryObj = $publisher->getCategoryHandler()->get($categoryid);
+ $categoryObj = $publisher->getHandler('category')->get($categoryid);
} else {
- $categoryObj = $publisher->getCategoryHandler()->create();
+ $categoryObj = $publisher->getHandler('category')->create();
}
// Uploading the image, if any
@@ -82,17 +82,20 @@
$max_size = $publisher->getConfig('maximum_filesize');
$max_imgwidth = $publisher->getConfig('maximum_image_width');
$max_imgheight = $publisher->getConfig('maximum_image_height');
- $allowed_mimetypes = PublisherUtils::getAllowedImagesTypes();
+ $allowed_mimetypes = publisher_getAllowedImagesTypes();
if ($_FILES[$filename]['tmp_name'] == "" || !is_readable($_FILES[$filename]['tmp_name'])) {
- $xoops->redirect('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR);
+ redirect_header('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR);
+ exit();
}
- $uploader = new PublisherUploader(PublisherUtils::getImageDir('category'), $allowed_mimetypes, $max_size, $max_imgwidth, $max_imgheight);
+ xoops_load('XoopsMediaUploader');
+ $uploader = new XoopsMediaUploader(publisher_getImageDir('category'), $allowed_mimetypes, $max_size, $max_imgwidth, $max_imgheight);
if ($uploader->fetchMedia($filename) && $uploader->upload()) {
$categoryObj->setVar('image', $uploader->getSavedFileName());
} else {
- $xoops->redirect('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR . $uploader->getErrors());
+ redirect_header('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR . $uploader->getErrors());
+ exit();
}
}
} else {
@@ -143,34 +146,37 @@
}
if (!$categoryObj->store()) {
- $xoops->redirect("javascript:history.go(-1)", 3, _AM_PUBLISHER_CATEGORY_SAVE_ERROR . PublisherUtils::formatErrors($categoryObj->getErrors()));
+ redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_CATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors()));
+ exit;
}
// TODO : put this function in the category class
- PublisherUtils::saveCategoryPermissions($grpread, $categoryObj->getVar('categoryid'), 'category_read');
- PublisherUtils::saveCategoryPermissions($grpsubmit, $categoryObj->getVar('categoryid'), 'item_submit');
- PublisherUtils::saveCategoryPermissions($grpmoderation, $categoryObj->getVar('categoryid'), 'category_moderation');
+ publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
+ publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
+ publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
//Added by fx2024
- $parentCat = $categoryObj->getVar('categoryid');
+ $parentCat = $categoryObj->categoryid();
$sizeof = sizeof($_POST['scname']);
for ($i = 0; $i < $sizeof; $i++) {
if ($_POST['scname'][$i] != '') {
- $categoryObj = $publisher->getCategoryHandler()->create();
+ $categoryObj = $publisher->getHandler('category')->create();
$categoryObj->setVar('name', $_POST['scname'][$i]);
$categoryObj->setVar('parentid', $parentCat);
if (!$categoryObj->store()) {
- $xoops->redirect("javascript:history.go(-1)", 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR . PublisherUtils::formatErrors($categoryObj->getErrors()));
+ redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors()));
+ exit;
}
// TODO : put this function in the category class
- PublisherUtils::saveCategoryPermissions($grpread, $categoryObj->getVar('categoryid'), 'category_read');
- PublisherUtils::saveCategoryPermissions($grpsubmit, $categoryObj->getVar('categoryid'), 'item_submit');
- PublisherUtils::saveCategoryPermissions($grpmoderation, $categoryObj->getVar('categoryid'), 'category_moderation');
+ publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
+ publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
+ publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
}
}
//end of fx2024 code
- $xoops->redirect($redirect_to, 2, $redirect_msg);
+ redirect_header($redirect_to, 2, $redirect_msg);
+ exit();
break;
//Added by fx2024
@@ -179,7 +185,7 @@
$categoryid = 0;
$nb_subcats = intval($_POST['nb_subcats']) + $_POST['nb_sub_yet'];
- $categoryObj = $publisher->getCategoryHandler()->create();
+ $categoryObj = $publisher->getHandler('category')->create();
$categoryObj->setVar('name', $_POST['name']);
$categoryObj->setVar('description', $_POST['description']);
$categoryObj->setVar('weight', $_POST['weight']);
@@ -187,7 +193,7 @@
$categoryObj->setVar('parentid', $parentCat);
}
- PublisherUtils::cpHeader();
+ publisher_cpHeader();
publisher_editCat(true, $categoryid, $nb_subcats, $categoryObj);
exit();
@@ -195,11 +201,12 @@
//end of fx2024 code
case "cancel":
- $xoops->redirect("category.php", 1, sprintf(_AM_PUBLISHER_BACK2IDX, ''));
- break;
+ redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_BACK2IDX, ''));
+ exit();
+
case "default":
default:
- PublisherUtils::cpHeader();
+ publisher_cpHeader();
//publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES);
echo "<br />\n";
@@ -209,9 +216,9 @@
echo "</div></form>";
// Creating the objects for top categories
- $categoriesObj = $publisher->getCategoryHandler()->getCategories($publisher->getConfig('idxcat_perpage'), $startcategory, 0);
+ $categoriesObj = $publisher->getHandler('category')->getCategories($publisher->getConfig('idxcat_perpage'), $startcategory, 0);
- PublisherUtils::openCollapsableBar('createdcategories', 'createdcategoriesicon', _AM_PUBLISHER_CATEGORIES_TITLE, _AM_PUBLISHER_CATEGORIES_DSC);
+ publisher_openCollapsableBar('createdcategories', 'createdcategoriesicon', _AM_PUBLISHER_CATEGORIES_TITLE, _AM_PUBLISHER_CATEGORIES_DSC);
echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
echo "<tr>";
@@ -219,7 +226,7 @@
echo "<td width='60' class='bg3' width='65' align='center'><strong>" . _CO_PUBLISHER_WEIGHT . "</strong></td>";
echo "<td width='60' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . "</strong></td>";
echo "</tr>";
- $totalCategories = $publisher->getCategoryHandler()->getCategoriesCount(0);
+ $totalCategories = $publisher->getHandler('category')->getCategoriesCount(0);
if (count($categoriesObj) > 0) {
foreach ($categoriesObj as $key => $thiscat) {
publisher_displayCategory($thiscat);
@@ -231,29 +238,30 @@
$categoryid = '0';
}
echo "</table>\n";
+ include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
$pagenav = new XoopsPageNav($totalCategories, $publisher->getConfig('idxcat_perpage'), $startcategory, 'startcategory');
echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
echo "<br />";
- PublisherUtils::closeCollapsableBar('createdcategories', 'createdcategoriesicon');
+ publisher_closeCollapsableBar('createdcategories', 'createdcategoriesicon');
echo "<br>";
//editcat(false);
break;
}
-$xoops->footer();
+xoops_cp_footer();
-function publisher_displayCategory(PublisherCategory $categoryObj, $level = 0)
+function publisher_displayCategory($categoryObj, $level = 0)
{
- $publisher = Publisher::getInstance();
+ $publisher = PublisherPublisher::getInstance();
- $description = $categoryObj->getVar('description');
+ $description = $categoryObj->description();
if (!XOOPS_USE_MULTIBYTES) {
if (strlen($description) >= 100) {
$description = substr($description, 0, (100 - 1)) . "...";
}
}
- $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->getVar('categoryid') . "&parentid=" . $categoryObj->getVar('parentid') . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITCOL . "' alt='" . _AM_PUBLISHER_EDITCOL . "' /></a>";
- $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->getVar('categoryid') . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETECOL . "' alt='" . _AM_PUBLISHER_DELETECOL . "' /></a>";
+ $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->categoryid() . "&parentid=" . $categoryObj->parentid() . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITCOL . "' alt='" . _AM_PUBLISHER_EDITCOL . "' /></a>";
+ $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->categoryid() . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETECOL . "' alt='" . _AM_PUBLISHER_DELETECOL . "' /></a>";
$spaces = '';
for ($j = 0; $j < $level; $j++) {
@@ -261,14 +269,14 @@
}
echo "<tr>";
- echo "<td class='even' align='left'>" . $spaces . "<a href='" . PUBLISHER_URL . "/category.php?categoryid=" . $categoryObj->getVar('categoryid') . "'><img src='" . PUBLISHER_URL . "/images/links/subcat.gif' alt='' /> " . $categoryObj->getVar('name') . "</a></td>";
- echo "<td class='even' align='center'>" . $categoryObj->getVar('weight') . "</td>";
+ echo "<td class='even' align='left'>" . $spaces . "<a href='" . PUBLISHER_URL . "/category.php?categoryid=" . $categoryObj->categoryid() . "'><img src='" . PUBLISHER_URL . "/images/links/subcat.gif' alt='' /> " . $categoryObj->name() . "</a></td>";
+ echo "<td class='even' align='center'>" . $categoryObj->weight() . "</td>";
echo "<td class='even' align='center'> $modify $delete </td>";
echo "</tr>";
- $subCategoriesObj = $publisher->getCategoryHandler()->getCategories(0, 0, $categoryObj->getVar('categoryid'));
+ $subCategoriesObj = $publisher->getHandler('category')->getCategories(0, 0, $categoryObj->categoryid());
if (count($subCategoriesObj) > 0) {
$level++;
- foreach ($subCategoriesObj as $thiscat) {
+ foreach ($subCategoriesObj as $key => $thiscat) {
publisher_displayCategory($thiscat, $level);
}
}
@@ -277,20 +285,19 @@
function publisher_editCat($showmenu = false, $categoryid = 0, $nb_subcats = 4, $categoryObj = null)
{
- $xoops = Xoops::getInstance();
- $publisher = Publisher::getInstance();
- /* @var $categoryObj PublisherCategory */
+ $publisher = PublisherPublisher::getInstance();
// if there is a parameter, and the id exists, retrieve data: we're editing a category
if ($categoryid != 0) {
// Creating the category object for the selected category
- $categoryObj = $publisher->getCategoryHandler()->get($categoryid);
+ $categoryObj = $publisher->getHandler('category')->get($categoryid);
if ($categoryObj->notLoaded()) {
- $xoops->redirect("category.php", 1, _AM_PUBLISHER_NOCOLTOEDIT);
+ redirect_header("category.php", 1, _AM_PUBLISHER_NOCOLTOEDIT);
+ exit();
}
} else {
if (!$categoryObj) {
- $categoryObj = $publisher->getCategoryHandler()->create();
+ $categoryObj = $publisher->getHandler('category')->create();
}
}
@@ -299,36 +306,34 @@
//publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES . " > " . _AM_PUBLISHER_EDITING);
}
echo "<br />\n";
- PublisherUtils::openCollapsableBar('edittable', 'edittableicon', _AM_PUBLISHER_EDITCOL, _AM_PUBLISHER_CATEGORY_EDIT_INFO);
+ publisher_openCollapsableBar('edittable', 'edittableicon', _AM_PUBLISHER_EDITCOL, _AM_PUBLISHER_CATEGORY_EDIT_INFO);
} else {
if ($showmenu) {
//publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES . " > " . _AM_PUBLISHER_CREATINGNEW);
}
- PublisherUtils::openCollapsableBar('createtable', 'createtableicon', _AM_PUBLISHER_CATEGORY_CREATE, _AM_PUBLISHER_CATEGORY_CREATE_INFO);
+ publisher_openCollapsableBar('createtable', 'createtableicon', _AM_PUBLISHER_CATEGORY_CREATE, _AM_PUBLISHER_CATEGORY_CREATE_INFO);
}
- /* @var $sform PublisherCategoryForm */
- $sform = $publisher->getForm($categoryObj, 'category');
- $sform->setSubCatsCount($nb_subcats);
+ $sform = $categoryObj->getForm($nb_subcats);
$sform->display();
if (!$categoryid) {
- PublisherUtils::closeCollapsableBar('createtable', 'createtableicon');
+ publisher_closeCollapsableBar('createtable', 'createtableicon');
} else {
- PublisherUtils::closeCollapsableBar('edittable', 'edittableicon');
+ publisher_closeCollapsableBar('edittable', 'edittableicon');
}
//Added by fx2024
if ($categoryid) {
$sel_cat = $categoryid;
- PublisherUtils::openCollapsableBar('subcatstable', 'subcatsicon', _AM_PUBLISHER_SUBCAT_CAT, _AM_PUBLISHER_SUBCAT_CAT_DSC);
+ publisher_openCollapsableBar('subcatstable', 'subcatsicon', _AM_PUBLISHER_SUBCAT_CAT, _AM_PUBLISHER_SUBCAT_CAT_DSC);
// Get the total number of sub-categories
- $categoriesObj = $publisher->getCategoryHandler()->get($sel_cat);
- $totalsubs = $publisher->getCategoryHandler()->getCategoriesCount($sel_cat);
+ $categoriesObj = $publisher->getHandler('category')->get($sel_cat);
+ $totalsubs = $publisher->getHandler('category')->getCategoriesCount($sel_cat);
// creating the categories objects that are published
- $subcatsObj = $publisher->getCategoryHandler()->getCategories(0, 0, $categoriesObj->getVar('categoryid'));
-
+ $subcatsObj = $publisher->getHandler('category')->getCategories(0, 0, $categoriesObj->categoryid());
+ $totalSCOnPage = count($subcatsObj);
echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
echo "<tr>";
echo "<td width='60' class='bg3' align='left'><strong>" . _AM_PUBLISHER_CATID . "</strong></td>";
@@ -337,14 +342,13 @@
echo "<td width='60' class='bg3' align='right'><strong>" . _AM_PUBLISHER_ACTION . "</strong></td>";
echo "</tr>";
if ($totalsubs > 0) {
- /* @var $subcat PublisherCategory */
foreach ($subcatsObj as $subcat) {
- $modify = "<a href='category.php?op=mod&categoryid=" . $subcat->getVar('categoryid') . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/edit.gif' title='" . _AM_PUBLISHER_MODIFY . "' alt='" . _AM_PUBLISHER_MODIFY . "' /></a>";
- $delete = "<a href='category.php?op=del&categoryid=" . $subcat->getVar('categoryid') . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETE . "' alt='" . _AM_PUBLISHER_DELETE . "' /></a>";
+ $modify = "<a href='category.php?op=mod&categoryid=" . $subcat->categoryid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/edit.gif' title='" . _AM_PUBLISHER_MODIFY . "' alt='" . _AM_PUBLISHER_MODIFY . "' /></a>";
+ $delete = "<a href='category.php?op=del&categoryid=" . $subcat->categoryid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETE . "' alt='" . _AM_PUBLISHER_DELETE . "' /></a>";
echo "<tr>";
- echo "<td class='head' align='left'>" . $subcat->getVar('categoryid') . "</td>";
- echo "<td class='even' align='left'><a href='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/category.php?categoryid=" . $subcat->getVar('categoryid') . "&parentid=" . $subcat->getVar('parentid'). "'>" . $subcat->getVar('name') . "</a></td>";
- echo "<td class='even' align='left'>" . $subcat->getVar('description') . "</td>";
+ echo "<td class='head' align='left'>" . $subcat->categoryid() . "</td>";
+ echo "<td class='even' align='left'><a href='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/category.php?categoryid=" . $subcat->categoryid() . "&parentid=" . $subcat->parentid() . "'>" . $subcat->name() . "</a></td>";
+ echo "<td class='even' align='left'>" . $subcat->description() . "</td>";
echo "<td class='even' align='right'> {$modify} {$delete} </td>";
echo "</tr>";
}
@@ -355,16 +359,16 @@
}
echo "</table>\n";
echo "<br />\n";
- PublisherUtils::closeCollapsableBar('subcatstable', 'subcatsicon');
+ publisher_closeCollapsableBar('subcatstable', 'subcatsicon');
- PublisherUtils::openCollapsableBar('bottomtable', 'bottomtableicon', _AM_PUBLISHER_CAT_ITEMS, _AM_PUBLISHER_CAT_ITEMS_DSC);
+ publisher_openCollapsableBar('bottomtable', 'bottomtableicon', _AM_PUBLISHER_CAT_ITEMS, _AM_PUBLISHER_CAT_ITEMS_DSC);
$startitem = PublisherRequest::getInt('startitem');
// Get the total number of published ITEMS
- $totalitems = $publisher->getItemHandler()->getItemsCount($sel_cat, array(_PUBLISHER_STATUS_PUBLISHED));
+ $totalitems = $publisher->getHandler('item')->getItemsCount($sel_cat, array(_PUBLISHER_STATUS_PUBLISHED));
// creating the items objects that are published
- $itemsObj = $publisher->getItemHandler()->getAllPublished($publisher->getConfig('idxcat_perpage'), $startitem, $sel_cat);
+ $itemsObj = $publisher->getHandler('item')->getAllPublished($publisher->getConfi...
[truncated message content] |
|
From: <tr...@us...> - 2013-01-03 19:31:26
|
Revision: 10645
http://sourceforge.net/p/xoops/svn/10645
Author: trabis
Date: 2013-01-03 19:31:21 +0000 (Thu, 03 Jan 2013)
Log Message:
-----------
Fixing permissions error in categories.
Passing permissions by reference to save memory.
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/archive.php
XoopsModules/publisher/trunk/publisher/class/category.php
XoopsModules/publisher/trunk/publisher/class/form/item.php
XoopsModules/publisher/trunk/publisher/class/item.php
XoopsModules/publisher/trunk/publisher/class/permission.php
XoopsModules/publisher/trunk/publisher/include/functions.php
Modified: XoopsModules/publisher/trunk/publisher/archive.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/archive.php 2013-01-03 16:09:42 UTC (rev 10644)
+++ XoopsModules/publisher/trunk/publisher/archive.php 2013-01-03 19:31:21 UTC (rev 10645)
@@ -134,7 +134,7 @@
$itemhandler->field_link = 'categoryid';
$itemhandler->field_object = 'categoryid';
// Categories for which user has access
- $categoriesGranted = $publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted =& $publisher->getHandler('permission')->getGrantedItems('category_read');
$grantedCategories = new Criteria('l.categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN');
$criteria = new CriteriaCompo();
$criteria->add($grantedCategories, 'AND');
Modified: XoopsModules/publisher/trunk/publisher/class/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/category.php 2013-01-03 16:09:42 UTC (rev 10644)
+++ XoopsModules/publisher/trunk/publisher/class/category.php 2013-01-03 19:31:21 UTC (rev 10645)
@@ -94,7 +94,7 @@
if (is_object($xoopsUser) && $xoopsUser->getVar('uid') == $this->moderator()) {
return true;
}
- $categoriesGranted = $this->publisher->getHandler('permission')->isGranted('category_read');
+ $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (in_array($this->categoryid(), $categoriesGranted)) {
$ret = true;
}
@@ -464,7 +464,7 @@
$criteria->add(new Criteria('parentid', $parentid));
}
if (!$publisher_isAdmin) {
- $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
}
@@ -502,7 +502,7 @@
$criteria->setSort('name');
$criteria->setOrder('ASC');
if (!$publisher_isAdmin) {
- $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('item_submit');
+ $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('item_submit');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
}
@@ -541,7 +541,7 @@
$criteria->setSort('name');
$criteria->setOrder('ASC');
if (!$publisher_isAdmin) {
- $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
}
@@ -584,7 +584,7 @@
if (isset($parentid) && ($parentid != -1)) {
$criteria->add(new criteria('parentid', $parentid));
if (!$publisher_isAdmin) {
- $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
}
@@ -609,7 +609,7 @@
$criteria = new CriteriaCompo(new Criteria('parentid', "(" . implode(',', array_keys($categories)) . ")", 'IN'));
$ret = array();
if (!$publisher_isAdmin) {
- $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
}
Modified: XoopsModules/publisher/trunk/publisher/class/form/item.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/form/item.php 2013-01-03 16:09:42 UTC (rev 10644)
+++ XoopsModules/publisher/trunk/publisher/class/form/item.php 2013-01-03 19:31:21 UTC (rev 10645)
@@ -113,10 +113,8 @@
global $xoopsConfig, $xoopsUser;
$publisher = PublisherPublisher::getInstance();
- $checkperm = $this->checkperm;
$allowed_editors = publisher_getEditors($publisher->getHandler('permission')->getGrantedItems('editors'));
- $form_view = $publisher->getHandler('permission')->getGrantedItems('form_view');
if (!is_object($xoopsUser)) {
$group = array(XOOPS_GROUP_ANONYMOUS);
Modified: XoopsModules/publisher/trunk/publisher/class/item.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/item.php 2013-01-03 16:09:42 UTC (rev 10644)
+++ XoopsModules/publisher/trunk/publisher/class/item.php 2013-01-03 19:31:21 UTC (rev 10645)
@@ -1221,7 +1221,7 @@
if (!$publisher_isAdmin) {
$criteriaPermissions = new CriteriaCompo();
// Categories for which user has access
- $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
$grantedCategories = new Criteria('categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN');
$criteriaPermissions->add($grantedCategories, 'AND');
}
@@ -1373,7 +1373,7 @@
if (!$publisher_isAdmin) {
$criteriaPermissions = new CriteriaCompo();
// Categories for which user has access
- $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
$grantedCategories = new Criteria('categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN');
$criteriaPermissions->add($grantedCategories, 'AND');
}
Modified: XoopsModules/publisher/trunk/publisher/class/permission.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/permission.php 2013-01-03 16:09:42 UTC (rev 10644)
+++ XoopsModules/publisher/trunk/publisher/class/permission.php 2013-01-03 19:31:21 UTC (rev 10645)
@@ -72,60 +72,24 @@
}
/**
- * @param string $gperm_name
- *
- * @return array
- */
- public function getGrantedGroups($gperm_name)
- {
- static $items;
- if (isset($items[$gperm_name])) {
- return $items[$gperm_name];
- }
- $groups = array();
- $criteria = new CriteriaCompo();
- $criteria->add(new Criteria('gperm_modid', $this->publisher->getModule()->getVar('mid')));
- $criteria->add(new Criteria('gperm_name', $gperm_name));
- //Instead of calling groupperm handler and get objects, we will save some memory and do it our way
- $db = XoopsDatabaseFactory::getDatabaseConnection();
- $limit = $start = 0;
- $sql = 'SELECT gperm_groupid FROM ' . $db->prefix('group_permission');
- if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- $sql .= ' ' . $criteria->renderWhere();
- $limit = $criteria->getLimit();
- $start = $criteria->getStart();
- }
- $result = $db->query($sql, $limit, $start);
- while ($myrow = $db->fetchArray($result)) {
- $groups[$myrow['gperm_groupid']] = $myrow['gperm_groupid'];
- }
- $items[$gperm_name] = $groups;
- //Return the permission array
- return $groups;
- }
-
- /**
* Returns permissions for a certain type
*
* @param string $gperm_name "global", "forum" or "topic" (should perhaps have "post" as well - but I don't know)
- * @param int $id id of the item (forum, topic or possibly post) to get permissions for
*
* @return array
*/
- public function getGrantedItems($gperm_name, $id = 0)
+ public function getGrantedItems($gperm_name)
{
static $items;
- if (isset($items[$gperm_name][$id])) {
- return $items[$gperm_name][$id];
+ if (isset($items[$gperm_name])) {
+ return $items[$gperm_name];
}
global $xoopsUser;
$ret = array();
//Instead of calling groupperm handler and get objects, we will save some memory and do it our way
$criteria = new CriteriaCompo(new Criteria('gperm_name', $gperm_name));
$criteria->add(new Criteria('gperm_modid', $this->publisher->getModule()->getVar('mid')));
- if ($id != 0) {
- $criteria->add(new Criteria('gperm_itemid', $id));
- }
+
//Get user's groups
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
$criteria2 = new CriteriaCompo();
@@ -140,31 +104,26 @@
while ($myrow = $db->fetchArray($result)) {
$ret[$myrow['gperm_itemid']] = $myrow['gperm_itemid'];
}
- $items[$gperm_name][$id] = $ret;
+ $items[$gperm_name] = $ret;
return $ret;
}
/**
- * @param string $gperm_name
- * @param int|null $id
+ * @param string $gperm_name
+ * @param int $id
*
* @return bool
*/
- public function isGranted($gperm_name, $id = null)
+ public function isGranted($gperm_name, $id)
{
- $permissions = $this->getGrantedItems($gperm_name, $id);
- if ($id == null) {
- if (!empty($permissions)) {
- return true;
- } else {
- return false;
- }
+ if (!$id) {
+ return false;
+ }
+ $permissions =& $this->getGrantedItems($gperm_name);
+ if (!empty($permissions) && isset ($permissions[$id])) {
+ return true;
} else {
- if (!empty($permissions) && isset ($permissions[$id])) {
- return true;
- } else {
- return false;
- }
+ return false;
}
}
Modified: XoopsModules/publisher/trunk/publisher/include/functions.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/include/functions.php 2013-01-03 16:09:42 UTC (rev 10644)
+++ XoopsModules/publisher/trunk/publisher/include/functions.php 2013-01-03 19:31:21 UTC (rev 10645)
@@ -383,7 +383,7 @@
function publisher_userIsModerator($itemObj)
{
$publisher = PublisherPublisher::getInstance();
- $categoriesGranted = $publisher->getHandler('permission')->getGrantedItems('category_moderation');
+ $categoriesGranted =& $publisher->getHandler('permission')->getGrantedItems('category_moderation');
return (is_object($itemObj) && in_array($itemObj->categoryid(), $categoriesGranted));
}
|
|
From: <tr...@us...> - 2013-01-03 20:52:34
|
Revision: 10647
http://sourceforge.net/p/xoops/svn/10647
Author: trabis
Date: 2013-01-03 20:52:31 +0000 (Thu, 03 Jan 2013)
Log Message:
-----------
Improving memory usage.
Fixing bug: all categories/items are shown in index page when user does not have any category access
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/category.php
XoopsModules/publisher/trunk/publisher/class/category.php
XoopsModules/publisher/trunk/publisher/class/item.php
XoopsModules/publisher/trunk/publisher/index.php
Modified: XoopsModules/publisher/trunk/publisher/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/category.php 2013-01-03 19:49:51 UTC (rev 10646)
+++ XoopsModules/publisher/trunk/publisher/category.php 2013-01-03 20:52:31 UTC (rev 10647)
@@ -102,7 +102,7 @@
if ($publisher->getConfig('idxcat_display_last_item') == 1) {
// Get the last smartitem
- $last_itemObj = $publisher->getHandler('item')->getLastPublishedByCat();
+ $last_itemObj = $publisher->getHandler('item')->getLastPublishedByCat(array($categoryObj));
}
$lastitemsize = intval($publisher->getConfig('idxcat_last_item_size'));
Modified: XoopsModules/publisher/trunk/publisher/class/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/category.php 2013-01-03 19:49:51 UTC (rev 10646)
+++ XoopsModules/publisher/trunk/publisher/class/category.php 2013-01-03 20:52:31 UTC (rev 10647)
@@ -467,6 +467,8 @@
$categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
+ } else {
+ return array();
}
if (is_object($xoopsUser)) {
$criteria->add(new Criteria('moderator', $xoopsUser->getVar('uid')), 'OR');
@@ -505,6 +507,8 @@
$categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('item_submit');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
+ } else {
+ return $ret;
}
if (is_object($xoopsUser)) {
$criteria->add(new Criteria('moderator', $xoopsUser->getVar('uid')), 'OR');
@@ -544,6 +548,8 @@
$categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
+ } else {
+ return $ret;
}
if (is_object($xoopsUser)) {
$criteria->add(new Criteria('moderator', $xoopsUser->getVar('uid')), 'OR');
@@ -587,6 +593,8 @@
$categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
+ } else {
+ return 0;
}
if (is_object($xoopsUser)) {
$criteria->add(new Criteria('moderator', $xoopsUser->getVar('uid')), 'OR');
@@ -612,7 +620,10 @@
$categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
+ } else {
+ return $ret;
}
+
if (is_object($xoopsUser)) {
$criteria->add(new Criteria('moderator', $xoopsUser->getVar('uid')), 'OR');
}
Modified: XoopsModules/publisher/trunk/publisher/class/item.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/item.php 2013-01-03 19:49:51 UTC (rev 10646)
+++ XoopsModules/publisher/trunk/publisher/class/item.php 2013-01-03 20:52:31 UTC (rev 10647)
@@ -18,9 +18,7 @@
* @version $Id$
*/
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
-
include_once dirname(dirname(__FILE__)) . '/include/common.php';
-
class PublisherItem extends XoopsObject
{
/**
@@ -1222,8 +1220,12 @@
$criteriaPermissions = new CriteriaCompo();
// Categories for which user has access
$categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
- $grantedCategories = new Criteria('categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN');
- $criteriaPermissions->add($grantedCategories, 'AND');
+ if (!empty($categoriesGranted)) {
+ $grantedCategories = new Criteria('categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN');
+ $criteriaPermissions->add($grantedCategories, 'AND');
+ } else {
+ return 0;
+ }
}
if (isset($categoryid) && $categoryid != -1) {
$criteriaCategory = new criteria('categoryid', $categoryid);
@@ -1374,8 +1376,12 @@
$criteriaPermissions = new CriteriaCompo();
// Categories for which user has access
$categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
- $grantedCategories = new Criteria('categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN');
- $criteriaPermissions->add($grantedCategories, 'AND');
+ if (!empty($grantedCategories)) {
+ $grantedCategories = new Criteria('categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN');
+ $criteriaPermissions->add($grantedCategories, 'AND');
+ } else {
+ return array();
+ }
}
if (isset($categoryid) && ($categoryid != -1)) {
$criteriaCategory = new criteria('categoryid', $categoryid);
@@ -1592,13 +1598,21 @@
}
/**
- * @param array $status
+ * @param array $categoriesObj
+ * @param array $status
*
* @return array
*/
- public function getLastPublishedByCat($status = array(_PUBLISHER_STATUS_PUBLISHED))
+ public function getLastPublishedByCat($categoriesObj, $status = array(_PUBLISHER_STATUS_PUBLISHED))
{
$ret = array();
+ $catIds = array();
+ foreach ($categoriesObj as $category) {
+ $catIds[] = $category->getVar('categoryid');
+ }
+ if (empty($catIds)) {
+ return $ret;
+ }
/*$cat = array();
$sql = "SELECT categoryid, MAX(datesub) as date FROM " . $this->db->prefix('publisher_items') . " WHERE status IN (" . implode(',', $status) . ") GROUP BY categoryid";
@@ -1627,6 +1641,7 @@
$sql = "SELECT mi.categoryid, mi.itemid, mi.title, mi.short_url, mi.uid, mi.datesub";
$sql .= " FROM (SELECT categoryid, MAX(datesub) AS date FROM " . $this->db->prefix('publisher_items');
$sql .= " WHERE status IN (" . implode(',', $status) . ")";
+ $sql .= " AND categoryid IN (" . implode(',', $catIds) . ")";
$sql .= " GROUP BY categoryid)mo";
$sql .= " JOIN " . $this->db->prefix('publisher_items') . " mi ON mi.datesub = mo.date";
$result = $this->db->query($sql);
Modified: XoopsModules/publisher/trunk/publisher/index.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/index.php 2013-01-03 19:49:51 UTC (rev 10646)
+++ XoopsModules/publisher/trunk/publisher/index.php 2013-01-03 20:52:31 UTC (rev 10647)
@@ -65,7 +65,7 @@
if ($publisher->getConfig('idxcat_display_last_item') == 1) {
// Get the last item in each category
- $last_itemObj = $publisher->getHandler('item')->getLastPublishedByCat();
+ $last_itemObj = $publisher->getHandler('item')->getLastPublishedByCat(array_merge($categoriesObj, $subcats));
}
// Max size of the title in the last item column
|
|
From: <tr...@us...> - 2013-01-04 19:22:51
|
Revision: 10661
http://sourceforge.net/p/xoops/svn/10661
Author: trabis
Date: 2013-01-04 19:22:48 +0000 (Fri, 04 Jan 2013)
Log Message:
-----------
Fixing category permissions bug. Removing assign by reference for non variables.
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/admin/admin_header.php
XoopsModules/publisher/trunk/publisher/admin/category.php
XoopsModules/publisher/trunk/publisher/admin/item.php
XoopsModules/publisher/trunk/publisher/admin/main.php
XoopsModules/publisher/trunk/publisher/class/category.php
XoopsModules/publisher/trunk/publisher/class/item.php
XoopsModules/publisher/trunk/publisher/class/permission.php
XoopsModules/publisher/trunk/publisher/include/functions.php
Modified: XoopsModules/publisher/trunk/publisher/admin/admin_header.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/admin_header.php 2013-01-04 19:12:30 UTC (rev 10660)
+++ XoopsModules/publisher/trunk/publisher/admin/admin_header.php 2013-01-04 19:22:48 UTC (rev 10661)
@@ -38,7 +38,7 @@
echo xoops_error('/Frameworks/moduleclasses/moduleadmin/ is required!!!');
}
/*
-$myts =& MyTextSanitizer::getInstance();
+$myts = MyTextSanitizer::getInstance();
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
include_once(XOOPS_ROOT_PATH."/class/template.php");
Modified: XoopsModules/publisher/trunk/publisher/admin/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/category.php 2013-01-04 19:12:30 UTC (rev 10660)
+++ XoopsModules/publisher/trunk/publisher/admin/category.php 2013-01-04 19:22:48 UTC (rev 10661)
@@ -379,7 +379,7 @@
echo "</tr>";
if ($totalitems > 0) {
for ($i = 0; $i < $totalitemsOnPage; $i++) {
- $categoryObj =& $allcats[$itemsObj[$i]->categoryid()];
+ $categoryObj = $allcats[$itemsObj[$i]->categoryid()];
$modify = "<a href='item.php?op=mod&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITITEM . "' alt='" . _AM_PUBLISHER_EDITITEM . "' /></a>";
$delete = "<a href='item.php?op=del&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . XOOPS_URL . "/modules/" . $publisher->getModule()->dirname() . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETEITEM . "' alt='" . _AM_PUBLISHER_DELETEITEM . "'/></a>";
echo "<tr>";
Modified: XoopsModules/publisher/trunk/publisher/admin/item.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/item.php 2013-01-04 19:12:30 UTC (rev 10660)
+++ XoopsModules/publisher/trunk/publisher/admin/item.php 2013-01-04 19:22:48 UTC (rev 10661)
@@ -194,7 +194,7 @@
echo "</tr>";
if ($totalitems > 0) {
for ($i = 0; $i < $totalItemsOnPage; $i++) {
- $categoryObj =& $itemsObj[$i]->category();
+ $categoryObj = $itemsObj[$i]->category();
$approve = "<a href='item.php?op=mod&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . PUBLISHER_URL . "/images/links/approve.gif' title='" . _AM_PUBLISHER_SUBMISSION_MODERATE . "' alt='" . _AM_PUBLISHER_SUBMISSION_MODERATE . "' /></a> ";
$clone = '';
@@ -243,7 +243,7 @@
echo "</tr>";
if ($totalitems > 0) {
for ($i = 0; $i < $totalItemsOnPage; $i++) {
- $categoryObj =& $itemsObj[$i]->category();
+ $categoryObj = $itemsObj[$i]->category();
$modify = "<a href='item.php?op=mod&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITITEM . "' alt='" . _AM_PUBLISHER_EDITITEM . "' /></a>";
$delete = "<a href='item.php?op=del&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETEITEM . "' alt='" . _AM_PUBLISHER_DELETEITEM . "'/></a>";
@@ -290,7 +290,7 @@
echo "</tr>";
if ($totalitems > 0) {
for ($i = 0; $i < $totalItemsOnPage; $i++) {
- $categoryObj =& $itemsObj[$i]->category();
+ $categoryObj = $itemsObj[$i]->category();
$modify = "<a href='item.php?op=mod&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITITEM . "' alt='" . _AM_PUBLISHER_EDITITEM . "' /></a>";
$delete = "<a href='item.php?op=del&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETEITEM . "' alt='" . _AM_PUBLISHER_DELETEITEM . "'/></a>";
@@ -338,7 +338,7 @@
echo "</tr>";
if ($totalitems > 0) {
for ($i = 0; $i < $totalItemsOnPage; $i++) {
- $categoryObj =& $itemsObj[$i]->category();
+ $categoryObj = $itemsObj[$i]->category();
$modify = "<a href='item.php?op=mod&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITITEM . "' alt='" . _AM_PUBLISHER_EDITITEM . "' /></a>";
$delete = "<a href='item.php?op=del&itemid=" . $itemsObj[$i]->itemid() . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETEITEM . "' alt='" . _AM_PUBLISHER_DELETEITEM . "'/></a>";
Modified: XoopsModules/publisher/trunk/publisher/admin/main.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/main.php 2013-01-04 19:12:30 UTC (rev 10660)
+++ XoopsModules/publisher/trunk/publisher/admin/main.php 2013-01-04 19:22:48 UTC (rev 10661)
@@ -226,7 +226,7 @@
for ($i = 0; $i < $totalItemsOnPage; $i++) {
// Creating the category object to which this item is linked
- $categoryObj =& $itemsObj[$i]->category();
+ $categoryObj = $itemsObj[$i]->category();
$approve = '';
switch ($itemsObj[$i]->status()) {
Modified: XoopsModules/publisher/trunk/publisher/class/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/category.php 2013-01-04 19:12:30 UTC (rev 10660)
+++ XoopsModules/publisher/trunk/publisher/class/category.php 2013-01-04 19:22:48 UTC (rev 10661)
@@ -94,7 +94,7 @@
if (is_object($xoopsUser) && $xoopsUser->getVar('uid') == $this->moderator()) {
return true;
}
- $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (in_array($this->categoryid(), $categoriesGranted)) {
$ret = true;
}
@@ -464,7 +464,7 @@
$criteria->add(new Criteria('parentid', $parentid));
}
if (!$publisher_isAdmin) {
- $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
} else {
@@ -504,7 +504,7 @@
$criteria->setSort('name');
$criteria->setOrder('ASC');
if (!$publisher_isAdmin) {
- $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('item_submit');
+ $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('item_submit');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
} else {
@@ -545,7 +545,7 @@
$criteria->setSort('name');
$criteria->setOrder('ASC');
if (!$publisher_isAdmin) {
- $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
} else {
@@ -590,7 +590,7 @@
if (isset($parentid) && ($parentid != -1)) {
$criteria->add(new criteria('parentid', $parentid));
if (!$publisher_isAdmin) {
- $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
} else {
@@ -617,7 +617,7 @@
$criteria = new CriteriaCompo(new Criteria('parentid', "(" . implode(',', array_keys($categories)) . ")", 'IN'));
$ret = array();
if (!$publisher_isAdmin) {
- $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (count($categoriesGranted) > 0) {
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
} else {
Modified: XoopsModules/publisher/trunk/publisher/class/item.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/item.php 2013-01-04 19:12:30 UTC (rev 10660)
+++ XoopsModules/publisher/trunk/publisher/class/item.php 2013-01-04 19:22:48 UTC (rev 10661)
@@ -1219,7 +1219,7 @@
if (!$publisher_isAdmin) {
$criteriaPermissions = new CriteriaCompo();
// Categories for which user has access
- $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
if (!empty($categoriesGranted)) {
$grantedCategories = new Criteria('categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN');
$criteriaPermissions->add($grantedCategories, 'AND');
@@ -1375,8 +1375,8 @@
if (!$publisher_isAdmin) {
$criteriaPermissions = new CriteriaCompo();
// Categories for which user has access
- $categoriesGranted =& $this->publisher->getHandler('permission')->getGrantedItems('category_read');
- if (!empty($grantedCategories)) {
+ $categoriesGranted = $this->publisher->getHandler('permission')->getGrantedItems('category_read');
+ if (!empty($categoriesGranted)) {
$grantedCategories = new Criteria('categoryid', "(" . implode(',', $categoriesGranted) . ")", 'IN');
$criteriaPermissions->add($grantedCategories, 'AND');
} else {
Modified: XoopsModules/publisher/trunk/publisher/class/permission.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/permission.php 2013-01-04 19:12:30 UTC (rev 10660)
+++ XoopsModules/publisher/trunk/publisher/class/permission.php 2013-01-04 19:22:48 UTC (rev 10661)
@@ -119,7 +119,7 @@
if (!$id) {
return false;
}
- $permissions =& $this->getGrantedItems($gperm_name);
+ $permissions = $this->getGrantedItems($gperm_name);
if (!empty($permissions) && isset ($permissions[$id])) {
return true;
} else {
Modified: XoopsModules/publisher/trunk/publisher/include/functions.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/include/functions.php 2013-01-04 19:12:30 UTC (rev 10660)
+++ XoopsModules/publisher/trunk/publisher/include/functions.php 2013-01-04 19:22:48 UTC (rev 10661)
@@ -383,7 +383,7 @@
function publisher_userIsModerator($itemObj)
{
$publisher = PublisherPublisher::getInstance();
- $categoriesGranted =& $publisher->getHandler('permission')->getGrantedItems('category_moderation');
+ $categoriesGranted = $publisher->getHandler('permission')->getGrantedItems('category_moderation');
return (is_object($itemObj) && in_array($itemObj->categoryid(), $categoriesGranted));
}
|
|
From: <tr...@us...> - 2013-01-09 22:03:22
|
Revision: 10727
http://sourceforge.net/p/xoops/svn/10727
Author: trabis
Date: 2013-01-09 22:03:19 +0000 (Wed, 09 Jan 2013)
Log Message:
-----------
Fixing bug in index page
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/class/item.php
XoopsModules/publisher/trunk/publisher/index.php
Modified: XoopsModules/publisher/trunk/publisher/class/item.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/item.php 2013-01-09 21:43:27 UTC (rev 10726)
+++ XoopsModules/publisher/trunk/publisher/class/item.php 2013-01-09 22:03:19 UTC (rev 10727)
@@ -1607,8 +1607,11 @@
{
$ret = array();
$catIds = array();
- foreach ($categoriesObj as $category) {
- $catIds[] = $category->getVar('categoryid');
+ foreach ($categoriesObj as $parentid) {
+ foreach ($parentid as $category) {
+ $catId = $category->getVar('categoryid');
+ $catIds[$catId] = $catId;
+ }
}
if (empty($catIds)) {
return $ret;
Modified: XoopsModules/publisher/trunk/publisher/index.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/index.php 2013-01-09 21:43:27 UTC (rev 10726)
+++ XoopsModules/publisher/trunk/publisher/index.php 2013-01-09 22:03:19 UTC (rev 10727)
@@ -53,7 +53,7 @@
redirect_header("javascript:history.go(-1)", 2, _MD_PUBLISHER_NO_CAT_EXISTS);
exit;
}
- //exit('here');
+
// Get subcats of the top categories
$subcats = $publisher->getHandler('category')->getSubCats($categoriesObj);
@@ -65,7 +65,7 @@
if ($publisher->getConfig('idxcat_display_last_item') == 1) {
// Get the last item in each category
- $last_itemObj = $publisher->getHandler('item')->getLastPublishedByCat(array_merge($categoriesObj, $subcats));
+ $last_itemObj = $publisher->getHandler('item')->getLastPublishedByCat(array_merge(array($categoriesObj), $subcats));
}
// Max size of the title in the last item column
|
|
From: <luc...@us...> - 2013-04-03 22:35:55
|
Revision: 11345
http://sourceforge.net/p/xoops/svn/11345
Author: luciorota
Date: 2013-04-03 22:35:51 +0000 (Wed, 03 Apr 2013)
Log Message:
-----------
bugfix: create "/uploads/" . $xoopsModule->getVar('dirname') . "/content" directory on install
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/xoops_version.php
Added Paths:
-----------
XoopsModules/publisher/trunk/publisher/include/install.php
Copied: XoopsModules/publisher/trunk/publisher/include/install.php (from rev 11343, XoopsModules/publisher/trunk/publisher/include/update.php)
===================================================================
--- XoopsModules/publisher/trunk/publisher/include/install.php (rev 0)
+++ XoopsModules/publisher/trunk/publisher/include/install.php 2013-04-03 22:35:51 UTC (rev 11345)
@@ -0,0 +1,40 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @author luciorota <luc...@gm...>
+ * @version $Id$
+ */
+
+function xoops_module_pre_install_publisher(&$xoopsModule) {
+ // NOP
+ return true;
+}
+
+
+
+function xoops_module_install_publisher(&$xoopsModule) {
+ xoops_loadLanguage('modinfo', $xoopsModule->getVar('dirname'));
+ include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar('dirname') . "/include/functions.php";
+
+ $ret = true;
+ $msg = '';
+ // Create content directory
+ $dir = XOOPS_ROOT_PATH . "/uploads/" . $xoopsModule->getVar('dirname') . "/content";
+ if (!publisher_mkdir($dir))
+ $msg.= sprintf(_MI_AJAXFM_WARNING_DIRNOTCREATED, $dir);
+ if (empty($msg))
+ return $ret;
+ else
+ return $msg;
+}
Modified: XoopsModules/publisher/trunk/publisher/xoops_version.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/xoops_version.php 2013-04-03 22:18:57 UTC (rev 11344)
+++ XoopsModules/publisher/trunk/publisher/xoops_version.php 2013-04-03 22:35:51 UTC (rev 11345)
@@ -1,1156 +1,1158 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/**
- * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @package Publisher
- * @since 1.0
- * @author trabis <lus...@gm...>
- * @author The SmartFactory <www.smartfactory.ca>
- * @version $Id$
- */
-
-defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
-xoops_load('XoopsLocal');
-
-$modversion['name'] = _MI_PUBLISHER_MD_NAME;
-$modversion['version'] = 1.0;
-$modversion['description'] = _MI_PUBLISHER_MD_DESC;
-$modversion['author'] = "Xuups.com";
-$modversion['credits'] = "w4z004, hsalazar, Mithrandir, fx2024, Ackbarr, Mariuss, Marco, Michiel, phppp, outch, Xvitry, Catzwolf, Shine, McDonald, trabis, Mowaffak, Bandit-x, Shiva";
-$modversion['help'] = 'page=help';
-$modversion['license'] = 'GNU GPL 2.0';
-$modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/";
-$modversion['official'] = 0;
-$modversion['dirname'] = basename(dirname(__FILE__));
-
-include_once XOOPS_ROOT_PATH . "/modules/" . $modversion['dirname'] . "/include/constants.php";
-
-$logo_filename = $modversion['dirname'] . "_logo.png";
-
-if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $modversion['dirname'] . "/images/" . $logo_filename)) {
- $modversion['image'] = "images/{$logo_filename}";
-} else {
- $modversion['image'] = "images/module_logo.png";
-}
-// Update
-$modversion['onUpdate'] = 'include/update.php';
-
-// Added by marcan for the About page in admin section
-$modversion['adminMenu'] = "publisher_adminMenu";
-$modversion['developer_lead'] = "trabis";
-$modversion['developer_website_url'] = "http://www.xuups.com";
-$modversion['developer_website_name'] = "Xoops User Utilities";
-$modversion['developer_email'] = "lus...@gm...";
-$modversion['status_version'] = "RC";
-$modversion['status'] = "RC";
-$modversion['date'] = "2011-12-04";
-
-//$modversion['warning'] = _MI_PUBLISHER_WARNING_BETA;
-
-$modversion['demo_site_url'] = "";
-$modversion['demo_site_name'] = "";
-$modversion['support_site_url'] = "http://www.xuups.com/modules/newbb/viewforum.php?forum=28";
-$modversion['support_site_name'] = "Xuups";
-$modversion['submit_bug'] = "http://www.xuups.com/modules/newbb/viewforum.php?forum=28";
-$modversion['submit_feature'] = "http://www.xuups.com/modules/newbb/viewforum.php?forum=28";
-
-$modversion['people']['developers'][] = "trabis";
-$modversion['people']['developers'][] = "Mowaffak";
-$modversion['people']['developers'][] = "Bandit-x";
-$modversion['people']['developers'][] = "Shiva";
-
-$modversion['people']['testers'][] = "urban, AEIOU, pacho, mariane";
-//$modversion['people']['translaters'][] = "";
-//$modversion['people']['documenters'][] = "";
-
-$modversion['author_word'] = "";
-
-
-//about
-$modversion['release_date'] = '2011/11/17';
-$modversion['module_status'] = "RC";
-$modversion['min_php'] = '5.2.0';
-$modversion['min_xoops'] = '2.5.0';
-$modversion['min_db'] = array('mysql'=>'5.0.7', 'mysqli'=>'5.0.7');
-$modversion['min_admin'] = '1.1';
-$modversion['dirmoduleadmin'] = 'Frameworks/moduleclasses';
-$modversion['icons16'] = 'Frameworks/moduleclasses/icons/16';
-$modversion['icons32'] = 'Frameworks/moduleclasses/icons/32';
-
-$modversion['author_word'] = "";
-
-// Admin things
-$modversion['hasAdmin'] = 1;
-$modversion['adminindex'] = "admin/index.php";
-$modversion['adminmenu'] = "admin/menu.php";
-$modversion['system_menu'] = 1;
-
-
-// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
-$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
-
-// Tables created by sql file (without prefix!)
-$modversion['tables'][0] = "publisher_categories";
-$modversion['tables'][1] = "publisher_items";
-$modversion['tables'][2] = "publisher_files";
-$modversion['tables'][3] = "publisher_meta";
-$modversion['tables'][4] = "publisher_mimetypes";
-$modversion['tables'][5] = "publisher_rating";
-
-// Search
-$modversion['hasSearch'] = 1;
-$modversion['search']['file'] = "include/search.inc.php";
-$modversion['search']['func'] = "publisher_search";
-
-// Menu
-$modversion['hasMain'] = 1;
-
-global $xoopsModule;
-if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname']) {
- global $xoopsModuleConfig, $xoopsUser;
- $isAdmin = false;
- if (is_object($xoopsUser)) {
- $isAdmin = $xoopsUser->isAdmin($xoopsModule->getVar('mid'));
- }
- // Add the Submit new item button
- $allowsubmit = (isset($xoopsModuleConfig['perm_submit']) && $xoopsModuleConfig['perm_submit'] == 1) ? true : false;
- $anonpost = (isset($xoopsModuleConfig['permissions_anon_post']) && $xoopsModuleConfig['permissions_anon_post'] == 1) ? true : false;
- if ($isAdmin || ($allowsubmit && (is_object($xoopsUser) || $anonpost))) {
- $modversion['sub'][1]['name'] = _MI_PUBLISHER_SUB_SMNAME1;
- $modversion['sub'][1]['url'] = "submit.php?op=add";
- }
-
- // Add the Search button
- $allowsearch = (isset($xoopsModuleConfig['perm_search']) && $xoopsModuleConfig['perm_search'] == 1) ? true : false;
- if ($allowsearch) {
- $modversion['sub'][2]['name'] = _MI_PUBLISHER_SUB_SMNAME3;
- $modversion['sub'][2]['url'] = "search.php";
- }
-}
-// Add the Archive button
-$modversion['sub'][3]['name'] = _MI_PUBLISHER_SUB_ARCHIVE;
-$modversion['sub'][3]['url'] = "archive.php";
-
-$i = 0;
-
-$i++;
-$modversion['blocks'][$i]['file'] = "items_new.php";
-$modversion['blocks'][$i]['name'] = _MI_PUBLISHER_ITEMSNEW;
-$modversion['blocks'][$i]['description'] = _MI_PUBLISHER_ITEMSNEW_DSC;
-$modversion['blocks'][$i]['show_func'] = "publisher_items_new_show";
-$modversion['blocks'][$i]['edit_func'] = "publisher_items_new_edit";
-$modversion['blocks'][$i]['options'] = "0|datesub|0|5|65|none";
-$modversion['blocks'][$i]['template'] = "publisher_items_new.html";
-
-$i++;
-$modversion['blocks'][$i]['file'] = "items_recent.php";
-$modversion['blocks'][$i]['name'] = _MI_PUBLISHER_RECENTITEMS;
-$modversion['blocks'][$i]['description'] = _MI_PUBLISHER_RECENTITEMS_DSC;
-$modversion['blocks'][$i]['show_func'] = "publisher_items_recent_show";
-$modversion['blocks'][$i]['edit_func'] = "publisher_items_recent_edit";
-$modversion['blocks'][$i]['options'] = "0|datesub|5|65";
-$modversion['blocks'][$i]['template'] = "publisher_items_recent.html";
-
-$i++;
-$modversion['blocks'][$i]['file'] = "items_spot.php";
-$modversion['blocks'][$i]['name'] = _MI_PUBLISHER_ITEMSPOT;
-$modversion['blocks'][$i]['description'] = _MI_PUBLISHER_ITEMSPOT_DSC;
-$modversion['blocks'][$i]['show_func'] = "publisher_items_spot_show";
-$modversion['blocks'][$i]['edit_func'] = "publisher_items_spot_edit";
-$modversion['blocks'][$i]['options'] = "1|5|0|0|1|1|bullet|0|0";
-$modversion['blocks'][$i]['template'] = "publisher_items_spot.html";
-
-$i++;
-$modversion['blocks'][$i]['file'] = "items_random_item.php";
-$modversion['blocks'][$i]['name'] = _MI_PUBLISHER_ITEMSRANDOM_ITEM;
-$modversion['blocks'][$i]['description'] = _MI_PUBLISHER_ITEMSRANDOM_ITEM_DSC;
-$modversion['blocks'][$i]['show_func'] = "publisher_items_random_item_show";
-$modversion['blocks'][$i]['template'] = "publisher_items_random_item.html";
-
-$i++;
-$modversion['blocks'][$i]['file'] = "items_menu.php";
-$modversion['blocks'][$i]['name'] = _MI_PUBLISHER_ITEMSMENU;
-$modversion['blocks'][$i]['description'] = _MI_PUBLISHER_ITEMSMENU_DSC;
-$modversion['blocks'][$i]['show_func'] = "publisher_items_menu_show";
-$modversion['blocks'][$i]['edit_func'] = "publisher_items_menu_edit";
-$modversion['blocks'][$i]['options'] = "0|datesub|5";
-$modversion['blocks'][$i]['template'] = "publisher_items_menu.html";
-
-$i++;
-$modversion['blocks'][$i]['file'] = "latest_files.php";
-$modversion['blocks'][$i]['name'] = _MI_PUBLISHER_LATESTFILES;
-$modversion['blocks'][$i]['description'] = _MI_PUBLISHER_LATESTFILES_DSC;
-$modversion['blocks'][$i]['show_func'] = "publisher_latest_files_show";
-$modversion['blocks'][$i]['edit_func'] = "publisher_latest_files_edit";
-$modversion['blocks'][$i]['options'] = "0|datesub|5|0";
-$modversion['blocks'][$i]['template'] = "publisher_latest_files.html";
-
-$i++;
-$modversion['blocks'][$i]['file'] = "date_to_date.php";
-$modversion['blocks'][$i]['name'] = _MI_PUBLISHER_DATE_TO_DATE;
-$modversion['blocks'][$i]['description'] = _MI_PUBLISHER_DATE_TO_DATE_DSC;
-$modversion['blocks'][$i]['show_func'] = "publisher_date_to_date_show";
-$modversion['blocks'][$i]['edit_func'] = "publisher_date_to_date_edit";
-$modversion['blocks'][$i]['options'] = XoopsLocal::formatTimestamp(time(), 'm/j/Y') . "|" . XoopsLocal::formatTimestamp(time(), 'm/j/Y');
-$modversion['blocks'][$i]['template'] = "publisher_date_to_date.html";
-
-$i++;
-$modversion['blocks'][$i]['file'] = "items_columns.php";
-$modversion['blocks'][$i]['name'] = _MI_PUBLISHER_COLUMNS;
-$modversion['blocks'][$i]['description'] = _MI_PUBLISHER_COLUMNS_DSC;
-$modversion['blocks'][$i]['show_func'] = "publisher_items_columns_show";
-$modversion['blocks'][$i]['edit_func'] = "publisher_items_columns_edit";
-$modversion['blocks'][$i]['options'] = "2|0|4|256|normal";
-$modversion['blocks'][$i]['template'] = "publisher_items_columns.html";
-
-$i++;
-$modversion['blocks'][$i]['file'] = "latest_news.php";
-$modversion['blocks'][$i]['name'] = _MI_PUBLISHER_LATEST_NEWS;
-$modversion['blocks'][$i]['description'] = _MI_PUBLISHER_LATEST_NEWS_DSC;
-$modversion['blocks'][$i]['show_func'] = "publisher_latest_news_show";
-$modversion['blocks'][$i]['edit_func'] = "publisher_latest_news_edit";
-$modversion['blocks'][$i]['options'] = "0|6|2|300|0|0|100|30|published|1|120|120|1|dcdcdc|RIGHT|1|1|1|1|1|1|1|1|1|1|1|1|1|extended|";
-$modversion['blocks'][$i]['template'] = 'publisher_latest_news.html';
-
-$i++;
-$modversion['blocks'][$i]['file'] = "search.php";
-$modversion['blocks'][$i]['name'] = _MI_PUBLISHER_SEARCH;
-$modversion['blocks'][$i]['description'] = _MI_PUBLISHER_SEARCH_DSC;
-$modversion['blocks'][$i]['show_func'] = "publisher_search_show";
-$modversion['blocks'][$i]['template'] = 'publisher_search_block.html';
-
-$i++;
-$modversion['blocks'][$i]['file'] = "category_items_sel.php";
-$modversion['blocks'][$i]['name'] = _MI_PUBLISHER_CATEGORY_ITEMS_SEL;
-$modversion['blocks'][$i]['description'] = _MI_PUBLISHER_CATEGORY_ITEMS_SEL_DSC;
-$modversion['blocks'][$i]['show_func'] = "publisher_category_items_sel_show";
-$modversion['blocks'][$i]['edit_func'] = "publisher_category_items_sel_edit";
-$modversion['blocks'][$i]['options'] = "0|datesub|5|65";
-$modversion['blocks'][$i]['template'] = "publisher_category_items_sel.html";
-
-// Templates
-$i = 0;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_header.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_HEADER_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_footer.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_FOOTER_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_singleitem.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_SINGLEITEM_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_categories_table.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_CATEGORIES_TABLE_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_display_list.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_DISPLAY_LIST_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_display_summary.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_DISPLAY_SUMMARY_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_display_full.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_DISPLAY_FULL_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_display_wfsection.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_DISPLAY_WFSECTION_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_item.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_ITEM_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_submit.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_SUBMIT_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_singleitem_block.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_SINGLEITEM_BLOCK_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_print.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_PRINT_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_rss.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_RSS_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_addfile.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_ADDFILE_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_search.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_SEARCH_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_author_items.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_AUTHOR_ITEMS_DSC;
-
-$i++;
-$modversion['templates'][$i]['file'] = 'publisher_archive.html';
-$modversion['templates'][$i]['description'] = _MI_PUBLISHER_ARCHIVE__DSC;
-
-// Config categories
-$i = 0;
-$modversion['configcat']['seo']['name'] = _MI_PUBLISHER_CONFCAT_SEO;
-$modversion['configcat']['seo']['description'] = _MI_PUBLISHER_CONFCAT_SEO_DSC;
-
-$i++;
-$modversion['configcat']['indexcat']['name'] = _MI_PUBLISHER_CONFCAT_INDEXCAT;
-$modversion['configcat']['indexcat']['description'] = _MI_PUBLISHER_CONFCAT_INDEXCAT_DSC;
-
-$i++;
-$modversion['configcat']['index']['name'] = _MI_PUBLISHER_CONFCAT_INDEX;
-$modversion['configcat']['index']['description'] = _MI_PUBLISHER_CONFCAT_INDEX_DSC;
-
-$i++;
-$modversion['configcat']['category']['name'] = _MI_PUBLISHER_CONFCAT_CATEGORY;
-$modversion['configcat']['category']['description'] = _MI_PUBLISHER_CONFCAT_CATEGORY_DSC;
-
-$i++;
-$modversion['configcat']['item']['name'] = _MI_PUBLISHER_CONFCAT_ITEM;
-$modversion['configcat']['item']['description'] = _MI_PUBLISHER_CONFCAT_ITEM_DSC;
-
-$i++;
-$modversion['configcat']['print']['name'] = _MI_PUBLISHER_CONFCAT_PRINT;
-$modversion['configcat']['print']['description'] = _MI_PUBLISHER_CONFCAT_PRINT_DSC;
-
-$i++;
-$modversion['configcat']['search']['name'] = _MI_PUBLISHER_CONFCAT_SEARCH;
-$modversion['configcat']['search']['description'] = _MI_PUBLISHER_CONFCAT_SEARCH_DSC;
-
-$i++;
-$modversion['configcat']['submit']['name'] = _MI_PUBLISHER_CONFCAT_SUBMIT;
-$modversion['configcat']['submit']['description'] = _MI_PUBLISHER_CONFCAT_SUBMIT_DSC;
-
-$i++;
-$modversion['configcat']['permissions']['name'] = _MI_PUBLISHER_CONFCAT_PERMISSIONS;
-$modversion['configcat']['permissions']['description'] = _MI_PUBLISHER_CONFCAT_PERMISSIONS_DSC;
-
-$i++;
-$modversion['configcat']['format']['name'] = _MI_PUBLISHER_CONFCAT_FORMAT;
-$modversion['configcat']['format']['description'] = _MI_PUBLISHER_CONFCAT_FORMAT_DSC;
-
-// Config Settings (only for modules that need config settings generated automatically)
-$i = 0;
-
-################### SEO ####################
-$i++;
-$modversion['config'][$i]['name'] = 'seo_url_rewrite';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_URL_REWRITE';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_URL_REWRITE_DSC';
-$modversion['config'][$i]['formtype'] = 'select';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['default'] = 'none';
-$modversion['config'][$i]['options'] = array(
- _MI_PUBLISHER_URL_REWRITE_NONE => 'none',
- _MI_PUBLISHER_URL_REWRITE_PATHINFO => 'path-info'
-);
-
-// Is performing module install/update?
-$isModuleAction = (!empty($_POST["fct"]) && "modulesadmin" == $_POST["fct"]) ? true : false;
-if ($isModuleAction && (in_array(php_sapi_name(), array("apache", "apache2handler", "cgi-fcgi")))) {
- $modversion['config'][$i]['options'][_MI_PUBLISHER_URL_REWRITE_HTACCESS] = 'htaccess';
-}
-$modversion['config'][$i]['category'] = 'seo';
-
-$i++;
-$modversion['config'][$i]['name'] = 'seo_module_name';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_SEOMODNAME';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_SEOMODNAMEDSC';
-$modversion['config'][$i]['formtype'] = 'textbox';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['default'] = $modversion['dirname'];
-$modversion['config'][$i]['category'] = 'seo';
-
-$i++;
-$modversion['config'][$i]['name'] = 'seo_meta_keywords';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_SEO_METAKEYWORDS';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_SEO_METAKEYWORDS_DSC';
-$modversion['config'][$i]['formtype'] = 'textbox';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['default'] = '';
-$modversion['config'][$i]['category'] = 'seo';
-
-################### INDEX PAGE ####################
-$i++;
-$modversion['config'][$i]['name'] = 'index_title_and_welcome';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_WELCOME';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_WELCOMEDSC';
-$modversion['config'][$i]['formtype'] = 'yesno';
-$modversion['config'][$i]['valuetype'] = 'int';
-$modversion['config'][$i]['default'] = 1;
-$modversion['config'][$i]['category'] = 'index';
-
-$i++;
-$modversion['config'][$i]['name'] = 'index_welcome_msg';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_INDEXMSG';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_INDEXMSGDSC';
-$modversion['config'][$i]['formtype'] = 'textarea';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['default'] = _MI_PUBLISHER_INDEXMSGDEF;
-$modversion['config'][$i]['category'] = 'index';
-
-$i++;
-$modversion['config'][$i]['name'] = 'index_display_last_items';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_LASTITEMS';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_LASTITEMSDSC';
-$modversion['config'][$i]['formtype'] = 'yesno';
-$modversion['config'][$i]['valuetype'] = 'int';
-$modversion['config'][$i]['default'] = 1;
-$modversion['config'][$i]['category'] = 'index';
-
-$i++;
-$modversion['config'][$i]['name'] = 'index_footer';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_INDEXFOOTER';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_INDEXFOOTERDSC';
-$modversion['config'][$i]['formtype'] = 'textarea';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['default'] = '';
-$modversion['config'][$i]['category'] = 'index';
-
-
-################### CATEGORY PAGE ####################
-// display_categeory_summary enabled by Freeform Solutions March 21 2006
-$i++;
-$modversion['config'][$i]['name'] = 'cat_display_summary';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_DCS';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_DCS_DSC';
-$modversion['config'][$i]['formtype'] = 'yesno';
-$modversion['config'][$i]['valuetype'] = 'int';
-$modversion['config'][$i]['default'] = 1;
-$modversion['config'][$i]['category'] = 'category';
-
-$i++;
-$modversion['config'][$i]['name'] = 'cat_list_image_width';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_CATLIST_IMG_W';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_CATLIST_IMG_WDSC';
-$modversion['config'][$i]['formtype'] = 'textbox';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['default'] = '90';
-$modversion['config'][$i]['category'] = 'category';
-
-$i++;
-$modversion['config'][$i]['name'] = 'cat_main_image_width';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_CATMAINIMG_W';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_CATMAINIMG_WDSC';
-$modversion['config'][$i]['formtype'] = 'textbox';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['default'] = '150';
-$modversion['config'][$i]['category'] = 'category';
-
-################### ITEM PAGE ####################
-$i++;
-$modversion['config'][$i]['name'] = 'item_title_size';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_TITLE_SIZE';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_TITLE_SIZEDSC';
-$modversion['config'][$i]['formtype'] = 'textbox';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['default'] = '60';
-$modversion['config'][$i]['category'] = 'item';
-
-$i++;
-$modversion['config'][$i]['name'] = 'item_disp_comment_link';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_DISCOM';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_DISCOMDSC';
-$modversion['config'][$i]['formtype'] = 'yesno';
-$modversion['config'][$i]['valuetype'] = 'int';
-$modversion['config'][$i]['default'] = 1;
-$modversion['config'][$i]['category'] = 'item';
-
-$i++;
-$modversion['config'][$i]['name'] = 'item_disp_whowhen_link';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_WHOWHEN';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_WHOWHENDSC';
-$modversion['config'][$i]['formtype'] = 'yesno';
-$modversion['config'][$i]['valuetype'] = 'int';
-$modversion['config'][$i]['default'] = 1;
-$modversion['config'][$i]['category'] = 'item';
-
-$i++;
-$modversion['config'][$i]['name'] = 'item_admin_hits';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_ADMINHITS';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_ADMINHITSDSC';
-$modversion['config'][$i]['formtype'] = 'yesno';
-$modversion['config'][$i]['valuetype'] = 'int';
-$modversion['config'][$i]['default'] = 0;
-$modversion['config'][$i]['category'] = 'item';
-
-$i++;
-$modversion['config'][$i]['name'] = 'item_footer';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_ITEMFOOTER';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_ITEMFOOTERDSC';
-$modversion['config'][$i]['formtype'] = 'textarea';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['default'] = '';
-$modversion['config'][$i]['category'] = 'item';
-
-$i++;
-$modversion['config'][$i]['name'] = 'item_other_items_type';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_OTHERITEMS';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_OTHERITEMSDSC';
-$modversion['config'][$i]['formtype'] = 'select';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['options'] = array(_MI_PUBLISHER_OTHER_ITEMS_TYPE_NONE => 'none',
- _MI_PUBLISHER_OTHER_ITEMS_TYPE_PREVIOUS_NEXT => 'previous_next',
- _MI_PUBLISHER_OTHER_ITEMS_TYPE_ALL => 'all');
-$modversion['config'][$i]['default'] = 'previous_next';
-$modversion['config'][$i]['category'] = 'item';
-
-################### INDEX AND CATEGORIES ####################
-$i++;
-$modversion['config'][$i]['name'] = 'idxcat_show_subcats';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_SHOW_SUBCATS';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_SHOW_SUBCATS_DSC';
-$modversion['config'][$i]['formtype'] = 'select';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['default'] = 'all';
-$modversion['config'][$i]['options'] = array(_MI_PUBLISHER_SHOW_SUBCATS_NO => 'no',
- _MI_PUBLISHER_SHOW_SUBCATS_NOTEMPTY => 'nonempty',
- _MI_PUBLISHER_SHOW_SUBCATS_ALL => 'all',
- _MI_PUBLISHER_SHOW_SUBCATS_NOMAIN => 'nomain');
-$modversion['config'][$i]['category'] = 'indexcat';
-
-$i++;
-$modversion['config'][$i]['name'] = 'idxcat_display_last_item';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_LASTITEM';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_LASTITEMDSC';
-$modversion['config'][$i]['formtype'] = 'yesno';
-$modversion['config'][$i]['valuetype'] = 'int';
-$modversion['config'][$i]['default'] = 1;
-$modversion['config'][$i]['category'] = 'indexcat';
-
-$i++;
-$modversion['config'][$i]['name'] = 'idxcat_last_item_size';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_LASTITSIZE';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_LASTITSIZEDSC';
-$modversion['config'][$i]['formtype'] = 'textbox';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['default'] = '50';
-$modversion['config'][$i]['category'] = 'indexcat';
-
-$i++;
-$modversion['config'][$i]['name'] = 'idxcat_items_display_type';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_DISTYPE';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_DISTYPEDSC';
-$modversion['config'][$i]['formtype'] = 'select';
-$modversion['config'][$i]['valuetype'] = 'text';
-$modversion['config'][$i]['options'] = array(_MI_PUBLISHER_DISPLAYTYPE_SUMMARY => 'summary',
- _MI_PUBLISHER_DISPLAYTYPE_FULL => 'full',
- _MI_PUBLISHER_DISPLAYTYPE_LIST => 'list',
- _MI_PUBLISHER_DISPLAYTYPE_WFSECTION => 'wfsection');
-$modversion['config'][$i]['default'] = 'summary';
-$modversion['config'][$i]['category'] = 'indexcat';
-
-$i++;
-$modversion['config'][$i] ['name'] = 'idxcat_display_subcat_dsc';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_DISSBCATDSC';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_DISSBCATDSCDSC';
-$modversion['config'][$i]['formtype'] = 'yesno';
-$modversion['config'][$i]['valuetype'] = 'int';
-$modversion['config'][$i]['default'] = 1;
-$modversion['config'][$i]['category'] = 'indexcat';
-
-$i++;
-$modversion['config'][$i]['name'] = 'idxcat_display_date_col';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_DISDATECOL';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_DISDATECOLDSC';
-$modversion['config'][$i]['formtype'] = 'yesno';
-$modversion['config'][$i]['valuetype'] = 'int';
-$modversion['config'][$i]['default'] = 1;
-$modversion['config'][$i]['category'] = 'indexcat';
-
-$i++;
-$modversion['config'][$i]['name'] = 'idxcat_display_hits_col';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_HITSCOL';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_HITSCOLDSC';
-$modversion['config'][$i]['formtype'] = 'yesno';
-$modversion['config'][$i]['valuetype'] = 'int';
-$modversion['config'][$i]['default'] = 1;
-$modversion['config'][$i]['category'] = 'indexcat';
-
-$i++;
-$modversion['config'][$i]['name'] = 'idxcat_show_rss_link';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_SHOW_RSS';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_SHOW_RSSDSC';
-$modversion['config'][$i]['formtype'] = 'yesno';
-$modversion['config'][$i]['valuetype'] = 'int';
-$modversion['config'][$i]['default'] = 1;
-$modversion['config'][$i]['category'] = 'indexcat';
-
-$i++;
-$modversion['config'][$i]['name'] = 'idxcat_collaps_heading';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_COLLHEAD';
-$modversion['config'][$i]['description'] = '_MI_PUBLISHER_COLLHEADDSC';
-$modversion['config'][$i]['formtype'] = 'yesno';
-$modversion['config'][$i]['valuetype'] = 'int';
-$modversion['config'][$i]['default'] = 1;
-$modversion['config'][$i]['category'] = 'indexcat';
-
-$i++;
-$modversion['config'][$i]['name'] = 'idxcat_cat_perpage';
-$modversion['config'][$i]['title'] = '_MI_PUBLISHER_CATPERPAGE';
-$mod...
[truncated message content] |
|
From: <be...@us...> - 2013-07-18 10:41:12
|
Revision: 11840
http://sourceforge.net/p/xoops/svn/11840
Author: beckmi
Date: 2013-07-18 10:41:05 +0000 (Thu, 18 Jul 2013)
Log Message:
-----------
Updating to 1.0 Final
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/blocks/items_spot.php
XoopsModules/publisher/trunk/publisher/class/uploader.php
XoopsModules/publisher/trunk/publisher/docs/changelog.txt
XoopsModules/publisher/trunk/publisher/docs/credits.txt
XoopsModules/publisher/trunk/publisher/language/english/help/help.html
XoopsModules/publisher/trunk/publisher/language/english/modinfo.php
XoopsModules/publisher/trunk/publisher/tcpdf/tcpdf.php
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_category_items_sel.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_recent.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_spot.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_latest_files.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_search_block.html
XoopsModules/publisher/trunk/publisher/templates/publisher_addfile.html
XoopsModules/publisher/trunk/publisher/templates/publisher_header.html
XoopsModules/publisher/trunk/publisher/templates/publisher_item.html
XoopsModules/publisher/trunk/publisher/templates/publisher_print.html
XoopsModules/publisher/trunk/publisher/templates/publisher_singleitem.html
XoopsModules/publisher/trunk/publisher/templates/publisher_singleitem_block.html
XoopsModules/publisher/trunk/publisher/templates/publisher_submit.html
XoopsModules/publisher/trunk/publisher/xoops_version.php
Added Paths:
-----------
XoopsModules/publisher/trunk/publisher/docs/ajaxrating.txt
XoopsModules/publisher/trunk/publisher/docs/license.txt
Removed Paths:
-------------
XoopsModules/publisher/trunk/publisher/ajaxrating.txt
XoopsModules/publisher/trunk/publisher/changelog.txt
XoopsModules/publisher/trunk/publisher/docs/licence.txt
Deleted: XoopsModules/publisher/trunk/publisher/ajaxrating.txt
===================================================================
--- XoopsModules/publisher/trunk/publisher/ajaxrating.txt 2013-07-17 18:24:25 UTC (rev 11839)
+++ XoopsModules/publisher/trunk/publisher/ajaxrating.txt 2013-07-18 10:41:05 UTC (rev 11840)
@@ -1,156 +0,0 @@
-(Unobtusive) AJAX Rating Bars v 1.2.2 (March 18 2007)
-ryan masuga, ry...@ma... (http://www.masugadesign.com)
-
-Homepage for this script:
-http://www.masugadesign.com/the-lab/scripts/unobtrusive-ajax-star-rating-bar/
-=============================================================================
-This (Unobtusive) AJAX Rating Bar script is licensed under the
-Creative Commons Attribution 3.0 License - http://creativecommons.org/licenses/by/3.0/
-
-What that means is: Use these files however you want, but don't redistribute
-without the proper credits, please. I'd appreciate hearing from you if you're
-using this script. Credits should include:
-- Masuga Design (http://masugadesign.com/the-lab/scripts/unobtrusive-ajax-star-rating-bar/)
-- Komodo Media (http://komodomedia.com)
-- Climax Designs (http://slim.climaxdesigns.com/).
-- Ben Nolan (http://bennolan.com/behaviour/) for Behavio(u)r!
-
-Suggestions or improvements welcome - they only serve to make the script better.
-=============================================================================
------------------------------------------------------------------------------
-The necessary files:
-
-PHP Files:
- _config-rating.php
- _drawrating.php
- db.php
- rpc.php
-
-CSS File:
- rating.css (can mix into your own stylesheet(s))
-
-Javascript files:
- behaviour.js
- rating.js
-
-Image files:
- starrating.gif
- working.gif
-
-
-CHANGELOG:
------------------------------------------------------------------------------
-v 1.2.2 Updates (March 18, 2007):
-
- * ADDED: prefixed DB calls with $rating_dbname for better separation from other scripts
- This will really help with Wordpress installs - As of 1.2.2 I don't think
- you need to do any special tweaks.
-
- * UPDATED: changed some variable names so as not to confuse with other scripts
-
------------------------------------------------------------------------------
-v 1.2.1 Updates (March 18, 2007):
-
- * ADDED: a new check to keep voters from faking the vote to something very high
- * ADDED: a check to stop people from voting multiple times
- * ADDED: example of using 'static' to the Read Me
-
- * UPDATED: Use echo now to render your star rater, because I'm using 'return'
- instead of echo in the function
-
- * FIXED: bug where you couldn't have letters in your id. Now, letters and numbers only
- * FIXED: issue with number of votes cast (i.e. '0') not showing up for new IDs
-
------------------------------------------------------------------------------
-v 1.2 Updates (March 11, 2007):
-
- * ADDED: a couple checks to stop possible SQL injection hacks
- * ADDED: 'rel="nofollow"' to the rendered rating bar links
- * ADDED: Automatic inserting of ID's in the DB
- * ADDED: New variables to make it easier to fix your paths!
- * ADDED: Ability to call a rater "static" so you can't vote
- (Might come in handy if someone needs to be logged in to vote...)
-
- * FIXED: SQL in this readme to use backticks for easier copy-n-paste
- * FIXED: modified a couple CSS styles that were giving people headaches
-
------------------------------------------------------------------------------
-v 1.1 Features:
- * Uses unobtrusive Javascript, so ratings will still work if the user has Javascript off
- (the script has been tested in IE 6, Safari, and FF).
- * keeps Javascript out of the HTML, resulting in cleaner markup
- * There are now some checks in place to discourage monkey-business, like negative numbers, or funky IP's
- * IP lockout is now in the script
- * You can now specify the number of units! If you want 5 stars, just add a 5, otherwise the script defaults to 10.
- * Enter database info in one place rather than three places
- * This script only uses ONE image
--------------------------------------------------------------
-
-INSTALLATION:
-
-=============================================================================
-1. Make your table for the ratings in your db (you should be able to copy
- and paste the following SQL)
-=============================================================================
-CREATE TABLE `ratings` (
- `id` varchar(11) NOT NULL,
- `total_votes` int(11) NOT NULL default 0,
- `total_value` int(11) NOT NULL default 0,
- `used_ips` longtext,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=3;
-
-
-=============================================================================
-2. Enter your specific info into _config-rating.php
-=============================================================================
- $dbhost = 'localhost';
- $dbuser = '###';
- $dbpass = '###';
- $dbname = '###';
- $tableName = 'ratings';
- $rating_unitwidth = 30;
-
-
-=============================================================================
-3. Enter this line at the top of any page where you want
- to have rating bars.
-=============================================================================
-<?php require('_drawrating.php'); ?>
-
-
-=============================================================================
-4. Point to the right Javascript and CSS files (you need
- behavior.js, rating.js, and rating.css)
-=============================================================================
-<script type="text/javascript" language="javascript" src="js/behavior.js"></script>
-<script type="text/javascript" language="javascript" src="js/rating.js"></script>
-<link rel="stylesheet" type="text/css" href="css/rating.css" />
-
-Remember to make sure to fix paths for the images as well. I kept behavior.js separate
-from rating.js, because you can use it for other things!
-
-
-=============================================================================
-5. Drop the function wherever you want a rating bar to appear
-=============================================================================
-NOTE: As of version 1.2.1, use the echo statement! Also, if you use the static
-parameter, you should always specify the 2nd parameter (number of units), even if
-it is blank (which will default to 10 units)
-
-<?php echo rating_bar('8'); ?> - 10 stars (default), ID of 8
-<?php echo rating_bar('8xxa','5'); ?> - 5 stars, ID of 8xxa
-<?php echo rating_bar('9a','5','static'); ?> - 5 stars, ID of 9a, static (non votable)
-<?php echo rating_bar('9b',''); ?> - 10 stars, ID of 9b
-<?php echo rating_bar('9c','8','static'); ?> - 8 stars, ID of 9c, static (non votable)
-
-
-If you want to change how the rating bar is rendered, you will need to edit
-the _drawrating.php file. Also, you might need to edit the bottom of the rpc.php
-file at about line 52, where the $newback variable is.
-
-
-
-
-
-
Modified: XoopsModules/publisher/trunk/publisher/blocks/items_spot.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/blocks/items_spot.php 2013-07-17 18:24:25 UTC (rev 11839)
+++ XoopsModules/publisher/trunk/publisher/blocks/items_spot.php 2013-07-18 10:41:05 UTC (rev 11840)
@@ -99,6 +99,9 @@
$block['display_whowhen_link'] = $opt_display_poster;
$block['display_comment_link'] = $opt_display_comment;
$block['display_type'] = $opt_display_type;
+
+ $block["publisher_url"] = PUBLISHER_URL;
+
return $block;
}
Deleted: XoopsModules/publisher/trunk/publisher/changelog.txt
===================================================================
--- XoopsModules/publisher/trunk/publisher/changelog.txt 2013-07-17 18:24:25 UTC (rev 11839)
+++ XoopsModules/publisher/trunk/publisher/changelog.txt 2013-07-18 10:41:05 UTC (rev 11840)
@@ -1,45 +0,0 @@
-<strong><u>=> Version 1.0 Beta (2010-04-02)</u></strong>
-- Improved : Images sorted by Name in submit form (trabis)
-- Added : Class for handling block forms (trabis)
-- Fixed : Date to date block blank page (trabis)
-- Fixed : Extra '-' in page title (trabis/mboyden)
-
-<strong><u>=> Version 1.0 Alpha (2009-08-24)</u></strong>
-- Imported : smartsection Version 2.14 Final (trabis)
-- Removed : dependecy from smartobject (trabis)
-- Removed : unused files (trabis)
-- Improved: renamed functions and clean code acording to XOOPS CODING STANDARDS (trabis)
-- Added : xoops 2.3 compatibility (trabis)
-- Added : missing index.html files in some folders (trabis)
-- Added : text truncate option in spotlight block (trabis/Mowaffak)
-- Changed : article submission for admins using submit.php (trabis/Mowaffak)
-- Fixed : cannot show keyword in Japanese and multibyte language (ohwada/trabis)
-- Fixed : keyword "abc" match "abccccc" (ohwada/trabis)
-- Fixed : many Notice when "Disable comments" (ohwada/trabis)
-- Fixed : missing argument when save file (ohwada/trabis)
-- Fixed : undefined variable in admin's category (ohwada/trabis)
-- Fixed : invalid argument when guest view (ohwada/trabis)
-- Fixed : wrong style in print template file (ohwada/trabis)
-- Fixed : parse error and Notice in print (ohwada/trabis)
-- Fixed : enable "Print" and "PDF" (ohwada/trabis)
-- Improved : Hide Read More link in spot block if no body and no truncate used (trabis/Mowaffak)
-- Fixed : preview function was not working correctly (trabis)
-- Improved : removed fpdf libray and added tcpdf library (trabis)
-- Added : ajax rating (trabis)
-- Added : Xoops 2.3 editors and access permissions (trabis)
-- Added : easy module cloning from admin area with auto logo generation (trabis/Xoops French Team)
-- Added : Second title (subtitle) for articles (Shiva)
-- Fixed : english errors in language files (AEIOU)
-- Added : module preferences separated by categories (trabis)
-- Added : advanced search system (trabis/phppp)
-- Added : Columns block (bandit-x/trabis)
-- Added : Multi image support for articles, using core image manager (trabis)
-- Improved : Added support for 'tellafriend' module from GIJOE instead of using mailto link (trabis/GIJOE)
-- Added : Tabbed interface for submit pages (trabis)
-- Added : Adding moderator per category (trabis)
-- Added : Author alias (trabis)
-- Added : Hide sub categories in main page only (Mowaffak)
-- Added : Latest news block (trabis/bandit-x/Mowaffak)
-- Added : Category selection block (trabis/Mowaffak)
-- Added : Image manager / easy uploading (trabis)
-- Fixed : Item name not available in comment notification (Phoenyx)
\ No newline at end of file
Modified: XoopsModules/publisher/trunk/publisher/class/uploader.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/class/uploader.php 2013-07-17 18:24:25 UTC (rev 11839)
+++ XoopsModules/publisher/trunk/publisher/class/uploader.php 2013-07-18 10:41:05 UTC (rev 11840)
@@ -202,7 +202,7 @@
$this->setErrors('There was a problem with your upload. Error: 0');
break;
case 1: // uploaded file exceeds the upload_max_filesize directive in php.ini
- //if ($this->noadmin_sizecheck)
+ //if ($this->noAdminSizeCheck)
//{
// return true;
//}
Added: XoopsModules/publisher/trunk/publisher/docs/ajaxrating.txt
===================================================================
--- XoopsModules/publisher/trunk/publisher/docs/ajaxrating.txt (rev 0)
+++ XoopsModules/publisher/trunk/publisher/docs/ajaxrating.txt 2013-07-18 10:41:05 UTC (rev 11840)
@@ -0,0 +1,156 @@
+(Unobtusive) AJAX Rating Bars v 1.2.2 (March 18 2007)
+ryan masuga, ry...@ma... (http://www.masugadesign.com)
+
+Homepage for this script:
+http://www.masugadesign.com/the-lab/scripts/unobtrusive-ajax-star-rating-bar/
+=============================================================================
+This (Unobtusive) AJAX Rating Bar script is licensed under the
+Creative Commons Attribution 3.0 License - http://creativecommons.org/licenses/by/3.0/
+
+What that means is: Use these files however you want, but don't redistribute
+without the proper credits, please. I'd appreciate hearing from you if you're
+using this script. Credits should include:
+- Masuga Design (http://masugadesign.com/the-lab/scripts/unobtrusive-ajax-star-rating-bar/)
+- Komodo Media (http://komodomedia.com)
+- Climax Designs (http://slim.climaxdesigns.com/).
+- Ben Nolan (http://bennolan.com/behaviour/) for Behavio(u)r!
+
+Suggestions or improvements welcome - they only serve to make the script better.
+=============================================================================
+-----------------------------------------------------------------------------
+The necessary files:
+
+PHP Files:
+ _config-rating.php
+ _drawrating.php
+ db.php
+ rpc.php
+
+CSS File:
+ rating.css (can mix into your own stylesheet(s))
+
+Javascript files:
+ behaviour.js
+ rating.js
+
+Image files:
+ starrating.gif
+ working.gif
+
+
+CHANGELOG:
+-----------------------------------------------------------------------------
+v 1.2.2 Updates (March 18, 2007):
+
+ * ADDED: prefixed DB calls with $rating_dbname for better separation from other scripts
+ This will really help with Wordpress installs - As of 1.2.2 I don't think
+ you need to do any special tweaks.
+
+ * UPDATED: changed some variable names so as not to confuse with other scripts
+
+-----------------------------------------------------------------------------
+v 1.2.1 Updates (March 18, 2007):
+
+ * ADDED: a new check to keep voters from faking the vote to something very high
+ * ADDED: a check to stop people from voting multiple times
+ * ADDED: example of using 'static' to the Read Me
+
+ * UPDATED: Use echo now to render your star rater, because I'm using 'return'
+ instead of echo in the function
+
+ * FIXED: bug where you couldn't have letters in your id. Now, letters and numbers only
+ * FIXED: issue with number of votes cast (i.e. '0') not showing up for new IDs
+
+-----------------------------------------------------------------------------
+v 1.2 Updates (March 11, 2007):
+
+ * ADDED: a couple checks to stop possible SQL injection hacks
+ * ADDED: 'rel="nofollow"' to the rendered rating bar links
+ * ADDED: Automatic inserting of ID's in the DB
+ * ADDED: New variables to make it easier to fix your paths!
+ * ADDED: Ability to call a rater "static" so you can't vote
+ (Might come in handy if someone needs to be logged in to vote...)
+
+ * FIXED: SQL in this readme to use backticks for easier copy-n-paste
+ * FIXED: modified a couple CSS styles that were giving people headaches
+
+-----------------------------------------------------------------------------
+v 1.1 Features:
+ * Uses unobtrusive Javascript, so ratings will still work if the user has Javascript off
+ (the script has been tested in IE 6, Safari, and FF).
+ * keeps Javascript out of the HTML, resulting in cleaner markup
+ * There are now some checks in place to discourage monkey-business, like negative numbers, or funky IP's
+ * IP lockout is now in the script
+ * You can now specify the number of units! If you want 5 stars, just add a 5, otherwise the script defaults to 10.
+ * Enter database info in one place rather than three places
+ * This script only uses ONE image
+-------------------------------------------------------------
+
+INSTALLATION:
+
+=============================================================================
+1. Make your table for the ratings in your db (you should be able to copy
+ and paste the following SQL)
+=============================================================================
+CREATE TABLE `ratings` (
+ `id` varchar(11) NOT NULL,
+ `total_votes` int(11) NOT NULL default 0,
+ `total_value` int(11) NOT NULL default 0,
+ `used_ips` longtext,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM AUTO_INCREMENT=3;
+
+
+=============================================================================
+2. Enter your specific info into _config-rating.php
+=============================================================================
+ $dbhost = 'localhost';
+ $dbuser = '###';
+ $dbpass = '###';
+ $dbname = '###';
+ $tableName = 'ratings';
+ $rating_unitwidth = 30;
+
+
+=============================================================================
+3. Enter this line at the top of any page where you want
+ to have rating bars.
+=============================================================================
+<?php require('_drawrating.php'); ?>
+
+
+=============================================================================
+4. Point to the right Javascript and CSS files (you need
+ behavior.js, rating.js, and rating.css)
+=============================================================================
+<script type="text/javascript" language="javascript" src="js/behavior.js"></script>
+<script type="text/javascript" language="javascript" src="js/rating.js"></script>
+<link rel="stylesheet" type="text/css" href="css/rating.css" />
+
+Remember to make sure to fix paths for the images as well. I kept behavior.js separate
+from rating.js, because you can use it for other things!
+
+
+=============================================================================
+5. Drop the function wherever you want a rating bar to appear
+=============================================================================
+NOTE: As of version 1.2.1, use the echo statement! Also, if you use the static
+parameter, you should always specify the 2nd parameter (number of units), even if
+it is blank (which will default to 10 units)
+
+<?php echo rating_bar('8'); ?> - 10 stars (default), ID of 8
+<?php echo rating_bar('8xxa','5'); ?> - 5 stars, ID of 8xxa
+<?php echo rating_bar('9a','5','static'); ?> - 5 stars, ID of 9a, static (non votable)
+<?php echo rating_bar('9b',''); ?> - 10 stars, ID of 9b
+<?php echo rating_bar('9c','8','static'); ?> - 8 stars, ID of 9c, static (non votable)
+
+
+If you want to change how the rating bar is rendered, you will need to edit
+the _drawrating.php file. Also, you might need to edit the bottom of the rpc.php
+file at about line 52, where the $newback variable is.
+
+
+
+
+
+
Modified: XoopsModules/publisher/trunk/publisher/docs/changelog.txt
===================================================================
--- XoopsModules/publisher/trunk/publisher/docs/changelog.txt 2013-07-17 18:24:25 UTC (rev 11839)
+++ XoopsModules/publisher/trunk/publisher/docs/changelog.txt 2013-07-18 10:41:05 UTC (rev 11840)
@@ -1,3 +1,6 @@
+<strong><u>=> Version 1.0 Final (2013-07-18)</u></strong>
+- added missing URL for doc image in \blocks\items_spot.php
+
<strong><u>=> Version 1.0 RC (2011-12-04)</u></strong>
- Converted to XOOPS 2.5.0 ModuleAdmin GUI
Modified: XoopsModules/publisher/trunk/publisher/docs/credits.txt
===================================================================
--- XoopsModules/publisher/trunk/publisher/docs/credits.txt 2013-07-17 18:24:25 UTC (rev 11839)
+++ XoopsModules/publisher/trunk/publisher/docs/credits.txt 2013-07-18 10:41:05 UTC (rev 11840)
@@ -1,7 +1,5 @@
-This Module has been developed by Taiwen Jiang (phppp)
+CREDITS:
+===============
-Updates have been done by:
-
-Trabis
-Voltan
-Mamba
\ No newline at end of file
+This Module has been originally developed by Trabis from www.xuups.com, and was based on
+SmartSection from SmartFactor, which was based in WF-Section and News.
Deleted: XoopsModules/publisher/trunk/publisher/docs/licence.txt
===================================================================
--- XoopsModules/publisher/trunk/publisher/docs/licence.txt 2013-07-17 18:24:25 UTC (rev 11839)
+++ XoopsModules/publisher/trunk/publisher/docs/licence.txt 2013-07-18 10:41:05 UTC (rev 11840)
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The sour...
[truncated message content] |
|
From: <be...@us...> - 2013-10-22 21:52:01
|
Revision: 12193
http://sourceforge.net/p/xoops/svn/12193
Author: beckmi
Date: 2013-10-22 21:51:58 +0000 (Tue, 22 Oct 2013)
Log Message:
-----------
fixed two templates (bleekk)
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/docs/changelog.txt
XoopsModules/publisher/trunk/publisher/templates/publisher_display_full.html
XoopsModules/publisher/trunk/publisher/templates/publisher_display_summary.html
XoopsModules/publisher/trunk/publisher/xoops_version.php
Modified: XoopsModules/publisher/trunk/publisher/docs/changelog.txt
===================================================================
--- XoopsModules/publisher/trunk/publisher/docs/changelog.txt 2013-10-22 17:13:44 UTC (rev 12192)
+++ XoopsModules/publisher/trunk/publisher/docs/changelog.txt 2013-10-22 21:51:58 UTC (rev 12193)
@@ -1,3 +1,6 @@
+<strong><u>=> Version 1.01 Final (2013-10-22)</u></strong>
+- fixed two templates (bleekk)
+
<strong><u>=> Version 1.0 Final (2013-07-18)</u></strong>
- added missing URL for doc image in \blocks\items_spot.php
Modified: XoopsModules/publisher/trunk/publisher/templates/publisher_display_full.html
===================================================================
--- XoopsModules/publisher/trunk/publisher/templates/publisher_display_full.html 2013-10-22 17:13:44 UTC (rev 12192)
+++ XoopsModules/publisher/trunk/publisher/templates/publisher_display_full.html 2013-10-22 21:51:58 UTC (rev 12193)
@@ -1,30 +1,57 @@
<{include file='db:publisher_header.html'}>
-<!-- if we are on the index page OR inside a category that has subcats OR (inside a category with no subcats AND $display_category_summary is set to TRUE), let's display the summary table ! //--><{if $indexpage || $category.subcats || ($category && $display_category_summary)}>
+<!-- if we are on the index page OR inside a category that has subcats OR (inside a category with no subcats
+ AND $display_category_summary is set to TRUE), let's display the summary table ! //-->
-<{if $collapsable_heading == 1}>
-<div class="publisher_collaps_title">
- <a href='javascript:;' onclick="toggle('toptable'); toggleIcon('toptableicon')"><img id='toptableicon' src='<{$publisher_url}>/images/links/close12.gif' alt=''/></a> <{$lang_category_summary}>
-</div>
-<div id='toptable'>
- <span class="publisher_collaps_info""><{$lang_category_summary}></span> <!-- Content under the collapsable bar //--> <{/if}>
+<{if $indexpage || $category.subcats || ($category && $display_category_summary)}>
- <{include file='db:publisher_categories_table.html'}>
+ <{if $collapsable_heading == 1}>
+ <div class="publisher_collaps_title">
+ <a href='javascript:;' onclick="toggle('toptable'); toggleIcon('toptableicon')">
+ <img id='toptableicon' src='<{$publisher_url}>/images/links/close12.gif' alt=''/>
+ </a>
+ <{$lang_category_summary}>
+ </div>
+ <div id='toptable'>
+ <span class="publisher_collaps_info">
+ <{$lang_category_summary}>
+ </span>
+ <!-- Content under the collapsable bar //-->
+ <{/if}>
+
+ <{include file='db:publisher_categories_table.html'}>
+
+ <{if $collapsable_heading == 1}>
+ </div>
+ <{/if}>
+ <br/><!-- End of if !$category || $category.subcats || ($category && $display_category_summary) //-->
+<{/if}>
+<{if $items}>
+ <{if $collapsable_heading == 1}>
+ <div class="publisher_collaps_title">
+ <a href='javascript:;' onclick="toggle('bottomtable'); toggleIcon('bottomtableicon')";>
+ <img id='bottomtableicon' src='<{$publisher_url}>/images/links/close12.gif' alt=''/>
+ </a>
+ <{$lang_items_title}>
+ </div>
+ <div id='bottomtable'>
+ <span class="publisher_collaps_info">
+ <{$smarty.const._MD_PUBLISHER_ITEMS_INFO}>
+ </span>
+ <{/if}>
+ <div align="right"><{$navbar}></div>
+
+ <!-- Start item loop -->
+ <{foreach item=item from=$items}>
+ <{include file="db:publisher_singleitem.html" item=$item}>
+ <{/foreach}> <!-- End item loop -->
+
+ <div align="right"><{$navbar}></div>
+
+ <{if $collapsable_heading == 1}>
+ </div>
+ <{/if}><!-- end of if $items -->
- <{if $collapsable_heading == 1}>
-</div> <{/if}>
-<br/><!-- End of if !$category || $category.subcats || ($category && $display_category_summary) //--><{/if}><{if $items}> <{if $collapsable_heading == 1}>
-<div class="publisher_collaps_title">
- <a href='javascript:;' onclick="toggle('bottomtable'); toggleIcon('bottomtableicon')";><img id='bottomtableicon' src='<{$publisher_url}>/images/links/close12.gif' alt=''/></a> <{$lang_items_title}>
-</div>
-<div id='bottomtable'>
- <span class="publisher_collaps_info"><{$smarty.const._MD_PUBLISHER_ITEMS_INFO}></span> <{/if}>
- <div align="right"><{$navbar}></div>
+<{/if}>
- <!-- Start item loop --> <{foreach item=item from=$items}> <{include file="db:publisher_singleitem.html" item=$item}> <{/foreach}> <!-- End item loop -->
-
- <div align="right"><{$navbar}></div>
- <{if $collapsable_heading == 1}>
-</div> <{/if}><!-- end of if $items --> <{/if}>
-
<{include file='db:publisher_footer.html'}>
\ No newline at end of file
Modified: XoopsModules/publisher/trunk/publisher/templates/publisher_display_summary.html
===================================================================
--- XoopsModules/publisher/trunk/publisher/templates/publisher_display_summary.html 2013-10-22 17:13:44 UTC (rev 12192)
+++ XoopsModules/publisher/trunk/publisher/templates/publisher_display_summary.html 2013-10-22 21:51:58 UTC (rev 12193)
@@ -1,60 +1,90 @@
<{include file='db:publisher_header.html'}>
-<!-- if we are on the index page OR inside a category that has subcats OR (inside a category with no subcats AND $display_category_summary is set to TRUE), let's display the summary table ! //--><{if $indexpage || $category.subcats || ($category && $display_category_summary)}>
+<!-- if we are on the index page OR inside a category that has subcats OR
+ (inside a category with no subcats AND $display_category_summary is set to TRUE),
+ let's display the summary table ! //-->
-<!-- let's begin the display of the other display type --> <{if $collapsable_heading == 1}>
-<div class="publisher_collaps_title">
- <a href='javascript:;' onclick="toggle('toptable'); toggleIcon('toptableicon')"><img id='toptableicon' src='<{$publisher_url}>/images/links/close12.gif' alt=''/></a> <{$lang_category_summary}>
-</div>
-<div id='toptable'>
- <span class="publisher_collaps_info""><{$lang_category_summary}></span> <!-- Content under the collapsable bar //--> <{/if}>
+<{if $indexpage || $category.subcats || ($category && $display_category_summary)}>
- <{include file='db:publisher_categories_table.html'}>
+ <!-- let's begin the display of the other display type -->
+ <{if $collapsable_heading == 1}>
+ <div class="publisher_collaps_title">
+ <a href='javascript:;' onclick="toggle('toptable'); toggleIcon('toptableicon')">
+ <img id='toptableicon' src='<{$publisher_url}>/images/links/close12.gif' alt=''/>
+ </a> <{$lang_category_summary}>
+ </div>
+ <div id='toptable'>
+ <span class="publisher_collaps_info">
+ <{$lang_category_summary}>
+ </span>
+ <!-- Content under the collapsable bar //-->
+ <{/if}>
+
+ <{include file='db:publisher_categories_table.html'}>
+
+ <{if $collapsable_heading == 1}>
+ </div>
+ <{/if}>
+ <br/>
+<!-- End of if !$category || $category.subcats || ($category && $display_category_summary) //-->
+<{/if}>
+<{if $items}>
+ <{if $collapsable_heading == 1}>
+ <div class="publisher_collaps_title">
+ <a href='javascript:;' onclick="toggle('bottomtable'); toggleIcon('bottomtableicon')";>
+ <img id='bottomtableicon' src='<{$publisher_url}>/images/links/close12.gif' alt=''/>
+ </a> <{$lang_items_title}>
+ </div>
+ <div id='bottomtable'>
+ <span class="publisher_collaps_info">
+ <{$smarty.const._MD_PUBLISHER_ITEMS_INFO}>
+ </span>
+ <{/if}>
+ <div align="right"><{$navbar}></div>
+ <table border="0" width="90%" cellspacing="1" cellpadding="3" align="center" class="outer">
+ <tr>
+ <td align="left" class="itemHead" width='60%'>
+ <strong><{$smarty.const._CO_PUBLISHER_TITLE}></strong>
+ </td>
+ <{if $display_date_col == 1}>
+ <td align="center" class="itemHead" width="30%">
+ <strong><{$smarty.const._MD_PUBLISHER_DATESUB}></strong>
+ </td>
+ <{/if}>
+ <{if $display_hits_col == 1}>
+ <td align="center" class="itemHead" width="10%">
+ <strong><{$smarty.const._MD_PUBLISHER_HITS}></strong>
+ </td>
+ <{/if}>
+ </tr>
+ <!-- Start item loop -->
+ <{foreach item=item from=$items}>
+ <tr>
+ <td class="even" align="left">
+ <strong><{$item.titlelink}></strong>
+ <{if $show_subtitle && $item.subtitle}>
+ <br />
+ <em><{$item.subtitle}></em>
+ <{/if}>
+ </td>
+ <{if $display_date_col == 1}>
+ <td class="odd" align="left">
+ <div align="center"><{$item.datesub}></div>
+ </td>
+ <{/if}>
+ <{if $display_hits_col == 1}>
+ <td class="odd" align="left">
+ <div align="center"><{$item.counter}></div>
+ </td>
+ <{/if}>
+ </tr>
+ <{/foreach}> <!-- End item loop -->
+ <tr></tr>
+ </table>
+ <div align="right"><{$navbar}></div>
+ <{if $collapsable_heading == 1}>
+ </div>
+ <{/if}><!-- end of if $items -->
+<{/if}>
- <{if $collapsable_heading == 1}>
-</div> <{/if}>
-<br/><!-- End of if !$category || $category.subcats || ($category && $display_category_summary) //--><{/if}><{if $items}> <{if $collapsable_heading == 1}>
-<div class="publisher_collaps_title">
- <a href='javascript:;' onclick="toggle('bottomtable'); toggleIcon('bottomtableicon')";><img id='bottomtableicon' src='<{$publisher_url}>/images/links/close12.gif' alt=''/></a> <{$lang_items_title}>
-</div>
-<div id='bottomtable'>
- <span class="publisher_collaps_info"><{$smarty.const._MD_PUBLISHER_ITEMS_INFO}></span> <{/if}>
- <div align="right"><{$navbar}></div>
- <table border="0" width="90%" cellspacing="1" cellpadding="3" align="center" class="outer">
- <tr>
- <td align="left" class="itemHead" width='60%'>
- <strong><{$smarty.const._CO_PUBLISHER_TITLE}></strong></td>
- <{if $display_date_col == 1}>
- <td align="center" class="itemHead" width="30%">
- <strong><{$smarty.const._MD_PUBLISHER_DATESUB}></strong></td>
- <{/if}> <{if $display_hits_col == 1}>
- <td align="center" class="itemHead" width="10%">
- <strong><{$smarty.const._MD_PUBLISHER_HITS}></strong></td>
- <{/if}>
- </tr>
- <!-- Start item loop --> <{foreach item=item from=$items}>
- <tr>
- <td class="even" align="left">
- <strong><{$item.titlelink}></strong>
- <{if $show_subtitle && $item.subtitle}>
- <br /><em><{$item.subtitle}></em>
- <{/if}>
- </td>
- <{if $display_date_col == 1}>
- <td class="odd" align="left">
- <div align="center"><{$item.datesub}></div>
- </td>
- <{/if}> <{if $display_hits_col == 1}>
- <td class="odd" align="left">
- <div align="center"><{$item.counter}></div>
- </td>
- <{/if}>
- </tr>
- <{/foreach}> <!-- End item loop -->
- <tr></tr>
- </table>
- <div align="right"><{$navbar}></div>
- <{if $collapsable_heading == 1}>
-</div> <{/if}><!-- end of if $items --> <{/if}>
-
<{include file='db:publisher_footer.html'}>
\ No newline at end of file
Modified: XoopsModules/publisher/trunk/publisher/xoops_version.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/xoops_version.php 2013-10-22 17:13:44 UTC (rev 12192)
+++ XoopsModules/publisher/trunk/publisher/xoops_version.php 2013-10-22 21:51:58 UTC (rev 12193)
@@ -23,7 +23,7 @@
xoops_load('XoopsLocal');
$modversion['name'] = _MI_PUBLISHER_MD_NAME;
-$modversion['version'] = 1.0;
+$modversion['version'] = 1.01;
$modversion['description'] = _MI_PUBLISHER_MD_DESC;
$modversion['author'] = "Trabis (www.Xuups.com)";
$modversion['credits'] = "w4z004, hsalazar, Mithrandir, fx2024, Ackbarr, Mariuss, Marco, Michiel, phppp, outch, Xvitry, Catzwolf, Shine, McDonald, trabis, Mowaffak, Bandit-x, Shiva";
@@ -53,9 +53,9 @@
$modversion['developer_website_url'] = "http://www.xuups.com";
$modversion['developer_website_name'] = "Xoops User Utilities";
$modversion['developer_email'] = "lus...@gm...";
-$modversion['status_version'] = "Final";
-$modversion['status'] = "Final";
-$modversion['date'] = "2011-12-04";
+$modversion['status_version'] = "Beta 1";
+$modversion['status'] = "Beta 1";
+$modversion['date'] = "2013-10-22";
//$modversion['warning'] = _MI_PUBLISHER_WARNING_BETA;
@@ -79,8 +79,8 @@
//about
-$modversion['release_date'] = '2013/07/18';
-$modversion['module_status'] = "Final";
+$modversion['release_date'] = '2013/10/22';
+$modversion['module_status'] = "Beta 1";
$modversion['min_php'] = '5.2.0';
$modversion['min_xoops'] = '2.5.6';
$modversion['min_db'] = array('mysql'=>'5.0.7', 'mysqli'=>'5.0.7');
|
|
From: <be...@us...> - 2014-06-22 02:42:32
|
Revision: 12629
http://sourceforge.net/p/xoops/svn/12629
Author: beckmi
Date: 2014-06-22 02:42:25 +0000 (Sun, 22 Jun 2014)
Log Message:
-----------
updated to XOOPS 2.5.7 version of jQuery UI Tabs (noo-b/mamba)
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/admin/about.php
XoopsModules/publisher/trunk/publisher/admin/admin_header.php
XoopsModules/publisher/trunk/publisher/admin/category.php
XoopsModules/publisher/trunk/publisher/admin/clone.php
XoopsModules/publisher/trunk/publisher/admin/file.php
XoopsModules/publisher/trunk/publisher/admin/import/news.php
XoopsModules/publisher/trunk/publisher/admin/import/smartsection.php
XoopsModules/publisher/trunk/publisher/admin/import/wfsection.php
XoopsModules/publisher/trunk/publisher/admin/import/xfsection.php
XoopsModules/publisher/trunk/publisher/admin/import.php
XoopsModules/publisher/trunk/publisher/admin/index.php
XoopsModules/publisher/trunk/publisher/admin/item.php
XoopsModules/publisher/trunk/publisher/admin/main.php
XoopsModules/publisher/trunk/publisher/admin/menu.php
XoopsModules/publisher/trunk/publisher/admin/mimetypes.php
XoopsModules/publisher/trunk/publisher/admin/pagewrap.php
XoopsModules/publisher/trunk/publisher/admin/permissions.php
XoopsModules/publisher/trunk/publisher/admin/preferences.php
XoopsModules/publisher/trunk/publisher/admin/pw_delete_file.php
XoopsModules/publisher/trunk/publisher/admin/pw_upload_file.php
XoopsModules/publisher/trunk/publisher/archive.php
XoopsModules/publisher/trunk/publisher/author_items.php
XoopsModules/publisher/trunk/publisher/backend.php
XoopsModules/publisher/trunk/publisher/blocks/category_items_sel.php
XoopsModules/publisher/trunk/publisher/blocks/date_to_date.php
XoopsModules/publisher/trunk/publisher/blocks/items_columns.php
XoopsModules/publisher/trunk/publisher/blocks/items_menu.php
XoopsModules/publisher/trunk/publisher/blocks/items_new.php
XoopsModules/publisher/trunk/publisher/blocks/items_random_item.php
XoopsModules/publisher/trunk/publisher/blocks/items_recent.php
XoopsModules/publisher/trunk/publisher/blocks/items_spot.php
XoopsModules/publisher/trunk/publisher/blocks/latest_files.php
XoopsModules/publisher/trunk/publisher/blocks/latest_news.php
XoopsModules/publisher/trunk/publisher/blocks/search.php
XoopsModules/publisher/trunk/publisher/category.php
XoopsModules/publisher/trunk/publisher/class/blockform.php
XoopsModules/publisher/trunk/publisher/class/category.php
XoopsModules/publisher/trunk/publisher/class/file.php
XoopsModules/publisher/trunk/publisher/class/form/category.php
XoopsModules/publisher/trunk/publisher/class/form/file.php
XoopsModules/publisher/trunk/publisher/class/form/item.php
XoopsModules/publisher/trunk/publisher/class/formdatetime.php
XoopsModules/publisher/trunk/publisher/class/groupperm.php
XoopsModules/publisher/trunk/publisher/class/highlighter.php
XoopsModules/publisher/trunk/publisher/class/item.php
XoopsModules/publisher/trunk/publisher/class/metagen.php
XoopsModules/publisher/trunk/publisher/class/mimetype.php
XoopsModules/publisher/trunk/publisher/class/permission.php
XoopsModules/publisher/trunk/publisher/class/publisher.php
XoopsModules/publisher/trunk/publisher/class/rating.php
XoopsModules/publisher/trunk/publisher/class/request.php
XoopsModules/publisher/trunk/publisher/class/session.php
XoopsModules/publisher/trunk/publisher/class/themetabform.php
XoopsModules/publisher/trunk/publisher/class/uploader.php
XoopsModules/publisher/trunk/publisher/comment_delete.php
XoopsModules/publisher/trunk/publisher/comment_edit.php
XoopsModules/publisher/trunk/publisher/comment_new.php
XoopsModules/publisher/trunk/publisher/comment_post.php
XoopsModules/publisher/trunk/publisher/comment_reply.php
XoopsModules/publisher/trunk/publisher/docs/ajaxrating.txt
XoopsModules/publisher/trunk/publisher/docs/changelog.txt
XoopsModules/publisher/trunk/publisher/docs/install.txt
XoopsModules/publisher/trunk/publisher/file.php
XoopsModules/publisher/trunk/publisher/footer.php
XoopsModules/publisher/trunk/publisher/header.php
XoopsModules/publisher/trunk/publisher/include/ajax_rating.php
XoopsModules/publisher/trunk/publisher/include/ajax_upload.php
XoopsModules/publisher/trunk/publisher/include/comment_functions.php
XoopsModules/publisher/trunk/publisher/include/common.php
XoopsModules/publisher/trunk/publisher/include/constants.php
XoopsModules/publisher/trunk/publisher/include/functions.php
XoopsModules/publisher/trunk/publisher/include/install.php
XoopsModules/publisher/trunk/publisher/include/media.textsanitizer.php
XoopsModules/publisher/trunk/publisher/include/notification.inc.php
XoopsModules/publisher/trunk/publisher/include/plugin.tag.php
XoopsModules/publisher/trunk/publisher/include/search.inc.php
XoopsModules/publisher/trunk/publisher/include/seo.inc.php
XoopsModules/publisher/trunk/publisher/include/seo_functions.php
XoopsModules/publisher/trunk/publisher/include/update.php
XoopsModules/publisher/trunk/publisher/index.php
XoopsModules/publisher/trunk/publisher/item.php
XoopsModules/publisher/trunk/publisher/language/english/admin.php
XoopsModules/publisher/trunk/publisher/language/english/blocks.php
XoopsModules/publisher/trunk/publisher/language/english/common.php
XoopsModules/publisher/trunk/publisher/language/english/main.php
XoopsModules/publisher/trunk/publisher/language/english/modinfo.php
XoopsModules/publisher/trunk/publisher/list.tag.php
XoopsModules/publisher/trunk/publisher/makepdf.php
XoopsModules/publisher/trunk/publisher/notification_update.php
XoopsModules/publisher/trunk/publisher/pop.php
XoopsModules/publisher/trunk/publisher/print.php
XoopsModules/publisher/trunk/publisher/rate.php
XoopsModules/publisher/trunk/publisher/search.php
XoopsModules/publisher/trunk/publisher/sql/mysql.sql
XoopsModules/publisher/trunk/publisher/submit.php
XoopsModules/publisher/trunk/publisher/thumb.php
XoopsModules/publisher/trunk/publisher/view.tag.php
XoopsModules/publisher/trunk/publisher/visit.php
XoopsModules/publisher/trunk/publisher/xoops_version.php
Added Paths:
-----------
XoopsModules/publisher/trunk/publisher/admin/import/ams.php
XoopsModules/publisher/trunk/publisher/admin/import/ams0.php
XoopsModules/publisher/trunk/publisher/admin/import/cjaycontent.php
XoopsModules/publisher/trunk/publisher/admin/import/xnews.php
XoopsModules/publisher/trunk/publisher/assets/
XoopsModules/publisher/trunk/publisher/assets/css/
XoopsModules/publisher/trunk/publisher/assets/css/images/
XoopsModules/publisher/trunk/publisher/assets/css/images/index.html
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_flat_75_ffffff_40x100.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_glass_55_fbf9ee_1x400.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_glass_65_ffffff_1x400.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_glass_75_dadada_1x400.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_glass_75_e6e6e6_1x400.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_glass_95_fef1ec_1x400.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-icons_222222_256x240.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-icons_2e83ff_256x240.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-icons_454545_256x240.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-icons_888888_256x240.png
XoopsModules/publisher/trunk/publisher/assets/css/images/ui-icons_cd0a0a_256x240.png
XoopsModules/publisher/trunk/publisher/assets/css/index.html
XoopsModules/publisher/trunk/publisher/assets/css/jquery.popeye.style.css
XoopsModules/publisher/trunk/publisher/assets/css/publisher.css
XoopsModules/publisher/trunk/publisher/assets/images/
XoopsModules/publisher/trunk/publisher/assets/images/VeraBd.ttf
XoopsModules/publisher/trunk/publisher/assets/images/arrow-bg.png
XoopsModules/publisher/trunk/publisher/assets/images/bg.gif
XoopsModules/publisher/trunk/publisher/assets/images/blank.png
XoopsModules/publisher/trunk/publisher/assets/images/bullet.gif
XoopsModules/publisher/trunk/publisher/assets/images/button_delete.png
XoopsModules/publisher/trunk/publisher/assets/images/button_edit.png
XoopsModules/publisher/trunk/publisher/assets/images/dot-grey.gif
XoopsModules/publisher/trunk/publisher/assets/images/gfx/
XoopsModules/publisher/trunk/publisher/assets/images/gfx/count-2.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/enlarge-1.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/enlarge-2.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/index.html
XoopsModules/publisher/trunk/publisher/assets/images/gfx/loading.gif
XoopsModules/publisher/trunk/publisher/assets/images/gfx/next-1.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/next-2.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/next.gif
XoopsModules/publisher/trunk/publisher/assets/images/gfx/prev-1.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/prev-2.png
XoopsModules/publisher/trunk/publisher/assets/images/gfx/prev.gif
XoopsModules/publisher/trunk/publisher/assets/images/grad-bg.png
XoopsModules/publisher/trunk/publisher/assets/images/icon/
XoopsModules/publisher/trunk/publisher/assets/images/icon/approve.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/cat.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/clone.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/close12.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/delete.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/delete.png
XoopsModules/publisher/trunk/publisher/assets/images/icon/doc.png
XoopsModules/publisher/trunk/publisher/assets/images/icon/edit.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/edit.png
XoopsModules/publisher/trunk/publisher/assets/images/icon/editcopy.png
XoopsModules/publisher/trunk/publisher/assets/images/icon/file.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/friend.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/index.html
XoopsModules/publisher/trunk/publisher/assets/images/icon/newanswer.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/open12.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/pdf.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/print.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon/subcat.gif
XoopsModules/publisher/trunk/publisher/assets/images/icon32/
XoopsModules/publisher/trunk/publisher/assets/images/icon32/editcopy.png
XoopsModules/publisher/trunk/publisher/assets/images/icon32/folder_txt.png
XoopsModules/publisher/trunk/publisher/assets/images/icon32/index.html
XoopsModules/publisher/trunk/publisher/assets/images/important-32.png
XoopsModules/publisher/trunk/publisher/assets/images/index.html
XoopsModules/publisher/trunk/publisher/assets/images/item_icon.gif
XoopsModules/publisher/trunk/publisher/assets/images/left_both.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/
XoopsModules/publisher/trunk/publisher/assets/images/links/approve.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/cat.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/clone.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/close12.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/delete.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/delete.png
XoopsModules/publisher/trunk/publisher/assets/images/links/doc.png
XoopsModules/publisher/trunk/publisher/assets/images/links/edit.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/edit.png
XoopsModules/publisher/trunk/publisher/assets/images/links/editcopy.png
XoopsModules/publisher/trunk/publisher/assets/images/links/file.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/friend.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/index.html
XoopsModules/publisher/trunk/publisher/assets/images/links/newanswer.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/next.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/open12.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/pdf.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/previous.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/print.gif
XoopsModules/publisher/trunk/publisher/assets/images/links/subcat.gif
XoopsModules/publisher/trunk/publisher/assets/images/loadingbar.gif
XoopsModules/publisher/trunk/publisher/assets/images/module_logo.png
XoopsModules/publisher/trunk/publisher/assets/images/no.gif
XoopsModules/publisher/trunk/publisher/assets/images/off.png
XoopsModules/publisher/trunk/publisher/assets/images/on.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/
XoopsModules/publisher/trunk/publisher/assets/images/popeye/bg1.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/compact3.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/enlarge3.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/index.html
XoopsModules/publisher/trunk/publisher/assets/images/popeye/loading3.gif
XoopsModules/publisher/trunk/publisher/assets/images/popeye/next3.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/prev3.png
XoopsModules/publisher/trunk/publisher/assets/images/right_both.gif
XoopsModules/publisher/trunk/publisher/assets/images/rss.gif
XoopsModules/publisher/trunk/publisher/assets/images/span-bg.gif
XoopsModules/publisher/trunk/publisher/assets/images/starrating.gif
XoopsModules/publisher/trunk/publisher/assets/images/transparent_bg.png
XoopsModules/publisher/trunk/publisher/assets/images/working.gif
XoopsModules/publisher/trunk/publisher/assets/index.html
XoopsModules/publisher/trunk/publisher/assets/js/
XoopsModules/publisher/trunk/publisher/assets/js/ajaxupload.3.9.js
XoopsModules/publisher/trunk/publisher/assets/js/behavior.js
XoopsModules/publisher/trunk/publisher/assets/js/cookies.js
XoopsModules/publisher/trunk/publisher/assets/js/funcs.js
XoopsModules/publisher/trunk/publisher/assets/js/index.html
XoopsModules/publisher/trunk/publisher/assets/js/jquery.easing.js
XoopsModules/publisher/trunk/publisher/assets/js/jquery.popeye-2.0.4.js
XoopsModules/publisher/trunk/publisher/assets/js/publisher.js
XoopsModules/publisher/trunk/publisher/assets/js/rating.js
XoopsModules/publisher/trunk/publisher/assets/js/script.easing.js
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_category_items_sel.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_date_to_date.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_columns.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_menu.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_new.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_random_item.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_recent.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_spot.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_latest_files.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_latest_news.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_search_block.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_addfile.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_archive.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_author_items.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_categories_table.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_display_full.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_display_list.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_display_summary.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_display_wfsection.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_footer.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_header.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_item.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_print.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_rss.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_search.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_singleitem.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_singleitem_block.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_submit.tpl
XoopsModules/publisher/trunk/publisher/tests/
XoopsModules/publisher/trunk/publisher/tests/index.html
Removed Paths:
-------------
XoopsModules/publisher/trunk/publisher/css/
XoopsModules/publisher/trunk/publisher/images/
XoopsModules/publisher/trunk/publisher/js/
XoopsModules/publisher/trunk/publisher/tcpdf/
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_category_items_sel.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_date_to_date.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_columns.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_menu.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_new.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_random_item.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_recent.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_spot.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_latest_files.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_latest_news.html
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_search_block.html
XoopsModules/publisher/trunk/publisher/templates/publisher_addfile.html
XoopsModules/publisher/trunk/publisher/templates/publisher_archive.html
XoopsModules/publisher/trunk/publisher/templates/publisher_author_items.html
XoopsModules/publisher/trunk/publisher/templates/publisher_categories_table.html
XoopsModules/publisher/trunk/publisher/templates/publisher_display_full.html
XoopsModules/publisher/trunk/publisher/templates/publisher_display_list.html
XoopsModules/publisher/trunk/publisher/templates/publisher_display_summary.html
XoopsModules/publisher/trunk/publisher/templates/publisher_display_wfsection.html
XoopsModules/publisher/trunk/publisher/templates/publisher_footer.html
XoopsModules/publisher/trunk/publisher/templates/publisher_header.html
XoopsModules/publisher/trunk/publisher/templates/publisher_item.html
XoopsModules/publisher/trunk/publisher/templates/publisher_print.html
XoopsModules/publisher/trunk/publisher/templates/publisher_rss.html
XoopsModules/publisher/trunk/publisher/templates/publisher_search.html
XoopsModules/publisher/trunk/publisher/templates/publisher_singleitem.html
XoopsModules/publisher/trunk/publisher/templates/publisher_singleitem_block.html
XoopsModules/publisher/trunk/publisher/templates/publisher_submit.html
Modified: XoopsModules/publisher/trunk/publisher/admin/about.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/about.php 2014-06-22 02:35:42 UTC (rev 12628)
+++ XoopsModules/publisher/trunk/publisher/admin/about.php 2014-06-22 02:42:25 UTC (rev 12629)
@@ -1,32 +1,32 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-/**
- * Publisher
- *
- * @copyright The XOOPS Project (http://www.xoops.org)
- * @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/)
- * @package Publisher
- * @since 1.0
- * @author Mage, Mamba
- * @version $Id$
- */
-
-include_once dirname(__FILE__) . '/admin_header.php';
-
-xoops_cp_header();
-
-$aboutAdmin = new ModuleAdmin();
-
-echo $aboutAdmin->addNavigation('about.php');
-echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false);
-
-xoops_cp_footer();
\ No newline at end of file
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
+
+/**
+ * Publisher
+ *
+ * @copyright The XOOPS Project (http://www.xoops.org)
+ * @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/)
+ * @package Publisher
+ * @since 1.0
+ * @author Mage, Mamba
+ * @version $Id$
+ */
+
+include_once dirname(__FILE__) . '/admin_header.php';
+
+xoops_cp_header();
+
+$aboutAdmin = new ModuleAdmin();
+
+echo $aboutAdmin->addNavigation('about.php');
+echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false);
+
+xoops_cp_footer();
Modified: XoopsModules/publisher/trunk/publisher/admin/admin_header.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/admin_header.php 2014-06-22 02:35:42 UTC (rev 12628)
+++ XoopsModules/publisher/trunk/publisher/admin/admin_header.php 2014-06-22 02:42:25 UTC (rev 12629)
@@ -1,46 +1,46 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/**
- * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @package Publisher
- * @since 1.0
- * @author trabis <lus...@gm...>
- * @author The SmartFactory <www.smartfactory.ca>
- * @version $Id$
- */
-
-include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
-include_once dirname(dirname(__FILE__)) . '/include/common.php';
-include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
-
-//xoops_loadLanguage('admin', PUBLISHER_DIRNAME);
-xoops_loadLanguage('modinfo', PUBLISHER_DIRNAME);
-
-$imagearray = array(
- 'editimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_edit.png' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle' />",
- 'deleteimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_delete.png' alt='" . _AM_PUBLISHER_ICO_DELETE . "' align='middle' />",
- 'online' => "<img src='" . PUBLISHER_IMAGES_URL . "/on.png' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle' />",
- 'offline' => "<img src='" . PUBLISHER_IMAGES_URL . "/off.png' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle' />",
-);
-if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){
- include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php');
-}else{
- echo xoops_error('/Frameworks/moduleclasses/moduleadmin/ is required!!!');
-}
-/*
-$myts = MyTextSanitizer::getInstance();
-
-if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH."/class/template.php");
- $xoopsTpl = new XoopsTpl();
-} */
\ No newline at end of file
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
+ * @license http://www.fsf.org/copyleft/gpl.html GNU public license
+ * @package Publisher
+ * @since 1.0
+ * @author trabis <lus...@gm...>
+ * @author The SmartFactory <www.smartfactory.ca>
+ * @version $Id$
+ */
+
+include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
+include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
+
+//xoops_loadLanguage('admin', PUBLISHER_DIRNAME);
+xoops_loadLanguage('modinfo', PUBLISHER_DIRNAME);
+
+$imagearray = array(
+ 'editimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_edit.png' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle' />",
+ 'deleteimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_delete.png' alt='" . _AM_PUBLISHER_ICO_DELETE . "' align='middle' />",
+ 'online' => "<img src='" . PUBLISHER_IMAGES_URL . "/on.png' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle' />",
+ 'offline' => "<img src='" . PUBLISHER_IMAGES_URL . "/off.png' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle' />",
+);
+if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))) {
+ include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php');
+} else {
+ echo xoops_error('/Frameworks/moduleclasses/moduleadmin/ is required!!!');
+}
+/*
+$myts = MyTextSanitizer::getInstance();
+
+if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $xoopsTpl = new XoopsTpl();
+} */
Modified: XoopsModules/publisher/trunk/publisher/admin/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/category.php 2014-06-22 02:35:42 UTC (rev 12628)
+++ XoopsModules/publisher/trunk/publisher/admin/category.php 2014-06-22 02:42:25 UTC (rev 12629)
@@ -1,410 +1,410 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/**
- * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
- * @license http://www.fsf.org/copyleft/gpl.html GNU public license
- * @package Publisher
- * @since 1.0
- * @author trabis <lus...@gm...>
- * @author The SmartFactory <www.smartfactory.ca>
- * @version $Id$
- */
-
-include_once dirname(__FILE__) . '/admin_header.php';
-
-$op = PublisherRequest::getString('op');
-
-$op = isset($_POST['editor']) ? 'mod' : $op;
-if (isset($_POST['addcategory'])) {
- $op = 'addcategory';
-}
-
-// Where do we start ?
-$startcategory = PublisherRequest::getInt('startcategory');
-$categoryid = PublisherRequest::getInt('categoryid');
-
-switch ($op) {
-
- case "del":
- $categoryObj = $publisher->getHandler('category')->get($categoryid);
- $confirm = (isset($_POST['confirm'])) ? $_POST['confirm'] : 0;
- $name = (isset($_POST['name'])) ? $_POST['name'] : '';
- if ($confirm) {
- if (!$publisher->getHandler('category')->delete($categoryObj)) {
- redirect_header("category.php", 1, _AM_PUBLISHER_DELETE_CAT_ERROR);
- exit();
- }
- redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_COLISDELETED, $name));
- exit();
- } else {
- xoops_cp_header();
- xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->name() . "'. <br /> <br />" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE);
- xoops_cp_footer();
- }
- break;
-
- case "mod":
- //Added by fx2024
- $nb_subcats = isset($_POST['nb_subcats']) ? intval($_POST['nb_subcats']) : 0;
- $nb_subcats = $nb_subcats + (isset($_POST['nb_sub_yet']) ? intval($_POST['nb_sub_yet']) : 4);
- //end of fx2024 code
-
- publisher_cpHeader();
- publisher_editCat(true, $categoryid, $nb_subcats);
- break;
-
- case "addcategory":
- global $modify;
-
- $parentid = PublisherRe...
[truncated message content] |
|
From: <be...@us...> - 2015-05-26 09:32:39
|
Revision: 13069
http://sourceforge.net/p/xoops/svn/13069
Author: beckmi
Date: 2015-05-26 09:32:35 +0000 (Tue, 26 May 2015)
Log Message:
-----------
1.02 RC-1 for XOOPS 2.5.7.1 (see changelog.txt)
Modified Paths:
--------------
XoopsModules/publisher/trunk/publisher/admin/about.php
XoopsModules/publisher/trunk/publisher/admin/admin_header.php
XoopsModules/publisher/trunk/publisher/admin/category.php
XoopsModules/publisher/trunk/publisher/admin/clone.php
XoopsModules/publisher/trunk/publisher/admin/file.php
XoopsModules/publisher/trunk/publisher/admin/import/ams.php
XoopsModules/publisher/trunk/publisher/admin/import/cjaycontent.php
XoopsModules/publisher/trunk/publisher/admin/import/news.php
XoopsModules/publisher/trunk/publisher/admin/import/smartsection.php
XoopsModules/publisher/trunk/publisher/admin/import/wfsection.php
XoopsModules/publisher/trunk/publisher/admin/import/xfsection.php
XoopsModules/publisher/trunk/publisher/admin/import/xnews.php
XoopsModules/publisher/trunk/publisher/admin/import.php
XoopsModules/publisher/trunk/publisher/admin/index.php
XoopsModules/publisher/trunk/publisher/admin/item.php
XoopsModules/publisher/trunk/publisher/admin/main.php
XoopsModules/publisher/trunk/publisher/admin/menu.php
XoopsModules/publisher/trunk/publisher/admin/mimetypes.php
XoopsModules/publisher/trunk/publisher/admin/pagewrap.php
XoopsModules/publisher/trunk/publisher/admin/permissions.php
XoopsModules/publisher/trunk/publisher/admin/preferences.php
XoopsModules/publisher/trunk/publisher/admin/pw_delete_file.php
XoopsModules/publisher/trunk/publisher/admin/pw_upload_file.php
XoopsModules/publisher/trunk/publisher/archive.php
XoopsModules/publisher/trunk/publisher/assets/css/jquery.popeye.style.css
XoopsModules/publisher/trunk/publisher/assets/css/publisher.css
XoopsModules/publisher/trunk/publisher/assets/images/popeye/loading3.gif
XoopsModules/publisher/trunk/publisher/assets/js/behavior.js
XoopsModules/publisher/trunk/publisher/assets/js/funcs.js
XoopsModules/publisher/trunk/publisher/assets/js/rating.js
XoopsModules/publisher/trunk/publisher/assets/js/script.easing.js
XoopsModules/publisher/trunk/publisher/author_items.php
XoopsModules/publisher/trunk/publisher/backend.php
XoopsModules/publisher/trunk/publisher/blocks/category_items_sel.php
XoopsModules/publisher/trunk/publisher/blocks/date_to_date.php
XoopsModules/publisher/trunk/publisher/blocks/items_columns.php
XoopsModules/publisher/trunk/publisher/blocks/items_menu.php
XoopsModules/publisher/trunk/publisher/blocks/items_new.php
XoopsModules/publisher/trunk/publisher/blocks/items_random_item.php
XoopsModules/publisher/trunk/publisher/blocks/items_recent.php
XoopsModules/publisher/trunk/publisher/blocks/items_spot.php
XoopsModules/publisher/trunk/publisher/blocks/latest_files.php
XoopsModules/publisher/trunk/publisher/blocks/latest_news.php
XoopsModules/publisher/trunk/publisher/blocks/search.php
XoopsModules/publisher/trunk/publisher/category.php
XoopsModules/publisher/trunk/publisher/class/blockform.php
XoopsModules/publisher/trunk/publisher/class/category.php
XoopsModules/publisher/trunk/publisher/class/file.php
XoopsModules/publisher/trunk/publisher/class/form/category.php
XoopsModules/publisher/trunk/publisher/class/form/file.php
XoopsModules/publisher/trunk/publisher/class/form/item.php
XoopsModules/publisher/trunk/publisher/class/formdatetime.php
XoopsModules/publisher/trunk/publisher/class/groupperm.php
XoopsModules/publisher/trunk/publisher/class/highlighter.php
XoopsModules/publisher/trunk/publisher/class/item.php
XoopsModules/publisher/trunk/publisher/class/metagen.php
XoopsModules/publisher/trunk/publisher/class/mimetype.php
XoopsModules/publisher/trunk/publisher/class/permission.php
XoopsModules/publisher/trunk/publisher/class/publisher.php
XoopsModules/publisher/trunk/publisher/class/rating.php
XoopsModules/publisher/trunk/publisher/class/session.php
XoopsModules/publisher/trunk/publisher/class/themetabform.php
XoopsModules/publisher/trunk/publisher/class/uploader.php
XoopsModules/publisher/trunk/publisher/comment_delete.php
XoopsModules/publisher/trunk/publisher/comment_edit.php
XoopsModules/publisher/trunk/publisher/comment_new.php
XoopsModules/publisher/trunk/publisher/comment_post.php
XoopsModules/publisher/trunk/publisher/comment_reply.php
XoopsModules/publisher/trunk/publisher/docs/changelog.txt
XoopsModules/publisher/trunk/publisher/docs/readme.txt
XoopsModules/publisher/trunk/publisher/file.php
XoopsModules/publisher/trunk/publisher/footer.php
XoopsModules/publisher/trunk/publisher/header.php
XoopsModules/publisher/trunk/publisher/include/ajax_rating.php
XoopsModules/publisher/trunk/publisher/include/ajax_upload.php
XoopsModules/publisher/trunk/publisher/include/comment_functions.php
XoopsModules/publisher/trunk/publisher/include/common.php
XoopsModules/publisher/trunk/publisher/include/functions.php
XoopsModules/publisher/trunk/publisher/include/media.textsanitizer.php
XoopsModules/publisher/trunk/publisher/include/notification.inc.php
XoopsModules/publisher/trunk/publisher/include/plugin.tag.php
XoopsModules/publisher/trunk/publisher/include/search.inc.php
XoopsModules/publisher/trunk/publisher/include/seo.inc.php
XoopsModules/publisher/trunk/publisher/include/seo_functions.php
XoopsModules/publisher/trunk/publisher/index.php
XoopsModules/publisher/trunk/publisher/item.php
XoopsModules/publisher/trunk/publisher/language/english/admin.php
XoopsModules/publisher/trunk/publisher/language/english/blocks.php
XoopsModules/publisher/trunk/publisher/language/english/common.php
XoopsModules/publisher/trunk/publisher/language/english/help/help.html
XoopsModules/publisher/trunk/publisher/language/english/main.php
XoopsModules/publisher/trunk/publisher/language/english/modinfo.php
XoopsModules/publisher/trunk/publisher/list.tag.php
XoopsModules/publisher/trunk/publisher/makepdf.php
XoopsModules/publisher/trunk/publisher/notification_update.php
XoopsModules/publisher/trunk/publisher/pop.php
XoopsModules/publisher/trunk/publisher/print.php
XoopsModules/publisher/trunk/publisher/rate.php
XoopsModules/publisher/trunk/publisher/search.php
XoopsModules/publisher/trunk/publisher/submit.php
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_category_items_sel.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_columns.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_new.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_recent.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_items_spot.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_latest_news.tpl
XoopsModules/publisher/trunk/publisher/templates/blocks/publisher_search_block.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_addfile.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_archive.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_display_full.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_display_list.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_display_summary.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_display_wfsection.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_header.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_item.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_print.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_rss.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_search.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_singleitem.tpl
XoopsModules/publisher/trunk/publisher/templates/publisher_submit.tpl
XoopsModules/publisher/trunk/publisher/thumb.php
XoopsModules/publisher/trunk/publisher/view.tag.php
XoopsModules/publisher/trunk/publisher/visit.php
XoopsModules/publisher/trunk/publisher/xoops_version.php
Added Paths:
-----------
XoopsModules/publisher/trunk/publisher/admin/import/fmcontent.php
XoopsModules/publisher/trunk/publisher/assets/css/jquery.popeye.css
XoopsModules/publisher/trunk/publisher/assets/css/style.css
XoopsModules/publisher/trunk/publisher/assets/images/logo.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/compact1.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/compact2.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/compact4.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/enlarge1.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/enlarge2.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/enlarge4.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/loading1.gif
XoopsModules/publisher/trunk/publisher/assets/images/popeye/loading2.gif
XoopsModules/publisher/trunk/publisher/assets/images/popeye/next1.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/pause3.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/play3.png
XoopsModules/publisher/trunk/publisher/assets/images/popeye/prev1.png
XoopsModules/publisher/trunk/publisher/assets/js/jquery.popeye-2.1.js
XoopsModules/publisher/trunk/publisher/assets/js/jquery.popeye-2.1.min.js
XoopsModules/publisher/trunk/publisher/class/constants.php
XoopsModules/publisher/trunk/publisher/class/plugins/
XoopsModules/publisher/trunk/publisher/class/plugins/plugin.tag.php
XoopsModules/publisher/trunk/publisher/class/utilities.php
XoopsModules/publisher/trunk/publisher/config/
XoopsModules/publisher/trunk/publisher/config/index.html
XoopsModules/publisher/trunk/publisher/include/config.php
XoopsModules/publisher/trunk/publisher/include/oninstall.php
XoopsModules/publisher/trunk/publisher/include/onupdate.php
XoopsModules/publisher/trunk/publisher/tests/todo.txt
Removed Paths:
-------------
XoopsModules/publisher/trunk/publisher/admin/import/ams0.php
XoopsModules/publisher/trunk/publisher/assets/images/module_logo.png
XoopsModules/publisher/trunk/publisher/assets/js/jquery.popeye-2.0.4.js
XoopsModules/publisher/trunk/publisher/class/request.php
XoopsModules/publisher/trunk/publisher/include/constants.php
XoopsModules/publisher/trunk/publisher/include/install.php
XoopsModules/publisher/trunk/publisher/include/update.php
Modified: XoopsModules/publisher/trunk/publisher/admin/about.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/about.php 2015-05-25 21:36:01 UTC (rev 13068)
+++ XoopsModules/publisher/trunk/publisher/admin/about.php 2015-05-26 09:32:35 UTC (rev 13069)
@@ -1,14 +1,14 @@
<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
+/**
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
/**
* Publisher
*
@@ -20,7 +20,7 @@
* @version $Id$
*/
-include_once dirname(__FILE__) . '/admin_header.php';
+include_once __DIR__ . '/admin_header.php';
xoops_cp_header();
@@ -29,4 +29,11 @@
echo $aboutAdmin->addNavigation('about.php');
echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false);
+// if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
+// echo 'I am at least PHP version 5.4.0, my version: ' . PHP_VERSION . "\n";
+// } else {
+// echo 'I am using PHP lower than 5.4, my version: ' . PHP_VERSION . "\n";
+// }
+
+
xoops_cp_footer();
Modified: XoopsModules/publisher/trunk/publisher/admin/admin_header.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/admin_header.php 2015-05-25 21:36:01 UTC (rev 13068)
+++ XoopsModules/publisher/trunk/publisher/admin/admin_header.php 2015-05-26 09:32:35 UTC (rev 13069)
@@ -1,12 +1,12 @@
<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+/**
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
@@ -19,24 +19,21 @@
* @version $Id$
*/
-include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
-include_once dirname(dirname(__FILE__)) . '/include/common.php';
-include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
+include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
+include_once dirname(__DIR__) . '/include/common.php';
+include_once $GLOBALS['xoops']->path('include/cp_header.php');
//xoops_loadLanguage('admin', PUBLISHER_DIRNAME);
xoops_loadLanguage('modinfo', PUBLISHER_DIRNAME);
$imagearray = array(
- 'editimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_edit.png' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle' />",
+ 'editimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_edit.png' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle' />",
'deleteimg' => "<img src='" . PUBLISHER_IMAGES_URL . "/button_delete.png' alt='" . _AM_PUBLISHER_ICO_DELETE . "' align='middle' />",
- 'online' => "<img src='" . PUBLISHER_IMAGES_URL . "/on.png' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle' />",
- 'offline' => "<img src='" . PUBLISHER_IMAGES_URL . "/off.png' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle' />",
+ 'online' => "<img src='" . PUBLISHER_IMAGES_URL . "/on.png' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle' />",
+ 'offline' => "<img src='" . PUBLISHER_IMAGES_URL . "/off.png' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle' />",
);
-if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))) {
- include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php');
-} else {
- echo xoops_error('/Frameworks/moduleclasses/moduleadmin/ is required!!!');
-}
+include_once $GLOBALS['xoops']->path('Frameworks/moduleclasses/moduleadmin/moduleadmin.php');
+
/*
$myts = MyTextSanitizer::getInstance();
Modified: XoopsModules/publisher/trunk/publisher/admin/category.php
===================================================================
--- XoopsModules/publisher/trunk/publisher/admin/category.php 2015-05-25 21:36:01 UTC (rev 13068)
+++ XoopsModules/publisher/trunk/publisher/admin/category.php 2015-05-26 09:32:35 UTC (rev 13069)
@@ -19,32 +19,30 @@
* @version $Id$
*/
-include_once dirname(__FILE__) . '/admin_header.php';
+include_once __DIR__ . '/admin_header.php';
-$op = PublisherRequest::getString('op');
+$op = XoopsRequest::getString('op', '', 'GET');
-$op = isset($_POST['editor']) ? 'mod' : $op;
-if (isset($_POST['addcategory'])) {
- $op = 'addcategory';
-}
+$op = (XoopsRequest::getString('editor', '', 'POST')) ? 'mod' : $op;
+$op = (XoopsRequest::getString('addcategory', '', 'POST')) ? 'addcategory' : $op;
// Where do we start ?
-$startcategory = PublisherRequest::getInt('startcategory');
-$categoryid = PublisherRequest::getInt('categoryid');
+$startcategory = XoopsRequest::getInt('startcategory', 0, 'GET');
+$categoryid = XoopsRequest::getInt('categoryid');
switch ($op) {
case "del":
$categoryObj = $publisher->getHandler('category')->get($categoryid);
- $confirm = (isset($_POST['confirm'])) ? $_POST['confirm'] : 0;
- $name = (isset($_POST['name'])) ? $_POST['name'] : '';
+ $confirm = XoopsRequest::getInt('confirm', '', 'POST');
+ $name = XoopsRequest::getString('name', '', 'POST');
if ($confirm) {
if (!$publisher->getHandler('category')->delete($categoryObj)) {
redirect_header("category.php", 1, _AM_PUBLISHER_DELETE_CAT_ERROR);
- exit();
+// exit();
}
redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_COLISDELETED, $name));
- exit();
+// exit();
} else {
xoops_cp_header();
xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->name() . "'. <br /> <br />" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE);
@@ -54,18 +52,18 @@
case "mod":
//Added by fx2024
- $nb_subcats = isset($_POST['nb_subcats']) ? intval($_POST['nb_subcats']) : 0;
- $nb_subcats = $nb_subcats + (isset($_POST['nb_sub_yet']) ? intval($_POST['nb_sub_yet']) : 4);
+ $nb_subcats = XoopsRequest::getInt('nb_subcats', 0, 'POST');
+ $nb_subcats = $nb_subcats + (XoopsRequest::getInt('nb_sub_yet', 4, 'POST'));
//end of fx2024 code
- publisher_cpHeader();
- publisher_editCat(true, $categoryid, $nb_subcats);
+ publisherCpHeader();
+ PublisherUtilities::editCategory(true, $categoryid, $nb_subcats);
break;
case "addcategory":
global $modify;
- $parentid = PublisherRequest::getInt('parentid');
+ $parentid = XoopsRequest::getInt('parentid');
if ($categoryid != 0) {
$categoryObj = $publisher->getHandler('category')->get($categoryid);
@@ -75,136 +73,121 @@
// Uploading the image, if any
// Retreive the filename to be uploaded
- if (isset($_FILES['image_file']['name']) && $_FILES['image_file']['name'] != "") {
- $filename = $_POST["xoops_upload_file"][0];
- if (!empty($filename) || $filename != "") {
+ if ($image_file = XoopsRequest::getArray('image_file', '', 'FILES')['name']) {
+// $filename = XoopsRequest::getArray('xoops_upload_file', array(), 'POST')[0];
+ if ($filename = XoopsRequest::getArray('xoops_upload_file', array(), 'POST')[0]) {
// TODO : implement publisher mimetype management
- $max_size = $publisher->getConfig('maximum_filesize');
- $max_imgwidth = $publisher->getConfig('maximum_image_width');
- $max_imgheight = $publisher->getConfig('maximum_image_height');
- $allowed_mimetypes = publisher_getAllowedImagesTypes();
+ $max_size = $publisher->getConfig('maximum_filesize');
+ $max_imgwidth = $publisher->getConfig('maximum_image_width');
+ $max_imgheight = $publisher->getConfig('maximum_image_height');
+ $allowed_mimetypes = publisherGetAllowedImagesTypes();
- if ($_FILES[$filename]['tmp_name'] == "" || !is_readable($_FILES[$filename]['tmp_name'])) {
+ if (!($tmp_name = (XoopsRequest::getArray('filename', array(), 'FILES')['tmp_name'])) || !is_readable($tmp_name)) {
redirect_header('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR);
- exit();
+// exit();
}
xoops_load('XoopsMediaUploader');
- $uploader = new XoopsMediaUploader(publisher_getImageDir('category'), $allowed_mimetypes, $max_size, $max_imgwidth, $max_imgheight);
+ $uploader = new XoopsMediaUploader(publisherGetImageDir('category'), $allowed_mimetypes, $max_size, $max_imgwidth, $max_imgheight);
if ($uploader->fetchMedia($filename) && $uploader->upload()) {
$categoryObj->setVar('image', $uploader->getSavedFileName());
} else {
redirect_header('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR . $uploader->getErrors());
- exit();
+// exit();
}
}
} else {
- if (isset($_POST['image'])) {
- $categoryObj->setVar('image', $_POST['image']);
- }
+ $categoryObj->setVar('image', XoopsRequest::getString('image', '', 'POST'));
}
- $categoryObj->setVar('parentid', (isset($_POST['parentid'])) ? intval($_POST['parentid']) : 0);
+ $categoryObj->setVar('parentid', (XoopsRequest::getInt('parentid', 0, 'POST')));
- $applyall = isset($_POST['applyall']) ? intval($_POST['applyall']) : 0;
- $categoryObj->setVar('weight', isset($_POST['weight']) ? intval($_POST['weight']) : 1);
+ $applyall = XoopsRequest::getInt('applyall', 0, 'POST');
+ $categoryObj->setVar('weight', XoopsRequest::getInt('weight', 1, 'POST'));
// Groups and permissions
- $grpread = isset($_POST['groups_read']) ? $_POST['groups_read'] : array();
- $grpsubmit = isset($_POST['groups_submit']) ? $_POST['groups_submit'] : array();
- $grpmoderation = isset($_POST['groups_moderation']) ? $_POST['groups_moderation'] : array();
+ $grpread = XoopsRequest::getArray('groupsRead', array(), 'POST');
+ $grpsubmit = XoopsRequest::getArray('groupsSubmit', array(), 'POST');
+ $grpmoderation = XoopsRequest::getArray('groupsModeration', array(), 'POST');
- $categoryObj->setVar('name', $_POST['name']);
+ $categoryObj->setVar('name', XoopsRequest::getString('name', '', 'POST'));
//Added by skalpa: custom template support
- if (isset($_POST['template'])) {
- $categoryObj->setVar('template', $_POST['template']);
- }
+ $categoryObj->setVar('template', XoopsRequest::getString('template', '', 'POST'));
+ $categoryObj->setVar('meta_description', XoopsRequest::getString('meta_description', '', 'POST'));
+ $categoryObj->setVar('meta_keywords', XoopsRequest::getString('meta_keywords', '', 'POST'));
+ $categoryObj->setVar('short_url', XoopsRequest::getString('short_url', '', 'POST'));
+ $categoryObj->setVar('moderator', XoopsRequest::getInt('moderator', 0, 'POST'));
+ $categoryObj->setVar('description', XoopsRequest::getString('description', '', 'POST'));
+ $categoryObj->setVar('header', XoopsRequest::getString('header', '', 'POST'));
- if (isset($_POST['meta_description'])) {
- $categoryObj->setVar('meta_description', $_POST['meta_description']);
- }
- if (isset($_POST['meta_keywords'])) {
- $categoryObj->setVar('meta_keywords', $_POST['meta_keywords']);
- }
- if (isset($_POST['short_url'])) {
- $categoryObj->setVar('short_url', $_POST['short_url']);
- }
- $categoryObj->setVar('moderator', intval($_POST['moderator']));
- $categoryObj->setVar('description', $_POST['description']);
-
- if (isset($_POST['header'])) {
- $categoryObj->setVar('header', $_POST['header']);
- }
-
if ($categoryObj->isNew()) {
$redirect_msg = _AM_PUBLISHER_CATCREATED;
- $redirect_to = 'category.php?op=mod';
+ $redirect_to = 'category.php?op=mod';
} else {
$redirect_msg = _AM_PUBLISHER_COLMODIFIED;
- $redirect_to = 'category.php';
+ $redirect_to = 'category.php';
}
if (!$categoryObj->store()) {
- redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_CATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors()));
- exit;
+ redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_CATEGORY_SAVE_ERROR . publisherFormatErrors($categoryObj->getErrors()));
+// exit;
}
// TODO : put this function in the category class
- publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
- publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
- publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
+ publisherSaveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
+ publisherSaveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
+ publisherSaveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
//Added by fx2024
$parentCat = $categoryObj->categoryid();
- $sizeof = sizeof($_POST['scname']);
+ $sizeof = count(XoopsRequest::getString('scname', '', 'POST'));
for ($i = 0; $i < $sizeof; ++$i) {
- if ($_POST['scname'][$i] != '') {
+ if (XoopsRequest::getArray('scname', array(), 'POST')[$i] != '') {
$categoryObj = $publisher->getHandler('category')->create();
- $categoryObj->setVar('name', $_POST['scname'][$i]);
+ $categoryObj->setVar('name', XoopsRequest::getArray('scname', array(), 'POST')[$i]);
$categoryObj->setVar('parentid', $parentCat);
if (!$categoryObj->store()) {
- redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR . publisher_formatErrors($categoryObj->getErrors()));
- exit;
+ redirect_header("javascript:history.go(-1)", 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR . publisherFormatErrors($categoryObj->getErrors()));
+// exit;
}
// TODO : put this function in the category class
- publisher_saveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
- publisher_saveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
- publisher_saveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
+ publisherSaveCategoryPermissions($grpread, $categoryObj->categoryid(), 'category_read');
+ publisherSaveCategoryPermissions($grpsubmit, $categoryObj->categoryid(), 'item_submit');
+ publisherSaveCategoryPermissions($grpmoderation, $categoryObj->categoryid(), 'category_moderation');
}
}
//end of fx2024 code
redirect_header($redirect_to, 2, $redirect_msg);
- exit();
+// exit();
break;
//Added by fx2024
case "addsubcats":
$categoryid = 0;
- $nb_subcats = intval($_POST['nb_subcats']) + $_POST['nb_sub_yet'];
+ $nb_subcats = XoopsRequest::getInt('nb_subcats', 0, 'POST') + XoopsRequest::getInt('nb_sub_yet', 0, 'POST');
$categoryObj = $publisher->getHandler('category')->create();
- $categoryObj->setVar('name', $_POST['name']);
- $categoryObj->setVar('description', $_POST['description']);
- $categoryObj->setVar('weight', $_POST['weight']);
+ $categoryObj->setVar('name', XoopsRequest::getString('name', '', 'POST'));
+ $categoryObj->setVar('description', XoopsRequest::getString('description', '', 'POST'));
+ $categoryObj->setVar('weight', XoopsRequest::getInt('weight', 0, 'POST'));
if (isset($parentCat)) {
$categoryObj->setVar('parentid', $parentCat);
}
- publisher_cpHeader();
- publisher_editCat(true, $categoryid, $nb_subcats, $categoryObj);
+ publisherCpHeader();
+ PublisherUtilities::editCategory(true, $categoryid, $nb_subcats, $categoryObj);
exit();
-
break;
//end of fx2024 code
case "cancel":
redirect_header("category.php", 1, sprintf(_AM_PUBLISHER_BACK2IDX, ''));
- exit();
-
+// exit();
+ break;
case "default":
default:
- publisher_cpHeader();
+ publisherCpHeader();
//publisher_adminMenu(1, _AM_PUBLISHER_CATEGORIES);
echo "<br />\n";
@@ -216,7 +199,7 @@
// Creating the objects for top categories
$categoriesObj = $publisher->getHandler('category')->getCategories($publisher->getConfig('idxcat_perpage'), $startcategory, 0);
- publisher_openCollapsableBar('createdcategories', 'createdcategoriesicon', _AM_PUBLISHER_CATEGORIES_TITLE, _AM_PUBLISHER_CATEGORIES_DSC);
+ publisherOpenCollapsableBar('createdcategories', 'createdcategoriesicon', _AM_PUBLISHER_CATEGORIES_TITLE, _AM_PUBLISHER_CATEGORIES_DSC);
echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
echo "<tr>";
@@ -228,8 +211,9 @@
$totalCategories = $publisher->getHandler('category')->getCategoriesCount(0);
if (count($categoriesObj) > 0) {
foreach ($categoriesObj as $key => $thiscat) {
- p...
[truncated message content] |