} if (!$updater_utils->does_table_exist('sys_updates')) { $sql = <<<QUERY CREATE TABLE `sys_updates` ( `name` varchar(255), `updated` datetime NOT NULL, KEY `name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=0; QUERY; $updater_utils->execute_query($sql, true); $filenames = array('stopfile_convert_calc_ans_done.txt', 'stopfile_sct_fix.txt', 'stopfile_textbox_fix.txt', 'stopfile_textbox_update.txt'); foreach ($filenames as $filename) { if (file_exists($filename)) { $update_name = str_replace('stopfile_', '', $filename); $update_name = str_replace('.txt', '', $update_name); $updater_utils->record_update($update_name); } } $mysqli->commit(); } /* ***** ALL UPDATES SHOULD NOW BE PLACED IN DATESTAMPED FILES IN THE version5 FOLDER ***** * ***** UPDATE FILES CAN BE CREATED BY RUNNING /updates/create_update.php */ // Run individual update files $files = scandir($migration_path); foreach ($files as $file) { if (StringUtils::ends_with($file, '.php')) { include $migration_path . '/' . $file; $mysqli->commit();