ILIAS
release_8 Revision v8.23
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
__construct (ilDBInterface $a_db_handler, ilIniFile $client_ini=null) | |
getFileForStep (int $a_version) | |
Get db update file name for db step. More... | |
initStep (int $i) | |
readDBUpdateFile () | |
readLastUpdateFile () | |
getCurrentVersion () | |
setCurrentVersion (int $a_version) | |
setRunningStatus (int $a_nr) | |
Set running status for a step. More... | |
getRunningStatus () | |
Get running status. More... | |
clearRunningStatus () | |
Clear running status. More... | |
readFileVersion () | |
getFileVersion () | |
Get Version of file. More... | |
execQuery (ilDBInterface $db, string $str) | |
execute a query More... | |
checkQuery (string $q) | |
check query More... | |
applyUpdate (int $a_break=0) | |
Apply update. More... | |
applyUpdateNr (int $nr, $hotfix=false, $custom_update=false) | |
apply an update More... | |
getDBVersionStatus () | |
getTables () | |
getTableStatus (string $table) | |
getHotfixCurrentVersion () | |
Get current hotfix version. More... | |
setHotfixCurrentVersion (int $a_version) | |
Set current hotfix version. More... | |
getHotfixFileVersion () | |
Get current hotfix version. More... | |
readHotfixFileVersion (array $a_file_content) | |
Set current hotfix version. More... | |
readHotfixInfo (bool $a_force=false) | |
Get status of hotfix file. More... | |
hotfixAvailable () | |
Get status of hotfix file. More... | |
applyHotfix () | |
Apply hotfix. More... | |
getCustomUpdatesCurrentVersion () | |
setCustomUpdatesCurrentVersion (?int $a_version) | |
getCustomUpdatesFileVersion () | |
readCustomUpdatesFileVersion (array $a_file_content) | |
readCustomUpdatesInfo (bool $a_force=false) | |
customUpdatesAvailable () | |
applyCustomUpdates () | |
getUpdateSteps (int $a_break=0) | |
Get update steps as string (for presentation) More... | |
getHotfixSteps () | |
Get hotfix steps. More... | |
getUpdateStepNr (int $nr, bool $hotfix=false, bool $custom_update=false) | |
Get single update step for presentation. More... | |
Data Fields | |
string | $DB_UPDATE_FILE |
int | $currentVersion = null |
int | $fileVersion = null |
string | $updateMsg |
Protected Attributes | |
ilIniFile | $client_ini = null |
int | $custom_updates_current_version = 0 |
int | $custom_updates_file_version = null |
bool | $custom_updates_info_read = null |
string | $error |
string | $PATH = './' |
ilDBInterface | $db |
string | $current_file |
string | $LAST_UPDATE_FILE |
array | $filecontent |
array | $lastfilecontent |
int | $db_update_running |
int | $hotfix_current_version |
ilSetting | $hotfix_setting |
array | $hotfix_version |
array | $hotfix_content |
int | $hotfix_file_version |
ilSetting | $custom_updates_setting |
array | $custom_updates_content |
Iterator | $ctrl_structure_iterator |
Private Member Functions | |
initGlobalsRequiredForUpdateSteps (?ilCtrlStructureReader &$ilCtrlStructureReader, ?ilDBInterface &$ilDB) | |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Database Update class
Definition at line 27 of file class.ilDBUpdate.php.
ilDBUpdate::__construct | ( | ilDBInterface | $a_db_handler, |
ilIniFile | $client_ini = null |
||
) |
Definition at line 54 of file class.ilDBUpdate.php.
References $client_ini, getCurrentVersion(), getFileForStep(), PATH, readDBUpdateFile(), readFileVersion(), and readLastUpdateFile().
ilDBUpdate::applyCustomUpdates | ( | ) |
Definition at line 665 of file class.ilDBUpdate.php.
References $c, $custom_updates_content, Vendor\Package\$f, $i, $ilDB, applyUpdateNr(), getCustomUpdatesCurrentVersion(), getCustomUpdatesFileVersion(), initGlobalsRequiredForUpdateSteps(), and readCustomUpdatesInfo().
ilDBUpdate::applyHotfix | ( | ) |
Apply hotfix.
Definition at line 568 of file class.ilDBUpdate.php.
References $c, Vendor\Package\$f, $hotfix_content, $i, $ilDB, applyUpdateNr(), getHotfixCurrentVersion(), getHotfixFileVersion(), initGlobalsRequiredForUpdateSteps(), and readHotfixInfo().
ilDBUpdate::applyUpdate | ( | int | $a_break = 0 | ) |
Apply update.
Definition at line 290 of file class.ilDBUpdate.php.
References $c, $currentVersion, Vendor\Package\$f, $fileVersion, $i, $ilDB, applyUpdateNr(), getFileForStep(), initGlobalsRequiredForUpdateSteps(), initStep(), PATH, and readDBUpdateFile().
ilDBUpdate::applyUpdateNr | ( | int | $nr, |
$hotfix = false , |
|||
$custom_update = false |
|||
) |
apply an update
int | $nr | number what patch to apply (Reference: Patch for https://mantis.ilias.de/view.php?id=28550) private |
Definition at line 341 of file class.ilDBUpdate.php.
References $error, $i, $ilDB, $update, clearRunningStatus(), execQuery(), initGlobalsRequiredForUpdateSteps(), setCurrentVersion(), setCustomUpdatesCurrentVersion(), setHotfixCurrentVersion(), and setRunningStatus().
Referenced by applyCustomUpdates(), applyHotfix(), and applyUpdate().
ilDBUpdate::checkQuery | ( | string | $q | ) |
check query
Definition at line 253 of file class.ilDBUpdate.php.
Referenced by execQuery().
ilDBUpdate::clearRunningStatus | ( | ) |
Clear running status.
Definition at line 178 of file class.ilDBUpdate.php.
Referenced by applyUpdateNr().
ilDBUpdate::customUpdatesAvailable | ( | ) |
Definition at line 659 of file class.ilDBUpdate.php.
References $custom_updates_current_version, and readCustomUpdatesInfo().
ilDBUpdate::execQuery | ( | ilDBInterface | $db, |
string | $str | ||
) |
execute a query
PhpUndefinedVariableInspection
PhpUndefinedVariableInspection
Definition at line 214 of file class.ilDBUpdate.php.
References $check, $i, checkQuery(), and ilDBInterface\query().
Referenced by applyUpdateNr().
ilDBUpdate::getCurrentVersion | ( | ) |
Definition at line 137 of file class.ilDBUpdate.php.
References $currentVersion, and ILIAS\Repository\int().
Referenced by __construct().
ilDBUpdate::getCustomUpdatesCurrentVersion | ( | ) |
Definition at line 605 of file class.ilDBUpdate.php.
References $custom_updates_current_version, and readCustomUpdatesInfo().
Referenced by applyCustomUpdates().
ilDBUpdate::getCustomUpdatesFileVersion | ( | ) |
Definition at line 621 of file class.ilDBUpdate.php.
References $custom_updates_file_version, and readCustomUpdatesInfo().
Referenced by applyCustomUpdates().
ilDBUpdate::getDBVersionStatus | ( | ) |
ilDBUpdate::getFileForStep | ( | int | $a_version | ) |
Get db update file name for db step.
Definition at line 85 of file class.ilDBUpdate.php.
Referenced by __construct(), applyUpdate(), and getUpdateSteps().
ilDBUpdate::getFileVersion | ( | ) |
ilDBUpdate::getHotfixCurrentVersion | ( | ) |
Get current hotfix version.
Definition at line 482 of file class.ilDBUpdate.php.
References readHotfixInfo().
Referenced by applyHotfix(), and getHotfixSteps().
ilDBUpdate::getHotfixFileVersion | ( | ) |
Get current hotfix version.
Definition at line 507 of file class.ilDBUpdate.php.
References readHotfixInfo().
Referenced by applyHotfix(), and getHotfixSteps().
ilDBUpdate::getHotfixSteps | ( | ) |
Get hotfix steps.
Definition at line 743 of file class.ilDBUpdate.php.
References $c, Vendor\Package\$f, $hotfix_content, $i, getHotfixCurrentVersion(), getHotfixFileVersion(), getUpdateStepNr(), and readHotfixInfo().
ilDBUpdate::getRunningStatus | ( | ) |
Get running status.
Definition at line 167 of file class.ilDBUpdate.php.
References $db_update_running, and ILIAS\Repository\int().
ilDBUpdate::getTables | ( | ) |
Definition at line 449 of file class.ilDBUpdate.php.
References Vendor\Package\$a, $query, $res, and getTableStatus().
ilDBUpdate::getTableStatus | ( | string | $table | ) |
Definition at line 469 of file class.ilDBUpdate.php.
References $query, and ilDBConstants\FETCHMODE_ASSOC.
Referenced by getTables().
ilDBUpdate::getUpdateStepNr | ( | int | $nr, |
bool | $hotfix = false , |
||
bool | $custom_update = false |
||
) |
Get single update step for presentation.
Definition at line 766 of file class.ilDBUpdate.php.
References $i.
Referenced by getHotfixSteps(), and getUpdateSteps().
ilDBUpdate::getUpdateSteps | ( | int | $a_break = 0 | ) |
Get update steps as string (for presentation)
Definition at line 706 of file class.ilDBUpdate.php.
References $c, $currentVersion, Vendor\Package\$f, $fileVersion, $i, $ilDB, getFileForStep(), getUpdateStepNr(), initGlobalsRequiredForUpdateSteps(), PATH, and readDBUpdateFile().
ilDBUpdate::hotfixAvailable | ( | ) |
Get status of hotfix file.
Definition at line 559 of file class.ilDBUpdate.php.
References $hotfix_current_version, and readHotfixInfo().
|
private |
Definition at line 258 of file class.ilDBUpdate.php.
References $DIC, and $GLOBALS.
Referenced by applyCustomUpdates(), applyHotfix(), applyUpdate(), applyUpdateNr(), and getUpdateSteps().
ilDBUpdate::initStep | ( | int | $i | ) |
Definition at line 104 of file class.ilDBUpdate.php.
Referenced by applyUpdate().
ilDBUpdate::readCustomUpdatesFileVersion | ( | array | $a_file_content | ) |
Definition at line 628 of file class.ilDBUpdate.php.
References $version.
Referenced by readCustomUpdatesInfo().
ilDBUpdate::readCustomUpdatesInfo | ( | bool | $a_force = false | ) |
Definition at line 643 of file class.ilDBUpdate.php.
References ILIAS\Repository\int(), PATH, and readCustomUpdatesFileVersion().
Referenced by applyCustomUpdates(), customUpdatesAvailable(), getCustomUpdatesCurrentVersion(), getCustomUpdatesFileVersion(), and setCustomUpdatesCurrentVersion().
ilDBUpdate::readDBUpdateFile | ( | ) |
Definition at line 109 of file class.ilDBUpdate.php.
Referenced by ilPluginDBUpdate\__construct(), __construct(), applyUpdate(), and getUpdateSteps().
ilDBUpdate::readFileVersion | ( | ) |
Definition at line 185 of file class.ilDBUpdate.php.
References $fileVersion, $version, and ILIAS\Repository\int().
Referenced by ilPluginDBUpdate\__construct(), and __construct().
ilDBUpdate::readHotfixFileVersion | ( | array | $a_file_content | ) |
Set current hotfix version.
Definition at line 517 of file class.ilDBUpdate.php.
References $version.
Referenced by readHotfixInfo().
ilDBUpdate::readHotfixInfo | ( | bool | $a_force = false | ) |
Get status of hotfix file.
Definition at line 535 of file class.ilDBUpdate.php.
References ILIAS_VERSION_NUMERIC, ILIAS\Repository\int(), PATH, and readHotfixFileVersion().
Referenced by applyHotfix(), getHotfixCurrentVersion(), getHotfixFileVersion(), getHotfixSteps(), hotfixAvailable(), and setHotfixCurrentVersion().
ilDBUpdate::readLastUpdateFile | ( | ) |
Definition at line 123 of file class.ilDBUpdate.php.
Referenced by ilPluginDBUpdate\__construct(), and __construct().
ilDBUpdate::setCurrentVersion | ( | int | $a_version | ) |
Definition at line 145 of file class.ilDBUpdate.php.
Referenced by applyUpdateNr().
ilDBUpdate::setCustomUpdatesCurrentVersion | ( | ?int | $a_version | ) |
Definition at line 612 of file class.ilDBUpdate.php.
References readCustomUpdatesInfo().
Referenced by applyUpdateNr().
ilDBUpdate::setHotfixCurrentVersion | ( | int | $a_version | ) |
Set current hotfix version.
Definition at line 492 of file class.ilDBUpdate.php.
References readHotfixInfo().
Referenced by applyUpdateNr().
ilDBUpdate::setRunningStatus | ( | int | $a_nr | ) |
Set running status for a step.
int | step number |
Definition at line 156 of file class.ilDBUpdate.php.
Referenced by applyUpdateNr().
|
protected |
Definition at line 33 of file class.ilDBUpdate.php.
Referenced by __construct().
|
protected |
Definition at line 52 of file class.ilDBUpdate.php.
|
protected |
Definition at line 40 of file class.ilDBUpdate.php.
int ilDBUpdate::$currentVersion = null |
Definition at line 30 of file class.ilDBUpdate.php.
Referenced by applyUpdate(), ilPluginDBUpdate\getCurrentVersion(), getCurrentVersion(), getDBVersionStatus(), and getUpdateSteps().
|
protected |
Definition at line 51 of file class.ilDBUpdate.php.
Referenced by applyCustomUpdates().
|
protected |
Definition at line 34 of file class.ilDBUpdate.php.
Referenced by customUpdatesAvailable(), and getCustomUpdatesCurrentVersion().
|
protected |
Definition at line 35 of file class.ilDBUpdate.php.
Referenced by getCustomUpdatesFileVersion().
|
protected |
Definition at line 36 of file class.ilDBUpdate.php.
|
protected |
Definition at line 50 of file class.ilDBUpdate.php.
|
protected |
Definition at line 39 of file class.ilDBUpdate.php.
string ilDBUpdate::$DB_UPDATE_FILE |
Definition at line 29 of file class.ilDBUpdate.php.
Referenced by ilPluginDBUpdate\__construct().
|
protected |
Definition at line 44 of file class.ilDBUpdate.php.
Referenced by getRunningStatus().
|
protected |
Definition at line 37 of file class.ilDBUpdate.php.
Referenced by applyUpdateNr().
|
protected |
Definition at line 42 of file class.ilDBUpdate.php.
int ilDBUpdate::$fileVersion = null |
Definition at line 31 of file class.ilDBUpdate.php.
Referenced by applyUpdate(), getFileVersion(), getUpdateSteps(), and readFileVersion().
|
protected |
Definition at line 48 of file class.ilDBUpdate.php.
Referenced by applyHotfix(), and getHotfixSteps().
|
protected |
Definition at line 45 of file class.ilDBUpdate.php.
Referenced by hotfixAvailable().
|
protected |
Definition at line 49 of file class.ilDBUpdate.php.
|
protected |
Definition at line 46 of file class.ilDBUpdate.php.
|
protected |
Definition at line 47 of file class.ilDBUpdate.php.
|
protected |
Definition at line 41 of file class.ilDBUpdate.php.
|
protected |
Definition at line 43 of file class.ilDBUpdate.php.
|
protected |
Definition at line 38 of file class.ilDBUpdate.php.
string ilDBUpdate::$updateMsg |
Definition at line 32 of file class.ilDBUpdate.php.