verzia 1.6, 2012/10/07 17:24:48 |
verzia 1.9, 2012/10/10 18:54:38 |
|
|
$link = $_GET['link']; |
$link = $_GET['link']; |
require_once 'cfgldr.inc.php'; |
require_once 'cfgldr.inc.php'; |
|
|
ezin_cgi_parse(); |
//ezin_cgi_parse(); trouble with link type 1 and redirects, for link type 2 no need |
|
|
$link_file_type = -1; |
$link_file_type = -1; |
|
|
Riadok 245 if (strlen($link) > 0 |
|
Riadok 245 if (strlen($link) > 0 |
|
&& strlen($args[0]) > 0) |
&& strlen($args[0]) > 0) |
{ |
{ |
require_once 'cfgldr.inc.php'; |
require_once 'cfgldr.inc.php'; |
$ar = ezin_validate_IDs(array('article_id' => $args[0])); |
// check article |
|
if (ezin_exists_article($args[0]) |
|
&& ezin_exists_section($args[0])) |
|
{ |
|
$ar = ezin_validate_IDs(array('article_id' => $args[0])); |
|
} else { |
|
$ar = ezin_validate_IDs(array('section_id' => $args[0])); |
|
} |
if ($ezin_cfg['redirect_equal_url'] == 1) { |
if ($ezin_cfg['redirect_equal_url'] == 1) { |
// redirect for old access-key |
// redirect for old access-key |
if (isset($ar['redirect']) |
if (isset($ar['redirect']) |
Riadok 296 if (strlen($link) > 0 |
|
Riadok 303 if (strlen($link) > 0 |
|
$showed = true; |
$showed = true; |
} |
} |
if (!$showed) { |
if (!$showed) { |
array_shift($args); |
$section_id = array_shift($args); |
if ($ezin_cfg['redirect_equal_url'] == 1) { |
if ($ezin_cfg['redirect_equal_url'] == 1) { |
// redirect for old access-key |
// redirect for old access-key |
$ar = ezin_validate_IDs(array('article_id' => $args[0])); |
if ($section_id == $args[0]) { |
|
$ar = ezin_validate_IDs(array('section_id' => $args[0])); |
|
$ar['redirect'] = true; |
|
} else { |
|
$ar = ezin_validate_IDs(array('article_id' => $args[0])); |
|
} |
if (isset($ar['redirect']) |
if (isset($ar['redirect']) |
&& $ar['redirect']) |
&& $ar['redirect']) |
{ |
{ |