r86505 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86504‎ | r86505 | r86506 >
Date:17:07, 20 April 2011
Author:happy-melon
Status:ok (Comments)
Tags:
Comment:
Follow-up r86407: Add type hinting to SpecialPage::userCanExecute() overrides to avoid E_STRICT errors. Everywhere in core is already done, it seems.
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_UploadWindow2.php (modified) (history)
  • /trunk/extensions/SharedUserRights/SharedUserRights_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_UploadWindow2.php
@@ -112,7 +112,7 @@
113113 * @param User $user
114114 * @return bool
115115 */
116 - public function userCanExecute( $user ) {
 116+ public function userCanExecute( User $user ) {
117117 return UploadBase::isEnabled() && parent::userCanExecute( $user );
118118 }
119119
Index: trunk/extensions/SharedUserRights/SharedUserRights_body.php
@@ -25,7 +25,7 @@
2626 return true;
2727 }
2828
29 - public function userCanExecute( $user ) {
 29+ public function userCanExecute( User $user ) {
3030 return $user->isAllowed( 'userrights-shared' );
3131 }
3232

Follow-up revisions

RevisionCommit summaryAuthorDate
r89002Undoing r86505 - unfortunately, it's beyond my PHP abilities to support both ...yaron22:23, 27 May 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86407Follow-up r86255: don't special-case redirecting special pages in executePath...happy-melon15:45, 19 April 2011

Comments

#Comment by Aaron Schulz (talk | contribs)   17:25, 20 April 2011

Does SMW support multiple MW versions or does it use the REL_1X scheme only?

Status & tagging log