예제 #1
0
파일: tickets.php 프로젝트: Hildy/cerb5
 function viewBuildRssAction()
 {
     @($view_id = DevblocksPlatform::importGPC($_POST['view_id']));
     @($source = DevblocksPlatform::importGPC($_POST['source']));
     @($title = DevblocksPlatform::importGPC($_POST['title']));
     $active_worker = CerberusApplication::getActiveWorker();
     $view = C4_AbstractViewLoader::getView($view_id);
     $hash = md5($title . $view_id . $active_worker->id . time());
     // Restrict to current worker groups
     $active_worker = CerberusApplication::getActiveWorker();
     $params = array('params' => $view->params, 'sort_by' => $view->renderSortBy, 'sort_asc' => $view->renderSortAsc);
     $fields = array(DAO_ViewRss::TITLE => $title, DAO_ViewRss::HASH => $hash, DAO_ViewRss::CREATED => time(), DAO_ViewRss::WORKER_ID => $active_worker->id, DAO_ViewRss::SOURCE_EXTENSION => $source, DAO_ViewRss::PARAMS => serialize($params));
     $feed_id = DAO_ViewRss::create($fields);
     DevblocksPlatform::redirect(new DevblocksHttpResponse(array('preferences', 'rss')));
 }