X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=img_auth.php;h=885914171c2e2b7a16e3aa367affe864044e6bfa;hb=e0c3fd6f6ed9a17dc07f71649e5b535abeb6a30e;hp=f44cac0b97628730409020d7d16b61144846e9a3;hpb=8e30e6663afe287e3a1380b3f2dc4df72fbf5d5f;p=lhc%2Fweb%2Fwiklou.git diff --git a/img_auth.php b/img_auth.php index f44cac0b97..885914171c 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 <<