From f7ada91b09b29cb6489a54f6f7ad582be47ccea7 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 12 Sep 2014 11:39:36 -0700 Subject: [PATCH] RawAction: private variable removing m prefix + doc better Change-Id: I526ebcbb1429af42fa9e33cdf59d12c4854247f7 --- includes/actions/RawAction.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php index cd4e4ba107..d0d956ec36 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(); @@ -130,7 +134,7 @@ class RawAction extends FormlessAction { global $wgParser; # No longer used - if ( $this->mGen ) { + if ( $this->gen ) { return ''; } -- 2.20.1