if (isPostRequestElementSet('theme')) {
// Check if theme is there
if (!ifThemeExists(postRequestElement('theme'))) {
- // Import theme
- $inc = sprintf("theme/%s/theme.php", sqlEscapeString(postRequestElement('theme')));
-
// Is the theme readable?
- if (isIncludeReadable($inc)) {
+ if (isThemeReadable(postRequestElement('theme'))) {
// Load the theme header file
- loadInclude($inc);
+ loadInclude(sprintf('theme/%s/theme.php', sqlEscapeString(postRequestElement('theme'))));
// Register it ith the exchange
sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_themes` (`theme_path`, `theme_active`, `theme_ver`, `theme_name`)