r13693 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13692‎ | r13693 | r13694 >
Date:17:18, 17 April 2006
Author:robchurch
Status:old
Tags:
Comment:
(bug 5623) Un-break move, whatlinkshere, etc. for titles needing some tender love and encoding
Modified paths:
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -674,21 +674,24 @@
675675 );
676676 }
677677 if ( $this->mTitle->userCanMove()) {
 678+ echo( "Making move link...\n" );
678679 $moveTitle = Title::makeTitle( NS_SPECIAL, 'Movepage' );
679680 $content_actions['move'] = array(
680681 'class' => ($this->mTitle->getDbKey() == 'Movepage' and $this->mTitle->getNamespace == NS_SPECIAL) ? 'selected' : false,
681682 'text' => wfMsg('move'),
682 - 'href' => $moveTitle->getLocalUrl( 'target=' . $this->thispage )
 683+ 'href' => $moveTitle->getLocalUrl( 'target=' . urlencode( $this->thispage ) )
683684 );
684685 }
685686 } else {
686687 //article doesn't exist or is deleted
687 - if($wgUser->isAllowed('delete')){
 688+ if( $wgUser->isAllowed( 'delete' ) ) {
688689 if( $n = $this->mTitle->isDeleted() ) {
 690+ $undelTitle = Title::makeTitle( NS_SPECIAL, 'Undelete' );
689691 $content_actions['undelete'] = array(
690692 'class' => false,
691693 'text' => ($n == 1) ? wfMsg( 'undelete_short1' ) : wfMsg('undelete_short', $n ),
692 - 'href' => $this->makeSpecialUrl("Undelete/$this->thispage")
 694+ 'href' => $undelTitle->getLocalUrl( 'target=' . urlencode( $this->thispage ) )
 695+ #'href' => $this->makeSpecialUrl("Undelete/$this->thispage")
693696 );
694697 }
695698 }
@@ -820,13 +823,12 @@
821824 if( $this->mTitle->getNamespace() != NS_SPECIAL ) {
822825 $wlhTitle = Title::makeTitle( NS_SPECIAL, 'Whatlinkshere' );
823826 $nav_urls['whatlinkshere'] = array(
824 - 'href' => $wlhTitle->getLocalUrl( 'target=' . $this->thispage )
 827+ 'href' => $wlhTitle->getLocalUrl( 'target=' . urlencode( $this->thispage ) )
825828 );
826829 if( $this->mTitle->getArticleId() ) {
827830 $rclTitle = Title::makeTitle( NS_SPECIAL, 'Recentchangeslinked' );
828831 $nav_urls['recentchangeslinked'] = array(
829 - 'href' => $rclTitle->getLocalUrl( 'target=' . $this->thispage )
830 - #'href' => $this->makeSpecialUrl("Recentchangeslinked/$this->thispage")
 832+ 'href' => $rclTitle->getLocalUrl( 'target=' . urlencode( $this->thispage ) )
831833 );
832834 }
833835 if ($wgUseTrackbacks)

Status & tagging log