Give back the message object to those who want it
[squirrelmail.git] / plugins / administrator / options.php
index 5d3a1fe1e8454a20a13fead4a6fae801a5e8235a..1bfaf784cd37a826269827e8a53324e2f433a73a 100644 (file)
@@ -7,13 +7,15 @@
  * SquirrelMail configuration file.
  *
  * @author Philippe Mingo
- * @copyright © 1999-2007 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
  * @subpackage administrator
  */
 
+define('PAGE_NAME', 'administrator_options');
+
 /**
  * parse the config file
  *
@@ -420,7 +422,7 @@ foreach ( $newcfg as $k => $v ) {
             }
             echo "<tr><td valign=\"top\">$name</td><td>"
                 ."<textarea cols=\"$size\" rows=\"4\" name=\"adm_$n\">" 
-                .htmlspecialchars(stripslashes(substr( $v, 1, strlen( $v ) - 2 )))
+                .sm_encode_html_special_chars(stripslashes(substr( $v, 1, strlen( $v ) - 2 )))
                 ."</textarea>";
             if ( isset( $defcfg[$k]['comment'] ) ) {
                 echo ' &nbsp; ' . $defcfg[$k]['comment'];
@@ -438,7 +440,7 @@ foreach ( $newcfg as $k => $v ) {
             }
             echo "<tr><td>$name</td><td>"
                 ."<input size=\"$size\" name=\"adm_$n\" value=\""
-                .htmlspecialchars(stripslashes(substr( $v, 1, strlen( $v ) - 2 )))
+                .sm_encode_html_special_chars(stripslashes(substr( $v, 1, strlen( $v ) - 2 )))
                 .'" />';
             if ( isset( $defcfg[$k]['comment'] ) ) {
                 echo ' &nbsp; ' . $defcfg[$k]['comment'];
@@ -618,6 +620,8 @@ echo '<tr bgcolor="'.$color[5].'"><th colspan="2"><input value="'.
     Write the options to the file.
 */
 
+// Test/debug
+// $cfgfile = '/tmp/config.php';
 if ( $fp = @fopen( $cfgfile, 'w' ) ) {
     fwrite( $fp, "<?php\n".
     "/**\n".