Fixes to the liquidsoap scheduler and the API.

Added a test() function to api_client.
Fixed bug with the config file.
Added line numbers to the logging.
This commit is contained in:
paul.baranowski 2010-11-18 18:00:13 -05:00
parent d5b50ffdca
commit 7ade83ae74
10 changed files with 151 additions and 68 deletions

View file

@ -20,12 +20,13 @@ if (PEAR::isError($CC_DBC)) {
}
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
$file_id = $_GET["file_id"];
$filename = $_GET["file"];
$file_id = substr($filename, 0, strpos($filename, "."));
if (ctype_alnum($file_id) && strlen($file_id) == 32) {
$media = StoredFile::RecallByGunid($file_id);
if ($media != null && !PEAR::isError($media)) {
//var_dump($media);
$filepath = $media->getRealFileName();
$filepath = $media->getRealFilePath();
if(!is_file($filepath))
{
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");