// read current version of Admidio database $installedDbVersion = ''; $installedDbBetaVersion = ''; $maxUpdateStep = 0; $currentUpdateStep = 0; if (!$gDb->query('SELECT 1 FROM ' . TBL_COMPONENTS, false)) { // in Admidio version 2 the database version was stored in preferences table if (isset($gPreferences['db_version'])) { $installedDbVersion = $gPreferences['db_version']; $installedDbBetaVersion = $gPreferences['db_version_beta']; } } else { // read system component $componentUpdateHandle = new ComponentUpdate($gDb); $componentUpdateHandle->readDataByColumns(array('com_type' => 'SYSTEM', 'com_name_intern' => 'CORE')); if ($componentUpdateHandle->getValue('com_id') > 0) { $installedDbVersion = $componentUpdateHandle->getValue('com_version'); $installedDbBetaVersion = $componentUpdateHandle->getValue('com_beta'); $currentUpdateStep = $componentUpdateHandle->getValue('com_update_step'); $maxUpdateStep = $componentUpdateHandle->getMaxUpdateStep(); } } // if a beta was installed then create the version string with Beta version if ($installedDbBetaVersion > 0) { $installedDbVersion = $installedDbVersion . ' Beta ' . $installedDbBetaVersion; } // if database version is not set then show notice if ($installedDbVersion === '') { $message = ' <div class="alert alert-danger alert-small" role="alert"> <span class="glyphicon glyphicon-exclamation-sign"></span>