Skip to content

Commit

Permalink
MDL-31984: add debugging message if theme renderer file is missnamed
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Jorgensen authored and Sam Hemelryk committed Mar 19, 2012
1 parent f359fd6 commit 6fc267a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/outputlib.php
Expand Up @@ -416,6 +416,12 @@ private function __construct($config) {
if (is_readable($rendererfile)) { if (is_readable($rendererfile)) {
// may contain core and plugin renderers and renderer factory // may contain core and plugin renderers and renderer factory
include_once($rendererfile); include_once($rendererfile);
} else {
// check if renderers.php file is missnamed renderer.php
if (is_readable($this->dir.'/renderer.php')) {
debugging('Developer hint: '.$this->dir.'/renderer.php should be renamed to ' . $this->dir."/renderers.php.
See: http://docs.moodle.org/dev/Output_renderers#Theme_renderers.", DEBUG_DEVELOPER);
}
} }


// cascade all layouts properly // cascade all layouts properly
Expand Down Expand Up @@ -1343,4 +1349,4 @@ protected function log($action, $type) {
protected function output_log() { protected function output_log() {
return '<ul>' . implode("\n", $this->log) . '</ul>'; return '<ul>' . implode("\n", $this->log) . '</ul>';
} }
} }

0 comments on commit 6fc267a

Please sign in to comment.