From f58c26c8365997780807fc1ba63f11d4d36c69f1 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 6 Sep 2024 18:21:16 +0200 Subject: [PATCH] bin/dbq.php --- bin/dbq-vi | 3 ++- bin/dbq.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/dbq-vi b/bin/dbq-vi index d2b11684..4f98285c 100755 --- a/bin/dbq-vi +++ b/bin/dbq-vi @@ -18,12 +18,13 @@ EOF dbq.php "$path/add.yaml" >> "$tmp" || return sed -i -e 's/"//g' "$tmp" else + echo "# UPDATE MODE" >> "$tmp" dbq.php "$path/vi/$id.yaml" >> "$tmp" || return fi md5=$(md5sum "$tmp") - vi "$tmp" + vi +5 "$tmp" [ -s "$tmp" ] || return [ "$md5" == "$(md5sum "$tmp")" ] && return diff --git a/bin/dbq.php b/bin/dbq.php index 5d83bf7e..306944fc 100755 --- a/bin/dbq.php +++ b/bin/dbq.php @@ -54,7 +54,7 @@ if (isset($GLOBALS['argv']) and count($GLOBALS['argv'])>1) { } #bye($_GET); -$GLOBALS['argv'] = [$GLOBALS['argv'][1]]; # to cancel argv2request +$GLOBALS['argv'] = [$GLOBALS['argv'][0]]; # to cancel argv2request #$GLOBALS['argv'] = []; # to cancel argv2request require(realpath(dirname(__FILE__).'/../www/dbq/dbq.php')); ?> -- 2.47.3