- fix cat_modify

* missing token in url
 * double icon display
- simplified func check_pwg_token


git-svn-id: http://piwigo.org/svn/trunk@5335 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2010-03-25 05:59:35 +00:00
parent 7fb629e04d
commit 6717089705
3 changed files with 14 additions and 21 deletions
+7 -13
View File
@@ -1453,21 +1453,15 @@ function get_icon($date, $is_child_date = false)
*/
function check_pwg_token()
{
$valid_token = get_pwg_token();
$given_token = null;
if (!empty($_POST['pwg_token']))
if (!empty($_REQUEST['pwg_token']))
{
$given_token = $_POST['pwg_token'];
}
elseif (!empty($_GET['pwg_token']))
{
$given_token = $_GET['pwg_token'];
}
if ($given_token != $valid_token)
{
access_denied();
if (get_pwg_token() != $_REQUEST['pwg_token'])
{
access_denied();
}
}
else
bad_request('missing token');
}
function get_pwg_token()