diff options
Diffstat (limited to 'tears.cgi')
-rwxr-xr-x | tears.cgi | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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)'>" |