From d90ace91b5fce766924e587d20450f45318ccc64 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 20 Oct 2008 22:04:43 +0000 Subject: [PATCH] Missing theme extension fixed in theme_edit/theme_import --- inc/databases.php | 2 +- inc/modules/admin/what-theme_edit.php | 3 +++ inc/modules/admin/what-theme_import.php | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/inc/databases.php b/inc/databases.php index e6ac4fb78c..d169b1e0ac 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "517"); +define('CURR_SVN_REVISION', "518"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index b5a697ffcc..7a9024674e 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -35,6 +35,9 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); +} elseif (!EXT_IS_ACTIVE("theme")) { + ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "theme")); + return; } // Add description as navigation point diff --git a/inc/modules/admin/what-theme_import.php b/inc/modules/admin/what-theme_import.php index 94f4551670..8d8e5de725 100644 --- a/inc/modules/admin/what-theme_import.php +++ b/inc/modules/admin/what-theme_import.php @@ -35,6 +35,9 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); +} elseif (!EXT_IS_ACTIVE("theme")) { + ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "theme")); + return; } // Add description as navigation point @@ -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) + $result = 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__); -- 2.39.5