added $wgEnableEditToolbar to disable JS toolbar
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 18 Jan 2004 02:25:33 +0000 (02:25 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 18 Jan 2004 02:25:33 +0000 (02:25 +0000)
includes/DefaultSettings.php
includes/EditPage.php
languages/Language.php

index 9f2832f..28ee8ed 100644 (file)
@@ -200,4 +200,6 @@ $wgNamespacesToBeSearchedDefault = array( -1 => 0, 0 => 1, 1 => 0,
 # If set, a bold ugly notice will show up at the top of every page.
 $wgSiteNotice = "";
 
+# Javascript toolbar
+$wgEnableEditToolbar = false;
 ?>
index 86c3c5c..91ca8b6 100644 (file)
@@ -83,7 +83,7 @@ class EditPage {
                global $wpSave, $wpPreview;
                global $wpMinoredit, $wpEdittime, $wpTextbox2, $wpSection;
                global $oldid, $redirect, $section;
-               global $wgLang;
+               global $wgLang, $wgEnableEditToolbar;
 
                if(isset($wpSection)) { $section=$wpSection; } else { $wpSection=$section; }
 
@@ -243,7 +243,7 @@ class EditPage {
                $wpSummary = wfEscapeHTML( $wpSummary );
 
 
-               if($wgUser->getOption("showtoolbar")) {
+               if($wgUser->getOption("showtoolbar") && $wgEnableEditToolbar) {
                        // prepare toolbar for edit buttons
                        $toolbar=$sk->getEditToolbar();
                }
index f53826e..8b68aaf 100644 (file)
@@ -117,6 +117,10 @@ this</a> (alternative: like this<a href=\"\" class=\"internal\">?</a>).",
        "nocache" => "Disable page caching"
 );
 
+if (!$wgEnableEditToolbar) {
+       unset($wgUserTogglesEn['showtoolbar']);
+}
+
 /* private */ $wgBookstoreListEn = array(
        "AddALL" => "http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN",
        "PriceSCAN" => "http://www.pricescan.com/books/bookDetail.asp?isbn=$1",