當前位置: 首頁>>代碼示例>>PHP>>正文


PHP module::uninstall方法代碼示例

本文整理匯總了PHP中module::uninstall方法的典型用法代碼示例。如果您正苦於以下問題:PHP module::uninstall方法的具體用法?PHP module::uninstall怎麽用?PHP module::uninstall使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在module的用法示例。


在下文中一共展示了module::uninstall方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: change

 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");
 }
開發者ID:viosca,項目名稱:gallery3,代碼行數:26,代碼來源:admin_identity.php

示例2: save

 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");
 }
開發者ID:Juuro,項目名稱:Dreamapp-Website,代碼行數:19,代碼來源:admin_modules.php

示例3: uninstall

 /**
 * Uninstall
 *
 * Module uninstall routine
 *
 * @access public
 */
 function uninstall()
 {
     SQLExec('DROP TABLE IF EXISTS commands');
     parent::uninstall();
 }
開發者ID:NioFBI,項目名稱:majordomo,代碼行數:12,代碼來源:commands.class.php

示例4: 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();
 }
開發者ID:sergejey,項目名稱:majordomo-zwave,代碼行數:13,代碼來源:zwave.class.php

示例5: uninstall

/**
* Uninstall
*
* Module uninstall routine
*
* @access public
*/
 function uninstall() {
  SQLExec('DROP TABLE IF EXISTS terminals');
  parent::uninstall();
 }
開發者ID:novozhenets,項目名稱:majordomo,代碼行數:11,代碼來源:terminals.class.php

示例6: uninstall

 public function uninstall()
 {
     return parent::uninstall();
 }
開發者ID:lajayuhniyarsyah,項目名稱:SupraOShop,代碼行數:4,代碼來源:supramulticurrency.php

示例7: 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();
 }
開發者ID:Anisan,項目名稱:majordomo-telegram,代碼行數:14,代碼來源:telegram.class.php

示例8: change_provider

 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;
     }
 }
開發者ID:kandsten,項目名稱:gallery3,代碼行數:43,代碼來源:IdentityProvider.php

示例9: uninstall

 /**
 * 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();
 }
開發者ID:NioFBI,項目名稱:majordomo,代碼行數:14,代碼來源:scenes.class.php

示例10: 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();
 }
開發者ID:vasvlad,項目名稱:majordomo,代碼行數:15,代碼來源:app_gpstrack.class.php

示例11: change_provider

 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;
     }
 }
開發者ID:joericochuyt,項目名稱:gallery3,代碼行數:35,代碼來源:IdentityProvider.php


注:本文中的module::uninstall方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。