From: Brion Vibber Date: Tue, 31 May 2005 13:06:10 +0000 (+0000) Subject: Don't bother extracting action if $wgActionUrls is not set up. X-Git-Tag: 1.5.0alpha2~19 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=859cc5ea967c3c5d49af30b68e8606631eed7cb8;p=lhc%2Fweb%2Fwiklou.git Don't bother extracting action if $wgActionUrls is not set up. --- 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];