// Load all themes
while ($row = sqlFetchArray($result)) {
- // Construct relative include file name
- $inc = sprintf("theme/%s/theme.php", secureString($row['theme_path']));
-
// Load it's theme.php file if found
- if (isIncludeReadable($inc)) {
+ if (isThemeReadable($row['theme_path'])) {
// And save all data in array
- loadInclude($inc);
+ loadInclude(sprintf('theme/%s/theme.php', secureString($row['theme_path'])));
array_push($themesArray['theme_unix'], $row['theme_path']);
array_push($themesArray['theme_name'], $row['theme_name']);
} // END - if
} // END - if
} elseif ((!isInstalled()) && ((isInstalling()) || (isHtmlOutputMode())) && ((isGetRequestElementSet('theme')) || (isPostRequestElementSet('theme')))) {
// Prepare filename for checking
- $themeFile = sprintf("theme/%s/theme.php", getRequestElement('theme'));
+ $themeFile = sprintf('theme/%s/theme.php', getRequestElement('theme'));
// Installation mode active
- if ((isGetRequestElementSet('theme')) && (isIncludeReadable($theme))) {
+ if ((isGetRequestElementSet('theme')) && (isThemeReadable(getRequestElement('theme')))) {
// Set cookie from URL data
setMailerTheme(getRequestElement('theme'));
- } elseif (isIncludeReadable(sprintf("theme/%s/theme.php", postRequestElement('theme')))) {
+ } elseif ((isPostRequestElementSet('theme')) && (isThemeReadable(postRequestElement('theme')))) {
// Set cookie from posted data
setMailerTheme(postRequestElement('theme'));
}