Index: trunk/core/kernel/db/db_tag_processor.php =================================================================== diff -u -N -r3307 -r3344 --- trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 3307) +++ trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 3344) @@ -389,11 +389,9 @@ $this->Application->SetVar($this->getPrefixSpecial().'_Page', $params['page']); } +// $http_query =& $this->Application->recallObject('HTTPQuery'); +// $get = $http_query->getRedirectParams(); $pass = Array('pass' => 'all,'.$this->getPrefixSpecial()); -// $pass = Array('pass' => 'all'); - $http_query =& $this->Application->recallObject('HTTPQuery'); - $get = $http_query->Get; - unset($get['env']); // $pass = array_merge($get, $pass); return $this->Application->HREF($t, '', $pass); Index: trunk/kernel/include/parseditem.php =================================================================== diff -u -N -r3282 -r3344 --- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 3282) +++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 3344) @@ -2087,7 +2087,8 @@ { global $objSession; - $p = $this->BasePermission.".VIEW"; + $where = ''; + $p = $this->BasePermission.'.VIEW'; $t = $this->SourceTable; if( getArrayValue($attribs,'_today') ) { Index: trunk/core/kernel/application.php =================================================================== diff -u -N -r3330 -r3344 --- trunk/core/kernel/application.php (.../application.php) (revision 3330) +++ trunk/core/kernel/application.php (.../application.php) (revision 3344) @@ -157,7 +157,7 @@ * Initializes the Application * * @access public - * @see HTTPQuery + * @see kHTTPQuery * @see Session * @see TemplatesCache * @return bool Was Init actually made now or before @@ -204,18 +204,14 @@ // Module items are recalled during url parsing & PhrasesCache is needed already there, // because it's used in their build events. That's why phrases cache initialization is - // called from httpquery in case when mod_rewrite is used + // called from kHTTPQuery in case when mod_rewrite is used if( !$this->RewriteURLs() ) { $this->Phrases = new PhrasesCache(); $this->VerifyLanguageId(); $this->Phrases->Init('phrases'); $this->VerifyThemeId(); } - - $this->SetVar('lang.current_id', $this->GetVar('m_lang') ); - $this->SetVar('theme.current_id', $this->GetVar('m_theme') ); - if( $this->GetVar('m_cat_id') === false ) $this->SetVar('m_cat_id', 0); if( !$this->RecallVar('UserGroups') ) { @@ -225,6 +221,7 @@ $this->StoreVar('UserGroups', $user_groups); } + if( $this->GetVar('m_cat_id') === false ) $this->SetVar('m_cat_id', 0); if( !$this->RecallVar('curr_iso') ) $this->StoreVar('curr_iso', $this->GetPrimaryCurrency() ); $this->SetVar('visits_id', $this->RecallVar('visit_id') ); @@ -260,6 +257,7 @@ { $this->SetVar('m_lang', $this->GetDefaultLanguageId() ); } + $this->SetVar('lang.current_id', $this->GetVar('m_lang') ); } /** @@ -280,6 +278,7 @@ { $this->SetVar('m_theme', $this->GetDefaultThemeId() ); } + $this->SetVar('theme.current_id', $this->GetVar('m_theme') ); } function GetDefaultLanguageId() @@ -342,7 +341,7 @@ $this->registerClass('Params', KERNEL_PATH.'/utility/params.php', 'kFilenamesCache'); - $this->registerClass('HTTPQuery', KERNEL_PATH.'/utility/http_query.php', 'HTTPQuery', Array('Params') ); + $this->registerClass('kHTTPQuery', KERNEL_PATH.'/utility/http_query.php', 'HTTPQuery', Array('Params') ); $this->registerClass('Session', KERNEL_PATH.'/session/session.php'); $this->registerClass('SessionStorage', KERNEL_PATH.'/session/session.php'); @@ -636,7 +635,7 @@ } /** - * Deletes HTTPQuery variable + * Deletes kHTTPQuery variable * * @param string $var * @todo think about method name Index: trunk/core/kernel/globals.php =================================================================== diff -u -N -r3216 -r3344 --- trunk/core/kernel/globals.php (.../globals.php) (revision 3216) +++ trunk/core/kernel/globals.php (.../globals.php) (revision 3344) @@ -382,4 +382,5 @@ return defined($const_name) && constant($const_name); } } + ?> \ No newline at end of file Index: trunk/kernel/units/users/users_event_handler.php =================================================================== diff -u -N -r3306 -r3344 --- trunk/kernel/units/users/users_event_handler.php (.../users_event_handler.php) (revision 3306) +++ trunk/kernel/units/users/users_event_handler.php (.../users_event_handler.php) (revision 3344) @@ -13,13 +13,8 @@ } else { - $unset_vars = Array(ENV_VAR_NAME, 'rewrite', '_mod_rw_url_', 'Action'); $http_query =& $this->Application->recallObject('HTTPQuery'); - $get = $http_query->Get; - foreach ($unset_vars as $var_name) - { - if( isset($get[$var_name]) ) unset( $get[$var_name] ); - } + $get = $http_query->getRedirectParams(); $t = $this->Application->GetVar('t'); $get['js_redirect'] = 1; Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -N -r3258 -r3344 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3258) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3344) @@ -1,6 +1,6 @@ Conn =& $this->Application->GetADODBConnection(); @@ -316,7 +316,7 @@ $this->Application->VerifyLanguageId(); $this->Application->Phrases->Init('phrases'); $this->Application->VerifyThemeId(); -// $this->Get('m_lang') ); + $this->Set('t', $this->getDefaultTemplate('') ); $this->finalizeParsing('m'); return false; @@ -366,6 +366,7 @@ $category_stack = Array(); $category_found = false; $category_path = ''; + $rets = Array(); // just in case someone has used this variable before do { $category_path = trim($category_path.'/'.$url_part, '/'); @@ -395,6 +396,10 @@ $this->Set('m_cat_id', $category_id); } } + elseif (!$category_found && getArrayValue($rets, 2)) + { + $url_part = array_shift($url_parts); + } } // match module @@ -535,7 +540,6 @@ { // env=SID:TEMPLATE:m-1-1-1-1:l0-0-0:n-0-0-0:bb-0-0-1-1-1-0 - $env_var = $this->Get(ENV_VAR_NAME); if($env_var) { @@ -673,64 +677,22 @@ } return $array; } - + /** - * Returns the hash of http params - * matching the mask with values + * Returns all $_GET array excluding system parameters, that are not allowed to be passed through generated urls * - * @param string $mask * @return Array - * @access public */ - function GetSelectedValues($mask) + function getRedirectParams() { - return $this->Application->ExtractByMask($this->Vars, $mask); - } - - /** - * Returns the sprintf'ed by format list of - * http params matching the mask and set to on - * - * @param string $mask - * @param string $format - * @return string - * @access public - */ - function GetSelectedIDs($mask, $format) - { - if ($mask == '') return; - $result = ''; - foreach ($this->GetParams() as $name => $val) + $unset_vars = Array(ENV_VAR_NAME, 'rewrite', '_mod_rw_url_', 'Action'); + $ret = $this->Get; + foreach ($unset_vars as $var_name) { - if (eregi($mask, $name, $regs) && $val == 'on') { - - $result.= sprintf($format, $regs[1]); - } + if( isset($ret[$var_name]) ) unset( $ret[$var_name] ); } - return $result; + return $ret; } - - /** - * Returns the sprintf'ed by format list of - * http params matching the mask and set to on - * - * @param string $mask - * @param string $value_mask - * @return Array - * @access public - */ - function GetSelectedIDsArray($mask, $value_mask="%s,") - { - $str = $this->GetSelectedIDs($mask, $value_mask); - $str = rtrim($str, ','); - if (!empty($str)) { - $ids = split(',', $str); - if ($ids !== false) - return $ids; - else return Array(); - } - else return Array(); - } } ?> \ No newline at end of file Index: trunk/core/units/users/users_event_handler.php =================================================================== diff -u -N -r3306 -r3344 --- trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 3306) +++ trunk/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 3344) @@ -13,13 +13,8 @@ } else { - $unset_vars = Array(ENV_VAR_NAME, 'rewrite', '_mod_rw_url_', 'Action'); $http_query =& $this->Application->recallObject('HTTPQuery'); - $get = $http_query->Get; - foreach ($unset_vars as $var_name) - { - if( isset($get[$var_name]) ) unset( $get[$var_name] ); - } + $get = $http_query->getRedirectParams(); $t = $this->Application->GetVar('t'); $get['js_redirect'] = 1; Index: trunk/kernel/parser.php =================================================================== diff -u -N -r3293 -r3344 --- trunk/kernel/parser.php (.../parser.php) (revision 3293) +++ trunk/kernel/parser.php (.../parser.php) (revision 3344) @@ -2908,19 +2908,24 @@ function m_meta_keywords($attribs = array()) { global $objCatList, $objConfig; - $catid = (int)$attribs["_catid"]; - if(!$catid) + + $keywords = ''; + $catid = (int)getArrayValue($attribs, '_catid'); + + if (!$catid) { - $catid = $objCatList->CurrentCategoryID(); + $catid = $objCatList->CurrentCategoryID(); } - if($catid) + + if ($catid) { - $c = $objCatList->GetItem($catid); - $keywords = $c->Get("MetaKeywords"); + $c = $objCatList->GetItem($catid); + $keywords = $c->Get('MetaKeywords'); } - if(!strlen($keywords)) + + if (!$keywords) { - $keywords = $objConfig->Get("Category_MetaKey"); + $keywords = $objConfig->Get('Category_MetaKey'); } return $keywords; } @@ -2933,21 +2938,24 @@ { global $objCatList, $objConfig; - $catid = (int)$attribs["_catid"]; - if(!$catid) + $description = ''; + $catid = (int)getArrayValue($attribs, '_catid'); + if (!$catid) { - $catid = $objCatList->CurrentCategoryID(); + $catid = $objCatList->CurrentCategoryID(); } - if($catid) + + if ($catid) { $c = $objCatList->GetItem($catid); - $desc = $c->Get("MetaDescription"); + $description = $c->Get('MetaDescription'); } - if(!strlen($desc)) + + if (!$description) { - $desc = $objConfig->Get("Category_MetaDesc"); + $description = $objConfig->Get('Category_MetaDesc'); } - return $desc; + return $description; } /* Index: trunk/core/units/general/main_event_handler.php =================================================================== diff -u -N -r3212 -r3344 --- trunk/core/units/general/main_event_handler.php (.../main_event_handler.php) (revision 3212) +++ trunk/core/units/general/main_event_handler.php (.../main_event_handler.php) (revision 3344) @@ -76,11 +76,14 @@ } $force_page_adding = false; - if( getArrayValue($url_params, 'reset') ) + if (getArrayValue($url_params, 'reset')) { unset($url_params['reset']); - $processed_params['m_cat_page'] = 1; - $force_page_adding = true; + if ($processed_params['m_cat_id']) + { + $processed_params['m_cat_page'] = 1; + $force_page_adding = true; + } } if( $processed_params['m_cat_page'] > 1 || $force_page_adding ) Index: trunk/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r3341 -r3344 --- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 3341) +++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 3344) @@ -742,13 +742,8 @@ } } - $unset_vars = Array(ENV_VAR_NAME, 'rewrite', '_mod_rw_url_', 'Action'); $http_query =& $this->Application->recallObject('HTTPQuery'); - $pass = $http_query->Get; - foreach ($unset_vars as $var_name) - { - if( isset($pass[$var_name]) ) unset( $pass[$var_name] ); - } + $pass = $http_query->getRedirectParams(); if ($require) { if (PROTOCOL == 'https://') { Index: trunk/core/kernel/parser/template.php =================================================================== diff -u -N -r3031 -r3344 --- trunk/core/kernel/parser/template.php (.../template.php) (revision 3031) +++ trunk/core/kernel/parser/template.php (.../template.php) (revision 3344) @@ -27,7 +27,7 @@ function GetFullPath() { - return $this->BasePath.'/'.$this->Filename.'.tpl'; + return $this->BasePath.'/'.ltrim($this->Filename, '/').'.tpl'; } function LoadTemplate($silent=0) Index: trunk/kernel/units/general/main_event_handler.php =================================================================== diff -u -N -r3212 -r3344 --- trunk/kernel/units/general/main_event_handler.php (.../main_event_handler.php) (revision 3212) +++ trunk/kernel/units/general/main_event_handler.php (.../main_event_handler.php) (revision 3344) @@ -76,11 +76,14 @@ } $force_page_adding = false; - if( getArrayValue($url_params, 'reset') ) + if (getArrayValue($url_params, 'reset')) { unset($url_params['reset']); - $processed_params['m_cat_page'] = 1; - $force_page_adding = true; + if ($processed_params['m_cat_id']) + { + $processed_params['m_cat_page'] = 1; + $force_page_adding = true; + } } if( $processed_params['m_cat_page'] > 1 || $force_page_adding ) Index: trunk/kernel/admin_templates/incs/style.css =================================================================== diff -u -N -r3333 -r3344 --- trunk/kernel/admin_templates/incs/style.css (.../style.css) (revision 3333) +++ trunk/kernel/admin_templates/incs/style.css (.../style.css) (revision 3344) @@ -433,10 +433,22 @@ font-family: Verdana, Arial, Helvetica, sans-serif; } -.order_preview_header, .order_preview_header TD, .order_print_preview_header TD { - background-color: #C9E9FE; +/* order preview & preview_print styles */ + +.order_print_defaults TD, +.order_preview_header, +.order_preview_header TD, +.order_print_preview_header TD, +.order_preview_field_name, +.order-totals-name, +.arial2r, +.orders_print_flat_table TD { font-family: Arial; font-size: 10pt; +} + +.order_preview_header, .order_preview_header TD, .order_print_preview_header TD { + background-color: #C9E9FE; font-weight: bold; } @@ -445,26 +457,18 @@ } .order_preview_field_name { - font-family: Arial; - font-size: 10pt; font-weight: bold; } -.order_preview_field_value { - font-family: Arial; - font-size: 10pt; -} -.arial2i { - font-family: Arial; - font-size: 10pt; +.order-totals-name { font-style: italic; } + .border1 { border: 1px solid #111111; } + .arial2r { - font-family: Arial; - font-size: 10pt; color: #602830; font-weight: bold; }