dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c5295ae
)
More unused variables
author
Sam Reed
<reedy@users.mediawiki.org>
Tue, 30 Nov 2010 18:44:50 +0000
(18:44 +0000)
committer
Sam Reed
<reedy@users.mediawiki.org>
Tue, 30 Nov 2010 18:44:50 +0000
(18:44 +0000)
23 files changed:
includes/ConfEditor.php
patch
|
blob
|
history
includes/GlobalFunctions.php
patch
|
blob
|
history
includes/ImagePage.php
patch
|
blob
|
history
includes/MagicWord.php
patch
|
blob
|
history
includes/SiteConfiguration.php
patch
|
blob
|
history
includes/SquidPurgeClient.php
patch
|
blob
|
history
includes/StubObject.php
patch
|
blob
|
history
includes/Wiki.php
patch
|
blob
|
history
includes/db/DatabaseMysql.php
patch
|
blob
|
history
includes/db/LBFactory_Multi.php
patch
|
blob
|
history
includes/media/SVGMetadataExtractor.php
patch
|
blob
|
history
includes/specials/SpecialAllpages.php
patch
|
blob
|
history
includes/specials/SpecialLinkSearch.php
patch
|
blob
|
history
includes/specials/SpecialSearch.php
patch
|
blob
|
history
includes/specials/SpecialWatchlist.php
patch
|
blob
|
history
includes/upload/UploadBase.php
patch
|
blob
|
history
includes/upload/UploadStash.php
patch
|
blob
|
history
maintenance/fixSlaveDesync.php
patch
|
blob
|
history
maintenance/reassignEdits.php
patch
|
blob
|
history
maintenance/storage/checkStorage.php
patch
|
blob
|
history
maintenance/tests/parser/parserTest.inc
patch
|
blob
|
history
maintenance/tests/phpunit/includes/api/ApiUploadTest.php
patch
|
blob
|
history
maintenance/tests/phpunit/includes/api/RandomImageGenerator.php
patch
|
blob
|
history
diff --git
a/includes/ConfEditor.php
b/includes/ConfEditor.php
index
f240628
..
b08b77d
100644
(file)
--- a/
includes/ConfEditor.php
+++ b/
includes/ConfEditor.php
@@
-176,7
+176,7
@@
class ConfEditor {
// Has it got a comma already?
if ( strpos( $lastEltPath, '@extra' ) === false && !$lastEltInfo['hasComma'] ) {
// No comma, insert one after the value region
// Has it got a comma already?
if ( strpos( $lastEltPath, '@extra' ) === false && !$lastEltInfo['hasComma'] ) {
// No comma, insert one after the value region
- list(
$start
, $end ) = $this->findValueRegion( $lastEltPath );
+ list( , $end ) = $this->findValueRegion( $lastEltPath );
$this->replaceSourceRegion( $end - 1, $end - 1, ',' );
}
$this->replaceSourceRegion( $end - 1, $end - 1, ',' );
}
@@
-184,7
+184,7
@@
class ConfEditor {
list( $start, $end ) = $this->findDeletionRegion( $lastEltPath );
if ( $key === null ) {
list( $start, $end ) = $this->findDeletionRegion( $lastEltPath );
if ( $key === null ) {
- list( $indent,
$arrowIndent
) = $this->getIndent( $start );
+ list( $indent, ) = $this->getIndent( $start );
$textToInsert = "$indent$value,";
} else {
list( $indent, $arrowIndent ) =
$textToInsert = "$indent$value,";
} else {
list( $indent, $arrowIndent ) =
@@
-202,12
+202,12
@@
class ConfEditor {
if ( $firstEltPath === false ) {
throw new MWException( "Can't find array element of \"$path\"" );
}
if ( $firstEltPath === false ) {
throw new MWException( "Can't find array element of \"$path\"" );
}
- list( $start,
$end
) = $this->findDeletionRegion( $firstEltPath );
+ list( $start, ) = $this->findDeletionRegion( $firstEltPath );
$info = $this->pathInfo[$firstEltPath];
// Make the text to insert
if ( $key === null ) {
$info = $this->pathInfo[$firstEltPath];
// Make the text to insert
if ( $key === null ) {
- list( $indent,
$arrowIndent
) = $this->getIndent( $start );
+ list( $indent, ) = $this->getIndent( $start );
$textToInsert = "$indent$value,";
} else {
list( $indent, $arrowIndent ) =
$textToInsert = "$indent$value,";
} else {
list( $indent, $arrowIndent ) =
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
0e977ba
..
43c8932
100644
(file)
--- a/
includes/GlobalFunctions.php
+++ b/
includes/GlobalFunctions.php
@@
-214,7
+214,7
@@
function wfArrayDiff2_cmp( $a, $b ) {
} else {
reset( $a );
reset( $b );
} else {
reset( $a );
reset( $b );
- while( ( list(
$keyA, $valueA ) = each( $a ) ) && ( list( $keyB
, $valueB ) = each( $b ) ) ) {
+ while( ( list(
, $valueA ) = each( $a ) ) && ( list(
, $valueB ) = each( $b ) ) ) {
$cmp = strcmp( $valueA, $valueB );
if ( $cmp !== 0 ) {
return $cmp;
$cmp = strcmp( $valueA, $valueB );
if ( $cmp !== 0 ) {
return $cmp;
diff --git
a/includes/ImagePage.php
b/includes/ImagePage.php
index
e239a79
..
6676ea8
100644
(file)
--- a/
includes/ImagePage.php
+++ b/
includes/ImagePage.php
@@
-299,7
+299,6
@@
class ImagePage extends Article {
$this->loadFile();
$this->loadFile();
- $full_url = $this->displayImg->getURL();
$sizeSel = intval( $wgUser->getOption( 'imagesize' ) );
if ( !isset( $wgImageLimits[$sizeSel] ) ) {
$sizeSel = User::getDefaultOption( 'imagesize' );
$sizeSel = intval( $wgUser->getOption( 'imagesize' ) );
if ( !isset( $wgImageLimits[$sizeSel] ) ) {
$sizeSel = User::getDefaultOption( 'imagesize' );
diff --git
a/includes/MagicWord.php
b/includes/MagicWord.php
index
cd9769e
..
4698960
100644
(file)
--- a/
includes/MagicWord.php
+++ b/
includes/MagicWord.php
@@
-720,7
+720,7
@@
class MagicWordArray {
continue;
}
if ( preg_match( $regex, $text, $m ) ) {
continue;
}
if ( preg_match( $regex, $text, $m ) ) {
- list( $id,
$param
) = $this->parseMatch( $m );
+ list( $id, ) = $this->parseMatch( $m );
if ( strlen( $m[0] ) >= strlen( $text ) ) {
$text = '';
} else {
if ( strlen( $m[0] ) >= strlen( $text ) ) {
$text = '';
} else {
diff --git
a/includes/SiteConfiguration.php
b/includes/SiteConfiguration.php
index
db2910d
..
f4a4576
100644
(file)
--- a/
includes/SiteConfiguration.php
+++ b/
includes/SiteConfiguration.php
@@
-293,8
+293,9
@@
class SiteConfiguration {
$ret = call_user_func_array( $this->siteParamsCallback, array( $this, $wiki ) );
# Validate the returned value
$ret = call_user_func_array( $this->siteParamsCallback, array( $this, $wiki ) );
# Validate the returned value
- if( !is_array( $ret ) )
+ if( !is_array( $ret ) )
{
return $default;
return $default;
+ }
foreach( $default as $name => $def ){
if( !isset( $ret[$name] ) || ( is_array( $default[$name] ) && !is_array( $ret[$name] ) ) )
foreach( $default as $name => $def ){
if( !isset( $ret[$name] ) || ( is_array( $default[$name] ) && !is_array( $ret[$name] ) ) )
diff --git
a/includes/SquidPurgeClient.php
b/includes/SquidPurgeClient.php
index
65da5c1
..
1b315e5
100644
(file)
--- a/
includes/SquidPurgeClient.php
+++ b/
includes/SquidPurgeClient.php
@@
-265,7
+265,7
@@
class SquidPurgeClient {
$this->markDown();
return;
}
$this->markDown();
return;
}
- list(
$all, $major, $minor
, $status, $reason ) = $m;
+ list(
, ,
, $status, $reason ) = $m;
$status = intval( $status );
if ( $status !== 200 && $status !== 404 ) {
$this->log( "unexpected status code: $status $reason" );
$status = intval( $status );
if ( $status !== 200 && $status !== 404 ) {
$this->log( "unexpected status code: $status $reason" );
@@
-356,12
+356,12
@@
class SquidPurgeClientPool {
}
foreach ( $readSockets as $key => $socket ) {
}
foreach ( $readSockets as $key => $socket ) {
- list( $clientIndex,
$i
) = explode( '/', $key );
+ list( $clientIndex, ) = explode( '/', $key );
$client = $this->clients[$clientIndex];
$client->doReads();
}
foreach ( $writeSockets as $key => $socket ) {
$client = $this->clients[$clientIndex];
$client->doReads();
}
foreach ( $writeSockets as $key => $socket ) {
- list( $clientIndex,
$i
) = explode( '/', $key );
+ list( $clientIndex, ) = explode( '/', $key );
$client = $this->clients[$clientIndex];
$client->doWrites();
}
$client = $this->clients[$clientIndex];
$client->doWrites();
}
diff --git
a/includes/StubObject.php
b/includes/StubObject.php
index
ef2d973
..
299bfce
100644
(file)
--- a/
includes/StubObject.php
+++ b/
includes/StubObject.php
@@
-100,7
+100,7
@@
class StubObject {
throw new MWException( "Unstub loop detected on call of \${$this->mGlobal}->$name from $caller\n" );
}
wfDebug( "Unstubbing \${$this->mGlobal} on call of \${$this->mGlobal}::$name from $caller\n" );
throw new MWException( "Unstub loop detected on call of \${$this->mGlobal}->$name from $caller\n" );
}
wfDebug( "Unstubbing \${$this->mGlobal} on call of \${$this->mGlobal}::$name from $caller\n" );
- $
obj = $
GLOBALS[$this->mGlobal] = $this->_newObject();
+ $GLOBALS[$this->mGlobal] = $this->_newObject();
--$recursionLevel;
wfProfileOut( $fname );
}
--$recursionLevel;
wfProfileOut( $fname );
}
diff --git
a/includes/Wiki.php
b/includes/Wiki.php
index
feebcde
..
e961090
100644
(file)
--- a/
includes/Wiki.php
+++ b/
includes/Wiki.php
@@
-108,7
+108,7
@@
class MediaWiki {
if( $wgRequest->getVal( 'printable' ) === 'yes' ) {
$wgOut->setPrintable();
}
if( $wgRequest->getVal( 'printable' ) === 'yes' ) {
$wgOut->setPrintable();
}
- $ret = null;
+
$curid = $wgRequest->getInt( 'curid' );
if( $curid ) {
// URLs like this are generated by RC, because rc_title isn't always accurate
$curid = $wgRequest->getInt( 'curid' );
if( $curid ) {
// URLs like this are generated by RC, because rc_title isn't always accurate
diff --git
a/includes/db/DatabaseMysql.php
b/includes/db/DatabaseMysql.php
index
07fcdd7
..
bc41cb1
100644
(file)
--- a/
includes/db/DatabaseMysql.php
+++ b/
includes/db/DatabaseMysql.php
@@
-90,7
+90,6
@@
class DatabaseMysql extends DatabaseBase {
wfDebug( "DB connection error\n" );
wfDebug( "Server: $server, User: $user, Password: " .
substr( $password, 0, 3 ) . "..., error: " . mysql_error() . "\n" );
wfDebug( "DB connection error\n" );
wfDebug( "Server: $server, User: $user, Password: " .
substr( $password, 0, 3 ) . "..., error: " . mysql_error() . "\n" );
- $success = false;
}
wfProfileOut("dbconnect-$server");
}
wfProfileOut("dbconnect-$server");
diff --git
a/includes/db/LBFactory_Multi.php
b/includes/db/LBFactory_Multi.php
index
3089bd7
..
0d411ec
100644
(file)
--- a/
includes/db/LBFactory_Multi.php
+++ b/
includes/db/LBFactory_Multi.php
@@
-99,7
+99,7
@@
class LBFactory_Multi extends LBFactory {
}
function newMainLB( $wiki = false ) {
}
function newMainLB( $wiki = false ) {
- list( $dbName,
$prefix
) = $this->getDBNameAndPrefix( $wiki );
+ list( $dbName, ) = $this->getDBNameAndPrefix( $wiki );
$section = $this->getSectionForWiki( $wiki );
$groupLoads = array();
if ( isset( $this->groupLoadsByDB[$dbName] ) ) {
$section = $this->getSectionForWiki( $wiki );
$groupLoads = array();
if ( isset( $this->groupLoadsByDB[$dbName] ) ) {
diff --git
a/includes/media/SVGMetadataExtractor.php
b/includes/media/SVGMetadataExtractor.php
index
a46d838
..
93654fa
100644
(file)
--- a/
includes/media/SVGMetadataExtractor.php
+++ b/
includes/media/SVGMetadataExtractor.php
@@
-130,7
+130,6
@@
class SVGReader {
$keepReading = $this->reader->read();
while( $keepReading ) {
if( $this->reader->name == $name && $this->reader->nodeType == XmlReader::END_ELEMENT ) {
$keepReading = $this->reader->read();
while( $keepReading ) {
if( $this->reader->name == $name && $this->reader->nodeType == XmlReader::END_ELEMENT ) {
- $keepReading = false;
break;
} elseif( $this->reader->nodeType == XmlReader::TEXT ){
$this->metadata[$metafield] = $this->reader->value;
break;
} elseif( $this->reader->nodeType == XmlReader::TEXT ){
$this->metadata[$metafield] = $this->reader->value;
@@
-169,9
+168,8
@@
class SVGReader {
while( $keepReading ) {
if( $this->reader->name == $name && $this->reader->depth <= $exitDepth
&& $this->reader->nodeType == XmlReader::END_ELEMENT ) {
while( $keepReading ) {
if( $this->reader->name == $name && $this->reader->depth <= $exitDepth
&& $this->reader->nodeType == XmlReader::END_ELEMENT ) {
- $keepReading = false;
break;
break;
- } elseif
( $this->reader->nodeType == XmlReader::ELEMENT )
{
+ } elseif
( $this->reader->nodeType == XmlReader::ELEMENT )
{
switch( $this->reader->name ) {
case 'animate':
case 'set':
switch( $this->reader->name ) {
case 'animate':
case 'set':
diff --git
a/includes/specials/SpecialAllpages.php
b/includes/specials/SpecialAllpages.php
index
487d44d
..
7bb9cdd
100644
(file)
--- a/
includes/specials/SpecialAllpages.php
+++ b/
includes/specials/SpecialAllpages.php
@@
-307,7
+307,7
@@
class SpecialAllpages extends IncludableSpecialPage {
$namespace = NS_MAIN;
} else {
list( $namespace, $fromKey, $from ) = $fromList;
$namespace = NS_MAIN;
} else {
list( $namespace, $fromKey, $from ) = $fromList;
- list(
$namespace2
, $toKey, $to ) = $toList;
+ list( , $toKey, $to ) = $toList;
$dbr = wfGetDB( DB_SLAVE );
$conds = array(
$dbr = wfGetDB( DB_SLAVE );
$conds = array(
diff --git
a/includes/specials/SpecialLinkSearch.php
b/includes/specials/SpecialLinkSearch.php
index
ff76c70
..
124ede1
100644
(file)
--- a/
includes/specials/SpecialLinkSearch.php
+++ b/
includes/specials/SpecialLinkSearch.php
@@
-179,7
+179,7
@@
class LinkSearchPage extends QueryPage {
*/
function doQuery( $offset, $limit, $shownavigation=true ) {
global $wgOut;
*/
function doQuery( $offset, $limit, $shownavigation=true ) {
global $wgOut;
- list( $this->mMungedQuery,
$clause
) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt );
+ list( $this->mMungedQuery, ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt );
if( $this->mMungedQuery === false ) {
$wgOut->addWikiMsg( 'linksearch-error' );
} else {
if( $this->mMungedQuery === false ) {
$wgOut->addWikiMsg( 'linksearch-error' );
} else {
diff --git
a/includes/specials/SpecialSearch.php
b/includes/specials/SpecialSearch.php
index
2a0c9ef
..
e82e8f4
100644
(file)
--- a/
includes/specials/SpecialSearch.php
+++ b/
includes/specials/SpecialSearch.php
@@
-341,7
+341,6
@@
class SpecialSearch {
protected function setupPage( $term ) {
global $wgOut;
// Figure out the active search profile header
protected function setupPage( $term ) {
global $wgOut;
// Figure out the active search profile header
- $nsAllSet = array_keys( SearchEngine::searchableNamespaces() );
if( $this->searchAdvanced ) {
$this->active = 'advanced';
} else {
if( $this->searchAdvanced ) {
$this->active = 'advanced';
} else {
diff --git
a/includes/specials/SpecialWatchlist.php
b/includes/specials/SpecialWatchlist.php
index
4b622ba
..
b64af98
100644
(file)
--- a/
includes/specials/SpecialWatchlist.php
+++ b/
includes/specials/SpecialWatchlist.php
@@
-174,9
+174,7
@@
function wfSpecialWatchlist( $par ) {
# Possible where conditions
$conds = array();
# Possible where conditions
$conds = array();
- if( $days <= 0 ) {
- $andcutoff = '';
- } else {
+ if( $days > 0 ) {
$conds[] = "rc_timestamp > '".$dbr->timestamp( time() - intval( $days * 86400 ) )."'";
}
$conds[] = "rc_timestamp > '".$dbr->timestamp( time() - intval( $days * 86400 ) )."'";
}
diff --git
a/includes/upload/UploadBase.php
b/includes/upload/UploadBase.php
index
5c970d8
..
1e3414f
100644
(file)
--- a/
includes/upload/UploadBase.php
+++ b/
includes/upload/UploadBase.php
@@
-440,7
+440,6
@@
abstract class UploadBase {
$localFile = $this->getLocalFile();
$filename = $localFile->getName();
$n = strrpos( $filename, '.' );
$localFile = $this->getLocalFile();
$filename = $localFile->getName();
$n = strrpos( $filename, '.' );
- $partname = $n ? substr( $filename, 0, $n ) : $filename;
/**
* Check whether the resulting filename is different from the desired one,
/**
* Check whether the resulting filename is different from the desired one,
diff --git
a/includes/upload/UploadStash.php
b/includes/upload/UploadStash.php
index
89f78b3
..
94c38c7
100644
(file)
--- a/
includes/upload/UploadStash.php
+++ b/
includes/upload/UploadStash.php
@@
-303,7
+303,7
@@
class UploadStashFile extends UnregisteredLocalFile {
return null;
}
$extension = $this->getExtension();
return null;
}
$extension = $this->getExtension();
- list( $thumbExt,
$thumbMime
) = $this->handler->getThumbType( $extension, $this->getMimeType(), $params );
+ list( $thumbExt, ) = $this->handler->getThumbType( $extension, $this->getMimeType(), $params );
$thumbName = $this->getHandler()->makeParamString( $params ) . '-' . $urlName;
if ( $thumbExt != $extension ) {
$thumbName .= ".$thumbExt";
$thumbName = $this->getHandler()->makeParamString( $params ) . '-' . $urlName;
if ( $thumbExt != $extension ) {
$thumbName .= ".$thumbExt";
diff --git
a/maintenance/fixSlaveDesync.php
b/maintenance/fixSlaveDesync.php
index
9605e16
..
d26c12e
100644
(file)
--- a/
maintenance/fixSlaveDesync.php
+++ b/
maintenance/fixSlaveDesync.php
@@
-41,8
+41,6
@@
class FixSlaveDesync extends Maintenance {
if ( $this->hasArg() ) {
$this->desyncFixPage( $this->getArg() );
} else {
if ( $this->hasArg() ) {
$this->desyncFixPage( $this->getArg() );
} else {
- $dbw = wfGetDB( DB_MASTER );
- $maxPage = $dbw->selectField( 'page', 'MAX(page_id)', false, __METHOD__ );
$corrupt = $this->findPageLatestCorruption();
foreach ( $corrupt as $id => $dummy ) {
$this->desyncFixPage( $id );
$corrupt = $this->findPageLatestCorruption();
foreach ( $corrupt as $id => $dummy ) {
$this->desyncFixPage( $id );
diff --git
a/maintenance/reassignEdits.php
b/maintenance/reassignEdits.php
index
16f9e3f
..
63e41f4
100644
(file)
--- a/
maintenance/reassignEdits.php
+++ b/
maintenance/reassignEdits.php
@@
-45,7
+45,7
@@
class ReassignEdits extends Maintenance {
if ( $to->getId() || $this->hasOption( 'force' ) ) {
# Reassign the edits
$report = $this->hasOption( 'report' );
if ( $to->getId() || $this->hasOption( 'force' ) ) {
# Reassign the edits
$report = $this->hasOption( 'report' );
- $
count = $
this->doReassignEdits( $from, $to, !$this->hasOption( 'norc' ), $report );
+ $this->doReassignEdits( $from, $to, !$this->hasOption( 'norc' ), $report );
# If reporting, and there were items, advise the user to run without --report
if ( $report ) {
$this->output( "Run the script again without --report to update.\n" );
# If reporting, and there were items, advise the user to run without --report
if ( $report ) {
$this->output( "Run the script again without --report to update.\n" );
diff --git
a/maintenance/storage/checkStorage.php
b/maintenance/storage/checkStorage.php
index
d991551
..
e0b4e80
100644
(file)
--- a/
maintenance/storage/checkStorage.php
+++ b/
maintenance/storage/checkStorage.php
@@
-145,7
+145,7
@@
class CheckStorage {
$this->error( 'restore text', "Error: invalid URL \"{$row->old_text}\"", $row->old_id );
continue;
}
$this->error( 'restore text', "Error: invalid URL \"{$row->old_text}\"", $row->old_id );
continue;
}
- list( $proto,
$path
) = $urlParts;
+ list( $proto, ) = $urlParts;
if ( $proto != 'DB' ) {
$this->error( 'restore text', "Error: invalid external protocol \"$proto\"", $row->old_id );
continue;
if ( $proto != 'DB' ) {
$this->error( 'restore text', "Error: invalid external protocol \"$proto\"", $row->old_id );
continue;
diff --git
a/maintenance/tests/parser/parserTest.inc
b/maintenance/tests/parser/parserTest.inc
index
ac09981
..
c553550
100644
(file)
--- a/
maintenance/tests/parser/parserTest.inc
+++ b/
maintenance/tests/parser/parserTest.inc
@@
-429,7
+429,6
@@
class ParserTest {
$titleText = 'Parser test';
}
$titleText = 'Parser test';
}
- $noxml = isset( $opts['noxml'] );
$local = isset( $opts['local'] );
$preprocessor = isset( $opts['preprocessor'] ) ? $opts['preprocessor'] : null;
$parser = $this->getParser( $preprocessor );
$local = isset( $opts['local'] );
$preprocessor = isset( $opts['preprocessor'] ) ? $opts['preprocessor'] : null;
$parser = $this->getParser( $preprocessor );
diff --git
a/maintenance/tests/phpunit/includes/api/ApiUploadTest.php
b/maintenance/tests/phpunit/includes/api/ApiUploadTest.php
index
f213dcc
..
115de86
100644
(file)
--- a/
maintenance/tests/phpunit/includes/api/ApiUploadTest.php
+++ b/
maintenance/tests/phpunit/includes/api/ApiUploadTest.php
@@
-182,7
+182,7
@@
class ApiUploadTest extends ApiTestCase {
'lgname' => $user->username,
'lgpassword' => $user->password
);
'lgname' => $user->username,
'lgpassword' => $user->password
);
- list( $result,
$request, $session
) = $this->doApiRequest( $params );
+ list( $result,
,
) = $this->doApiRequest( $params );
$this->assertArrayHasKey( "login", $result );
$this->assertArrayHasKey( "result", $result['login'] );
$this->assertEquals( "NeedToken", $result['login']['result'] );
$this->assertArrayHasKey( "login", $result );
$this->assertArrayHasKey( "result", $result['login'] );
$this->assertEquals( "NeedToken", $result['login']['result'] );
@@
-194,7
+194,7
@@
class ApiUploadTest extends ApiTestCase {
'lgname' => $user->username,
'lgpassword' => $user->password
);
'lgname' => $user->username,
'lgpassword' => $user->password
);
- list( $result,
$request
, $session ) = $this->doApiRequest( $params );
+ list( $result, , $session ) = $this->doApiRequest( $params );
$this->assertArrayHasKey( "login", $result );
$this->assertArrayHasKey( "result", $result['login'] );
$this->assertEquals( "Success", $result['login']['result'] );
$this->assertArrayHasKey( "login", $result );
$this->assertArrayHasKey( "result", $result['login'] );
$this->assertEquals( "Success", $result['login']['result'] );
@@
-280,7
+280,7
@@
class ApiUploadTest extends ApiTestCase {
$exception = false;
try {
$exception = false;
try {
- list( $result,
$request, $session
) = $this->doApiRequestWithToken( $params, $session );
+ list( $result,
,
) = $this->doApiRequestWithToken( $params, $session );
} catch ( UsageException $e ) {
$exception = true;
}
} catch ( UsageException $e ) {
$exception = true;
}
@@
-324,7
+324,7
@@
class ApiUploadTest extends ApiTestCase {
$exception = false;
try {
$exception = false;
try {
-
list( $result, $request, $session ) =
$this->doApiRequestWithToken( $params, $session );
+ $this->doApiRequestWithToken( $params, $session );
} catch ( UsageException $e ) {
$this->assertContains( 'The file you submitted was empty', $e->getMessage() );
$exception = true;
} catch ( UsageException $e ) {
$this->assertContains( 'The file you submitted was empty', $e->getMessage() );
$exception = true;
@@
-378,7
+378,7
@@
class ApiUploadTest extends ApiTestCase {
$exception = false;
try {
$exception = false;
try {
- list( $result,
$request
, $session ) = $this->doApiRequestWithToken( $params, $session );
+ list( $result, , $session ) = $this->doApiRequestWithToken( $params, $session );
} catch ( UsageException $e ) {
$exception = true;
}
} catch ( UsageException $e ) {
$exception = true;
}
@@
-394,7
+394,7
@@
class ApiUploadTest extends ApiTestCase {
$exception = false;
try {
$exception = false;
try {
- list( $result,
$request, $session
) = $this->doApiRequestWithToken( $params, $session );
+ list( $result,
,
) = $this->doApiRequestWithToken( $params, $session );
} catch ( UsageException $e ) {
$exception = true;
}
} catch ( UsageException $e ) {
$exception = true;
}
diff --git
a/maintenance/tests/phpunit/includes/api/RandomImageGenerator.php
b/maintenance/tests/phpunit/includes/api/RandomImageGenerator.php
index
f544a71
..
e16b6c4
100644
(file)
--- a/
maintenance/tests/phpunit/includes/api/RandomImageGenerator.php
+++ b/
maintenance/tests/phpunit/includes/api/RandomImageGenerator.php
@@
-204,12
+204,10
@@
class RandomImageGenerator {
$command = wfEscapeShellArg( $wgImageMagickConvertCommand ) . " " . implode( " ", $args );
$retval = null;
$command = wfEscapeShellArg( $wgImageMagickConvertCommand ) . " " . implode( " ", $args );
$retval = null;
-
$output =
wfShellExec( $command, $retval );
+ wfShellExec( $command, $retval );
return ( $retval === 0 );
}
return ( $retval === 0 );
}
-
-
/**
* Generate a string of random colors for ImageMagick, like "rgb(12, 37, 98)"
*
/**
* Generate a string of random colors for ImageMagick, like "rgb(12, 37, 98)"
*