RawAction: private variable removing m prefix + doc better
authorChad Horohoe <chadh@wikimedia.org>
Fri, 12 Sep 2014 18:39:36 +0000 (11:39 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Fri, 12 Sep 2014 18:39:36 +0000 (11:39 -0700)
Change-Id: I526ebcbb1429af42fa9e33cdf59d12c4854247f7

includes/actions/RawAction.php

index cd4e4ba..d0d956e 100644 (file)
  * @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 '';
                }