Index: trunk/core/units/general/cat_tag_processor.php =================================================================== diff -u -r8402 -r8415 --- trunk/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 8402) +++ trunk/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 8415) @@ -193,7 +193,7 @@ return $display_original && ($perm_value == 1) && $this->Application->GetVar($this->Prefix.'.original_id'); } - + /** * Checks if user have one of required permissions * @@ -208,11 +208,11 @@ $params['raise_warnings'] = 0; $object =& $this->getObject($params); /* @var $object kDBItem */ - + $params['cat_id'] = $object->isLoaded() ? $object->GetDBField('ParentPath') : $this->Application->GetVar('m_cat_id'); return $perm_helper->TagPermissionCheck($params, $this->getPrefixSpecial().'_HasPermission'); } - + /** * Creates link to current category or to module root category, when current category is home * @@ -224,14 +224,14 @@ if (!isset($params['cat_id'])) { $params['cat_id'] = $this->Application->GetVar('m_cat_id'); } - + if ($params['cat_id'] == 0) { $params['cat_id'] = $this->Application->findModule('Var', $this->Prefix, 'RootCat'); } - - return $this->Application->ProcessParsedTag('c', 'CategoryLink', $params); + + return $this->Application->ProcessParsedTag('c', 'CategoryLink', $params); } - + /** * Allows to detect if item has any additional images available * @@ -247,6 +247,20 @@ return $this->Conn->GetOne($sql) ? 1 : 0; } + /** + * Checks that item is pending + * + * @param Array $params + * @return bool + */ + function IsPending($params) + { + $object =& $this->getObject($params); + + $pending_status = Array (STATUS_PENDING, STATUS_PENDING_EDITING); + return in_array($object->GetDBField('Status'), $pending_status); + } + } ?> \ No newline at end of file