Allow caller to get message object before sending
[squirrelmail.git] / functions / options.php
index 997c5a48fdde8ba0e86a8065f173ab86ed516583..99e26ba057e42d24dc85481c671ee1326074f10d 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Functions needed to display the options pages.
  *
- * @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 squirrelmail
@@ -235,6 +235,8 @@ class SquirrelOption {
         //Check for a current value.  
         if (isset($GLOBALS[$name])) {
             $this->value = $GLOBALS[$name];
+        // TODO: This code should be something more like the following, but who knows what would break if it was changed at this point
+        // } else if (initial_value !== '') {
         } else if (!empty($initial_value)) {
             $this->value = $initial_value;
         } else {
@@ -780,7 +782,7 @@ class SquirrelOption {
             $no_option = addRadioBox('new_' . $this->name, ($this->value == SMPREF_NO), SMPREF_NO, array_merge(array('id' => 'new_' . $this->name . '_no'), $this->aExtraAttribs)) . $nbsp . create_label((!empty($this->no_text) ? $this->no_text : _("No")), 'new_' . $this->name . '_no');
 
             /* Build the combined "boolean widget". */
-            $result = "$yes_option$nbsp$nbsp$nbsp$nbsp$no_option";
+            $result = "$yes_option$nbsp$nbsp$nbsp$nbsp$no_option " . ($this->trailing_text_small ? '<small>' : '') . ($this->trailing_text_is_html ? $this->trailing_text : sm_encode_html_special_chars($this->trailing_text)) . ($this->trailing_text_small ? '</small>' : '');
 
         }