* Fix hphpi mode in run-server, it wasn't quite working properly
authorTim Starling <tstarling@users.mediawiki.org>
Tue, 31 May 2011 05:50:48 +0000 (05:50 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Tue, 31 May 2011 05:50:48 +0000 (05:50 +0000)
includes/actions/PurgeAction.php
maintenance/hiphop/run-server
maintenance/hiphop/server.conf

index 74f6e7d..29cbf3a 100644 (file)
@@ -57,7 +57,7 @@ class PurgeAction extends FormAction {
        }
 
        /**
-        * purge is slightly wierd because it can be either formed or formless depending
+        * purge is slightly weird because it can be either formed or formless depending
         * on user permissions
         */
        public function show() {
index 3201689..0ad4313 100755 (executable)
@@ -41,6 +41,7 @@ class RunHipHopServer extends Maintenance {
                                '-c', "$thisDir/server.conf",
                                '-v', "Server.SourceRoot=$sourceBase",
                                '-v', "Server.IncludeSearchPaths.0=$sourceBase",
+                               '-v', 'ServerVariables.MW_COMPILED=1',
                                '--mode=server',
                                '--port=8080'
                        ),
@@ -55,6 +56,8 @@ class RunHipHopServer extends Maintenance {
                $sourceBase = realpath( "$IP/.." );
 
                passthru(
+                       'cd ' . wfEscapeShellArg( $sourceBase ) . " && " .
+                       'MW_INSTALL_PATH=' . wfEscapeShellArg( $IP ) . ' ' .
                        wfEscapeShellArg(
                                'hphpi',
                                '-c', "$thisDir/server.conf",
index e0ea149..16af0f2 100644 (file)
@@ -15,9 +15,6 @@ Server {
        EnableStaticContentFromDisk = false
        AlwaysUseRelativePath = true
 }
-ServerVariables {
-       MW_COMPILED = 1
-}
 VirtualHost {
        * {
                ServerName = localhost
@@ -26,8 +23,8 @@ VirtualHost {
                        * {
                                pattern = ^/wiki/(.*)$
                                to = /phase3/index.php?title=$1
+                               qsa = true
                        }
                }
        }
 }
-