Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes

  • Loading branch information...
commit 33bab4a576850d2f62a63e3be85b0c92e79369a9 1 parent cc670c0
@skinkie skinkie authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 broadcast.php
View
6 broadcast.php
@@ -33,7 +33,7 @@
$stmt->execute();
$vandaagresult = $stmt->fetchAll(PDO::FETCH_ASSOC);
- $stmt = $dbh->prepare('SELECT content_text.id, content_text.template, content_text.category, content_category.title, content_text.title, content_text.photo, content_text.content, content_text.duration FROM content_run, content, content_text, content_category, content_category_image WHERE content_run.enabled = 1 AND (content_run.day = 0 or content_run.day = :curday) AND content_run.start <= :start AND content_run.eind >= :end AND content.id = content_run.contentid AND content.id=content_text.contentid AND (content_text.category is NULL OR (content_category.id=content_category_image.categoryid AND content_text.category=content_category_image.id)) AND content_text.template <> \'ng-advertentie.xsl\' AND content_category.title <> \'Vandaag\' AND content_category.title <> \'Colofon\' ORDER BY content_text.id, '.(THEMESEQ ? 'content_category_image.categoryid, ':'').'content_text.id, content.start, content.eind ASC');
+ $stmt = $dbh->prepare('SELECT content_text.id, content_text.template, content_text.category, content_category.title, content_text.title, content_text.photo, content_text.content, content_text.duration FROM content_run, content, content_text, content_category, content_category_image WHERE content_run.enabled = 1 AND (content_run.day = 0 or content_run.day = :curday) AND content_run.start <= :start AND content_run.eind >= :end AND content.id = content_run.contentid AND content.id=content_text.contentid AND (content_text.category is NULL OR (content_category.id=content_category_image.categoryid AND content_text.category=content_category_image.id)) AND content_text.template <> \'ng-advertentie.xsl\' AND content_category.title <> \'Vandaag\' AND content_category.title <> \'Colofon\' ORDER BY '.(THEMESEQ ? 'content_category_image.categoryid, ':'').'content_text.id, content.start, content.eind ASC');
$stmt->bindParam(':curday', $curday, PDO::PARAM_INT);
$stmt->bindParam(':start', $start, PDO::PARAM_INT);
$stmt->bindParam(':end', $end, PDO::PARAM_INT);
@@ -69,7 +69,6 @@
$result = array_merge($vandaagresult, $contentresult, $colofonresult, $adsintro, $adsresult, $adsoutro);
// exec('/usr/bin/sudo -u broadcast sshfs -o nonempty -o allow_other tv@'.REMOTEHOST.':'.REMOTEDIR.' '.BROADCASTDIR);
-
$tmpdirectory = CACHEDIR.'/'.date('Y-m-d',$now);
// $tmpdirectory = CACHEDIR;
@@ -77,7 +76,6 @@
if (!file_exists(CACHEDIR)) mkdir(CACHEDIR);
mkdir($tmpdirectory);
}
-
$out = array();
$batch = array();
foreach ($result as $entry) {
@@ -133,8 +131,8 @@
if (defined('BUMPDURATION') && $current_cat != $image['category']) {
$current_cat = $image['category'];
$bump = $image['category'].'.png';
- exec('cp "'.USER_IMAGEDIR.'/'.$bump.'" "'.$tmpdirectory.'/'.$bump.'"');
if (file_exists(USER_IMAGEDIR.'/'.$bump)) {
+ exec('cp "'.USER_IMAGEDIR.'/'.$bump.'" "'.$tmpdirectory.'/'.$bump.'"');
fputs($fp, ' <img src="'.REMOTEDIR.'/cache/'.$bump.'" alt="'.htmlspecialchars('Bump - '.$image['category'], ENT_QUOTES, 'UTF-8').'" dur="'.BUMPDURATION.'s" region="content" fill="remove" erase="whenDone" />'.chr(13).chr(10));
}
Please sign in to comment.
Something went wrong with that request. Please try again.