]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions-functions.php
Several template fixes/code cleanups, default module titles added:
[mailer.git] / inc / extensions-functions.php
index db650b47e208804a0674599dd4e650c7f5523f52..c4e88abaf0e2c30d28e159c23a72515348249f42 100644 (file)
@@ -481,7 +481,7 @@ function isExtensionInstalled ($ext_name) {
        // We don't like empty extension names here
        if (empty($ext_name)) {
                // Please fix them all
-               debug_report_bug(__FUNCTION__.': ext_name is empty.');
+               debug_report_bug(__FUNCTION__, __LINE__, 'ext_name is empty.');
        } // END - if
 
        // By default non is installed
@@ -522,8 +522,16 @@ function isExtensionInstalled ($ext_name) {
 
 // Check if given extension is active
 function isExtensionActive ($ext_name) {
-       // Extensions are all inactive during installation
-       if ((isInstallationPhase()) || (empty($ext_name))) return false;
+       if (isInstallationPhase()) {
+               // Extensions are all inactive during installation
+               return false;
+       } elseif (empty($ext_name)) {
+               // Empty extension names must befixed
+               debug_report_bug(__FUNCTION__, __LINE__, 'Empty extension name provided.');
+       } elseif (!isExtensionInstalled($ext_name)) {
+               // Not installed extensions are always inactive
+               return false;
+       }
 
        // Not active is the default
        $data['ext_active'] = 'N';
@@ -733,7 +741,7 @@ function addExtensionVerboseSqlTable ($title = '', $dashed = '', $switch = false
        $OUT = '';
 
        // Do we have queries?
-       if ((isExtensionInstalledAndNewer('sql_patches', '0.0.7')) && (getConfig('verbose_sql') == 'Y')) {
+       if (isVerboseSqlEnabled()) {
                // Do we have entries?
                if (countExtensionSqls() > 0) {
                        // Init counter
@@ -1068,7 +1076,7 @@ function addExtensionNotes ($ext_ver) {
        $content = array();
 
        // Is do we have verbose output enabled?
-       if ((!isExtensionActive('sql_patches')) || (getConfig('verbose_sql') == 'Y')) {
+       if ((!isExtensionActive('sql_patches')) || (isVerboseSqlEnabled())) {
                // Update notes found?
                if (isExtensionUpdateNoteSet($ext_ver)) {
                        // Update notes found