From ef24c70e2892dad738364f97b9d31bc3454aae49 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sun, 16 Apr 2006 19:17:02 +0000 Subject: [PATCH] (bug 5570) Problems using /parameter link form for long titles --- RELEASE-NOTES | 1 + includes/SkinTemplate.php | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6588c7ba77..4ad524cd43 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -78,6 +78,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 5594) Id translation up to # Login and logout pages section * (bug 5536) Use content language for editing help link * (bug 5605) Improve German localisation files +* (bug 5570) Problems using /parameter link form for long titles == Compatibility == diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 3c85c6d3f8..bf7ffaa3c6 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -674,10 +674,11 @@ class SkinTemplate extends Skin { ); } if ( $this->mTitle->userCanMove()) { + $moveTitle = Title::makeTitle( NS_SPECIAL, 'Movepage' ); $content_actions['move'] = array( 'class' => ($this->mTitle->getDbKey() == 'Movepage' and $this->mTitle->getNamespace == NS_SPECIAL) ? 'selected' : false, 'text' => wfMsg('move'), - 'href' => $this->makeSpecialUrl("Movepage/$this->thispage" ) + 'href' => $moveTitle->getLocalUrl( 'target=' . $this->thispage ) ); } } else { @@ -816,13 +817,16 @@ class SkinTemplate extends Skin { wfRunHooks( 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink', array( &$this, &$nav_urls, &$oldid, &$revid ) ); } - if( $this->mTitle->getNamespace() != NS_SPECIAL) { + if( $this->mTitle->getNamespace() != NS_SPECIAL ) { + $wlhTitle = Title::makeTitle( NS_SPECIAL, 'Whatlinkshere' ); $nav_urls['whatlinkshere'] = array( - 'href' => $this->makeSpecialUrl("Whatlinkshere/$this->thispage") + 'href' => $wlhTitle->getLocalUrl( 'target=' . $this->thispage ) ); if( $this->mTitle->getArticleId() ) { + $rclTitle = Title::makeTitle( NS_SPECIAL, 'Recentchangeslinked' ); $nav_urls['recentchangeslinked'] = array( - 'href' => $this->makeSpecialUrl("Recentchangeslinked/$this->thispage") + 'href' => $rclTitle->getLocalUrl( 'target=' . $this->thispage ) + #'href' => $this->makeSpecialUrl("Recentchangeslinked/$this->thispage") ); } if ($wgUseTrackbacks) -- 2.20.1