$author_name = $author_data[USER_FIRSTNAME] . " " . $author_data[USER_FULLNAME]; $pubdate = $container->get_attribute(OBJ_CREATION_TIME); $desc = $container->get_attribute(OBJ_DESC); $podcast = new PodcastRSS(h($koala_container->get_display_name()), PATH_SERVER . $_SERVER["REQUEST_URI"], h($desc), $pubdate, h($author_name)); $podcast->generate_http_header(); $podcast->generate_xml_header(); // Cache Podcast for 30 Minutes $cache = get_cache_function($_GET["id"], 1800); $items = $cache->call("koala_container::get_items", $_GET["id"]); //$items = koala_container::get_items( $_GET["id"] ); foreach ($items as $item) { if (($item["CLASSTYPE"] & CLASS_DOCUMENT) > 0) { $use_enclosure = TRUE; //$path = PATH_URL . "cached/get_document.php?id=" . $item["OBJ_ID"]; $path = PATH_URL . "podload/" . urlencode(h($item[OBJ_NAME])) . "?id=" . $item["OBJ_ID"]; $podcast->generate_item(array("title" => h($item[OBJ_NAME]), "itunes:author" => h($item["AUTHOR"]), "description" => h($item[OBJ_DESC]), "pubDate" => strftime("%a, %d %b %Y %H:%M:%S GMT", $item[OBJ_CREATION_TIME]), "link" => $path, "guid" => $path, "itunes:explicit" => "No", "itunes:block" => "No", "itunes:keywords" => is_array($item[OBJ_KEYWORDS]) ? implode(", ", $item[OBJ_KEYWORDS]) : ""), $use_enclosure, $use_enclosure ? $path : "", $use_enclosure ? $item["CONTENTSIZE"] : "", $use_enclosure ? $item[DOC_MIME_TYPE] : ""); } else { if (false && ($item["CLASSTYPE"] & CLASS_CONTAINER) > 0) { // DISABLED at the moment $use_enclosure = FALSE; $path = PATH_URL . "cached/get_document.php?id=" . $item["OBJ_ID"]; $podcast->generate_item(array("title" => h($item[OBJ_NAME]), "itunes:author" => h($item["AUTHOR"]), "description" => h($item[OBJ_DESC]), "pubDate" => strftime("%a, %d %b %Y %H:%M:%S GMT", $item[OBJ_CREATION_TIME]), "link" => $path, "guid" => $path, "itunes:explicit" => "No", "itunes:block" => "No", "itunes:keywords" => is_array($item[OBJ_KEYWORDS]) ? implode(", ", $item[OBJ_KEYWORDS]) : ""), $use_enclosure, $use_enclosure ? $path : "", $use_enclosure ? $item["CONTENTSIZE"] : "", $use_enclosure ? $item[DOC_MIME_TYPE] : ""); } else { if (false && ($item["CLASSTYPE"] & CLASS_SDOCEXTERN) > 0) { // DISABLED because Links cannot be displayed with enclosure in general => That leads into validation error of the podcast and therefore malfunction of the whole Cast // TODO: Implement Option "Use in Podcast" and require a file as destination in attribute DOC_EXTERN_URL $use_enclosure = TRUE; $path = $item["DOC_EXTERN_URL"]; $podcast->generate_item(array("title" => h($item[OBJ_NAME]), "itunes:author" => h($item["AUTHOR"]), "description" => h($item[OBJ_DESC]), "pubDate" => strftime("%a, %d %b %Y %H:%M:%S GMT", $item[OBJ_CREATION_TIME]), "link" => $path, "guid" => $path, "itunes:explicit" => "No", "itunes:block" => "No", "itunes:keywords" => is_array($item[OBJ_KEYWORDS]) ? implode(", ", $item[OBJ_KEYWORDS]) : ""), $use_enclosure, $use_enclosure ? $path : "", $use_enclosure ? 0 : "", $use_enclosure ? $item[DOC_MIME_TYPE] : ""); } }