summaryrefslogtreecommitdiff
path: root/tears.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'tears.cgi')
-rwxr-xr-xtears.cgi14
1 files changed, 7 insertions, 7 deletions
diff --git a/tears.cgi b/tears.cgi
index bd299a0..11dfe6f 100755
--- a/tears.cgi
+++ b/tears.cgi
@@ -124,15 +124,14 @@ meny() {
liste() {
n=$((${GET_n:-0} + 7))
- finder="$finder -printf %h\t%TT\t%f\n"
- ok=1
- $finder | sort -r | head -$n | tail -7 | while read path; do
- # while read path; do
+ finder="$finder -printf '%h\t%TT\t%f\n'"
+ #$finder | sort -r | head -$n | tail -7 | while read path; do
+ while read path; do
d=$(cut -f 1 <<<"$path")
f=$(cut -f 3 <<<"$path")
ok=1
- [ "$f" ] && kort "$d/$f"
- done # <<< $(eval $finder | sort -r | head -$n | tail -7)
+ [ "$f" ] && kort $d/$f
+ done <<< $(eval $finder | sort -r | head -$n | tail -7)
if [ -z "$ok" ]; then
echo "<p><b>Ingen artikler</b>"
else
@@ -164,7 +163,8 @@ stikk() {
skjema() {
[ ! -f "$1" ] && echo "<p>finner ikke $1: <pre>$(xxd <<<$1)</pre>" && exit
[ ! -w "$1" ] && echo "<p>du har ikke skrivetilgang" && exit
- echo "<form id=update-article method=post action='$BASE/oppdater/$1'>"
+ url=$(/opt/bin/pencode <<< $1)
+ echo "<form id=update-article method=post action='$BASE/oppdater/$url'>"
lupin -f $1
echo "<p><label>Stikkord:</label>"
echo "<input type='text' name='stikkord' value='$(stikkord $1)'>"