2011-07-08 20:39:57 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
|
|
|
package require cgi
|
2012-05-21 20:23:41 +00:00
|
|
|
source /mod/webif/lib/setup
|
2012-04-22 20:54:29 +00:00
|
|
|
require ts.class
|
2011-07-08 20:39:57 +00:00
|
|
|
|
2013-02-09 22:46:15 +00:00
|
|
|
httpheader
|
2011-07-08 20:39:57 +00:00
|
|
|
|
2013-02-09 22:46:15 +00:00
|
|
|
set file [cgi_get file]
|
2011-07-08 20:39:57 +00:00
|
|
|
set ts [ts fetch $file]
|
|
|
|
if {[set ts [ts fetch $file]] != 0} {
|
|
|
|
set action new
|
|
|
|
if {[$ts flag "New"]} { set action watched }
|
|
|
|
|
|
|
|
if {[$ts set_$action]} {
|
|
|
|
puts "Successfully marked $file as $action."
|
2013-09-08 20:41:01 +00:00
|
|
|
ts resetnew [file dirname $file]
|
2011-07-08 20:39:57 +00:00
|
|
|
} else {
|
|
|
|
puts "Problem marking $file as $action,
|
|
|
|
[$ts get error]"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|