diff --git a/CONTROL/control b/CONTROL/control
index 76c6885..b97cd44 100644
--- a/CONTROL/control
+++ b/CONTROL/control
@@ -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
diff --git a/var/mongoose/cgi-bin/backup/restore.jim b/var/mongoose/cgi-bin/backup/restore.jim
index e87b021..52da331 100755
--- a/var/mongoose/cgi-bin/backup/restore.jim
+++ b/var/mongoose/cgi-bin/backup/restore.jim
@@ -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
diff --git a/var/mongoose/html/css/jquery.contextMenu.css b/var/mongoose/html/css/jquery.contextMenu.css
index f3a2e2a..a18aac0 100644
--- a/var/mongoose/html/css/jquery.contextMenu.css
+++ b/var/mongoose/html/css/jquery.contextMenu.css
@@ -1,7 +1,7 @@
/* Generic context menu styles */
.contextMenu {
position: absolute;
- width: 140px;
+ width: 150px;
z-index: 99999;
border: solid 1px #CCC;
background: #EEE;
diff --git a/var/mongoose/html/index.shtml b/var/mongoose/html/index.shtml
index 3a4b189..f053b3a 100644
--- a/var/mongoose/html/index.shtml
+++ b/var/mongoose/html/index.shtml
@@ -41,7 +41,7 @@ $(document).ready(function() {
- Scheduled Recordings
+ Scheduled Events
diff --git a/var/mongoose/lib/epg.class b/var/mongoose/lib/epg.class
index 00d2ce5..0bba969 100644
--- a/var/mongoose/lib/epg.class
+++ b/var/mongoose/lib/epg.class
@@ -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)]
+ }
}
}
diff --git a/var/mongoose/lib/rsv.class b/var/mongoose/lib/rsv.class
index 186e52c..5c60911 100755
--- a/var/mongoose/lib/rsv.class
+++ b/var/mongoose/lib/rsv.class
@@ -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("