Skip to content

Commit 3b42f0e

Browse files
author
Marius Cramer
committed
- added execution of dev_collection sql file
1 parent 1e7b289 commit 3b42f0e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

install/lib/update.lib.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,15 @@ function updateDbAndIni() {
160160

161161
//* get the version of the db schema from the server table
162162
$found = true;
163+
$dev_patch = false;
163164
while($found == true) {
164-
$next_db_version = intval($current_db_version + 1);
165+
if($dev_patch == true) $next_db_version = 'dev_collection';
166+
else $next_db_version = intval($current_db_version + 1);
165167
$sql_patch_filename = realpath(dirname(__FILE__).'/../').'/sql/incremental/upd_'.str_pad($next_db_version, 4, '0', STR_PAD_LEFT).'.sql';
166168
$php_patch_filename = realpath(dirname(__FILE__).'/../').'/patches/upd_'.str_pad($next_db_version, 4, '0', STR_PAD_LEFT).'.php';
167169

168170
// comma separated list of version numbers were a update has to be done silently
169-
$silent_update_versions = '75';
171+
$silent_update_versions = 'dev_collection,75';
170172

171173
if(is_file($sql_patch_filename)) {
172174

@@ -204,8 +206,12 @@ function updateDbAndIni() {
204206
$php_patch->onAfterSQL();
205207
}
206208

207-
$current_db_version = $next_db_version;
209+
if($dev_patch == false) $current_db_version = $next_db_version;
210+
else $found = false;
211+
208212
if(isset($php_patch)) unset($php_patch);
213+
} elseif($dev_patch == false) {
214+
$dev_patch = true;
209215
} else {
210216
$found = false;
211217
}

0 commit comments

Comments
 (0)