X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ftheme.php;h=fbcbbe052a3934eaad47fdd94d28ed15f1506dfd;hb=c6b1b3e5e3ad1c47c7bd25b5bcfb0a8cb1cb2bb5;hp=b5f2b58cf2401ba142f8cbdbc242a831b63d8944;hpb=513c54fa89085fde783a73c298d61576f834b131;p=quix0rs-gnu-social.git diff --git a/lib/theme.php b/lib/theme.php index b5f2b58cf2..fbcbbe052a 100644 --- a/lib/theme.php +++ b/lib/theme.php @@ -53,6 +53,8 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { */ class Theme { + const FALLBACK = 'neo'; + var $name = null; var $dir = null; var $path = null; @@ -99,7 +101,19 @@ class Theme if (file_exists($fulldir) && is_dir($fulldir)) { $this->dir = $fulldir; $this->path = $this->relativeThemePath('theme', 'theme', $name); + return; } + + // Ruh roh. Fall back to default, then. + + common_log(LOG_WARNING, sprintf("Unable to find theme '%s', falling back to default theme '%s'", + $name, + Theme::FALLBACK)); + + $this->name = Theme::FALLBACK; + $this->dir = $instroot.'/'.Theme::FALLBACK; + $this->path = $this->relativeThemePath('theme', 'theme', Theme::FALLBACK); + } /**