r100430 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100429‎ | r100430 | r100431 >
Date:16:54, 21 October 2011
Author:ialex
Status:resolved (Comments)
Tags:
Comment:
* Call Linker methods statically
* Removed now-useless parameter RevisionDeleter::getLogLinks(), updated the only caller
Modified paths:
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)
  • /trunk/phase3/includes/revisiondelete/RevisionDeleter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/revisiondelete/RevisionDeleter.php
@@ -113,11 +113,10 @@
114114 *
115115 * @param $title Title
116116 * @param $paramArray Array
117 - * @param $skin Skin
118117 * @param $messages
119118 * @return String
120119 */
121 - public static function getLogLinks( $title, $paramArray, $skin, $messages ) {
 120+ public static function getLogLinks( $title, $paramArray, $messages ) {
122121 global $wgLang;
123122
124123 if ( count( $paramArray ) >= 2 ) {
@@ -132,19 +131,18 @@
133132 if ( count( $Ids ) == 1 ) {
134133 // Live revision diffs...
135134 if ( in_array( $key, array( 'oldid', 'revision' ) ) ) {
136 - $revert[] = $skin->link(
 135+ $revert[] = Linker::linkKnown(
137136 $title,
138137 $messages['diff'],
139138 array(),
140139 array(
141140 'diff' => intval( $Ids[0] ),
142141 'unhide' => 1
143 - ),
144 - array( 'known', 'noclasses' )
 142+ )
145143 );
146144 // Deleted revision diffs...
147145 } elseif ( in_array( $key, array( 'artimestamp','archive' ) ) ) {
148 - $revert[] = $skin->link(
 146+ $revert[] = Linker::linkKnown(
149147 SpecialPage::getTitleFor( 'Undelete' ),
150148 $messages['diff'],
151149 array(),
@@ -152,14 +150,13 @@
153151 'target' => $title->getPrefixedDBKey(),
154152 'diff' => 'prev',
155153 'timestamp' => $Ids[0]
156 - ),
157 - array( 'known', 'noclasses' )
 154+ )
158155 );
159156 }
160157 }
161158
162159 // View/modify link...
163 - $revert[] = $skin->link(
 160+ $revert[] = Linker::linkKnown(
164161 SpecialPage::getTitleFor( 'Revisiondelete' ),
165162 $messages['revdel-restore'],
166163 array(),
@@ -167,8 +164,7 @@
168165 'target' => $title->getPrefixedText(),
169166 'type' => $key,
170167 'ids' => implode(',', $Ids),
171 - ),
172 - array( 'known', 'noclasses' )
 168+ )
173169 );
174170
175171 // Pipe links
Index: trunk/phase3/includes/LogEventsList.php
@@ -466,7 +466,7 @@
467467 // If an edit was hidden from a page give a review link to the history
468468 } elseif( self::typeAction( $row, array( 'delete', 'suppress' ), 'revision', 'deletedhistory' ) ) {
469469 $revert = RevisionDeleter::getLogLinks( $title, $paramArray,
470 - $this->skin, $this->message );
 470+ $this->message );
471471 // Hidden log items, give review link
472472 } elseif( self::typeAction( $row, array( 'delete', 'suppress' ), 'event', 'deletedhistory' ) ) {
473473 if( count($paramArray) >= 1 ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r100465Fix fatal: Fatal error: func_get_args(): Can't be used as a function paramete...platonides22:18, 21 October 2011

Comments

#Comment by Platonides (talk | contribs)   22:17, 21 October 2011

Fatal error: func_get_args(): Can't be used as a function parameter in includes/context/ContextSource.php on line 121

Status & tagging log