Index: branches/5.2.x/core/units/categories/categories_event_handler.php =================================================================== diff -u -N -r15130 -r15137 --- branches/5.2.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 15130) +++ branches/5.2.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 15137) @@ -1,6 +1,6 @@ Name == 'OnResetCMSMenuCache' ) { // events from "Tools -> System Tools" section are controlled via that section "edit" permission - $perm_helper =& $this->Application->recallObject('PermissionsHelper'); + $perm_helper = $this->Application->recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ $perm_value = $this->Application->CheckPermission('in-portal:service.edit'); @@ -95,7 +95,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) ) { @@ -125,7 +125,7 @@ } if ( $event->Name == 'OnRecalculatePriorities' ) { - $perm_helper =& $this->Application->recallObject('PermissionsHelper'); + $perm_helper = $this->Application->recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ $category_id = $this->Application->GetVar('m_cat_id'); @@ -390,7 +390,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(); @@ -407,7 +407,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 ); @@ -549,7 +549,7 @@ $type_clauses['search']['having_filter'] = false; } - $search_helper =& $this->Application->recallObject('SearchHelper'); + $search_helper = $this->Application->recallObject('SearchHelper'); /* @var $search_helper kSearchHelper */ $search_helper->SetComplexFilter($event, $type_clauses, implode(',', $types), implode(',', $except_types)); @@ -562,7 +562,7 @@ */ function _getCurrentThemeId() { - $themes_helper =& $this->Application->recallObject('ThemesHelper'); + $themes_helper = $this->Application->recallObject('ThemesHelper'); /* @var $themes_helper kThemesHelper */ return (int)$themes_helper->getCurrentThemeId(); @@ -635,13 +635,13 @@ if ($page_id === false && EDITING_MODE) { // create missing pages, when in editing mode - $object =& $this->Application->recallObject($this->Prefix . '.rebuild', null, Array('skip_autoload' => true)); + $object = $this->Application->recallObject($this->Prefix . '.rebuild', null, Array('skip_autoload' => true)); /* @var $object CategoriesItem */ $created = $this->_prepareAutoPage($object, $template, null, SMS_MODE_AUTO); // create virtual (not system!) page if ($created) { if ($this->Application->ConfigValue('QuickCategoryPermissionRebuild') || !$this->Application->isAdmin) { - $updater =& $this->Application->makeClass('kPermCacheUpdater'); + $updater = $this->Application->makeClass('kPermCacheUpdater'); /* @var $updater kPermCacheUpdater */ $updater->OneStepRun(); @@ -711,7 +711,7 @@ { parent::OnAfterCopyToLive($event); - $object =& $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true, 'live_table' => true)); + $object = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true, 'live_table' => true)); /* @var $object CategoriesItem */ $parent_path = false; @@ -730,7 +730,7 @@ } if ( $parent_path ) { - $cache_updater =& $this->Application->makeClass('kPermCacheUpdater', Array (null, $parent_path)); + $cache_updater = $this->Application->makeClass('kPermCacheUpdater', Array (null, $parent_path)); /* @var $cache_updater kPermCacheUpdater */ $cache_updater->OneStepRun(); @@ -766,7 +766,7 @@ } // existing category was edited, check if in-cache fields are modified - $live_object =& $this->Application->recallObject($event->Prefix . '.-item', null, Array ('live_table' => true, 'skip_autoload' => true)); + $live_object = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('live_table' => true, 'skip_autoload' => true)); /* @var $live_object CategoriesItem */ $live_object->Load($id); @@ -883,7 +883,7 @@ $filename_changes = $this->Application->GetVar($event->Prefix . '_filename_changes', Array ()); if ( $filename_changes ) { - $opener_stack =& $this->Application->makeClass('kOpenerStack'); + $opener_stack = $this->Application->makeClass('kOpenerStack'); /* @var $opener_stack kOpenerStack */ list ($template, $params, $index_file) = $opener_stack->pop(); @@ -1046,7 +1046,7 @@ $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); @@ -1076,7 +1076,7 @@ $ids = $event->getEventParam('ids'); if ( $ids ) { - $recursive_helper =& $this->Application->recallObject('RecursiveHelper'); + $recursive_helper = $this->Application->recallObject('RecursiveHelper'); /* @var $recursive_helper kRecursiveHelper */ foreach ($ids as $id) { @@ -1098,7 +1098,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)); @@ -1114,7 +1114,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, 'cut', $this->StoreSelectedIDs($event)); @@ -1145,7 +1145,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'); @@ -1189,7 +1189,7 @@ $source_category_id = $this->Conn->GetOne($sql); } - $recursive_helper =& $this->Application->recallObject('RecursiveHelper'); + $recursive_helper = $this->Application->recallObject('RecursiveHelper'); /* @var $recursive_helper kRecursiveHelper */ if ( $clipboard_data['cut'] ) { @@ -1213,7 +1213,7 @@ } } - $priority_helper =& $this->Application->recallObject('PriorityHelper'); + $priority_helper = $this->Application->recallObject('PriorityHelper'); /* @var $priority_helper kPriorityHelper */ if ( $clipboard_data['cut'] ) { @@ -1247,7 +1247,7 @@ protected function _ensurePermCacheRebuild($event) { if ( $this->Application->ConfigValue('QuickCategoryPermissionRebuild') ) { - $updater =& $this->Application->makeClass('kPermCacheUpdater'); + $updater = $this->Application->makeClass('kPermCacheUpdater'); /* @var $updater kPermCacheUpdater */ $updater->OneStepRun(); @@ -1281,7 +1281,7 @@ $ids_sql = 'SELECT '.$id_field.' FROM '.$table.' WHERE ResourceId IN (%s)'; $resource_ids_sql = 'SELECT ItemResourceId FROM '.TABLE_PREFIX.'CategoryItems WHERE CategoryId = %s AND PrimaryCat = 1'; - $object =& $this->Application->recallObject($event->Prefix.'.item', $event->Prefix, Array('skip_autoload' => true)); + $object = $this->Application->recallObject($event->Prefix.'.item', $event->Prefix, Array('skip_autoload' => true)); foreach($cat_ids as $source_cat => $dest_cat) { @@ -1291,7 +1291,7 @@ $this->Application->SetVar('m_cat_id', $dest_cat); $item_ids = $this->Conn->GetCol( sprintf($ids_sql, implode(',', $item_resource_ids) ) ); - $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); + $temp = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); if($item_ids) $temp->CloneItems($event->Prefix, $event->Special, $item_ids); } @@ -1335,7 +1335,7 @@ return ; } - $perm_helper =& $this->Application->recallObject('PermissionsHelper'); + $perm_helper = $this->Application->recallObject('PermissionsHelper'); /* @var $perm_helper kPermissionsHelper */ $new_status = false; @@ -1418,7 +1418,7 @@ $object =& $event->getObject(); /* @var $object kDBItem */ - $cache_updater =& $this->Application->makeClass('kPermCacheUpdater', Array (null, $object->GetDBField('ParentPath'))); + $cache_updater = $this->Application->makeClass('kPermCacheUpdater', Array (null, $object->GetDBField('ParentPath'))); /* @var $cache_updater kPermCacheUpdater */ $cache_updater->OneStepRun(); @@ -1602,7 +1602,7 @@ $t = $this->Application->GetVar('t'); } - $page =& $this->Application->recallObject($this->Prefix . '.-virtual', null, Array ('page' => $t)); + $page = $this->Application->recallObject($this->Prefix . '.-virtual', null, Array ('page' => $t)); /* @var $page CategoriesItem */ if ( $page->isLoaded() ) { @@ -1617,7 +1617,7 @@ $not_found = $this->Application->ConfigValue('ErrorTemplate'); $real_t = $not_found ? $not_found : 'error_notfound'; - $themes_helper =& $this->Application->recallObject('ThemesHelper'); + $themes_helper = $this->Application->recallObject('ThemesHelper'); /* @var $themes_helper kThemesHelper */ $theme_id = $this->Application->GetVar('m_theme'); @@ -1628,7 +1628,7 @@ } // replace alias in form #alias_name# to actual template used in this theme - $theme =& $this->Application->recallObject('theme.current'); + $theme = $this->Application->recallObject('theme.current'); /* @var $theme kDBItem */ $template = $theme->GetField('TemplateAliases', $real_t); @@ -1648,7 +1648,7 @@ /*function SetCatByTemplate() { $t = $this->Application->GetVar('t'); - $page =& $this->Application->recallObject($this->Prefix . '.-virtual'); + $page = $this->Application->recallObject($this->Prefix . '.-virtual'); if ($page->isLoaded()) { $this->Application->SetVar('m_cat_id', $page->GetDBField('CategoryId') ); @@ -1745,7 +1745,7 @@ { $value = $object->GetField($field, 'no_default'); // current value of target field - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); + $ml_formatter = $this->Application->recallObject('kMultiLanguage'); /* @var $ml_formatter kMultiLanguage */ $src_field = $ml_formatter->LangFieldName('Name'); @@ -1887,12 +1887,12 @@ $backup_category_id = $this->Application->GetVar('m_cat_id'); - $object =& $this->Application->recallObject($this->Prefix . '.rebuild-path', null, Array ('skip_autoload' => true)); + $object = $this->Application->recallObject($this->Prefix . '.rebuild-path', null, Array ('skip_autoload' => true)); /* @var $object CategoriesItem */ $parent_id = $base_category; - $filenames_helper =& $this->Application->recallObject('FilenamesHelper'); + $filenames_helper = $this->Application->recallObject('FilenamesHelper'); /* @var $filenames_helper kFilenamesHelper */ $safe_category_path = array_map(Array (&$filenames_helper, 'replaceSequences'), $category_path); @@ -2010,7 +2010,7 @@ return ; } - $site_config_helper =& $this->Application->recallObject('SiteConfigHelper'); + $site_config_helper = $this->Application->recallObject('SiteConfigHelper'); /* @var $site_config_helper SiteConfigHelper */ $settings = $site_config_helper->getSettings(); @@ -2033,7 +2033,7 @@ $this->Application->setUnitOption($event->Prefix, 'SectionAdjustments', $section_adjustments); // prepare structure dropdown - $category_helper =& $this->Application->recallObject('CategoryHelper'); + $category_helper = $this->Application->recallObject('CategoryHelper'); /* @var $category_helper CategoryHelper */ $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); @@ -2178,7 +2178,7 @@ set_time_limit(0); ini_set('memory_limit', -1); - $dummy =& $this->Application->recallObject($event->Prefix . '.rebuild', null, Array ('skip_autoload' => true)); + $dummy = $this->Application->recallObject($event->Prefix . '.rebuild', null, Array ('skip_autoload' => true)); /* @var $dummy CategoriesItem */ $error_count = 0; @@ -2190,7 +2190,7 @@ } if ($this->Application->ConfigValue('QuickCategoryPermissionRebuild')) { - $updater =& $this->Application->makeClass('kPermCacheUpdater'); + $updater = $this->Application->makeClass('kPermCacheUpdater'); /* @var $updater kPermCacheUpdater */ $updater->OneStepRun(); @@ -2246,7 +2246,7 @@ $event->status = kEvent::erSTOP; $string = kUtil::unhtmlentities($this->Application->GetVar('preview_content')); - $category_helper =& $this->Application->recallObject('CategoryHelper'); + $category_helper = $this->Application->recallObject('CategoryHelper'); /* @var $category_helper CategoryHelper */ $string = $category_helper->replacePageIds($string); @@ -2267,7 +2267,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.'"'; @@ -2399,7 +2399,7 @@ } // keyword string processing - $search_helper =& $this->Application->recallObject('SearchHelper'); + $search_helper = $this->Application->recallObject('SearchHelper'); /* @var $search_helper kSearchHelper */ $where_clause = Array (); @@ -2575,7 +2575,7 @@ } if ( $object->Load($id, null, true) ) { - $actions =& $this->Application->recallObject('kActions'); + $actions = $this->Application->recallObject('kActions'); /* @var $actions Params */ $actions->Set($event->getPrefixSpecial() . '_id', $object->GetID()); @@ -2658,7 +2658,7 @@ $ret = ''; list ($prefix) = explode('.', $prefix_special); - $rewrite_processor =& $this->Application->recallObject('kRewriteUrlProcessor'); + $rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor'); /* @var $rewrite_processor kRewriteUrlProcessor */ $processed_params = $rewrite_processor->getProcessedParams($prefix_special, $params, $keep_events); @@ -2777,7 +2777,7 @@ WHERE FriendlyURL = ' . $this->Conn->qstr(implode('/', $url_parts)); $friendly = $this->Conn->GetRow($sql); - $rewrite_processor =& $this->Application->recallObject('kRewriteUrlProcessor'); + $rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor'); /* @var $rewrite_processor kRewriteUrlProcessor */ if ($friendly) { @@ -2814,7 +2814,7 @@ $last_category_info = false; $category_path = $url_part == 'content' ? '' : 'content'; - $rewrite_processor =& $this->Application->recallObject('kRewriteUrlProcessor'); + $rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor'); /* @var $rewrite_processor kRewriteUrlProcessor */ do {