Index: trunk/kernel/include/item.php =================================================================== diff -u -N -r3162 -r3179 --- trunk/kernel/include/item.php (.../item.php) (revision 3162) +++ trunk/kernel/include/item.php (.../item.php) (revision 3179) @@ -1111,7 +1111,10 @@ function StripDisallowed($string) { - $not_allowed = Array(' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|'); + $not_allowed = Array( ' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|', + '~', '!', '@', '#', '$', '%', '^', '&', '(', ')', + '+', '=', '-', '{', '}', ']', '[', "'", ';', '.', ','); + $string = str_replace($not_allowed, '_', $string); $string = preg_replace('/(_+)/', '_', $string); Index: trunk/globals.php =================================================================== diff -u -N -r3148 -r3179 --- trunk/globals.php (.../globals.php) (revision 3148) +++ trunk/globals.php (.../globals.php) (revision 3179) @@ -1658,7 +1658,7 @@ // if update var count is zero, then do nothing if( !is_array($update) || count($update) == 0 ) return ''; - + // ensure that we have no empty values in enviroment variable foreach($update as $vl_key => $vl_value) { if(!$vl_value) $update[$vl_key] = '0'; // unset($update[$vl_key]); @@ -1670,7 +1670,9 @@ $ret = Array(); foreach($var_list as $var_name) { - $ret[] = GetEnvVar($prefix, $var_name); + $value = GetEnvVar($prefix, $var_name); + if(!$value && $var_name == 'id') $value = '0'; + $ret[] = $value; } // Removing all var_list_udpate Index: trunk/core/units/general/cat_dbitem.php =================================================================== diff -u -N -r3162 -r3179 --- trunk/core/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 3162) +++ trunk/core/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 3179) @@ -201,7 +201,10 @@ */ function stripDisallowed($string) { - $not_allowed = Array(' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|'); + $not_allowed = Array( ' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|', + '~', '!', '@', '#', '$', '%', '^', '&', '(', ')', + '+', '=', '-', '{', '}', ']', '[', "'", ';', '.', ','); + $string = str_replace($not_allowed, '_', $string); $string = preg_replace('/(_+)/', '_', $string); Index: trunk/kernel/units/general/cat_dbitem.php =================================================================== diff -u -N -r3162 -r3179 --- trunk/kernel/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 3162) +++ trunk/kernel/units/general/cat_dbitem.php (.../cat_dbitem.php) (revision 3179) @@ -201,7 +201,10 @@ */ function stripDisallowed($string) { - $not_allowed = Array(' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|'); + $not_allowed = Array( ' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|', + '~', '!', '@', '#', '$', '%', '^', '&', '(', ')', + '+', '=', '-', '{', '}', ']', '[', "'", ';', '.', ','); + $string = str_replace($not_allowed, '_', $string); $string = preg_replace('/(_+)/', '_', $string); Index: trunk/core/units/general/main_event_handler.php =================================================================== diff -u -N -r3174 -r3179 --- trunk/core/units/general/main_event_handler.php (.../main_event_handler.php) (revision 3174) +++ trunk/core/units/general/main_event_handler.php (.../main_event_handler.php) (revision 3179) @@ -52,7 +52,7 @@ $processed_params[$var_name] = isset( $url_params[$var_name] ) ? $url_params[$var_name] : $this->Application->GetVar($var_name); if ( isset($url_params[$var_name]) ) unset( $url_params[$var_name] ); } - + $ret = ''; $default_language_id = $this->Application->GetDefaultLanguageId(); if( $processed_params['m_lang'] != $default_language_id ) Index: trunk/kernel/include/category.php =================================================================== diff -u -N -r3174 -r3179 --- trunk/kernel/include/category.php (.../category.php) (revision 3174) +++ trunk/kernel/include/category.php (.../category.php) (revision 3179) @@ -40,7 +40,10 @@ function StripDisallowed($string) { - $not_allowed = Array(' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|'); + $not_allowed = Array( ' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|', + '~', '!', '@', '#', '$', '%', '^', '&', '(', ')', + '+', '=', '-', '{', '}', ']', '[', "'", ';', '.', ','); + $string = str_replace($not_allowed, '_', $string); $string = preg_replace('/(_+)/', '_', $string); Index: trunk/admin/category/addcategory.php =================================================================== diff -u -N -r3154 -r3179 --- trunk/admin/category/addcategory.php (.../addcategory.php) (revision 3154) +++ trunk/admin/category/addcategory.php (.../addcategory.php) (revision 3179) @@ -182,14 +182,14 @@ > - + Get('AutomaticFilename') == 1) echo ' checked'; ?> onchange="reflect_filename();">   > - + Index: trunk/kernel/include/modules.php =================================================================== diff -u -N -r3145 -r3179 --- trunk/kernel/include/modules.php (.../modules.php) (revision 3145) +++ trunk/kernel/include/modules.php (.../modules.php) (revision 3179) @@ -19,87 +19,66 @@ global $env, $var_list, $mod_prefix,$objSession, $SessionQueryString; /* parse individual sections */ - $env = isset($_GET['env']) ? $_GET['env'] : ''; - if ($env == "") + $env = GetVar('env'); + if (!$env) { - $var_list["t"] = "index"; - if(is_array($mod_prefix)) - { - - foreach($mod_prefix as $key => $value) - { - if(strlen($key)) - { - $parser_name = $key . "_ParseEnv"; - if(function_exists($parser_name)) - { - @$parser_name(); - } - } - } - - } + $var_list['t'] = 'index'; + if (is_array($mod_prefix)) + { + foreach($mod_prefix as $module_prefix => $module_name) + { + $parser_name = $module_prefix.'_ParseEnv'; + if( function_exists($parser_name) ) $parser_name(); + } + } } else { - $envsections = explode(":", $env); - foreach($mod_prefix as $key => $value) - { - if(strlen($key)) - { - $parsed=FALSE; + $env_sections = explode(':', $env); + + $main = array_shift($env_sections); + if($main) + { + list($sid, $template) = explode('-', $main, 2); + if(!$SessionQueryString) + { + if (!$sid || $sid == '_') + { + if ($sid != '_') $sid = $_COOKIE[SESSION_COOKIE_NAME]; + } + else + { + $SessionQueryString = true; + } + } + $var_list['sid'] = $sid; + $var_list['t'] = $template; + if( getArrayValue($_GET, 'dest') ) $var_list['dest'] = $_GET['dest']; + } + + foreach ($env_sections as $env_section) + { + $env_section = preg_replace("/^([a-zA-Z]+)([0-9]+)-(.*)/", "$1-$2-$3", $env_section); + $pieces = explode('-', $env_section); + $parser_name = $pieces[0].'_ParseEnv'; + if( function_exists($parser_name) ) + { + $env_section = preg_replace('/^([a-zA-Z]+)-([0-9]+)-(.*)/','\\1\\2-\\3', $env_section); + $parser_name($env_section); + } + } - $parser_name = $key . "_ParseEnv"; - for($i=1; $i\n"; if ($env != "") Index: trunk/kernel/units/general/main_event_handler.php =================================================================== diff -u -N -r3174 -r3179 --- trunk/kernel/units/general/main_event_handler.php (.../main_event_handler.php) (revision 3174) +++ trunk/kernel/units/general/main_event_handler.php (.../main_event_handler.php) (revision 3179) @@ -52,7 +52,7 @@ $processed_params[$var_name] = isset( $url_params[$var_name] ) ? $url_params[$var_name] : $this->Application->GetVar($var_name); if ( isset($url_params[$var_name]) ) unset( $url_params[$var_name] ); } - + $ret = ''; $default_language_id = $this->Application->GetDefaultLanguageId(); if( $processed_params['m_lang'] != $default_language_id )