コード例 #1
0
 /**
  * Build template vars for a select menu of auto group conditions
  *
  * @param int $selected An identifier for the selected group
  * @return null
  * @access protected
  */
 protected function build_conditions_menu($selected)
 {
     $conditions = $this->manager->get_autogroups_type_ids();
     foreach ($conditions as $condition_name => $condition_id) {
         $this->template->assign_block_vars('conditions', array('CONDITION_ID' => $condition_id, 'CONDITION_NAME' => $this->manager->get_condition_lang($condition_name), 'S_SELECTED' => $condition_id == $selected));
     }
 }
コード例 #2
0
ファイル: listener.php プロジェクト: Nicofuma/autogroups
 /**
  * Check user's warnings count after receiving a warning for auto groups
  *
  * @param object $event The event object
  * @return null
  * @access public
  */
 public function add_warning_check($event)
 {
     $this->manager->check_condition('phpbb.autogroups.type.warnings', array('users' => $event['user_row']['user_id']));
 }
コード例 #3
0
 /**
  * Runs this cron task.
  *
  * @return null
  */
 public function run()
 {
     $this->manager->check_conditions();
     $this->config->set('autogroups_last_run', time(), false);
 }