// // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This may be run after an upgraded OpenEMR has been installed. // Its purpose is to upgrade the MySQL OpenEMR database as needed // for the new release. // Disable PHP timeout. This will not work in safe mode. ini_set('max_execution_time', '0'); $ignoreAuth = true; // no login required require_once('interface/globals.php'); require_once('library/sql.inc'); require_once('library/sql_upgrade_fx.php'); // Force logging off $GLOBALS["enable_auditlog"]=0; $versions = array(); $sqldir = "$webserver_root/sql"; $dh = opendir($sqldir); if (! $dh) die("Cannot read $sqldir"); while (false !== ($sfname = readdir($dh))) { if (substr($sfname, 0, 1) == '.') continue; if (preg_match('/^(\d+)_(\d+)_(\d+)-to-\d+_\d+_\d+_upgrade.sql$/', $sfname, $matches)) { $version = $matches[1] . '.' . $matches[2] . '.' . $matches[3]; $versions[$version] = $sfname; } } closedir($dh); ksort($versions); ?>
Database upgrade finished.
\n"; echo "\n"; exit(); } ?>