Skip to content

Commit

Permalink
Fix svg replacement in Greebo+
Browse files Browse the repository at this point in the history
A recent DokuWiki merge request changed how the style.ini can be
accessed: dokuwiki/dokuwiki#2241
  • Loading branch information
micgro42 committed Apr 11, 2018
1 parent 7b3c2fe commit 8c8001b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions svg.php
Expand Up @@ -318,9 +318,18 @@ protected function abort($status) {
*/
protected function initReplacements() {
global $conf;
define('SIMPLE_TEST', 1); // hacky shit
include DOKU_INC . 'lib/exe/css.php';
$ini = css_styleini($conf['template']);
if (!class_exists('\dokuwiki\StyleUtils')) {
// Pre-Greebo Compatibility

define('SIMPLE_TEST', 1); // hacky shit
include DOKU_INC . 'lib/exe/css.php';
$ini = css_styleini($conf['template']);
$this->replacements = $ini['replacements'];
return;
}

$stuleUtils = new \dokuwiki\StyleUtils();
$ini = $stuleUtils->cssStyleini('sprintdoc');
$this->replacements = $ini['replacements'];
}
}
Expand Down

0 comments on commit 8c8001b

Please sign in to comment.