$task_id = determineExtensionTaskId(getCurrentExtensionName());
// Still zero and not in dry-run?
- if (($task_id == '0') && (!getExtensionDryRun())) {
+ if (($task_id == '0') && (!isExtensionDryRun())) {
// Then request a bug report
debug_report_bug(__FUNCTION__, __LINE__, sprintf("%s: task_id is still zero after determineExtensionTaskId(%s)",
__FUNCTION__,
// Does this extension exists?
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName());
- if (loadExtension(getCurrentExtensionName(), 'register', '', getExtensionDryRun())) {
+ if (loadExtension(getCurrentExtensionName(), 'register', '', isExtensionDryRun())) {
// Set current extension name again
setCurrentExtensionName($ext_name);
foreach ($history as $ver) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . getCurrentExtensionName() . ', ext_ver=' . $ver);
// Load extension in update mode
- loadExtension(getCurrentExtensionName(), 'update', $ver, getExtensionDryRun());
+ loadExtension(getCurrentExtensionName(), 'update', $ver, isExtensionDryRun());
// Add update notes to our output
addExtensionNotes($ver);
// Check if extension is not installed and not already in registration procedure and if loading it wents finally fine...
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',isExtensionRegistrationRunning(' . $ext_update . ')=' . intval(isExtensionRegistrationRunning($ext_update)));
- if ((!isExtensionInstalled($ext_update)) && (!isExtensionRegistrationRunning($ext_update)) && (loadExtension($ext_update, 'test', '', getExtensionDryRun()))) {
+ if ((!isExtensionInstalled($ext_update)) && (!isExtensionRegistrationRunning($ext_update)) && (loadExtension($ext_update, 'test', '', isExtensionDryRun()))) {
// Set current extension name again
setCurrentExtensionName($ext_name);
if ($task > 0) {
// Try to register the extension
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ':ext_update=' . $ext_update . ',taskId=' . $task);
- $test = registerExtension($ext_update, $task, getExtensionDryRun(), false);
+ $test = registerExtension($ext_update, $task, isExtensionDryRun(), false);
// Reset extension name
setCurrentExtensionName($ext_name);
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',currVer=' . getCurrentExtensionVersion());
$GLOBALS['ext_backup_name'][$ext_update][$ext_ver] = getCurrentExtensionName();
$GLOBALS['ext_backup_ver'][$ext_update][$ext_ver] = getCurrentExtensionVersion();
- updateExtension($ext_update, $ext_ver, getExtensionDryRun());
+ updateExtension($ext_update, $ext_ver, isExtensionDryRun());
setCurrentExtensionName($GLOBALS['ext_backup_name'][$ext_update][$ext_ver]);
setCurrentExtensionVersion($GLOBALS['ext_backup_ver'][$ext_update][$ext_ver]);
unset($GLOBALS['ext_backup_name'][$ext_update][$ext_ver]);
// Does everthing before wents ok?
if ($test === true) {
// "Dry-run-mode" activated?
- if ((getExtensionDryRun() === false) && (!isExtensionOnRemovalList())) {
+ if ((isExtensionDryRun() === false) && (!isExtensionOnRemovalList())) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . getCurrentExtensionName());
// Init SQLs and transfer ext->generic
initSqls();
setSqlsArray(getExtensionSqls());
// Run installation pre-installation filters
- runFilterChain('pre_extension_installed', array('dry_run' => getExtensionDryRun()));
+ runFilterChain('pre_extension_installed', array('dry_run' => isExtensionDryRun()));
// Register extension
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'insert=' . getCurrentExtensionName() . '/' . getCurrentExtensionVersion() . ' - INSERT!');
// In normal mode return a true on success
$ret = true;
- } elseif (getExtensionDryRun() === true) {
+ } elseif (isExtensionDryRun() === true) {
// In "dry-run" mode do always return a true
$ret = true;
// Is this the sql_patches?
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName() . '/' . getExtensionMode());
- if ((getCurrentExtensionName() == 'sql_patches') && ((getExtensionMode() == 'register') || (getExtensionMode() == 'remove')) && (!getExtensionDryRun()) && ($test)) {
+ if ((getCurrentExtensionName() == 'sql_patches') && ((getExtensionMode() == 'register') || (getExtensionMode() == 'remove')) && (!isExtensionDryRun()) && ($test)) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName() . ': LOAD!');
if ($logout === true) {
// Then redirect to logout
initIncludePool('extension');
// Load extension in test mode
- loadExtension($ext_name, 'test', $ext_ver, getExtensionDryRun());
+ loadExtension($ext_name, 'test', $ext_ver, isExtensionDryRun());
// Save version history
$history = getExtensionVersionHistory();
// Check if version is updated
//* DEBUG: */ debugOutput(getCurrentExtensionName().'/'.$ext_name.':'.getThisExtensionVersion().'/'.$ext_ver.'/'.intval(is_array($history)));
- if (((getThisExtensionVersion() != $ext_ver) || (getExtensionDryRun())) && (is_array($history))) {
+ if (((getThisExtensionVersion() != $ext_ver) || (isExtensionDryRun())) && (is_array($history))) {
// Search for starting point
$start = array_search($ext_ver, $history);
$GLOBALS['update_ver'][getCurrentExtensionName()] = $history[$idx];
// Load again...
- loadExtension(getCurrentExtensionName(), 'update', $GLOBALS['update_ver'][getCurrentExtensionName()], getExtensionDryRun());
+ loadExtension(getCurrentExtensionName(), 'update', $GLOBALS['update_ver'][getCurrentExtensionName()], isExtensionDryRun());
// Get all depencies
$depencies = getExtensionUpdateDependencies();
// Is the extension there?
if (isExtensionInstalled($ext_depend)) {
// Update another extension first!
- $test = updateExtension($ext_depend, getExtensionVersion($ext_depend), getExtensionDryRun());
+ $test = updateExtension($ext_depend, getExtensionVersion($ext_depend), isExtensionDryRun());
} else {
// Register new extension
- $test = registerExtension($ext_depend, 0, getExtensionDryRun(), false);
+ $test = registerExtension($ext_depend, 0, isExtensionDryRun(), false);
}
} // END - if
} // END - foreach
} // END - for
// In real-mode execute any existing includes
- if (getExtensionDryRun() === false) {
+ if (isExtensionDryRun() === false) {
$GLOBALS['ext_inc_pool'][getCurrentExtensionName()] = getIncludePool('extension');
runFilterChain('load_includes', 'extension');
setIncludePool('extension', $GLOBALS['ext_inc_pool'][getCurrentExtensionName()]);
setSqlsArray(getExtensionSqls());
// Run SQLs
- runFilterChain('run_sqls', array('dry_run' => getExtensionDryRun()));
+ runFilterChain('run_sqls', array('dry_run' => isExtensionDryRun()));
- if (getExtensionDryRun() === false) {
+ if (isExtensionDryRun() === false) {
// Run filters on success extension update
runFilterChain('extension_update', getCurrentExtensionName());
} // END - if
}
// Getter for dry-run
-function getExtensionDryRun () {
+function isExtensionDryRun () {
return $GLOBALS['ext_dry_run'];
}