diff --git a/action/ajax.php b/action/ajax.php index dbba8859..5778f35a 100644 --- a/action/ajax.php +++ b/action/ajax.php @@ -42,7 +42,9 @@ public function handleAjax(Event $event) try { $result = $this->executeTypeAjax(); } catch (StructException $e) { - $result = ['error' => $e->getMessage() . ' ' . basename($e->getFile()) . ':' . $e->getLine()]; + $result = [ + 'error' => $e->getMessage() . ' ' . basename($e->getFile()) . ':' . $e->getLine() + ]; if ($conf['allowdebug']) { $result['stacktrace'] = $e->getTraceAsString(); } diff --git a/action/cache.php b/action/cache.php index 5b27fda9..6d0135d6 100644 --- a/action/cache.php +++ b/action/cache.php @@ -1,8 +1,8 @@ has($key)) { $event->result = false; diff --git a/action/output.php b/action/output.php index 220d005a..332f7982 100644 --- a/action/output.php +++ b/action/output.php @@ -8,8 +8,8 @@ */ use dokuwiki\Extension\ActionPlugin; -use dokuwiki\Extension\EventHandler; use dokuwiki\Extension\Event; +use dokuwiki\Extension\EventHandler; use dokuwiki\plugin\struct\meta\Schema; /** @@ -48,6 +48,7 @@ public function register(EventHandler $controller) public function handleOutput(Event $event, $param) { global $ID; + if (!$ID) return; if (!page_exists($ID)) return; $pos = 0; @@ -77,7 +78,15 @@ public function handleOutput(Event $event, $param) $event->data->calls, $ins + 1, 0, - [['plugin', ['struct_output', ['pos' => $pos], DOKU_LEXER_SPECIAL, ''], $pos]] + [ + [ + 'plugin', + [ + 'struct_output', ['pos' => $pos], DOKU_LEXER_SPECIAL, '' + ], + $pos + ] + ] ); } diff --git a/admin/assignments.php b/admin/assignments.php index 6f6a9a42..52c082a0 100644 --- a/admin/assignments.php +++ b/admin/assignments.php @@ -10,7 +10,6 @@ // must be run within Dokuwiki use dokuwiki\Extension\AdminPlugin; use dokuwiki\plugin\struct\meta\Assignments; -use dokuwiki\plugin\struct\meta\Schema; use dokuwiki\plugin\struct\meta\StructException; class admin_plugin_struct_assignments extends AdminPlugin @@ -120,7 +119,14 @@ public function html() $link = wl( $ID, - ['do' => 'admin', 'page' => 'struct_assignments', 'action' => 'delete', 'sectok' => getSecurityToken(), 'assignment[tbl]' => $schema, 'assignment[assign]' => $assignee] + [ + 'do' => 'admin', + 'page' => 'struct_assignments', + 'action' => 'delete', + 'sectok' => getSecurityToken(), + 'assignment[tbl]' => $schema, + 'assignment[assign]' => $assignee + ] ); echo '