handle Special: namespaces in multiple languages
authorErik Moeller <erik@users.mediawiki.org>
Wed, 13 Apr 2005 06:57:31 +0000 (06:57 +0000)
committerErik Moeller <erik@users.mediawiki.org>
Wed, 13 Apr 2005 06:57:31 +0000 (06:57 +0000)
includes/ExternalEdit.php

index a4acab5..d7c14bd 100644 (file)
@@ -31,7 +31,8 @@ class ExternalEdit {
        }
        
        function edit() {
-               global $wgUser, $wgOut, $wgScript, $wgScriptPath, $wgServer;
+               global $wgUser, $wgOut, $wgScript, $wgScriptPath, $wgServer,
+                      $wgLang;
                $wgOut->disable();
                $name=$this->mTitle->getText();
                $pos=strrpos($name,".")+1;
@@ -51,7 +52,8 @@ class ExternalEdit {
                        $image = Image::newFromTitle( $this->mTitle );
                        $url = $wgServer . $image->getURL();
                        $extension=substr($name, $pos);
-               }                                        
+               }
+               $special=$wgLang->getNsText(NS_SPECIAL);                 
                $control = <<<CONTROL
 [Process]
 Type=$type
@@ -59,6 +61,7 @@ Engine=MediaWiki
 Script={$wgServer}{$wgScript}
 Server={$wgServer}
 Path={$wgScriptPath}
+Special namespace=$special
 
 [File]
 Extension=$extension