summaryrefslogtreecommitdiff
path: root/tears.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'tears.cgi')
-rwxr-xr-xtears.cgi14
1 files changed, 8 insertions, 6 deletions
diff --git a/tears.cgi b/tears.cgi
index 351340b..11dfe6f 100755
--- a/tears.cgi
+++ b/tears.cgi
@@ -125,9 +125,10 @@ meny() {
liste() {
n=$((${GET_n:-0} + 7))
finder="$finder -printf '%h\t%TT\t%f\n'"
- while read; do
- d=$(cut -f 1 <<<"$REPLY")
- f=$(cut -f 3 <<<"$REPLY")
+ #$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)
@@ -162,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)'>"
@@ -179,7 +181,7 @@ vis() {
[ ! -f "$1" ] && echo "<p>finner ikke $1: <pre>$(xxd <<<$1)</pre>" && exit
[ ! -r "$1" ] && echo "<p>du har ikke lesetilgang" && exit
echo "<article>"
- lupin $1 | /opt/bin/refine
+ lupin $1 | /opt/bin/embed
echo "</article>"
}
@@ -217,7 +219,7 @@ oppdater() {
lupin -p -e - >$1
irc "$(whoami) redigerte $POST_title"
[ -n "$POST_publish" ] && chmod o+r "$1"
- # pushd /home/bie/code/maker >/dev/null; ./maker; popd >/dev/null
+ pushd /home/bie/maker >/dev/null; ./maker; popd >/dev/null
redirect "$BASE/rediger/$1"
}