Permalink
Browse files

Fixed missing check for export buttons configuration. Fixes #235.

The check was only missing for the new menu system (introduced with "Greebo").
  • Loading branch information...
LarsGit223 committed Apr 26, 2018
1 parent cba8cd9 commit b34d220d6007b69bbf5224d98144d42b5f6e042c
Showing with 6 additions and 2 deletions.
  1. +6 −2 action/export.php
@@ -103,7 +103,9 @@ public function addbutton_pdf(Doku_Event $event) {
*/
public function addbutton_odt_new(Doku_Event $event) {
if($event->data['view'] != 'page') return;
array_splice($event->data['items'], -1, 0, [new \dokuwiki\plugin\odt\MenuItemODT()]);
if($this->getConf('showexportbutton')) {
array_splice($event->data['items'], -1, 0, [new \dokuwiki\plugin\odt\MenuItemODT()]);
}
}
/**
@@ -113,7 +115,9 @@ public function addbutton_odt_new(Doku_Event $event) {
*/
public function addbutton_pdf_new(Doku_Event $event) {
if($event->data['view'] != 'page') return;
array_splice($event->data['items'], -1, 0, [new \dokuwiki\plugin\odt\MenuItemODTPDF()]);
if($this->getConf('showpdfexportbutton')) {
array_splice($event->data['items'], -1, 0, [new \dokuwiki\plugin\odt\MenuItemODTPDF()]);
}
}
/***********************************************************************************

0 comments on commit b34d220

Please sign in to comment.