1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-21 13:52:35 +02:00

e-token check method returns now boolean; comments e-token check refined

This commit is contained in:
secretr
2011-10-24 06:30:31 +00:00
parent f0d9fe4334
commit 600e3aa12f
2 changed files with 10 additions and 6 deletions

View File

@@ -340,6 +340,7 @@ class comment
/**
* Add a comment to an item
* e-token POST value should be always valid when using this method.
*
* @param unknown_type $author_name
* @param unknown_type $comment
@@ -363,7 +364,8 @@ class comment
if ($this->getCommentPermissions() != 'rw') return;
e107::getSession()->check(); // This will abort on error
if(!isset($_POST['e-token'])) $_POST['e-token'] = ''; // check posted token
if(!e107::getSession()->check(false)) return false; // This will return false on error
if (isset($_GET['comment']) && $_GET['comment'] == 'edit')
{