Index: branches/5.2.x/core/kernel/db/db_tag_processor.php =================================================================== diff -u -N -r14892 -r14905 --- branches/5.2.x/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 14892) +++ branches/5.2.x/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 14905) @@ -1,6 +1,6 @@ Application->GetVar('NamesToSpecialMapping'); + $names_mapping = $this->Application->GetVar('NamesToSpecialMapping', Array ()); - if( !getArrayValue($names_mapping, $this->Prefix, $list_name) ) - { + if ( getArrayValue($names_mapping, $this->Prefix, $list_name) === false ) { $list =& $this->GetList($params); } } @@ -346,23 +345,23 @@ function &GetList($params) { $list_name = $this->SelectParam($params, 'list_name,name'); - if (!$list_name) { + if ( !$list_name ) { $list_name = $this->Application->Parser->GetParam('list_name'); } $requery = isset($params['requery']) && $params['requery']; $main_list = array_key_exists('main_list', $params) && $params['main_list']; - if ($list_name && !$requery) { - // list with "list_name" parameter - $names_mapping = $this->Application->GetVar('NamesToSpecialMapping', Array ()); + $names_mapping = $this->Application->GetVar('NamesToSpecialMapping', Array ()); - if (!array_key_exists($this->Prefix, $names_mapping)) { - // create prefix-based array to special mapping storage - $names_mapping[$this->Prefix] = Array (); - } + if ( !array_key_exists($this->Prefix, $names_mapping) ) { + // create prefix-based array to special mapping storage + $names_mapping[$this->Prefix] = Array (); + } - if (!array_key_exists($list_name, $names_mapping[$this->Prefix])) { + if ( $list_name && !$requery ) { + // list with "list_name" parameter + if ( !array_key_exists($list_name, $names_mapping[$this->Prefix]) ) { // special missing -> generate one $special = $main_list ? $this->Special : $this->BuildListSpecial($params); } @@ -376,31 +375,31 @@ $special = $main_list ? $this->Special : $this->BuildListSpecial($params); } - $prefix_special = rtrim($this->Prefix.'.'.$special, '.'); + $prefix_special = rtrim($this->Prefix . '.' . $special, '.'); $params['skip_counting'] = true; - $list =& $this->Application->recallObject( $prefix_special, $this->Prefix.'_List', $params); + $list =& $this->Application->recallObject($prefix_special, $this->Prefix . '_List', $params); /* @var $list kDBList */ - if (!array_key_exists('skip_quering', $params) || !$params['skip_quering']) { - if ($requery) { - $this->Application->HandleEvent($an_event, $prefix_special.':OnListBuild', $params); + if ( !array_key_exists('skip_quering', $params) || !$params['skip_quering'] ) { + if ( $requery ) { + $this->Application->HandleEvent($an_event, $prefix_special . ':OnListBuild', $params); } - if (array_key_exists('offset', $params)) { - $list->SetOffset( $list->GetOffset() + $params['offset'] ); // apply custom offset + if ( array_key_exists('offset', $params) ) { + $list->SetOffset($list->GetOffset() + $params['offset']); // apply custom offset } $list->Query($requery); - if (array_key_exists('offset', $params)) { - $list->SetOffset( $list->GetOffset() - $params['offset'] ); // remove custom offset + if ( array_key_exists('offset', $params) ) { + $list->SetOffset($list->GetOffset() - $params['offset']); // remove custom offset } } $this->Init($this->Prefix, $special); - if ($list_name) { + if ( $list_name ) { $names_mapping[$this->Prefix][$list_name] = $special; $this->Application->SetVar('NamesToSpecialMapping', $names_mapping); } Index: branches/5.2.x/core/kernel/globals.php =================================================================== diff -u -N -r14870 -r14905 --- branches/5.2.x/core/kernel/globals.php (.../globals.php) (revision 14870) +++ branches/5.2.x/core/kernel/globals.php (.../globals.php) (revision 14905) @@ -1,6 +1,6 @@ 2) { + if ( $ret && func_num_args() > 2 ) { for ($i = 2; $i < func_num_args(); $i++) { $cur_key = func_get_arg($i); - $ret = getArrayValue( $ret, $cur_key ); + $ret = getArrayValue($ret, $cur_key); - if ($ret === false) { + if ( $ret === false ) { break; } } Index: branches/5.2.x/core/units/visits/visits_tag_processor.php =================================================================== diff -u -N -r14628 -r14905 --- branches/5.2.x/core/units/visits/visits_tag_processor.php (.../visits_tag_processor.php) (revision 14628) +++ branches/5.2.x/core/units/visits/visits_tag_processor.php (.../visits_tag_processor.php) (revision 14905) @@ -1,6 +1,6 @@ SelectParam($params, 'list_name,name'); - if (!$list_name) { + if ( !$list_name ) { $list_name = $this->Application->Parser->GetParam('list_name'); } + $types = $this->SelectParam($params, 'types'); - $special=''; - if ($types=='myvisitororders' || $types=='myvisitors'){ + + if ( $types == 'myvisitororders' || $types == 'myvisitors' ) { $special = 'incommerce'; - $names_mapping = $this->Application->GetVar('NamesToSpecialMapping'); + $names_mapping = $this->Application->GetVar('NamesToSpecialMapping', Array ()); $names_mapping[$this->Prefix][$list_name] = $special; $this->Application->SetVar('NamesToSpecialMapping', $names_mapping); - } return parent::GetList($params); } - } \ No newline at end of file Index: branches/5.2.x/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r14893 -r14905 --- branches/5.2.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 14893) +++ branches/5.2.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 14905) @@ -1,6 +1,6 @@ getObject(); /* @var $object kDBList */ + /*if ( $this->Application->isDebugMode() ) { + $event_params = http_build_query($event->getEventParams()); + $this->Application->Debugger->appendHTML('InitList "' . $event->getPrefixSpecial() . '" (' . $event_params . ')'); + }*/ + $this->dbBuild($object, $event); if ( !$object->isMainList() && $event->getEventParam('main_list') ) { Index: branches/5.2.x/core/kernel/utility/event.php =================================================================== diff -u -N -r14732 -r14905 --- branches/5.2.x/core/kernel/utility/event.php (.../event.php) (revision 14732) +++ branches/5.2.x/core/kernel/utility/event.php (.../event.php) (revision 14905) @@ -1,6 +1,6 @@ specificParams; + } + + /** * Set's pseudo class that differs from * the one specified in $Prefix *