X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Floader%2Fload-extension.php;h=9d2d351d83af0b2541bc713468c77400af702508;hb=f98069851de448a16b84c8a0cfd46a90dce63ed2;hp=420b5d4bd393f3eadd36e3166383d2df950f0100;hpb=20741b93fd58620af677a7f1039ffd16ea6ec689;p=mailer.git diff --git a/inc/loader/load-extension.php b/inc/loader/load-extension.php index 420b5d4bd3..9d2d351d83 100644 --- a/inc/loader/load-extension.php +++ b/inc/loader/load-extension.php @@ -139,14 +139,22 @@ if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache // Add more if sql_patches is recent enougth $add = ''; if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) { - $add = ', `ext_has_css` AS `ext_css`'; - } // END - if + $add = ',`ext_has_css` AS `ext_css`'; + } // END - if - // Load all modules and their data + // Query for all extensions $result = SQL_QUERY('SELECT `id` AS `ext_id`,`ext_name`,`ext_active`,`ext_version`' . $add . ' FROM `{?_MYSQL_PREFIX?}_extensions` ORDER BY `ext_name` ASC', __FILE__, __LINE__); + + // Load all entries while ($content = SQL_FETCHARRAY($result)) { // Load extension - loadExtension($content['ext_name'], 'test'); + if (!loadExtension($content['ext_name'], 'test')) { + // Didn't load so deactivate it + doDeactivateExtension($content['ext_name'], true); + + // ... and skip it + continue; + } // END - if // Get menu entry $content['ext_menu'] = convertBooleanToYesNo(ifModuleHasMenu($content['ext_name'], true));