Merge branch 'master' of dev.sourcefabric.org:campcaster

This commit is contained in:
paul.baranowski 2010-09-14 10:19:10 -04:00
commit 8bd8f7c7a4
5 changed files with 94 additions and 15 deletions

View file

@ -331,7 +331,7 @@ class StoredFile {
* @var int
*/
private $currentlyaccessing;
/**
* @var int
*/
@ -1153,6 +1153,35 @@ class StoredFile {
}
return TRUE;
}
/**
* Returns gunIds of the playlists the stored file is in.
*/
public function getPlaylists() {
global $CC_CONFIG, $CC_DBC;
$_SESSION['delete'] = "gunid: " . $this->gunid;
$sql = "SELECT gunid "
." FROM ".$CC_CONFIG['mdataTable']
." WHERE object='{$this->gunid}'";
$_SESSION['delete'] = $sql;
$playlists = $CC_DBC->getAll($sql);
return $playlists;
}
public function isScheduled() {
global $CC_CONFIG, $CC_DBC;
$sql = "SELECT * "
." FROM ".$CC_CONFIG['scheduleTable']
." WHERE ends > now() and playlist=x'{$this->gunid}'::bigint";
$scheduled = $CC_DBC->getAll($sql);
return $scheduled;
}
/**