Browse files

Removing deprecated validator functions on Upload

Use Upload_Validator instead.
  • Loading branch information...
1 parent 9eca2d6 commit e52db56ac874c0b05cd84ff1b8624265f68f8af2 @halkyon halkyon committed Nov 15, 2012
Showing with 0 additions and 82 deletions.
  1. +0 −82 filesystem/Upload.php
View
82 filesystem/Upload.php
@@ -222,88 +222,6 @@ public function setFile($file) {
}
/**
- * Get maximum file size for all or specified file extension.
- *
- * @deprecated 2.5 Please use Upload_Validator::getAllowedMaxFileSize() instead
- *
- * @param string $ext
- * @return int Filesize in bytes
- */
- public function getAllowedMaxFileSize($ext = null) {
- Deprecation::notice('2.5', 'Use Upload_Validator::getAllowedMaxFileSize() instead.');
- return $this->validator->getAllowedMaxFileSize($ext);
- }
-
- /**
- * Set filesize maximums (in bytes).
- * Automatically converts extensions to lowercase
- * for easier matching.
- *
- * Example:
- * <code>
- * array('*' => 200, 'jpg' => 1000)
- * </code>
- *
- * @deprecated 2.5 Please use Upload_Validator::setAllowedMaxFileSize() instead
- *
- * @param array|int $rules
- */
- public function setAllowedMaxFileSize($rules) {
- Deprecation::notice('2.5', 'Use Upload_Validator::setAllowedMaxFileSize() instead.');
- $this->validator->setAllowedMaxFileSize($rules);
- }
-
- /**
- * @deprecated 2.5 Please use Upload_Validator::getAllowedExtensions() instead
- * @return array
- */
- public function getAllowedExtensions() {
- Deprecation::notice('2.5', 'Use Upload_Validator::getAllowedExtensions() instead.');
- return $this->validator->getAllowedExtensions();
- }
-
- /**
- * @deprecated 2.5 Please use Upload_Validator::setAllowedExtensions() instead
- * @param array $rules
- */
- public function setAllowedExtensions($rules) {
- Deprecation::notice('2.5', 'Use Upload_Validator::setAllowedExtensions() instead.');
- $this->validator->setAllowedExtensions($rules);
- }
-
- /**
- * Determines if the bytesize of an uploaded
- * file is valid - can be defined on an
- * extension-by-extension basis in {$allowedMaxFileSize}
- *
- * @deprecated 2.5 Please use Upload_Validator::isValidExtension() instead
- *
- * @param array $tmpFile
- * @return boolean
- */
- public function isValidSize($tmpFile) {
- Deprecation::notice('2.5', 'Use Upload_Validator::isValidSize() instead.');
- $validator = new Upload_Validator();
- $validator->setTmpFile($tmpFile);
- return $validator->isValidSize();
- }
-
- /**
- * Determines if the temporary file has a valid extension
- *
- * @deprecated 2.5 Please use Upload_Validator::isValidExtension() instead
- *
- * @param array $tmpFile
- * @return boolean
- */
- public function isValidExtension($tmpFile) {
- Deprecation::notice('2.5', 'Use Upload_Validator::isValidExtension() instead.');
- $validator = new Upload_Validator();
- $validator->setTmpFile($tmpFile);
- return $validator->isValidExtension();
- }
-
- /**
* Clear out all errors (mostly set by {loadUploaded()})
*/
public function clearErrors() {

0 comments on commit e52db56

Please sign in to comment.