]> git.nbdom.net Git - nb.git/commitdiff
bin/dbq.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 6 Sep 2024 16:21:16 +0000 (18:21 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 6 Sep 2024 16:21:16 +0000 (18:21 +0200)
bin/dbq-vi
bin/dbq.php

index d2b11684297b7843b0217e4cea892ca10361dde7..4f98285cd9d029927f95e546bb933f3c37c88b5a 100755 (executable)
@@ -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 
index 5d83bf7e37adb26fc9e6d1605a6ba6cd4c041b48..306944fccdeab8294d90e9dda904102e1b81bde4 100755 (executable)
@@ -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'));
 ?>