Added fname parameter to the query() call
[lhc/web/wiklou.git] / includes / RawPage.php
index a3b4fc2..3787617 100644 (file)
@@ -23,15 +23,15 @@ class RawPage {
        var $mSmaxage, $mMaxage;
        var $mContentType, $mExpandTemplates;
 
-       function __construct( &$article, $request = false ) {
+       function __construct( Article $article, $request = false ) {
                global $wgRequest, $wgInputEncoding, $wgSquidMaxage, $wgJsMimeType, $wgGroupPermissions;
 
                $allowedCTypes = array('text/x-wiki', $wgJsMimeType, 'text/css', 'application/x-zope-edit');
-               $this->mArticle =& $article;
-               $this->mTitle =& $article->mTitle;
+               $this->mArticle = $article;
+               $this->mTitle = $article->mTitle;
 
                if( $request === false ) {
-                       $this->mRequest =& $wgRequest;
+                       $this->mRequest = $wgRequest;
                } else {
                        $this->mRequest = $request;
                }
@@ -78,10 +78,6 @@ class RawPage {
                        $this->mGen = $gen;
                        if( is_null( $smaxage ) ) $smaxage = $wgSquidMaxage;
                        if($ctype == '') $ctype = 'text/css';
-               } elseif( $gen == 'js' ) {
-                       $this->mGen = $gen;
-                       if( is_null( $smaxage ) ) $smaxage = $wgSquidMaxage;
-                       if($ctype == '') $ctype = $wgJsMimeType;
                } else {
                        $this->mGen = false;
                }
@@ -169,8 +165,6 @@ class RawPage {
                        $sk->initPage( $wgOut );
                        if( $this->mGen == 'css' ) {
                                return $sk->generateUserStylesheet();
-                       } else if( $this->mGen == 'js' ) {
-                               return $sk->generateUserJs();
                        }
                } else {
                        return $this->getArticleText();