示例#1
0
 function disable_step($old_state)
 {
     global $db;
     $sql = 'DELETE FROM ' . USER_NOTIFICATIONS_TABLE . "\n\t\t\tWHERE method = 'notification.method.mobilenotifier'";
     $db->sql_query($sql);
     return parent::enable_step($old_state);
 }
示例#2
0
文件: ext.php 项目: marc1706/viglink
 /**
  * Check phpBB's VigLink switches and set them during install
  *
  * @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 enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             /* @var $cache \phpbb\cache\service */
             $cache = $this->container->get('cache');
             /* @var $config \phpbb\config\config */
             $config = $this->container->get('config');
             /* @var $file_downloader \phpbb\file_downloader */
             $file_downloader = $this->container->get('file_downloader');
             /* @var $user \phpbb\user */
             $user = $this->container->get('user');
             $viglink_helper = new \phpbb\viglink\acp\viglink_helper($cache, $config, $file_downloader, $user);
             try {
                 $viglink_helper->set_viglink_services();
             } catch (\RuntimeException $e) {
                 // fail silently
             }
             return 'viglink';
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#3
0
 /**
  * Single enable step that installs any included migrations
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Disable list of official extensions
             $extensions = $this->container->get('ext.manager');
             $configured = $extensions->all_disabled();
             //var_dump($configured);
             foreach ($this->add_ons as $var) {
                 if (array_key_exists($var, $configured)) {
                     $extensions->enable($var);
                 }
             }
             // Enable board rules notifications
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->enable_notifications('notification.type.phpbbgallery_image_for_approval');
             $phpbb_notifications->enable_notifications('notification.type.phpbbgallery_image_approved');
             $phpbb_notifications->enable_notifications('notification.type.phpbbgallery_new_image');
             $phpbb_notifications->enable_notifications('notification.type.phpbbgallery_new_comment');
             $phpbb_notifications->enable_notifications('notification.type.phpbbgallery_new_report');
             return 'notifications';
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#4
0
 public function enable_step($old_state)
 {
     global $phpbb_root_path;
     switch ($old_state) {
         case '':
             $db = new \florinp\messenger\libs\database();
             $db->exec("\n          CREATE TABLE IF NOT EXISTS messages (\n            `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,\n            `sender_id` INTEGER NOT NULL,\n            `receiver_id` INTEGER NOT NULL,\n            `text` TEXT NOT NULL,\n            `newMsg` INTEGER DEFAULT 0,\n            `sentAt` INTEGER NOT NULL\n          );\n          CREATE TABLE IF NOT EXISTS files (\n            `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,\n            `sender_id` INTEGER NOT NULL,\n            `receiver_id` INTEGER NOT NULL,\n            `fileName` VARCHAR(255) NOT NULL,\n            `file` VARCHAR(255) NOT NULL,\n            `type` VARCHAR(255) NOT NULL,\n            `sentAt` INTEGER NOT NULL\n          );\n        ");
             $messengerDir = $phpbb_root_path . 'store/messenger';
             if (!is_dir($messengerDir)) {
                 mkdir($messengerDir, 0777);
                 $filesDir = $messengerDir . '/files';
                 if (!is_dir($filesDir)) {
                     mkdir($filesDir, 0777);
                 }
             }
             return 'notifications';
             break;
         case 'notifications':
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->enable_notifications('florinp.messenger.notification.type.friend_request');
             return 'step2';
             break;
         default:
             return parent::enable_step($old_state);
             break;
     }
 }
示例#5
0
 public function enable_step($old_state)
 {
     if (empty($old_state)) {
         //	global $user;
         //	$user->lang['EXTENSION_ENABLE_SUCCESS'] =  $user->lang['EXTENSION_ENABLE_SUCCESS'];
     }
     // Run parent enable step method
     return parent::enable_step($old_state);
 }
示例#6
0
 /**
  * @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 enable_step($old_state)
 {
     if (empty($old_state)) {
         $this->container->get('user')->add_lang_ext('forumhulp/sysoverview', 'info_acp_sysoverview');
         $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS', $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS'] . (isset($this->container->get('user')->lang['SYSOVERVIEW_NOTICE']) ? sprintf($this->container->get('user')->lang['SYSOVERVIEW_NOTICE'], $this->container->get('user')->lang['ACP_CAT_SYSTEM'], $this->container->get('user')->lang['ACP_GENERAL_TASKS'], $this->container->get('user')->lang['ACP_SYSOVERVIEW_TITLE']) : ''));
     }
     // Run parent enable step method
     return parent::enable_step($old_state);
 }
示例#7
0
文件: ext.php 项目: Galixte/htmlemail
 public function enable_step($old_state)
 {
     if (empty($old_state)) {
         global $user;
         $user->add_lang_ext('forumhulp/htmlemail', 'info_acp_htmlemail');
         $user->lang['EXTENSION_ENABLE_SUCCESS'] .= isset($user->lang['HTML_EMAIL_NOTICE']) ? $user->lang['HTML_EMAIL_NOTICE'] : '';
     }
     // Run parent enable step method
     return parent::enable_step($old_state);
 }
示例#8
0
 public function enable_step($old_state)
 {
     if (empty($old_state)) {
         global $user;
         $info = '<div style="width:80%;margin:20px auto;"><p style="text-align:left;">Settings for this extension are in General >> Board configuration >> Board features.</p></div>';
         $user->lang['EXTENSION_ENABLE_SUCCESS'] = $user->lang['EXTENSION_ENABLE_SUCCESS'] . $info;
     }
     // Run parent enable step method
     return parent::enable_step($old_state);
 }
示例#9
0
 function enable_step($old_state)
 {
     global $phpEx;
     global $phpbb_root_path;
     global $request;
     /*Require WP includes*/
     $proxy = new Proxy();
     $proxy->cache();
     //AAAAAAAAAAAAND let's hope it works?
     // Run parent enable step method
     return parent::enable_step($old_state);
 }
