r44994 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44993‎ | r44994 | r44995 >
Date:00:09, 24 December 2008
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Whitespace/line breaks to keep this decent looking
Modified paths:
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LogEventsList.php
@@ -24,7 +24,7 @@
2525 private $out;
2626 public $flags;
2727
28 - function __construct( $skin, $out, $flags = 0 ) {
 28+ public function __construct( $skin, $out, $flags = 0 ) {
2929 $this->skin = $skin;
3030 $this->out = $out;
3131 $this->flags = $flags;
@@ -38,8 +38,9 @@
3939 private function preCacheMessages() {
4040 // Precache various messages
4141 if( !isset( $this->message ) ) {
42 - $messages = 'revertmerge protect_change unblocklink change-blocklink revertmove undeletelink revdel-restore rev-delundel hist';
43 - foreach( explode( ' ', $messages ) as $msg ) {
 42+ $messages = array('revertmerge','protect_change','unblocklink','change-blocklink',
 43+ 'revertmove','undeletelink','revdel-restore','rev-delundel','hist');
 44+ foreach( $messages as $msg ) {
4445 $this->message[$msg] = wfMsgExt( $msg, array( 'escape') );
4546 }
4647 }
@@ -331,7 +332,8 @@
332333 $revert = $this->skin->userToolLinks( 1, $title->getDBkey() );
333334 }
334335 if( $time < '20080129000000' ) {
335 - # Suppress $comment from old entries (before 2008-01-29), not needed and can contain incorrect links
 336+ # Suppress $comment from old entries (before 2008-01-29),
 337+ # not needed and can contain incorrect links
336338 $comment = '';
337339 }
338340 // Do nothing. The implementation is handled by the hook modifiying the passed-by-ref parameters.
@@ -343,7 +345,8 @@
344346 if( self::isDeleted($row,LogPage::DELETED_ACTION) ) {
345347 $action = '<span class="history-deleted">' . wfMsgHtml('rev-deleted-event') . '</span>';
346348 } else {
347 - $action = LogPage::actionText( $row->log_type, $row->log_action, $title, $this->skin, $paramArray, true );
 349+ $action = LogPage::actionText( $row->log_type, $row->log_action, $title,
 350+ $this->skin, $paramArray, true );
348351 }
349352
350353 if( $revert != '' ) {
@@ -496,8 +499,8 @@
497500 * @param $year Integer
498501 * @param $month Integer
499502 */
500 - function __construct( $list, $type = '', $user = '', $title = '', $pattern = '',
501 - $conds = array(), $year = false, $month = false )
 503+ public function __construct( $list, $type = '', $user = '', $title = '', $pattern = '',
 504+ $conds = array(), $year = false, $month = false )
502505 {
503506 parent::__construct();
504507 $this->mConds = $conds;
@@ -701,6 +704,7 @@
702705 */
703706 function __construct( $request ) {
704707 global $wgUser, $wgOut;
 708+ wfDeprecated(__FUNCTION__);
705709 # Get parameters
706710 $type = $request->getVal( 'type' );
707711 $user = $request->getText( 'user' );
@@ -747,6 +751,7 @@
748752 */
749753 function __construct( &$reader, $flags = 0 ) {
750754 global $wgUser;
 755+ wfDeprecated(__FUNCTION__);
751756 $this->reader =& $reader;
752757 $this->reader->pager->mLogEventsList->flags = $flags;
753758 # Aliases for shorter code...

Follow-up revisions

RevisionCommit summaryAuthorDate
r45195Cleanup to r44994 -- use __METHOD__ rather than __FUNCTION__ in wfDeprecated(...brion18:53, 30 December 2008

Comments

#Comment by Aaron Schulz (talk | contribs)   00:09, 24 December 2008

Also deprecates old log junk classes

#Comment by Brion VIBBER (talk | contribs)   19:03, 30 December 2008

Tweaked to use __METHOD__ instead of __FUNCTION__ in those deprs. r45195

Status & tagging log