Don't bother extracting action if $wgActionUrls is not set up.
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 31 May 2005 13:06:10 +0000 (13:06 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 31 May 2005 13:06:10 +0000 (13:06 +0000)
includes/Title.php

index b32424f..e2c527e 100644 (file)
@@ -720,8 +720,9 @@ class Title {
                } elseif ( $query == '' ) {
                        $url = str_replace( '$1', $dbkey, $wgArticlePath );
                } else {
-                       if( preg_match( '/^(.*&|)action=([^&]*)(&(.*)|)$/', $query, $matches ) ) {
-                               global $wgActionPaths;
+                       global $wgActionPaths;
+                       if( !empty( $wgActionPaths ) &&
+                               preg_match( '/^(.*&|)action=([^&]*)(&(.*)|)$/', $query, $matches ) ) {
                                $action = urldecode( $matches[2] );
                                if( isset( $wgActionPaths[$action] ) ) {
                                        $query = $matches[1];