Add wfFullUrl()/wfFullUrlE() function to explicitly include the http://foo.bar/ to...
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 23 Jun 2003 07:01:42 +0000 (07:01 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 23 Jun 2003 07:01:42 +0000 (07:01 +0000)
includes/GlobalFunctions.php
rdf/recent.phtml

index 394a227..5dc0e23 100644 (file)
@@ -64,6 +64,15 @@ function wfLocalUrlE( $a, $q = "" )
        return wfEscapeHTML( wfLocalUrl( $a, $q ) );
 }
 
+function wfFullUrl( $a, $q = "" ) {
+       global $wgServer;
+       return $wgServer . "/" . wfLocalUrl( $a, $q );
+}
+
+function wfFullUrlE( $a, $q = "" ) {
+       return wfEscapeHTML( wfFullUrl( $a, $q ) );
+}
+
 function wfImageUrl( $img )
 {
        global $wgUploadPath;
index de8d1a3..f96ad2c 100644 (file)
@@ -53,7 +53,7 @@ while( $row = wfFetchObject( $res ) ) {
        $title = htmlspecialchars(
                iconv($wgInputEncoding, "utf-8",
                str_replace( "_", " ", $row->cur_title ) ) );
-       $url = wfLocalUrl( wfUrlencode( $row->cur_title ) );
+       $url = wfFullUrl( wfUrlencode( $row->cur_title ) );
        $description = "<description>" . iconv($wgInputEncoding, "utf-8",
                htmlspecialchars( $row->cur_comment )) . "</description>";
        echo "