X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-theme_import.php;h=871e94ac4239c64cd73aaac178cb87c7cbeb2ceb;hp=d075327bfec9d4ec9a051f00afbc4add61b7ed84;hb=3daede4c904e23905c3e48dd6749019deca0a0e0;hpb=7f104f6fe558bb56b4205241435a2357c2feece1 diff --git a/inc/modules/admin/what-theme_import.php b/inc/modules/admin/what-theme_import.php index d075327bfe..871e94ac42 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__);