From 7ca844c5366c5276b45d6b1173d4a1005d14c291 Mon Sep 17 00:00:00 2001 From: bradymiller Date: Tue, 10 Jun 2014 20:32:19 -0700 Subject: [PATCH] fixed upgrade script to also update with patch if applicable --- sql_upgrade.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sql_upgrade.php b/sql_upgrade.php index ae7799a07..db5021fab 100644 --- a/sql_upgrade.php +++ b/sql_upgrade.php @@ -60,7 +60,13 @@ if (!empty($_POST['form_submit'])) { upgradeFromSqlFile('ippf_upgrade.sql'); } + if ( (!empty($v_realpatch)) && ($v_realpatch != "") && ($v_realpatch > 0) ) { + // This release contains a patch file, so process it. + upgradeFromSqlFile('patch.sql'); + } + flush(); + echo "Updating global configuration defaults...
\n"; require_once("library/globals.inc.php"); foreach ($GLOBALS_METADATA as $grpname => $grparr) { @@ -84,6 +90,12 @@ if (!empty($_POST['form_submit'])) { sqlStatement("UPDATE version SET v_major = '$v_major', v_minor = '$v_minor', " . "v_patch = '$v_patch', v_tag = '$v_tag', v_database = '$v_database'"); + if ( (!empty($v_realpatch)) && ($v_realpatch != "") && ($v_realpatch > 0) ) { + // This release contains a patch file, so update patch indicator. + echo "Patch was also installed, so update version patch indicator...
\n"; + sqlStatement("UPDATE version SET v_realpatch = '$v_realpatch'"); + } + echo "

Database and Access Control upgrade finished.

\n"; echo "\n"; exit(); -- 2.11.4.GIT