Per r72349 CR, bring gen=js behavior back, at least for now. It'd be nasty to serve...
authorRoan Kattouw <catrope@users.mediawiki.org>
Sat, 23 Oct 2010 15:42:19 +0000 (15:42 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sat, 23 Oct 2010 15:42:19 +0000 (15:42 +0000)
includes/RawPage.php

index 79ee383..1c99e5f 100644 (file)
@@ -82,6 +82,10 @@ class RawPage {
                        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;
                }
@@ -170,6 +174,8 @@ class RawPage {
                        $sk->initPage( $wgOut );
                        if( $this->mGen == 'css' ) {
                                return $sk->generateUserStylesheet();
+                       } else if( $this->mGen == 'js' ) {
+                               return $sk->generateUserJs();
                        }
                } else {
                        return $this->getArticleText();