From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- img_auth.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'img_auth.php') diff --git a/img_auth.php b/img_auth.php index f44cac0b..88591417 100644 --- a/img_auth.php +++ b/img_auth.php @@ -46,11 +46,9 @@ $wgArticlePath = false; # Don't let a "/*" article path clober our action path $wgActionPaths = array( "$wgUploadPath/" ); wfImageAuthMain(); -wfLogProfilingData(); -// Commit and close up! -$factory = wfGetLBFactory(); -$factory->commitMasterChanges(); -$factory->shutdown(); + +$mediawiki = new MediaWiki(); +$mediawiki->doPostOutputShutdown( 'fast' ); function wfImageAuthMain() { global $wgImgAuthUrlPathMap; @@ -151,7 +149,7 @@ function wfImageAuthMain() { // Run hook for extension authorization plugins /** @var $result array */ $result = null; - if ( !wfRunHooks( 'ImgAuthBeforeStream', array( &$title, &$path, &$name, &$result ) ) ) { + if ( !Hooks::run( 'ImgAuthBeforeStream', array( &$title, &$path, &$name, &$result ) ) ) { wfForbidden( $result[0], $result[1], array_slice( $result, 2 ) ); return; } @@ -197,7 +195,7 @@ function wfForbidden( $msg1, $msg2 ) { wfMessage( $msg2, $args )->inLanguage( 'en' )->text() ); - header( 'HTTP/1.0 403 Forbidden' ); + HttpStatus::header( 403 ); header( 'Cache-Control: no-cache' ); header( 'Content-Type: text/html; charset=utf-8' ); echo <<