From 69d8ed9ff773d302c15c33d7624af42b4b195c16 Mon Sep 17 00:00:00 2001 From: nerun Date: Fri, 1 Sep 2023 16:18:40 -0300 Subject: [PATCH] Fix issue #251 and others 'undefined array key' errors. --- action/rename.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/action/rename.php b/action/rename.php index 6e53083..70c4343 100644 --- a/action/rename.php +++ b/action/rename.php @@ -37,6 +37,13 @@ public function handle_init() { global $INFO; global $INPUT; global $USERINFO; + + if ( !isset($USERINFO['grps']) ){ + $USERINFO['grps'] = ''; + } + if ( !isset($INFO['id']) ){ + $INFO['id'] = ''; + } $JSINFO['move_renameokay'] = $this->renameOkay($INFO['id']); $JSINFO['move_allowrename'] = auth_isMember($this->getConf('allowrename'), $INPUT->server->str('REMOTE_USER'), (array) $USERINFO['grps']); @@ -70,6 +77,9 @@ public function handle_pagetools(Doku_Event $event) { */ public function addsvgbutton(Doku_Event $event) { global $INFO, $JSINFO; + if ( !isset($JSINFO['move_renameokay']) ){ + $JSINFO['move_renameokay'] = ''; + } if( $event->data['view'] !== 'page' || !$this->getConf('pagetools_integration') ||