Happy New Year
[squirrelmail.git] / plugins / squirrelspell / sqspell_functions.php
index dfb14986e9dafe5d97ac28304addcfafd4e19693..41c6783b0d84b84278ca889543edcb6f04d4ad27 100644 (file)
@@ -6,7 +6,7 @@
  * All SquirrelSpell-wide functions are in this file.
  *
  * @author Konstantin Riabitsev <icon at duke.edu>
- * @copyright 1999-2017 The SquirrelMail Project Team
+ * @copyright 1999-2018 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -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;