public function get() { return parent::get(); }
public function get() { if (parent::get() !== false) { db()->setFetchMode(Zend_Db::FETCH_OBJ); $appid = $this->getParam("id"); if (!is_numeric($appid)) { $appid = "(SELECT id FROM applications WHERE cname ILIKE '" . pg_escape_string(substr($this->getParam("id"), 2)) . "' FETCH FIRST 1 ROWS ONLY)"; } $res = db()->query("SELECT context_to_xml(" . $appid . ") AS xml;")->fetchAll(); $x = array(); foreach ($res as $r) { $x[] = $r->xml; } return new XMLFragmentRestResponse($x, $this); } else { return false; } }