X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=handlers%2F40_edit_attachment.sh;h=b23a35d31bc9fc03632703751fd638d60123f0dc;hb=7fabffca622337ddd842959cac3d45112bee567b;hp=97a4b9df2d8825be71512714c98f6e8fbdd193cf;hpb=d528b3d990539a7a9a5d11348ffdb3b269e3e569;p=shellwiki diff --git a/handlers/40_edit_attachment.sh b/handlers/40_edit_attachment.sh index 97a4b9d..b23a35d 100755 --- a/handlers/40_edit_attachment.sh +++ b/handlers/40_edit_attachment.sh @@ -1,5 +1,19 @@ #!/bin/sh +# Copyright 2022 - 2023 Paul Hänsch +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +# IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + REV_ATTACHMENTS="${REV_ATTACHMENTS:-false}" if [ "${PATH_INFO##*/\[attachment\]}" ]; then @@ -163,51 +177,51 @@ elif [ "$action" = rename ]; then if [ "$success" -a "$fail" ]; then printf "%s\r\n" "Status: 500 Internal Server Error" - theme_page - "Attachment rename" <<-EOF -

Some files could not be renamed

-

Successfully renamed:

+ theme_page - "$(_ "Attachment rename")" <<-EOF +

$(_ Some files could not be renamed)

+

$(_ Successfully renamed:)

-

Errors:

+

$(_ Errors:)

- OK + $(_ OK) EOF exit 0 elif [ "$fail" ]; then printf "%s\r\n" "Status: 500 Internal Server Error" - theme_page - "Attachment rename" <<-EOF -

Files could not be renamed

+ theme_page - "$(_ "Attachment rename")" <<-EOF +

$(_ "Files could not be renamed")

- OK + $(_ OK) EOF exit 0 elif [ "$success" ]; then printf 'Refresh: %i\r\n' 4 theme_page - "Attachment rename" <<-EOF -

Files were renamed

+

$(_ Files were renamed)

- OK + $(_ OK) EOF exit 0