From 8e6799a30e61e03eca1d5cc2e2130c486f4342a5 Mon Sep 17 00:00:00 2001 From: kink Date: Mon, 25 Jun 2007 19:43:38 +0000 Subject: [PATCH] - Fix compatibility with Windows path in administrator plugin (#1740469). git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12471 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/administrator/options.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/administrator/options.php b/plugins/administrator/options.php index 1fcf1fc5..5d3a1fe1 100644 --- a/plugins/administrator/options.php +++ b/plugins/administrator/options.php @@ -170,6 +170,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 +181,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; -- 2.25.1