Index: trunk/globals.php =================================================================== diff -u -r1013 -r1016 --- trunk/globals.php (.../globals.php) (revision 1013) +++ trunk/globals.php (.../globals.php) (revision 1016) @@ -1635,5 +1635,8 @@ return defined('DEBUG_MODE') && constant('DEBUG_MODE') == 1 ? 1 : 0; } +function stricmp ($string1, $string2) { + return strcmp(strtolower($string1), strtolower($string2)); +} ?> Index: trunk/admin/include/mainscript.php =================================================================== diff -u -r964 -r1016 --- trunk/admin/include/mainscript.php (.../mainscript.php) (revision 964) +++ trunk/admin/include/mainscript.php (.../mainscript.php) (revision 1016) @@ -277,6 +277,18 @@ } } +function ValidThemeName(name_str) +{ + if (trim(name_str) == '') return false; + var re = new RegExp('^[a-zA-Z0-9_ ]{1,}$'); + if (name_str.match(re)) { + return true; + } + else { + return false; + } +} + function DaysInMonth(month,year) { timeA = new Date(year, month,1); Index: trunk/admin/config/addtheme.php =================================================================== diff -u -r822 -r1016 --- trunk/admin/config/addtheme.php (.../addtheme.php) (revision 822) +++ trunk/admin/config/addtheme.php (.../addtheme.php) (revision 1016) @@ -195,7 +195,7 @@