[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/data/validator/ -> uploadvalidator.class.php (sommaire)

(pas de description)

Poids: 111 lignes (4 kb)
Inclus ou requis:0 fois
Référencé: 3 fois
Nécessite: 0 fichiers

Définit 1 class

UploadValidator:: (4 méthodes):
  UploadValidator()
  validate()
  validateBlacklist()
  validateWhitelist()


Classe: UploadValidator  - X-Ref

\ingroup Validator

Given a FileUpload object, checks that it is not bigger than the maximum size allowed
and that it does not have one of the forbidden extensions.

The maximum size allowed is controlled via the 'maximum_file_upload_size' configuration setting
and the list of forbidden extensions can be configured via the upload_forbidde_files configuration
setting.

If the validation is unsuccessful, the error codes UPLOAD_VALIDATOR_ERROR_UPLOAD_TOO_BIG or
UPLOAD_VALIDATOR_ERROR_FORBIDDEN_EXTENSION will be set.
UploadValidator()   X-Ref
Constructor. Initializes the rule.


validate( $upload )   X-Ref
Returns true if the file is a valid upload, after making it go through all
our tests.

param: upload An FileUpload object containing information about the file
return: Returns true if it is valid or a negative value meaning an error otherwise:

validateBlacklist( $upload, $forbiddenFilesStr )   X-Ref

return: Returns true if successful or false otherwise

validateWhitelist( $upload, $allowedFilesStr )   X-Ref

return: Returns true if successful or false otherwise



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics