X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-theme_import.php;h=c56245e4ee4f731c51e71212d86dce776f3f9864;hp=d075327bfec9d4ec9a051f00afbc4add61b7ed84;hb=56156f6c4392510cdbe0eb4f2ccefc23b43e2672;hpb=143e78d4231adddd9e706cbf55ec5dd8c1651890 diff --git a/inc/modules/admin/what-theme_import.php b/inc/modules/admin/what-theme_import.php index d075327bfe..c56245e4ee 100644 --- a/inc/modules/admin/what-theme_import.php +++ b/inc/modules/admin/what-theme_import.php @@ -32,13 +32,16 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!is_admin())) { +if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); +} elseif (!EXT_IS_ACTIVE("theme")) { + addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "theme")); + return; } // Add description as navigation point -ADD_DESCR("admin", basename(__FILE__)); +ADD_DESCR("admin", __FILE__); // Switch to testing mode $THEME_MODE = "test"; @@ -54,7 +57,7 @@ if (!empty($_POST['theme'])) { include($file); // Register it ith the exchange - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_themes (theme_path, theme_active, theme_ver, theme_name) + SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_themes` (`theme_path`, `theme_active`, `theme_ver`, `theme_name`) VALUES ('%s','N','%s','%s')", array($_POST['theme'], $THEME_VERSION, $THEME_NAME), __FILE__, __LINE__); @@ -120,13 +123,13 @@ foreach ($THEMES['theme_unix'] as $key => $unix) { // Check if current theme is already imported or not if (THEME_CHECK_EXIST($unix)) { // Already installed - $FOUND = "".ADMIN_THEME_ALREADY_INSTALLED.""; + $FOUND = "
".ADMIN_THEME_ALREADY_INSTALLED."
"; } else { // Theme not installed - $FOUND = "
+ $FOUND = " -
"; +"; } // Add row @@ -134,10 +137,10 @@ foreach ($THEMES['theme_unix'] as $key => $unix) { ".$unix." ".$THEMES['theme_name'][$key]." - ".$THEMES['theme_author'][$key]." + ".$THEMES['theme_author'][$key]." - ".$THEMES['theme_url'][$key]." + ".$THEMES['theme_url'][$key]." v".$THEMES['theme_ver'][$key]."