r56596 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56595‎ | r56596 | r56597 >
Date:13:57, 18 September 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Shut up warnings from r56420 that have annoyed us few days :o
Modified paths:
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LogEventsList.php
@@ -583,15 +583,26 @@
584584 * @return Integer Number of total log items (not limited by $lim)
585585 */
586586 public static function showLogExtract( &$out, $types=array(), $page='', $user='',
587 - $param = array( 'lim' => 0, 'conds' => array(), 'showIfEmpty' => true, 'msgKey' => array('') ) ) {
 587+ $param = array() ) {
588588
 589+ $defaultParameters = array(
 590+ 'lim' => 0,
 591+ 'conds' => array(),
 592+ 'showIfEmpty' => true,
 593+ 'msgKey' => array('')
 594+ );
 595+
 596+ # The + operator appends elements of remaining keys from the right
 597+ # handed array to the left handed, whereas duplicated keys are NOT overwritten.
 598+ $param += $defaultParameters;
 599+
589600 global $wgUser, $wgOut;
590601 # Convert $param array to individual variables
591602 $lim = $param['lim'];
592603 $conds = $param['conds'];
593604 $showIfEmpty = $param['showIfEmpty'];
594605 $msgKey = $param['msgKey'];
595 - if ( !(is_array($msgKey)) )
 606+ if ( !is_array($msgKey) )
596607 $msgKey = array( $msgKey );
597608 # Insert list of top 50 (or top $lim) items
598609 $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut, 0 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r56420Follow-up on r56284: LogEventsList::showLogExtract gets associative array for...churchofemacs17:17, 16 September 2009

Status & tagging log