Skip to content

Commit

Permalink
Make php8 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
atisne committed Feb 16, 2024
1 parent ce96249 commit 16eff71
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion action.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ function register(Doku_Event_Handler $controller) {
}

function _renderer_content_postprocess(&$event, $param) {
if ($_GET['do'] !== 'export_revealjs' && $this->getConf('revealjs_active')) {
global $INPUT;

if ($INPUT->get->str('do') !== 'export_revealjs' && $this->getConf('revealjs_active')) {
/* close last edit section correctly (missing </div>), because we close sections
only when a new one is opened - and this logic fails for the last section in the
document */
Expand Down
2 changes: 1 addition & 1 deletion renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ function _highlight($type, $text, $language = null, $filename = null, $options =
$this->doc .= '</a></dt>'.DOKU_LF.'<dd>';
}

if($text{0} == "\n") {
if($text[0] == "\n") {
$text = substr($text, 1);
}
if(substr($text, -1) == "\n") {
Expand Down
3 changes: 2 additions & 1 deletion syntax/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ public function connectTo($mode) {
public function handle($match, $state, $pos, Doku_Handler $handler) {
/* We reuse and adapt here the default DokuWiki header handler code. See also
/inc/parser/handler.php around line 97. */
global $INPUT;

// get level and title
$title = trim($match);
$level = 7 - strspn($title,'=');
if($level < 1) $level = 1;
$title = trim($title,'= ');
if ($this->getConf('revealjs_active') || $_GET['do']=='export_revealjs') {
if ($this->getConf('revealjs_active') || $INPUT->get->str('do') == 'export_revealjs') {
/* We are now on a reveal.js activated page and we want to do our
own section handling to be able to get all relevant content from
one slide into one edit section. Since sections are header driven,
Expand Down

0 comments on commit 16eff71

Please sign in to comment.