Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
afe5d2e2cf
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
// This file generated by Propel 1.5.2 convert-conf target
|
||||
// from XML runtime conf file /home/james/src/airtime/airtime_mvc/build/runtime-conf.xml
|
||||
// from XML runtime conf file /home/rudi/Airtime/airtime_mvc/build/runtime-conf.xml
|
||||
$conf = array (
|
||||
'datasources' =>
|
||||
array (
|
||||
|
|
|
@ -463,17 +463,10 @@ class ApiController extends Zend_Controller_Action
|
|||
$this->view->watched_dirs = $watchedDirsPath;
|
||||
}
|
||||
|
||||
public function dispatchMetadata($md, $mode, $dry_run=false)
|
||||
public function dispatchMetadata($md, $mode)
|
||||
{
|
||||
// Replace this compound result in a hash with proper error handling later on
|
||||
$return_hash = array();
|
||||
if ( $dry_run ) { // for debugging we return garbage not to screw around with the db
|
||||
return array(
|
||||
'md' => $md,
|
||||
'mode' => $mode,
|
||||
'fileid' => 123456
|
||||
);
|
||||
}
|
||||
Application_Model_Preference::SetImportTimestamp();
|
||||
Logging::info("--->Mode: $mode || file: {$md['MDATA_KEY_FILEPATH']} ");
|
||||
Logging::info( $md );
|
||||
|
@ -586,8 +579,7 @@ class ApiController extends Zend_Controller_Action
|
|||
// Removing 'mode' key from $info_json might not be necessary...
|
||||
$mode = $info_json['mode'];
|
||||
unset( $info_json['mode'] );
|
||||
$response = $this->dispatchMetadata($info_json, $mode,
|
||||
$dry_run=$dry);
|
||||
$response = $this->dispatchMetadata($info_json, $mode);
|
||||
// We tack on the 'key' back to every request in case the would like to associate
|
||||
// his requests with particular responses
|
||||
$response['key'] = $k;
|
||||
|
|
|
@ -110,9 +110,16 @@ class LoginController extends Zend_Controller_Action
|
|||
|
||||
$request = $this->getRequest();
|
||||
if ($request->isPost() && $form->isValid($request->getPost())) {
|
||||
$user = CcSubjsQuery::create()
|
||||
->filterByDbEmail($form->email->getValue())
|
||||
->findOne();
|
||||
if (is_null($form->username->getValue()) || $form->username->getValue() == '') {
|
||||
$user = CcSubjsQuery::create()
|
||||
->filterByDbEmail($form->email->getValue())
|
||||
->findOne();
|
||||
} else {
|
||||
$user = CcSubjsQuery::create()
|
||||
->filterByDbEmail($form->email->getValue())
|
||||
->filterByDbLogin($form->username->getValue())
|
||||
->findOne();
|
||||
}
|
||||
|
||||
if (!empty($user)) {
|
||||
$auth = new Application_Model_Auth();
|
||||
|
|
|
@ -70,8 +70,8 @@ class UserController extends Zend_Controller_Action
|
|||
|
||||
public function getHostsAction()
|
||||
{
|
||||
$search = $this->_getParam('term');
|
||||
$res = Application_Model_User::getHosts($search);
|
||||
$search = $this->_getParam('term');
|
||||
$res = Application_Model_User::getHosts($search);
|
||||
$this->view->hosts = Application_Model_User::getHosts($search);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,17 @@ class Application_Form_PasswordRestore extends Zend_Form
|
|||
'ViewHelper'
|
||||
)
|
||||
));
|
||||
|
||||
$this->addElement('text', 'username', array(
|
||||
'label' => 'Username',
|
||||
'required' => false,
|
||||
'filters' => array(
|
||||
'stringTrim',
|
||||
),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
)
|
||||
));
|
||||
|
||||
$this->addElement('submit', 'submit', array(
|
||||
'label' => 'Restore password',
|
||||
|
|
|
@ -30,7 +30,8 @@ class Application_Model_Auth
|
|||
$e_link_port = $_SERVER['SERVER_PORT'];
|
||||
$e_link_path = $view->url(array('user_id' => $user->getDbId(), 'token' => $token), 'password-change');
|
||||
|
||||
$message = "Click this link: {$e_link_protocol}://{$e_link_base}:{$e_link_port}{$e_link_path}";
|
||||
$message = "Hi {$user->getDbLogin()}, \n\nClick this link to reset your password: ";
|
||||
$message .= "{$e_link_protocol}://{$e_link_base}:{$e_link_port}{$e_link_path}";
|
||||
|
||||
$success = Application_Model_Email::send('Airtime Password Reset', $message, $user->getDbEmail());
|
||||
|
||||
|
|
|
@ -430,13 +430,16 @@ EOT;
|
|||
|
||||
foreach ($p_items as $ac) {
|
||||
Logging::info("Adding audio file {$ac}");
|
||||
|
||||
if (is_array($ac) && $ac[1] == 'audioclip') {
|
||||
$res = $this->insertBlockElement($this->buildEntry($ac[0], $pos));
|
||||
$pos = $pos + 1;
|
||||
} elseif (!is_array($ac)) {
|
||||
$res = $this->insertBlockElement($this->buildEntry($ac, $pos));
|
||||
$pos = $pos + 1;
|
||||
try {
|
||||
if (is_array($ac) && $ac[1] == 'audioclip') {
|
||||
$res = $this->insertBlockElement($this->buildEntry($ac[0], $pos));
|
||||
$pos = $pos + 1;
|
||||
} elseif (!is_array($ac)) {
|
||||
$res = $this->insertBlockElement($this->buildEntry($ac, $pos));
|
||||
$pos = $pos + 1;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
Logging::log($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -452,8 +455,7 @@ EOT;
|
|||
|
||||
$this->con->commit();
|
||||
|
||||
//check if block is in any playlists and update the playlist's length
|
||||
Application_Model_Playlist::updatePlaylistsLengthWithBlock($this->id, $this->getLength());
|
||||
$this->updateBlockLengthInAllPlaylist();
|
||||
|
||||
} catch (Exception $e) {
|
||||
$this->con->rollback();
|
||||
|
@ -567,9 +569,7 @@ EOT;
|
|||
|
||||
$this->con->commit();
|
||||
|
||||
|
||||
//check if block is in any playlists and update the playlist's length
|
||||
Application_Model_Playlist::updatePlaylistsLengthWithBlock($this->id, $this->getLength());
|
||||
$this->updateBlockLengthInAllPlaylist();
|
||||
|
||||
} catch (Exception $e) {
|
||||
$this->con->rollback();
|
||||
|
@ -1181,7 +1181,17 @@ EOT;
|
|||
$criteria['extra'] *= 1000;
|
||||
}
|
||||
} else {
|
||||
$spCriteriaValue = addslashes($criteria['value']);
|
||||
/* Propel does not escape special characters properly when using LIKE/ILIKE
|
||||
* We have to add extra slashes in these cases
|
||||
*/
|
||||
$tempModifier = trim(self::$modifier2CriteriaMap[$spCriteriaModifier]);
|
||||
if ($tempModifier == 'ILIKE') {
|
||||
$spCriteriaValue = addslashes($criteria['value']);
|
||||
// addslashes() does not esapce '%' so we have to do it manually
|
||||
$spCriteriaValue = str_replace('%', '\%', $spCriteriaValue);
|
||||
} else {
|
||||
$spCriteriaValue = ($criteria['value']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($spCriteriaModifier == "starts with") {
|
||||
|
@ -1216,15 +1226,14 @@ EOT;
|
|||
$limits['time'] = 1440 * 60;
|
||||
$limits['items'] = $storedCrit['limit']['value'];
|
||||
} else {
|
||||
$limits['time'] = $storedCrit['limit']['modifier'] == "hours" ?
|
||||
intval(floatval($storedCrit['limit']['value']) * 60 * 60) :
|
||||
$limits['time'] = $storedCrit['limit']['modifier'] == "hours" ?
|
||||
intval(floatval($storedCrit['limit']['value']) * 60 * 60) :
|
||||
intval($storedCrit['limit']['value'] * 60);
|
||||
$limits['items'] = null;
|
||||
}
|
||||
}
|
||||
try {
|
||||
$out = $qry->setFormatter(ModelCriteria::FORMAT_ON_DEMAND)->find();
|
||||
|
||||
return array("files"=>$out, "limit"=>$limits, "count"=>$out->count());
|
||||
} catch (Exception $e) {
|
||||
Logging::info($e);
|
||||
|
|
|
@ -913,26 +913,6 @@ SQL;
|
|||
{
|
||||
CcPlaylistcontentsQuery::create()->findByDbPlaylistId($this->id)->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* After items get deleted/added from/to a block
|
||||
* this function updates the length of playlists
|
||||
* that contain that block
|
||||
*/
|
||||
public static function updatePlaylistsLengthWithBlock($p_blockId, $p_blockLength) {
|
||||
$playlists = CcPlaylistQuery::create()->find();
|
||||
foreach ($playlists as $pl) {
|
||||
$contents = CcPlaylistcontentsQuery::create()->findByDbPlaylistId($pl->getDbId());
|
||||
//check if the block is in each playlist
|
||||
foreach ($contents as $item) {
|
||||
if ($item->getDbBlockId() == $p_blockId) {
|
||||
$item->setDbCliplength($p_blockLength);
|
||||
$con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME);
|
||||
$item->save($con);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // class Playlist
|
||||
|
||||
|
|
|
@ -172,6 +172,39 @@ class Application_Model_Show
|
|||
if ($deltaDay > 0) {
|
||||
return "Shows can have a max length of 24 hours.";
|
||||
}
|
||||
|
||||
$showInstances = CcShowInstancesQuery::create()
|
||||
->filterByDbShowId($this->_showId)
|
||||
->find($con);
|
||||
|
||||
/* Check if the show being resized and any of its repeats
|
||||
* overlap with other scheduled shows
|
||||
*/
|
||||
foreach ($showInstances as $si) {
|
||||
$startsDateTime = new DateTime($si->getDbStarts(), new DateTimeZone("UTC"));
|
||||
$endsDateTime = new DateTime($si->getDbEnds(), new DateTimeZone("UTC"));
|
||||
|
||||
/* The user is moving the show on the calendar from the perspective of local time.
|
||||
* incase a show is moved across a time change border offsets should be added to the local
|
||||
* timestamp and then converted back to UTC to avoid show time changes
|
||||
*/
|
||||
$startsDateTime->setTimezone(new DateTimeZone(date_default_timezone_get()));
|
||||
$endsDateTime->setTimezone(new DateTimeZone(date_default_timezone_get()));
|
||||
|
||||
$newStartsDateTime = Application_Model_ShowInstance::addDeltas($startsDateTime, $deltaDay, $deltaMin);
|
||||
$newEndsDateTime = Application_Model_ShowInstance::addDeltas($endsDateTime, $deltaDay, $deltaMin);
|
||||
|
||||
//convert our new starts/ends to UTC.
|
||||
$newStartsDateTime->setTimezone(new DateTimeZone("UTC"));
|
||||
$newEndsDateTime->setTimezone(new DateTimeZone("UTC"));
|
||||
|
||||
$overlapping = Application_Model_Schedule::checkOverlappingShows($newStartsDateTime,
|
||||
$newEndsDateTime, true, $si->getDbId());
|
||||
if ($overlapping) {
|
||||
return "Cannot schedule overlapping shows.\nNote: Resizing a repeating show ".
|
||||
"affects all of its repeats.";
|
||||
}
|
||||
}
|
||||
|
||||
$hours = $deltaMin/60;
|
||||
if ($hours > 0) {
|
||||
|
|
|
@ -205,7 +205,7 @@ class Application_Model_ShowInstance
|
|||
* @return $newDateTime
|
||||
* php DateTime, $dateTime with the added time deltas.
|
||||
*/
|
||||
private static function addDeltas($dateTime, $deltaDay, $deltaMin)
|
||||
public static function addDeltas($dateTime, $deltaDay, $deltaMin)
|
||||
{
|
||||
$newDateTime = clone $dateTime;
|
||||
|
||||
|
|
|
@ -24,30 +24,31 @@ class Application_Model_StoredFile
|
|||
* array of db metadata -> propel
|
||||
*/
|
||||
private $_dbMD = array (
|
||||
"track_title" => "DbTrackTitle",
|
||||
"artist_name" => "DbArtistName",
|
||||
"album_title" => "DbAlbumTitle",
|
||||
"genre" => "DbGenre",
|
||||
"mood" => "DbMood",
|
||||
"track_title" => "DbTrackTitle",
|
||||
"artist_name" => "DbArtistName",
|
||||
"album_title" => "DbAlbumTitle",
|
||||
"genre" => "DbGenre",
|
||||
"mood" => "DbMood",
|
||||
"track_number" => "DbTrackNumber",
|
||||
"bpm" => "DbBpm",
|
||||
"label" => "DbLabel",
|
||||
"composer" => "DbComposer",
|
||||
"encoded_by" => "DbEncodedBy",
|
||||
"conductor" => "DbConductor",
|
||||
"year" => "DbYear",
|
||||
"info_url" => "DbInfoUrl",
|
||||
"isrc_number" => "DbIsrcNumber",
|
||||
"copyright" => "DbCopyright",
|
||||
"length" => "DbLength",
|
||||
"bit_rate" => "DbBitRate",
|
||||
"sample_rate" => "DbSampleRate",
|
||||
"mime" => "DbMime",
|
||||
"md5" => "DbMd5",
|
||||
"ftype" => "DbFtype",
|
||||
"language" => "DbLanguage",
|
||||
"replay_gain" => "DbReplayGain",
|
||||
"directory" => "DbDirectory"
|
||||
"bpm" => "DbBpm",
|
||||
"label" => "DbLabel",
|
||||
"composer" => "DbComposer",
|
||||
"encoded_by" => "DbEncodedBy",
|
||||
"conductor" => "DbConductor",
|
||||
"year" => "DbYear",
|
||||
"info_url" => "DbInfoUrl",
|
||||
"isrc_number" => "DbIsrcNumber",
|
||||
"copyright" => "DbCopyright",
|
||||
"length" => "DbLength",
|
||||
"bit_rate" => "DbBitRate",
|
||||
"sample_rate" => "DbSampleRate",
|
||||
"mime" => "DbMime",
|
||||
"md5" => "DbMd5",
|
||||
"ftype" => "DbFtype",
|
||||
"language" => "DbLanguage",
|
||||
"replay_gain" => "DbReplayGain",
|
||||
"directory" => "DbDirectory",
|
||||
"owner_id" => "DbOwnerId"
|
||||
);
|
||||
|
||||
public function __construct()
|
||||
|
@ -96,7 +97,6 @@ class Application_Model_StoredFile
|
|||
*/
|
||||
public function setMetadata($p_md=null)
|
||||
{
|
||||
Logging::info("entered setMetadata");
|
||||
if (is_null($p_md)) {
|
||||
$this->setDbColMetadata();
|
||||
} else {
|
||||
|
@ -145,14 +145,44 @@ class Application_Model_StoredFile
|
|||
$this->_file->$method(null);
|
||||
}
|
||||
} else {
|
||||
$owner = $this->_file->getFkOwner();
|
||||
// if owner_id is already set we don't want to set it again.
|
||||
if(!$owner) { // no owner detected, we try to assign one.
|
||||
// if MDATA_OWNER_ID is not set then we default to the
|
||||
// first admin user we find
|
||||
if (!array_key_exists('MDATA_OWNER_ID', $p_md)) {
|
||||
//$admins = Application_Model_User::getUsers(array('A'));
|
||||
$admins = Application_Model_User::getUsersOfType('A');
|
||||
//$admins = array();
|
||||
if (count($admins) > 0) { // found admin => pick first one
|
||||
$owner = $admins[0];
|
||||
}
|
||||
}
|
||||
// get the user by id and set it like that
|
||||
else {
|
||||
$user = CcSubjsQuery::create()
|
||||
->findPk($p_md['MDATA_OWNER_ID']);
|
||||
if ($user) {
|
||||
$owner = $user;
|
||||
}
|
||||
}
|
||||
if ($owner) {
|
||||
$this->_file->setDbOwnerId( $owner->getDbId() );
|
||||
}
|
||||
else {
|
||||
Logging::info("Could not find suitable owner for file
|
||||
'".$p_md['MDATA_KEY_FILEPATH']."'");
|
||||
}
|
||||
}
|
||||
foreach ($p_md as $dbColumn => $mdValue) {
|
||||
//don't blank out name, defaults to original filename on first insertion to database.
|
||||
// don't blank out name, defaults to original filename on first
|
||||
// insertion to database.
|
||||
if ($dbColumn == "track_title" && (is_null($mdValue) || $mdValue == "")) {
|
||||
continue;
|
||||
}
|
||||
if (isset($this->_dbMD[$dbColumn])) {
|
||||
$propelColumn = $this->_dbMD[$dbColumn];
|
||||
$method = "set$propelColumn";
|
||||
$method = "set$propelColumn";
|
||||
Logging::info($method);
|
||||
$this->_file->$method($mdValue);
|
||||
}
|
||||
|
@ -266,8 +296,8 @@ class Application_Model_StoredFile
|
|||
foreach ($c['user'] as $constant => $value) {
|
||||
if (preg_match('/^MDATA_KEY/', $constant)) {
|
||||
if (isset($dbmd_copy[$value])) {
|
||||
$propelColumn = $dbmd_copy[$value];
|
||||
$method = "get$propelColumn";
|
||||
$propelColumn = $dbmd_copy[$value];
|
||||
$method = "get$propelColumn";
|
||||
$md[$constant] = $this->_file->$method();
|
||||
}
|
||||
}
|
||||
|
@ -372,12 +402,11 @@ class Application_Model_StoredFile
|
|||
*/
|
||||
public function getFilePath()
|
||||
{
|
||||
$music_dir = Application_Model_MusicDir::getDirByPK($this->_file->getDbDirectory());
|
||||
$music_dir = Application_Model_MusicDir::getDirByPK($this->
|
||||
_file->getDbDirectory());
|
||||
$directory = $music_dir->getDirectory();
|
||||
|
||||
$filepath = $this->_file->getDbFilepath();
|
||||
|
||||
return $directory.$filepath;
|
||||
$filepath = $this->_file->getDbFilepath();
|
||||
return OsPath::join($directory, $filepath);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -459,13 +488,18 @@ class Application_Model_StoredFile
|
|||
}
|
||||
|
||||
$file = new CcFiles();
|
||||
$file->setDbUtime(new DateTime("now", new DateTimeZone("UTC")));
|
||||
$file->setDbMtime(new DateTime("now", new DateTimeZone("UTC")));
|
||||
$now = new DateTime("now", new DateTimeZone("UTC"));
|
||||
$file->setDbUtime($now);
|
||||
$file->setDbMtime($now);
|
||||
|
||||
$storedFile = new Application_Model_StoredFile();
|
||||
$storedFile->_file = $file;
|
||||
|
||||
// removed "//" in the path. Always use '/' for path separator
|
||||
// TODO : it might be better to just call OsPath::normpath on the file
|
||||
// path. Also note that mediamonitor normalizes the paths anyway
|
||||
// before passing them to php so it's not necessary to do this at all
|
||||
|
||||
$filepath = str_replace("//", "/", $md['MDATA_KEY_FILEPATH']);
|
||||
$res = $storedFile->setFilePath($filepath);
|
||||
if ($res === -1) {
|
||||
|
@ -576,9 +610,9 @@ class Application_Model_StoredFile
|
|||
->find();
|
||||
$res = array();
|
||||
foreach ($files as $file) {
|
||||
$storedFile = new Application_Model_StoredFile();
|
||||
$storedFile = new Application_Model_StoredFile();
|
||||
$storedFile->_file = $file;
|
||||
$res[] = $storedFile;
|
||||
$res[] = $storedFile;
|
||||
}
|
||||
|
||||
return $res;
|
||||
|
@ -594,31 +628,31 @@ class Application_Model_StoredFile
|
|||
"language", "filepath"
|
||||
);
|
||||
|
||||
$plSelect = array();
|
||||
$blSelect = array();
|
||||
$fileSelect = array();
|
||||
$plSelect = array();
|
||||
$blSelect = array();
|
||||
$fileSelect = array();
|
||||
$streamSelect = array();
|
||||
foreach ($displayColumns as $key) {
|
||||
|
||||
if ($key === "id") {
|
||||
$plSelect[] = "PL.id AS ".$key;
|
||||
$blSelect[] = "BL.id AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$plSelect[] = "PL.id AS ".$key;
|
||||
$blSelect[] = "BL.id AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$streamSelect[] = "ws.id AS ".$key;
|
||||
} elseif ($key === "track_title") {
|
||||
$plSelect[] = "name AS ".$key;
|
||||
$blSelect[] = "name AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$plSelect[] = "name AS ".$key;
|
||||
$blSelect[] = "name AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$streamSelect[] = "name AS ".$key;
|
||||
} elseif ($key === "ftype") {
|
||||
$plSelect[] = "'playlist'::varchar AS ".$key;
|
||||
$blSelect[] = "'block'::varchar AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$plSelect[] = "'playlist'::varchar AS ".$key;
|
||||
$blSelect[] = "'block'::varchar AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$streamSelect[] = "'stream'::varchar AS ".$key;
|
||||
} elseif ($key === "artist_name") {
|
||||
$plSelect[] = "login AS ".$key;
|
||||
$blSelect[] = "login AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$plSelect[] = "login AS ".$key;
|
||||
$blSelect[] = "login AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$streamSelect[] = "login AS ".$key;
|
||||
}
|
||||
//same columns in each table.
|
||||
|
@ -635,26 +669,26 @@ class Application_Model_StoredFile
|
|||
}
|
||||
//need to cast certain data as ints for the union to search on.
|
||||
else if (in_array($key, array("track_number", "bit_rate", "sample_rate", "bpm"))) {
|
||||
$plSelect[] = "NULL::int AS ".$key;
|
||||
$blSelect[] = "NULL::int AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$plSelect[] = "NULL::int AS ".$key;
|
||||
$blSelect[] = "NULL::int AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$streamSelect[] = "NULL::int AS ".$key;
|
||||
} else if ($key === "filepath") {
|
||||
$plSelect[] = "NULL::VARCHAR AS ".$key;
|
||||
$blSelect[] = "NULL::VARCHAR AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$plSelect[] = "NULL::VARCHAR AS ".$key;
|
||||
$blSelect[] = "NULL::VARCHAR AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$streamSelect[] = "url AS ".$key;
|
||||
} else {
|
||||
$plSelect[] = "NULL::text AS ".$key;
|
||||
$blSelect[] = "NULL::text AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$plSelect[] = "NULL::text AS ".$key;
|
||||
$blSelect[] = "NULL::text AS ".$key;
|
||||
$fileSelect[] = $key;
|
||||
$streamSelect[] = "NULL::text AS ".$key;
|
||||
}
|
||||
}
|
||||
|
||||
$plSelect = "SELECT ". join(",", $plSelect);
|
||||
$blSelect = "SELECT ". join(",", $blSelect);
|
||||
$fileSelect = "SELECT ". join(",", $fileSelect);
|
||||
$plSelect = "SELECT ". join(",", $plSelect);
|
||||
$blSelect = "SELECT ". join(",", $blSelect);
|
||||
$fileSelect = "SELECT ". join(",", $fileSelect);
|
||||
$streamSelect = "SELECT ". join(",", $streamSelect);
|
||||
|
||||
$type = intval($datatables["type"]);
|
||||
|
@ -750,7 +784,7 @@ class Application_Model_StoredFile
|
|||
|
||||
// Settings
|
||||
$cleanupTargetDir = false; // Remove old files
|
||||
$maxFileAge = 60 * 60; // Temp file age in seconds
|
||||
$maxFileAge = 60 * 60; // Temp file age in seconds
|
||||
|
||||
// 5 minutes execution time
|
||||
@set_time_limit(5 * 60);
|
||||
|
@ -873,34 +907,49 @@ class Application_Model_StoredFile
|
|||
if(!self::isEnoughDiskSpaceToCopy($stor, $audio_file)) {
|
||||
$freeSpace = disk_free_space($stor);
|
||||
return array("code" => 107,
|
||||
"message" => "The file was not uploaded, there is
|
||||
".$freeSpace."MB of disk space left and the file you are
|
||||
uploading has a size of ".$fileSize."MB.");
|
||||
"message" => "The file was not uploaded, there is
|
||||
".$freeSpace."MB of disk space left and the file you are
|
||||
uploading has a size of ".$fileSize."MB.");
|
||||
}
|
||||
|
||||
// Check if liquidsoap can play this file
|
||||
if(!self::liquidsoapFilePlayabilityTest($audio_file)) {
|
||||
return array(
|
||||
"code" => 110,
|
||||
"message" => "This file appears to be corrupted and will not
|
||||
"code" => 110,
|
||||
"message" => "This file appears to be corrupted and will not
|
||||
be added to media library.");
|
||||
}
|
||||
|
||||
// Did all the checks for realz, now trying to copy
|
||||
$audio_stor = Application_Common_OsPath::join($stor, "organize", $fileName);
|
||||
$uid = Application_Model_User::getCurrentUser()->getId();
|
||||
$id_file = "$audio_stor.identifier";
|
||||
if (file_put_contents($id_file,$uid) === false) {
|
||||
Logging::info("Could not write file to identify user: '$uid'");
|
||||
Logging::info("Id file path: '$id_file'");
|
||||
Logging::info("Defaulting to admin (no identification file was
|
||||
written)");
|
||||
} else {
|
||||
Logging::info("Successfully written identification file for
|
||||
uploaded '$audio_stor'");
|
||||
}
|
||||
Logging::info("copyFileToStor: moving file $audio_file to $audio_stor");
|
||||
//Martin K.: changed to rename: Much less load + quicker since this is an atomic operation
|
||||
// Martin K.: changed to rename: Much less load + quicker since this is
|
||||
// an atomic operation
|
||||
if (@rename($audio_file, $audio_stor) === false) {
|
||||
#something went wrong likely there wasn't enough space in the audio_stor to move the file too.
|
||||
#warn the user that the file wasn't uploaded and they should check if there is enough disk space.
|
||||
unlink($audio_file);//remove the file after failed rename
|
||||
//something went wrong likely there wasn't enough space in the audio_stor to move the file too.
|
||||
//warn the user that the file wasn't uploaded and they should check if there is enough disk space.
|
||||
unlink($audio_file); //remove the file after failed rename
|
||||
unlink($id_file); // Also remove the identifier file
|
||||
return array(
|
||||
"code" => 108,
|
||||
"code" => 108,
|
||||
"message" => "
|
||||
The file was not uploaded, this error can occur if the computer
|
||||
hard drive does not have enough disk space or the stor
|
||||
directory does not have correct write permissions. ");
|
||||
directory does not have correct write permissions.");
|
||||
}
|
||||
// Now that we successfully added this file, we will add another tag
|
||||
// file that will identify the user that owns it
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -238,28 +238,28 @@ class Application_Model_User
|
|||
return $user;
|
||||
}
|
||||
|
||||
public static function getUsers($type, $search=null)
|
||||
public static function getUsersOfType($type) {
|
||||
return CcSubjsQuery::create()->filterByDbType($type)->find();
|
||||
}
|
||||
public static function getUsers(array $type, $search=null)
|
||||
{
|
||||
$con = Propel::getConnection();
|
||||
$con = Propel::getConnection();
|
||||
|
||||
$sql_gen = "SELECT login AS value, login AS label, id as index FROM cc_subjs ";
|
||||
$sql = $sql_gen;
|
||||
$sql = $sql_gen;
|
||||
|
||||
if (is_array($type)) {
|
||||
for ($i=0; $i<count($type); $i++) {
|
||||
$type[$i] = "type = '{$type[$i]}'";
|
||||
}
|
||||
$sql_type = join(" OR ", $type);
|
||||
} else {
|
||||
$sql_type = "type = {$type}";
|
||||
}
|
||||
$type = array_map( function($t) {
|
||||
return "type = '{$t}'";
|
||||
}, $type);
|
||||
|
||||
$sql = $sql_gen ." WHERE (". $sql_type.") ";
|
||||
$sql_type = join(" OR ", $type);
|
||||
|
||||
$sql = $sql_gen ." WHERE (". $sql_type.") ";
|
||||
|
||||
if (!is_null($search)) {
|
||||
$like = "login ILIKE '%{$search}%'";
|
||||
|
||||
$sql = $sql . " AND ".$like;
|
||||
$sql = $sql . " AND ".$like;
|
||||
}
|
||||
|
||||
$sql = $sql ." ORDER BY login";
|
||||
|
@ -345,16 +345,14 @@ class Application_Model_User
|
|||
|
||||
if (is_null($userinfo)) {
|
||||
return null;
|
||||
} else {
|
||||
try {
|
||||
return new self($userinfo->id);
|
||||
} catch (Exception $e) {
|
||||
//we get here if $userinfo->id is defined, but doesn't exist
|
||||
//in the database anymore.
|
||||
Zend_Auth::getInstance()->clearIdentity();
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
try {
|
||||
return new self($userinfo->id);
|
||||
} catch (Exception $e) {
|
||||
//we get here if $userinfo->id is defined, but doesn't exist
|
||||
//in the database anymore.
|
||||
Zend_Auth::getInstance()->clearIdentity();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,6 +101,7 @@ class CcFilesTableMap extends TableMap {
|
|||
$this->addColumn('SOUNDCLOUD_LINK_TO_FILE', 'DbSoundcloudLinkToFile', 'VARCHAR', false, 4096, null);
|
||||
$this->addColumn('SOUNDCLOUD_UPLOAD_TIME', 'DbSoundCloundUploadTime', 'TIMESTAMP', false, 6, null);
|
||||
$this->addColumn('REPLAY_GAIN', 'DbReplayGain', 'VARCHAR', false, 16, null);
|
||||
$this->addForeignKey('OWNER_ID', 'DbOwnerId', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
|
@ -109,7 +110,8 @@ class CcFilesTableMap extends TableMap {
|
|||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('editedby' => 'id', ), null, null);
|
||||
$this->addRelation('FkOwner', 'CcSubjs', RelationMap::MANY_TO_ONE, array('owner_id' => 'id', ), null, null);
|
||||
$this->addRelation('CcSubjsRelatedByDbEditedby', 'CcSubjs', RelationMap::MANY_TO_ONE, array('editedby' => 'id', ), null, null);
|
||||
$this->addRelation('CcMusicDirs', 'CcMusicDirs', RelationMap::MANY_TO_ONE, array('directory' => 'id', ), null, null);
|
||||
$this->addRelation('CcShowInstances', 'CcShowInstances', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null);
|
||||
|
|
|
@ -45,7 +45,6 @@ class CcPlaylistTableMap extends TableMap {
|
|||
$this->addForeignKey('CREATOR_ID', 'DbCreatorId', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
|
||||
$this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('LENGTH', 'DbLength', 'VARCHAR', false, null, '00:00:00');
|
||||
$this->addColumn('TYPE', 'DbType', 'VARCHAR', false, 7, 'static');
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
|
|
|
@ -59,7 +59,8 @@ class CcSubjsTableMap extends TableMap {
|
|||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcFiles', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'editedby', ), null, null);
|
||||
$this->addRelation('CcFilesRelatedByDbOwnerId', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'owner_id', ), null, null);
|
||||
$this->addRelation('CcFilesRelatedByDbEditedby', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'editedby', ), null, null);
|
||||
$this->addRelation('CcPerms', 'CcPerms', RelationMap::ONE_TO_MANY, array('id' => 'subj', ), 'CASCADE', null);
|
||||
$this->addRelation('CcShowHosts', 'CcShowHosts', RelationMap::ONE_TO_MANY, array('id' => 'subjs_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::ONE_TO_MANY, array('id' => 'creator_id', ), null, null);
|
||||
|
|
|
@ -410,10 +410,21 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $replay_gain;
|
||||
|
||||
/**
|
||||
* The value for the owner_id field.
|
||||
* @var int
|
||||
*/
|
||||
protected $owner_id;
|
||||
|
||||
/**
|
||||
* @var CcSubjs
|
||||
*/
|
||||
protected $aCcSubjs;
|
||||
protected $aFkOwner;
|
||||
|
||||
/**
|
||||
* @var CcSubjs
|
||||
*/
|
||||
protected $aCcSubjsRelatedByDbEditedby;
|
||||
|
||||
/**
|
||||
* @var CcMusicDirs
|
||||
|
@ -1204,6 +1215,16 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
return $this->replay_gain;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [owner_id] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDbOwnerId()
|
||||
{
|
||||
return $this->owner_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [id] column.
|
||||
*
|
||||
|
@ -1385,8 +1406,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$this->modifiedColumns[] = CcFilesPeer::EDITEDBY;
|
||||
}
|
||||
|
||||
if ($this->aCcSubjs !== null && $this->aCcSubjs->getDbId() !== $v) {
|
||||
$this->aCcSubjs = null;
|
||||
if ($this->aCcSubjsRelatedByDbEditedby !== null && $this->aCcSubjsRelatedByDbEditedby->getDbId() !== $v) {
|
||||
$this->aCcSubjsRelatedByDbEditedby = null;
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -2588,6 +2609,30 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbReplayGain()
|
||||
|
||||
/**
|
||||
* Set the value of [owner_id] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return CcFiles The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbOwnerId($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->owner_id !== $v) {
|
||||
$this->owner_id = $v;
|
||||
$this->modifiedColumns[] = CcFilesPeer::OWNER_ID;
|
||||
}
|
||||
|
||||
if ($this->aFkOwner !== null && $this->aFkOwner->getDbId() !== $v) {
|
||||
$this->aFkOwner = null;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbOwnerId()
|
||||
|
||||
/**
|
||||
* Indicates whether the columns in this object are only set to default values.
|
||||
*
|
||||
|
@ -2715,6 +2760,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$this->soundcloud_link_to_file = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null;
|
||||
$this->soundcloud_upload_time = ($row[$startcol + 61] !== null) ? (string) $row[$startcol + 61] : null;
|
||||
$this->replay_gain = ($row[$startcol + 62] !== null) ? (string) $row[$startcol + 62] : null;
|
||||
$this->owner_id = ($row[$startcol + 63] !== null) ? (int) $row[$startcol + 63] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -2723,7 +2769,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 63; // 63 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 64; // 64 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating CcFiles object", $e);
|
||||
|
@ -2749,8 +2795,11 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
if ($this->aCcMusicDirs !== null && $this->directory !== $this->aCcMusicDirs->getId()) {
|
||||
$this->aCcMusicDirs = null;
|
||||
}
|
||||
if ($this->aCcSubjs !== null && $this->editedby !== $this->aCcSubjs->getDbId()) {
|
||||
$this->aCcSubjs = null;
|
||||
if ($this->aCcSubjsRelatedByDbEditedby !== null && $this->editedby !== $this->aCcSubjsRelatedByDbEditedby->getDbId()) {
|
||||
$this->aCcSubjsRelatedByDbEditedby = null;
|
||||
}
|
||||
if ($this->aFkOwner !== null && $this->owner_id !== $this->aFkOwner->getDbId()) {
|
||||
$this->aFkOwner = null;
|
||||
}
|
||||
} // ensureConsistency
|
||||
|
||||
|
@ -2791,7 +2840,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
|
||||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->aCcSubjs = null;
|
||||
$this->aFkOwner = null;
|
||||
$this->aCcSubjsRelatedByDbEditedby = null;
|
||||
$this->aCcMusicDirs = null;
|
||||
$this->collCcShowInstancess = null;
|
||||
|
||||
|
@ -2916,11 +2966,18 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
// method. This object relates to these object(s) by a
|
||||
// foreign key reference.
|
||||
|
||||
if ($this->aCcSubjs !== null) {
|
||||
if ($this->aCcSubjs->isModified() || $this->aCcSubjs->isNew()) {
|
||||
$affectedRows += $this->aCcSubjs->save($con);
|
||||
if ($this->aFkOwner !== null) {
|
||||
if ($this->aFkOwner->isModified() || $this->aFkOwner->isNew()) {
|
||||
$affectedRows += $this->aFkOwner->save($con);
|
||||
}
|
||||
$this->setCcSubjs($this->aCcSubjs);
|
||||
$this->setFkOwner($this->aFkOwner);
|
||||
}
|
||||
|
||||
if ($this->aCcSubjsRelatedByDbEditedby !== null) {
|
||||
if ($this->aCcSubjsRelatedByDbEditedby->isModified() || $this->aCcSubjsRelatedByDbEditedby->isNew()) {
|
||||
$affectedRows += $this->aCcSubjsRelatedByDbEditedby->save($con);
|
||||
}
|
||||
$this->setCcSubjsRelatedByDbEditedby($this->aCcSubjsRelatedByDbEditedby);
|
||||
}
|
||||
|
||||
if ($this->aCcMusicDirs !== null) {
|
||||
|
@ -3056,9 +3113,15 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
// method. This object relates to these object(s) by a
|
||||
// foreign key reference.
|
||||
|
||||
if ($this->aCcSubjs !== null) {
|
||||
if (!$this->aCcSubjs->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $this->aCcSubjs->getValidationFailures());
|
||||
if ($this->aFkOwner !== null) {
|
||||
if (!$this->aFkOwner->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $this->aFkOwner->getValidationFailures());
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->aCcSubjsRelatedByDbEditedby !== null) {
|
||||
if (!$this->aCcSubjsRelatedByDbEditedby->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $this->aCcSubjsRelatedByDbEditedby->getValidationFailures());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3328,6 +3391,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
case 62:
|
||||
return $this->getDbReplayGain();
|
||||
break;
|
||||
case 63:
|
||||
return $this->getDbOwnerId();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
|
@ -3415,10 +3481,14 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$keys[60] => $this->getDbSoundcloudLinkToFile(),
|
||||
$keys[61] => $this->getDbSoundCloundUploadTime(),
|
||||
$keys[62] => $this->getDbReplayGain(),
|
||||
$keys[63] => $this->getDbOwnerId(),
|
||||
);
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->aCcSubjs) {
|
||||
$result['CcSubjs'] = $this->aCcSubjs->toArray($keyType, $includeLazyLoadColumns, true);
|
||||
if (null !== $this->aFkOwner) {
|
||||
$result['FkOwner'] = $this->aFkOwner->toArray($keyType, $includeLazyLoadColumns, true);
|
||||
}
|
||||
if (null !== $this->aCcSubjsRelatedByDbEditedby) {
|
||||
$result['CcSubjsRelatedByDbEditedby'] = $this->aCcSubjsRelatedByDbEditedby->toArray($keyType, $includeLazyLoadColumns, true);
|
||||
}
|
||||
if (null !== $this->aCcMusicDirs) {
|
||||
$result['CcMusicDirs'] = $this->aCcMusicDirs->toArray($keyType, $includeLazyLoadColumns, true);
|
||||
|
@ -3643,6 +3713,9 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
case 62:
|
||||
$this->setDbReplayGain($value);
|
||||
break;
|
||||
case 63:
|
||||
$this->setDbOwnerId($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
|
@ -3730,6 +3803,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
if (array_key_exists($keys[60], $arr)) $this->setDbSoundcloudLinkToFile($arr[$keys[60]]);
|
||||
if (array_key_exists($keys[61], $arr)) $this->setDbSoundCloundUploadTime($arr[$keys[61]]);
|
||||
if (array_key_exists($keys[62], $arr)) $this->setDbReplayGain($arr[$keys[62]]);
|
||||
if (array_key_exists($keys[63], $arr)) $this->setDbOwnerId($arr[$keys[63]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3804,6 +3878,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE)) $criteria->add(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE, $this->soundcloud_link_to_file);
|
||||
if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME)) $criteria->add(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME, $this->soundcloud_upload_time);
|
||||
if ($this->isColumnModified(CcFilesPeer::REPLAY_GAIN)) $criteria->add(CcFilesPeer::REPLAY_GAIN, $this->replay_gain);
|
||||
if ($this->isColumnModified(CcFilesPeer::OWNER_ID)) $criteria->add(CcFilesPeer::OWNER_ID, $this->owner_id);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
@ -3927,6 +4002,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$copyObj->setDbSoundcloudLinkToFile($this->soundcloud_link_to_file);
|
||||
$copyObj->setDbSoundCloundUploadTime($this->soundcloud_upload_time);
|
||||
$copyObj->setDbReplayGain($this->replay_gain);
|
||||
$copyObj->setDbOwnerId($this->owner_id);
|
||||
|
||||
if ($deepCopy) {
|
||||
// important: temporarily setNew(false) because this affects the behavior of
|
||||
|
@ -4009,20 +4085,20 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
* @return CcFiles The current object (for fluent API support)
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function setCcSubjs(CcSubjs $v = null)
|
||||
public function setFkOwner(CcSubjs $v = null)
|
||||
{
|
||||
if ($v === null) {
|
||||
$this->setDbEditedby(NULL);
|
||||
$this->setDbOwnerId(NULL);
|
||||
} else {
|
||||
$this->setDbEditedby($v->getDbId());
|
||||
$this->setDbOwnerId($v->getDbId());
|
||||
}
|
||||
|
||||
$this->aCcSubjs = $v;
|
||||
$this->aFkOwner = $v;
|
||||
|
||||
// Add binding for other direction of this n:n relationship.
|
||||
// If this object has already been added to the CcSubjs object, it will not be re-added.
|
||||
if ($v !== null) {
|
||||
$v->addCcFiles($this);
|
||||
$v->addCcFilesRelatedByDbOwnerId($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -4036,19 +4112,68 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
* @return CcSubjs The associated CcSubjs object.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCcSubjs(PropelPDO $con = null)
|
||||
public function getFkOwner(PropelPDO $con = null)
|
||||
{
|
||||
if ($this->aCcSubjs === null && ($this->editedby !== null)) {
|
||||
$this->aCcSubjs = CcSubjsQuery::create()->findPk($this->editedby, $con);
|
||||
if ($this->aFkOwner === null && ($this->owner_id !== null)) {
|
||||
$this->aFkOwner = CcSubjsQuery::create()->findPk($this->owner_id, $con);
|
||||
/* The following can be used additionally to
|
||||
guarantee the related object contains a reference
|
||||
to this object. This level of coupling may, however, be
|
||||
undesirable since it could result in an only partially populated collection
|
||||
in the referenced object.
|
||||
$this->aCcSubjs->addCcFiless($this);
|
||||
$this->aFkOwner->addCcFilessRelatedByDbOwnerId($this);
|
||||
*/
|
||||
}
|
||||
return $this->aCcSubjs;
|
||||
return $this->aFkOwner;
|
||||
}
|
||||
|
||||
/**
|
||||
* Declares an association between this object and a CcSubjs object.
|
||||
*
|
||||
* @param CcSubjs $v
|
||||
* @return CcFiles The current object (for fluent API support)
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function setCcSubjsRelatedByDbEditedby(CcSubjs $v = null)
|
||||
{
|
||||
if ($v === null) {
|
||||
$this->setDbEditedby(NULL);
|
||||
} else {
|
||||
$this->setDbEditedby($v->getDbId());
|
||||
}
|
||||
|
||||
$this->aCcSubjsRelatedByDbEditedby = $v;
|
||||
|
||||
// Add binding for other direction of this n:n relationship.
|
||||
// If this object has already been added to the CcSubjs object, it will not be re-added.
|
||||
if ($v !== null) {
|
||||
$v->addCcFilesRelatedByDbEditedby($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the associated CcSubjs object
|
||||
*
|
||||
* @param PropelPDO Optional Connection object.
|
||||
* @return CcSubjs The associated CcSubjs object.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCcSubjsRelatedByDbEditedby(PropelPDO $con = null)
|
||||
{
|
||||
if ($this->aCcSubjsRelatedByDbEditedby === null && ($this->editedby !== null)) {
|
||||
$this->aCcSubjsRelatedByDbEditedby = CcSubjsQuery::create()->findPk($this->editedby, $con);
|
||||
/* The following can be used additionally to
|
||||
guarantee the related object contains a reference
|
||||
to this object. This level of coupling may, however, be
|
||||
undesirable since it could result in an only partially populated collection
|
||||
in the referenced object.
|
||||
$this->aCcSubjsRelatedByDbEditedby->addCcFilessRelatedByDbEditedby($this);
|
||||
*/
|
||||
}
|
||||
return $this->aCcSubjsRelatedByDbEditedby;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4779,6 +4904,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$this->soundcloud_link_to_file = null;
|
||||
$this->soundcloud_upload_time = null;
|
||||
$this->replay_gain = null;
|
||||
$this->owner_id = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->alreadyInValidation = false;
|
||||
$this->clearAllReferences();
|
||||
|
@ -4826,7 +4952,8 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
|
|||
$this->collCcPlaylistcontentss = null;
|
||||
$this->collCcBlockcontentss = null;
|
||||
$this->collCcSchedules = null;
|
||||
$this->aCcSubjs = null;
|
||||
$this->aFkOwner = null;
|
||||
$this->aCcSubjsRelatedByDbEditedby = null;
|
||||
$this->aCcMusicDirs = null;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ abstract class BaseCcFilesPeer {
|
|||
const TM_CLASS = 'CcFilesTableMap';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 63;
|
||||
const NUM_COLUMNS = 64;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
@ -220,6 +220,9 @@ abstract class BaseCcFilesPeer {
|
|||
/** the column name for the REPLAY_GAIN field */
|
||||
const REPLAY_GAIN = 'cc_files.REPLAY_GAIN';
|
||||
|
||||
/** the column name for the OWNER_ID field */
|
||||
const OWNER_ID = 'cc_files.OWNER_ID';
|
||||
|
||||
/**
|
||||
* An identiy map to hold any loaded instances of CcFiles objects.
|
||||
* This must be public so that other peer classes can access this when hydrating from JOIN
|
||||
|
@ -236,12 +239,12 @@ abstract class BaseCcFilesPeer {
|
|||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExists', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', 'DbSoundCloundUploadTime', 'DbReplayGain', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExists', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', 'dbSoundCloundUploadTime', 'dbReplayGain', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXISTS, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, self::SOUNDCLOUD_UPLOAD_TIME, self::REPLAY_GAIN, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXISTS', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', 'SOUNDCLOUD_UPLOAD_TIME', 'REPLAY_GAIN', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exists', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', 'soundcloud_upload_time', 'replay_gain', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExists', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', 'DbSoundCloundUploadTime', 'DbReplayGain', 'DbOwnerId', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExists', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', 'dbSoundCloundUploadTime', 'dbReplayGain', 'dbOwnerId', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXISTS, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, self::SOUNDCLOUD_UPLOAD_TIME, self::REPLAY_GAIN, self::OWNER_ID, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXISTS', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', 'SOUNDCLOUD_UPLOAD_TIME', 'REPLAY_GAIN', 'OWNER_ID', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exists', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', 'soundcloud_upload_time', 'replay_gain', 'owner_id', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -251,12 +254,12 @@ abstract class BaseCcFilesPeer {
|
|||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbMime' => 2, 'DbFtype' => 3, 'DbDirectory' => 4, 'DbFilepath' => 5, 'DbState' => 6, 'DbCurrentlyaccessing' => 7, 'DbEditedby' => 8, 'DbMtime' => 9, 'DbUtime' => 10, 'DbLPtime' => 11, 'DbMd5' => 12, 'DbTrackTitle' => 13, 'DbArtistName' => 14, 'DbBitRate' => 15, 'DbSampleRate' => 16, 'DbFormat' => 17, 'DbLength' => 18, 'DbAlbumTitle' => 19, 'DbGenre' => 20, 'DbComments' => 21, 'DbYear' => 22, 'DbTrackNumber' => 23, 'DbChannels' => 24, 'DbUrl' => 25, 'DbBpm' => 26, 'DbRating' => 27, 'DbEncodedBy' => 28, 'DbDiscNumber' => 29, 'DbMood' => 30, 'DbLabel' => 31, 'DbComposer' => 32, 'DbEncoder' => 33, 'DbChecksum' => 34, 'DbLyrics' => 35, 'DbOrchestra' => 36, 'DbConductor' => 37, 'DbLyricist' => 38, 'DbOriginalLyricist' => 39, 'DbRadioStationName' => 40, 'DbInfoUrl' => 41, 'DbArtistUrl' => 42, 'DbAudioSourceUrl' => 43, 'DbRadioStationUrl' => 44, 'DbBuyThisUrl' => 45, 'DbIsrcNumber' => 46, 'DbCatalogNumber' => 47, 'DbOriginalArtist' => 48, 'DbCopyright' => 49, 'DbReportDatetime' => 50, 'DbReportLocation' => 51, 'DbReportOrganization' => 52, 'DbSubject' => 53, 'DbContributor' => 54, 'DbLanguage' => 55, 'DbFileExists' => 56, 'DbSoundcloudId' => 57, 'DbSoundcloudErrorCode' => 58, 'DbSoundcloudErrorMsg' => 59, 'DbSoundcloudLinkToFile' => 60, 'DbSoundCloundUploadTime' => 61, 'DbReplayGain' => 62, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbMime' => 2, 'dbFtype' => 3, 'dbDirectory' => 4, 'dbFilepath' => 5, 'dbState' => 6, 'dbCurrentlyaccessing' => 7, 'dbEditedby' => 8, 'dbMtime' => 9, 'dbUtime' => 10, 'dbLPtime' => 11, 'dbMd5' => 12, 'dbTrackTitle' => 13, 'dbArtistName' => 14, 'dbBitRate' => 15, 'dbSampleRate' => 16, 'dbFormat' => 17, 'dbLength' => 18, 'dbAlbumTitle' => 19, 'dbGenre' => 20, 'dbComments' => 21, 'dbYear' => 22, 'dbTrackNumber' => 23, 'dbChannels' => 24, 'dbUrl' => 25, 'dbBpm' => 26, 'dbRating' => 27, 'dbEncodedBy' => 28, 'dbDiscNumber' => 29, 'dbMood' => 30, 'dbLabel' => 31, 'dbComposer' => 32, 'dbEncoder' => 33, 'dbChecksum' => 34, 'dbLyrics' => 35, 'dbOrchestra' => 36, 'dbConductor' => 37, 'dbLyricist' => 38, 'dbOriginalLyricist' => 39, 'dbRadioStationName' => 40, 'dbInfoUrl' => 41, 'dbArtistUrl' => 42, 'dbAudioSourceUrl' => 43, 'dbRadioStationUrl' => 44, 'dbBuyThisUrl' => 45, 'dbIsrcNumber' => 46, 'dbCatalogNumber' => 47, 'dbOriginalArtist' => 48, 'dbCopyright' => 49, 'dbReportDatetime' => 50, 'dbReportLocation' => 51, 'dbReportOrganization' => 52, 'dbSubject' => 53, 'dbContributor' => 54, 'dbLanguage' => 55, 'dbFileExists' => 56, 'dbSoundcloudId' => 57, 'dbSoundcloudErrorCode' => 58, 'dbSoundcloudErrorMsg' => 59, 'dbSoundcloudLinkToFile' => 60, 'dbSoundCloundUploadTime' => 61, 'dbReplayGain' => 62, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::MIME => 2, self::FTYPE => 3, self::DIRECTORY => 4, self::FILEPATH => 5, self::STATE => 6, self::CURRENTLYACCESSING => 7, self::EDITEDBY => 8, self::MTIME => 9, self::UTIME => 10, self::LPTIME => 11, self::MD5 => 12, self::TRACK_TITLE => 13, self::ARTIST_NAME => 14, self::BIT_RATE => 15, self::SAMPLE_RATE => 16, self::FORMAT => 17, self::LENGTH => 18, self::ALBUM_TITLE => 19, self::GENRE => 20, self::COMMENTS => 21, self::YEAR => 22, self::TRACK_NUMBER => 23, self::CHANNELS => 24, self::URL => 25, self::BPM => 26, self::RATING => 27, self::ENCODED_BY => 28, self::DISC_NUMBER => 29, self::MOOD => 30, self::LABEL => 31, self::COMPOSER => 32, self::ENCODER => 33, self::CHECKSUM => 34, self::LYRICS => 35, self::ORCHESTRA => 36, self::CONDUCTOR => 37, self::LYRICIST => 38, self::ORIGINAL_LYRICIST => 39, self::RADIO_STATION_NAME => 40, self::INFO_URL => 41, self::ARTIST_URL => 42, self::AUDIO_SOURCE_URL => 43, self::RADIO_STATION_URL => 44, self::BUY_THIS_URL => 45, self::ISRC_NUMBER => 46, self::CATALOG_NUMBER => 47, self::ORIGINAL_ARTIST => 48, self::COPYRIGHT => 49, self::REPORT_DATETIME => 50, self::REPORT_LOCATION => 51, self::REPORT_ORGANIZATION => 52, self::SUBJECT => 53, self::CONTRIBUTOR => 54, self::LANGUAGE => 55, self::FILE_EXISTS => 56, self::SOUNDCLOUD_ID => 57, self::SOUNDCLOUD_ERROR_CODE => 58, self::SOUNDCLOUD_ERROR_MSG => 59, self::SOUNDCLOUD_LINK_TO_FILE => 60, self::SOUNDCLOUD_UPLOAD_TIME => 61, self::REPLAY_GAIN => 62, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'MIME' => 2, 'FTYPE' => 3, 'DIRECTORY' => 4, 'FILEPATH' => 5, 'STATE' => 6, 'CURRENTLYACCESSING' => 7, 'EDITEDBY' => 8, 'MTIME' => 9, 'UTIME' => 10, 'LPTIME' => 11, 'MD5' => 12, 'TRACK_TITLE' => 13, 'ARTIST_NAME' => 14, 'BIT_RATE' => 15, 'SAMPLE_RATE' => 16, 'FORMAT' => 17, 'LENGTH' => 18, 'ALBUM_TITLE' => 19, 'GENRE' => 20, 'COMMENTS' => 21, 'YEAR' => 22, 'TRACK_NUMBER' => 23, 'CHANNELS' => 24, 'URL' => 25, 'BPM' => 26, 'RATING' => 27, 'ENCODED_BY' => 28, 'DISC_NUMBER' => 29, 'MOOD' => 30, 'LABEL' => 31, 'COMPOSER' => 32, 'ENCODER' => 33, 'CHECKSUM' => 34, 'LYRICS' => 35, 'ORCHESTRA' => 36, 'CONDUCTOR' => 37, 'LYRICIST' => 38, 'ORIGINAL_LYRICIST' => 39, 'RADIO_STATION_NAME' => 40, 'INFO_URL' => 41, 'ARTIST_URL' => 42, 'AUDIO_SOURCE_URL' => 43, 'RADIO_STATION_URL' => 44, 'BUY_THIS_URL' => 45, 'ISRC_NUMBER' => 46, 'CATALOG_NUMBER' => 47, 'ORIGINAL_ARTIST' => 48, 'COPYRIGHT' => 49, 'REPORT_DATETIME' => 50, 'REPORT_LOCATION' => 51, 'REPORT_ORGANIZATION' => 52, 'SUBJECT' => 53, 'CONTRIBUTOR' => 54, 'LANGUAGE' => 55, 'FILE_EXISTS' => 56, 'SOUNDCLOUD_ID' => 57, 'SOUNDCLOUD_ERROR_CODE' => 58, 'SOUNDCLOUD_ERROR_MSG' => 59, 'SOUNDCLOUD_LINK_TO_FILE' => 60, 'SOUNDCLOUD_UPLOAD_TIME' => 61, 'REPLAY_GAIN' => 62, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'mime' => 2, 'ftype' => 3, 'directory' => 4, 'filepath' => 5, 'state' => 6, 'currentlyaccessing' => 7, 'editedby' => 8, 'mtime' => 9, 'utime' => 10, 'lptime' => 11, 'md5' => 12, 'track_title' => 13, 'artist_name' => 14, 'bit_rate' => 15, 'sample_rate' => 16, 'format' => 17, 'length' => 18, 'album_title' => 19, 'genre' => 20, 'comments' => 21, 'year' => 22, 'track_number' => 23, 'channels' => 24, 'url' => 25, 'bpm' => 26, 'rating' => 27, 'encoded_by' => 28, 'disc_number' => 29, 'mood' => 30, 'label' => 31, 'composer' => 32, 'encoder' => 33, 'checksum' => 34, 'lyrics' => 35, 'orchestra' => 36, 'conductor' => 37, 'lyricist' => 38, 'original_lyricist' => 39, 'radio_station_name' => 40, 'info_url' => 41, 'artist_url' => 42, 'audio_source_url' => 43, 'radio_station_url' => 44, 'buy_this_url' => 45, 'isrc_number' => 46, 'catalog_number' => 47, 'original_artist' => 48, 'copyright' => 49, 'report_datetime' => 50, 'report_location' => 51, 'report_organization' => 52, 'subject' => 53, 'contributor' => 54, 'language' => 55, 'file_exists' => 56, 'soundcloud_id' => 57, 'soundcloud_error_code' => 58, 'soundcloud_error_msg' => 59, 'soundcloud_link_to_file' => 60, 'soundcloud_upload_time' => 61, 'replay_gain' => 62, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbMime' => 2, 'DbFtype' => 3, 'DbDirectory' => 4, 'DbFilepath' => 5, 'DbState' => 6, 'DbCurrentlyaccessing' => 7, 'DbEditedby' => 8, 'DbMtime' => 9, 'DbUtime' => 10, 'DbLPtime' => 11, 'DbMd5' => 12, 'DbTrackTitle' => 13, 'DbArtistName' => 14, 'DbBitRate' => 15, 'DbSampleRate' => 16, 'DbFormat' => 17, 'DbLength' => 18, 'DbAlbumTitle' => 19, 'DbGenre' => 20, 'DbComments' => 21, 'DbYear' => 22, 'DbTrackNumber' => 23, 'DbChannels' => 24, 'DbUrl' => 25, 'DbBpm' => 26, 'DbRating' => 27, 'DbEncodedBy' => 28, 'DbDiscNumber' => 29, 'DbMood' => 30, 'DbLabel' => 31, 'DbComposer' => 32, 'DbEncoder' => 33, 'DbChecksum' => 34, 'DbLyrics' => 35, 'DbOrchestra' => 36, 'DbConductor' => 37, 'DbLyricist' => 38, 'DbOriginalLyricist' => 39, 'DbRadioStationName' => 40, 'DbInfoUrl' => 41, 'DbArtistUrl' => 42, 'DbAudioSourceUrl' => 43, 'DbRadioStationUrl' => 44, 'DbBuyThisUrl' => 45, 'DbIsrcNumber' => 46, 'DbCatalogNumber' => 47, 'DbOriginalArtist' => 48, 'DbCopyright' => 49, 'DbReportDatetime' => 50, 'DbReportLocation' => 51, 'DbReportOrganization' => 52, 'DbSubject' => 53, 'DbContributor' => 54, 'DbLanguage' => 55, 'DbFileExists' => 56, 'DbSoundcloudId' => 57, 'DbSoundcloudErrorCode' => 58, 'DbSoundcloudErrorMsg' => 59, 'DbSoundcloudLinkToFile' => 60, 'DbSoundCloundUploadTime' => 61, 'DbReplayGain' => 62, 'DbOwnerId' => 63, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbMime' => 2, 'dbFtype' => 3, 'dbDirectory' => 4, 'dbFilepath' => 5, 'dbState' => 6, 'dbCurrentlyaccessing' => 7, 'dbEditedby' => 8, 'dbMtime' => 9, 'dbUtime' => 10, 'dbLPtime' => 11, 'dbMd5' => 12, 'dbTrackTitle' => 13, 'dbArtistName' => 14, 'dbBitRate' => 15, 'dbSampleRate' => 16, 'dbFormat' => 17, 'dbLength' => 18, 'dbAlbumTitle' => 19, 'dbGenre' => 20, 'dbComments' => 21, 'dbYear' => 22, 'dbTrackNumber' => 23, 'dbChannels' => 24, 'dbUrl' => 25, 'dbBpm' => 26, 'dbRating' => 27, 'dbEncodedBy' => 28, 'dbDiscNumber' => 29, 'dbMood' => 30, 'dbLabel' => 31, 'dbComposer' => 32, 'dbEncoder' => 33, 'dbChecksum' => 34, 'dbLyrics' => 35, 'dbOrchestra' => 36, 'dbConductor' => 37, 'dbLyricist' => 38, 'dbOriginalLyricist' => 39, 'dbRadioStationName' => 40, 'dbInfoUrl' => 41, 'dbArtistUrl' => 42, 'dbAudioSourceUrl' => 43, 'dbRadioStationUrl' => 44, 'dbBuyThisUrl' => 45, 'dbIsrcNumber' => 46, 'dbCatalogNumber' => 47, 'dbOriginalArtist' => 48, 'dbCopyright' => 49, 'dbReportDatetime' => 50, 'dbReportLocation' => 51, 'dbReportOrganization' => 52, 'dbSubject' => 53, 'dbContributor' => 54, 'dbLanguage' => 55, 'dbFileExists' => 56, 'dbSoundcloudId' => 57, 'dbSoundcloudErrorCode' => 58, 'dbSoundcloudErrorMsg' => 59, 'dbSoundcloudLinkToFile' => 60, 'dbSoundCloundUploadTime' => 61, 'dbReplayGain' => 62, 'dbOwnerId' => 63, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::MIME => 2, self::FTYPE => 3, self::DIRECTORY => 4, self::FILEPATH => 5, self::STATE => 6, self::CURRENTLYACCESSING => 7, self::EDITEDBY => 8, self::MTIME => 9, self::UTIME => 10, self::LPTIME => 11, self::MD5 => 12, self::TRACK_TITLE => 13, self::ARTIST_NAME => 14, self::BIT_RATE => 15, self::SAMPLE_RATE => 16, self::FORMAT => 17, self::LENGTH => 18, self::ALBUM_TITLE => 19, self::GENRE => 20, self::COMMENTS => 21, self::YEAR => 22, self::TRACK_NUMBER => 23, self::CHANNELS => 24, self::URL => 25, self::BPM => 26, self::RATING => 27, self::ENCODED_BY => 28, self::DISC_NUMBER => 29, self::MOOD => 30, self::LABEL => 31, self::COMPOSER => 32, self::ENCODER => 33, self::CHECKSUM => 34, self::LYRICS => 35, self::ORCHESTRA => 36, self::CONDUCTOR => 37, self::LYRICIST => 38, self::ORIGINAL_LYRICIST => 39, self::RADIO_STATION_NAME => 40, self::INFO_URL => 41, self::ARTIST_URL => 42, self::AUDIO_SOURCE_URL => 43, self::RADIO_STATION_URL => 44, self::BUY_THIS_URL => 45, self::ISRC_NUMBER => 46, self::CATALOG_NUMBER => 47, self::ORIGINAL_ARTIST => 48, self::COPYRIGHT => 49, self::REPORT_DATETIME => 50, self::REPORT_LOCATION => 51, self::REPORT_ORGANIZATION => 52, self::SUBJECT => 53, self::CONTRIBUTOR => 54, self::LANGUAGE => 55, self::FILE_EXISTS => 56, self::SOUNDCLOUD_ID => 57, self::SOUNDCLOUD_ERROR_CODE => 58, self::SOUNDCLOUD_ERROR_MSG => 59, self::SOUNDCLOUD_LINK_TO_FILE => 60, self::SOUNDCLOUD_UPLOAD_TIME => 61, self::REPLAY_GAIN => 62, self::OWNER_ID => 63, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'MIME' => 2, 'FTYPE' => 3, 'DIRECTORY' => 4, 'FILEPATH' => 5, 'STATE' => 6, 'CURRENTLYACCESSING' => 7, 'EDITEDBY' => 8, 'MTIME' => 9, 'UTIME' => 10, 'LPTIME' => 11, 'MD5' => 12, 'TRACK_TITLE' => 13, 'ARTIST_NAME' => 14, 'BIT_RATE' => 15, 'SAMPLE_RATE' => 16, 'FORMAT' => 17, 'LENGTH' => 18, 'ALBUM_TITLE' => 19, 'GENRE' => 20, 'COMMENTS' => 21, 'YEAR' => 22, 'TRACK_NUMBER' => 23, 'CHANNELS' => 24, 'URL' => 25, 'BPM' => 26, 'RATING' => 27, 'ENCODED_BY' => 28, 'DISC_NUMBER' => 29, 'MOOD' => 30, 'LABEL' => 31, 'COMPOSER' => 32, 'ENCODER' => 33, 'CHECKSUM' => 34, 'LYRICS' => 35, 'ORCHESTRA' => 36, 'CONDUCTOR' => 37, 'LYRICIST' => 38, 'ORIGINAL_LYRICIST' => 39, 'RADIO_STATION_NAME' => 40, 'INFO_URL' => 41, 'ARTIST_URL' => 42, 'AUDIO_SOURCE_URL' => 43, 'RADIO_STATION_URL' => 44, 'BUY_THIS_URL' => 45, 'ISRC_NUMBER' => 46, 'CATALOG_NUMBER' => 47, 'ORIGINAL_ARTIST' => 48, 'COPYRIGHT' => 49, 'REPORT_DATETIME' => 50, 'REPORT_LOCATION' => 51, 'REPORT_ORGANIZATION' => 52, 'SUBJECT' => 53, 'CONTRIBUTOR' => 54, 'LANGUAGE' => 55, 'FILE_EXISTS' => 56, 'SOUNDCLOUD_ID' => 57, 'SOUNDCLOUD_ERROR_CODE' => 58, 'SOUNDCLOUD_ERROR_MSG' => 59, 'SOUNDCLOUD_LINK_TO_FILE' => 60, 'SOUNDCLOUD_UPLOAD_TIME' => 61, 'REPLAY_GAIN' => 62, 'OWNER_ID' => 63, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'mime' => 2, 'ftype' => 3, 'directory' => 4, 'filepath' => 5, 'state' => 6, 'currentlyaccessing' => 7, 'editedby' => 8, 'mtime' => 9, 'utime' => 10, 'lptime' => 11, 'md5' => 12, 'track_title' => 13, 'artist_name' => 14, 'bit_rate' => 15, 'sample_rate' => 16, 'format' => 17, 'length' => 18, 'album_title' => 19, 'genre' => 20, 'comments' => 21, 'year' => 22, 'track_number' => 23, 'channels' => 24, 'url' => 25, 'bpm' => 26, 'rating' => 27, 'encoded_by' => 28, 'disc_number' => 29, 'mood' => 30, 'label' => 31, 'composer' => 32, 'encoder' => 33, 'checksum' => 34, 'lyrics' => 35, 'orchestra' => 36, 'conductor' => 37, 'lyricist' => 38, 'original_lyricist' => 39, 'radio_station_name' => 40, 'info_url' => 41, 'artist_url' => 42, 'audio_source_url' => 43, 'radio_station_url' => 44, 'buy_this_url' => 45, 'isrc_number' => 46, 'catalog_number' => 47, 'original_artist' => 48, 'copyright' => 49, 'report_datetime' => 50, 'report_location' => 51, 'report_organization' => 52, 'subject' => 53, 'contributor' => 54, 'language' => 55, 'file_exists' => 56, 'soundcloud_id' => 57, 'soundcloud_error_code' => 58, 'soundcloud_error_msg' => 59, 'soundcloud_link_to_file' => 60, 'soundcloud_upload_time' => 61, 'replay_gain' => 62, 'owner_id' => 63, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -391,6 +394,7 @@ abstract class BaseCcFilesPeer {
|
|||
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE);
|
||||
$criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME);
|
||||
$criteria->addSelectColumn(CcFilesPeer::REPLAY_GAIN);
|
||||
$criteria->addSelectColumn(CcFilesPeer::OWNER_ID);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.NAME');
|
||||
|
@ -455,6 +459,7 @@ abstract class BaseCcFilesPeer {
|
|||
$criteria->addSelectColumn($alias . '.SOUNDCLOUD_LINK_TO_FILE');
|
||||
$criteria->addSelectColumn($alias . '.SOUNDCLOUD_UPLOAD_TIME');
|
||||
$criteria->addSelectColumn($alias . '.REPLAY_GAIN');
|
||||
$criteria->addSelectColumn($alias . '.OWNER_ID');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -753,7 +758,7 @@ abstract class BaseCcFilesPeer {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcSubjs table
|
||||
* Returns the number of rows matching criteria, joining the related FkOwner table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
|
@ -761,7 +766,57 @@ abstract class BaseCcFilesPeer {
|
|||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinCcSubjs(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
public static function doCountJoinFkOwner(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
// we're going to modify criteria, so copy it first
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// We need to set the primary table name, since in the case that there are no WHERE columns
|
||||
// it will be impossible for the BasePeer::createSelectSql() method to determine which
|
||||
// tables go into the FROM clause.
|
||||
$criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
|
||||
|
||||
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||
$criteria->setDistinct();
|
||||
}
|
||||
|
||||
if (!$criteria->hasSelectClause()) {
|
||||
CcFilesPeer::addSelectColumns($criteria);
|
||||
}
|
||||
|
||||
$criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$count = (int) $row[0];
|
||||
} else {
|
||||
$count = 0; // no rows returned; we infer that means 0 matches.
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcSubjsRelatedByDbEditedby table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinCcSubjsRelatedByDbEditedby(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
// we're going to modify criteria, so copy it first
|
||||
$criteria = clone $criteria;
|
||||
|
@ -861,7 +916,73 @@ abstract class BaseCcFilesPeer {
|
|||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinCcSubjs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
public static function doSelectJoinFkOwner(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// Set the correct dbName if it has not been overridden
|
||||
if ($criteria->getDbName() == Propel::getDefaultDB()) {
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
CcFilesPeer::addSelectColumns($criteria);
|
||||
$startcol = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
CcSubjsPeer::addSelectColumns($criteria);
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
|
||||
if (null !== ($obj1 = CcFilesPeer::getInstanceFromPool($key1))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj1->hydrate($row, 0, true); // rehydrate
|
||||
} else {
|
||||
|
||||
$cls = CcFilesPeer::getOMClass(false);
|
||||
|
||||
$obj1 = new $cls();
|
||||
$obj1->hydrate($row);
|
||||
CcFilesPeer::addInstanceToPool($obj1, $key1);
|
||||
} // if $obj1 already loaded
|
||||
|
||||
$key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = CcSubjsPeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = CcSubjsPeer::getOMClass(false);
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol);
|
||||
CcSubjsPeer::addInstanceToPool($obj2, $key2);
|
||||
} // if obj2 already loaded
|
||||
|
||||
// Add the $obj1 (CcFiles) to $obj2 (CcSubjs)
|
||||
$obj2->addCcFilesRelatedByDbOwnerId($obj1);
|
||||
|
||||
} // if joined row was not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of CcFiles objects pre-filled with their CcSubjs objects.
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return array Array of CcFiles objects.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinCcSubjsRelatedByDbEditedby(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
|
@ -907,7 +1028,7 @@ abstract class BaseCcFilesPeer {
|
|||
} // if obj2 already loaded
|
||||
|
||||
// Add the $obj1 (CcFiles) to $obj2 (CcSubjs)
|
||||
$obj2->addCcFiles($obj1);
|
||||
$obj2->addCcFilesRelatedByDbEditedby($obj1);
|
||||
|
||||
} // if joined row was not null
|
||||
|
||||
|
@ -1020,6 +1141,8 @@ abstract class BaseCcFilesPeer {
|
|||
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
|
||||
|
@ -1060,8 +1183,13 @@ abstract class BaseCcFilesPeer {
|
|||
CcSubjsPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
CcSubjsPeer::addSelectColumns($criteria);
|
||||
$startcol4 = $startcol3 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
CcMusicDirsPeer::addSelectColumns($criteria);
|
||||
$startcol4 = $startcol3 + (CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
$startcol5 = $startcol4 + (CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
|
@ -1099,25 +1227,43 @@ abstract class BaseCcFilesPeer {
|
|||
} // if obj2 loaded
|
||||
|
||||
// Add the $obj1 (CcFiles) to the collection in $obj2 (CcSubjs)
|
||||
$obj2->addCcFiles($obj1);
|
||||
$obj2->addCcFilesRelatedByDbOwnerId($obj1);
|
||||
} // if joined row not null
|
||||
|
||||
// Add objects for joined CcSubjs rows
|
||||
|
||||
$key3 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol3);
|
||||
if ($key3 !== null) {
|
||||
$obj3 = CcSubjsPeer::getInstanceFromPool($key3);
|
||||
if (!$obj3) {
|
||||
|
||||
$cls = CcSubjsPeer::getOMClass(false);
|
||||
|
||||
$obj3 = new $cls();
|
||||
$obj3->hydrate($row, $startcol3);
|
||||
CcSubjsPeer::addInstanceToPool($obj3, $key3);
|
||||
} // if obj3 loaded
|
||||
|
||||
// Add the $obj1 (CcFiles) to the collection in $obj3 (CcSubjs)
|
||||
$obj3->addCcFilesRelatedByDbEditedby($obj1);
|
||||
} // if joined row not null
|
||||
|
||||
// Add objects for joined CcMusicDirs rows
|
||||
|
||||
$key3 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol3);
|
||||
if ($key3 !== null) {
|
||||
$obj3 = CcMusicDirsPeer::getInstanceFromPool($key3);
|
||||
if (!$obj3) {
|
||||
$key4 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol4);
|
||||
if ($key4 !== null) {
|
||||
$obj4 = CcMusicDirsPeer::getInstanceFromPool($key4);
|
||||
if (!$obj4) {
|
||||
|
||||
$cls = CcMusicDirsPeer::getOMClass(false);
|
||||
|
||||
$obj3 = new $cls();
|
||||
$obj3->hydrate($row, $startcol3);
|
||||
CcMusicDirsPeer::addInstanceToPool($obj3, $key3);
|
||||
} // if obj3 loaded
|
||||
$obj4 = new $cls();
|
||||
$obj4->hydrate($row, $startcol4);
|
||||
CcMusicDirsPeer::addInstanceToPool($obj4, $key4);
|
||||
} // if obj4 loaded
|
||||
|
||||
// Add the $obj1 (CcFiles) to the collection in $obj3 (CcMusicDirs)
|
||||
$obj3->addCcFiles($obj1);
|
||||
// Add the $obj1 (CcFiles) to the collection in $obj4 (CcMusicDirs)
|
||||
$obj4->addCcFiles($obj1);
|
||||
} // if joined row not null
|
||||
|
||||
$results[] = $obj1;
|
||||
|
@ -1128,7 +1274,7 @@ abstract class BaseCcFilesPeer {
|
|||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcSubjs table
|
||||
* Returns the number of rows matching criteria, joining the related FkOwner table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
|
@ -1136,7 +1282,57 @@ abstract class BaseCcFilesPeer {
|
|||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinAllExceptCcSubjs(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
public static function doCountJoinAllExceptFkOwner(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
// we're going to modify criteria, so copy it first
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// We need to set the primary table name, since in the case that there are no WHERE columns
|
||||
// it will be impossible for the BasePeer::createSelectSql() method to determine which
|
||||
// tables go into the FROM clause.
|
||||
$criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
|
||||
|
||||
if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||
$criteria->setDistinct();
|
||||
}
|
||||
|
||||
if (!$criteria->hasSelectClause()) {
|
||||
CcFilesPeer::addSelectColumns($criteria);
|
||||
}
|
||||
|
||||
$criteria->clearOrderByColumns(); // ORDER BY should not affect count
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$count = (int) $row[0];
|
||||
} else {
|
||||
$count = 0; // no rows returned; we infer that means 0 matches.
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of rows matching criteria, joining the related CcSubjsRelatedByDbEditedby table
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return int Number of matching rows.
|
||||
*/
|
||||
public static function doCountJoinAllExceptCcSubjsRelatedByDbEditedby(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
// we're going to modify criteria, so copy it first
|
||||
$criteria = clone $criteria;
|
||||
|
@ -1213,6 +1409,8 @@ abstract class BaseCcFilesPeer {
|
|||
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
@ -1228,7 +1426,7 @@ abstract class BaseCcFilesPeer {
|
|||
|
||||
|
||||
/**
|
||||
* Selects a collection of CcFiles objects pre-filled with all related objects except CcSubjs.
|
||||
* Selects a collection of CcFiles objects pre-filled with all related objects except FkOwner.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
|
@ -1237,7 +1435,80 @@ abstract class BaseCcFilesPeer {
|
|||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinAllExceptCcSubjs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
public static function doSelectJoinAllExceptFkOwner(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
// Set the correct dbName if it has not been overridden
|
||||
// $criteria->getDbName() will return the same object if not set to another value
|
||||
// so == check is okay and faster
|
||||
if ($criteria->getDbName() == Propel::getDefaultDB()) {
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
}
|
||||
|
||||
CcFilesPeer::addSelectColumns($criteria);
|
||||
$startcol2 = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
CcMusicDirsPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + (CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
|
||||
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
|
||||
$key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
|
||||
if (null !== ($obj1 = CcFilesPeer::getInstanceFromPool($key1))) {
|
||||
// We no longer rehydrate the object, since this can cause data loss.
|
||||
// See http://www.propelorm.org/ticket/509
|
||||
// $obj1->hydrate($row, 0, true); // rehydrate
|
||||
} else {
|
||||
$cls = CcFilesPeer::getOMClass(false);
|
||||
|
||||
$obj1 = new $cls();
|
||||
$obj1->hydrate($row);
|
||||
CcFilesPeer::addInstanceToPool($obj1, $key1);
|
||||
} // if obj1 already loaded
|
||||
|
||||
// Add objects for joined CcMusicDirs rows
|
||||
|
||||
$key2 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol2);
|
||||
if ($key2 !== null) {
|
||||
$obj2 = CcMusicDirsPeer::getInstanceFromPool($key2);
|
||||
if (!$obj2) {
|
||||
|
||||
$cls = CcMusicDirsPeer::getOMClass(false);
|
||||
|
||||
$obj2 = new $cls();
|
||||
$obj2->hydrate($row, $startcol2);
|
||||
CcMusicDirsPeer::addInstanceToPool($obj2, $key2);
|
||||
} // if $obj2 already loaded
|
||||
|
||||
// Add the $obj1 (CcFiles) to the collection in $obj2 (CcMusicDirs)
|
||||
$obj2->addCcFiles($obj1);
|
||||
|
||||
} // if joined row is not null
|
||||
|
||||
$results[] = $obj1;
|
||||
}
|
||||
$stmt->closeCursor();
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Selects a collection of CcFiles objects pre-filled with all related objects except CcSubjsRelatedByDbEditedby.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param PropelPDO $con
|
||||
* @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
|
||||
* @return array Array of CcFiles objects.
|
||||
* @throws PropelException Any exceptions caught during processing will be
|
||||
* rethrown wrapped into a PropelException.
|
||||
*/
|
||||
public static function doSelectJoinAllExceptCcSubjsRelatedByDbEditedby(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
|
||||
|
@ -1327,6 +1598,11 @@ abstract class BaseCcFilesPeer {
|
|||
CcSubjsPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
CcSubjsPeer::addSelectColumns($criteria);
|
||||
$startcol4 = $startcol3 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
|
||||
|
@ -1362,7 +1638,26 @@ abstract class BaseCcFilesPeer {
|
|||
} // if $obj2 already loaded
|
||||
|
||||
// Add the $obj1 (CcFiles) to the collection in $obj2 (CcSubjs)
|
||||
$obj2->addCcFiles($obj1);
|
||||
$obj2->addCcFilesRelatedByDbOwnerId($obj1);
|
||||
|
||||
} // if joined row is not null
|
||||
|
||||
// Add objects for joined CcSubjs rows
|
||||
|
||||
$key3 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol3);
|
||||
if ($key3 !== null) {
|
||||
$obj3 = CcSubjsPeer::getInstanceFromPool($key3);
|
||||
if (!$obj3) {
|
||||
|
||||
$cls = CcSubjsPeer::getOMClass(false);
|
||||
|
||||
$obj3 = new $cls();
|
||||
$obj3->hydrate($row, $startcol3);
|
||||
CcSubjsPeer::addInstanceToPool($obj3, $key3);
|
||||
} // if $obj3 already loaded
|
||||
|
||||
// Add the $obj1 (CcFiles) to the collection in $obj3 (CcSubjs)
|
||||
$obj3->addCcFilesRelatedByDbEditedby($obj1);
|
||||
|
||||
} // if joined row is not null
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
* @method CcFilesQuery orderByDbSoundcloudLinkToFile($order = Criteria::ASC) Order by the soundcloud_link_to_file column
|
||||
* @method CcFilesQuery orderByDbSoundCloundUploadTime($order = Criteria::ASC) Order by the soundcloud_upload_time column
|
||||
* @method CcFilesQuery orderByDbReplayGain($order = Criteria::ASC) Order by the replay_gain column
|
||||
* @method CcFilesQuery orderByDbOwnerId($order = Criteria::ASC) Order by the owner_id column
|
||||
*
|
||||
* @method CcFilesQuery groupByDbId() Group by the id column
|
||||
* @method CcFilesQuery groupByDbName() Group by the name column
|
||||
|
@ -133,14 +134,19 @@
|
|||
* @method CcFilesQuery groupByDbSoundcloudLinkToFile() Group by the soundcloud_link_to_file column
|
||||
* @method CcFilesQuery groupByDbSoundCloundUploadTime() Group by the soundcloud_upload_time column
|
||||
* @method CcFilesQuery groupByDbReplayGain() Group by the replay_gain column
|
||||
* @method CcFilesQuery groupByDbOwnerId() Group by the owner_id column
|
||||
*
|
||||
* @method CcFilesQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method CcFilesQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method CcFilesQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method CcFilesQuery leftJoinCcSubjs($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSubjs relation
|
||||
* @method CcFilesQuery rightJoinCcSubjs($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSubjs relation
|
||||
* @method CcFilesQuery innerJoinCcSubjs($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSubjs relation
|
||||
* @method CcFilesQuery leftJoinFkOwner($relationAlias = '') Adds a LEFT JOIN clause to the query using the FkOwner relation
|
||||
* @method CcFilesQuery rightJoinFkOwner($relationAlias = '') Adds a RIGHT JOIN clause to the query using the FkOwner relation
|
||||
* @method CcFilesQuery innerJoinFkOwner($relationAlias = '') Adds a INNER JOIN clause to the query using the FkOwner relation
|
||||
*
|
||||
* @method CcFilesQuery leftJoinCcSubjsRelatedByDbEditedby($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcSubjsRelatedByDbEditedby relation
|
||||
* @method CcFilesQuery rightJoinCcSubjsRelatedByDbEditedby($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcSubjsRelatedByDbEditedby relation
|
||||
* @method CcFilesQuery innerJoinCcSubjsRelatedByDbEditedby($relationAlias = '') Adds a INNER JOIN clause to the query using the CcSubjsRelatedByDbEditedby relation
|
||||
*
|
||||
* @method CcFilesQuery leftJoinCcMusicDirs($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcMusicDirs relation
|
||||
* @method CcFilesQuery rightJoinCcMusicDirs($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcMusicDirs relation
|
||||
|
@ -228,6 +234,7 @@
|
|||
* @method CcFiles findOneByDbSoundcloudLinkToFile(string $soundcloud_link_to_file) Return the first CcFiles filtered by the soundcloud_link_to_file column
|
||||
* @method CcFiles findOneByDbSoundCloundUploadTime(string $soundcloud_upload_time) Return the first CcFiles filtered by the soundcloud_upload_time column
|
||||
* @method CcFiles findOneByDbReplayGain(string $replay_gain) Return the first CcFiles filtered by the replay_gain column
|
||||
* @method CcFiles findOneByDbOwnerId(int $owner_id) Return the first CcFiles filtered by the owner_id column
|
||||
*
|
||||
* @method array findByDbId(int $id) Return CcFiles objects filtered by the id column
|
||||
* @method array findByDbName(string $name) Return CcFiles objects filtered by the name column
|
||||
|
@ -292,6 +299,7 @@
|
|||
* @method array findByDbSoundcloudLinkToFile(string $soundcloud_link_to_file) Return CcFiles objects filtered by the soundcloud_link_to_file column
|
||||
* @method array findByDbSoundCloundUploadTime(string $soundcloud_upload_time) Return CcFiles objects filtered by the soundcloud_upload_time column
|
||||
* @method array findByDbReplayGain(string $replay_gain) Return CcFiles objects filtered by the replay_gain column
|
||||
* @method array findByDbOwnerId(int $owner_id) Return CcFiles objects filtered by the owner_id column
|
||||
*
|
||||
* @package propel.generator.airtime.om
|
||||
*/
|
||||
|
@ -1903,6 +1911,37 @@ abstract class BaseCcFilesQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(CcFilesPeer::REPLAY_GAIN, $dbReplayGain, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the owner_id column
|
||||
*
|
||||
* @param int|array $dbOwnerId The value to use as filter.
|
||||
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcFilesQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbOwnerId($dbOwnerId = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbOwnerId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbOwnerId['min'])) {
|
||||
$this->addUsingAlias(CcFilesPeer::OWNER_ID, $dbOwnerId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbOwnerId['max'])) {
|
||||
$this->addUsingAlias(CcFilesPeer::OWNER_ID, $dbOwnerId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcFilesPeer::OWNER_ID, $dbOwnerId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcSubjs object
|
||||
*
|
||||
|
@ -1911,24 +1950,24 @@ abstract class BaseCcFilesQuery extends ModelCriteria
|
|||
*
|
||||
* @return CcFilesQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcSubjs($ccSubjs, $comparison = null)
|
||||
public function filterByFkOwner($ccSubjs, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcFilesPeer::EDITEDBY, $ccSubjs->getDbId(), $comparison);
|
||||
->addUsingAlias(CcFilesPeer::OWNER_ID, $ccSubjs->getDbId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcSubjs relation
|
||||
* Adds a JOIN clause to the query using the FkOwner relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcFilesQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcSubjs($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
public function joinFkOwner($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcSubjs');
|
||||
$relationMap = $tableMap->getRelation('FkOwner');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
|
@ -1943,14 +1982,14 @@ abstract class BaseCcFilesQuery extends ModelCriteria
|
|||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'CcSubjs');
|
||||
$this->addJoinObject($join, 'FkOwner');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcSubjs relation CcSubjs object
|
||||
* Use the FkOwner relation CcSubjs object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
|
@ -1960,11 +1999,75 @@ abstract class BaseCcFilesQuery extends ModelCriteria
|
|||
*
|
||||
* @return CcSubjsQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcSubjsQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
public function useFkOwnerQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcSubjs($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcSubjs', 'CcSubjsQuery');
|
||||
->joinFkOwner($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'FkOwner', 'CcSubjsQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcSubjs object
|
||||
*
|
||||
* @param CcSubjs $ccSubjs the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcFilesQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcSubjsRelatedByDbEditedby($ccSubjs, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcFilesPeer::EDITEDBY, $ccSubjs->getDbId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcSubjsRelatedByDbEditedby relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcFilesQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcSubjsRelatedByDbEditedby($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcSubjsRelatedByDbEditedby');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'CcSubjsRelatedByDbEditedby');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcSubjsRelatedByDbEditedby relation CcSubjs object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcSubjsQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcSubjsRelatedByDbEditedbyQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcSubjsRelatedByDbEditedby($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcSubjsRelatedByDbEditedby', 'CcSubjsQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -999,10 +999,35 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
|
|||
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||
* @return PropelCollection|array CcFiles[] List of CcFiles objects
|
||||
*/
|
||||
public function getCcFilessJoinCcSubjs($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
public function getCcFilessJoinFkOwner($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$query = CcFilesQuery::create(null, $criteria);
|
||||
$query->joinWith('CcSubjs', $join_behavior);
|
||||
$query->joinWith('FkOwner', $join_behavior);
|
||||
|
||||
return $this->getCcFiless($query, $con);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If this collection has already been initialized with
|
||||
* an identical criteria, it returns the collection.
|
||||
* Otherwise if this CcMusicDirs is new, it will return
|
||||
* an empty collection; or if this CcMusicDirs has previously
|
||||
* been saved, it will retrieve related CcFiless from storage.
|
||||
*
|
||||
* This method is protected by default in order to keep the public
|
||||
* api reasonable. You can provide public methods for those you
|
||||
* actually need in CcMusicDirs.
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param PropelPDO $con optional connection object
|
||||
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||
* @return PropelCollection|array CcFiles[] List of CcFiles objects
|
||||
*/
|
||||
public function getCcFilessJoinCcSubjsRelatedByDbEditedby($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$query = CcFilesQuery::create(null, $criteria);
|
||||
$query->joinWith('CcSubjsRelatedByDbEditedby', $join_behavior);
|
||||
|
||||
return $this->getCcFiless($query, $con);
|
||||
}
|
||||
|
|
|
@ -68,13 +68,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $length;
|
||||
|
||||
/**
|
||||
* The value for the type field.
|
||||
* Note: this column has a database default value of: 'static'
|
||||
* @var string
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
/**
|
||||
* @var CcSubjs
|
||||
*/
|
||||
|
@ -109,7 +102,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
{
|
||||
$this->name = '';
|
||||
$this->length = '00:00:00';
|
||||
$this->type = 'static';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -238,16 +230,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
return $this->length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [type] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDbType()
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [id] column.
|
||||
*
|
||||
|
@ -450,26 +432,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbLength()
|
||||
|
||||
/**
|
||||
* Set the value of [type] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return CcPlaylist The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbType($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->type !== $v || $this->isNew()) {
|
||||
$this->type = $v;
|
||||
$this->modifiedColumns[] = CcPlaylistPeer::TYPE;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbType()
|
||||
|
||||
/**
|
||||
* Indicates whether the columns in this object are only set to default values.
|
||||
*
|
||||
|
@ -488,10 +450,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
return false;
|
||||
}
|
||||
|
||||
if ($this->type !== 'static') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// otherwise, everything was equal, so return TRUE
|
||||
return true;
|
||||
} // hasOnlyDefaultValues()
|
||||
|
@ -521,7 +479,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
$this->creator_id = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
|
||||
$this->description = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
|
||||
$this->length = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
|
||||
$this->type = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -530,7 +487,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 8; // 8 = CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 7; // 7 = CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating CcPlaylist object", $e);
|
||||
|
@ -896,9 +853,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
case 6:
|
||||
return $this->getDbLength();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getDbType();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
|
@ -930,7 +884,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
$keys[4] => $this->getDbCreatorId(),
|
||||
$keys[5] => $this->getDbDescription(),
|
||||
$keys[6] => $this->getDbLength(),
|
||||
$keys[7] => $this->getDbType(),
|
||||
);
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->aCcSubjs) {
|
||||
|
@ -988,9 +941,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
case 6:
|
||||
$this->setDbLength($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setDbType($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
|
@ -1022,7 +972,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
if (array_key_exists($keys[4], $arr)) $this->setDbCreatorId($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setDbDescription($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setDbLength($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setDbType($arr[$keys[7]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1041,7 +990,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
if ($this->isColumnModified(CcPlaylistPeer::CREATOR_ID)) $criteria->add(CcPlaylistPeer::CREATOR_ID, $this->creator_id);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::DESCRIPTION)) $criteria->add(CcPlaylistPeer::DESCRIPTION, $this->description);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::LENGTH)) $criteria->add(CcPlaylistPeer::LENGTH, $this->length);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::TYPE)) $criteria->add(CcPlaylistPeer::TYPE, $this->type);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
@ -1109,7 +1057,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
$copyObj->setDbCreatorId($this->creator_id);
|
||||
$copyObj->setDbDescription($this->description);
|
||||
$copyObj->setDbLength($this->length);
|
||||
$copyObj->setDbType($this->type);
|
||||
|
||||
if ($deepCopy) {
|
||||
// important: temporarily setNew(false) because this affects the behavior of
|
||||
|
@ -1387,7 +1334,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
$this->creator_id = null;
|
||||
$this->description = null;
|
||||
$this->length = null;
|
||||
$this->type = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->alreadyInValidation = false;
|
||||
$this->clearAllReferences();
|
||||
|
|
|
@ -26,7 +26,7 @@ abstract class BaseCcPlaylistPeer {
|
|||
const TM_CLASS = 'CcPlaylistTableMap';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 8;
|
||||
const NUM_COLUMNS = 7;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
@ -52,9 +52,6 @@ abstract class BaseCcPlaylistPeer {
|
|||
/** the column name for the LENGTH field */
|
||||
const LENGTH = 'cc_playlist.LENGTH';
|
||||
|
||||
/** the column name for the TYPE field */
|
||||
const TYPE = 'cc_playlist.TYPE';
|
||||
|
||||
/**
|
||||
* An identiy map to hold any loaded instances of CcPlaylist objects.
|
||||
* This must be public so that other peer classes can access this when hydrating from JOIN
|
||||
|
@ -71,12 +68,12 @@ abstract class BaseCcPlaylistPeer {
|
|||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbMtime', 'DbUtime', 'DbCreatorId', 'DbDescription', 'DbLength', 'DbType', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbMtime', 'dbUtime', 'dbCreatorId', 'dbDescription', 'dbLength', 'dbType', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::MTIME, self::UTIME, self::CREATOR_ID, self::DESCRIPTION, self::LENGTH, self::TYPE, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'MTIME', 'UTIME', 'CREATOR_ID', 'DESCRIPTION', 'LENGTH', 'TYPE', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'mtime', 'utime', 'creator_id', 'description', 'length', 'type', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbMtime', 'DbUtime', 'DbCreatorId', 'DbDescription', 'DbLength', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbMtime', 'dbUtime', 'dbCreatorId', 'dbDescription', 'dbLength', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::MTIME, self::UTIME, self::CREATOR_ID, self::DESCRIPTION, self::LENGTH, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'MTIME', 'UTIME', 'CREATOR_ID', 'DESCRIPTION', 'LENGTH', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'mtime', 'utime', 'creator_id', 'description', 'length', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -86,12 +83,12 @@ abstract class BaseCcPlaylistPeer {
|
|||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbMtime' => 2, 'DbUtime' => 3, 'DbCreatorId' => 4, 'DbDescription' => 5, 'DbLength' => 6, 'DbType' => 7, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbMtime' => 2, 'dbUtime' => 3, 'dbCreatorId' => 4, 'dbDescription' => 5, 'dbLength' => 6, 'dbType' => 7, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::MTIME => 2, self::UTIME => 3, self::CREATOR_ID => 4, self::DESCRIPTION => 5, self::LENGTH => 6, self::TYPE => 7, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'MTIME' => 2, 'UTIME' => 3, 'CREATOR_ID' => 4, 'DESCRIPTION' => 5, 'LENGTH' => 6, 'TYPE' => 7, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'mtime' => 2, 'utime' => 3, 'creator_id' => 4, 'description' => 5, 'length' => 6, 'type' => 7, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbMtime' => 2, 'DbUtime' => 3, 'DbCreatorId' => 4, 'DbDescription' => 5, 'DbLength' => 6, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbMtime' => 2, 'dbUtime' => 3, 'dbCreatorId' => 4, 'dbDescription' => 5, 'dbLength' => 6, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::MTIME => 2, self::UTIME => 3, self::CREATOR_ID => 4, self::DESCRIPTION => 5, self::LENGTH => 6, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'MTIME' => 2, 'UTIME' => 3, 'CREATOR_ID' => 4, 'DESCRIPTION' => 5, 'LENGTH' => 6, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'mtime' => 2, 'utime' => 3, 'creator_id' => 4, 'description' => 5, 'length' => 6, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -170,7 +167,6 @@ abstract class BaseCcPlaylistPeer {
|
|||
$criteria->addSelectColumn(CcPlaylistPeer::CREATOR_ID);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::DESCRIPTION);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::LENGTH);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::TYPE);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.NAME');
|
||||
|
@ -179,7 +175,6 @@ abstract class BaseCcPlaylistPeer {
|
|||
$criteria->addSelectColumn($alias . '.CREATOR_ID');
|
||||
$criteria->addSelectColumn($alias . '.DESCRIPTION');
|
||||
$criteria->addSelectColumn($alias . '.LENGTH');
|
||||
$criteria->addSelectColumn($alias . '.TYPE');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
* @method CcPlaylistQuery orderByDbCreatorId($order = Criteria::ASC) Order by the creator_id column
|
||||
* @method CcPlaylistQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
|
||||
* @method CcPlaylistQuery orderByDbLength($order = Criteria::ASC) Order by the length column
|
||||
* @method CcPlaylistQuery orderByDbType($order = Criteria::ASC) Order by the type column
|
||||
*
|
||||
* @method CcPlaylistQuery groupByDbId() Group by the id column
|
||||
* @method CcPlaylistQuery groupByDbName() Group by the name column
|
||||
|
@ -22,7 +21,6 @@
|
|||
* @method CcPlaylistQuery groupByDbCreatorId() Group by the creator_id column
|
||||
* @method CcPlaylistQuery groupByDbDescription() Group by the description column
|
||||
* @method CcPlaylistQuery groupByDbLength() Group by the length column
|
||||
* @method CcPlaylistQuery groupByDbType() Group by the type column
|
||||
*
|
||||
* @method CcPlaylistQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method CcPlaylistQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
|
@ -46,7 +44,6 @@
|
|||
* @method CcPlaylist findOneByDbCreatorId(int $creator_id) Return the first CcPlaylist filtered by the creator_id column
|
||||
* @method CcPlaylist findOneByDbDescription(string $description) Return the first CcPlaylist filtered by the description column
|
||||
* @method CcPlaylist findOneByDbLength(string $length) Return the first CcPlaylist filtered by the length column
|
||||
* @method CcPlaylist findOneByDbType(string $type) Return the first CcPlaylist filtered by the type column
|
||||
*
|
||||
* @method array findByDbId(int $id) Return CcPlaylist objects filtered by the id column
|
||||
* @method array findByDbName(string $name) Return CcPlaylist objects filtered by the name column
|
||||
|
@ -55,7 +52,6 @@
|
|||
* @method array findByDbCreatorId(int $creator_id) Return CcPlaylist objects filtered by the creator_id column
|
||||
* @method array findByDbDescription(string $description) Return CcPlaylist objects filtered by the description column
|
||||
* @method array findByDbLength(string $length) Return CcPlaylist objects filtered by the length column
|
||||
* @method array findByDbType(string $type) Return CcPlaylist objects filtered by the type column
|
||||
*
|
||||
* @package propel.generator.airtime.om
|
||||
*/
|
||||
|
@ -341,28 +337,6 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(CcPlaylistPeer::LENGTH, $dbLength, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the type column
|
||||
*
|
||||
* @param string $dbType The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlaylistQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbType($dbType = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbType)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbType)) {
|
||||
$dbType = str_replace('*', '%', $dbType);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcPlaylistPeer::TYPE, $dbType, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcSubjs object
|
||||
*
|
||||
|
|
|
@ -111,7 +111,12 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
/**
|
||||
* @var array CcFiles[] Collection to store aggregation of CcFiles objects.
|
||||
*/
|
||||
protected $collCcFiless;
|
||||
protected $collCcFilessRelatedByDbOwnerId;
|
||||
|
||||
/**
|
||||
* @var array CcFiles[] Collection to store aggregation of CcFiles objects.
|
||||
*/
|
||||
protected $collCcFilessRelatedByDbEditedby;
|
||||
|
||||
/**
|
||||
* @var array CcPerms[] Collection to store aggregation of CcPerms objects.
|
||||
|
@ -821,7 +826,9 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
|
||||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->collCcFiless = null;
|
||||
$this->collCcFilessRelatedByDbOwnerId = null;
|
||||
|
||||
$this->collCcFilessRelatedByDbEditedby = null;
|
||||
|
||||
$this->collCcPermss = null;
|
||||
|
||||
|
@ -970,8 +977,16 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
|
||||
}
|
||||
|
||||
if ($this->collCcFiless !== null) {
|
||||
foreach ($this->collCcFiless as $referrerFK) {
|
||||
if ($this->collCcFilessRelatedByDbOwnerId !== null) {
|
||||
foreach ($this->collCcFilessRelatedByDbOwnerId as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted()) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collCcFilessRelatedByDbEditedby !== null) {
|
||||
foreach ($this->collCcFilessRelatedByDbEditedby as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted()) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
|
@ -1105,8 +1120,16 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
}
|
||||
|
||||
|
||||
if ($this->collCcFiless !== null) {
|
||||
foreach ($this->collCcFiless as $referrerFK) {
|
||||
if ($this->collCcFilessRelatedByDbOwnerId !== null) {
|
||||
foreach ($this->collCcFilessRelatedByDbOwnerId as $referrerFK) {
|
||||
if (!$referrerFK->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collCcFilessRelatedByDbEditedby !== null) {
|
||||
foreach ($this->collCcFilessRelatedByDbEditedby as $referrerFK) {
|
||||
if (!$referrerFK->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
|
||||
}
|
||||
|
@ -1487,9 +1510,15 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
// the getter/setter methods for fkey referrer objects.
|
||||
$copyObj->setNew(false);
|
||||
|
||||
foreach ($this->getCcFiless() as $relObj) {
|
||||
foreach ($this->getCcFilessRelatedByDbOwnerId() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addCcFiles($relObj->copy($deepCopy));
|
||||
$copyObj->addCcFilesRelatedByDbOwnerId($relObj->copy($deepCopy));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->getCcFilessRelatedByDbEditedby() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addCcFilesRelatedByDbEditedby($relObj->copy($deepCopy));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1581,32 +1610,32 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
}
|
||||
|
||||
/**
|
||||
* Clears out the collCcFiless collection
|
||||
* Clears out the collCcFilessRelatedByDbOwnerId collection
|
||||
*
|
||||
* This does not modify the database; however, it will remove any associated objects, causing
|
||||
* them to be refetched by subsequent calls to accessor method.
|
||||
*
|
||||
* @return void
|
||||
* @see addCcFiless()
|
||||
* @see addCcFilessRelatedByDbOwnerId()
|
||||
*/
|
||||
public function clearCcFiless()
|
||||
public function clearCcFilessRelatedByDbOwnerId()
|
||||
{
|
||||
$this->collCcFiless = null; // important to set this to NULL since that means it is uninitialized
|
||||
$this->collCcFilessRelatedByDbOwnerId = null; // important to set this to NULL since that means it is uninitialized
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the collCcFiless collection.
|
||||
* Initializes the collCcFilessRelatedByDbOwnerId collection.
|
||||
*
|
||||
* By default this just sets the collCcFiless collection to an empty array (like clearcollCcFiless());
|
||||
* By default this just sets the collCcFilessRelatedByDbOwnerId collection to an empty array (like clearcollCcFilessRelatedByDbOwnerId());
|
||||
* however, you may wish to override this method in your stub class to provide setting appropriate
|
||||
* to your application -- for example, setting the initial array to the values stored in database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initCcFiless()
|
||||
public function initCcFilessRelatedByDbOwnerId()
|
||||
{
|
||||
$this->collCcFiless = new PropelObjectCollection();
|
||||
$this->collCcFiless->setModel('CcFiles');
|
||||
$this->collCcFilessRelatedByDbOwnerId = new PropelObjectCollection();
|
||||
$this->collCcFilessRelatedByDbOwnerId->setModel('CcFiles');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1623,23 +1652,23 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
* @return PropelCollection|array CcFiles[] List of CcFiles objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCcFiless($criteria = null, PropelPDO $con = null)
|
||||
public function getCcFilessRelatedByDbOwnerId($criteria = null, PropelPDO $con = null)
|
||||
{
|
||||
if(null === $this->collCcFiless || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcFiless) {
|
||||
if(null === $this->collCcFilessRelatedByDbOwnerId || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcFilessRelatedByDbOwnerId) {
|
||||
// return empty collection
|
||||
$this->initCcFiless();
|
||||
$this->initCcFilessRelatedByDbOwnerId();
|
||||
} else {
|
||||
$collCcFiless = CcFilesQuery::create(null, $criteria)
|
||||
->filterByCcSubjs($this)
|
||||
$collCcFilessRelatedByDbOwnerId = CcFilesQuery::create(null, $criteria)
|
||||
->filterByFkOwner($this)
|
||||
->find($con);
|
||||
if (null !== $criteria) {
|
||||
return $collCcFiless;
|
||||
return $collCcFilessRelatedByDbOwnerId;
|
||||
}
|
||||
$this->collCcFiless = $collCcFiless;
|
||||
$this->collCcFilessRelatedByDbOwnerId = $collCcFilessRelatedByDbOwnerId;
|
||||
}
|
||||
}
|
||||
return $this->collCcFiless;
|
||||
return $this->collCcFilessRelatedByDbOwnerId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1651,10 +1680,10 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
* @return int Count of related CcFiles objects.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function countCcFiless(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
|
||||
public function countCcFilessRelatedByDbOwnerId(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
|
||||
{
|
||||
if(null === $this->collCcFiless || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcFiless) {
|
||||
if(null === $this->collCcFilessRelatedByDbOwnerId || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcFilessRelatedByDbOwnerId) {
|
||||
return 0;
|
||||
} else {
|
||||
$query = CcFilesQuery::create(null, $criteria);
|
||||
|
@ -1662,11 +1691,11 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
$query->distinct();
|
||||
}
|
||||
return $query
|
||||
->filterByCcSubjs($this)
|
||||
->filterByFkOwner($this)
|
||||
->count($con);
|
||||
}
|
||||
} else {
|
||||
return count($this->collCcFiless);
|
||||
return count($this->collCcFilessRelatedByDbOwnerId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1678,14 +1707,14 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function addCcFiles(CcFiles $l)
|
||||
public function addCcFilesRelatedByDbOwnerId(CcFiles $l)
|
||||
{
|
||||
if ($this->collCcFiless === null) {
|
||||
$this->initCcFiless();
|
||||
if ($this->collCcFilessRelatedByDbOwnerId === null) {
|
||||
$this->initCcFilessRelatedByDbOwnerId();
|
||||
}
|
||||
if (!$this->collCcFiless->contains($l)) { // only add it if the **same** object is not already associated
|
||||
$this->collCcFiless[]= $l;
|
||||
$l->setCcSubjs($this);
|
||||
if (!$this->collCcFilessRelatedByDbOwnerId->contains($l)) { // only add it if the **same** object is not already associated
|
||||
$this->collCcFilessRelatedByDbOwnerId[]= $l;
|
||||
$l->setFkOwner($this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1695,7 +1724,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
* an identical criteria, it returns the collection.
|
||||
* Otherwise if this CcSubjs is new, it will return
|
||||
* an empty collection; or if this CcSubjs has previously
|
||||
* been saved, it will retrieve related CcFiless from storage.
|
||||
* been saved, it will retrieve related CcFilessRelatedByDbOwnerId from storage.
|
||||
*
|
||||
* This method is protected by default in order to keep the public
|
||||
* api reasonable. You can provide public methods for those you
|
||||
|
@ -1706,12 +1735,146 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||
* @return PropelCollection|array CcFiles[] List of CcFiles objects
|
||||
*/
|
||||
public function getCcFilessJoinCcMusicDirs($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
public function getCcFilessRelatedByDbOwnerIdJoinCcMusicDirs($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$query = CcFilesQuery::create(null, $criteria);
|
||||
$query->joinWith('CcMusicDirs', $join_behavior);
|
||||
|
||||
return $this->getCcFiless($query, $con);
|
||||
return $this->getCcFilessRelatedByDbOwnerId($query, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collCcFilessRelatedByDbEditedby collection
|
||||
*
|
||||
* This does not modify the database; however, it will remove any associated objects, causing
|
||||
* them to be refetched by subsequent calls to accessor method.
|
||||
*
|
||||
* @return void
|
||||
* @see addCcFilessRelatedByDbEditedby()
|
||||
*/
|
||||
public function clearCcFilessRelatedByDbEditedby()
|
||||
{
|
||||
$this->collCcFilessRelatedByDbEditedby = null; // important to set this to NULL since that means it is uninitialized
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the collCcFilessRelatedByDbEditedby collection.
|
||||
*
|
||||
* By default this just sets the collCcFilessRelatedByDbEditedby collection to an empty array (like clearcollCcFilessRelatedByDbEditedby());
|
||||
* however, you may wish to override this method in your stub class to provide setting appropriate
|
||||
* to your application -- for example, setting the initial array to the values stored in database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initCcFilessRelatedByDbEditedby()
|
||||
{
|
||||
$this->collCcFilessRelatedByDbEditedby = new PropelObjectCollection();
|
||||
$this->collCcFilessRelatedByDbEditedby->setModel('CcFiles');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of CcFiles objects which contain a foreign key that references this object.
|
||||
*
|
||||
* If the $criteria is not null, it is used to always fetch the results from the database.
|
||||
* Otherwise the results are fetched from the database the first time, then cached.
|
||||
* Next time the same method is called without $criteria, the cached collection is returned.
|
||||
* If this CcSubjs is new, it will return
|
||||
* an empty collection or the current collection; the criteria is ignored on a new object.
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param PropelPDO $con optional connection object
|
||||
* @return PropelCollection|array CcFiles[] List of CcFiles objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCcFilessRelatedByDbEditedby($criteria = null, PropelPDO $con = null)
|
||||
{
|
||||
if(null === $this->collCcFilessRelatedByDbEditedby || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcFilessRelatedByDbEditedby) {
|
||||
// return empty collection
|
||||
$this->initCcFilessRelatedByDbEditedby();
|
||||
} else {
|
||||
$collCcFilessRelatedByDbEditedby = CcFilesQuery::create(null, $criteria)
|
||||
->filterByCcSubjsRelatedByDbEditedby($this)
|
||||
->find($con);
|
||||
if (null !== $criteria) {
|
||||
return $collCcFilessRelatedByDbEditedby;
|
||||
}
|
||||
$this->collCcFilessRelatedByDbEditedby = $collCcFilessRelatedByDbEditedby;
|
||||
}
|
||||
}
|
||||
return $this->collCcFilessRelatedByDbEditedby;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of related CcFiles objects.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct
|
||||
* @param PropelPDO $con
|
||||
* @return int Count of related CcFiles objects.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function countCcFilessRelatedByDbEditedby(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
|
||||
{
|
||||
if(null === $this->collCcFilessRelatedByDbEditedby || null !== $criteria) {
|
||||
if ($this->isNew() && null === $this->collCcFilessRelatedByDbEditedby) {
|
||||
return 0;
|
||||
} else {
|
||||
$query = CcFilesQuery::create(null, $criteria);
|
||||
if($distinct) {
|
||||
$query->distinct();
|
||||
}
|
||||
return $query
|
||||
->filterByCcSubjsRelatedByDbEditedby($this)
|
||||
->count($con);
|
||||
}
|
||||
} else {
|
||||
return count($this->collCcFilessRelatedByDbEditedby);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called to associate a CcFiles object to this object
|
||||
* through the CcFiles foreign key attribute.
|
||||
*
|
||||
* @param CcFiles $l CcFiles
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function addCcFilesRelatedByDbEditedby(CcFiles $l)
|
||||
{
|
||||
if ($this->collCcFilessRelatedByDbEditedby === null) {
|
||||
$this->initCcFilessRelatedByDbEditedby();
|
||||
}
|
||||
if (!$this->collCcFilessRelatedByDbEditedby->contains($l)) { // only add it if the **same** object is not already associated
|
||||
$this->collCcFilessRelatedByDbEditedby[]= $l;
|
||||
$l->setCcSubjsRelatedByDbEditedby($this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If this collection has already been initialized with
|
||||
* an identical criteria, it returns the collection.
|
||||
* Otherwise if this CcSubjs is new, it will return
|
||||
* an empty collection; or if this CcSubjs has previously
|
||||
* been saved, it will retrieve related CcFilessRelatedByDbEditedby from storage.
|
||||
*
|
||||
* This method is protected by default in order to keep the public
|
||||
* api reasonable. You can provide public methods for those you
|
||||
* actually need in CcSubjs.
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param PropelPDO $con optional connection object
|
||||
* @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||
* @return PropelCollection|array CcFiles[] List of CcFiles objects
|
||||
*/
|
||||
public function getCcFilessRelatedByDbEditedbyJoinCcMusicDirs($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$query = CcFilesQuery::create(null, $criteria);
|
||||
$query->joinWith('CcMusicDirs', $join_behavior);
|
||||
|
||||
return $this->getCcFilessRelatedByDbEditedby($query, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2541,8 +2704,13 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
public function clearAllReferences($deep = false)
|
||||
{
|
||||
if ($deep) {
|
||||
if ($this->collCcFiless) {
|
||||
foreach ((array) $this->collCcFiless as $o) {
|
||||
if ($this->collCcFilessRelatedByDbOwnerId) {
|
||||
foreach ((array) $this->collCcFilessRelatedByDbOwnerId as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
if ($this->collCcFilessRelatedByDbEditedby) {
|
||||
foreach ((array) $this->collCcFilessRelatedByDbEditedby as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
|
@ -2583,7 +2751,8 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
|
|||
}
|
||||
} // if ($deep)
|
||||
|
||||
$this->collCcFiless = null;
|
||||
$this->collCcFilessRelatedByDbOwnerId = null;
|
||||
$this->collCcFilessRelatedByDbEditedby = null;
|
||||
$this->collCcPermss = null;
|
||||
$this->collCcShowHostss = null;
|
||||
$this->collCcPlaylists = null;
|
||||
|
|
|
@ -38,9 +38,13 @@
|
|||
* @method CcSubjsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method CcSubjsQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method CcSubjsQuery leftJoinCcFiles($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcFiles relation
|
||||
* @method CcSubjsQuery rightJoinCcFiles($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFiles relation
|
||||
* @method CcSubjsQuery innerJoinCcFiles($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFiles relation
|
||||
* @method CcSubjsQuery leftJoinCcFilesRelatedByDbOwnerId($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcFilesRelatedByDbOwnerId relation
|
||||
* @method CcSubjsQuery rightJoinCcFilesRelatedByDbOwnerId($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFilesRelatedByDbOwnerId relation
|
||||
* @method CcSubjsQuery innerJoinCcFilesRelatedByDbOwnerId($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFilesRelatedByDbOwnerId relation
|
||||
*
|
||||
* @method CcSubjsQuery leftJoinCcFilesRelatedByDbEditedby($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcFilesRelatedByDbEditedby relation
|
||||
* @method CcSubjsQuery rightJoinCcFilesRelatedByDbEditedby($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcFilesRelatedByDbEditedby relation
|
||||
* @method CcSubjsQuery innerJoinCcFilesRelatedByDbEditedby($relationAlias = '') Adds a INNER JOIN clause to the query using the CcFilesRelatedByDbEditedby relation
|
||||
*
|
||||
* @method CcSubjsQuery leftJoinCcPerms($relationAlias = '') Adds a LEFT JOIN clause to the query using the CcPerms relation
|
||||
* @method CcSubjsQuery rightJoinCcPerms($relationAlias = '') Adds a RIGHT JOIN clause to the query using the CcPerms relation
|
||||
|
@ -525,24 +529,24 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
|
|||
*
|
||||
* @return CcSubjsQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcFiles($ccFiles, $comparison = null)
|
||||
public function filterByCcFilesRelatedByDbOwnerId($ccFiles, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcSubjsPeer::ID, $ccFiles->getDbEditedby(), $comparison);
|
||||
->addUsingAlias(CcSubjsPeer::ID, $ccFiles->getDbOwnerId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcFiles relation
|
||||
* Adds a JOIN clause to the query using the CcFilesRelatedByDbOwnerId relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcSubjsQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcFiles($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
public function joinCcFilesRelatedByDbOwnerId($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcFiles');
|
||||
$relationMap = $tableMap->getRelation('CcFilesRelatedByDbOwnerId');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
|
@ -557,14 +561,14 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
|
|||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'CcFiles');
|
||||
$this->addJoinObject($join, 'CcFilesRelatedByDbOwnerId');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcFiles relation CcFiles object
|
||||
* Use the CcFilesRelatedByDbOwnerId relation CcFiles object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
|
@ -574,11 +578,75 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
|
|||
*
|
||||
* @return CcFilesQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcFilesQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
public function useCcFilesRelatedByDbOwnerIdQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcFiles($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcFiles', 'CcFilesQuery');
|
||||
->joinCcFilesRelatedByDbOwnerId($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcFilesRelatedByDbOwnerId', 'CcFilesQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcFiles object
|
||||
*
|
||||
* @param CcFiles $ccFiles the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcSubjsQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCcFilesRelatedByDbEditedby($ccFiles, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcSubjsPeer::ID, $ccFiles->getDbEditedby(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CcFilesRelatedByDbEditedby relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcSubjsQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCcFilesRelatedByDbEditedby($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CcFilesRelatedByDbEditedby');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'CcFilesRelatedByDbEditedby');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CcFilesRelatedByDbEditedby relation CcFiles object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return CcFilesQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCcFilesRelatedByDbEditedbyQuery($relationAlias = '', $joinType = Criteria::LEFT_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCcFilesRelatedByDbEditedby($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CcFilesRelatedByDbEditedby', 'CcFilesQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,11 +1,20 @@
|
|||
<form enctype="application/x-www-form-urlencoded" method="post" action="">
|
||||
<dl class="zend_form">
|
||||
<dt id="username-label">
|
||||
<dt id="username-label">
|
||||
<label for="username" class="required">
|
||||
<?php echo $this->element->getElement('email')->getLabel() ?>
|
||||
<?php echo $this->element->getElement('username')->getLabel() ?>
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="username-element">
|
||||
<?php echo $this->element->getElement('username') ?>
|
||||
</dd>
|
||||
|
||||
<dt id="email-label">
|
||||
<label for="email" class="required">
|
||||
<?php echo $this->element->getElement('email')->getLabel() ?>
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="email-element">
|
||||
<?php echo $this->element->getElement('email') ?>
|
||||
</dd>
|
||||
<?php if($this->element->getElement('email')->hasErrors()): ?>
|
||||
|
@ -15,7 +24,6 @@
|
|||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<dt id="submit-label"> </dt>
|
||||
<dd id="submit-element">
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<div id="import_status" class="library_import" style="display:none">File import in progress... <img src="/css/images/file_import_loader.gif"></img></div>
|
||||
<div id="advanced_search">
|
||||
</div>
|
||||
<div id="advanced_search"></div>
|
||||
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable">
|
||||
</table>
|
|
@ -1,6 +1,7 @@
|
|||
<div class="wrapper">
|
||||
<div id="library_content" class="lib-content tabs ui-widget ui-widget-content block-shadow alpha-block padded">
|
||||
<div id="import_status" style="display:none">File import in progress...</div>
|
||||
<div id="advanced_search"></div>
|
||||
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable"></table>
|
||||
</div>
|
||||
<div id="show_builder" class="sb-content ui-widget ui-widget-content block-shadow omega-block padded">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#Note: project.home is automatically generated by the propel-install script.
|
||||
#Any manual changes to this value will be overwritten.
|
||||
project.home = /home/james/src/airtime/airtime_mvc
|
||||
project.home = /home/rudi/Airtime/airtime_mvc
|
||||
project.build = ${project.home}/build
|
||||
|
||||
#Database driver
|
||||
|
|
|
@ -75,6 +75,10 @@
|
|||
<column name="soundcloud_link_to_file" phpName="DbSoundcloudLinkToFile" type="VARCHAR" size="4096" required="false"/>
|
||||
<column name="soundcloud_upload_time" phpName="DbSoundCloundUploadTime" type="TIMESTAMP" size="6" required="false"/>
|
||||
<column name="replay_gain" phpName="DbReplayGain" type="VARCHAR" size="16" required="false"/>
|
||||
<column name="owner_id" phpName="DbOwnerId" type="INTEGER" required="false"/>
|
||||
<foreign-key foreignTable="cc_subjs" phpName="FkOwner" name="cc_files_owner_fkey">
|
||||
<reference local="owner_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="cc_subjs" name="cc_files_editedby_fkey">
|
||||
<reference local="editedby" foreign="id"/>
|
||||
</foreign-key>
|
||||
|
@ -197,7 +201,6 @@
|
|||
<column name="creator_id" phpName="DbCreatorId" type="INTEGER" required="false"/>
|
||||
<column name="description" phpName="DbDescription" type="VARCHAR" size="512" required="false"/>
|
||||
<column name="length" phpName="DbLength" type="VARCHAR" sqlType="interval" defaultValue="00:00:00"/>
|
||||
<column name="type" phpName="DbType" type="VARCHAR" size="7" defaultValue="static"/>
|
||||
<behavior name="aggregate_column">
|
||||
<parameter name="name" value="length" />
|
||||
<parameter name="foreign_table" value="cc_playlistcontents" />
|
||||
|
|
|
@ -93,6 +93,7 @@ CREATE TABLE "cc_files"
|
|||
"soundcloud_link_to_file" VARCHAR(4096),
|
||||
"soundcloud_upload_time" TIMESTAMP(6),
|
||||
"replay_gain" VARCHAR(16),
|
||||
"owner_id" INTEGER,
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
|
@ -268,7 +269,6 @@ CREATE TABLE "cc_playlist"
|
|||
"creator_id" INTEGER,
|
||||
"description" VARCHAR(512),
|
||||
"length" interval default '00:00:00',
|
||||
"type" VARCHAR(7) default 'static',
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
|
@ -666,6 +666,8 @@ COMMENT ON TABLE "cc_webstream_metadata" IS '';
|
|||
|
||||
|
||||
SET search_path TO public;
|
||||
ALTER TABLE "cc_files" ADD CONSTRAINT "cc_files_owner_fkey" FOREIGN KEY ("owner_id") REFERENCES "cc_subjs" ("id");
|
||||
|
||||
ALTER TABLE "cc_files" ADD CONSTRAINT "cc_files_editedby_fkey" FOREIGN KEY ("editedby") REFERENCES "cc_subjs" ("id");
|
||||
|
||||
ALTER TABLE "cc_files" ADD CONSTRAINT "cc_music_dirs_folder_fkey" FOREIGN KEY ("directory") REFERENCES "cc_music_dirs" ("id");
|
||||
|
|
|
@ -100,8 +100,11 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
//process selected files/playlists.
|
||||
aMediaIds.push(new Array(data.id, data.ftype));
|
||||
|
||||
AIRTIME.playlist.fnAddItems(aMediaIds, undefined, 'after');
|
||||
|
||||
//check if a playlist/block is open before adding items
|
||||
if ($('input[id="obj_type"]').val() == 'playlist' || $('input[id="obj_type"]').val() == 'block') {
|
||||
AIRTIME.playlist.fnAddItems(aMediaIds, undefined, 'after');
|
||||
}
|
||||
};
|
||||
|
||||
mod.setupLibraryToolbar = function() {
|
||||
|
|
|
@ -328,24 +328,11 @@ function setupUI() {
|
|||
if (plContents.text() !== 'Empty playlist') {
|
||||
if (shuffleButton.hasClass('ui-state-disabled')) {
|
||||
shuffleButton.removeClass('ui-state-disabled');
|
||||
}
|
||||
//check if shuffle button already has a click event
|
||||
var clickEvents = $(document).data('events').click;
|
||||
var hasEvent = false;
|
||||
$.each(clickEvents, function(i, event) {
|
||||
if (event.selector == shuffleButton.selector) {
|
||||
hasEvent = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if (!hasEvent) {
|
||||
shuffleButton.live('click', function(){
|
||||
buttonClickAction('shuffle', 'Playlist/smart-block-shuffle');
|
||||
});
|
||||
shuffleButton.removeAttr('disabled');
|
||||
}
|
||||
} else if (!shuffleButton.hasClass('ui-state-disabled')) {
|
||||
shuffleButton.addClass('ui-state-disabled');
|
||||
shuffleButton.die('click');
|
||||
shuffleButton.attr('disabled', 'disabled');
|
||||
}
|
||||
|
||||
var dynamic_length = target_length;
|
||||
|
|
Loading…
Reference in New Issue