$logBody .
$loglist->endLogEventsList();
} else {
- if ( $showIfEmpty )
+ if ( $showIfEmpty ) {
$s = Html::rawElement( 'div', array( 'class' => 'mw-warning-logempty' ),
wfMsgExt( 'logempty', array( 'parseinline' ) ) );
+ }
}
if( $pager->getNumRows() > $pager->mLimit ) { # Show "Full log" link
$urlParam = array();
$s .= '</div>';
}
- if ( $wrap!='' ) { // Wrap message in html
+ if ( $wrap != '' ) { // Wrap message in html
$s = str_replace( '$1', $s, $wrap );
}
return $info;
}
- // Checks if $this->mConds has $field matched to a *single* value
+ /**
+ * Checks if $this->mConds has $field matched to a *single* value
+ * @param $field
+ * @return bool
+ */
protected function hasEqualsClause( $field ) {
return (
array_key_exists( $field, $this->mConds ) &&
function _unstub( $name = '_unstub', $level = 2 ) {
static $recursionLevel = 0;
- if ( !($GLOBALS[$this->mGlobal] instanceof StubObject) )
+ if ( !($GLOBALS[$this->mGlobal] instanceof StubObject) ) {
return $GLOBALS[$this->mGlobal]; // already unstubbed.
+ }
if ( get_class( $GLOBALS[$this->mGlobal] ) != $this->mClass ) {
$fname = __METHOD__.'-'.$this->mGlobal;
return $this->_call( $name, $args );
}
+ /**
+ * @return Language
+ */
function _newObject() {
global $wgLanguageCode;
$obj = Language::factory( $wgLanguageCode );
return $this->_call( $name, $args );
}
+ /**
+ * @return Language
+ */
function _newObject() {
return RequestContext::getMain()->getLang();
}
* we may create a real postprocessor or something that will replace this.
* It's called wrapper because for now it basically takes over MWTidy::tidy's task
* of wrapping the text in a xhtml block
- *
+ *
* This re-uses some of the parser's UNIQ tricks, though some of it is private so it's
* duplicated. Perhaps we should create an abstract marker hiding class.
*/
$this->mUniqPrefix = "\x7fUNIQ" .
dechex( mt_rand( 0, 0x7fffffff ) ) . dechex( mt_rand( 0, 0x7fffffff ) );
$this->mMarkerIndex = 0;
-
+
$wrappedtext = preg_replace_callback( ParserOutput::EDITSECTION_REGEX,
array( &$this, 'replaceEditSectionLinksCallback' ), $text );
*/
public static function checkErrors( $text, &$errorStr = null ) {
global $wgTidyInternal;
-
+
$retval = 0;
if( $wgTidyInternal ) {
$errorStr = self::execInternalTidy( $text, true, $retval );
2 => array( 'file', wfGetNull(), 'a' )
);
}
-
+
$readpipe = $stderr ? 2 : 1;
$pipes = array();
if ( !MWInit::classExists( 'tidy' ) ) {
wfWarn( "Unable to load internal tidy class." );
$retval = -1;
-
+
wfProfileOut( __METHOD__ );
return null;
}
"\n-->";
}
}
-
+
wfProfileOut( __METHOD__ );
return $cleansource;
}
/**
* Add header elements like block log entries, etc.
- * @return void
*/
protected function preText(){
$text = $this->msg( 'blockiptext' )->parse();
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
class PruneFileCache extends Maintenance {
+
+ protected $minSurviveTimestamp;
+
public function __construct() {
parent::__construct();
$this->mDescription = "Build file cache for content pages";
up-to-date, it will do nothing.
TEXT;
- $this->addOption( 'force', 'Run on all rows, even if the collation is ' .
+ $this->addOption( 'force', 'Run on all rows, even if the collation is ' .
'supposed to be up-to-date.' );
$this->addOption( 'previous-collation', 'Set the previous value of ' .
'$wgCategoryCollation here to speed up this script, especially if your ' .
# This is an old-style row, so the sortkey needs to be
# converted.
if ( $row->cl_sortkey == $title->getText()
- || $row->cl_sortkey == $title->getPrefixedText() ) {
+ || $row->cl_sortkey == $title->getPrefixedText() ) {
$prefix = '';
} else {
# Custom sortkey, use it as a prefix
if ( $force && $row ) {
$encFrom = $dbw->addQuotes( $row->cl_from );
$encTo = $dbw->addQuotes( $row->cl_to );
- $batchConds = array(
+ $batchConds = array(
"(cl_from = $encFrom AND cl_to > $encTo) " .
" OR cl_from > $encFrom" );
}
$count += $res->numRows();
$this->output( "$count done.\n" );
-
+
if ( ++$batchCount % self::SYNC_INTERVAL == 0 ) {
$this->output( "Waiting for slaves ... " );
wfWaitForSlaves();
}
$temporary = $this->useTemporaryTables || $dbType == 'postgres';
- $tables = $this->listTables();
$prefix = $dbType != 'oracle' ? 'parsertest_' : 'pt_';
$this->dbClone = new CloneDatabase( $this->db, $this->listTables(), $prefix );