=================================================================== RCS file: /home/cvsd/home/cvs/Metafox/rewrite.php,v retrieving revision 1.2 retrieving revision 1.4 diff -u -p -r1.2 -r1.4 --- Metafox/rewrite.php 2012/05/17 08:57:16 1.2 +++ Metafox/rewrite.php 2012/09/28 18:49:48 1.4 @@ -1,7 +1,7 @@ 0 && strlen($args[0]) > 0) { require_once 'cfgldr.inc.php'; - $ezin_cgi['query_string'][] = $args[0]; - $ezin_cgi['input'] = 'section'; + $ar = ezin_validate_IDs(array('article_id' => $args[0])); + if (intval($ar['article_id']) > 0) { + $ezin_cgi['query_string'] = $args; + $ezin_cgi['input'] = 'article'; + } else { + $ezin_cgi['query_string'] = $args; + $ezin_cgi['input'] = 'section'; + } require_once 'index.php'; } @@ -209,17 +215,20 @@ if (strlen($link) > 0 $showed = false; if (ezin_get_rewrite_key($args[0]) == 'author') { - $ezin_cgi['query_string'][] = $args[1]; + array_shift($args); + $ezin_cgi['query_string'] = $args; $ezin_cgi['input'] = 'author'; $showed = true; } if (ezin_get_rewrite_key($args[0]) == 'print') { - $ezin_cgi['query_string'][] = $args[1]; + array_shift($args); + $ezin_cgi['query_string'] = $args; $ezin_cgi['input'] = 'print'; $showed = true; } if (!$showed) { - $ezin_cgi['query_string'][] = $args[1]; + array_shift($args); + $ezin_cgi['query_string'] = $args; $ezin_cgi['input'] = 'article'; }