X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Factions%2FRawAction.php;h=727bed2015f3ff17c406ed4754063f7d9fb8bfc2;hb=39f36aa362dc4cf619e192c123a7c4b048e65931;hp=cd4e4ba1076dc1e3c4cedcb279961fe1ba8de80f;hpb=fea832ae52ad17bd68637559134942f57a35c925;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php index cd4e4ba107..727bed2015 100644 --- a/includes/actions/RawAction.php +++ b/includes/actions/RawAction.php @@ -33,7 +33,13 @@ * @ingroup Actions */ class RawAction extends FormlessAction { - private $mGen; + /** + * @var bool Does the request include a gen=css|javascript parameter + * @deprecated This used to be a string for "css" or "javascript" but + * it is no longer used. Setting this parameter results in empty content + * being served + */ + private $gen = false; public function getName() { return 'raw'; @@ -66,12 +72,10 @@ class RawAction extends FormlessAction { $smaxage = $request->getIntOrNull( 'smaxage' ); if ( $gen == 'css' || $gen == 'js' ) { - $this->mGen = $gen; + $this->gen = true; if ( $smaxage === null ) { $smaxage = $config->get( 'SquidMaxage' ); } - } else { - $this->mGen = false; } $contentType = $this->getContentType(); @@ -113,7 +117,7 @@ class RawAction extends FormlessAction { $response->header( 'HTTP/1.x 404 Not Found' ); } - if ( !wfRunHooks( 'RawPageViewBeforeOutput', array( &$this, &$text ) ) ) { + if ( !Hooks::run( 'RawPageViewBeforeOutput', array( &$this, &$text ) ) ) { wfDebug( __METHOD__ . ": RawPageViewBeforeOutput hook broke raw page output.\n" ); } @@ -130,7 +134,7 @@ class RawAction extends FormlessAction { global $wgParser; # No longer used - if ( $this->mGen ) { + if ( $this->gen ) { return ''; }