summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/IdentityProvider.php
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-08-06 21:36:32 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-08-06 21:36:32 +0000
commit691ce806dc9aefac596a692ff2ba927a81a65440 (patch)
tree410f64288ef1d8bbc8455509af74d0e7582dc48e /modules/gallery/libraries/IdentityProvider.php
parentc83650d83ad8b1f4bda30cac2ae8efa6e1c97287 (diff)
parent8559cdb5b6bfa87864941f726521660023779fa7 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/libraries/IdentityProvider.php')
-rw-r--r--modules/gallery/libraries/IdentityProvider.php20
1 files changed, 13 insertions, 7 deletions
diff --git a/modules/gallery/libraries/IdentityProvider.php b/modules/gallery/libraries/IdentityProvider.php
index 067a9929..5f341c90 100644
--- a/modules/gallery/libraries/IdentityProvider.php
+++ b/modules/gallery/libraries/IdentityProvider.php
@@ -99,18 +99,24 @@ class IdentityProvider_Core {
$restore_already_running = true;
// Make sure new provider is not in the database
- module::uninstall($new_provider);
+ try {
+ module::uninstall($new_provider);
- // Lets reset to the current provider so that the gallery installation is still
- // working.
- module::set_var("gallery", "identity_provider", null);
- IdentityProvider::change_provider($current_provider);
- module::activate($current_provider);
+ // Lets reset to the current provider so that the gallery installation is still
+ // working.
+ module::set_var("gallery", "identity_provider", null);
+ IdentityProvider::change_provider($current_provider);
+ module::activate($current_provider);
+ } catch (Exception $e2) {
+ Kohana_Log::add("error", "Error restoring original identity provider\n" .
+ $e2->getMessage() . "\n" . $e2->getTraceAsString());
+ }
+
message::error(
t("Error attempting to enable \"%new_provider\" identity provider, " .
"reverted to \"%old_provider\" identity provider",
array("new_provider" => $new_provider, "old_provider" => $current_provider)));
-
+
$restore_already_running = false;
}
throw $e;