Index: branches/5.2.x/core/units/categories/categories_event_handler.php =================================================================== diff -u -N -r15108 -r15130 --- branches/5.2.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 15108) +++ branches/5.2.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 15130) @@ -1,6 +1,6 @@ Name == 'OnResetCMSMenuCache' ) { // events from "Tools -> System Tools" section are controlled via that section "edit" permission @@ -162,7 +162,7 @@ * @param kEvent $event * @return string */ - function _getPermissionCheckIDs(&$event) + function _getPermissionCheckIDs($event) { if ($event->Name == 'OnSave') { $selected_ids = implode(',', $this->getSelectedIDs($event, true)); @@ -184,7 +184,7 @@ * @param kEvent $event * @return Array */ - function _getPermissionCheckInfo(&$event) + function _getPermissionCheckInfo($event) { // when saving data from temp table to live table check by data from temp table $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); @@ -227,7 +227,7 @@ * @return void * @access protected */ - protected function OnEdit(kEvent &$event) + protected function OnEdit(kEvent $event) { $category_id = $this->Application->GetVar($event->getPrefixSpecial() . '_id'); $home_category = $this->Application->getBaseCategory(); @@ -247,7 +247,7 @@ * * @param kEvent $event */ - function OnProcessSelected(&$event) + function OnProcessSelected($event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -269,7 +269,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetCustomQuery(kEvent &$event) + protected function SetCustomQuery(kEvent $event) { parent::SetCustomQuery($event); @@ -579,7 +579,7 @@ * @return int * @access public */ - public function getPassedID(kEvent &$event) + public function getPassedID(kEvent $event) { if ( ($event->Special == 'page') || ($event->Special == '-virtual') || ($event->Prefix == 'st') ) { return $this->_getPassedStructureID($event); @@ -598,7 +598,7 @@ * @param kEvent $event * @return int */ - function _getPassedStructureID(&$event) + function _getPassedStructureID($event) { static $page_by_template = Array (); @@ -668,7 +668,7 @@ return $page_id; } - function ParentGetPassedID(&$event) + function ParentGetPassedID($event) { return parent::getPassedID($event); } @@ -681,7 +681,7 @@ * @return void * @access protected */ - protected function prepareObject(&$object, kEvent &$event) + protected function prepareObject(&$object, kEvent $event) { if ( $event->Special == '-virtual' ) { return; @@ -707,7 +707,7 @@ * @return void * @access protected */ - protected function OnAfterCopyToLive(kEvent &$event) + protected function OnAfterCopyToLive(kEvent $event) { parent::OnAfterCopyToLive($event); @@ -744,7 +744,7 @@ * @return void * @access protected */ - protected function OnBeforeDeleteFromLive(kEvent &$event) + protected function OnBeforeDeleteFromLive(kEvent $event) { parent::OnBeforeDeleteFromLive($event); @@ -800,7 +800,7 @@ * * @param kEvent $event */ - function parentOnSave(&$event) + function parentOnSave($event) { parent::OnSave($event); } @@ -812,7 +812,7 @@ * @return void * @access protected */ - protected function OnPreCreate(kEvent &$event) + protected function OnPreCreate(kEvent $event) { // 1. for permission editing of Home category $this->Application->RemoveVar('IsRootCategory_' . $this->Application->GetVar('m_wid')); @@ -841,7 +841,7 @@ * @return void * @access protected */ - protected function OnSave(kEvent &$event) + protected function OnSave(kEvent $event) { // get data from live table before it is overwritten by parent OnSave method call $ids = $this->getSelectedIDs($event, true); @@ -922,7 +922,7 @@ * @return void * @access protected */ - protected function OnPreSaveCreated(kEvent &$event) + protected function OnPreSaveCreated(kEvent $event) { $object =& $event->getObject( Array ('skip_autoload' => true) ); /* @var $object CategoriesItem */ @@ -942,7 +942,7 @@ * @return void * @access protected */ - protected function OnAfterItemDelete(kEvent &$event) + protected function OnAfterItemDelete(kEvent $event) { parent::OnAfterItemDelete($event); @@ -963,7 +963,7 @@ * @return void * @access protected */ - protected function customProcessing(kEvent &$event, $type) + protected function customProcessing(kEvent $event, $type) { if ( $event->Name == 'OnMassDelete' && $type == 'before' ) { $ids = $event->getEventParam('ids'); @@ -1034,7 +1034,7 @@ * @return void * @access protected */ - protected function OnMassDelete(kEvent &$event) + protected function OnMassDelete(kEvent $event) { if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) { $event->status = kEvent::erFAIL; @@ -1094,7 +1094,7 @@ * * @param kEvent $event */ - function OnCopy(&$event) + function OnCopy($event) { $this->Application->RemoveVar('clipboard'); @@ -1110,7 +1110,7 @@ * * @param kEvent $event */ - function OnCut(&$event) + function OnCut($event) { $this->Application->RemoveVar('clipboard'); @@ -1126,7 +1126,7 @@ * * @param kEvent $event */ - function OnPasteClipboard(&$event) + function OnPasteClipboard($event) { $clipboard = unserialize( $this->Application->RecallVar('clipboard') ); foreach ($clipboard as $prefix => $clipboard_data) { @@ -1143,7 +1143,7 @@ * @param kEvent $event * @return bool */ - function _checkPastePermission(&$event) + function _checkPastePermission($event) { $perm_helper =& $this->Application->recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ @@ -1164,7 +1164,7 @@ * @return void * @access protected */ - protected function OnPaste(&$event) + protected function OnPaste($event) { if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) || !$this->_checkPastePermission($event) ) { $event->status = kEvent::erFAIL; @@ -1244,7 +1244,7 @@ * @return void * @access protected */ - protected function _ensurePermCacheRebuild(&$event) + protected function _ensurePermCacheRebuild($event) { if ( $this->Application->ConfigValue('QuickCategoryPermissionRebuild') ) { $updater =& $this->Application->makeClass('kPermCacheUpdater'); @@ -1266,7 +1266,7 @@ * * @param kEvent $event */ - /*function OnCatPaste(&$event) + /*function OnCatPaste($event) { $inp_clipboard = $this->Application->RecallVar('ClipBoard'); $inp_clipboard = explode('-', $inp_clipboard, 2); @@ -1304,7 +1304,7 @@ * * @param kEvent $event */ - function OnClearClipboard(&$event) + function OnClearClipboard($event) { $this->Application->RemoveVar('clipboard'); } @@ -1316,7 +1316,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(kEvent &$event) + protected function OnBeforeItemCreate(kEvent $event) { parent::OnBeforeItemCreate($event); @@ -1385,7 +1385,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(kEvent &$event) + protected function OnBeforeItemUpdate(kEvent $event) { parent::OnBeforeItemUpdate($event); @@ -1406,7 +1406,7 @@ * @return void * @access protected */ - protected function OnCreate(kEvent &$event) + protected function OnCreate(kEvent $event) { parent::OnCreate($event); @@ -1444,7 +1444,7 @@ * @return int * @access protected */ - protected function getPerPage(kEvent &$event) + protected function getPerPage(kEvent $event) { if ( !$this->Application->isAdmin ) { $event->setEventParam('same_special', true); @@ -1461,7 +1461,7 @@ * @access protected * @see kDBEventHandler::OnListBuild() */ - protected function SetPagination(kEvent &$event) + protected function SetPagination(kEvent $event) { parent::SetPagination($event); @@ -1488,7 +1488,7 @@ * @return void * @access protected */ - protected function iterateItems(kEvent &$event) + protected function iterateItems(kEvent $event) { if ( $event->Name != 'OnMassApprove' && $event->Name != 'OnMassDecline' ) { parent::iterateItems($event); @@ -1544,7 +1544,7 @@ * @return bool * @access protected */ - protected function checkItemStatus(kEvent &$event) + protected function checkItemStatus(kEvent $event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -1660,7 +1660,7 @@ * * @param kEvent $event */ - function _beforeItemChange(&$event) + function _beforeItemChange($event) { $object =& $event->getObject(); /* @var $object CategoriesItem */ @@ -1767,7 +1767,7 @@ * @return void * @access protected */ - protected function OnBeforeItemDelete(kEvent &$event) + protected function OnBeforeItemDelete(kEvent $event) { parent::OnBeforeItemDelete($event); @@ -1963,7 +1963,7 @@ * * @param kEvent $event */ - function OnResetCMSMenuCache(&$event) + function OnResetCMSMenuCache($event) { if ($this->Application->GetVar('ajax') == 'yes') { $event->status = kEvent::erSTOP; @@ -2001,7 +2001,7 @@ * @return void * @access protected */ - protected function OnAfterConfigRead(kEvent &$event) + protected function OnAfterConfigRead(kEvent $event) { parent::OnAfterConfigRead($event); @@ -2103,7 +2103,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(kEvent &$event) + protected function OnAfterItemLoad(kEvent $event) { parent::OnAfterItemLoad($event); @@ -2135,7 +2135,7 @@ * @return void * @access protected */ - protected function OnAfterItemCreate(kEvent &$event) + protected function OnAfterItemCreate(kEvent $event) { parent::OnAfterItemCreate($event); @@ -2158,7 +2158,7 @@ * * @param kEvent $event */ - function OnAfterRebuildThemes(&$event) + function OnAfterRebuildThemes($event) { $sql = 'SELECT t.ThemeId, CONCAT( tf.FilePath, \'/\', tf.FileName ) AS Path, tf.FileMetaInfo FROM '.TABLE_PREFIX.'ThemeFiles AS tf @@ -2209,7 +2209,7 @@ * * @param kEvent $event */ - function OnChangePriority(&$event) + function OnChangePriority($event) { $this->Application->SetVar('priority_prefix', $event->getPrefixSpecial()); $event->CallSubEvent('priority:' . $event->Name); @@ -2223,7 +2223,7 @@ * * @param kEvent $event */ - function OnRecalculatePriorities(&$event) + function OnRecalculatePriorities($event) { if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) { $event->status = kEvent::erFAIL; @@ -2241,7 +2241,7 @@ * * @param kEvent $event */ - function OnUpdatePreviewBlock(&$event) + function OnUpdatePreviewBlock($event) { $event->status = kEvent::erSTOP; $string = kUtil::unhtmlentities($this->Application->GetVar('preview_content')); @@ -2260,7 +2260,7 @@ * * @param kEvent $event */ - function OnSimpleSearch(&$event) + function OnSimpleSearch($event) { $event->redirect = false; $search_table = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_'.TABLE_PREFIX.'Search'; @@ -2557,7 +2557,7 @@ * @return void * @access protected */ - protected function LoadItem(kEvent &$event) + protected function LoadItem(kEvent $event) { if ( $event->Special != '-virtual' ) { parent::LoadItem($event); @@ -2593,7 +2593,7 @@ * @see PriorityEventHandler * @access protected */ - protected function OnGetConstrainInfo(kEvent &$event) + protected function OnGetConstrainInfo(kEvent $event) { $constrain = ''; // for OnSave @@ -2876,7 +2876,7 @@ * @return void * @access protected */ - protected function OnAfterItemValidate(kEvent &$event) + protected function OnAfterItemValidate(kEvent $event) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -2896,7 +2896,7 @@ * @return void * @access protected */ - protected function OnBeforeClone(kEvent &$event) + protected function OnBeforeClone(kEvent $event) { parent::OnBeforeClone($event);