- if (REGISTER_EXTENSION($ext_name, $ext_id)) {
- // Extension was found and successfully registered
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_EXTENSION_REGISTERED'));
-
- // Show next link
- if (EXT_IS_ACTIVE('task')) {
- LOAD_TEMPLATE('admin_next_link', false, array(
- 'url' => 'modules.php?module=admin&what=list_task',
- 'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK')
- ));
+ if (registerExtension($ext_name, $ext_id)) {
+ // Errors?
+ if (getTotalFatalErrors() == 0) {
+ // Extension was found and successfully registered
+ loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_EXTENSION_REGISTERED'), $ext_name));
+
+ // Show next link
+ if (isExtensionActive('task')) {
+ loadTemplate('admin_next_link', false, array(
+ 'url' => 'modules.php?module=admin&what=list_task',
+ 'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK')
+ ));
+ } else {
+ loadTemplate('admin_next_link', false, array(
+ 'url' => 'modules.php?module=admin',
+ 'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK')
+ ));
+ }