define('SERVER_URL', "http://www.mxchange.org");
// Current SVN revision
-define('CURR_SVN_REVISION', "677");
+define('CURR_SVN_REVISION', "678");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
} // END - if
// Run SQLs
- RUN_FILTER('run_sqls', $dry_run);
+ RUN_FILTER('run_sqls', array('dry_run' => $dry_run, 'sqls' => $SQLs));
if (!$dry_run) {
// Create task
} // END - if
// Run the run_sqls filter in non-dry mode
- RUN_FILTER('run_sqls', false);
+ RUN_FILTER('run_sqls', array('dry_run' => false, 'sqls' => $SQLs));
}
// Filter for calling the handler for login failtures
}
// Filter for running SQL commands
-function FILTER_RUN_SQLS ($dry_run) {
- global $SQLs;
-
+function FILTER_RUN_SQLS ($data) {
// Is the array there?
- if ((is_array($SQLs)) && (!$dry_run)) {
+ if ((isset($data['sqls'])) && ((!isset($data['dry_run'])) || ($data['dry_run'] == false))) {
// Run SQL commands
- foreach ($SQLs as $sql) {
+ foreach ($data['sqls'] as $sql) {
$sql = trim($sql);
if (!empty($sql)) {
// Do we have an "ALTER TABLE" command?
}
} // END - if
} // END - foreach
- } elseif (GET_EXT_VERSION("sql_patches") == "") {
- // Remove SQLs if extension is not installed
- $SQLs = array();
- }
+ } // END - if
}
// Filter for updating/validating login data