function get_theme_config_file($theme)
{
$a = get_app();
- $base_theme = $a->theme_info['extends'];
+ if (!empty($a->theme_info['extends'])) {
+ $base_theme = $a->theme_info['extends'];
+ }
if (file_exists("view/theme/$theme/config.php")) {
return "view/theme/$theme/config.php";
}
- if (file_exists("view/theme/$base_theme/config.php")) {
+ if (!empty($base_theme) && file_exists("view/theme/$base_theme/config.php")) {
return "view/theme/$base_theme/config.php";
}
return null;
$err .= L10n::t('Invalid email.');
}
// ensure new email is not the admin mail
- //if ((x($a->config, 'admin_email')) && (strcasecmp($email, $a->config['admin_email']) == 0)) {
- if (x($a->config, 'admin_email')) {
- $adminlist = explode(",", str_replace(" ", "", strtolower($a->config['admin_email'])));
+ if (Config::get('config', 'admin_email')) {
+ $adminlist = explode(",", str_replace(" ", "", strtolower(Config::get('config', 'admin_email'))));
if (in_array(strtolower($email), $adminlist)) {
$err .= L10n::t('Cannot change to that email.');
$email = $a->user['email'];
// Private/public post links for the non-JS ACL form
$private_post = 1;
- if ($_REQUEST['public']) {
+ if (!empty($_REQUEST['public']) && !$_REQUEST['public']) {
$private_post = 0;
}