r71904 MediaWiki - Code Review archive

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

Also adds RELEASE-NOTES entry. Original commit message:

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:
  • /branches/REL1_16/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_16/phase3/includes/specials/SpecialUpload.php (modified) (history)

Diff [purge]

Index: branches/REL1_16/phase3/includes/specials/SpecialUpload.php
@@ -23,30 +23,30 @@
2424 }
2525
2626 /** Misc variables **/
27 - protected $mRequest; // The WebRequest or FauxRequest this form is supposed to handle
28 - protected $mSourceType;
29 - protected $mUpload;
30 - protected $mLocalFile;
31 - protected $mUploadClicked;
 27+ public $mRequest; // The WebRequest or FauxRequest this form is supposed to handle
 28+ public $mSourceType;
 29+ public $mUpload;
 30+ public $mLocalFile;
 31+ public $mUploadClicked;
3232
3333 /** User input variables from the "description" section **/
34 - public $mDesiredDestName; // The requested target file name
35 - protected $mComment;
36 - protected $mLicense;
37 -
 34+ public $mDesiredDestName; // The requested target file name
 35+ public $mComment;
 36+ public $mLicense;
 37+
3838 /** User input variables from the root section **/
39 - protected $mIgnoreWarning;
40 - protected $mWatchThis;
41 - protected $mCopyrightStatus;
42 - protected $mCopyrightSource;
 39+ public $mIgnoreWarning;
 40+ public $mWatchThis;
 41+ public $mCopyrightStatus;
 42+ public $mCopyrightSource;
4343
4444 /** Hidden variables **/
45 - protected $mDestWarningAck;
46 - protected $mForReUpload; // The user followed an "overwrite this file" link
47 - protected $mCancelUpload; // The user clicked "Cancel and return to upload form" button
48 - protected $mTokenOk;
49 - protected $mUploadSuccessful = false; // Subclasses can use this to determine whether a file was uploaded
50 -
 45+ public $mDestWarningAck;
 46+ public $mForReUpload; // The user followed an "overwrite this file" link
 47+ public $mCancelUpload; // The user clicked "Cancel and return to upload form" button
 48+ public $mTokenOk;
 49+ public $mUploadSuccessful = false; // Subclasses can use this to determine whether a file was uploaded
 50+
5151 /** Text injection points for hooks not using HTMLForm **/
5252 public $uploadFormTextTop;
5353 public $uploadFormTextAfterSummary;
Index: branches/REL1_16/phase3/RELEASE-NOTES
@@ -44,6 +44,9 @@
4545 you have the DBA extension for PHP installed, this will improve performance
4646 further.
4747
 48+== Changes since 1.16.0 ==
 49+* (bug 24981) Allow extensions to access SpecialUpload variables again
 50+
4851 == Changes since 1.16 beta 3 ==
4952
5053 * (bug 23769) Disabled HTML 5 client-side form validation. Was introduced in

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57868Rewrote Special:Upload to allow easier extension. Mostly backwards compatible...btongminh19:41, 18 October 2009
r71903Make SpecialUpload members public again...simetrical21:40, 29 August 2010

Status & tagging log