Index: branches/5.3.x/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r15974 -r16229 --- branches/5.3.x/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 15974) +++ branches/5.3.x/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 16229) @@ -1,6 +1,6 @@ SelectParam($params, 't,template'); + + if ( !$template ) { + $mode = 'catalog'; + + // {catalog, advanced_view} + if ( isset($params['mode']) ) { + $mode = $params['mode']; + unset($params['mode']); + } + + $params['t'] = 'catalog/item_selector/item_selector_' . $mode; } - $params['t'] = 'catalog/item_selector/item_selector_'.$mode; - $params['m_cat_id'] = $this->Application->getBaseCategory(); + if ( !isset($params['m_cat_id']) ) { + $params['m_cat_id'] = $this->Application->getBaseCategory(); + } - $default_params = Array('pass' => 'all,'.$params['prefix']); - unset($params['prefix']); + $default_params = array('pass' => 'all'); - $pass_through = Array(); - if (isset($params['tabs_dependant'])) { // {yes, no} - $pass_through['td'] = $params['tabs_dependant']; + if ( isset($params['prefix']) && $params['prefix'] ) { + $default_params['pass'] .= ',' . $params['prefix']; + unset($params['prefix']); + } + + $pass_through = $this->Application->GetVar('pass_through', ''); + + if ( isset($params['pass_through']) && $params['pass_through'] ) { + $pass_through .= ',' . $params['pass_through']; + } + + $pass_through = array_filter(explode(',', $pass_through)); + + // {yes, no} + if ( isset($params['tabs_dependant']) ) { + $params['td'] = $params['tabs_dependant']; + $pass_through[] = 'td'; unset($params['tabs_dependant']); } - if (isset($params['selection_mode'])) { // {single, multi} - $pass_through['tm'] = $params['selection_mode']; + // {single, multi} + if ( isset($params['selection_mode']) ) { + $params['tm'] = $params['selection_mode']; + $pass_through[] = 'tm'; unset($params['selection_mode']); } - if (isset($params['tab_prefixes'])) { // {all, none, } - $pass_through['tp'] = $params['tab_prefixes']; + // {all, none, } + if ( isset($params['tab_prefixes']) ) { + $params['tp'] = $params['tab_prefixes']; + $pass_through[] = 'tp'; unset($params['tab_prefixes']); } - if ($pass_through) { - // add pass_through to selector url if any - $params['pass_through'] = implode(',', array_keys($pass_through)); - $params = array_merge($params, $pass_through); + if ( $pass_through ) { + // Add pass_through to selector url if any. + $params['pass_through'] = implode(',', array_unique($pass_through)); } // user can override default parameters (except pass_through of course) $params = array_merge($default_params, $params); - return $this->Application->ProcessParsedTag('m', 'T', $params); + return $this->Application->ProcessParsedTag('m', 'T', $params); } function TimeFrame($params) @@ -1193,4 +1219,4 @@ return $this->Application->ParseBlock($block_params); } - } \ No newline at end of file + }