| version 1.68, 2012/09/28 18:49:48 |
version 1.69, 2012/09/30 14:39:23 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/db.inc.php,v 1.67 2012-09-28 16:23:20 igor Exp $ */ |
/* $Platon: Metafox/db.inc.php,v 1.68 2012-09-28 18:49:48 nepto Exp $ */ |
| |
|
| /* |
/* |
| * updates: 23/5/2001, 29/7/2001, 11/10/2001, 2/11/2001, 11/1/2002, 23/7/2002 |
* updates: 23/5/2001, 29/7/2001, 11/10/2001, 2/11/2001, 11/1/2002, 23/7/2002 |
| Line 175 function ezin_validate_IDs($ar) /* {{{ * |
|
| Line 175 function ezin_validate_IDs($ar) /* {{{ * |
|
| $ar['article_access_key'] = @$ret_row['article_access_key']; |
$ar['article_access_key'] = @$ret_row['article_access_key']; |
| $ar['author_access_key'] = @$ret_row['author_access_key']; |
$ar['author_access_key'] = @$ret_row['author_access_key']; |
| } else { |
} else { |
| $ar['lang'] = ''; |
// lookup for old access-keys |
| $ar['author_id'] = 0; |
$ar_redirect = null; |
| $ar['section_id'] = 0; |
if (strlen($ar['author_id']) > 0) { |
| $ar['article_id'] = 0; |
$ret = ezin_get_access_key_redirect($ar['author_id'], 'author'); |
| $ar['message_id'] = 0; |
if (count($ret) > 0) { |
| $ar['section_bind_lang'] = 0; |
$ar_redirect = ezin_validate_IDs(array('author_id' => $ret['id'])); |
| $ar['article_bind_lang'] = 0; |
} |
| $ar['section_access_key'] = ''; |
} else if (strlen($ar['article_id']) > 0) { |
| $ar['article_access_key'] = ''; |
$ret = ezin_get_access_key_redirect($ar['article_id'], 'article'); |
| |
if (count($ret) > 0) { |
| |
$ar_redirect = ezin_validate_IDs(array('article_id' => $ret['id'])); |
| |
} |
| |
} else if (strlen($ar['section_id']) > 0) { |
| |
$ret = ezin_get_access_key_redirect($ar['section_id'], 'section'); |
| |
if (count($ret) > 0) { |
| |
$ar_redirect = ezin_validate_IDs(array('section_id' => $ret['id'])); |
| |
} |
| |
} |
| |
|
| |
if (!is_null($ar_redirect)) { |
| |
$ar = $ar_redirect; |
| |
} else { |
| |
$ar['lang'] = ''; |
| |
$ar['author_id'] = 0; |
| |
$ar['section_id'] = 0; |
| |
$ar['article_id'] = 0; |
| |
$ar['message_id'] = 0; |
| |
$ar['section_bind_lang'] = 0; |
| |
$ar['article_bind_lang'] = 0; |
| |
$ar['section_access_key'] = ''; |
| |
$ar['article_access_key'] = ''; |
| |
} |
| } |
} |
| |
|
| return $ar; |
return $ar; |