} // END - if
// Construct FQFN for extension file
- $extInclude = sprintf("%sinc/extensions/ext-%s.php", PATH, $ext_name);
+ $FQFN = sprintf("%sinc/extensions/ext-%s.php",
+ constant('PATH'),
+ $ext_name
+ );
// Is the extension file NOT there?
if (!FILE_READABLE($extInclude)) {
} // END - if
// Construct FQFN for language file
- $langInclude = sprintf("%sinc/language/%s_%s.php", PATH, $ext_name, GET_LANGUAGE());
+ $langInclude = sprintf("inc/language/%s_%s.php", $ext_name, GET_LANGUAGE());
// Is this include there?
if ((FILE_READABLE($langInclude)) && (!isset($EXT_LOADED['lang'][$ext_name]))) {
// Then load it
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "--- Language loaded.");
$EXT_LOADED['lang'][$ext_name] = true;
- require($langInclude);
+ LOAD_INC_ONCE($langInclude);
} // END - if
// Construct FQFN for functions file
- $funcsInclude = sprintf("%sinc/libs/%s_functions.php", PATH, $ext_name);
+ $funcsInclude = sprintf("inc/libs/%s_functions.php", $ext_name);
// Is this include there?
if ((FILE_READABLE($funcsInclude)) && (!isset($EXT_LOADED['funcs'][$ext_name]))) {
// Then load it
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "--- Functions loaded.");
$EXT_LOADED['funcs'][$ext_name] = true;
- require($funcsInclude);
+ LOAD_INC_ONCE($funcsInclude);
} // END - if
// Extensions are not deprecated by default
}
} elseif (($task_id > 0) && (!empty($ext_name))) {
// 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",
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE id=%s AND `status`='NEW' LIMIT 1",
array(bigintval($task_id)), __FILE__, __LINE__);
}
}
// Output verbose SQL table for extension
-function EXTENSION_VERBOSE_TABLE ($queries = array(), $title = ADMIN_SQLS_EXECUTED_ON_REMOVAL, $dashed = "", $switch = false, $width = "100%") {
+function EXTENSION_VERBOSE_TABLE ($queries = array(), $title = "", $dashed = "", $switch = false, $width = "100%") {
global $SQLs;
+ // Empty title?
+ if (empty($title)) {
+ // Then fix it to default
+ $title = getMessage('ADMIN_SQLS_EXECUTED_ON_REMOVAL');
+ } // END - if
+
// Are there some queries in $queries?
if (count($queries) > 0) {
// Then use them instead!
CREATE_EXTENSION_DEACTIVATION_TASK($ext_name);
// Notify the admin
- SEND_ADMIN_NOTIFICATION(ADMIN_SUBJECT_EXTENSION_DEACTIVATED, "admin_ext_deactivated", array('ext_name' => $ext_name));
+ SEND_ADMIN_NOTIFICATION(
+ getMessage('ADMIN_SUBJECT_EXTENSION_DEACTIVATED'),
+ "admin_ext_deactivated",
+ array('ext_name' => $ext_name)
+ );
} // END - if
}
// Creates a new task for updated extension
function CREATE_EXTENSION_UPDATE_TASK ($admin_id, $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_EXT_SUBJ--}";
// Is the extension there?
if (GET_EXT_VERSION($ext_name) != "") {
if ((DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) && (GET_EXT_VERSION($ext) == "")) {
// Template file
$tpl = sprintf("%stemplates/%s/html/ext/ext_%s.tpl",
- PATH,
+ constant('PATH'),
GET_LANGUAGE(),
$ext
);
// Creates a task for automatically deactivated (deprecated) extension
function CREATE_EXTENSION_DEACTIVATION_TASK ($ext) {
// Create subject line
- $subject = sprintf("[%s:] %s", $ext, TASK_SUBJ_EXTENSION_DEACTIVATED);
+ $subject = sprintf("[%s:] %s", $ext, getMessage('TASK_SUBJ_EXTENSION_DEACTIVATED'));
// Not installed and do we have created a task for the admin?
if ((DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) && (GET_EXT_VERSION($ext) != "")) {
// Initial release
$content = array(
'ver' => $ver,
- 'notes' => INITIAL_RELEASE
+ 'notes' => getMessage('INITIAL_RELEASE')
);
} else {
// No update notes found!
$content = array(
'ver' => $ver,
- 'notes' => NO_UPDATE_NOTES
+ 'notes' => getMessage('NO_UPDATE_NOTES')
);
}