Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct ($descriptor, $params=array(), $isPlugin=false) | |
abort ($installer, $attr) | |
addInstallAction ($node) | |
addPluginVersions () | |
checkPhpVersion () | |
clearDataCache () | |
columnExists ($tableName, $columnName) | |
destroy () | |
execute () | |
executeAction ($action) | |
executeInstaller () | |
executeSQL ($sql) | |
fixLibraryFiles () | |
getConfigContents () | |
getCurrentVersion () | |
getErrorMsg () | |
getErrorString () | |
getErrorType () | |
getNewVersion () | |
getNotes () | |
getParam ($name) | |
getSQL () | |
installDefaultNavigationMenus () | |
installEmailTemplate ($installer, $attr) | |
installFilterConfig ($filterConfigFile) | |
isUpgrade () | |
log ($message) | |
migrateMetadataSettings () | |
migrateSidebarBlocks () | |
migrateSiteLocales () | |
parseInstaller () | |
parseInstallNodes ($installTree) | |
postInstall () | |
preInstall () | |
setCurrentVersion ($version) | |
setError ($type, $msg) | |
setLogger ($logger) | |
setStatsEmailSettings () | |
tableExists ($tableName) | |
updateConfig ($configParams) | |
updateVersion () | |
wroteConfig () | |
Base class for install and upgrade scripts.
Definition at line 34 of file Installer.inc.php.
Installer::__construct | ( | $descriptor, | |
$params = array() , |
|||
$isPlugin = false |
|||
) |
Constructor.
$descriptor | string descriptor path |
$params | array installer parameters |
$isPlugin | boolean true iff a plugin is being installed |
Reimplemented in PKPInstall, and Install.
Definition at line 150 of file Installer.inc.php.
References $descriptor, $isPlugin, $params, HookRegistry\call(), PluginRegistry\loadAllPlugins(), and wroteConfig().
Installer::abort | ( | $installer, | |
$attr | |||
) |
Fail the upgrade.
$installer | Installer |
$attr | array Attributes |
Definition at line 831 of file Installer.inc.php.
Installer::addInstallAction | ( | $node | ) |
Add an installer action from the descriptor.
$node | XMLNode |
Definition at line 382 of file Installer.inc.php.
Referenced by parseInstallNodes().
Installer::addPluginVersions | ( | ) |
Insert or update plugin data in versions and plugin_settings tables.
Definition at line 790 of file Installer.inc.php.
References PluginRegistry\getCategories(), Core\getCurrentDate(), DAORegistry\getDAO(), PluginRegistry\getPlugins(), PluginRegistry\loadCategory(), and VersionCheck\parseVersionXML().
Installer::checkPhpVersion | ( | ) |
Check that the environment meets minimum PHP requirements.
Definition at line 858 of file Installer.inc.php.
References setError().
Installer::clearDataCache | ( | ) |
Clear the data cache files (needed because of direct tinkering with settings tables)
Definition at line 676 of file Installer.inc.php.
References CACHE_TYPE_FILE, CACHE_TYPE_OBJECT, and CacheManager\getManager().
Installer::columnExists | ( | $tableName, | |
$columnName | |||
) |
Check to see whether a column exists. Used in installer XML in conditional checks on <data> nodes.
$tableName | string |
$columnName | string |
Definition at line 751 of file Installer.inc.php.
References DAORegistry\getDAO().
Installer::destroy | ( | ) |
Destroy / clean-up after the installer.
Definition at line 178 of file Installer.inc.php.
References HookRegistry\call().
Installer::execute | ( | ) |
Installation.
Definition at line 228 of file Installer.inc.php.
References executeInstaller(), parseInstaller(), postInstall(), preInstall(), and updateVersion().
Installer::executeAction | ( | $action | ) |
Execute a single installer action.
$action | array |
Definition at line 416 of file Installer.inc.php.
References $sql, executeSQL(), log(), and setError().
Referenced by executeInstaller().
Installer::executeInstaller | ( | ) |
Execute the installer actions.
Definition at line 316 of file Installer.inc.php.
References HookRegistry\call(), executeAction(), and log().
Referenced by execute().
Installer::executeSQL | ( | $sql | ) |
Execute an SQL statement.
$sql | mixed |
Definition at line 516 of file Installer.inc.php.
References $sql, and setError().
Referenced by PKPInstall\createDatabase(), and executeAction().
Installer::fixLibraryFiles | ( | ) |
Fix library files, which were mistakenly named server-side using source filenames. See https://github.com/pkp/pkp-lib/issues/5471
Definition at line 1091 of file Installer.inc.php.
References DAORegistry\getDAO().
Installer::getConfigContents | ( | ) |
Get the contents of the updated configuration file.
Definition at line 606 of file Installer.inc.php.
References $configContents.
Installer::getCurrentVersion | ( | ) |
Return currently installed version.
Definition at line 574 of file Installer.inc.php.
References $currentVersion.
Installer::getErrorMsg | ( | ) |
The error message, if an error has occurred. In the case of a database error, an unlocalized string containing the error message is returned. For any other error, a localization key for the error message is returned.
Definition at line 636 of file Installer.inc.php.
References $errorMsg.
Referenced by getErrorString().
Installer::getErrorString | ( | ) |
Return the error message as a localized string.
Definition at line 644 of file Installer.inc.php.
References getErrorMsg(), and getErrorType().
Installer::getErrorType | ( | ) |
Return the error code. Valid return values are:
Definition at line 626 of file Installer.inc.php.
Referenced by getErrorString(), and parseInstaller().
Installer::getNewVersion | ( | ) |
Return new version after installation.
Definition at line 582 of file Installer.inc.php.
References $newVersion.
Installer::getNotes | ( | ) |
Get the set of installation notes.
Definition at line 598 of file Installer.inc.php.
References $notes.
Installer::getParam | ( | $name | ) |
Get the value of an installation parameter.
$name |
Definition at line 566 of file Installer.inc.php.
Referenced by PKPInstall\createConfig(), PKPInstall\createData(), PKPInstall\createDatabase(), PKPInstall\createDirectories(), and PKPInstall\preInstall().
Installer::getSQL | ( | ) |
Get the set of SQL statements required to perform the install.
Definition at line 590 of file Installer.inc.php.
References $sql.
Installer::installDefaultNavigationMenus | ( | ) |
For 3.1.0 upgrade. DefaultMenus Defaults
Definition at line 840 of file Installer.inc.php.
References Application\getContextDAO(), and DAORegistry\getDAO().
Installer::installEmailTemplate | ( | $installer, | |
$attr | |||
) |
For upgrade: install email templates and data
$installer | object |
$attr | array Attributes: array containing 'key' => 'EMAIL_KEY_HERE', 'locales' => 'en_US,fr_CA,...' |
Definition at line 698 of file Installer.inc.php.
References $locale, DAORegistry\getDAO(), and AppLocale\requireComponents().
Installer::installFilterConfig | ( | $filterConfigFile | ) |
Install the given filter configuration file.
$filterConfigFile | string |
Definition at line 711 of file Installer.inc.php.
Installer::isUpgrade | ( | ) |
Returns true iff this is an upgrade process.
Reimplemented in PKPInstall.
Definition at line 171 of file Installer.inc.php.
Installer::log | ( | $message | ) |
Record message to installation log.
$message | string |
Definition at line 269 of file Installer.inc.php.
Referenced by executeAction(), executeInstaller(), parseInstaller(), postInstall(), and preInstall().
Installer::migrateMetadataSettings | ( | ) |
Migrate the metadata settings in the database to use a single row with one of the new constants
Definition at line 955 of file Installer.inc.php.
Installer::migrateSidebarBlocks | ( | ) |
Migrate active sidebar blocks from plugin_settings to journal_settings
Definition at line 894 of file Installer.inc.php.
References Application\getContextDAO(), DAORegistry\getDAO(), and PluginRegistry\loadCategory().
Installer::migrateSiteLocales | ( | ) |
Definition at line 868 of file Installer.inc.php.
References $params, and DAORegistry\getDAO().
Installer::parseInstaller | ( | ) |
Parse the installation descriptor XML file.
Definition at line 284 of file Installer.inc.php.
References $currentVersion, $descriptor, HookRegistry\call(), Version\fromString(), getErrorType(), log(), parseInstallNodes(), and setError().
Referenced by execute().
Installer::parseInstallNodes | ( | $installTree | ) |
Parse children nodes in the install descriptor.
$installTree | XMLNode |
Definition at line 357 of file Installer.inc.php.
References addInstallAction().
Referenced by parseInstaller().
Installer::postInstall | ( | ) |
Post-installation.
Definition at line 257 of file Installer.inc.php.
References HookRegistry\call(), and log().
Referenced by execute().
Installer::preInstall | ( | ) |
Pre-installation.
Reimplemented in PKPInstall.
Definition at line 186 of file Installer.inc.php.
References HookRegistry\call(), PKPLocale\getAllLocales(), DAORegistry\getDAO(), DBConnection\getInstance(), AppLocale\getLocale(), log(), and setError().
Referenced by execute().
Installer::setCurrentVersion | ( | $version | ) |
Set the current version for this installer.
$version | Version |
Definition at line 687 of file Installer.inc.php.
Installer::setError | ( | $type, | |
$msg | |||
) |
Set the error type and messgae.
$type | int |
$msg | string Text message (INSTALLER_ERROR_DB) or locale key (otherwise) |
Definition at line 658 of file Installer.inc.php.
Referenced by checkPhpVersion(), PKPInstall\createData(), PKPInstall\createDatabase(), PKPInstall\createDirectories(), executeAction(), executeSQL(), parseInstaller(), PKPInstall\preInstall(), preInstall(), and updateConfig().
Installer::setLogger | ( | $logger | ) |
Set the logger for this installer.
$logger | Logger |
Definition at line 667 of file Installer.inc.php.
References $logger.
Installer::setStatsEmailSettings | ( | ) |
Set the notification settings for journal managers and subeditors so that they are opted out of the monthly stats email.
Definition at line 1055 of file Installer.inc.php.
References PKPApplication\get(), and DAORegistry\getDAO().
Installer::tableExists | ( | $tableName | ) |
Check to see whether a table exists. Used in installer XML in conditional checks on <data> nodes.
$tableName | string |
Definition at line 775 of file Installer.inc.php.
References DAORegistry\getDAO().
Installer::updateConfig | ( | $configParams | ) |
Update the specified configuration parameters.
$configParams | arrays |
Definition at line 539 of file Installer.inc.php.
References Config\getConfigFileName(), setError(), and wroteConfig().
Referenced by PKPInstall\createConfig().
Installer::updateVersion | ( | ) |
Update the version number.
Definition at line 334 of file Installer.inc.php.
References HookRegistry\call(), and DAORegistry\getDAO().
Referenced by execute().
Installer::wroteConfig | ( | ) |
Check if installer was able to write out new config file.
Definition at line 614 of file Installer.inc.php.
References $wroteConfig.
Referenced by __construct(), and updateConfig().
array Installer::$actions |
installer actions to be performed
Definition at line 94 of file Installer.inc.php.
string Installer::$configContents |
contents of the updated config file
Definition at line 112 of file Installer.inc.php.
Referenced by getConfigContents().
Version Installer::$currentVersion |
currently installed version
Definition at line 58 of file Installer.inc.php.
Referenced by getCurrentVersion(), and parseInstaller().
DBDataXMLParser Installer::$dataXMLParser |
database data parser
Definition at line 88 of file Installer.inc.php.
ADOConnection Installer::$dbconn |
database connection
Definition at line 70 of file Installer.inc.php.
string Installer::$descriptor |
descriptor path (relative to INSTALLER_DATA_DIR)
Definition at line 40 of file Installer.inc.php.
Referenced by Install\__construct(), __construct(), and parseInstaller().
string Installer::$errorMsg |
the error message, if an installation error has occurred
Definition at line 130 of file Installer.inc.php.
Referenced by getErrorMsg().
int Installer::$errorType |
error code (null | INSTALLER_ERROR_GENERAL | INSTALLER_ERROR_DB)
Definition at line 124 of file Installer.inc.php.
string Installer::$installedLocales |
available locales
Definition at line 82 of file Installer.inc.php.
boolean Installer::$isPlugin |
indicates if a plugin is being installed (thus modifying the descriptor path)
Definition at line 46 of file Installer.inc.php.
Referenced by Install\__construct(), PKPInstall\__construct(), and __construct().
string Installer::$locale |
default locale
Definition at line 76 of file Installer.inc.php.
Referenced by PKPInstall\createData(), and installEmailTemplate().
Logger Installer::$logger |
array Installer::$migrations = [] |
List of migrations executed already
Definition at line 142 of file Installer.inc.php.
Version Installer::$newVersion |
version after installation
Definition at line 64 of file Installer.inc.php.
Referenced by getNewVersion().
array Installer::$notes |
array Installer::$params |
installation parameters
Definition at line 52 of file Installer.inc.php.
Referenced by Install\__construct(), PKPInstall\__construct(), __construct(), and migrateSiteLocales().
array Installer::$sql |
SQL statements for database installation
Definition at line 100 of file Installer.inc.php.
Referenced by PKPInstall\createDatabase(), executeAction(), executeSQL(), and getSQL().
boolean Installer::$wroteConfig |
indicating if config file was written or not
Definition at line 118 of file Installer.inc.php.
Referenced by wroteConfig().