- $ext_name = ''; $ext_ver = '';
- $title = getMessage('TASK_NO_TITLE');
-
- // Shall I list SQL commands assigned to an extension installation or update task?
- if ((getConfig('verbose_sql') == 'Y')) {
- // Extract extension name from subject
- $ext_name = substr($subj, 1, strpos($subj, ':') - 1);
-
- // Update task or extension task?
- if (($type == 'EXTENSION') && (!isExtensionInstalled($ext_name))) {
- // Load SQL commands for registering
- registerExtension($ext_name, $id, true);
-
- // Set current extension name
- setCurrentExtensionName($ext_name);
-
- // Add notes to text
- $text .= getExtensionNotes();
-
- // Set title
- $title = getMessage('ADMIN_SQLS_EXECUTED_ON_REGISTER');
- } elseif ($type == 'EXTENSION_UPDATE') {
- // Prepare extension name and version
- $ext_name = substr($ext_name, 7);
- $ext_name = substr($ext_name, 0, strpos($ext_name, '-'));
- $test = '[UPDATE-' . $ext_name . '-';
- $ext_ver = substr($subj, strlen($test));
- $ext_ver = substr($ext_ver, 0, strpos($ext_ver, ':'));
-
- // Load SQLs from file
- updateExtension($ext_name, $ext_ver, true);
-
- // Set current extension name
- setCurrentExtensionName($ext_name);
-
- // Add notes to text
- $text .= getExtensionNotes();
-
- // Set title
- $title = getMessage('ADMIN_SQLS_EXECUTED_ON_UPDATE');
- } else {
- // Remove extension's name
- $ext_name = '';
- }
+ $ext_ver = '';
+ $ext_name = '';
+ $title = '{--ADMIN_TASK_NO_SQL_TITLE--}';
+
+ // Extract extension name from subject (for testing)
+ $ext_name = substr($taskData['subject'], 1, strpos($taskData['subject'], ':') - 1);
+
+ // Update task or extension task?
+ if (($taskData['task_type'] == 'EXTENSION') && (!isExtensionInstalled($ext_name))) {
+ // Load SQL commands for registering in dry-run
+ registerExtension($ext_name, $taskId, TRUE);