当前位置: 首页>>代码示例>>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;未经允许,请勿转载。