r25 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24‎ | r25 | r26 >
Date:08:03, 13 October 2001
Author:magnus_manske
Status:old
Tags:
Comment:
Netscape bug fixed
Modified paths:
  • /trunk/phpwiki/fpw/specialPages.php (modified) (history)
  • /trunk/phpwiki/fpw/wiki.phtml (modified) (history)
  • /trunk/phpwiki/fpw/wikiPage.php (modified) (history)

Diff [purge]

Index: trunk/phpwiki/fpw/specialPages.php
@@ -76,6 +76,7 @@
7777 }
7878
7979 function doEdit ( $title ) {
 80+ global $THESCRIPT ;
8081 global $vpage , $action , $wasSaved ;
8182 $wasSaved = false ;
8283 $vpage = new WikiPage ;
@@ -114,6 +115,7 @@
115116 }
116117
117118 function userLogin () {
 119+ global $THESCRIPT ;
118120 global $loginattempt , $user , $vpage , $WikiUserID , $expiration ;
119121 $vpage->title = "User login" ;
120122
@@ -179,6 +181,7 @@
180182 }
181183
182184 function editUserSettings () {
 185+ global $THESCRIPT ;
183186 global $ButtonSave ;
184187 global $vpage , $user ;
185188 $vpage->title = "User Settings" ;
@@ -303,6 +306,7 @@
304307 }
305308
306309 function WantedPages () {
 310+ global $THESCRIPT ;
307311 global $linkedLinks , $unlinkedLinks , $vpage ;
308312 $vpage->special ( "The Most Wanted Topics" ) ;
309313 $vpage->namespace = "" ;
@@ -335,6 +339,7 @@
336340 }
337341
338342 function LonelyPages () {
 343+ global $THESCRIPT ;
339344 global $linkedLinks , $unlinkedLinks , $vpage ;
340345 $vpage->special ( "The Orphans" ) ;
341346 $vpage->namespace = "" ;
@@ -372,6 +377,7 @@
373378 }
374379
375380 function AllPages () {
 381+ global $THESCRIPT ;
376382 global $linkedLinks , $unlinkedLinks , $vpage ;
377383 $vpage->special ( "All Pages Index" ) ;
378384 $vpage->namespace = "" ;
@@ -402,6 +408,7 @@
403409 }
404410
405411 function doSearch () {
 412+ global $THESCRIPT ;
406413 global $vpage , $search , $startat , $user ;
407414 $vpage = new WikiPage ;
408415 $vpage->special ( "Search" ) ;
@@ -480,6 +487,7 @@
481488 }
482489
483490 function listUsers () {
 491+ global $THESCRIPT ;
484492 global $user , $vpage , $startat ;
485493 if ( !isset ( $startat ) ) $startat = 1 ;
486494 $perpage = $user->options["resultsPerPage"] ;
@@ -527,6 +535,7 @@
528536 }
529537
530538 function randompage () {
 539+ global $THESCRIPT ;
531540 global $vpage ;
532541 $connection=getDBconnection() ;
533542 mysql_select_db ( "wikipedia" , $connection ) ;
@@ -564,6 +573,7 @@
565574 }
566575
567576 function recentchanges () {
 577+ global $THESCRIPT ;
568578 global $vpage , $maxcnt , $daysAgo ;
569579 $vpage->special ( "Recent Changes" ) ;
570580 $vpage->makeSecureTitle() ;
@@ -604,6 +614,7 @@
605615 }
606616
607617 function recentChangesLayout ( &$arr ) {
 618+ global $THESCRIPT ;
608619 global $user ;
609620 $lastDay = "" ;
610621 $color1 = $user->options["tabLine1"] ;
@@ -695,6 +706,7 @@
696707 }
697708
698709 function watch ( $t , $m ) {
 710+ global $THESCRIPT ;
699711 global $user ;
700712 if ( !$user->isLoggedIn ) return "NOT LOGGED IN!" ;
701713
@@ -710,6 +722,7 @@
711723 }
712724
713725 function WatchList () {
 726+ global $THESCRIPT ;
714727 global $vpage , $user ;
715728 $vpage->special ( "My watchlist" ) ;
716729 $ret = "'''Currently, you are watching the following articles :''' " ;
@@ -740,6 +753,7 @@
741754 }
742755
743756 function statistics () {
 757+ global $THESCRIPT ;
744758 $connection=getDBconnection() ;
745759 mysql_select_db ( "wikipedia" , $connection ) ;
746760 $ret = "" ;
@@ -831,6 +845,7 @@
832846 }
833847
834848 function upload () {
 849+ global $THESCRIPT ;
835850 global $removeFile , $xtitle , $removeFile , $Upload , $Upload_name , $no_copyright ;
836851 global $user , $vpage ;
837852 $vpage->special ( "Upload Page" ) ;
@@ -942,6 +957,7 @@
943958 }
944959
945960 function doHistory ( $title ) {
 961+ global $THESCRIPT ;
946962 global $vpage ;
947963 $vpage = new WikiPage ;
948964 $vpage->title = $title ;
@@ -994,6 +1010,7 @@
9951011 }
9961012
9971013 function special_pages () {
 1014+ global $THESCRIPT ;
9981015 global $vpage , $user ;
9991016 $vpage->special ( "Special Pages" ) ;
10001017 $ret = "<b>This is a list of special pages.</b><br>" ;
@@ -1003,6 +1020,7 @@
10041021 }
10051022
10061023 function ShortPages () {
 1024+ global $THESCRIPT ;
10071025 global $user , $vpage , $startat ;
10081026 if ( !isset ( $startat ) ) $startat = 1 ;
10091027 $perpage = $user->options["resultsPerPage"] ;
@@ -1049,6 +1067,7 @@
10501068
10511069 # A little hack; disabled; to enable, allow function call in wikiPage->load()
10521070 function askSQL () {
 1071+ global $THESCRIPT ;
10531072 global $Save , $question ;
10541073 $ret = "" ;
10551074 if ( isset ( $Save ) ) {
Index: trunk/phpwiki/fpw/wiki.phtml
@@ -9,6 +9,7 @@
1010 # Main program
1111 global $action , $title , $pageTitle ;
1212 global $user , $search , $expiration ;
 13+ global $THESCRIPT ;
1314 $expiration = time()+315360000 ; # Cookies set will expire in ten years from now
1415 $pageTitle = "" ;
1516 $user = new WikiUser ;
Index: trunk/phpwiki/fpw/wikiPage.php
@@ -25,7 +25,7 @@
2626 $connection = getDBconnection () ;
2727 mysql_select_db ( "wikipedia" , $connection ) ;
2828 $thisVersion = "" ;
29 - global $oldID , $version ;
 29+ global $oldID , $version , $THESCRIPT ;
3030 if ( isset ( $oldID ) ) {
3131 $sql = "SELECT * FROM old WHERE old_id=$oldID" ;
3232 $result = mysql_query ( $sql , $connection ) ;
@@ -86,6 +86,7 @@
8787 return $a ;
8888 }
8989 function getOtherNamespaces () {
 90+ global $THESCRIPT ;
9091 $a = array () ;
9192 if ( $this->isSpecialPage ) return $a ;
9293 $n = explode ( ":" , $this->title ) ;
@@ -162,6 +163,7 @@
163164
164165 # Output functions
165166 function replaceInternalLinks ( $s ) {
 167+ global $THESCRIPT ;
166168 global $user , $unlinkedLinks , $linkedLinks ;
167169 $a = explode ( "[[" , " ".$s ) ;
168170 $s = array_shift ( $a ) ;
@@ -393,6 +395,7 @@
394396
395397 # Header and footer section
396398 function getLinkBar () {
 399+ global $THESCRIPT ;
397400 global $user , $oldID , $version ;
398401 $editOldVersion = "" ;
399402 if ( $oldID != "" ) $editOldVersion="&oldID=$oldID&version=$version" ;
@@ -414,6 +417,7 @@
415418 return $ret ;
416419 }
417420 function getHeader () {
 421+ global $THESCRIPT ;
418422 global $user , $action ;
419423 $t = $this->getNiceTitle ( $this->title ) ;
420424 if ( substr_count ( $t , ":" ) > 0 ) $t = ucfirst ( $t ) ;
@@ -447,6 +451,7 @@
448452 return $ret ;
449453 }
450454 function getQuickBar () {
 455+ global $THESCRIPT ;
451456 global $user , $oldID , $version ;
452457 $editOldVersion = "" ;
453458 if ( $oldID != "" ) $editOldVersion="&oldID=$oldID&version=$version" ;
@@ -501,6 +506,7 @@
502507 return $ret ;
503508 }
504509 function getFooter () {
 510+ global $THESCRIPT ;
505511 $ret = $this->getLinkBar() ;
506512 global $HTTP_USER_AGENT ;
507513 if ( stristr ( $HTTP_USER_AGENT , "MSIE" ) ) $border = "border=1 frame=above rules=none" ;

Status & tagging log