$result = '' in Title->checkPermissionHooks

Fixup $session in ApiWatchTest
This commit is contained in:
Sam Reed 2010-09-02 22:08:09 +00:00
parent c5ba4b459f
commit 898d3438c4
3 changed files with 4 additions and 3 deletions

View file

@ -1316,6 +1316,7 @@ class Title {
*/
private function checkPermissionHooks( $action, $user, $errors, $doExpensiveQueries, $short ) {
// Use getUserPermissionsErrors instead
$result = '';
if ( !wfRunHooks( 'userCan', array( &$this, &$user, $action, &$result ) ) ) {
return $result ? array() : array( array( 'badaccess-group0' ) );
}

View file

@ -14,7 +14,7 @@
class GIFHandler extends BitmapHandler {
function getMetadata( $image, $filename ) {
if ( !isset($image->parsedGIFMetadata) ) {
if ( !isset( $image->parsedGIFMetadata ) ) {
try {
$image->parsedGIFMetadata = GIFMetadataExtractor::getMetadata( $filename );
} catch( Exception $e ) {
@ -24,7 +24,7 @@ class GIFHandler extends BitmapHandler {
}
}
return serialize($image->parsedGIFMetadata);
return serialize( $image->parsedGIFMetadata );
}

View file

@ -21,7 +21,7 @@ class ApiWatchTest extends ApiTestSetup {
function doApiRequest( $params, $data = null ) {
$_SESSION = isset( $data[2] ) ? $data[2] : array();
$req = new FauxRequest( $params, true, $session );
$req = new FauxRequest( $params, true, $_SESSION );
$module = new ApiMain( $req, true );
$module->execute();