Skip to content

Commit

Permalink
display error message if used with an unsupported template and inc/in…
Browse files Browse the repository at this point in the history
…it.php has not been adjusted
  • Loading branch information
selfthinker committed Mar 24, 2013
1 parent 40aeb42 commit f321ed5
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions action.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,19 @@ function register(&$controller) {
* @author Anika Henke <anika@selfthinker.org>
*/
function _defineConstants(&$event, $param) {
global $conf;

// define Template baseURL
define('DOKU_TPL', DOKU_BASE.'lib/tpl/'.$conf['template'].'/');

// define real Template directory
define('DOKU_TPLINC', DOKU_INC.'lib/tpl/'.$conf['template'].'/');
if (defined('DOKU_TPL') || defined('DOKU_TPLINC')) {
msg('This template uses deprecated DOKU_TPL and DOKU_TPLINC and will therefore not work
properly with the loadskin plugin. Please remove their definition from inc/init.php
or fix the template.', -1);
} else {
global $conf;

// define Template baseURL
define('DOKU_TPL', DOKU_BASE.'lib/tpl/'.$conf['template'].'/');

// define real Template directory
define('DOKU_TPLINC', DOKU_INC.'lib/tpl/'.$conf['template'].'/');
}
}

/**
Expand Down

0 comments on commit f321ed5

Please sign in to comment.