From c5fcb87b51b7590195e3e5b27570ace0fc8d8da6 Mon Sep 17 00:00:00 2001 From: Clint Armstrong Date: Wed, 22 Jul 2015 08:31:51 -0400 Subject: [PATCH] bail if schema is already up to date --- includes/sql-schema/update.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/sql-schema/update.php b/includes/sql-schema/update.php index 46233e8dd..23038e5fc 100644 --- a/includes/sql-schema/update.php +++ b/includes/sql-schema/update.php @@ -32,7 +32,7 @@ if (!isset($debug)) { } if (!dbGetLock('schema_update')) { - echo "Schema update already in progress. Exiting"; + echo "Schema update already in progress. Exiting\n"; exit(1); } //end if @@ -93,6 +93,13 @@ if ($handle = opendir($config['install_dir'].'/sql-schema')) { asort($filelist); +if (explode('.', max($filelist), 2) <= $db_rev) { + if ($debug) { + echo "DB Schema already up to date.\n"; + } + exit(0); +} + foreach ($filelist as $file) { list($filename,$extension) = explode('.', $file, 2); if ($filename > $db_rev) {