From 25523058f0d18f75ac9a6372235a5fe0b3ca95cf Mon Sep 17 00:00:00 2001 From: hummypkg Date: Mon, 31 Dec 2012 22:39:54 +0000 Subject: [PATCH] rejig dedup, prepare for RMA in 2.15 git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1260 2a923420-c742-0410-a762-8d5b09965624 --- var/mongoose/cgi-bin/cfwreset.cgi | 7 ++++++- var/mongoose/html/dedup/normalise.jim | 18 +++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/var/mongoose/cgi-bin/cfwreset.cgi b/var/mongoose/cgi-bin/cfwreset.cgi index 236693d..40b38c0 100755 --- a/var/mongoose/cgi-bin/cfwreset.cgi +++ b/var/mongoose/cgi-bin/cfwreset.cgi @@ -6,7 +6,12 @@ echo "Content-Type: text/plain" echo if [ "$rma" = 1 ]; then - touch /var/lib/humaxtv/.rma + modver="`cat /etc/modversion`" + if [ "$modver" -ge 215 ]; then + touch /var/lib/humaxtv_backup/.rma + else + touch /var/lib/humaxtv/.rma + fi else touch /var/lib/humaxtv/mod/_RESET_CUSTOM_FIRMWARE_ENVIRONMENT fi diff --git a/var/mongoose/html/dedup/normalise.jim b/var/mongoose/html/dedup/normalise.jim index 1a786e9..23fdeb3 100755 --- a/var/mongoose/html/dedup/normalise.jim +++ b/var/mongoose/html/dedup/normalise.jim @@ -53,15 +53,6 @@ proc dedupnormalise {title {reserve ""}} { } } - # if still short, add the reserve string. - if {[string length $title] < 10} { - if {[string match "${title}*" $reserve]} { - set title $reserve - } else { - append title " $reserve" - } - } - if {[dict exists $seriesmap $title]} { set ntitle "$seriesmap($title): $title" set title $ntitle @@ -73,6 +64,15 @@ proc dedupnormalise {title {reserve ""}} { } } + # if still short, add the reserve string. + if {[string length $title] < 10} { + if {[string match "${title}*" $reserve]} { + set title $reserve + } else { + append title " $reserve" + } + } + # Shorten if too long. if {[string length $title] > 40} { set title [string range $title 0 39]