From efd7544b8c72cf5687355f3540f5ad257040b5ac Mon Sep 17 00:00:00 2001 From: hummypkg Date: Tue, 10 Jan 2017 22:56:51 +0000 Subject: [PATCH] fix queue git-svn-id: file:///root/webif/svn/pkg/webif/trunk@3512 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 2 +- webif/html/diag/queue/fetch.jim | 6 +++--- webif/lib/auto/upgrade | 8 +++++--- webif/lib/queue.class | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index fd81d7b1..091017c3 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.3.5-3 +Version: 1.3.5-4 Architecture: mipsel Maintainer: af123@hpkg.tv Depends: tcpfix,webif-channelicons(>=1.1.24),lighttpd(>=1.4.39-1),jim(>=0.77),jim-oo(>=0.77),jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.5),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.9),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.21-2),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.95),sqlite3(>=3.15.1) diff --git a/webif/html/diag/queue/fetch.jim b/webif/html/diag/queue/fetch.jim index 77db0062..6143f9f7 100755 --- a/webif/html/diag/queue/fetch.jim +++ b/webif/html/diag/queue/fetch.jim @@ -24,9 +24,9 @@ foreach q [queue all] { } [$q get file]] set submitted [clock format [$q get submitted] \ -format {%d/%m/%Y %H:%M:%S}] - if {[$q get last] ne "0"} { - set last [clock format [$q get last] \ - -format {%d/%m/%Y %H:%M:%S}] + set last [$q get last] + if {$last ne "" && $last ne "0"} { + set last [clock format $last -format {%d/%m/%Y %H:%M:%S}] } else { set last "" } diff --git a/webif/lib/auto/upgrade b/webif/lib/auto/upgrade index 517d9dec..ffd6055d 100755 --- a/webif/lib/auto/upgrade +++ b/webif/lib/auto/upgrade @@ -4,7 +4,6 @@ source /mod/webif/lib/setup require queue.class system.class proc fixflags {dir} { - puts "Upgrading directory flags..." foreach entry [readdir -nocomplain $dir] { if {[file isdirectory "$dir/$entry"]} { fixflags "$dir/$entry" @@ -19,7 +18,7 @@ proc fixflags {dir} { } set queries { - 2 { {alter table queue add column last integer} } + 2 { {alter table queue add column last integer default 0} } } set latest 3 @@ -30,7 +29,10 @@ if {$cur == $latest} { exit } -if {$cur < 3} { fixflags [system mediaroot] } +if {$cur < 3} { + puts "Upgrading directory flags..." + fixflags [system mediaroot] +} if {$cur < 2} { puts "Clearing queue due to version change..." diff --git a/webif/lib/queue.class b/webif/lib/queue.class index bd06d355..a10f650d 100644 --- a/webif/lib/queue.class +++ b/webif/lib/queue.class @@ -53,8 +53,8 @@ proc {queue dbhandle} {args} { runtime integer, retries integer default 0, interrupts integer default 0, - submitted integer, - last integer + submitted integer default 0, + last integer default 0 ); } $::queue::db query {