From: Tim Starling Date: Sun, 18 Jan 2004 02:25:33 +0000 (+0000) Subject: added $wgEnableEditToolbar to disable JS toolbar X-Git-Tag: 1.3.0beta1~1147 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=5ee6d6758187ff4b1dc79f2c842f9024b4668f3a;p=lhc%2Fweb%2Fwiklou.git added $wgEnableEditToolbar to disable JS toolbar --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 9f2832fb28..28ee8edbba 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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; ?> diff --git a/includes/EditPage.php b/includes/EditPage.php index 86c3c5c561..91ca8b66b2 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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(); } diff --git a/languages/Language.php b/languages/Language.php index f53826e018..8b68aaf006 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -117,6 +117,10 @@ this (alternative: like this?).", "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",