summaryrefslogtreecommitdiff
path: root/library/WT/MenuBar.php
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2012-09-15 12:49:55 +0000
committerfisharebest <fisharebest@gmail.com>2012-09-15 12:49:55 +0000
commitbe0028fa426bc3b1c652e264f18a4fb9e5b17eb0 (patch)
tree46a6646758ca1e950f32fdcecf00d277719bc5b2 /library/WT/MenuBar.php
parent7e4c31f7319da04ae26b506f2771289d5b8362c7 (diff)
downloadwebtrees-be0028fa426bc3b1c652e264f18a4fb9e5b17eb0.tar.gz
webtrees-be0028fa426bc3b1c652e264f18a4fb9e5b17eb0.tar.bz2
webtrees-be0028fa426bc3b1c652e264f18a4fb9e5b17eb0.zip
Fix: lots of issues when there are either no trees, or no trees with public access
Diffstat (limited to 'library/WT/MenuBar.php')
-rw-r--r--library/WT/MenuBar.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/WT/MenuBar.php b/library/WT/MenuBar.php
index 45351a7726..1b3b864853 100644
--- a/library/WT/MenuBar.php
+++ b/library/WT/MenuBar.php
@@ -91,7 +91,7 @@ class WT_MenuBar {
public static function getChartsMenu() {
global $SEARCH_SPIDER, $controller;
- if ($SEARCH_SPIDER) {
+ if ($SEARCH_SPIDER || !WT_GED_ID) {
return null;
}
@@ -445,7 +445,7 @@ class WT_MenuBar {
public static function getThemeMenu() {
global $SEARCH_SPIDER;
- if (!$SEARCH_SPIDER && WT_Site::preference('ALLOW_USER_THEMES') && get_gedcom_setting(WT_GED_ID, 'ALLOW_THEME_DROPDOWN')) {
+ if (WT_GED_ID && !$SEARCH_SPIDER && WT_Site::preference('ALLOW_USER_THEMES') && get_gedcom_setting(WT_GED_ID, 'ALLOW_THEME_DROPDOWN')) {
$menu=new WT_Menu(WT_I18N::translate('Theme'), '#', 'menu-theme');
foreach (get_theme_names() as $themename=>$themedir) {
$submenu=new WT_Menu($themename, get_query_url(array('theme'=>$themedir), '&amp;'), 'menu-theme-'.$themedir);