// Still zero and not in dry-run?
if (($task_id == '0') && (!getExtensionDryRun())) {
// Then request a bug report
- debug_report_bug(sprintf("%s: task_id is still zero after determineExtensionTaskId(%s)",
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("%s: task_id is still zero after determineExtensionTaskId(%s)",
__FUNCTION__,
getCurrentExtensionName()
));
incrementStatsEntry('cache_hits');
} elseif (isset($GLOBALS['ext_loaded'][$ext_name])) {
// @TODO Extension is loaded, what next?
- app_die(__FUNCTION__, __LINE__, 'LOADED:' . $ext_name);
+ debug_report_bug(__FUNCTION__, __LINE__, 'LOADED:' . $ext_name);
} elseif (($ext_name == 'cache') || (!isExtensionInstalled('cache'))) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "DB! ext_name={$ext_name}");
// Load from database
$data = SQL_FETCHARRAY($result);
} elseif (isDebugModeEnabled()) {
// Not found, please report all
- debug_report_bug(sprintf(": Cannot find extension %s in database!", $ext_name));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf(": Cannot find extension %s in database!", $ext_name));
}
// Free result
// Extension version should not be invalid
if (($data['ext_version'] == 'false') && ($force === false)) {
// Please report this trouble
- debug_report_bug(sprintf("Extension <strong>%s</strong> has empty version!", $ext_name));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Extension <span class=\"data\">%s</span> has empty version!", $ext_name));
} // END - if
// Return result
// Creates a new task for updated extension
function createExtensionUpdateTask ($adminId, $ext_name, $ext_ver, $notes) {
// Create subject line
- $subject = '[UPDATE-' . $ext_name . '-' . $ext_ver . ':] {--ADMIN_UPDATE_EXT_SUBJ--}';
+ $subject = '[UPDATE-' . $ext_name . '-' . $ext_ver . ':] {--ADMIN_UPDATE_EXTENSION_SUBJ--}';
// Is the extension there?
if (isExtensionInstalled($ext_name)) {
} // END - if
} else {
// Extension not there! :-(
- debug_report_bug(sprintf("Extension <strong>%s</strong> not found but should be updated?", $ext_name));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Extension <span class=\"data\">%s</span> not found but should be updated?", $ext_name));
}
}
// Not installed and do we have created a task for the admin?
if ((determineTaskIdBySubject($subject) == '0') && (!isExtensionInstalled($ext))) {
// Set default message if ext-foo is missing
- $message = getMaskedMessage('ADMIN_EXT_TEXT_FILE_MISSING', $ext);
+ $message = getMaskedMessage('ADMIN_EXTENSION_TEXT_FILE_MISSING', $ext);
// Template file
$tpl = sprintf("%stemplates/%s/html/ext/ext_%s.tpl",
// Not installed and do we have created a task for the admin?
if ((determineTaskIdBySubject($subject) == '0') && (isExtensionInstalled($ext))) {
// Task not created so add it
- createNewTask($subject, SQL_ESCAPE(loadTemplate('task_ext_deactivated', true, $ext)), 'EXTENSION_DEACTIVATION');
+ createNewTask($subject, SQL_ESCAPE(loadTemplate('task_EXTENSION_deactivated', true, $ext)), 'EXTENSION_DEACTIVATION');
} // END - if
}
}
// Load template
- $out = loadTemplate('admin_ext_notes', true, $content);
+ $out = loadTemplate('admin_EXTENSION_notes', true, $content);
} // END - if
// Add the notes
// Is the update depency empty? (NEED TO BE FIXED!)
if (empty($updateDepends)) {
// Please report this bug!
- debug_report_bug('updateDepends is empty: currentExtension=' . getCurrentExtensionName());
+ debug_report_bug(__FUNCTION__, __LINE__, 'updateDepends is empty: currentExtension=' . getCurrentExtensionName());
} // END - if
// Is it not yet added?
// Setter for current extension name
function setCurrentExtensionName ($ext_name) {
- $GLOBALS['curr_ext_name'] = (string) trim($ext_name);
+ $GLOBALS['curr_EXTENSION_name'] = (string) trim($ext_name);
}
// Getter for current extension name
function getCurrentExtensionName () {
- if (isset($GLOBALS['curr_ext_name'])) {
- return $GLOBALS['curr_ext_name'];
+ if (isset($GLOBALS['curr_EXTENSION_name'])) {
+ return $GLOBALS['curr_EXTENSION_name'];
} // END - if
// Not set!
- debug_report_bug(__FUNCTION__.": curr_ext_name not initialized. Please execute initExtensionSqls() before calling this function.");
+ debug_report_bug(__FUNCTION__.": curr_EXTENSION_name not initialized. Please execute initExtensionSqls() before calling this function.");
}
// Init SQLs array for current extension
// Output debug backtrace if not found (SHOULD NOT HAPPEN!)
if (!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()])) {
// Not found, should not happen
- debug_report_bug(sprintf("ext_sqls is empty, current extension: %s",
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("ext_sqls is empty, current extension: %s",
getCurrentExtensionName()
));
} // END - if
// ext_ver should never be empty in other modes than 'test'
if ((empty($ext_ver)) && (getExtensionMode() != 'test')) {
// Please report all these messages
- debug_report_bug('ext_ver is empty. Current extension name: ' . getCurrentExtensionName() . ', mode=' . getExtensionMode());
+ debug_report_bug(__FUNCTION__, __LINE__, 'ext_ver is empty. Current extension name: ' . getCurrentExtensionName() . ', mode=' . getExtensionMode());
} // END - if
// Add version
// Is it readable?
if (!isExtensionIncludeReadable()) {
// Not readable
- debug_report_bug('Extension ' . getCurrentExtensionName() . ' should be loaded, but is not readable.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Extension ' . getCurrentExtensionName() . ' should be loaded, but is not readable.');
} // END - if
// Generate INC name