Commit 1eb44162 authored by Nigel McNie's avatar Nigel McNie
Browse files

Remove the last remnants of the myportfolio theme, and fix a bug that causes a...

Remove the last remnants of the myportfolio theme, and fix a bug that causes a crash when choosing themes without a config.php

Now it is expected that all themes have a config.php.
(cherry picked from commit ed48e680)
parent 0b3d89ce
......@@ -451,9 +451,9 @@ function get_language_root($language=null) {
}
/**
* Return a list of available themes
* Need to add the theme names sometime; for now use get_string().
* Return a list of available themes.
*
* Themes _must_ have a config.php, and it should specify a theme name.
*/
function get_themes() {
$themes = array();
......@@ -463,8 +463,6 @@ function get_themes() {
}
while (false !== ($subdir = readdir($themedir))) {
if ($subdir != "." && $subdir != ".." && is_dir($themebase . $subdir)) {
$themes[$subdir] = $subdir;
$config_path = $themebase . $subdir . '/config.php';
if (is_readable($config_path)) {
require($config_path);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment