fix dustbin delete of same-named file, remove toggle ENC option
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@991 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
df72a42abf
commit
1b11c7959b
@ -1,7 +1,7 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 0.9.7
|
||||
Version: 0.9.7-1
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: webif-channelicons(>=1.0.1),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73),jim-cgi(>=0.5),service-control(>=1.2),busybox(>=1.19.3-1),lsof,epg(>=1.0.9),hmt(>=1.1.6),ssmtp,anacron,trm,openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts
|
||||
|
@ -30,7 +30,6 @@ if $nicesplice {
|
||||
}
|
||||
puts {
|
||||
<li class=separator><a href=#lock>Toggle Lock</a></li>
|
||||
<li><a href=#enc>Toggle Enc</a></li>
|
||||
<li><a href=#new>Toggle New</a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -202,16 +202,16 @@ function preparemenu(el, menu)
|
||||
{
|
||||
if (el.attr('type') == 'ts')
|
||||
{
|
||||
if (el.attr('def') == 'HD')
|
||||
{
|
||||
$(menu).enableContextMenuItems('#enc');
|
||||
if (el.attr('encd') == 1)
|
||||
$(menu).changeContextMenuItem('#enc',
|
||||
'Remove Enc');
|
||||
else
|
||||
$(menu).changeContextMenuItem('#enc',
|
||||
'Set Enc');
|
||||
}
|
||||
// if (el.attr('def') == 'HD')
|
||||
// {
|
||||
// $(menu).enableContextMenuItems('#enc');
|
||||
// if (el.attr('encd') == 1)
|
||||
// $(menu).changeContextMenuItem('#enc',
|
||||
// 'Remove Enc');
|
||||
// else
|
||||
// $(menu).changeContextMenuItem('#enc',
|
||||
// 'Set Enc');
|
||||
// }
|
||||
|
||||
if (el.attr('bx') > 0)
|
||||
$(menu).enableContextMenuItems('#crop');
|
||||
@ -262,7 +262,7 @@ function preparemenu(el, menu)
|
||||
{
|
||||
$(menu).enableContextMenuItems('#delete');
|
||||
$(menu).disableContextMenuItems('#lock');
|
||||
$(menu).disableContextMenuItems('#enc');
|
||||
//$(menu).disableContextMenuItems('#enc');
|
||||
$(menu).disableContextMenuItems('#new');
|
||||
$(menu).disableContextMenuItems('#decrypt');
|
||||
$(menu).disableContextMenuItems('#audio');
|
||||
@ -319,10 +319,10 @@ var menuclick = function(action, el, pos)
|
||||
file, type, id);
|
||||
break;
|
||||
|
||||
case 'enc':
|
||||
confirm_action('change the ENC flag on', enc_callback,
|
||||
file, type, id);
|
||||
break;
|
||||
// case 'enc':
|
||||
// confirm_action('change the ENC flag on', enc_callback,
|
||||
// file, type, id);
|
||||
// break;
|
||||
|
||||
case 'new':
|
||||
confirm_action('change the New flag on', new_callback,
|
||||
|
@ -56,7 +56,11 @@ foreach file [cgi_get files] {
|
||||
puts -nonewline "Directory..."
|
||||
if {$ldustbin ne ""} {
|
||||
set ndir "[bindir $file]/[file tail $file]"
|
||||
while {[file isdirectory $ndir]} { append ndir "_" }
|
||||
if {$force} {
|
||||
while {[file isdirectory $ndir]} {
|
||||
append ndir "_"
|
||||
}
|
||||
}
|
||||
file rename $file $ndir
|
||||
touch $ndir
|
||||
} else {
|
||||
@ -70,7 +74,7 @@ foreach file [cgi_get files] {
|
||||
# Check TS validity
|
||||
if {![catch {$ts get file}]} {
|
||||
if {$ldustbin ne ""} {
|
||||
$ts move [bindir $file] 1
|
||||
$ts move [bindir $file] 1 1
|
||||
} else {
|
||||
if {[$ts delete]} {
|
||||
puts "Successfully deleted $file."
|
||||
|
@ -132,11 +132,14 @@ ts method delete {} {
|
||||
return 1
|
||||
}
|
||||
|
||||
ts method move {dst {touch 0}} {
|
||||
ts method move {dst {touch 0} {force 0}} {
|
||||
set root [file rootname $file]
|
||||
regsub -all {([\\["$])} $root {\\\1} root
|
||||
foreach f [glob -nocomplain "${root}.*"] {
|
||||
set nf "$dst/[file tail $f]"
|
||||
while {[file exists $nf]} {
|
||||
set nf "$dst/_[file tail $nf]"
|
||||
}
|
||||
file rename $f $nf
|
||||
if {$touch} {
|
||||
exec /mod/bin/busybox/touch $nf
|
||||
|
Loading…
Reference in New Issue
Block a user