From: pdontthink Date: Fri, 18 May 2007 05:27:31 +0000 (+0000) Subject: Add reminder comments that someone needs to take a look and fix some code in this... X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=dc4c072bf308107da1f93e0cdcf49f6ee6f96d98 Add reminder comments that someone needs to take a look and fix some code in this file. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12406 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/template/general_util.php b/functions/template/general_util.php index 1711c155..c54be4ae 100644 --- a/functions/template/general_util.php +++ b/functions/template/general_util.php @@ -130,14 +130,17 @@ function getIconPath ($icon_theme_path, $icon_name) { return NULL; // Desired icon exists in the current theme? +//FIXME: this assumes a URI path will be valid when used as a filesystem path - this will fail for some systems -- OTOH, if $icon_theme_path is meant as an internal filesystem path to the user's chosen theme directory, then the assumption that is wrong here is that this internal filesystem path is always correct for use as part of a URI. This really should be mapped to/from an internal path to a URI path -- or can we guarantee that the two are always the same? if (is_file($icon_theme_path . $icon_name)) { return $icon_theme_path . $icon_name; // Icon not found, check for the admin-specified fallback +//FIXME: same problem here as above } elseif (!is_null($fallback_icon_theme_path) && is_file($fallback_icon_theme_path . $icon_name)) { return $fallback_icon_theme_path . $icon_name; // Icon not found, return the SQM default icon +//FIXME: same problem here -- SM_PATH is *NOT* intended for use in URIs } elseif (is_file(SM_PATH . 'images/themes/default/'.$icon_name)) { return SM_PATH . 'images/themes/default/'.$icon_name; }