bjori Tue Aug 14 12:22:19 2007 UTC
Modified files: /phd build.php Log: There is no need to check for a callback on a empty callmap http://cvs.php.net/viewvc.cgi/phd/build.php?r1=1.19&r2=1.20&diff_format=u Index: phd/build.php diff -u phd/build.php:1.19 phd/build.php:1.20 --- phd/build.php:1.19 Tue Aug 14 12:04:12 2007 +++ phd/build.php Tue Aug 14 12:22:19 2007 @@ -1,5 +1,5 @@ <?php -/* $Id: build.php,v 1.19 2007/08/14 12:04:12 bjori Exp $ */ +/* $Id: build.php,v 1.20 2007/08/14 12:22:19 bjori Exp $ */ function err($no, $str, $file, $line) { global $notify; @@ -81,8 +81,17 @@ default: $themes[$themename] = new $themename($IDs); } - $elementmaps[$themename] = $themes[$themename]->getElementMap(); - $textmaps[$themename] = $themes[$themename]->getTextMap(); + + // If the theme returns empty callback map there is no need to include it + $tmp = $themes[$themename]->getElementMap(); + if(!empty($tmp)) { + $elementmaps[$themename] = $tmp; + } + + $tmp = $themes[$themename]->getTextMap(); + if (!empty($tmp)) { + $textmaps[$themename] = $tmp; + } } }