示例#10
0
 /**
  * Single enable 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 enable_step($old_state)
 {
     // Run parent enable step method
     $return_parent = parent::enable_step($old_state);
     // After the last migration
     if ($return_parent === false) {
         // Atomatically reinstate sortables when it was disabled while being the default captcha.
         // Sortables will not be set as default captcha for new and purged installations because it requires manual configuration.
         $this->handle_default_captcha_on('enable');
     }
     return $return_parent;
 }
 function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->enable_notifications('dmzx.ultimatepoints.notification.type.points');
             return 'notifications';
             break;
         default:
             return parent::enable_step($old_state);
             break;
     }
 }
示例#12
0
 function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->enable_notifications('posey.ultimateblog.notification.type.subscribe');
             return 'notifications';
             break;
         default:
             return parent::enable_step($old_state);
             break;
     }
 }
示例#13
0
 /**
  * Single enable step that installs any included migrations
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 public function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Enable notifications
             return $this->notification_handler('enable', 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 enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#14
0
 /**
  * Overwrite enable_step to enable Auto Groups notifications
  * before any included migrations are installed.
  *
  * @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 enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Enable Auto Groups notifications
             return $this->notification_handler('enable', array('phpbb.autogroups.notification.type.group_added', 'phpbb.autogroups.notification.type.group_removed'));
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#15
0
文件: ext.php 项目: d120/phpbb-banner
 /**
  * enable_step is executed on enabling an extension until it returns false.
  *
  * Calls to this function can be made in subsequent requests, when the
  * function is invoked through a webserver with a too low max_execution_time.
  *
  * @param	mixed	$old_state	The return value of the previous call
  *								of this method, or false on the first call
  * @return	mixed				Returns false after last step, otherwise
  *								temporary state which is passed as an
  *								argument to the next step
  */
 public function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             $this->store_mkdir('d120de/banner/default/');
             $this->store_mkdir('d120de/banner/event/');
             return 'store_mkdir';
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#16
0
文件: ext.php 项目: ForumHulp/pmspy
 function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             $this->container->get('user')->add_lang_ext('forumhulp/pmspy', 'info_acp_pmspy');
             $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS', $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS'] . (isset($this->container->get('user')->lang['PMSPY_NOTICE']) ? sprintf($this->container->get('user')->lang['PMSPY_NOTICE'], $this->container->get('user')->lang['ACP_CAT_POSTING'], $this->container->get('user')->lang['ACP_MESSAGES'], $this->container->get('user')->lang['ACP_PM_SPY']) : ''));
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#17
0
 function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             $this->container->get('user')->add_lang_ext('forumhulp/loginwithemail', 'info_acp_loginwithemail');
             $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS', $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS'] . (isset($this->container->get('user')->lang['LIWE_NOTICE']) ? sprintf($this->container->get('user')->lang['LIWE_NOTICE'], $this->container->get('user')->lang['ACP_CAT_GENERAL'], $this->container->get('user')->lang['ACP_BOARD_CONFIGURATION'], $this->container->get('user')->lang['ACP_REGISTER_SETTINGS'], $this->container->get('user')->lang['ACP_LIWE']) : ''));
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#18
0
 /**
  * Overwrite enable_step to enable advanced polls notifications
  * before any included migrations are installed.
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Enable advanced polls notifications
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->enable_notifications('wolfsblvt.advancedpolls.notification.type.pollended');
             return 'notifications';
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#19
0
 /**
  * Overwrite enable_step to enable board rules notifications
  * before any included migrations are installed.
  *
  * @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 enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Enable board rules notifications
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->enable_notifications('phpbb.boardrules.notification.type.boardrules');
             return 'notifications';
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#20
0
 function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             $this->container->get('user')->add_lang_ext('forumhulp/postsstats', 'info_acp_postsstats');
             $this->container->get('template')->assign_var('L_EXTENSION_ENABLE_SUCCESS', $this->container->get('user')->lang['EXTENSION_ENABLE_SUCCESS'] . (isset($this->container->get('user')->lang['POSTSSTAT_NOTICE']) ? sprintf($this->container->get('user')->lang['POSTSSTAT_NOTICE'], $this->container->get('user')->lang['ACP_CAT_GENERAL'], $this->container->get('user')->lang['ACP_QUICK_ACCESS'], $this->container->get('user')->lang['ACP_POSTSTATISTICS']) : ''));
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#21
0
文件: ext.php 项目: iiet/phpbb-oauth
    function enable_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 = 0
					WHERE ' . $db->sql_in_set('module_langname', $modules);
                $db->sql_query($sql);
                return 'ucp_modules_disabled';
                break;
            default:
                return parent::enable_step($old_state);
                break;
        }
    }
示例#22
0
 /**
  * Overwrite enable_step to enable notifications
  * before any included migrations are installed.
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Enable notifications
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->enable_notifications('gfksx.thanksforposts.notification.type.thanks');
             $phpbb_notifications->enable_notifications('gfksx.thanksforposts.notification.type.thanks_remove');
             return 'notifications';
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#23
0
 /**
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // create directory
             $phpbb_root_path = $this->container->getParameter('core.root_path');
             $user = $this->container->get('user');
             $customcode_directory = new customcode_directory($user, $phpbb_root_path);
             $customcode_directory->create();
             return '1';
             break;
         default:
             return parent::enable_step($old_state);
             break;
     }
 }
示例#24
0
 function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             global $user;
             $user->add_lang_ext('forumhulp/statistics', 'info_acp_statistics');
             $user->lang['EXTENSION_ENABLE_SUCCESS'] .= isset($user->lang['STATISTICS_NOTICE']) ? sprintf($user->lang['STATISTICS_NOTICE'], $user->lang['ACP_CAT_GENERAL'], $user->lang['ACP_QUICK_ACCESS'], $user->lang['ACP_STATISTICS']) : '';
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#25
0
 public function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             $db = new \florinp\messenger\libs\database();
             $db->exec("\n          CREATE TABLE IF NOT EXISTS messages (\n            `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,\n            `sender_id` INTEGER NOT NULL,\n            `receiver_id` INTEGER NOT NULL,\n            `text` TEXT NOT NULL,\n            `newMsg` INTEGER DEFAULT 0,\n            `sentAt` INTEGER NOT NULL\n          );\n        ");
             return 'notifications';
             break;
         case 'notifications':
             $phpbb_notifications = $this->container->get('notification_manager');
             $phpbb_notifications->enable_notifications('florinp.messenger.notification.type.friend_request');
             return 'step2';
             break;
         default:
             return parent::enable_step($old_state);
             break;
     }
 }
示例#26
0
 /**
  * Overwrite enable_step to enable reputation notifications
  * before any included migrations are installed.
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Enable reputation notifications
             $phpbb_notifications = $this->container->get('notification_manager');
             foreach ($this->reputation_notification_types as $reputation_notification_type) {
                 $phpbb_notifications->enable_notifications($reputation_notification_type);
             }
             return 'notifications';
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#27
0
 /**
  * Enable 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 enable_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->enable_notifications($type);
             }
             return 'notifications';
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#28
0
文件: ext.php 项目: bb3mobi/bb3top
 /**
  * Single enable step that installs any included migrations
  *
  * @param mixed $old_state State returned by previous call of this method
  * @return mixed Returns false after last step, otherwise temporary state
  */
 function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             // Disable list of official extensions
             $extensions = $this->container->get('ext.manager');
             $configured = $extensions->all_disabled();
             //var_dump($configured);
             foreach ($this->add_ons as $var) {
                 if (array_key_exists($var, $configured)) {
                     $extensions->enable($var);
                 }
             }
             return true;
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#29
0
 function enable_step($old_state)
 {
     //echo 'step ',$old_state,'<br />';
     return parent::enable_step($old_state);
     switch ($old_state) {
         case '':
             // Empty means nothing has run yet
             /*				// Get config
             				$config = $this->container->get('config');
             				if (!isset($config['fancyDiceMacro_1']))
             				{
             					// if nothing else has been set, support basic dice
             					set_config('fancyDiceMacro_1', json_encode(array('d'=>'@[1_>]')));
             				}
             				*/
             return 'fancyDice_config_changed';
             break;
         default:
             // Run parent enable step method
             return parent::enable_step($old_state);
             break;
     }
 }
示例#30
0
 /**
  * @see \phpbb\extension\base::enable_step()
  */
 public function enable_step($old_state)
 {
     switch ($old_state) {
         case '':
             $phpbb_notifications = $this->container->get('notification_manager');
             foreach ($this->notification_types as $notification_type) {
                 $phpbb_notifications->enable_notifications($notification_type);
             }
             return 'notifications';
             break;
         default:
             return parent::enable_step($old_state);
             break;
     }
 }