summaryrefslogtreecommitdiff
path: root/bin/vdr.php
diff options
context:
space:
mode:
authorAlib <aliboba@free.fr>2010-03-18 10:45:02 +0100
committerAlib <aliboba@free.fr>2010-03-18 10:45:02 +0100
commit24a99cb46753040380ddb4b4a0c5c01ad4bd0b44 (patch)
tree96d31b5d575c5f41a6ab6bdb3164d6c76746231e /bin/vdr.php
parent766623f65ca90afcb7c12421c746d1c8e06ca24f (diff)
parent5fffc5435015f06f7329f6cdd6ea77c0aa7e809e (diff)
downloadistreamdev-24a99cb46753040380ddb4b4a0c5c01ad4bd0b44.tar.gz
istreamdev-24a99cb46753040380ddb4b4a0c5c01ad4bd0b44.tar.bz2
Merge branch 'jquery' of projects.vdr-developer.org:istreamdev into jquery
Diffstat (limited to 'bin/vdr.php')
-rwxr-xr-xbin/vdr.php13
1 files changed, 4 insertions, 9 deletions
diff --git a/bin/vdr.php b/bin/vdr.php
index 4253856..9197b1b 100755
--- a/bin/vdr.php
+++ b/bin/vdr.php
@@ -353,13 +353,13 @@ function vdrlisttimers()
$typearray = explode(" ", $timerarray[0]);
$newtimer['name'] = $timerarray[7];
- $newtimer['active'] = (($typearray[1] & 0x1) != 0);
+ $newtimer['active'] = ($typearray[1] & 0x1)?"1":0;
$newtimer['channumber'] = $timerarray[1];
$newtimer['channame'] = vdrgetchanname($timerarray[1]);
$newtimer['date'] = $timerarray[2];
$newtimer['starttime'] = $timerarray[3];
$newtimer['endtime'] = $timerarray[4];
- $newtimer['running'] = (($typearray[1] & 0x8) != 0);
+ $newtimer['running'] = ($typearray[1] & 0x8)?1:0;
$timerslist[] = $newtimer;
}
@@ -391,15 +391,10 @@ function vdrsettimer($prevtimer, $channum, $date, $stime, $etime, $desc, $active
{
$ret = array();
- if ($active == 'on')
- $type = "1";
- else
- $type = "0";
-
if ($prevtimer == "")
- $command = "NEWT " .$type .":" .$channum .":" .$date .":" .$stime .":" .$etime .":99:99:" .$desc;
+ $command = "NEWT " .$active .":" .$channum .":" .$date .":" .$stime .":" .$etime .":99:99:" .$desc;
else
- $command = "MODT " .$prevtimer ." " .$type .":" .$channum .":" .$date .":" .$stime .":" .$etime .":99:99:" .$desc;
+ $command = "MODT " .$prevtimer ." " .$active .":" .$channum .":" .$date .":" .$stime .":" .$etime .":99:99:" .$desc;
$message = vdrsendcommand($command);