Even more rewrites/fixes from EL branch (please report any broken part after you...
[mailer.git] / inc / modules / admin / what-theme_edit.php
index 1c5144f..04b637a 100644 (file)
@@ -59,14 +59,14 @@ if (countPostSelection() > 0) {
                if (isPostRequestParameterSet(('status'))) {
                        // Change status
                        if (postRequestParameter('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`=" . bigintval($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`=" . bigintval($id) . " LIMIT 1";
                        }
                        $OUT = getMessage('ADMIN_THEMES_UPDATED');
-               } elseif (isPostRequestParameterSet('del')) {
+               } elseif (isFormSent('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`=" . bigintval($id) . " LIMIT 1";
                        $OUT = getMessage('ADMIN_THEMES_DELETED');
                }