Index: trunk/bin/file_importer.php
===================================================================
--- trunk/bin/file_importer.php	(revision 106)
+++ trunk/bin/file_importer.php	(revision 111)
@@ -43,12 +43,12 @@
 //                     added_datetime
 //                 ) VALUES (
-//                     '" . addslashes(0) . "',
-//                     '" . addslashes('hosting') . "',
-//                     '" . addslashes($file_date) . "',
-//                     '" . addslashes($amt[1]) . "',
-//                     '" . addslashes('Paid') . "',
-//                     '" . addslashes('') . "',
-//                     '" . addslashes($file_text) . "',
-//                     '" . addslashes($file_date) . "',
+//                     '" . DB::escapeString(0) . "',
+//                     '" . DB::escapeString('hosting') . "',
+//                     '" . DB::escapeString($file_date) . "',
+//                     '" . DB::escapeString($amt[1]) . "',
+//                     '" . DB::escapeString('Paid') . "',
+//                     '" . DB::escapeString('') . "',
+//                     '" . DB::escapeString($file_text) . "',
+//                     '" . DB::escapeString($file_date) . "',
 //                     NOW()
 //                 )
Index: trunk/bin/module_maker/form_template.cli.php
===================================================================
--- trunk/bin/module_maker/form_template.cli.php	(revision 106)
+++ trunk/bin/module_maker/form_template.cli.php	(revision 111)
@@ -28,5 +28,5 @@
 
 // Get DB table column info.
