forked from hummypkg/webif
support variable dustbin name
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@663 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
3312a76cc6
commit
602f96e1ac
@ -30,13 +30,15 @@ if {$order eq "-"} {
|
||||
[settings new] sortorder $order
|
||||
}
|
||||
|
||||
set dustbin [system dustbin 1]
|
||||
|
||||
proc directory {file bfile} {
|
||||
global flatten
|
||||
|
||||
regsub -all " +" $bfile "" tbfile
|
||||
puts "<div class=va>"
|
||||
set img "/images/711_1_09_Media_Folder.png"
|
||||
if {$bfile eq "_dustbin"} { set img "/img/Dustbin_Folder.png" }
|
||||
if {$bfile eq $::dustbin} { set img "/img/Dustbin_Folder.png" }
|
||||
puts "<img border=0 class=va id=\"img$tbfile\" src=$img>"
|
||||
puts "<input class=\"fs fsdir\" type=checkbox>"
|
||||
puts "<a class=dbf
|
||||
|
@ -50,12 +50,13 @@ proc {system mediaroot} {} {
|
||||
return ""
|
||||
}
|
||||
|
||||
proc {system dustbin} {} {
|
||||
proc {system dustbin} {{short 0}} {
|
||||
set dustbin "_dustbin"
|
||||
if {![catch {set fd [open "/mod/boot/dustbin.name" r]}]} {
|
||||
set dustbin [lindex [split [read $fd] "\n"] 0]
|
||||
$fd close
|
||||
}
|
||||
if {$short} { return $dustbin }
|
||||
return "[system mediaroot]/$dustbin"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user