From 859cc5ea967c3c5d49af30b68e8606631eed7cb8 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 31 May 2005 13:06:10 +0000 Subject: [PATCH] Don't bother extracting action if $wgActionUrls is not set up. --- includes/Title.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index b32424f66a..e2c527e659 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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]; -- 2.20.1