Example #1
0
File: rss.php Project: horde/horde
if ($slug) {
    $queue = $whups_driver->getQueueBySlugInternal($slug);
    // Bad queue slug?
    if (!count($queue)) {
        exit;
    }
    $id = $queue['id'];
} else {
    $id = Horde_Util::getFormData('id');
    $queue = $whups_driver->getQueue($id);
}
// If a specific state_category is not specified, default to returning all
// open tickets.
$state_category = Horde_Util::getFormData('state');
if ($state_category) {
    $state_display = Horde_String::ucFirst($state_category);
    // When specifying an explicit state, limit the feed to 10.
    $limit = 10;
    $state_category = array($state_category);
} else {
    $state_category = array('unconfirmed', 'new', 'assigned');
    $state_display = _("Open");
    $limit = 0;
}
$criteria = array();
// See if we are requesting a specific type_id (for bug, feature etc...)
$typeId = Horde_Util::getFormData('type_id');
if (is_numeric($typeId)) {
    try {
        $type = $whups_driver->getType($typeId);
        $criteria['type'] = array($typeId);