X-Git-Url: http://git.plutz.net/?p=bookman;a=blobdiff_plain;f=index.cgi;h=039781678491d01a06e87f0992fedfe1a41a275c;hp=911e5eed684715e6e67cf5413617b33752f831d9;hb=5cacb437d2896b2a656a2a944e76915cb95dbe7b;hpb=28ce309347435c1dd23beab8104d36cbe640d2dd diff --git a/index.cgi b/index.cgi index 911e5ee..0397816 100755 --- a/index.cgi +++ b/index.cgi @@ -93,7 +93,7 @@ BDB="users/${COKID}" if [ -n "$QRYID" ]; then printf '%s 303 See Other\r\n' "$SERVER_PROTOCOL" - printf 'Location: %s\r\n' "${SCRIPT_NAME}?${QUERY_STRING#id=*&}" + printf 'Location: %s\r\n' "${SCRIPT_NAME}?${QUERY_STRING#id=????????????}" SET_COOKIE +8640000 "id=${QRYID}" printf '\r\n' exit 0 @@ -174,10 +174,10 @@ case "$(GET action)" in tfile="${BDB}/${target}.bm" if [ "$(POST control)" = confirm -a -f "$file" ]; then if [ "$target" = "____________" ]; then - rm -f "$file" >&- + rm -f "$file" "${file%.bm}.cache" >&- git -C "${BDB}" commit -m "Deleted folder ${fid}" -- "${fid}.bm" >&- elif tail -n+2 "$file" >>"$tfile"; then - rm -f "$file" >&- + rm -f "$file" "${file%.bm}.cache" >&- git -C "${BDB}" commit -m "Deleted folder ${fid}" -- "${fid}.bm" "${target}.bm" >&- fi fi @@ -288,7 +288,6 @@ bookmarkgen(){ url="$(GET nbmurl)" file="${BDB}/${fid}.bm" - [ "$url" = "${url#*://}" ] && url="http://$url" if [ -z "$name" -a -n "$url" ]; then name="$(wget -O- "$url" \ | head -c4096 \ @@ -297,6 +296,7 @@ bookmarkgen(){ fi if [ -n "$fid" -o -n "$name" -o -n "$url" ]; then + [ "$url" = "${url#*://}" ] && url="http://$url" cat <<-EOF

New Bookmark

@@ -496,6 +496,9 @@ cat < + EOF