- // Daten abspeichern
- if ((count($SQL) > 0) || (!empty($SQL[0])))
- {
- foreach ($SQL as $s)
- {
- if (!empty($s))
- {
- // Only run non-empty strings
- $result = SQL_QUERY(trim($s), __FILE__, __LINE__);
- if (empty($content))
- {
- if (SQL_AFFECTEDROWS() == 1)
- {
- $content = "<SPAN class=\"admin_done\">".SETTINGS_SAVED."</SPAN>";
- }
- else
- {
- $content = "<SPAN class=\"admin_failed\">".SETTINGS_NOT_SAVED."</SPAN>";
- }
- }
- }
- }
- }
- else
- {
- $content = "<SPAN class=\"admin_failed\">".SETTINGS_NOT_SAVED."</SPAN>";
+
+ // Save settings
+ if (count($SQLs) > 0) {
+ // Run all queries
+ RUN_FILTER('run_sqls', array('dry_run' => false, 'sqls' => $SQLs));
+ $content = "<span class=\"admin_failed\">".SETTINGS_SAVED."</span>";
+ } else {
+ // Nothing has changed!
+ $content = "<span class=\"admin_failed\">".SETTINGS_NOT_SAVED."</span>";