r1055 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r1054‎ | r1055 | r1056 >
Date:15:12, 2 January 2003
Author:eloquence
Status:old
Tags:
Comment:
New feature: Go button to display a page directly.
Modified paths:
  • /trunk/phpwiki/newcodebase/Language.php (modified) (history)
  • /trunk/phpwiki/newcodebase/Skin.php (modified) (history)
  • /trunk/phpwiki/newcodebase/wiki.phtml (modified) (history)

Diff [purge]

Index: trunk/phpwiki/newcodebase/wiki.phtml
@@ -15,7 +15,7 @@
1616
1717 # Query string fields
1818 #
19 -global $action, $title, $search, $target, $printable;
 19+global $action, $title, $search, $go, $target, $printable;
2020 global $returnto, $diff, $oldid;
2121
2222 $action = strtolower( trim( $action ) );
@@ -36,7 +36,18 @@
3737 if ( -1 == $wgTitle->getNamespace() ) {
3838 wfSpecialPage();
3939 } else if ( "" != $search ) {
40 - wfSearch( $search );
 40+ if($go) {
 41+
 42+ $wgArticle=new Article();
 43+ $wgTitle=Title::newFromText($search);
 44+ $wgArticle->view();
 45+
 46+ } else {
 47+
 48+ wfSearch( $search );
 49+
 50+ }
 51+
4152 } else {
4253 $wgArticle = new Article();
4354
Index: trunk/phpwiki/newcodebase/Skin.php
@@ -395,7 +395,7 @@
396396 . "<input type=text name=\"search\" size=16 value=\""
397397 . htmlspecialchars(substr($search,0,256)) . "\">\n"
398398 . "<input type=submit value=\"" . wfMsg( "search" )
399 - . "\"></form>";
 399+ . "\"> <input type=submit name=\"go\"value=\"" . wfMsg ("go") . "\"></form>";
400400
401401 return $s;
402402 }
Index: trunk/phpwiki/newcodebase/Language.php
@@ -304,6 +304,7 @@
305305 "whatlinkshere" => "Pages that link here",
306306 "help" => "Help",
307307 "search" => "Search",
 308+"go" => "Go",
308309 "history" => "Older versions",
309310 "printableversion" => "Printable version",
310311 "editthispage" => "Edit this page",

Status & tagging log