]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions-functions.php
Some cleanups/improvements
[mailer.git] / inc / extensions-functions.php
index 58127d2909bf965d7ce517a3d09bb0cf3ce8f6bf..ea9e4673cb600f7965fae167a7cf189db0520362 100644 (file)
@@ -873,7 +873,7 @@ function addExtensionVerboseSqlTable ($title = '{--ADMIN_SQLS_EXECUTED_ON_REMOVA
                        $OUT = loadTemplate('admin_extension_sql_table', TRUE, $content);
                } else {
                        // No addional SQL commands to run
-                       $OUT = displayMessage('{--ADMIN_EXTENSION_VERBOSE_SQLS_404--}', TRUE);
+                       $OUT = returnMessage('{--ADMIN_EXTENSION_VERBOSE_SQLS_404--}');
                }
        } // END - if
 
@@ -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);
@@ -1100,7 +1100,7 @@ function createNewExtensionTask ($ext_name) {
 // Creates a task for automatically deactivated (deprecated) extension
 function createExtensionDeactivationTask ($ext_name) {
        // Create subject line
-       $subject = sprintf("[%s:] %s", $ext_name, '{--ADMIN_TASK_EXTENSION_DEACTIVATED_SUBJECT--}');
+       $subject = sprintf('[%s:] %s', $ext_name, '{--ADMIN_TASK_EXTENSION_DEACTIVATED_SUBJECT--}');
 
        // Get task id
        $taskId = determineTaskIdBySubject($subject);
@@ -1618,7 +1618,7 @@ function getExtensionSqls () {
        // Output debug backtrace if not found (SHOULD NOT HAPPEN!)
        if (!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()])) {
                // Not found, should not happen
-               reportBug(__FUNCTION__, __LINE__, sprintf("ext_sqls is empty, current extension: %s",
+               reportBug(__FUNCTION__, __LINE__, sprintf('ext_sqls is empty, current extension: %s',
                        getCurrentExtensionName()
                ));
        } // END - if
@@ -1632,7 +1632,7 @@ function countExtensionSqls () {
        // Output debug backtrace if not found (SHOULD NOT HAPPEN!)
        if (!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()])) {
                // Not found, should not happen
-               reportBug(__FUNCTION__, __LINE__, sprintf("ext_sqls is empty, current extension: %s",
+               reportBug(__FUNCTION__, __LINE__, sprintf('ext_sqls is empty, current extension: %s',
                        getCurrentExtensionName()
                ));
        } // END - if
@@ -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'));
@@ -1961,7 +1961,7 @@ function addAdminMenuSql ($action, $what, $title, $descr, $sort) {
                addExtensionSql($sql);
        } elseif (isDebugModeEnabled()) {
                // Double menus should be located and fixed!
-               logDebugMessage(__FUNCTION__, __LINE__, sprintf("Double admin menu action=%s,what=%s,title=%s detected.", $action, $what, $title));
+               logDebugMessage(__FUNCTION__, __LINE__, sprintf('Double admin menu action=%s,what=%s,title=%s detected.', $action, $what, $title));
        }
 }
 
@@ -1991,7 +1991,7 @@ function addGuestMenuSql ($action, $what, $title, $sort) {
                addExtensionSql($sql);
        } elseif (isDebugModeEnabled()) {
                // Double menus should be located and fixed!
-               logDebugMessage(__FUNCTION__, __LINE__, sprintf("Double guest menu action=%s,what=%s,title=%s detected.", $action, $what, $title));
+               logDebugMessage(__FUNCTION__, __LINE__, sprintf('Double guest menu action=%s,what=%s,title=%s detected.', $action, $what, $title));
        }
 }
 
@@ -2021,7 +2021,7 @@ function addMemberMenuSql ($action, $what, $title, $sort) {
                addExtensionSql($sql);
        } elseif (isDebugModeEnabled()) {
                // Double menus should be located and fixed!
-               logDebugMessage(__FUNCTION__, __LINE__, sprintf("Double member menu action=%s,what=%s,title=%s detected.", $action, $what, $title));
+               logDebugMessage(__FUNCTION__, __LINE__, sprintf('Double member menu action=%s,what=%s,title=%s detected.', $action, $what, $title));
        }
 }