diff --git a/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php b/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php index 91c4b148..e4cb9cfa 100644 --- a/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php +++ b/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php @@ -275,7 +275,7 @@ $GLOBALS['LSobjects']['LSeepeople'] = array ( 'check_data' => array ( 'email' => array( 'msg' => _("L'adresse e-mail entrée n'est pas valide."), - 'param' => array('checkDomain' => false) + 'params' => array('checkDomain' => false) ), ), 'rights' => array( @@ -393,13 +393,13 @@ $GLOBALS['LSobjects']['LSeepeople'] = array ( 'check_data' => array ( 'imagesize' => array( 'msg' => _("La taille de l'image n'est pas valide."), - 'param' => array( + 'params' => array( 'maxWidth' => 2000 ) ), 'imagefilesize' => array( 'msg' => _("La taille du fichier image n'est pas valide."), - 'param' => array( + 'params' => array( 'maxSize' => 3000000 // taille du fichier en octets ) ), diff --git a/trunk/includes/class/class.LSformRule_email.php b/trunk/includes/class/class.LSformRule_email.php index b68d49d3..2f89431e 100644 --- a/trunk/includes/class/class.LSformRule_email.php +++ b/trunk/includes/class/class.LSformRule_email.php @@ -38,7 +38,7 @@ class LSformRule_email extends LSformRule { * @return boolean true si la valeur est valide, false sinon */ function validate($value,$option=array(),$formElement) { - return checkEmail($value,$option['param']['domain'],$option['param']['checkDomain']); + return checkEmail($value,$option['params']['domain'],$option['params']['checkDomain']); } } diff --git a/trunk/includes/class/class.LSformRule_imagefile.php b/trunk/includes/class/class.LSformRule_imagefile.php index 5b66b427..3b1785c6 100644 --- a/trunk/includes/class/class.LSformRule_imagefile.php +++ b/trunk/includes/class/class.LSformRule_imagefile.php @@ -32,8 +32,8 @@ class LSformRule_imagefile extends LSformRule { * * @param string $values Valeur à vérifier * @param array $options Options de validation : - * - Type MIME : $options['param']['mimeType'] - * - Type MIME (regex) : $options['param']['mimeTypeRegEx'] + * - Type MIME : $options['params']['mimeType'] + * - Type MIME (regex) : $options['params']['mimeTypeRegEx'] * @param object $formElement L'objet formElement attaché * * @return boolean true si la valeur est valide, false sinon @@ -43,14 +43,14 @@ class LSformRule_imagefile extends LSformRule { $mimetype = mime_content_type($file); - if (isset($options['param']['mimeType'])) { - if ($mimetype != $options['param']['mimeType']) { + if (isset($options['params']['mimeType'])) { + if ($mimetype != $options['params']['mimeType']) { return; } } else { - if (isset($options['param']['mimeTypeRegEx'])) { - $regex = $options['param']['mimeTypeRegEx']; + if (isset($options['params']['mimeTypeRegEx'])) { + $regex = $options['params']['mimeTypeRegEx']; } else { $regex = '/image\/.*/'; diff --git a/trunk/includes/class/class.LSformRule_imagefilesize.php b/trunk/includes/class/class.LSformRule_imagefilesize.php index f231b74a..6b88cf67 100644 --- a/trunk/includes/class/class.LSformRule_imagefilesize.php +++ b/trunk/includes/class/class.LSformRule_imagefilesize.php @@ -32,8 +32,8 @@ class LSformRule_imagefilesize extends LSformRule { * * @param string $values Valeur à vérifier * @param array $options Options de validation : - * - Taille max (en octet) : $options['param']['maxSize'] - * - Taille min (en octet) : $options['param']['minSize'] + * - Taille max (en octet) : $options['params']['maxSize'] + * - Taille min (en octet) : $options['params']['minSize'] * @param object $formElement L'objet formElement attaché * * @return boolean true si la valeur est valide, false sinon @@ -43,14 +43,14 @@ class LSformRule_imagefilesize extends LSformRule { $size = filesize($file); - if (is_int($options['param']['maxSize'])) { - if ($size > $options['param']['maxSize']) { + if (is_int($options['params']['maxSize'])) { + if ($size > $options['params']['maxSize']) { return; } } - if (is_int($options['param']['minSize'])) { - if ($size < $options['param']['minSize']) { + if (is_int($options['params']['minSize'])) { + if ($size < $options['params']['minSize']) { return; } } diff --git a/trunk/includes/class/class.LSformRule_imagesize.php b/trunk/includes/class/class.LSformRule_imagesize.php index 5b69ed90..44567a1f 100644 --- a/trunk/includes/class/class.LSformRule_imagesize.php +++ b/trunk/includes/class/class.LSformRule_imagesize.php @@ -32,10 +32,10 @@ class LSformRule_imagesize extends LSformRule { * * @param string $values Valeur à vérifier * @param array $options Options de validation : - * - Largeur max : $options['param']['maxWidth'] - * - Largeur min : $options['param']['minWidth'] - * - Hauteur max : $options['param']['maxHeight'] - * - Hauteur min : $options['param']['minHeight'] + * - Largeur max : $options['params']['maxWidth'] + * - Largeur min : $options['params']['minWidth'] + * - Hauteur max : $options['params']['maxHeight'] + * - Hauteur min : $options['params']['minHeight'] * @param object $formElement L'objet formElement attaché * * @return boolean true si la valeur est valide, false sinon @@ -44,23 +44,23 @@ class LSformRule_imagesize extends LSformRule { $file = $GLOBALS['LSsession'] -> getTmpFile($value); list($width, $height, $type, $attr) = getimagesize($file); - if (is_int($options['param']['maxWidth'])) { - if ($width > $options['param']['maxWidth']) { + if (is_int($options['params']['maxWidth'])) { + if ($width > $options['params']['maxWidth']) { return; } } - if (is_int($options['param']['minWidth'])) { - if ($width < $options['param']['minWidth']) { + if (is_int($options['params']['minWidth'])) { + if ($width < $options['params']['minWidth']) { return; } } - if (is_int($options['param']['maxHeight'])) { - if ($height > $options['param']['maxHeight']) { + if (is_int($options['params']['maxHeight'])) { + if ($height > $options['params']['maxHeight']) { return; } } - if (is_int($options['param']['minHeight'])) { - if ($height < $options['param']['minHeight']) { + if (is_int($options['params']['minHeight'])) { + if ($height < $options['params']['minHeight']) { return; } } diff --git a/trunk/includes/class/class.LSformRule_telephonenumber.php b/trunk/includes/class/class.LSformRule_telephonenumber.php index 29645774..4aa98996 100644 --- a/trunk/includes/class/class.LSformRule_telephonenumber.php +++ b/trunk/includes/class/class.LSformRule_telephonenumber.php @@ -32,7 +32,6 @@ class LSformRule_telephonenumber extends LSformRule { * * @param string $value Valeur à vérifier * @param array $options Options de validation : - * - Check domain : $option['params']['checkDomain'] * @param object $formElement L'objet formElement attaché * * @return boolean true si la valeur est valide, false sinon