示例#1
0
 /**
  * Single disable step that does nothing
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Disable list of official extensions
             $extensions = $this->container->get('ext.manager');
             foreach ($this->add_ons as $var) {
                 $extensions->disable($var);
             }
             // Disable board rules notifications
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->disable_notifications('notification.type.phpbbgallery_image_for_approval');
             $phpbb_notifications->disable_notifications('notification.type.phpbbgallery_image_approved');
             $phpbb_notifications->disable_notifications('notification.type.phpbbgallery_new_image');
             $phpbb_notifications->disable_notifications('notification.type.phpbbgallery_new_comment');
             $phpbb_notifications->disable_notifications('notification.type.phpbbgallery_new_report');
             return 'notifications';
             break;
         default:
             // Run parent disable step method
             return parent::disable_step($old_state);
             break;
     }
 }
示例#2
0
 public function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // We need to change the CAPTCHA configuration back to something
             // builtin if we're disabled when we're the active CAPTCHA, otherwise
             // it'll confuse the board something chronic.
             /* @var $config \phpbb\config\config */
             $config = $this->container->get('config');
             /* @var $recaptcha2 \gothick\recaptcha2\captcha\recaptcha2 */
             $recaptcha2 = $this->container->get('gothick.recaptcha2.captcha.recaptcha2');
             if ($recaptcha2->get_service_name() == $config['captcha_plugin']) {
                 // Used to fall back to reCAPTCHA, but of course, that may not be
                 // configured. Fall back to something that doesn't need configuration
                 // and is likely to just work.
                 $config->set('captcha_plugin', 'core.captcha.plugins.nogd');
             }
             return 'captcha_reset_to_core';
             break;
         default:
             // Run parent disable step method
             return parent::disable_step($old_state);
             break;
     }
 }
示例#3
0
 /**
  * Single disable step
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 public function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Before the first migration
             // If sortables is the default captcha, reset to phpBB's default captcha and store a sortables was default remember flag.
             return $this->handle_default_captcha_on('disable');
         default:
             // Run parent disable step method
             return parent::disable_step($old_state);
     }
 }
示例#4
0
 function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->disable_notifications('posey.ultimateblog.notification.type.subscribe');
             return 'notifications';
             break;
         default:
             return parent::disable_step($old_state);
             break;
     }
 }
示例#5
0
 public function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->disable_notifications('florinp.messenger.notification.type.friend_request');
             return 'notifications';
             break;
         default:
             return parent::disable_step($old_state);
             break;
     }
 }
 function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->disable_notifications('dmzx.ultimatepoints.notification.type.points');
             return 'notifications';
             break;
         default:
             return parent::disable_step($old_state);
             break;
     }
 }
示例#7
0
 /**
  * Overwrite disable_step to disable Auto Groups notifications
  * before the extension is disabled.
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  * @access public
  */
 public function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Disable Auto Groups notifications
             return $this->notification_handler('disable', array('phpbb.autogroups.notification.type.group_added', 'phpbb.autogroups.notification.type.group_removed'));
             break;
         default:
             // Run parent disable step method
             return parent::disable_step($old_state);
             break;
     }
 }
示例#8
0
 /**
  * Single disable step that does nothing
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 public function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Disable notifications
             return $this->notification_handler('disable', array('ernadoo.phpbbdirectory.notification.type.directory_website', 'ernadoo.phpbbdirectory.notification.type.directory_website_approved', 'ernadoo.phpbbdirectory.notification.type.directory_website_disapproved', 'ernadoo.phpbbdirectory.notification.type.directory_website_error_cron', 'ernadoo.phpbbdirectory.notification.type.directory_website_in_queue'));
             break;
         default:
             // Run parent disable step method
             return parent::disable_step($old_state);
             break;
     }
 }
示例#9
0
 /**
  * Overwrite disable_step to disable advanced polls notifications
  * before the extension is disabled.
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Disable board rules notifications
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->disable_notifications('wolfsblvt.advancedpolls.notification.type.pollended');
             return 'notifications';
             break;
         default:
             // Run parent disable step method
             return parent::disable_step($old_state);
             break;
     }
 }
示例#10
0
文件: ext.php 项目: iiet/phpbb-oauth
    function disable_step($old_state)
    {
        switch ($old_state) {
            case '':
                $db = $this->container->get('dbal.conn');
                $modules = array('UCP_PROFILE_REG_DETAILS', 'UCP_PROFILE_AUTOLOGIN_KEYS', 'UCP_AUTH_LINK_MANAGE');
                $sql = 'UPDATE ' . MODULES_TABLE . '
					SET module_enabled = 1
					WHERE ' . $db->sql_in_set('module_langname', $modules);
                $db->sql_query($sql);
                return 'ucp_modules_disabled';
                break;
            default:
                return parent::disable_step($old_state);
                break;
        }
    }
示例#11
0
 /**
  * Overwrite disable_step to disable notifications
  * before the extension is disabled.
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Disable notifications
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->disable_notifications('gfksx.thanksforposts.notification.type.thanks');
             $phpbb_notifications->disable_notifications('gfksx.thanksforposts.notification.type.thanks_remove');
             return 'notifications';
             break;
         default:
             // Run parent disable step method
             return parent::disable_step($old_state);
             break;
     }
 }
示例#12
0
文件: ext.php 项目: bb3mobi/bb3top
 /**
  * Single disable step that does nothing
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Disable list of official extensions
             $extensions = $this->container->get('ext.manager');
             foreach ($this->add_ons as $var) {
                 $extensions->disable($var);
             }
             return true;
             break;
         default:
             // Run parent disable step method
             return parent::disable_step($old_state);
             break;
     }
 }
示例#13
0
 /**
  * Overwrite disable_step to disable reputation notifications
  * before the extension is disabled.
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Disable reputation notifications
             $phpbb_notifications = $this->container->get('notification_manager');
             foreach ($this->reputation_notification_types as $reputation_notification_type) {
                 $phpbb_notifications->disable_notifications($reputation_notification_type);
             }
             return 'notifications';
             break;
         default:
             // Run parent disable step method
             return parent::disable_step($old_state);
             break;
     }
 }
示例#14
0
 /**
  * Disable our notifications.
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  * @access public
  */
 public function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             /* @var $phpbb_notifications \phpbb\notification\manager */
             $phpbb_notifications = $this->container->get('notification_manager');
             foreach (self::$notification_types as $type) {
                 $phpbb_notifications->disable_notifications($type);
             }
             return 'notifications';
             break;
         default:
             // Run parent disable step method
             return parent::disable_step($old_state);
             break;
     }
 }
示例#15
0
文件: ext.php 项目: Galixte/core
 function disable_step($old_state)
 {
     $this->requirements_helper->disable_requiring_extensions($this->extension_name);
     $ret = parent::disable_step($old_state);
     return $ret;
 }
示例#16
0
 /**
  * Overwrite disable_step to disable board rules notifications
  * before the extension is disabled.
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  * @access public
  */
 public function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Disable board rules notifications
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->disable_notifications('alg.adminnotifications.notification.type.fromadmin');
             return 'notifications';
             break;
         default:
             // Run parent disable step method
             return parent::disable_step($old_state);
             break;
     }
 }
示例#17
0
 /**
  * @see \phpbb\extension\base::disable_step()
  */
 public function disable_step($old_state)
 {
     switch ($old_state) {
         case '':
             $phpbb_notifications = $this->container->get('notification_manager');
             foreach ($this->notification_types as $notification_type) {
                 $phpbb_notifications->disable_notifications($notification_type);
             }
             return 'notifications';
             break;
         default:
             return parent::disable_step($old_state);
             break;
     }
 }