Merge branch '2.2.x' into devel
Conflicts: airtime_mvc/application/controllers/PreferenceController.php airtime_mvc/application/models/StoredFile.php airtime_mvc/public/js/bootstrap/bootstrap.js
This commit is contained in:
commit
b817684972
33 changed files with 167 additions and 181 deletions
|
@ -86,8 +86,14 @@ class CcBlock extends BaseCcBlock {
|
|||
*/
|
||||
public function computeDbLength(PropelPDO $con)
|
||||
{
|
||||
$stmt = $con->prepare('SELECT SUM(cliplength) FROM "cc_blockcontents" WHERE cc_blockcontents.BLOCK_ID = :p1');
|
||||
$stmt->bindValue(':p1', $this->getDbId());
|
||||
$sql = <<<SQL
|
||||
SELECT SUM(cliplength) FROM cc_blockcontents as bc
|
||||
JOIN cc_files as f ON bc.file_id = f.id
|
||||
WHERE BLOCK_ID = :b1
|
||||
AND f.file_exists = true
|
||||
SQL;
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':b1', $this->getDbId());
|
||||
$stmt->execute();
|
||||
$length = $stmt->fetchColumn();
|
||||
|
||||
|
|
|
@ -87,7 +87,13 @@ class CcPlaylist extends BaseCcPlaylist {
|
|||
*/
|
||||
public function computeDbLength(PropelPDO $con)
|
||||
{
|
||||
$stmt = $con->prepare('SELECT SUM(cliplength) FROM "cc_playlistcontents" WHERE cc_playlistcontents.PLAYLIST_ID = :p1');
|
||||
$sql = <<<SQL
|
||||
SELECT SUM(cliplength) FROM cc_playlistcontents as pc
|
||||
JOIN cc_files as f ON pc.file_id = f.id
|
||||
WHERE PLAYLIST_ID = :p1
|
||||
AND f.file_exists = true
|
||||
SQL;
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p1', $this->getDbId());
|
||||
$stmt->execute();
|
||||
$length = $stmt->fetchColumn();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue