public function change() { access::verify_csrf(); $active_provider = module::get_var("gallery", "identity_provider", "user"); $providers = identity::providers(); $new_provider = Input::instance()->post("provider"); if ($new_provider != $active_provider) { module::deactivate($active_provider); // Switch authentication identity::reset(); module::set_var("gallery", "identity_provider", $new_provider); module::install($new_provider); module::activate($new_provider); module::event("identity_provider_changed", $active_provider, $new_provider); module::uninstall($active_provider); message::success(t("Changed to %description", array("description" => $providers->{$new_provider}))); try { Session::instance()->destroy(); } catch (Exception $e) { // We don't care if there was a problem destroying the session. } url::redirect(item::root()->abs_url()); } message::info(t("The selected provider \"%description\" is already active.", array("description" => $providers->{$new_provider}))); url::redirect("admin/identity"); }
public function save() { foreach (module::available() as $module_name => $info) { if ($info->locked) { continue; } $desired = $this->input->post($module_name) == 1; if ($info->installed && !$desired) { module::uninstall($module_name); message::success(t("Uninstalled %module_name module", array("module_name" => $info->name))); } else { if (!$info->installed && $desired) { module::install($module_name); message::success(t("Installed %module_name module", array("module_name" => $info->name))); } } } url::redirect("admin/modules"); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS commands'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS events'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS zwave_devices'); SQLExec('DROP TABLE IF EXISTS zwave_properties'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS terminals'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS history'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS watchfolders'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS system_errors'); SQLExec('DROP TABLE IF EXISTS system_errors_data'); parent::uninstall(); }
public function uninstall() { return parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS calendar_events'); SQLExec('DROP TABLE IF EXISTS calendar_categories'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS ru101_stations'); SQLExec('DROP TABLE IF EXISTS ru101_categories'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS tlg_user_cmd'); SQLExec('DROP TABLE IF EXISTS tlg_user'); SQLExec('DROP TABLE IF EXISTS tlg_cmd'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS shoutrooms'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS myblocks'); SQLExec('DROP TABLE IF EXISTS myblocks_categories'); parent::uninstall(); }
static function change_provider($new_provider) { if (!identity::active_user()->admin && PHP_SAPI != "cli") { // Below, the active user is set to the primary admin. access::forbidden(); } $current_provider = module::get_var("gallery", "identity_provider"); if (!empty($current_provider)) { module::uninstall($current_provider); } try { IdentityProvider::reset(); $provider = new IdentityProvider($new_provider); module::set_var("gallery", "identity_provider", $new_provider); if (method_exists("{$new_provider}_installer", "initialize")) { call_user_func("{$new_provider}_installer::initialize"); } module::event("identity_provider_changed", $current_provider, $new_provider); identity::set_active_user($provider->admin_user()); Session::instance()->regenerate(); } catch (Exception $e) { static $restore_already_running; // In case of error, make an attempt to restore the old provider. Since that's calling into // this function again and can fail, we should be sure not to get into an infinite recursion. if (!$restore_already_running) { $restore_already_running = true; // Make sure new provider is not in the database 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); } 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; } }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS scenes'); SQLExec('DROP TABLE IF EXISTS elements'); SQLExec('DROP TABLE IF EXISTS elm_states'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS security_rules'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS gpslog'); SQLExec('DROP TABLE IF EXISTS gpslocations'); SQLExec('DROP TABLE IF EXISTS gpsdevices'); SQLExec('DROP TABLE IF EXISTS gpsactions'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS readit_urls'); SQLExec('DROP TABLE IF EXISTS readit_channels'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS rss_channels'); SQLExec('DROP TABLE IF EXISTS rss_items'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS properties'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS settings'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS blockly_code'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS btdevices'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS patterns'); parent::uninstall(); }
static function change_provider($new_provider) { $current_provider = module::get_var("gallery", "identity_provider"); if (!empty($current_provider)) { module::uninstall($current_provider); } try { IdentityProvider::reset(); $provider = new IdentityProvider($new_provider); module::set_var("gallery", "identity_provider", $new_provider); if (method_exists("{$new_provider}_installer", "initialize")) { call_user_func("{$new_provider}_installer::initialize"); } module::event("identity_provider_changed", $current_provider, $new_provider); auth::login($provider->admin_user()); Session::instance()->regenerate(); } catch (Exception $e) { static $restore_already_running; // In case of error, make an attempt to restore the old provider. Since that's calling into // this function again and can fail, we should be sure not to get into an infinite recursion. if (!$restore_already_running) { $restore_already_running = true; // Make sure new provider is not in the database 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); 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; } }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS userlog'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS products'); SQLExec('DROP TABLE IF EXISTS product_categories'); SQLExec('DROP TABLE IF EXISTS shopping_list_items'); parent::uninstall(); }
/** * Uninstall * * Module uninstall routine * * @access public */ function uninstall() { SQLExec('DROP TABLE IF EXISTS app_quotes'); parent::uninstall(); }