Index: branches/5.2.x/core/kernel/db/cat_event_handler.php =================================================================== diff -u -N -r15130 -r15137 --- branches/5.2.x/core/kernel/db/cat_event_handler.php (.../cat_event_handler.php) (revision 15130) +++ branches/5.2.x/core/kernel/db/cat_event_handler.php (.../cat_event_handler.php) (revision 15137) @@ -1,6 +1,6 @@ getPassedID($event); if ( $object->Load($id) ) { - $actions =& $this->Application->recallObject('kActions'); + $actions = $this->Application->recallObject('kActions'); /* @var $actions Params */ $actions->Set($event->getPrefixSpecial() . '_id', $object->GetID()); @@ -99,7 +99,7 @@ if ( in_array($event->Name, $this->_getMassPermissionEvents()) ) { $items = $this->_getPermissionCheckInfo($event); - $perm_helper =& $this->Application->recallObject('PermissionsHelper'); + $perm_helper = $this->Application->recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ if ( ($event->Name == 'OnSave') && array_key_exists(0, $items) ) { @@ -188,7 +188,7 @@ */ function _getPermissionCheckInfo($event) { - $perm_helper =& $this->Application->recallObject('PermissionsHelper'); + $perm_helper = $this->Application->recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ // when saving data from temp table to live table check by data from temp table @@ -227,7 +227,7 @@ { $this->Application->RemoveVar('clipboard'); - $clipboard_helper =& $this->Application->recallObject('ClipboardHelper'); + $clipboard_helper = $this->Application->recallObject('ClipboardHelper'); /* @var $clipboard_helper kClipboardHelper */ $clipboard_helper->setClipboard($event, 'copy', $this->StoreSelectedIDs($event)); @@ -244,7 +244,7 @@ protected function OnCut($event) { $this->Application->RemoveVar('clipboard'); - $clipboard_helper =& $this->Application->recallObject('ClipboardHelper'); + $clipboard_helper = $this->Application->recallObject('ClipboardHelper'); /* @var $clipboard_helper kClipboardHelper */ $clipboard_helper->setClipboard($event, 'cut', $this->StoreSelectedIDs($event)); @@ -259,7 +259,7 @@ */ function _checkPastePermission($event) { - $perm_helper =& $this->Application->recallObject('PermissionsHelper'); + $perm_helper = $this->Application->recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ $category_id = $this->Application->GetVar('m_cat_id'); @@ -292,15 +292,15 @@ } if ( $clipboard_data['copy'] ) { - $temp =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler'); + $temp = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler'); /* @var $temp kTempTablesHandler */ $this->Application->SetVar('ResetCatBeforeClone', 1); // used in "kCatDBEventHandler::OnBeforeClone" $temp->CloneItems($event->Prefix, $event->Special, $clipboard_data['copy']); } if ( $clipboard_data['cut'] ) { - $object =& $this->Application->recallObject($event->getPrefixSpecial() . '.item', $event->Prefix, Array ('skip_autoload' => true)); + $object = $this->Application->recallObject($event->getPrefixSpecial() . '.item', $event->Prefix, Array ('skip_autoload' => true)); /* @var $object kCatDBItem */ foreach ($clipboard_data['cut'] as $id) { @@ -332,12 +332,12 @@ $recycle_bin = $this->Application->ConfigValue('RecycleBinFolder'); if ( $recycle_bin ) { - $rb =& $this->Application->recallObject('c.recycle', null, array ('skip_autoload' => true)); + $rb = $this->Application->recallObject('c.recycle', null, array ('skip_autoload' => true)); /* @var $rb CategoriesItem */ $rb->Load($recycle_bin); - $object =& $this->Application->recallObject($event->Prefix . '.recycleitem', null, Array ('skip_autoload' => true)); + $object = $this->Application->recallObject($event->Prefix . '.recycleitem', null, Array ('skip_autoload' => true)); /* @var $object kCatDBItem */ foreach ($ids as $id) { @@ -354,7 +354,7 @@ $ids = $to_delete; } - $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler'); + $temp_handler = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler'); /* @var $temp_handler kTempTablesHandler */ $event->setEventParam('ids', $ids); @@ -486,7 +486,7 @@ $processed_prefix = $this->Application->processPrefix($prefix_special); if ($processed_prefix['prefix'] == $related_prefix) { // printing related categories within list of items (not on details page) - $list =& $this->Application->recallObject($prefix_special); + $list = $this->Application->recallObject($prefix_special); /* @var $list kDBList */ $id = $list->GetID(); @@ -503,7 +503,7 @@ } } - $p_item =& $this->Application->recallObject($related_prefix.'.current', null, Array('skip_autoload' => true)); + $p_item = $this->Application->recallObject($related_prefix.'.current', null, Array('skip_autoload' => true)); /* @var $p_item kCatDBItem */ $p_item->Load( (int)$id ); @@ -657,7 +657,7 @@ } else { // for any real user itemlist view permission is checked instead of CATEGORY.VIEW - $count_helper =& $this->Application->recallObject('CountHelper'); + $count_helper = $this->Application->recallObject('CountHelper'); /* @var $count_helper kCountHelper */ list ($view_perm, $view_filter) = $count_helper->GetPermissionClause($event->Prefix, 'perm'); @@ -673,7 +673,7 @@ $except_types = $event->getEventParam('except'); $type_clauses = $this->getTypeClauses($event); - $search_helper =& $this->Application->recallObject('SearchHelper'); + $search_helper = $this->Application->recallObject('SearchHelper'); /* @var $search_helper kSearchHelper */ $search_helper->SetComplexFilter($event, $type_clauses, $types, $except_types); @@ -753,7 +753,7 @@ $object->addCalculatedField('CachedNavbar', 'l' . $this->Application->GetVar('m_lang') . '_CachedNavbar'); if ( $event->Special == 'export' || $event->Special == 'import' ) { - $export_helper =& $this->Application->recallObject('CatItemExportHelper'); + $export_helper = $this->Application->recallObject('CatItemExportHelper'); /* @var $export_helper kCatDBItemExportHelper */ $export_helper->prepareExportColumns($event); @@ -936,13 +936,13 @@ if ( !$this->Application->isAdmin ) { // linking existing images for item with virtual fields - $image_helper =& $this->Application->recallObject('ImageHelper'); + $image_helper = $this->Application->recallObject('ImageHelper'); /* @var $image_helper ImageHelper */ $image_helper->LoadItemImages($object); // linking existing files for item with virtual fields - $file_helper =& $this->Application->recallObject('FileHelper'); + $file_helper = $this->Application->recallObject('FileHelper'); /* @var $file_helper FileHelper */ $file_helper->LoadItemFiles($object); @@ -976,13 +976,13 @@ /* @var $object kCatDBItem */ if ( !$this->Application->isAdmin ) { - $image_helper =& $this->Application->recallObject('ImageHelper'); + $image_helper = $this->Application->recallObject('ImageHelper'); /* @var $image_helper ImageHelper */ // process image upload in virtual fields $image_helper->SaveItemImages($object); - $file_helper =& $this->Application->recallObject('FileHelper'); + $file_helper = $this->Application->recallObject('FileHelper'); /* @var $file_helper FileHelper */ // process file upload in virtual fields @@ -1036,13 +1036,13 @@ $object->assignPrimaryCategory(); if ( !$this->Application->isAdmin ) { - $image_helper =& $this->Application->recallObject('ImageHelper'); + $image_helper = $this->Application->recallObject('ImageHelper'); /* @var $image_helper ImageHelper */ // process image upload in virtual fields $image_helper->SaveItemImages($object); - $file_helper =& $this->Application->recallObject('FileHelper'); + $file_helper = $this->Application->recallObject('FileHelper'); /* @var $file_helper FileHelper */ // process file upload in virtual fields @@ -1092,7 +1092,7 @@ $keywords = kUtil::unhtmlentities( trim($this->Application->GetVar('keywords')) ); - $query_object =& $this->Application->recallObject('HTTPQuery'); + $query_object = $this->Application->recallObject('HTTPQuery'); /* @var $query_object kHTTPQuery */ $sql = 'SHOW TABLES LIKE "'.$search_table.'"'; @@ -1223,7 +1223,7 @@ } // keyword string processing - $search_helper =& $this->Application->recallObject('SearchHelper'); + $search_helper = $this->Application->recallObject('SearchHelper'); /* @var $search_helper kSearchHelper */ $where_clause = Array (); @@ -1386,7 +1386,7 @@ */ function OnAdvancedSearch($event) { - $query_object =& $this->Application->recallObject('HTTPQuery'); + $query_object = $this->Application->recallObject('HTTPQuery'); /* @var $query_object kHTTPQuery */ if ( !isset($query_object->Post['andor']) ) { @@ -1901,7 +1901,7 @@ $this->Application->StoreVar($event->Prefix . '_export_ids', $selected_ids ? implode(',', $selected_ids) : ''); $this->Application->StoreVar($event->Prefix . '_export_cats_ids', $selected_cats_ids); - $export_helper =& $this->Application->recallObject('CatItemExportHelper'); + $export_helper = $this->Application->recallObject('CatItemExportHelper'); /* @var $export_helper kCatDBItemExportHelper */ $redirect_params = Array ( @@ -1919,7 +1919,7 @@ */ function OnExportProgress($event) { - $export_object =& $this->Application->recallObject('CatItemExportHelper'); + $export_object = $this->Application->recallObject('CatItemExportHelper'); /* @var $export_object kCatDBItemExportHelper */ $event = new kEvent($event->getPrefixSpecial().':OnDummy'); @@ -1996,7 +1996,7 @@ $image_data = $object->getPrimaryImageData(); - $image =& $this->Application->recallObject('img', null, Array ('skip_autoload' => true)); + $image = $this->Application->recallObject('img', null, Array ('skip_autoload' => true)); /* @var $image kDBItem */ if ( $image_data ) { @@ -2059,7 +2059,7 @@ parent::OnNew($event); if ( $event->Special == 'import' || $event->Special == 'export' ) { - $export_helper =& $this->Application->recallObject('CatItemExportHelper'); + $export_helper = $this->Application->recallObject('CatItemExportHelper'); /* @var $export_helper kCatDBItemExportHelper */ $export_helper->setRequiredFields($event); @@ -2202,15 +2202,15 @@ return ; } - $perm_helper =& $this->Application->recallObject('PermissionsHelper'); + $perm_helper = $this->Application->recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ $owner_field = $this->getOwnerField($event->Prefix); if ( $perm_helper->ModifyCheckPermission($object->GetDBField($owner_field), $object->GetDBField('CategoryId'), $event->Prefix) == 2 ) { // 1. clone original item - $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler'); + $temp_handler = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler'); /* @var $temp_handler kTempTablesHandler */ $cloned_ids = $temp_handler->CloneItems($event->Prefix, $event->Special, Array ($object->GetID()), null, null, null, true); @@ -2363,7 +2363,7 @@ $object =& $event->getObject(); /* @var $object kCatDBItem */ - $perm_helper =& $this->Application->recallObject('PermissionsHelper'); + $perm_helper = $this->Application->recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ $primary_category = $object->GetDBField('CategoryId') > 0 ? $object->GetDBField('CategoryId') : $this->Application->GetVar('m_cat_id'); @@ -2470,15 +2470,15 @@ $items_info = $this->Application->GetVar($event->getPrefixSpecial(true)); if ($items_info) { - $perm_helper =& $this->Application->recallObject('PermissionsHelper'); + $perm_helper = $this->Application->recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ - $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); + $temp_handler = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); /* @var $temp_handler kTempTablesHandler */ $owner_field = $this->getOwnerField($event->Prefix); - $file_helper =& $this->Application->recallObject('FileHelper'); + $file_helper = $this->Application->recallObject('FileHelper'); /* @var $file_helper FileHelper */ foreach ($items_info as $id => $field_values) { @@ -2744,7 +2744,7 @@ } if ( !$this->Application->isAdmin ) { - $file_helper =& $this->Application->recallObject('FileHelper'); + $file_helper = $this->Application->recallObject('FileHelper'); /* @var $file_helper FileHelper */ $file_helper->createItemFiles($event->Prefix, true); // create image fields @@ -2764,7 +2764,7 @@ $this->Application->setUnitOption($this->Prefix, 'Grids', $grids); // add options for CategoryId field (quick way to select item's primary category) - $category_helper =& $this->Application->recallObject('CategoryHelper'); + $category_helper = $this->Application->recallObject('CategoryHelper'); /* @var $category_helper CategoryHelper */ $virtual_fields = $this->Application->getUnitOption($event->Prefix, 'VirtualFields'); @@ -2825,7 +2825,7 @@ return ; } - $file_helper =& $this->Application->recallObject('FileHelper'); + $file_helper = $this->Application->recallObject('FileHelper'); /* @var $file_helper FileHelper */ $filename = $object->GetField($field, 'full_path'); @@ -2846,7 +2846,7 @@ return ; } - $rating_helper =& $this->Application->recallObject('RatingHelper'); + $rating_helper = $this->Application->recallObject('RatingHelper'); /* @var $rating_helper RatingHelper */ $object =& $event->getObject( Array ('skip_autoload' => true) ); @@ -2876,7 +2876,7 @@ return; } - $spam_helper =& $this->Application->recallObject('SpamHelper'); + $spam_helper = $this->Application->recallObject('SpamHelper'); /* @var $spam_helper SpamHelper */ $spam_helper->InitHelper($review_id, 'ReviewHelpful', strtotime('+1 month') - strtotime('now'));