if ( $safe ) {
global $wgFileBlacklist, $wgCheckFileExtensions, $wgStrictFileExtensions,
$wgFileExtensions, $wgVerifyMimeType, $wgMimeTypeBlacklist;
- list( $partName, $extList ) = UploadBase::splitExtensions( $filename );
+ list( , $extList ) = UploadBase::splitExtensions( $filename );
if ( UploadBase::checkFileExtensionList( $extList, $wgFileBlacklist ) ) {
return 'unknown/unknown';
}
$this->mPassword = $password;
$this->mDBname = $dbName;
- $success = false;
-
wfProfileIn("dbconnect-$server");
# The kernel's default SYN retransmission period is far too slow for us,
if ( $this->lastWiki === $wiki ) {
return $this->lastSection;
}
- list( $dbName, $prefix ) = $this->getDBNameAndPrefix( $wiki );
+ list( $dbName, ) = $this->getDBNameAndPrefix( $wiki );
if ( isset( $this->sectionsByDB[$dbName] ) ) {
$section = $this->sectionsByDB[$dbName];
} else {
$query = false;
$current = null;
foreach ( $this->internals as $ns => $entries ) {
- foreach ( $entries as $index => $entry ) {
+ foreach ( $entries as $entry ) {
$title = $entry['title'];
$pdbk = $entry['pdbk'];
/* Methods */
public function __construct( ResourceLoader $resourceLoader, WebRequest $request ) {
- global $wgLang, $wgDefaultSkin, $wgResourceLoaderDebug;
+ global $wgDefaultSkin, $wgResourceLoaderDebug;
$this->resourceLoader = $resourceLoader;
$this->request = $request;
public static function isValidISBN( $isbn ) {
$isbn = self::cleanIsbn( $isbn );
$sum = 0;
- $check = -1;
if( strlen( $isbn ) == 13 ) {
for( $i = 0; $i < 12; $i++ ) {
if($i % 2 == 0) {
$namespace = NS_MAIN;
} else {
list( $namespace, $prefixKey, $prefix ) = $prefixList;
- list( /* $fromNs */, $fromKey, $from ) = $fromList;
+ list( , $fromKey, ) = $fromList;
### FIXME: should complain if $fromNs != $namespace
// prevent callers from doing standard HTML output -- we'll take it from here
$wgOut->disable();
- $code = 500;
- $message = 'Unknown error';
-
if ( !isset( $subPage ) || $subPage === '' ) {
// the user probably visited the page just to see what would happen, so explain it a bit.
$code = '400';
throw $e;
}
- list( $dummy, $width, $origKey ) = $matches;
+ list( , $width, $origKey ) = $matches;
// do not trap exceptions, if key is in bad format, or file not found,
// let exceptions propagate to caller.
if ( $total ) {
# Reassign edits
$this->output( "\nReassigning current edits..." );
- $res = $dbw->update( 'revision', $this->userSpecification( $to, 'rev_user', 'rev_user_text' ), $this->userConditions( $from, 'rev_user', 'rev_user_text' ), __METHOD__ );
+ $dbw->update( 'revision', $this->userSpecification( $to, 'rev_user', 'rev_user_text' ),
+ $this->userConditions( $from, 'rev_user', 'rev_user_text' ), __METHOD__ );
$this->output( "done.\nReassigning deleted edits..." );
- $res = $dbw->update( 'archive', $this->userSpecification( $to, 'ar_user', 'ar_user_text' ), $this->userConditions( $from, 'ar_user', 'ar_user_text' ), __METHOD__ );
+ $dbw->update( 'archive', $this->userSpecification( $to, 'ar_user', 'ar_user_text' ),
+ $this->userConditions( $from, 'ar_user', 'ar_user_text' ), __METHOD__ );
$this->output( "done.\n" );
# Update recent changes if required
if ( $rc ) {
$this->output( "Updating recent changes..." );
- $dbw->update( 'recentchanges', $this->userSpecification( $to, 'rc_user', 'rc_user_text' ), $this->userConditions( $from, 'rc_user', 'rc_user_text' ), __METHOD__ );
+ $dbw->update( 'recentchanges', $this->userSpecification( $to, 'rc_user', 'rc_user_text' ),
+ $this->userConditions( $from, 'rc_user', 'rc_user_text' ), __METHOD__ );
$this->output( "done.\n" );
}
}
}
static function setUp() {
- global $wgParser, $wgParserConf, $IP, $messageMemc, $wgMemc, $wgDeferredUpdateList,
+ global $wgParser, $wgParserConf, $IP, $wgDeferredUpdateList,
$wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache,
- $wgMessageCache, $wgUseDatabaseMessages, $wgMsgCacheExpiry, $parserMemc,
+ $wgMessageCache, $wgUseDatabaseMessages, $wgMsgCacheExpiry,
$wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo,
$wgThumbnailScriptPath, $wgScriptPath,
$wgArticlePath, $wgStyleSheetPath, $wgScript, $wgStylePath;
}
function updateText( $text ) {
- list( $title, $resultText ) = $this->update( $text );
+ list( , $resultText ) = $this->update( $text );
$resultText = trim( $resultText ); // abstract from some implementation details
return $resultText;
}
}
function setUp() {
- global $wgParser, $wgParserConf, $IP, $messageMemc, $wgMemc, $wgDeferredUpdateList,
+ global $wgParser, $wgParserConf, $IP, $wgDeferredUpdateList,
$wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache,
- $wgMessageCache, $wgUseDatabaseMessages, $wgMsgCacheExpiry, $parserMemc,
+ $wgMessageCache, $wgUseDatabaseMessages, $wgMsgCacheExpiry,
$wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo,
$wgThumbnailScriptPath, $wgScriptPath,
$wgArticlePath, $wgStyleSheetPath, $wgScript, $wgStylePath;
}
public function execute() {
- $quiet = $this->hasOption( 'q' );
$maxLockTime = $this->getOption( 'l', 20 );
- $lockTime = time();
$dbw = wfGetDB( DB_MASTER );
if ( $dbw->getType() !== 'mysql' ) {