$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!EXT_IS_ACTIVE("theme")) {
- addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
return;
}
// Check for selected themes
$SEL = 0;
-if (REQUEST_ISSET_POST(('sel'))) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
+if (REQUEST_ISSET_POST('sel')) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ($SEL > 0) {
$OUT = "";
foreach (REQUEST_POST('sel') as $id => $sel) {
- $SQL = "";
+ $sql = "";
// Shall I de-/activate or delete themes?
if (REQUEST_ISSET_POST(('status'))) {
// Change status
if (REQUEST_POST('active', $id) == "Y") {
- $SQL = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='N' WHERE id='".$id."' LIMIT 1";
+ $sql = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='N' WHERE id='".$id."' LIMIT 1";
} else {
- $SQL = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='Y' WHERE id='".$id."' LIMIT 1";
+ $sql = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='Y' WHERE id='".$id."' LIMIT 1";
}
$OUT = getMessage('ADMIN_THEMES_UPDATED');
- } elseif (REQUEST_ISSET_POST(('del'))) {
+ } elseif (REQUEST_ISSET_POST('del')) {
// Delete themes
- $SQL = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_themes` WHERE id='".$id."' LIMIT 1";
+ $sql = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_themes` WHERE id='".$id."' LIMIT 1";
$OUT = getMessage('ADMIN_THEMES_DELETED');
}
// Run SQL command?
- if (!empty($SQL)) {
+ if (!empty($sql)) {
// Run it
- $result = SQL_QUERY($SQL, __FILE__, __LINE__);
+ $result = SQL_QUERY($sql, __FILE__, __LINE__);
// Rebuild cache
- REBUILD_CACHE("themes", "them");
+ rebuildCacheFiles("themes", "them");
} // END - if
}