| version 1.5, 2012/10/07 15:45:58 |
version 1.6, 2012/10/07 17:24:48 |
| Line 108 if ($link == 'index.php' |
|
| Line 108 if ($link == 'index.php' |
|
| if (strlen($link) == 0) { |
if (strlen($link) == 0) { |
| $link = 'index.php'; |
$link = 'index.php'; |
| } |
} |
| // redirect for old access-key |
if ($ezin_cfg['redirect_equal_url'] == 1) { |
| $keys = array( |
// redirect for old access-key |
| array('ezin_article_key', 'article_id'), |
$keys = array( |
| array('ezin_section_key', 'section_id'), |
array('ezin_article_key', 'article_id'), |
| array('ezin_author_key', 'author_id') |
array('ezin_section_key', 'section_id'), |
| ); |
array('ezin_author_key', 'author_id') |
| foreach ($keys as $key) { |
); |
| $id_param = Platon::parse_id_param($key[0]); |
foreach ($keys as $key) { |
| $ar = ezin_validate_IDs(array($key[1] => $id_param)); |
$id_param = Platon::parse_id_param($key[0]); |
| if (isset($ar['redirect']) |
$ar = ezin_validate_IDs(array($key[1] => $id_param)); |
| && $ar['redirect']) |
if (isset($ar['redirect']) |
| { |
&& $ar['redirect']) |
| ezin_redirect_auto($ar); |
{ |
| |
ezin_redirect_auto($ar); |
| |
} |
| } |
} |
| |
// end redirect for old access-key |
| } |
} |
| // end redirect for old access-key |
|
| |
|
| require_once $link; |
require_once $link; |
| } |
} |
| Line 157 if (in_array($link, array('section.php', |
|
| Line 159 if (in_array($link, array('section.php', |
|
| } |
} |
| |
|
| } else { // normal |
} else { // normal |
| // redirect for old access-key |
if ($ezin_cfg['redirect_equal_url'] == 1) { |
| $id_param = Platon::parse_id_param(); |
// redirect for old access-key |
| switch($link) { |
$id_param = Platon::parse_id_param(); |
| case 'article.php': |
switch($link) { |
| $ar = ezin_validate_IDs(array('article_id' => $id_param)); |
case 'article.php': |
| break; |
$ar = ezin_validate_IDs(array('article_id' => $id_param)); |
| case 'section.php': |
break; |
| $ar = ezin_validate_IDs(array('section_id' => $id_param)); |
case 'section.php': |
| break; |
$ar = ezin_validate_IDs(array('section_id' => $id_param)); |
| case 'author.php': |
break; |
| $ar = ezin_validate_IDs(array('author_id' => $id_param)); |
case 'author.php': |
| break; |
$ar = ezin_validate_IDs(array('author_id' => $id_param)); |
| } |
break; |
| if (isset($ar['redirect']) |
} |
| && $ar['redirect']) |
if (isset($ar['redirect']) |
| { |
&& $ar['redirect']) |
| ezin_redirect_auto($ar); |
{ |
| |
ezin_redirect_auto($ar); |
| |
} |
| |
// end redirect for old access-key |
| } |
} |
| // end redirect for old access-key |
|
| require_once $link; |
require_once $link; |
| } |
} |
| } |
} |
| Line 241 if (strlen($link) > 0 |
|
| Line 245 if (strlen($link) > 0 |
|
| && strlen($args[0]) > 0) |
&& strlen($args[0]) > 0) |
| { |
{ |
| require_once 'cfgldr.inc.php'; |
require_once 'cfgldr.inc.php'; |
| // redirect for old access-key |
|
| $ar = ezin_validate_IDs(array('article_id' => $args[0])); |
$ar = ezin_validate_IDs(array('article_id' => $args[0])); |
| if (isset($ar['redirect']) |
if ($ezin_cfg['redirect_equal_url'] == 1) { |
| && $ar['redirect']) |
// redirect for old access-key |
| { |
if (isset($ar['redirect']) |
| ezin_redirect_auto($ar); |
&& $ar['redirect']) |
| |
{ |
| |
ezin_redirect_auto($ar); |
| |
} |
| |
// end redirect for old access-key |
| } |
} |
| // end redirect for old access-key |
|
| |
|
| if (intval($ar['article_id']) > 0) { |
if (intval($ar['article_id']) > 0) { |
| $ezin_cgi['query_string'] = $args; |
$ezin_cgi['query_string'] = $args; |
| Line 269 if (strlen($link) > 0 |
|
| Line 275 if (strlen($link) > 0 |
|
| $showed = false; |
$showed = false; |
| if (ezin_get_rewrite_key($args[0]) == 'author') { |
if (ezin_get_rewrite_key($args[0]) == 'author') { |
| array_shift($args); |
array_shift($args); |
| // redirect for old access-key |
if ($ezin_cfg['redirect_equal_url'] == 1) { |
| $ar = ezin_validate_IDs(array('author_id' => $args[0])); |
// redirect for old access-key |
| if (isset($ar['redirect']) |
$ar = ezin_validate_IDs(array('author_id' => $args[0])); |
| && $ar['redirect']) |
if (isset($ar['redirect']) |
| { |
&& $ar['redirect']) |
| ezin_redirect_auto($ar); |
{ |
| |
ezin_redirect_auto($ar); |
| |
} |
| |
// end redirect for old access-key |
| } |
} |
| // end redirect for old access-key |
|
| $ezin_cgi['query_string'] = $args; |
$ezin_cgi['query_string'] = $args; |
| $ezin_cgi['input'] = 'author'; |
$ezin_cgi['input'] = 'author'; |
| $showed = true; |
$showed = true; |
| Line 289 if (strlen($link) > 0 |
|
| Line 297 if (strlen($link) > 0 |
|
| } |
} |
| if (!$showed) { |
if (!$showed) { |
| array_shift($args); |
array_shift($args); |
| // redirect for old access-key |
if ($ezin_cfg['redirect_equal_url'] == 1) { |
| $ar = ezin_validate_IDs(array('article_id' => $args[0])); |
// redirect for old access-key |
| if (isset($ar['redirect']) |
$ar = ezin_validate_IDs(array('article_id' => $args[0])); |
| && $ar['redirect']) |
if (isset($ar['redirect']) |
| { |
&& $ar['redirect']) |
| ezin_redirect_auto($ar); |
{ |
| |
ezin_redirect_auto($ar); |
| |
} |
| |
// end redirect for old access-key |
| } |
} |
| // end redirect for old access-key |
|
| $ezin_cgi['query_string'] = $args; |
$ezin_cgi['query_string'] = $args; |
| $ezin_cgi['input'] = 'article'; |
$ezin_cgi['input'] = 'article'; |
| } |
} |