-$qid = DB::query("DESCRIBE " . addslashes($db_tbl));
+$qid = DB::query("DESCRIBE " . DB::escapeString($db_tbl));
 while ($row = mysql_fetch_row($qid)) {
     $cols[] = $row;
Index: trunk/bin/module_maker/list_template.cli.php
===================================================================
--- trunk/bin/module_maker/list_template.cli.php	(revision 106)
+++ trunk/bin/module_maker/list_template.cli.php	(revision 111)
@@ -41,5 +41,5 @@
 
 // Get DB table column info.
-$qid = DB::query("DESCRIBE " . addslashes($db_tbl));
+$qid = DB::query("DESCRIBE " . DB::escapeString($db_tbl));
 while ($row = mysql_fetch_row($qid)) {
     $cols[] = $row;
Index: trunk/bin/module_maker/module.cli.php
===================================================================
--- trunk/bin/module_maker/module.cli.php	(revision 106)
+++ trunk/bin/module_maker/module.cli.php	(revision 111)
@@ -141,5 +141,5 @@
 // Ensure requested table contains columns.
 // Get DB table column info.
-$qid = DB::query("DESCRIBE " . addslashes($db_tbl));
+$qid = DB::query("DESCRIBE " . DB::escapeString($db_tbl));
 while ($row = mysql_fetch_row($qid)) {
     $cols[] = $row;
Index: trunk/bin/module_maker/skel/admin.php
===================================================================
--- trunk/bin/module_maker/skel/admin.php	(revision 106)
+++ trunk/bin/module_maker/skel/admin.php	(revision 111)
@@ -146,5 +146,5 @@
         if (getFormdata('repeat', false)) {
             // Display edit function with next available ID.
-            $qid = DB::query("SELECT %PRIMARY_KEY% FROM %DB_TBL% WHERE %PRIMARY_KEY% > '" . addslashes(getFormData('%PRIMARY_KEY%')) . "' ORDER BY %PRIMARY_KEY% ASC LIMIT 1");
+            $qid = DB::query("SELECT %PRIMARY_KEY% FROM %DB_TBL% WHERE %PRIMARY_KEY% > '" . DB::escapeString(getFormData('%PRIMARY_KEY%')) . "' ORDER BY %PRIMARY_KEY% ASC LIMIT 1");
             if (list($next_id) = mysql_fetch_row($qid)) {
                 App::dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . $next_id);
@@ -217,5 +217,5 @@
         SELECT *
         FROM %DB_TBL%
-        WHERE %PRIMARY_KEY% = '" . addslashes($id) . "'
+        WHERE %PRIMARY_KEY% = '" . DB::escapeString($id) . "'
     ");
     if (!$frm = mysql_fetch_assoc($qid)) {
@@ -259,5 +259,5 @@
         SELECT <##>
         FROM %DB_TBL%
-        WHERE %PRIMARY_KEY% = '" . addslashes($id) . "'
+        WHERE %PRIMARY_KEY% = '" . DB::escapeString($id) . "'
     ");
     if (! list($name) = mysql_fetch_row($qid)) {
@@ -268,5 +268,5 @@
 
     // Delete the record.
-    DB::query("DELETE FROM %DB_TBL% WHERE %PRIMARY_KEY% = '" . addslashes($id) . "'");
+    DB::query("DELETE FROM %DB_TBL% WHERE %PRIMARY_KEY% = '" . DB::escapeString($id) . "'");
 
     App::raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been deleted."), $name), MSG_SUCCESS, __FILE__, __LINE__);
@@ -336,5 +336,5 @@
     if (getFormData('filter_<##>', false)) {
         // Limit by filter.
-        $where_clause .= (empty($where_clause) ? 'WHERE' : 'AND') . " <##> = '" . addslashes(getFormData('filter_<##>')) . "'";
+        $where_clause .= (empty($where_clause) ? 'WHERE' : 'AND') . " <##> = '" . DB::escapeString(getFormData('filter_<##>')) . "'";
     }
 
@@ -418,6 +418,6 @@
         DB::query("
             UPDATE %DB_TBL% SET
-                rank = '" . addslashes($new_rank) . "'
-            WHERE %PRIMARY_KEY% = '" . addslashes($id) . "'
+                rank = '" . DB::escapeString($new_rank) . "'
+            WHERE %PRIMARY_KEY% = '" . DB::escapeString($id) . "'
         ");
     }
Index: trunk/bin/module_maker/skel/public.php
===================================================================
--- trunk/bin/module_maker/skel/public.php	(revision 106)
+++ trunk/bin/module_maker/skel/public.php	(revision 111)
@@ -36,5 +36,5 @@
     $qid = DB::query("
         SELECT * FROM %DB_TBL%
-        WHERE %PRIMARY_KEY% = '" . addslashes(getFormData('%PRIMARY_KEY%')) . "'
+        WHERE %PRIMARY_KEY% = '" . DB::escapeString(getFormData('%PRIMARY_KEY%')) . "'
         AND publish = 'true'
         <##>AND (publish_date <= CURDATE() OR publish_date = '0000-00-00')
@@ -50,5 +50,5 @@
         UPDATE %DB_TBL%
         SET hit_count = hit_count + 1
-        WHERE %PRIMARY_KEY% = '" . addslashes(getFormData('%PRIMARY_KEY%')) . "'
+        WHERE %PRIMARY_KEY% = '" . DB::escapeString(getFormData('%PRIMARY_KEY%')) . "'
     ");
 
Index: trunk/bin/module_maker/sql.cli.php
===================================================================
--- trunk/bin/module_maker/sql.cli.php	(revision 106)
+++ trunk/bin/module_maker/sql.cli.php	(revision 111)
@@ -46,5 +46,5 @@
 
 // Get DB table column info.
-$qid = DB::query("DESCRIBE " . addslashes($db_tbl));
+$qid = DB::query("DESCRIBE " . DB::escapeString($db_tbl));
 while ($row = mysql_fetch_row($qid)) {
     $cols[] = $row;
@@ -70,5 +70,5 @@
         } else if ('set' == $type) {
             // Set types usually need to be converted to comma-delimited lists.
-            $c[$field] = "'\" . dbArrayToList(\$frm['$field']) . \"'";
+            $c[$field] = "'\" . escapedList(array_keys(\$frm['$field'])) . \"'";
         } else if ('featured' == $field || 'publish' == $field || preg_match("/enum\('true'\)/", $col[1])) {
             // Toggle types.
@@ -76,5 +76,5 @@
         } else if ('added_by_user_id' == $field || 'modified_by_user_id' == $field) {
             // Toggle types.
-            $c[$field] = "'\" . addslashes(\$auth->getVal('user_id')) . \"'";
+            $c[$field] = "'\" . DB::escapeString(\$auth->getVal('user_id')) . \"'";
         } else if ('added_datetime' == $field || 'modified_datetime' == $field) {
             // DB record insertion datetime.
@@ -82,5 +82,5 @@
         } else {
             // Default. Just insert data.
-            $c[$field] = "'\" . addslashes(\$frm['$field']) . \"'";
+            $c[$field] = "'\" . DB::escapeString(\$frm['$field']) . \"'";
         }
     }
@@ -135,5 +135,5 @@
     DB::query("
         UPDATE $db_tbl SET$key_eq_val
-        WHERE $primary_key = '" . addslashes(\$frm['$primary_key']) . "'
+        WHERE $primary_key = '" . DB::escapeString(\$frm['$primary_key']) . "'
     ");
 E_O_F;
@@ -148,5 +148,5 @@
 $delim = 'WHERE';
 if (!empty($primary_key)) {
-    $where_clause = "            $delim $primary_key = '\" . addslashes(\$frm['$primary_key']) . \"'\n";
+    $where_clause = "            $delim $primary_key = '\" . DB::escapeString(\$frm['$primary_key']) . \"'\n";
     $delim = 'AND';
 }
@@ -155,5 +155,5 @@
         continue;
     }
-    $where_clause .= "            $delim $k = '\" . addslashes(\$frm['$k']) . \"'\n";
+    $where_clause .= "            $delim $k = '\" . DB::escapeString(\$frm['$k']) . \"'\n";
     $delim = 'AND';
 }
@@ -183,9 +183,9 @@
 if (!isset($op) || 'search' == $op) {
 $search_skip_columns = array('added_datetime', 'added_by_user_id', 'modified_datetime', 'modified_by_user_id', 'publish', 'featured');
-$search_columns = $db_tbl . '.' . join(" LIKE '%\" . addslashes(\$qry_words[\$i]) . \"%'\n                    OR $db_tbl.", array_diff(array_keys($c), $search_skip_columns));
+$search_columns = $db_tbl . '.' . join(" LIKE '%\" . DB::escapeString(\$qry_words[\$i]) . \"%'\n                    OR $db_tbl.", array_diff(array_keys($c), $search_skip_columns));
 echo <<<E_O_F
             \$where_clause .= (empty(\$where_clause) ? 'WHERE' : 'AND') . "
                 (
-                    $search_columns LIKE '%" . addslashes(\$qry_words[\$i]) . "%'
+                    $search_columns LIKE '%" . DB::escapeString(\$qry_words[\$i]) . "%'
                 )
             ";
Index: trunk/bin/module_maker/validation.cli.php
===================================================================
--- trunk/bin/module_maker/validation.cli.php	(revision 106)
+++ trunk/bin/module_maker/validation.cli.php	(revision 111)
@@ -28,5 +28,5 @@
 
 // Get DB table column info.
-$qid = DB::query("DESCRIBE " . addslashes($db_tbl));
+$qid = DB::query("DESCRIBE " . DB::escapeString($db_tbl));
 while ($row = mysql_fetch_row($qid)) {
     $cols[] = $row;
