Exemplo n.º 1
0
/**
* Get XML response for a single item.  Depth is irrelevant for this.
*/
function get_item($item_path)
{
    global $session;
    $responses = array();
    dbg_error_log("PROPFIND", "Getting item: Path: %s", $item_path);
    $sql = "SELECT caldav_data.dav_name, caldav_data, caldav_data.dav_etag ";
    $sql .= "FROM caldav_data WHERE dav_name = ?";
    $qry = new PgQuery($sql, PgQuery::Plain(iCalendar::HttpDateFormat()), PgQuery::Plain(iCalendar::HttpDateFormat()), $item_path);
    if ($qry->Exec("PROPFIND", __LINE__, __FILE__) && $qry->rows > 0) {
        while ($item = $qry->Fetch()) {
            $responses[] = item_to_xml($item);
        }
    }
    return $responses;
}