* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
// Check if new theme is selcted
- if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != getCurrentTheme())) {
+ if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != getCurrentTheme()) && (isThemeReadable(postRequestElement('new_theme')))) {
// Set new theme for guests
$newTheme = postRequestElement('new_theme');
setMailerTheme($newTheme);
// Remove current from array
- removeIncludeFromPool('theme', sprintf("theme/%s/theme.php", getCurrentTheme()));
+ removeIncludeFromPool('theme', sprintf('theme/%s/theme.php', getCurrentTheme()));
// Add new theme
- addIncludeToPool('theme', sprintf("theme/%s/theme.php", $newTheme));
+ addIncludeToPool('theme', sprintf('theme/%s/theme.php', $newTheme));
// Redirect to same URL
redirectToRequestUri();
// Return filter data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=<pre>'.print_r($filterData,true).'</pre>';
+ //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=<pre>'.print_r($filterData,TRUE).'</pre>';
return $filterData;
}