From: Alexandre Emsenhuber Date: Sat, 22 Nov 2008 11:35:01 +0000 (+0000) Subject: API wants namespaces to be separated with a pipe, not a comma X-Git-Tag: 1.31.0-rc.0~44217 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=d587615b2984fd15bf4d5b08f32eacb5072b56af;p=lhc%2Fweb%2Fwiklou.git API wants namespaces to be separated with a pipe, not a comma --- diff --git a/includes/SearchEngine.php b/includes/SearchEngine.php index 032865e20d..7eef6c798f 100644 --- a/includes/SearchEngine.php +++ b/includes/SearchEngine.php @@ -374,11 +374,11 @@ class SearchEngine { */ public static function getOpenSearchTemplate() { global $wgOpenSearchTemplate, $wgServer, $wgScriptPath; - if($wgOpenSearchTemplate) + if( $wgOpenSearchTemplate ) { return $wgOpenSearchTemplate; - else{ - $ns = implode(',',SearchEngine::defaultNamespaces()); - if(!$ns) $ns = "0"; + } else { + $ns = implode( '|', SearchEngine::defaultNamespaces() ); + if( !$ns ) $ns = "0"; return $wgServer . $wgScriptPath . '/api.php?action=opensearch&search={searchTerms}&namespace='.$ns; } }