*/
function wfProfileOut( $fn = '' ) {
global $hackwhere, $wgDBname, $haveProctitle;
- if( !$haveProctitle )
+ if( !$haveProctitle ) {
return;
- if( count( $hackwhere ) )
+ }
+ if( count( $hackwhere ) ) {
array_pop( $hackwhere );
- if( count( $hackwhere ) )
+ }
+ if( count( $hackwhere ) ) {
setproctitle( $hackwhere[count( $hackwhere )-1] . " [$wgDBname]" );
+ }
}
/**
global $wgUser, $wgRestrictionLevels;
$params = $this->extractRequestParams();
- $titleObj = null;
-
$titleObj = Title::newFromText( $params['title'] );
if ( !$titleObj ) {
$this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) );
$prop = array_flip( (array)$params['prop'] );
// Determine which messages should we print
- $messages_target = array();
if ( in_array( '*', $params['messages'] ) ) {
$message_names = array_keys( Language::getMessagesFor( 'en' ) );
sort( $message_names );
public function execute() {
$params = $this->extractRequestParams();
$result = $this->getResult();
- $r = array();
if ( !is_null( $params['prop'] ) ) {
$this->prop = array_flip( $params['prop'] );
} else {
$this->prop = array();
}
+
$r = $this->getCurrentUserInfo();
$result->addValue( 'query', $this->getModuleName(), $r );
}
global $wgUser;
$params = $this->extractRequestParams();
- $titleObj = null;
-
if ( !$wgUser->isAllowed( 'undelete' ) ) {
$this->dieUsageMsg( array( 'permdenied-undelete' ) );
}
} else {
$ts = false;
}
- $sql = '';
# If we were clever, we'd use this to cache.
$latestTimestamp = wfTimestamp( TS_MW, $ts );
$where[] = "img_timestamp >= '" . $dbr->timestamp( $from ) . "'";
$invertSort = true;
}
- $sql='SELECT img_size, img_name, img_user, img_user_text,'.
+ $sql = 'SELECT img_size, img_name, img_user, img_user_text,'.
"img_description,img_timestamp FROM $image";
if( $hidebotsql ) {
$wgOut->wrapWikiMsg( "<div class='mw-tags-intro'>\n$1\n</div>", 'tags-intro' );
// Write the headers
- $html = '';
$html = Xml::tags( 'tr', null, Xml::tags( 'th', null, wfMsgExt( 'tags-tag', 'parseinline' ) ) .
Xml::tags( 'th', null, wfMsgExt( 'tags-display-header', 'parseinline' ) ) .
Xml::tags( 'th', null, wfMsgExt( 'tags-description-header', 'parseinline' ) ) .
global $wgContLang;
- $tuplesAdded = $numBadLinks = $curRowsRead = 0; # counters etc
+ $numBadLinks = $curRowsRead = 0; # counters etc
$totalTuplesInserted = 0; # total tuples INSERTed into links_temp
$reportCurReadProgress = true; # whether or not to give progress reports while reading IDs from cur table
$report = $this->hasOption( 'report' );
$count = $this->doReassignEdits( $from, $to, !$this->hasOption( 'norc' ), $report );
# If reporting, and there were items, advise the user to run without --report
- if ( $report )
+ if ( $report ) {
$this->output( "Run the script again without --report to update.\n" );
+ }
} else {
$ton = $to->getName();
$this->error( "User '{$ton}' not found." );
exit( 1 );
}
- $rangeStart = 0;
$binSize = intval( pow( 10, floor( log10( $endId ) ) - 3 ) );
if ( $binSize < 100 ) {
$binSize = 100;