Protected function UploadBase->validateName changed to public
authorrahul21 <rahul14m93@gmail.com>
Fri, 29 Mar 2013 10:38:32 +0000 (16:08 +0530)
committerRahul21 <rahul14m93@gmail.com>
Fri, 5 Apr 2013 21:04:56 +0000 (21:04 +0000)
*Any class that is not part of the UploadBase class
(so it can't call protected functions or members on an UploadBase object).
If you, for example,build an extension that uses an UploadBase instance,
there is no way to get the title validation error.

Bug: 38221

Change-Id: Ie6c3f95a09ef84777313c3ec2edd31c50c397e28

includes/upload/UploadBase.php

index 3a37f11..e8151b2 100644 (file)
@@ -330,7 +330,7 @@ abstract class UploadBase {
         * @return mixed true if valid, otherwise and array with 'status'
         * and other keys
         **/
-       protected function validateName() {
+       public function validateName() {
                $nt = $this->getTitle();
                if( is_null( $nt ) ) {
                        $result = array( 'status' => $this->mTitleError );