]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
Fix for inserted codes while registering of extensions, many rewrites/cleanups:
[mailer.git] / inc / filters.php
index 181c1fe4f2d9567b5858e42c17fba6074896c50d..333b5eb34ee9712c4e23410c1031349503f83d02 100644 (file)
@@ -254,17 +254,20 @@ function FILTER_RUN_SQLS ($data) {
                                // Trim spaces away
                                $sql = trim($sql);
 
+                               // Is 'enable_codes' not set? Then set it to true
+                               if (!isset($data['enable_codes'])) $data['enable_codes'] = true;
+
                                // Is there still a query left?
                                if (!empty($sql)) {
                                        // Do we have an "ALTER TABLE" command?
                                        if (substr(strtolower($sql), 0, 11) == 'alter table') {
                                                // Analyse the alteration command
                                                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Alterting table: {$sql}");
-                                               SQL_ALTER_TABLE($sql, __FUNCTION__, __LINE__);
+                                               SQL_ALTER_TABLE($sql, __FUNCTION__, __LINE__, $data['enable_codes']);
                                        } else {
                                                // Run regular SQL command
                                                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Running regular query: {$sql}");
-                                               SQL_QUERY($sql, __FUNCTION__, __LINE__, false);
+                                               SQL_QUERY($sql, __FUNCTION__, __LINE__, $data['enable_codes']);
                                        }
                                } // END - if
                        } // END - foreach