Skip to content

Commit

Permalink
Fix #251 undefined array keys
Browse files Browse the repository at this point in the history
  • Loading branch information
michitux committed May 7, 2024
1 parent 8c44e30 commit 941af2b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions action/rename.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ public function handle_init() {
global $INPUT;
global $USERINFO;

$JSINFO['move_renameokay'] = $this->renameOkay($INFO['id']);
if (isset($INFO['id'])) {
$JSINFO['move_renameokay'] = $this->renameOkay($INFO['id']);
} else {
$JSINFO['move_renameokay'] = false;
}

$JSINFO['move_allowrename'] = auth_isMember(
$this->getConf('allowrename'),
$INPUT->server->str('REMOTE_USER'),
Expand Down Expand Up @@ -77,7 +82,7 @@ public function addsvgbutton(Doku_Event $event) {
if(
$event->data['view'] !== 'page' ||
!$this->getConf('pagetools_integration') ||
!$JSINFO['move_renameokay']
empty($JSINFO['move_renameokay'])
) {
return;
}
Expand Down

0 comments on commit 941af2b

Please sign in to comment.