diff options
Diffstat (limited to 'admin/include/functions.php')
-rw-r--r-- | admin/include/functions.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php index 39e2e5d35..b0013b29b 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -30,11 +30,9 @@ include(PHPWG_ROOT_PATH.'admin/include/functions_metadata.php'); * * @return void access denied if token given is not equal to server token */ -function check_token() +function check_pwg_token() { - global $conf; - - $valid_token = hash_hmac('md5', session_id(), $conf['secret_key']); + $valid_token = get_pwg_token(); $given_token = null; if (!empty($_POST['pwg_token'])) @@ -51,6 +49,13 @@ function check_token() } } +function get_pwg_token() +{ + global $conf; + + return hash_hmac('md5', session_id(), $conf['secret_key']); +} + // The function delete_site deletes a site and call the function // delete_categories for each primary category of the site function delete_site( $id ) |