Index: trunk/core/kernel/processors/tag_processor.php =================================================================== diff -u -N -r2566 -r3723 --- trunk/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 2566) +++ trunk/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 3723) @@ -22,7 +22,7 @@ else { if ($this->Application->hasObject('TagsAggregator')) { - $aggregator = $this->Application->recallObject('TagsAggregator'); + $aggregator =& $this->Application->recallObject('TagsAggregator'); $tag_mapping = $aggregator->GetArrayValue($tag->Prefix, $Method); if ($tag_mapping) { @@ -57,7 +57,7 @@ else { if ($this->Application->hasObject('TagsAggregator')) { - $aggregator = $this->Application->recallObject('TagsAggregator'); + $aggregator =& $this->Application->recallObject('TagsAggregator'); $tmp = $this->Application->processPrefix($prefix); $tag_mapping = $aggregator->GetArrayValue($tmp['prefix'], $Method); if ($tag_mapping) { Index: trunk/kernel/units/translator/translator_event_handler.php =================================================================== diff -u -N -r1795 -r3723 --- trunk/kernel/units/translator/translator_event_handler.php (.../translator_event_handler.php) (revision 1795) +++ trunk/kernel/units/translator/translator_event_handler.php (.../translator_event_handler.php) (revision 3723) @@ -16,7 +16,7 @@ $obj_prefix = $this->Application->GetVar($event->getPrefixSpecial(true).'_prefix'); } - $object = $this->Application->recallObject($obj_prefix); + $object =& $this->Application->recallObject($obj_prefix); /*$items_info = $this->Application->GetVar( $obj_prefix ); if($items_info) $field_values = array_shift($items_info); @@ -45,7 +45,7 @@ $translator->SetDBField('Translation', $object->GetDBField('l'.$current_lang.'_'.$field)); - $cur_lang = $this->Application->recallObject('lang.current'); + $cur_lang =& $this->Application->recallObject('lang.current'); $cur_lang->Load($current_lang); $translator->SetDBField('Charset', $cur_lang->GetDBField('Charset')); @@ -82,7 +82,7 @@ $obj_prefix = $this->Application->GetVar($event->getPrefixSpecial(true).'_prefix'); } - $object = $this->Application->recallObject($obj_prefix); + $object =& $this->Application->recallObject($obj_prefix); $lang = $translator->GetDBField('Language'); $object->Fields['l'.$lang.'_'.$field] = Array(); Index: trunk/kernel/units/general/cat_event_handler.php =================================================================== diff -u -N -r3709 -r3723 --- trunk/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 3709) +++ trunk/kernel/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 3723) @@ -161,7 +161,7 @@ $types = $event->getEventParam('types'); $except_types = $event->getEventParam('except'); $type_clauses = Array(); - + $type_clauses['pick']['include'] = '%1$s.EditorsPick = 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1'; $type_clauses['pick']['except'] = '%1$s.EditorsPick! = 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1'; $type_clauses['pick']['having_filter'] = false; @@ -215,7 +215,7 @@ if ( $this->Conn->Query($sql) ) { $search_res_ids = $this->Conn->GetCol('SELECT ResourceId FROM '.$search_table); } - + if ($search_res_ids) { $type_clauses['search']['include'] = '%1$s.ResourceId IN ('.implode(',', $search_res_ids).') AND PrimaryCat = 1'; $type_clauses['search']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $search_res_ids).') AND PrimaryCat = 1'; @@ -226,7 +226,7 @@ } $type_clauses['search']['having_filter'] = false; } - + if (strpos($types, 'related') !== false || strpos($except_types, 'related') !== false) { $related_to = $event->getEventParam('related_to'); @@ -242,8 +242,8 @@ $rel_table = $this->Application->getUnitOption('rel', 'TableName'); $item_type = $this->Application->getUnitOption($event->Prefix, 'ItemType'); - - $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)); $p_item->Load( $this->Application->GetVar($related_prefix.'_id') ); $p_resource_id = $p_item->GetDBField('ResourceId'); @@ -257,8 +257,8 @@ (Type = 1 AND ( (SourceId = '.$p_resource_id.' AND TargetType = '.$item_type.') - OR - (TargetId = '.$p_resource_id.' AND SourceType = '.$item_type.') + OR + (TargetId = '.$p_resource_id.' AND SourceType = '.$item_type.') ) ) )'; @@ -280,10 +280,10 @@ } $type_clauses['related']['having_filter'] = false; } - + return $type_clauses; } - + /** * Apply filters to list * @@ -292,7 +292,7 @@ function SetCustomQuery(&$event) { parent::SetCustomQuery($event); - + $object =& $event->getObject(); // add category filter if needed @@ -344,7 +344,7 @@ $types = $event->getEventParam('types'); $except_types = $event->getEventParam('except'); $type_clauses = $this->getTypeClauses($event); - + // convert prepared type clauses into list filters $includes_or_filter =& $this->Application->makeClass('kMultipleFilter'); $includes_or_filter->setType(FLT_TYPE_OR); @@ -422,7 +422,7 @@ $object->addFilter('search_filter', '%1$s.`ResourceId` IN ('.implode(',',$ids).')'); break; } */ - + $object->addFilter('includes_filter', $includes_or_filter); $object->addFilter('excepts_filter', $excepts_and_filter); @@ -564,7 +564,7 @@ function OnAfterItemUpdate(&$event) { $this->CalculateHotLimit($event); - + if ( substr($event->Special, -6) == 'import') { $this->setCustomExportColumns($event); } @@ -581,7 +581,7 @@ $this->setCustomExportColumns($event); } } - + /** * Makes simple search for products * based on keywords string @@ -1315,13 +1315,13 @@ else { $this->StoreSelectedIDs($event); $selected_ids = $this->getSelectedIDs($event); - + if (implode(',', $selected_ids) == '') { // K4 fix when no ids found bad selected ids array is formed $selected_ids = false; } } - + $selected_cats_ids = $this->Application->GetVar('export_categories'); $this->Application->StoreVar($event->Prefix.'_export_ids', $selected_ids ? implode(',', $selected_ids) : '' ); @@ -1476,7 +1476,7 @@ } $available_columns = array_merge_recursive2($available_columns, $this->getCustomExportColumns($event)); - + // custom fields $fields = array_keys($object->CustomFields); foreach ($fields as $field_name) @@ -1752,16 +1752,16 @@ $parent_cat_id = $this->Application->GetVar('m_cat_id'); } } - + $recursive = isset($params['recursive']); - + $types = $this->SelectParam($params, 'types'); $except = $this->SelectParam($params, 'except'); - + if ($types.$except.$recursive == '') { return parent::BuildListSpecial($params); } - + $special = crc32($parent_cat_id.$types.$except.$recursive.$manufacturer); return $special; } Index: trunk/themes/default/common/pagetop.tpl =================================================================== diff -u -N -r3345 -r3723 --- trunk/themes/default/common/pagetop.tpl (.../pagetop.tpl) (revision 3345) +++ trunk/themes/default/common/pagetop.tpl (.../pagetop.tpl) (revision 3723) @@ -20,11 +20,11 @@ ">
">
- + - + ">
- "> + ">
Index: trunk/core/units/translator/translator_event_handler.php =================================================================== diff -u -N -r1795 -r3723 --- trunk/core/units/translator/translator_event_handler.php (.../translator_event_handler.php) (revision 1795) +++ trunk/core/units/translator/translator_event_handler.php (.../translator_event_handler.php) (revision 3723) @@ -16,7 +16,7 @@ $obj_prefix = $this->Application->GetVar($event->getPrefixSpecial(true).'_prefix'); } - $object = $this->Application->recallObject($obj_prefix); + $object =& $this->Application->recallObject($obj_prefix); /*$items_info = $this->Application->GetVar( $obj_prefix ); if($items_info) $field_values = array_shift($items_info); @@ -45,7 +45,7 @@ $translator->SetDBField('Translation', $object->GetDBField('l'.$current_lang.'_'.$field)); - $cur_lang = $this->Application->recallObject('lang.current'); + $cur_lang =& $this->Application->recallObject('lang.current'); $cur_lang->Load($current_lang); $translator->SetDBField('Charset', $cur_lang->GetDBField('Charset')); @@ -82,7 +82,7 @@ $obj_prefix = $this->Application->GetVar($event->getPrefixSpecial(true).'_prefix'); } - $object = $this->Application->recallObject($obj_prefix); + $object =& $this->Application->recallObject($obj_prefix); $lang = $translator->GetDBField('Language'); $object->Fields['l'.$lang.'_'.$field] = Array(); Index: trunk/core/units/general/cat_event_handler.php =================================================================== diff -u -N -r3709 -r3723 --- trunk/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 3709) +++ trunk/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 3723) @@ -161,7 +161,7 @@ $types = $event->getEventParam('types'); $except_types = $event->getEventParam('except'); $type_clauses = Array(); - + $type_clauses['pick']['include'] = '%1$s.EditorsPick = 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1'; $type_clauses['pick']['except'] = '%1$s.EditorsPick! = 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1'; $type_clauses['pick']['having_filter'] = false; @@ -215,7 +215,7 @@ if ( $this->Conn->Query($sql) ) { $search_res_ids = $this->Conn->GetCol('SELECT ResourceId FROM '.$search_table); } - + if ($search_res_ids) { $type_clauses['search']['include'] = '%1$s.ResourceId IN ('.implode(',', $search_res_ids).') AND PrimaryCat = 1'; $type_clauses['search']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $search_res_ids).') AND PrimaryCat = 1'; @@ -226,7 +226,7 @@ } $type_clauses['search']['having_filter'] = false; } - + if (strpos($types, 'related') !== false || strpos($except_types, 'related') !== false) { $related_to = $event->getEventParam('related_to'); @@ -242,8 +242,8 @@ $rel_table = $this->Application->getUnitOption('rel', 'TableName'); $item_type = $this->Application->getUnitOption($event->Prefix, 'ItemType'); - - $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)); $p_item->Load( $this->Application->GetVar($related_prefix.'_id') ); $p_resource_id = $p_item->GetDBField('ResourceId'); @@ -257,8 +257,8 @@ (Type = 1 AND ( (SourceId = '.$p_resource_id.' AND TargetType = '.$item_type.') - OR - (TargetId = '.$p_resource_id.' AND SourceType = '.$item_type.') + OR + (TargetId = '.$p_resource_id.' AND SourceType = '.$item_type.') ) ) )'; @@ -280,10 +280,10 @@ } $type_clauses['related']['having_filter'] = false; } - + return $type_clauses; } - + /** * Apply filters to list * @@ -292,7 +292,7 @@ function SetCustomQuery(&$event) { parent::SetCustomQuery($event); - + $object =& $event->getObject(); // add category filter if needed @@ -344,7 +344,7 @@ $types = $event->getEventParam('types'); $except_types = $event->getEventParam('except'); $type_clauses = $this->getTypeClauses($event); - + // convert prepared type clauses into list filters $includes_or_filter =& $this->Application->makeClass('kMultipleFilter'); $includes_or_filter->setType(FLT_TYPE_OR); @@ -422,7 +422,7 @@ $object->addFilter('search_filter', '%1$s.`ResourceId` IN ('.implode(',',$ids).')'); break; } */ - + $object->addFilter('includes_filter', $includes_or_filter); $object->addFilter('excepts_filter', $excepts_and_filter); @@ -564,7 +564,7 @@ function OnAfterItemUpdate(&$event) { $this->CalculateHotLimit($event); - + if ( substr($event->Special, -6) == 'import') { $this->setCustomExportColumns($event); } @@ -581,7 +581,7 @@ $this->setCustomExportColumns($event); } } - + /** * Makes simple search for products * based on keywords string @@ -1315,13 +1315,13 @@ else { $this->StoreSelectedIDs($event); $selected_ids = $this->getSelectedIDs($event); - + if (implode(',', $selected_ids) == '') { // K4 fix when no ids found bad selected ids array is formed $selected_ids = false; } } - + $selected_cats_ids = $this->Application->GetVar('export_categories'); $this->Application->StoreVar($event->Prefix.'_export_ids', $selected_ids ? implode(',', $selected_ids) : '' ); @@ -1476,7 +1476,7 @@ } $available_columns = array_merge_recursive2($available_columns, $this->getCustomExportColumns($event)); - + // custom fields $fields = array_keys($object->CustomFields); foreach ($fields as $field_name) @@ -1752,16 +1752,16 @@ $parent_cat_id = $this->Application->GetVar('m_cat_id'); } } - + $recursive = isset($params['recursive']); - + $types = $this->SelectParam($params, 'types'); $except = $this->SelectParam($params, 'except'); - + if ($types.$except.$recursive == '') { return parent::BuildListSpecial($params); } - + $special = crc32($parent_cat_id.$types.$except.$recursive.$manufacturer); return $special; } Index: trunk/kernel/units/categories/categories_tag_processor.php =================================================================== diff -u -N -r3687 -r3723 --- trunk/kernel/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 3687) +++ trunk/kernel/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 3723) @@ -90,7 +90,7 @@ function CheckModuleRoot($params) { $module_name = getArrayValue($params, 'module') ? $params['module'] : 'In-Commerce'; - $module = $this->Application->recallObject('mod.'.$module_name); + $module =& $this->Application->recallObject('mod.'.$module_name); $module_root_cat = $module->GetDBField('RootCat'); $additional_cats = $this->SelectParam($params, 'add_cats'); @@ -111,7 +111,7 @@ function CategoryPath($params) { $module_name = getArrayValue($params, 'module') ? $params['module'] : 'In-Commerce'; - $module = $this->Application->recallObject('mod.'.$module_name); + $module =& $this->Application->recallObject('mod.'.$module_name); $module_root_cat = $module->GetDBField('RootCat'); $block_params['current'] = 0; Index: trunk/kernel/units/config_general/config_general_tag_processor.php =================================================================== diff -u -N -r2487 -r3723 --- trunk/kernel/units/config_general/config_general_tag_processor.php (.../config_general_tag_processor.php) (revision 2487) +++ trunk/kernel/units/config_general/config_general_tag_processor.php (.../config_general_tag_processor.php) (revision 3723) @@ -65,7 +65,7 @@ } else { - $cat_object = $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix.'_List' ); + $cat_object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix.'_List' ); $sql = 'SELECT CategoryId, ParentId, Name FROM '.TABLE_PREFIX.'Category WHERE CategoryId='.$params['cat_id']; $res = $this->Conn->GetRow($sql); $block_params['name'] = $params['block']; Index: trunk/core/units/categories/categories_tag_processor.php =================================================================== diff -u -N -r3687 -r3723 --- trunk/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 3687) +++ trunk/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 3723) @@ -90,7 +90,7 @@ function CheckModuleRoot($params) { $module_name = getArrayValue($params, 'module') ? $params['module'] : 'In-Commerce'; - $module = $this->Application->recallObject('mod.'.$module_name); + $module =& $this->Application->recallObject('mod.'.$module_name); $module_root_cat = $module->GetDBField('RootCat'); $additional_cats = $this->SelectParam($params, 'add_cats'); @@ -111,7 +111,7 @@ function CategoryPath($params) { $module_name = getArrayValue($params, 'module') ? $params['module'] : 'In-Commerce'; - $module = $this->Application->recallObject('mod.'.$module_name); + $module =& $this->Application->recallObject('mod.'.$module_name); $module_root_cat = $module->GetDBField('RootCat'); $block_params['current'] = 0; Index: trunk/kernel/units/custom_values/custom_value_event_handler.php =================================================================== diff -u -N -r2079 -r3723 --- trunk/kernel/units/custom_values/custom_value_event_handler.php (.../custom_value_event_handler.php) (revision 2079) +++ trunk/kernel/units/custom_values/custom_value_event_handler.php (.../custom_value_event_handler.php) (revision 3723) @@ -33,8 +33,8 @@ */ function GetParentResourceId(&$event) { - $object = &$event->getObject(); - $top_object = $this->Application->RecallObject( $this->Application->GetTopmostPrefix($event->Prefix) ); + $object =& $event->getObject(); + $top_object =& $this->Application->RecallObject( $this->Application->GetTopmostPrefix($event->Prefix) ); return $top_object->GetDBField('ResourceId'); }