public function checkImgPath()
{
// try current theme first
if (is_dir($this->getPath() . '/img/')) {
$this->setImgPath($this->getPath() . '/img/');
return true;
}
// try fallback theme
$fallback = './themes/' . ThemeManager::FALLBACK_THEME . '/img/';
if (is_dir($fallback)) {
$this->setImgPath($fallback);
return true;
}
// we failed
trigger_error(sprintf(__('No valid image path for theme %s found!'), $this->getName()), E_USER_ERROR);
return false;
}