bug fixes, to 0.6.0-2

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@262 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2011-07-09 20:12:33 +00:00
parent 33a72aa43f
commit 2a224c1055
6 changed files with 23 additions and 12 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 0.6.0-1
Version: 0.6.0-2
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: mongoose(>=2.11-6),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.3),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.2),hmt(>=1.0.6),ssmtp

View File

@ -13,7 +13,7 @@ puts ""
cgi_input
#cgi_dump
#set _cgi(restore_file) "backup-2011-Jul-05-19:22"
#set _cgi(restore_file) "backup-2011-Jul-09-20:37"
if {![dict exists $_cgi restore_file]} {
puts "No filename supplied."
@ -53,7 +53,8 @@ proc findhsvc {channel} {
puts "Restoring scheduled events..."
$rsvdb query {delete from TBL_RESERVATION}
$rsvdb query {begin transaction;}
$rsvdb query {delete from TBL_RESERVATION;}
set fields [lsort [[rsv] vars]]
@ -96,7 +97,10 @@ foreach line $data {
if {!$bad} { $rsv insert }
}
$rsvdb query {commit transaction;}
puts "Restoring favourite channels..."
$rsvdb query {begin transaction;}
$rsvdb query {delete from channel.TBL_FAV}
set grp 0
@ -129,6 +133,8 @@ foreach line $data {
$rsvdb query $query
}
$rsvdb query {commit transaction;}
close [open /tmp/.restartpending w]
close $fd

View File

@ -1,7 +1,7 @@
/* Generic context menu styles */
.contextMenu {
position: absolute;
width: 140px;
width: 150px;
z-index: 99999;
border: solid 1px #CCC;
background: #EEE;

View File

@ -41,7 +41,7 @@ $(document).ready(function() {
</a>
<br>
<a href=/sched.shtml>
<b>Scheduled Recordings</b>
<b>Scheduled Events</b>
</a>
<br>
</center>

View File

@ -126,9 +126,11 @@ epg method get_channel_info {} {
from TBL_SVC
where usSvcId = %s} "[$self get service_id]"
] 0]
set channel_num $chan(usLcn)
set channel_name [string range $chan(szSvcName) 1 end]
set channel_crid [string toupper $chan(aucDefaultAuthority)]
if {[dict exists $chan usLcn]} {
set channel_num $chan(usLcn)
set channel_name [string range $chan(szSvcName) 1 end]
set channel_crid [string toupper $chan(aucDefaultAuthority)]
}
}
}

View File

@ -8,7 +8,7 @@ set rsvdb [sqlite3.open /var/lib/humaxtv/rsv.db]
$rsvdb query {attach database '/var/lib/humaxtv/channel.db' as channel}
class rsv {
ulslot 0
ulslot -1
ersvtype 0
hsvc 0
nsttime 0
@ -81,9 +81,9 @@ rsv method fix_hsvc {} {
rsv method insert {} {
global rsvdb
if {!$ulslot} {
if {$ulslot < 0} {
set slot [
$rsvdb query {select max(ulslot) FROM TBL_RESERVATION}]
$rsvdb query {select max(ulslot) FROM TBL_RESERVATION;}]
set slot [expr 1 + [lindex [lindex $slot 0] 1]]
set ulslot $slot
}
@ -97,7 +97,10 @@ rsv method insert {} {
set vals {}
foreach field $fields {
lappend vals "'[$self get $field]'"
# Escape any quotes embedded in the data.
regsub -all {'} [$self get $field] {''} f
lappend vals "'$f'"
#lappend vals "'[$self get $field]'"
}
set query "insert into TBL_RESERVATION("