From 1b6c746fcc68d953ef6b9f7b12567f99219f9374 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 6 May 2015 19:52:43 +0000 Subject: [PATCH] transmit file name correctly for meta edit svn path=/trunk/; revision=47 --- actions/meta.sh | 2 +- pages/common.sh | 2 +- pages/view.sh | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/actions/meta.sh b/actions/meta.sh index 6de9f38..25799b8 100755 --- a/actions/meta.sh +++ b/actions/meta.sh @@ -25,7 +25,7 @@ n=0; while [ -n "$_POST[\"tag$n\"]" ]; do n=$(($n + 1)) done -[ -z "$cancel" ] && if [ -n "$trash" ]; then +[ -z "$cancel" -a -n "$info" ] && if [ -n "$trash" ]; then rm "${_DATA}/thumbs/$info.jpg" 2>/dev/null mv "${_DATA}/videos/$info" "${_DATA}/meta/$info.meta" "${_DATA}/trash/" 2>/dev/null rm "${_DATA}/cache/$info.cache" 2>/dev/null diff --git a/pages/common.sh b/pages/common.sh index aad9769..739f4ca 100755 --- a/pages/common.sh +++ b/pages/common.sh @@ -24,7 +24,7 @@ page=$(echo -E "$_GET[\"p\"]" |egrep '^[0-9]+$') [ -z "$page" ] && page=0 page_link='' -[ -n "$info" ] && page_link="i=$(echo -En "$info" |sed -r 's:%:%25:g;s:\&:%26:g;')&" +[ -n "$info" ] && page_link="i=$(urlsave "$info")&" [ -n "$order" ] && page_link="${page_link}o=${order}&" [ -n "$search" ] && page_link="${page_link}s=${search}&" [ -n "$filter" ] && page_link="${page_link}f=${filter}&" diff --git a/pages/view.sh b/pages/view.sh index 8bbd434..1520270 100755 --- a/pages/view.sh +++ b/pages/view.sh @@ -17,9 +17,8 @@ # You should have received a copy of the GNU Affero General Public License # along with Serve0. If not, see . -. $_EXEC/pages/common.sh - info="$_GET[\"i\"]" +. $_EXEC/pages/common.sh meta="${_DATA}/meta/$info.meta" video="${_DATA}/videos/$info" -- 2.39.2