Copyright 2001-2002 Robert E. Coyle Copyright 2001-2016 Horde LLC (http://www.horde.org/) See the enclosed file LICENSE for license information (BSD). If you did not receive this file, see http://www.horde.org/licenses/bsdl.php.
저자: Robert E. Coyle (robertecoyle@hotmail.com)
저자: Jan Schneider (jan@horde.org)
예제 #1
0
파일: Reports.php 프로젝트: horde/horde
 /**
  * Loads a set of tickets, and cache the result inside the Whups_Reports::
  * object to save on database access.
  *
  * @param string $type       'open', 'closed', or 'all' - the set of
  *                           tickets to fetch. A previously cached set
  *                           will be returned if it is available.
  * @param boolean $expanded  List tickets once for each owner of the
  *                           ticket?
  *
  * @return array  The ticket set.
  */
 protected function &_getTicketSet($type, $expanded = false)
 {
     $queues = array_keys(Whups::permissionsFilter($this->_backend->getQueues(), 'queue'));
     $expanded = (int) $expanded;
     switch ($type) {
         case 'open':
             if (is_null($this->_opentickets[$expanded])) {
                 $this->_opentickets[$expanded] = $this->_backend->getTicketsByProperties(array('nores' => true, 'queue' => $queues), true, $expanded);
             }
             return $this->_opentickets[$expanded];
         case 'closed':
             if (is_null($this->_closedtickets[$expanded])) {
                 $this->_closedtickets[$expanded] = $this->_backend->getTicketsByProperties(array('res' => true, 'queue' => $queues), true, $expanded);
             }
             return $this->_closedtickets[$expanded];
         case 'all':
             if (is_null($this->_alltickets[$expanded])) {
                 $this->_alltickets[$expanded] = $this->_backend->getTicketsByProperties(array('queue' => $queues), true, $expanded);
             }
             return $this->_alltickets[$expanded];
     }
 }
예제 #2
0
파일: Sql.php 프로젝트: jubinpatel/horde
 /**
  * Deletes a form reply.
  *
  * @param integer $reply  A reply ID.
  *
  * @throws Whups_Exception
  */
 public function deleteReply($reply)
 {
     try {
         $this->_db->delete('DELETE FROM whups_replies WHERE reply_id = ?', array((int) $reply));
     } catch (Horde_Db_Exception $e) {
         throw new Whups_Exception($e);
     }
     parent::deleteReply($reply);
 }