r38975 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38974‎ | r38975 | r38976 >
Date:01:16, 9 August 2008
Author:aaron
Status:old
Tags:
Comment:
backport some tweaks/fixes
Modified paths:
  • /branches/REL1_13/extensions/FlaggedRevs/specialpages/ProblemPages_body.php (modified) (history)
  • /branches/REL1_13/extensions/FlaggedRevs/specialpages/ValidationStatistics_body.php (modified) (history)

Diff [purge]

Index: branches/REL1_13/extensions/FlaggedRevs/specialpages/ProblemPages_body.php
@@ -6,6 +6,9 @@
77 wfLoadExtensionMessages( 'ProblemPages' );
88 wfLoadExtensionMessages( 'FlaggedRevs' );
99
 10+if( !defined('READER_FEEDBACK_SIZE') )
 11+ define('READER_FEEDBACK_SIZE',15);
 12+
1013 class ProblemPages extends SpecialPage
1114 {
1215 function __construct() {
@@ -54,7 +57,7 @@
5558 }
5659
5760 protected function showPageList() {
58 - global $wgOut, $wgUser, $wgLang;
 61+ global $wgOut;
5962 $pager = new ProblemPagesPager( $this, array(), $this->namespace, $this->tag );
6063 if( $pager->getNumRows() ) {
6164 $wgOut->addHTML( wfMsgExt('problempages-list', array('parse') ) );
@@ -125,7 +128,7 @@
126129 }
127130 $conds[] = "rfp_ave_val < $x";
128131 // Reasonable sample
129 - $conds[] = 'rfp_count >= 15';
 132+ $conds[] = 'rfp_count >= '.READER_FEEDBACK_SIZE;
130133 return array(
131134 'tables' => array('reader_feedback_pages','page'),
132135 'fields' => 'page_namespace,page_title,page_len,rfp_ave_val',
Index: branches/REL1_13/extensions/FlaggedRevs/specialpages/ValidationStatistics_body.php
@@ -23,7 +23,7 @@
2424 $ec = $this->getEditorCount();
2525 $rc = $this->getReviewerCount();
2626
27 - $wgOut->addWikiText( wfMsg('validationstatistics-users',$ec,$rc) );
 27+ $wgOut->addWikiText( wfMsgExt('validationstatistics-users',array('parsemag'),$ec,$rc) );
2828
2929 if( !$this->readyForQuery() ) {
3030 return false;
@@ -65,8 +65,9 @@
6666 // If a cache update is needed, do so asynchronously.
6767 // Don't trigger query while another is running.
6868 if( !$dbCache->get( $key ) && !$dbCache->get( $keySQL ) ) {
 69+ $ext = strpos( $_SERVER['SCRIPT_NAME'], 'index.php5' ) === false ? 'php' : 'php5';
6970 $path = wfEscapeShellArg( dirname(__FILE__).'/../maintenance/updateStats.php' );
70 - exec( "php $path > /dev/null &" );
 71+ exec( "$ext $path > /dev/null &" );
7172 }
7273 }
7374

Status & tagging log