to fix an issue with an theme being deleted and people still using it
in admincp.php find
it should fix the users the was still using an theme if it was deleted.
Changed in svn
in admincp.php find
} elseif ($do == "del") {
if (!@count($_POST["ids"])) show_error_msg(T_("ERROR"), T_("NOTHING_SELECTED"), 1);
$ids = array_map("intval", $_POST["ids"]);
$ids = implode(', ', $ids);
SQL_Query_exec("DELETE FROM `stylesheets` WHERE `id` IN ($ids)");
header("Refresh: 1;url=admincp.php?action=style");
show_error_msg(T_("SUCCESS"), T_("THEME_SUCCESS_THEME_DELETED"), 1);
and change to
} elseif ($do == "del") {
if (!@count($_POST["ids"])) show_error_msg(T_("ERROR"), T_("NOTHING_SELECTED"), 1);
$ids = array_map("intval", $_POST["ids"]);
$ids = implode(', ', $ids);
SQL_Query_exec("DELETE FROM `stylesheets` WHERE `id` IN ($ids)");
SQL_Query_exec("UPDATE `users` SET `stylesheet` = ".$site_config["default_theme"]." WHERE stylesheet NOT IN (SELECT id FROM stylesheets)");
autolink("admincp.php?action=style", T_("THEME_SUCCESS_THEME_DELETED"));
it should fix the users the was still using an theme if it was deleted.
Changed in svn
