Index: trunk/phpwiki/fpw/specialPages.php |
— | — | @@ -76,6 +76,7 @@ |
77 | 77 | } |
78 | 78 | |
79 | 79 | function doEdit ( $title ) { |
| 80 | + global $THESCRIPT ; |
80 | 81 | global $vpage , $action , $wasSaved ; |
81 | 82 | $wasSaved = false ; |
82 | 83 | $vpage = new WikiPage ; |
— | — | @@ -114,6 +115,7 @@ |
115 | 116 | } |
116 | 117 | |
117 | 118 | function userLogin () { |
| 119 | + global $THESCRIPT ; |
118 | 120 | global $loginattempt , $user , $vpage , $WikiUserID , $expiration ; |
119 | 121 | $vpage->title = "User login" ; |
120 | 122 | |
— | — | @@ -179,6 +181,7 @@ |
180 | 182 | } |
181 | 183 | |
182 | 184 | function editUserSettings () { |
| 185 | + global $THESCRIPT ; |
183 | 186 | global $ButtonSave ; |
184 | 187 | global $vpage , $user ; |
185 | 188 | $vpage->title = "User Settings" ; |
— | — | @@ -303,6 +306,7 @@ |
304 | 307 | } |
305 | 308 | |
306 | 309 | function WantedPages () { |
| 310 | + global $THESCRIPT ; |
307 | 311 | global $linkedLinks , $unlinkedLinks , $vpage ; |
308 | 312 | $vpage->special ( "The Most Wanted Topics" ) ; |
309 | 313 | $vpage->namespace = "" ; |
— | — | @@ -335,6 +339,7 @@ |
336 | 340 | } |
337 | 341 | |
338 | 342 | function LonelyPages () { |
| 343 | + global $THESCRIPT ; |
339 | 344 | global $linkedLinks , $unlinkedLinks , $vpage ; |
340 | 345 | $vpage->special ( "The Orphans" ) ; |
341 | 346 | $vpage->namespace = "" ; |
— | — | @@ -372,6 +377,7 @@ |
373 | 378 | } |
374 | 379 | |
375 | 380 | function AllPages () { |
| 381 | + global $THESCRIPT ; |
376 | 382 | global $linkedLinks , $unlinkedLinks , $vpage ; |
377 | 383 | $vpage->special ( "All Pages Index" ) ; |
378 | 384 | $vpage->namespace = "" ; |
— | — | @@ -402,6 +408,7 @@ |
403 | 409 | } |
404 | 410 | |
405 | 411 | function doSearch () { |
| 412 | + global $THESCRIPT ; |
406 | 413 | global $vpage , $search , $startat , $user ; |
407 | 414 | $vpage = new WikiPage ; |
408 | 415 | $vpage->special ( "Search" ) ; |
— | — | @@ -480,6 +487,7 @@ |
481 | 488 | } |
482 | 489 | |
483 | 490 | function listUsers () { |
| 491 | + global $THESCRIPT ; |
484 | 492 | global $user , $vpage , $startat ; |
485 | 493 | if ( !isset ( $startat ) ) $startat = 1 ; |
486 | 494 | $perpage = $user->options["resultsPerPage"] ; |
— | — | @@ -527,6 +535,7 @@ |
528 | 536 | } |
529 | 537 | |
530 | 538 | function randompage () { |
| 539 | + global $THESCRIPT ; |
531 | 540 | global $vpage ; |
532 | 541 | $connection=getDBconnection() ; |
533 | 542 | mysql_select_db ( "wikipedia" , $connection ) ; |
— | — | @@ -564,6 +573,7 @@ |
565 | 574 | } |
566 | 575 | |
567 | 576 | function recentchanges () { |
| 577 | + global $THESCRIPT ; |
568 | 578 | global $vpage , $maxcnt , $daysAgo ; |
569 | 579 | $vpage->special ( "Recent Changes" ) ; |
570 | 580 | $vpage->makeSecureTitle() ; |
— | — | @@ -604,6 +614,7 @@ |
605 | 615 | } |
606 | 616 | |
607 | 617 | function recentChangesLayout ( &$arr ) { |
| 618 | + global $THESCRIPT ; |
608 | 619 | global $user ; |
609 | 620 | $lastDay = "" ; |
610 | 621 | $color1 = $user->options["tabLine1"] ; |
— | — | @@ -695,6 +706,7 @@ |
696 | 707 | } |
697 | 708 | |
698 | 709 | function watch ( $t , $m ) { |
| 710 | + global $THESCRIPT ; |
699 | 711 | global $user ; |
700 | 712 | if ( !$user->isLoggedIn ) return "NOT LOGGED IN!" ; |
701 | 713 | |
— | — | @@ -710,6 +722,7 @@ |
711 | 723 | } |
712 | 724 | |
713 | 725 | function WatchList () { |
| 726 | + global $THESCRIPT ; |
714 | 727 | global $vpage , $user ; |
715 | 728 | $vpage->special ( "My watchlist" ) ; |
716 | 729 | $ret = "'''Currently, you are watching the following articles :''' " ; |
— | — | @@ -740,6 +753,7 @@ |
741 | 754 | } |
742 | 755 | |
743 | 756 | function statistics () { |
| 757 | + global $THESCRIPT ; |
744 | 758 | $connection=getDBconnection() ; |
745 | 759 | mysql_select_db ( "wikipedia" , $connection ) ; |
746 | 760 | $ret = "" ; |
— | — | @@ -831,6 +845,7 @@ |
832 | 846 | } |
833 | 847 | |
834 | 848 | function upload () { |
| 849 | + global $THESCRIPT ; |
835 | 850 | global $removeFile , $xtitle , $removeFile , $Upload , $Upload_name , $no_copyright ; |
836 | 851 | global $user , $vpage ; |
837 | 852 | $vpage->special ( "Upload Page" ) ; |
— | — | @@ -942,6 +957,7 @@ |
943 | 958 | } |
944 | 959 | |
945 | 960 | function doHistory ( $title ) { |
| 961 | + global $THESCRIPT ; |
946 | 962 | global $vpage ; |
947 | 963 | $vpage = new WikiPage ; |
948 | 964 | $vpage->title = $title ; |
— | — | @@ -994,6 +1010,7 @@ |
995 | 1011 | } |
996 | 1012 | |
997 | 1013 | function special_pages () { |
| 1014 | + global $THESCRIPT ; |
998 | 1015 | global $vpage , $user ; |
999 | 1016 | $vpage->special ( "Special Pages" ) ; |
1000 | 1017 | $ret = "<b>This is a list of special pages.</b><br>" ; |
— | — | @@ -1003,6 +1020,7 @@ |
1004 | 1021 | } |
1005 | 1022 | |
1006 | 1023 | function ShortPages () { |
| 1024 | + global $THESCRIPT ; |
1007 | 1025 | global $user , $vpage , $startat ; |
1008 | 1026 | if ( !isset ( $startat ) ) $startat = 1 ; |
1009 | 1027 | $perpage = $user->options["resultsPerPage"] ; |
— | — | @@ -1049,6 +1067,7 @@ |
1050 | 1068 | |
1051 | 1069 | # A little hack; disabled; to enable, allow function call in wikiPage->load() |
1052 | 1070 | function askSQL () { |
| 1071 | + global $THESCRIPT ; |
1053 | 1072 | global $Save , $question ; |
1054 | 1073 | $ret = "" ; |
1055 | 1074 | if ( isset ( $Save ) ) { |
Index: trunk/phpwiki/fpw/wiki.phtml |
— | — | @@ -9,6 +9,7 @@ |
10 | 10 | # Main program |
11 | 11 | global $action , $title , $pageTitle ; |
12 | 12 | global $user , $search , $expiration ; |
| 13 | + global $THESCRIPT ; |
13 | 14 | $expiration = time()+315360000 ; # Cookies set will expire in ten years from now |
14 | 15 | $pageTitle = "" ; |
15 | 16 | $user = new WikiUser ; |
Index: trunk/phpwiki/fpw/wikiPage.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | $connection = getDBconnection () ; |
27 | 27 | mysql_select_db ( "wikipedia" , $connection ) ; |
28 | 28 | $thisVersion = "" ; |
29 | | - global $oldID , $version ; |
| 29 | + global $oldID , $version , $THESCRIPT ; |
30 | 30 | if ( isset ( $oldID ) ) { |
31 | 31 | $sql = "SELECT * FROM old WHERE old_id=$oldID" ; |
32 | 32 | $result = mysql_query ( $sql , $connection ) ; |
— | — | @@ -86,6 +86,7 @@ |
87 | 87 | return $a ; |
88 | 88 | } |
89 | 89 | function getOtherNamespaces () { |
| 90 | + global $THESCRIPT ; |
90 | 91 | $a = array () ; |
91 | 92 | if ( $this->isSpecialPage ) return $a ; |
92 | 93 | $n = explode ( ":" , $this->title ) ; |
— | — | @@ -162,6 +163,7 @@ |
163 | 164 | |
164 | 165 | # Output functions |
165 | 166 | function replaceInternalLinks ( $s ) { |
| 167 | + global $THESCRIPT ; |
166 | 168 | global $user , $unlinkedLinks , $linkedLinks ; |
167 | 169 | $a = explode ( "[[" , " ".$s ) ; |
168 | 170 | $s = array_shift ( $a ) ; |
— | — | @@ -393,6 +395,7 @@ |
394 | 396 | |
395 | 397 | # Header and footer section |
396 | 398 | function getLinkBar () { |
| 399 | + global $THESCRIPT ; |
397 | 400 | global $user , $oldID , $version ; |
398 | 401 | $editOldVersion = "" ; |
399 | 402 | if ( $oldID != "" ) $editOldVersion="&oldID=$oldID&version=$version" ; |
— | — | @@ -414,6 +417,7 @@ |
415 | 418 | return $ret ; |
416 | 419 | } |
417 | 420 | function getHeader () { |
| 421 | + global $THESCRIPT ; |
418 | 422 | global $user , $action ; |
419 | 423 | $t = $this->getNiceTitle ( $this->title ) ; |
420 | 424 | if ( substr_count ( $t , ":" ) > 0 ) $t = ucfirst ( $t ) ; |
— | — | @@ -447,6 +451,7 @@ |
448 | 452 | return $ret ; |
449 | 453 | } |
450 | 454 | function getQuickBar () { |
| 455 | + global $THESCRIPT ; |
451 | 456 | global $user , $oldID , $version ; |
452 | 457 | $editOldVersion = "" ; |
453 | 458 | if ( $oldID != "" ) $editOldVersion="&oldID=$oldID&version=$version" ; |
— | — | @@ -501,6 +506,7 @@ |
502 | 507 | return $ret ; |
503 | 508 | } |
504 | 509 | function getFooter () { |
| 510 | + global $THESCRIPT ; |
505 | 511 | $ret = $this->getLinkBar() ; |
506 | 512 | global $HTTP_USER_AGENT ; |
507 | 513 | if ( stristr ( $HTTP_USER_AGENT , "MSIE" ) ) $border = "border=1 frame=above rules=none" ; |