}
// Registeres an extension and possible update depencies
-function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = true) {
+function registerExtension ($ext_name, $taskId, $dry_run = false, $logout = true) {
// Set current extension name
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',task_id=' . $task_id . ',dry_run=' . intval($dry_run) . ',logout=' . intval($logout) . ' - ENTERED!');
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',task_id=' . $taskId . ',dry_run=' . intval($dry_run) . ',logout=' . intval($logout) . ' - ENTERED!');
setCurrentExtensionName($ext_name);
// Enable dry-run
} // END - if
// Is the task id zero? Then we need to auto-fix it here
- if ($task_id == '0') {
+ if ($taskId == '0') {
// Try to find the task
- $task_id = determineExtensionTaskId(getCurrentExtensionName());
+ $taskId = determineExtensionTaskId(getCurrentExtensionName());
// Still zero and not in dry-run?
- if (($task_id == '0') && (!isExtensionDryRun())) {
+ if (($taskId == '0') && (!isExtensionDryRun())) {
// Now try to create a new task
- $task_id = createNewExtensionTask(getCurrentExtensionName());
+ $taskId = createNewExtensionTask(getCurrentExtensionName());
// Is it still zero?
if ($taskId == '0') {
runFilterChain('post_extension_installed', array(
'pool' => 'extension',
'ext_name' => getCurrentExtensionName(),
- 'task_id' => $task_id
+ 'task_id' => $taskId
));
// Re-init queries and notes
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName());
$ret = false;
}
- } elseif (($task_id > 0) && (getCurrentExtensionName() != '')) {
+ } elseif (($taskId > 0) && (getCurrentExtensionName() != '')) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName());
// Remove task from system when id and extension's name is valid
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s AND `status`='NEW' LIMIT 1",
- array(bigintval($task_id)), __FUNCTION__, __LINE__);
+ array(bigintval($taskId)), __FUNCTION__, __LINE__);
}
// Is this the sql_patches?