Woops, fix bug with last commit when the number of rows <= 2.
[lhc/web/wiklou.git] / includes / ExternalEdit.php
index 4d9f1e2..f592d3c 100644 (file)
@@ -47,12 +47,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 +67,4 @@ CONTROL;
                echo $control;
        }
 }
-?>
+