r71903 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71902‎ | r71903 | r71904 >
Date:21:40, 29 August 2010
Author:simetrical
Status:ok
Tags:
Comment:
Make SpecialUpload members public again

These were made protected in r57868 with no explanation, and it broke
extensions. See bug 24981, which points out that there's no longer any
way for extensions to edit things like $mComment from the
UploadForm:BeforeProcessing hook.

Will backport to 1.16, as a regression from 1.15.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUpload.php
@@ -43,29 +43,29 @@
4444 }
4545
4646 /** Misc variables **/
47 - protected $mRequest; // The WebRequest or FauxRequest this form is supposed to handle
48 - protected $mSourceType;
49 - protected $mUpload;
50 - protected $mLocalFile;
51 - protected $mUploadClicked;
 47+ public $mRequest; // The WebRequest or FauxRequest this form is supposed to handle
 48+ public $mSourceType;
 49+ public $mUpload;
 50+ public $mLocalFile;
 51+ public $mUploadClicked;
5252
5353 /** User input variables from the "description" section **/
54 - public $mDesiredDestName; // The requested target file name
55 - protected $mComment;
56 - protected $mLicense;
 54+ public $mDesiredDestName; // The requested target file name
 55+ public $mComment;
 56+ public $mLicense;
5757
5858 /** User input variables from the root section **/
59 - protected $mIgnoreWarning;
60 - protected $mWatchThis;
61 - protected $mCopyrightStatus;
62 - protected $mCopyrightSource;
 59+ public $mIgnoreWarning;
 60+ public $mWatchThis;
 61+ public $mCopyrightStatus;
 62+ public $mCopyrightSource;
6363
6464 /** Hidden variables **/
65 - protected $mDestWarningAck;
66 - protected $mForReUpload; // The user followed an "overwrite this file" link
67 - protected $mCancelUpload; // The user clicked "Cancel and return to upload form" button
68 - protected $mTokenOk;
69 - protected $mUploadSuccessful = false; // Subclasses can use this to determine whether a file was uploaded
 65+ public $mDestWarningAck;
 66+ public $mForReUpload; // The user followed an "overwrite this file" link
 67+ public $mCancelUpload; // The user clicked "Cancel and return to upload form" button
 68+ public $mTokenOk;
 69+ public $mUploadSuccessful = false; // Subclasses can use this to determine whether a file was uploaded
7070
7171 /** Text injection points for hooks not using HTMLForm **/
7272 public $uploadFormTextTop;

Follow-up revisions

RevisionCommit summaryAuthorDate
r71904Backport r71903 "Make SpecialUpload members public again"...simetrical21:45, 29 August 2010
r71905RELEASE-NOTES for r71903simetrical21:46, 29 August 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57868Rewrote Special:Upload to allow easier extension. Mostly backwards compatible...btongminh19:41, 18 October 2009

Status & tagging log