]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-theme_edit.php
Even more rewrites/fixes from EL branch (please report any broken part after you...
[mailer.git] / inc / modules / admin / what-theme_edit.php
index 8b2c80037b2fc963a9b64f032ee93b5bd64017d0..04b637aa35a336ac121f96c1e65dde0e821e221e 100644 (file)
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -58,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');
                }
 
@@ -75,7 +76,7 @@ if (countPostSelection() > 0) {
                        $result = SQL_QUERY($sql, __FILE__, __LINE__);
 
                        // Rebuild cache
-                       rebuildCacheFile('themes', 'them');
+                       rebuildCache('themes', 'them');
                } // END - if
        } // END - foreach