summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Functions/FunctionsPrint.php24
-rw-r--r--app/Functions/FunctionsPrintLists.php2
-rw-r--r--app/Module/ClippingsCartModule.php19
-rw-r--r--app/Module/DescendancyModule.php2
-rw-r--r--app/Module/FamiliesSidebarModule.php2
-rw-r--r--app/Module/FamilyNavigatorModule.php6
-rw-r--r--app/Module/FrequentlyAskedQuestionsModule.php11
-rw-r--r--app/Module/GoogleMapsModule.php2
-rw-r--r--app/Module/StoriesModule.php4
-rw-r--r--app/Theme/AbstractTheme.php7
10 files changed, 29 insertions, 50 deletions
diff --git a/app/Functions/FunctionsPrint.php b/app/Functions/FunctionsPrint.php
index ee622d5f30..f6332d3958 100644
--- a/app/Functions/FunctionsPrint.php
+++ b/app/Functions/FunctionsPrint.php
@@ -278,20 +278,18 @@ class FunctionsPrint {
}
$values = array('<a href="' . $person->getHtmlUrl() . '">' . $person->getFullName() . '</a>');
- if (!Auth::isSearchEngine()) {
- foreach ($associates as $associate) {
- $relationship_name = Functions::getAssociateRelationshipName($associate, $person);
- if (!$relationship_name) {
- $relationship_name = GedcomTag::getLabel('RELA');
- }
-
- if ($parent instanceof Family) {
- // For family ASSO records (e.g. MARR), identify the spouse with a sex icon
- $relationship_name .= $associate->getSexImage();
- }
+ foreach ($associates as $associate) {
+ $relationship_name = Functions::getAssociateRelationshipName($associate, $person);
+ if (!$relationship_name) {
+ $relationship_name = GedcomTag::getLabel('RELA');
+ }
- $values[] = '<a href="relationship.php?pid1=' . $associate->getXref() . '&amp;pid2=' . $person->getXref() . '&amp;ged=' . $associate->getTree()->getNameUrl() . '">' . $relationship_name . '</a>';
+ if ($parent instanceof Family) {
+ // For family ASSO records (e.g. MARR), identify the spouse with a sex icon
+ $relationship_name .= $associate->getSexImage();
}
+
+ $values[] = '<a href="relationship.php?pid1=' . $associate->getXref() . '&amp;pid2=' . $person->getXref() . '&amp;ged=' . $associate->getTree()->getNameUrl() . '" rel="nofollow">' . $relationship_name . '</a>';
}
$value = implode(' — ', $values);
@@ -393,7 +391,7 @@ class FunctionsPrint {
// Calculated age
if (preg_match('/\n2 DATE (.+)/', $factrec, $match)) {
$date = new Date($match[1]);
- $html .= ' ' . $date->display($anchor && !Auth::isSearchEngine());
+ $html .= ' ' . $date->display($anchor);
// time
if ($time && preg_match('/\n3 TIME (.+)/', $factrec, $match)) {
$html .= ' – <span class="date">' . $match[1] . '</span>';
diff --git a/app/Functions/FunctionsPrintLists.php b/app/Functions/FunctionsPrintLists.php
index 8710cc3059..8103f70d72 100644
--- a/app/Functions/FunctionsPrintLists.php
+++ b/app/Functions/FunctionsPrintLists.php
@@ -1994,7 +1994,7 @@ class FunctionsPrintLists {
}
$html .= '</td>';
$html .= '<td>' . $record->getSortName() . '</td>';
- $html .= '<td>' . $fact->getDate()->display(!Auth::isSearchEngine()) . '</td>';
+ $html .= '<td>' . $fact->getDate()->display() . '</td>';
$html .= '<td>' . $n . '</td>';
$html .= '<td>' . ($fact->anniv ? I18N::number($fact->anniv) : '') . '</td>';
$html .= '<td>' . $fact->anniv . '</td>';
diff --git a/app/Module/ClippingsCartModule.php b/app/Module/ClippingsCartModule.php
index ea72313949..0c24ff6306 100644
--- a/app/Module/ClippingsCartModule.php
+++ b/app/Module/ClippingsCartModule.php
@@ -488,17 +488,14 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
public function getMenu() {
global $controller, $WT_TREE;
- if (Auth::isSearchEngine()) {
- return null;
- }
//-- main clippings menu item
- $menu = new Menu($this->getTitle(), 'module.php?mod=clippings&amp;mod_action=index&amp;ged=' . $WT_TREE->getNameUrl(), 'menu-clippings');
+ $menu = new Menu($this->getTitle(), 'module.php?mod=clippings&amp;mod_action=index&amp;ged=' . $WT_TREE->getNameUrl(), 'menu-clippings', array('rel' => 'nofollow'));
if (isset($controller->record)) {
- $submenu = new Menu($this->getTitle(), 'module.php?mod=clippings&amp;mod_action=index&amp;ged=' . $WT_TREE->getNameUrl(), 'menu-clippingscart');
+ $submenu = new Menu($this->getTitle(), 'module.php?mod=clippings&amp;mod_action=index&amp;ged=' . $WT_TREE->getNameUrl(), 'menu-clippingscart', array('rel' => 'nofollow'));
$menu->addSubmenu($submenu);
}
if (!empty($controller->record) && $controller->record->canShow()) {
- $submenu = new Menu(I18N::translate('Add to the clippings cart'), 'module.php?mod=clippings&amp;mod_action=index&amp;action=add&amp;id=' . $controller->record->getXref(), 'menu-clippingsadd');
+ $submenu = new Menu(I18N::translate('Add to the clippings cart'), 'module.php?mod=clippings&amp;mod_action=index&amp;action=add&amp;id=' . $controller->record->getXref(), 'menu-clippingsadd', array('rel' => 'nofollow'));
$menu->addSubmenu($submenu);
}
@@ -512,14 +509,10 @@ class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface,
/** {@inheritdoc} */
public function hasSidebarContent() {
- if (Auth::isSearchEngine()) {
- return false;
- } else {
- // Creating a controller has the side effect of initialising the cart
- new ClippingsCartController;
+ // Creating a controller has the side effect of initialising the cart
+ new ClippingsCartController;
- return true;
- }
+ return true;
}
/**
diff --git a/app/Module/DescendancyModule.php b/app/Module/DescendancyModule.php
index f26b65b899..602b842950 100644
--- a/app/Module/DescendancyModule.php
+++ b/app/Module/DescendancyModule.php
@@ -74,7 +74,7 @@ class DescendancyModule extends AbstractModule implements ModuleSidebarInterface
/** {@inheritdoc} */
public function hasSidebarContent() {
- return !Auth::isSearchEngine();
+ return true;
}
/** {@inheritdoc} */
diff --git a/app/Module/FamiliesSidebarModule.php b/app/Module/FamiliesSidebarModule.php
index e06a237383..2758c85ce0 100644
--- a/app/Module/FamiliesSidebarModule.php
+++ b/app/Module/FamiliesSidebarModule.php
@@ -63,7 +63,7 @@ class FamiliesSidebarModule extends AbstractModule implements ModuleSidebarInter
/** {@inheritdoc} */
public function hasSidebarContent() {
- return !Auth::isSearchEngine();
+ return true;
}
/** {@inheritdoc} */
diff --git a/app/Module/FamilyNavigatorModule.php b/app/Module/FamilyNavigatorModule.php
index ff5f330908..9ad7e8e72c 100644
--- a/app/Module/FamilyNavigatorModule.php
+++ b/app/Module/FamilyNavigatorModule.php
@@ -47,7 +47,7 @@ class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInter
/** {@inheritdoc} */
public function hasSidebarContent() {
- return !Auth::isSearchEngine();
+ return true;
}
/** {@inheritdoc} */
@@ -196,7 +196,7 @@ class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInter
$mother = null;
$html = sprintf(self::TTL, I18N::translate('Parents'));
$family = $person->getPrimaryChildFamily();
- if (!Auth::isSearchEngine() && $person->canShowName() && $family !== null) {
+ if ($person->canShowName() && $family !== null) {
$father = $family->getHusband();
$mother = $family->getWife();
$html .= $this->getHTML($father) .
@@ -235,7 +235,7 @@ class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInter
*/
private function getFamily(Individual $person) {
$html = '';
- if ($person->canShowName() && !Auth::isSearchEngine()) {
+ if ($person->canShowName()) {
foreach ($person->getSpouseFamilies() as $family) {
$spouse = $family->getSpouse($person);
$html .= $this->getHTML($spouse, true);
diff --git a/app/Module/FrequentlyAskedQuestionsModule.php b/app/Module/FrequentlyAskedQuestionsModule.php
index db2d175f81..c2a1a0be3b 100644
--- a/app/Module/FrequentlyAskedQuestionsModule.php
+++ b/app/Module/FrequentlyAskedQuestionsModule.php
@@ -503,10 +503,6 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen
public function getMenu() {
global $WT_TREE;
- if (Auth::isSearchEngine()) {
- return null;
- }
-
$faqs = Database::prepare(
"SELECT block_id FROM `##block` WHERE module_name = :module_name AND IFNULL(gedcom_id, :tree_id_1) = :tree_id_2"
)->execute(array(
@@ -515,12 +511,11 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen
'tree_id_2' => $WT_TREE->getTreeId(),
))->fetchAll();
- if (!$faqs) {
+ if ($faqs) {
+ return new Menu(I18N::translate('FAQ'), 'module.php?mod=faq&amp;mod_action=show', 'menu-help');
+ } else {
return null;
}
- $menu = new Menu(I18N::translate('FAQ'), 'module.php?mod=faq&amp;mod_action=show', 'menu-help');
-
- return $menu;
}
}
diff --git a/app/Module/GoogleMapsModule.php b/app/Module/GoogleMapsModule.php
index c01585726c..42726ca125 100644
--- a/app/Module/GoogleMapsModule.php
+++ b/app/Module/GoogleMapsModule.php
@@ -204,7 +204,7 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
/** {@inheritdoc} */
public function hasTabContent() {
- return !Auth::isSearchEngine() && (Module::getModuleByName('googlemap') || Auth::isAdmin());
+ return Module::getModuleByName('googlemap') || Auth::isAdmin();
}
/** {@inheritdoc} */
diff --git a/app/Module/StoriesModule.php b/app/Module/StoriesModule.php
index 04401ff06b..523cf6f032 100644
--- a/app/Module/StoriesModule.php
+++ b/app/Module/StoriesModule.php
@@ -503,10 +503,6 @@ class StoriesModule extends AbstractModule implements ModuleTabInterface, Module
* @return Menu|null
*/
public function getMenu() {
- if (Auth::isSearchEngine()) {
- return null;
- }
-
$menu = new Menu($this->getTitle(), 'module.php?mod=' . $this->getName() . '&amp;mod_action=show_list', 'menu-story');
return $menu;
diff --git a/app/Theme/AbstractTheme.php b/app/Theme/AbstractTheme.php
index 9e1cb38fa3..0931d3014c 100644
--- a/app/Theme/AbstractTheme.php
+++ b/app/Theme/AbstractTheme.php
@@ -1518,13 +1518,10 @@ abstract class AbstractTheme {
protected function menuModules() {
$menus = array();
foreach (Module::getActiveMenus($this->tree) as $module) {
- $menu = $module->getMenu();
- if ($menu) {
- $menus[] = $menu;
- }
+ $menus[] = $module->getMenu();
}
- return $menus;
+ return array_filter($menus);
}
/**