X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions-functions.php;h=d842ddc163a299cef2ca51ffc8c93af795992ac5;hb=b7a3b394d4639834ad8466fbc4ab06694a4d4569;hp=8dfde689bd230f9bc3be134c47b29850ef740518;hpb=5eb7669649ebf60e74a83df70ad4f357d656b204;p=mailer.git
diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php
index 8dfde689bd..d842ddc163 100644
--- a/inc/extensions-functions.php
+++ b/inc/extensions-functions.php
@@ -249,7 +249,7 @@ function registerExtension ($ext_name, $taskId, $isDryRun = FALSE, $ignoreUpdate
initIncludePool('extension');
// By default there is no failure
- enableExtensionReportingFailure();
+ enableExtensionReportingFailure(FALSE);
// Does this extension exists?
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ' - CALLING loadExtension() ...');
@@ -957,7 +957,7 @@ function isExtensionNameValid ($ext_name) {
// Is there cache?
if (!isset($GLOBALS['ext_name_valid'][$ext_name])) {
// Generate include file name
- $INC = sprintf("inc/extensions/ext-%s.php", $ext_name);
+ $INC = sprintf('inc/extensions/ext-%s.php', $ext_name);
// Is there a file in inc/extensions/ ?
$GLOBALS['ext_name_valid'][$ext_name] = isIncludeReadable($INC);
@@ -1053,7 +1053,7 @@ function createExtensionUpdateTask ($adminId, $ext_name, $ext_ver, $notes) {
} // END - if
} else {
// Extension not there! :-(
- reportBug(__FUNCTION__, __LINE__, sprintf("Extension %s not found but should be updated?", $ext_name));
+ reportBug(__FUNCTION__, __LINE__, sprintf('Extension %s not found but should be updated?', $ext_name));
}
// Return task id
@@ -1063,7 +1063,7 @@ function createExtensionUpdateTask ($adminId, $ext_name, $ext_ver, $notes) {
// Creates a new task for newly installed extension
function createNewExtensionTask ($ext_name) {
// Generate subject line
- $subject = sprintf("[%s:]", $ext_name);
+ $subject = sprintf('[%s:]', $ext_name);
// Get task id
$taskId = determineTaskIdBySubject($subject);
@@ -1487,8 +1487,8 @@ function incrementExtensionUpdateIterator () {
$GLOBALS['ext_depend_iterator'][getCurrentExtensionName()]++;
}
-// Setter for EXT_REPORTS_FAILURE flag
-function enableExtensionReportingFailure ($reportsFailure = FALSE) {
+// Setter for EXT_REPORTS_FAILURE flag (default: extension reported installation failure)
+function enableExtensionReportingFailure ($reportsFailure = TRUE) {
$GLOBALS['ext_reports_failure'] = (bool) $reportsFailure;
}
@@ -1822,7 +1822,7 @@ function loadCurrentExtensionInclude () {
} // END - if
// Generate INC name
- $INC = sprintf("inc/extensions/ext-%s.php", getCurrentExtensionName());
+ $INC = sprintf('inc/extensions/ext-%s.php', getCurrentExtensionName());
// Load it
loadInclude($INC);
@@ -1831,7 +1831,7 @@ function loadCurrentExtensionInclude () {
// Load current extension's mode include file
function loadCurrentExtensionModeInclude () {
// Generate INC name
- $INC = sprintf("inc/extensions/%s/mode-%s.php", getCurrentExtensionName(), getExtensionMode());
+ $INC = sprintf('inc/extensions/%s/mode-%s.php', getCurrentExtensionName(), getExtensionMode());
// Is the include readable?
if (isIncludeReadable($INC)) {
@@ -1850,7 +1850,7 @@ function isExtensionIncludeReadable ($ext_name = '') {
// Array found?
if (!isset($GLOBALS['ext_inc_readable'][$ext_name])) {
// Generate INC name
- $INC = sprintf("inc/extensions/ext-%s.php", getCurrentExtensionName());
+ $INC = sprintf('inc/extensions/ext-%s.php', getCurrentExtensionName());
// Is it readable?
$GLOBALS['ext_inc_readable'][$ext_name] = isIncludeReadable($INC);
@@ -1871,7 +1871,7 @@ function isExtensionFunctionFileReadable ($ext_name) {
incrementStatsEntry('cache_hits');
} else {
// Construct IFN for functions file
- $funcsInclude = sprintf("inc/libs/%s_functions.php", $ext_name);
+ $funcsInclude = sprintf('inc/libs/%s_functions.php', $ext_name);
// Is this include there?
$isIncludeFound = ((isFileReadable($funcsInclude)) && (!isExtensionLibraryLoaded($ext_name)) && (getExtensionMode() == 'test'));
@@ -2053,7 +2053,7 @@ function addSponsorMenuSql ($action, $what, $title, $active, $sort) {
addExtensionSql($sql);
} elseif (isDebugModeEnabled()) {
// Double menus should be located and fixed!
- logDebugMessage(__FUNCTION__, __LINE__, sprintf("Double sponsor menu action=%s,what=%s,title=%s,active=%s detected.", $action, $what, $title, $active));
+ logDebugMessage(__FUNCTION__, __LINE__, sprintf('Double sponsor menu action=%s,what=%s,title=%s,active=%s detected.', $action, $what, $title, $active));
}
}
@@ -2140,7 +2140,7 @@ function addExtensionChangeTableColumnSql ($tableName, $fromColumnName, $toColum
assert(($fromColumnName != $columnSql) && ($toColumnName != $columnSql));
// Is the column there?
- if ((ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $fromColumnName)) && (($fromColumnName == $toColumnName) || (!ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $toColumnName, isInstaller())))) {
+ if ((ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $fromColumnName, isInstaller())) && (($fromColumnName == $toColumnName) || (!ifSqlTableColumnExists('{?_MYSQL_PREFIX?}_' . $tableName, $toColumnName, isInstaller())))) {
// Debug message
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ',fromColumnName=' . $fromColumnName . ',toColumnName=' . $toColumnName . ',columnSql=' . $columnSql);