PHPDoc support : correct the erroneous entries
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1463 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
20
form.php
20
form.php
@@ -21,6 +21,7 @@ class form
|
||||
It can be disabled if needed. An Exception is raised if the form is send
|
||||
back without the token */
|
||||
public $csrf=TRUE;
|
||||
/** Name of the CSRF hidden field in HTML page */
|
||||
public $csrfField = "CSRF_TOKEN";
|
||||
|
||||
/** The method used to send the values */
|
||||
@@ -161,7 +162,9 @@ die ("FORM/VERIFY : UNUSED and dirty\n");
|
||||
$method is the method written in method field of <form>
|
||||
@param string|null $method The method to use to transmit the form (POST,
|
||||
GET)
|
||||
@param array|null $values The default values of the fields */
|
||||
@param array|null $values The default values of the fields
|
||||
@param array|null $errors The fields to put in error with the associated
|
||||
message */
|
||||
public function printHTML ($method = 'post', $values = NULL,
|
||||
$errors = array())
|
||||
{
|
||||
@@ -492,7 +495,8 @@ die ("FORM/VERIFY : UNUSED and dirty\n");
|
||||
return $res;
|
||||
}
|
||||
|
||||
/** Check the token from the user */
|
||||
/** Check the token from the user
|
||||
@param string $tokenFromUser The value form the user's token */
|
||||
public function checkToken ($tokenFromUser)
|
||||
{
|
||||
$csrf = new csrf ();
|
||||
@@ -535,12 +539,13 @@ class formfield
|
||||
}
|
||||
}
|
||||
|
||||
/** CSRF protection
|
||||
By default, the CSRF protection is active if a SESSION is active too.
|
||||
It can be disabled if needed. An Exception is raised if the form is send
|
||||
back without the token */
|
||||
class csrf
|
||||
{
|
||||
/** CSRF protection
|
||||
By default, the CSRF protection is active if a SESSION is active too.
|
||||
It can be disabled if needed. An Exception is raised if the form is send
|
||||
back without the token */
|
||||
/** Allow to disable the csrf protection */
|
||||
public $csrf=TRUE;
|
||||
/** This hidden field name in HTML */
|
||||
public $field = "CSRF_TOKEN";
|
||||
@@ -564,7 +569,8 @@ class csrf
|
||||
}
|
||||
|
||||
/** Check if the provided token is the right token, defined last displayed
|
||||
page */
|
||||
page
|
||||
@param string $tokenFromUser The value form the user's token */
|
||||
public function checkToken ($tokenFromUser)
|
||||
{
|
||||
if ($this->csrf === FALSE )
|
||||
|
||||
Reference in New Issue
Block a user