UPDATE.php
WIKINDX : Bibliographic Management system.
Tags
Table of Contents
Functions
- needUpdate() : bool
- Check if the current WIKINDX data (db and files) need an upgrade
- existsTableVersion() : bool
- Check if 'version' table that stores the version number of the db schema exists
- getCoreInternalVersion() : float
- Return the internal version stored in the database of the core
- setCoreInternalVersion() : mixed
- Write an internal version in the database of a component or the core
- getComponentInternalVersion() : float
- Return the internal version of a component stored in the database
- setComponentInternalVersion() : mixed
- Write an internal version of a component in the database
- deleteComponentInternalVersion() : mixed
- Delete an internal version of a component from the database
- existsSuperadminAccount() : bool
- Check if 'users' table has not been filled with the superadmin account
- getConfigContactEmail() : float
- Return the configContactEmail depending on the software version
- logonCheckUpgradeDB() : bool
- Initial logon to the system when upgrading the database.
Functions
needUpdate()
Check if the current WIKINDX data (db and files) need an upgrade
needUpdate(object $dbo) : bool
Parameters
- $dbo : object
-
An SQL object
Return values
boolexistsTableVersion()
Check if 'version' table that stores the version number of the db schema exists
existsTableVersion(object $dbo) : bool
Check also the old names of the version table.
This function is used only during the upgrade process.
Parameters
- $dbo : object
-
An SQL object
Return values
boolgetCoreInternalVersion()
Return the internal version stored in the database of the core
getCoreInternalVersion(object $dbo) : float
This function is used only during the upgrade process, and the value should be looked up in the field regardless of the version.
Parameters
- $dbo : object
-
An SQL object
Return values
floatsetCoreInternalVersion()
Write an internal version in the database of a component or the core
setCoreInternalVersion(object $dbo[, string $version = NULL ]) : mixed
This function is used only during the upgrade process, and the value should be written in the field regardless of the version.
If $version is NULL, the version number used it 0.0.
Parameters
- $dbo : object
-
An SQL object
- $version : string = NULL
-
(Default is NULL)
getComponentInternalVersion()
Return the internal version of a component stored in the database
getComponentInternalVersion(object $dbo, string $ComponentType, string $ComponentId) : float
This function is used only during the upgrade process or when a component is installed, and the value should be looked up in the field regardless of the version.
Parameters
- $dbo : object
-
An SQL object
- $ComponentType : string
-
Type of a component
- $ComponentId : string
-
Id of a component
Return values
floatsetComponentInternalVersion()
Write an internal version of a component in the database
setComponentInternalVersion(object $dbo, string $ComponentType, string $ComponentId[, string $version = NULL ]) : mixed
This function is used only during the upgrade process or when a component is installed, and the value should be written n the field regardless of the version.
If $version is NULL, the version number used it 0.0.
Parameters
- $dbo : object
-
An SQL object
- $ComponentType : string
-
Type of a component
- $ComponentId : string
-
Id of a component
- $version : string = NULL
-
(Default is NULL)
deleteComponentInternalVersion()
Delete an internal version of a component from the database
deleteComponentInternalVersion(object $dbo, string $ComponentType, string $ComponentId) : mixed
This function is used only during the upgrade process or when a component is uninstalled, and the value should be written n the field regardless of the version.
Parameters
- $dbo : object
-
An SQL object
- $ComponentType : string
-
Type of a component
- $ComponentId : string
-
Id of a component
existsSuperadminAccount()
Check if 'users' table has not been filled with the superadmin account
existsSuperadminAccount(object $dbo) : bool
This function is used only during the upgrade process.
Parameters
- $dbo : object
-
An SQL object
Return values
boolgetConfigContactEmail()
Return the configContactEmail depending on the software version
getConfigContactEmail(object $dbo) : float
This function is used only during the upgrade process, and the value should be looked up in the field regardless of the version.
Parameters
- $dbo : object
-
An SQL object
Return values
floatlogonCheckUpgradeDB()
Initial logon to the system when upgrading the database.
logonCheckUpgradeDB(object $dbo, string $username, string $password) : bool
Parameters
- $dbo : object
-
An SQL object
- $username : string
- $password : string
Return values
bool —TRUE if able to authenticate