Skip to content

Commit

Permalink
Fix for older Dokuwiki release
Browse files Browse the repository at this point in the history
  • Loading branch information
giterlizzi committed Sep 29, 2017
1 parent 3becdef commit 60f8594
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions admin/config.php
Expand Up @@ -79,8 +79,16 @@ private function getFileInfo() {

case 'userstyle':
case 'userscript':
$configs = $config_cascade[$type][$file];
$file_local = @$configs[0];

$configs = $config_cascade[$type][$file];

# Detect new DokuWiki release config (css, less)
if (is_array(@$configs)) {
$file_local = @$configs[0];
} else {
$file_local = $configs;
}

break;

case 'hook':
Expand All @@ -104,8 +112,12 @@ private function getFileInfo() {
break;

case 'userscript':
$configs = $config_cascade['userscript'];
$file_local = @$configs['default'][0];
$configs = $config_cascade['userscript'];
if (is_array(@$configs['default'])) {
$file_local = @$configs['default'][0];
} else {
$file_local = @$configs['default'];
}
break;

default:
Expand Down

0 comments on commit 60f8594

Please sign in to comment.