function swftools_get_xml in SWF Tools 6.3
Serves an xml playlist from the {cache_swftools} table.
SWF Tools no longer generates a physical file for the playlist. Instead it places an entry in its internal cache table and then serves the file from there. Pages request the files by accessing swftools/playlist/nnn, where nnn is the cid of the content.
Parameters
string $playlist: The name of the playlist being requested.
Return value
mixed Serve the xml file, or issue drupal_not_found() if it doesn't exist.
1 string reference to 'swftools_get_xml'
- swftools_menu in ./
swftools.module - Implementation of hook_menu().
File
- ./
swftools.module, line 1697 - The primary component of SWF Tools that enables comprehensive media handling.
Code
function swftools_get_xml($playlist) {
if (!($data = cache_get($playlist, 'cache_swftools')) || !$data->data['xml']) {
print drupal_not_found();
}
else {
drupal_set_header('Content-Type: text/xml; charset=utf-8');
print $data->data['xml'];
}
}