(!$wgTitle->isProtected() || $wgUser->isSysop())
) {
- $n = $wgTitle->getPrefixedURL();
$t = wfMsg( "editthispage" );
$oid = $red = "";
if ( $redirect ) { $red = "&redirect={$redirect}"; }
if ( $oldid && ! isset( $diff ) ) {
$oid = "&oldid={$oldid}";
}
- $s = wfLocalUrlE($n,"action=edit{$oid}{$red}");
+ $s = $wgTitle->getUrl( "action=edit{$oid}{$red}", false, true );
$s = "document.location = \"" .$s ."\";";
$a += array ("ondblclick" => $s);
{
if ( "" != $align ) { $a = " align='{$align}'"; }
else { $a = ""; }
-
+
$mp = wfMsg( "mainpage" );
- $s = "<a href=\"" . wfLocalUrlE( urlencode( str_replace(' ','_',$mp) ) )
+ $titleObj = Title::newFromText( $mp );
+ $s = "<a href=\"" . $titleObj->getURL( "", true )
. "\"><img{$a} border=0 src=\""
. $this->getLogo() . "\" alt=\"" . "[{$mp}]\"></a>";
return $s;
global $wgTitle, $wgLang;
$s = $this->makeKnownLink( $wgLang->specialPage( "Contributions" ),
- wfMsg( "contributions" ), "target=" . $wgTitle->getURL() );
+ wfMsg( "contributions" ), "target=" . $wgTitle->getPartialURL() );
return $s;
}
global $wgTitle, $wgLang;
$s = $this->makeKnownLink( $wgLang->specialPage( "Emailuser" ),
- wfMsg( "emailuser" ), "target=" . $wgTitle->getURL() );
+ wfMsg( "emailuser" ), "target=" . $wgTitle->getPartialURL() );
return $s;
}
$u = "";
if ( "" == $text ) { $text = $nt->getFragment(); }
} else {
- $u = wfLocalUrlE( $link, $query );
+ $u = $nt->getURL( $query, true );
}
if ( "" != $nt->getFragment() ) {
$u .= "#" . wfEscapeHTML( $nt->getFragment() );
if ( "" == $query ) { $q = "action=edit"; }
else { $q = "action=edit&{$query}"; }
- $u = wfLocalUrlE( $link, $q );
+ $u = $nt->getURL( $q );
if ( "" == $text ) { $text = $nt->getPrefixedText(); }
$style = $this->getInternalLinkAttributesObj( $nt, $text, "yes" );
$link = $nt->getPrefixedURL();
- $u = wfLocalUrlE( $link, $query );
+ $u = $nt->getURL( $query, true );
if ( "" == $text ) { $text = $nt->getPrefixedText(); }
$style = $this->getInternalLinkAttributesObj( $nt, $text, "stub" );
function makeImageLinkObj( $nt, $alt = "" ) {
global $wgLang, $wgUseImageResize;
- $link = $nt->getPrefixedURL();
$name = $nt->getDBKey();
$url = wfImageUrl( $name );
$align = "";
}
$alt = htmlspecialchars( $alt );
- $u = wfLocalUrlE( $link );
+ $u = $nt->getURL( "", true );
$s = "<a href=\"{$u}\" class='image' title=\"{$alt}\">" .
"<img border=\"0\" src=\"{$url}\" alt=\"{$alt}\"></a>";
if ( "" != $align ) {
global $wgUploadPath;
$name = $nt->getDBKey();
$image = Title::makeTitle( Namespace::getImage(), $name );
- $link = $image->getPrefixedURL();
$url = wfImageUrl( $name );
$path = wfImagePath( $name );
$thumbUrl = $this->createThumb( $name, $boxwidth );
- $u = wfLocalUrlE( $link );
+ $u = $nt->getURL( "", true );
$more = htmlspecialchars(wfMsg( "thumbnail-more" ));
$url = wfImageUrl( $img );
$rlink = $cur;
if ( $wgUser->isSysop() ) {
- $link = wfLocalUrlE( $wgTitle->getPrefixedText(), "image=" . $wgTitle->getURL() .
- "&action=delete" );
+ $link = $wgTitle->getURL( "image=" . $wgTitle->getPartialURL() .
+ "&action=delete", true );
$style = $this->getInternalLinkAttributes( $link, $del );
$dlink = "<a href=\"{$link}\"{$style}>{$del}</a>";
global $wgTitle,$wgUser,$oldid;
if($oldid) return $head;
- $url = wfLocalUrlE(urlencode(str_replace(' ','_',$wgTitle->getPrefixedText())),"action=edit§ion=$section");
+ $url = $wgTitle->getUrl( "action=edit§ion=$section", true );
return "<span onContextMenu='document.location=\"".$url."\";return false;'>{$head}</span>";
}