sendReminders() 공개 정적인 메소드

Sends reminders, one email per user.
public static sendReminders ( Horde_Variables $vars )
$vars Horde_Variables The selection criteria: - 'id' (integer) for individual tickets - 'queue' (integer) for tickets of a queue. - 'category' (array) for ticket categories, defaults to unresolved tickets. - 'unassigned' (boolean) for unassigned tickets.
예제 #1
0
 public function run()
 {
     $this->_runtime = time();
     // See if we need to include the reminders config file.
     if (filemtime(WHUPS_BASE . '/config/reminders.php') > $this->_filestamp) {
         $this->_filestamp = $this->_runtime;
         $this->_reminders = Horde::loadConfiguration('reminders.php', 'reminders', 'whups');
     }
     foreach ($this->_reminders as $reminder) {
         $ds = new Horde_Scheduler_Cron_Date($reminder['frequency']);
         if ($ds->scheduledAt($this->_runtime)) {
             if (!empty($reminder['server_name'])) {
                 $GLOBALS['conf']['server']['name'] = $reminder['server_name'];
             }
             $vars = new Horde_Variables($reminder);
             Whups::sendReminders($vars);
         }
     }
 }
예제 #2
0
파일: index.php 프로젝트: horde/horde
         _open();
         $form1 = new Whups_Form_Admin_EditReplyStepOne($vars);
         $form1->renderActive($renderer, $vars, $adminurl, 'post');
         echo '<br />';
         $form2 = new Whups_Form_Admin_AddReply($vars);
         $form2->renderActive($renderer, $vars, $adminurl, 'post');
     } else {
         _open();
         $form->renderActive($renderer, $vars, $adminurl, 'post');
     }
     break;
 case 'whups_form_sendreminder':
     $form = new Whups_Form_SendReminder($vars);
     if ($form->validate($vars)) {
         try {
             Whups::sendReminders($vars);
             $notification->push(_("Reminders were sent."), 'horde.success');
         } catch (Whups_Exception $e) {
             $notification->push($e, 'horde.error');
             _open();
             $form->renderActive($renderer, $vars, $adminurl, 'post');
         }
     } else {
         _open();
         $form->renderActive($renderer, $vars, $adminurl, 'post');
     }
     break;
 case 'mtmatrix':
     $vars->set('action', 'mtmatrix');
     $queues = $whups_driver->getQueues();
     $types = $whups_driver->getAllTypes();