summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-04-24 14:42:35 +0000
committerDries Buytaert <dries@buytaert.net>2010-04-24 14:42:35 +0000
commit3e547ae045849264745f8cc456a0f379246060ea (patch)
tree6ff4b094ae4a65b411f6f3a68f831a5dfaa60e49
parent237b0da86c3a4d934353a9c3076cdfeaa56cb5d8 (diff)
downloadbrdo-3e547ae045849264745f8cc456a0f379246060ea.tar.gz
brdo-3e547ae045849264745f8cc456a0f379246060ea.tar.bz2
- Patch #779494 by marcingy: fixed notices on install screens.
-rw-r--r--includes/theme.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index 2f07c2633..e6c1f596d 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -2105,9 +2105,8 @@ function _template_preprocess_default_variables() {
'logged_in' => FALSE,
);
- // user_access() does not exist when the database is not available because
- // user.module has not been included.
- if (function_exists('user_access')) {
+ // The user object has no uid property when the database does not exist.
+ if (isset($user->uid)) {
$variables['is_admin'] = user_access('access administration pages');
$variables['logged_in'] = ($user->uid > 0);
}