r1056 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r1055‎ | r1056 | r1057 >
Date:16:24, 2 January 2003
Author:eloquence
Status:old
Tags:
Comment:
New feature: backlink when editing a page
Modified paths:
  • /trunk/phpwiki/newcodebase/Language.php (modified) (history)
  • /trunk/phpwiki/newcodebase/LanguageDe.php (modified) (history)
  • /trunk/phpwiki/newcodebase/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phpwiki/newcodebase/LanguageDe.php
@@ -198,6 +198,7 @@
199199 "wikipediapage" => "Wikipedia-Text",
200200 "userpage" => "Benutzerseite",
201201 "imagepage" => "Bildseite",
 202+"viewtalkpage" => "Diskussion",
202203 "otherlanguages" => "Andere Sprachen",
203204 "redirectedfrom" => "(Weitergeleitet von $1)",
204205 "lastmodified" => "Diese Seite wurde zuletzt ge�ndert um $1.",
Index: trunk/phpwiki/newcodebase/Skin.php
@@ -488,7 +488,7 @@
489489
490490 function quickBar()
491491 {
492 - global $wgOut, $wgTitle, $wgUser;
 492+ global $wgOut, $wgTitle, $wgUser, $action, $wgLang;
493493
494494 $s = "\n<div id='quickbar'>";
495495 $s .= "\n" . $this->logoText() . "\n<hr>";
@@ -523,7 +523,51 @@
524524 }
525525 }
526526 $s .= "\n<hr>";
 527+ }
 528+
 529+ if( $action == "edit" || $action == "history") { # add a backlink to the article
 530+
 531+ if($wgTitle->getArticleID()){ # no backlink if no article
 532+ $tns=$wgTitle->getNamespace();
 533+ switch($tns) {
 534+ case 0:
 535+ $text = wfMsg("articlepage");
 536+ break;
 537+ case 1:
 538+ $text = wfMsg("viewtalkpage");
 539+ break;
 540+ case 2:
 541+ $text = wfMsg("userpage");
 542+ break;
 543+ case 3:
 544+ $text = wfMsg("viewtalkpage");
 545+ break;
 546+ case 4:
 547+ $text = wfMsg("wikipediapage");
 548+ break;
 549+ case 5:
 550+ $text = wfMsg("viewtalkpage");
 551+ break;
 552+ case 6:
 553+ $text = wfMsg("imagepage");
 554+ break;
 555+ case 7:
 556+ $text = wfMsg("viewtalkpage");
 557+ break;
 558+ default:
 559+ $text= wfMsg("articlepage");
 560+ }
 561+
 562+ $link = $wgTitle->getText();
 563+ if ($nstext = $wgLang->getNsText($tns) ) { # add namespace if necessary
 564+ $link = $nstext . ":" . $link ;
 565+ }
 566+ $s .= $this->makeLink($link, $text );
 567+ $s .="\n<hr>";
 568+ }
527569 }
 570+
 571+
528572 if ( 0 != $wgUser->getID() ) {
529573 $s .= $this->specialLink( "upload" ) . $sep;
530574 }
Index: trunk/phpwiki/newcodebase/Language.php
@@ -317,6 +317,7 @@
318318 "userpage" => "View user page",
319319 "wikipediapage" => "View meta page",
320320 "imagepage" => "View image page",
 321+"viewtalkpage" => "View discussion",
321322 "otherlanguages" => "Other languages",
322323 "redirectedfrom" => "(Redirected from $1)",
323324 "lastmodified" => "The page was last modified $1.",

Follow-up revisions

RevisionCommit summaryAuthorDate
r23321pdns (2.9.21-1wm1) feisty; urgency=high...mark15:01, 24 June 2007

Status & tagging log