]> git.plutz.net Git - shellwiki/commitdiff
handle cancel and invalid action
authorPaul Hänsch <paul@plutz.net>
Wed, 25 May 2022 21:29:29 +0000 (23:29 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 25 May 2022 21:29:29 +0000 (23:29 +0200)
handlers/30_move_rename_delete.sh

index 12e7d450552a06f731417eec149f6d712d5444e8..be84ca8afc40e856fad03cb1a4ec354e52135c22 100755 (executable)
@@ -151,4 +151,11 @@ elif [ "$action" = delete ]; then
     rmdir -- "$_DATA/pages/${oldname}/" || true
     REDIRECT ./
   fi
+elif [ "$action" = cancel ]; then
+  REDIRECT ./
+elif [ "$action" ]; then
+  printf 'Refresh: %i\r\n' 4
+  export ERRORMSG="Missing parameters."
+  theme_error 400
+  return 0
 fi