* (bug 20494) OutputPage::getArticleBodyOnly() no longer requires an useless argument
[lhc/web/wiklou.git] / includes / ExternalEdit.php
index f3fc22e..1c58f44 100644 (file)
@@ -6,8 +6,6 @@
  */
 
 /**
- *
- *
  * Support for external editors to modify both text and files
  * in external applications. It works as follows: MediaWiki
  * sends a meta-file with the MIME type 'application/x-external-editor'
@@ -34,6 +32,7 @@ class ExternalEdit {
                $name=$this->mTitle->getText();
                $pos=strrpos($name,".")+1;
                header ( "Content-type: application/x-external-editor; charset=".$this->mCharset );
+               header( "Cache-control: no-cache" );
 
                # $type can be "Edit text", "Edit file" or "Diff text" at the moment
                # See the protocol specifications at [[m:Help:External editors/Tech]] for
@@ -47,12 +46,7 @@ class ExternalEdit {
                } elseif($this->mMode=="file") {
                        $type="Edit file";
                        $image = wfLocalFile( $this->mTitle );
-                       $img_url = $image->getURL();
-                       if(strpos($img_url,"://")) {
-                               $url = $img_url;
-                       } else {
-                               $url = $wgServer . $img_url;
-                       }
+                       $url = $image->getFullURL();
                        $extension=substr($name, $pos);
                }
                $special=$wgLang->getNsText(NS_SPECIAL);
@@ -72,4 +66,3 @@ CONTROL;
                echo $control;
        }
 }
-