Index: trunk/phpwiki/fpw/special_asksql.php |
— | — | @@ -1,8 +1,7 @@ |
2 | 2 | <? |
3 | 3 | # A little hack for direct MySQL access; for sysops only! |
4 | 4 | function askSQL () { |
5 | | - global $THESCRIPT ; |
6 | | - global $Save , $question ; |
| 5 | + global $THESCRIPT , $wikiAskSQLtext , $Save , $question ; |
7 | 6 | $ret = "" ; |
8 | 7 | if ( isset ( $Save ) ) { |
9 | 8 | $ret .= "$question<br>" ; |
— | — | @@ -31,9 +30,9 @@ |
32 | 31 | } |
33 | 32 | $ret .= "</tr></table>" ; |
34 | 33 | } |
35 | | - $form = "" ; |
| 34 | + $form = $wikiAskSQLtext ; |
36 | 35 | $form .= "<FORM method=POST>" ; |
37 | | - $form .= "<input type=text value=\"$question\" name=question size=150> \n" ; |
| 36 | + $form .= "<input type=text value=\"$question\" name=question size=110> \n" ; |
38 | 37 | $form .= "<input type=submit value=Ask name=Save> \n" ; |
39 | 38 | $form .= "</FORM>" ; |
40 | 39 | return $form.$ret ; |
Index: trunk/phpwiki/fpw/wikiPage.php |
— | — | @@ -936,7 +936,7 @@ |
937 | 937 | # This generates the QuickBar (also used by the list of special pages function) |
938 | 938 | function getQuickBar () { |
939 | 939 | global $wikiMainPage , $wikiRecentChanges , $wikiRecentChangesLink , $wikiUpload , $wikiPopularPages , $wikiLongPages; |
940 | | - global $user , $oldID , $version , $wikiEditThisPage , $wikiDeleteThisPage , $wikiHistory , $wikiMyWatchlist ; |
| 940 | + global $user , $oldID , $version , $wikiEditThisPage , $wikiDeleteThisPage , $wikiHistory , $wikiMyWatchlist , $wikiAskSQL ; |
941 | 941 | global $wikiStatistics , $wikiNewPages , $wikiOrphans , $wikiMostWanted , $wikiAllPages , $wikiRandomPage , $wikiStubs , $wikiListUsers ; |
942 | 942 | $editOldVersion = "" ; |
943 | 943 | if ( $oldID != "" ) $editOldVersion="&oldID=$oldID&version=$version" ; |
— | — | @@ -950,6 +950,7 @@ |
951 | 951 | # To be implemented later |
952 | 952 | # if ( $this->canAdvance() ) $column .= "<br><a href=\"".wikiLink("special:Advance&topic=$this->safeTitle")."\">Advance</a>\n" ; |
953 | 953 | |
| 954 | + if ( in_array ( "is_sysop" , $user->rights ) ) $column .= "<br><a href=\"".wikiLink(urldecode("special:AskSQL"))."\">$wikiAskSQL</a>\n" ; |
954 | 955 | if ( !$this->isSpecialPage ) $column .= "<br><a href=\"".wikiLink(urldecode($this->url)."&action=history")."\">$wikiHistory</a>\n" ; |
955 | 956 | $column .= "<br><a href=\"".wikiLink("special:Upload")."\">$wikiUpload</a>\n" ; |
956 | 957 | $column .= "<hr>" ; |
Index: trunk/phpwiki/fpw/wikiTextEn.php |
— | — | @@ -308,6 +308,8 @@ |
309 | 309 | $wikiStubText = "'''These are all the articles in the database, sorted by length, shortest first.'''<br>''#REDIRECT pages and pages within a namespace (like Talk:) are '''not''' listed here!''\n\n" ; |
310 | 310 | $wikiLongPagesText = "'''These are all the articles in the database, sorted by length, longest first.'''<br>''#REDIRECT pages and pages within a namespace (like Talk:) are '''not''' listed here!''\n\n" ; |
311 | 311 | $wikiStubChars = "$1 chars" ; |
| 312 | +$wikiAskSQL = "MySQL access" ; |
| 313 | +$wikiAskSQLtext = "This function is available for sysops only.<br>''Please, do not press return/enter, '''always''' click on the ask button!''" ; |
312 | 314 | $wikiStubDelete = "<b>Delete this page!</b>" ; |
313 | 315 | $wikiStubLinkHere = "$1 articles link here." ; |
314 | 316 | $wikiStubShowLinks = "<nowiki><a href=\"$THESCRIPT?title=special:ShortPages&showLinksThere=$1\">Toggle \"show links\" option</a><br></nowiki>\n" ; |