r89002 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89001‎ | r89002 | r89003 >
Date:22:23, 27 May 2011
Author:yaron
Status:deferred
Tags:
Comment:
Undoing r86505 - unfortunately, it's beyond my PHP abilities to support both the old and the new signatures for the userCanExecute() method; so until that's done, I prefer to support the "old" (i.e., pre-MW 1.19) version
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_UploadWindow2.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_UploadWindow2.php
@@ -112,7 +112,12 @@
113113 * @param User $user
114114 * @return bool
115115 */
116 - public function userCanExecute( User $user ) {
 116+ // @TODO The "User" class was added to the function header
 117+ // for SpecialPage::userCanExecute in MW 1.19 (r86407) - somehow
 118+ // both the old and new signatures need to be supported. For now,
 119+ // though, support only the old signature, since that's used by
 120+ // the vast majority of users.
 121+ public function userCanExecute( $user ) {
117122 return UploadBase::isEnabled() && parent::userCanExecute( $user );
118123 }
119124

Follow-up revisions

RevisionCommit summaryAuthorDate
r89006followup r89002: nasty trick to support both the old and the new signatures f...foxtrott22:44, 27 May 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86505Follow-up r86407: Add type hinting to SpecialPage::userCanExecute() overrides...happy-melon17:07, 20 April 2011