Add ability to control the display of the "Check Spelling" button. Allows administrat...
[squirrelmail.git] / plugins / squirrelspell / sqspell_functions.php
index dfb14986e9dafe5d97ac28304addcfafd4e19693..f64f9e7de757a8fea65b038fd6d70ae486a37392 100644 (file)
@@ -57,11 +57,15 @@ function squirrelspell_optpage_block_function() {
  * @return void
  */
 function squirrelspell_setup_function() {
+
+  global $data_dir, $username;
+  $sqspell_show_button = getPref($data_dir, $username, 'sqspell_show_button', 1);
+
   /**
    * Check if this browser is capable of displaying SquirrelSpell
    * correctly.
    */
-  if (checkForJavascript()) {
+  if ($sqspell_show_button && checkForJavascript()) {
 
     global $oTemplate, $base_uri, $nbsp;