E_ALL is a moving target
[squirrelmail.git] / plugins / administrator / options.php
index 57e631b5f6f25b20308dc1c6df1d275a6d0e7ec1..3f7ad46ef28696e7e7b48de04a156de9a7e916cd 100644 (file)
@@ -7,13 +7,15 @@
  * SquirrelMail configuration file.
  *
  * @author Philippe Mingo
- * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @copyright 1999-2012 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
  *
@@ -170,6 +172,7 @@ function change_to_rel_path($old_path) {
  *     empty_string            --> ''
  *     ../images/logo.gif      --> SM_PATH . 'images/logo.gif'
  *     images/logo.gif         --> SM_PATH . 'config/images/logo.gif'
+ *     C:/absolute/win/path    --> 'C:/absolute/win/path'
  *     /absolute/path/logo.gif --> '/absolute/path/logo.gif'
  *     http://whatever/        --> 'http://whatever'
  *
@@ -180,7 +183,8 @@ function change_to_rel_path($old_path) {
 function change_to_sm_path($old_path) {
     if ( $old_path === '' || $old_path == "''" ) {
         return "''";
-    } elseif ( preg_match("/^(\/|http)/", $old_path) ) {
+    } elseif ( preg_match("/^(\/|http)/", $old_path) ||
+        substr($old_path,1,2) == ':/' ) {
         return "'" . $old_path . "'";
     } elseif ( preg_match("/^(\$|SM_PATH)/", $old_path) ) {
         return $old_path;
@@ -622,8 +626,7 @@ if ( $fp = @fopen( $cfgfile, 'w' ) ) {
     " * SquirrelMail Configuration File\n".
     " * Created using the Administrator Plugin\n".
     " */\n".
-    "\n".
-    "global \$version;\n" );
+    "\n" );
 
     foreach ( $newcfg as $k => $v ) {
         if ( $k{0} == '$' && $v <> '' || is_int($v)) {