diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-06-17 22:23:46 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-06-17 22:23:46 +0100 |
| commit | f5b8f12352d4ad8c8d17b426d08d98b849c35ebd (patch) | |
| tree | cc9f37d26df98deeca032cc874ada900b0dfa2be /app/Date.php | |
| parent | 8a10c5e03d7b19809bccd6c170a11f6aa93dabe7 (diff) | |
| download | webtrees-f5b8f12352d4ad8c8d17b426d08d98b849c35ebd.tar.gz webtrees-f5b8f12352d4ad8c8d17b426d08d98b849c35ebd.tar.bz2 webtrees-f5b8f12352d4ad8c8d17b426d08d98b849c35ebd.zip | |
Use rel=nofollow instead of hiding links
Diffstat (limited to 'app/Date.php')
| -rw-r--r-- | app/Date.php | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/app/Date.php b/app/Date.php index f5915f7b27..e8d7e8523c 100644 --- a/app/Date.php +++ b/app/Date.php @@ -216,11 +216,6 @@ class Date { public function display($url = false, $date_format = null, $convert_calendars = true) { global $WT_TREE; - // Search engines do not get links to the calendar pages - if (Auth::isSearchEngine()) { - $url = false; - } - $CALENDAR_FORMAT = $WT_TREE->getPreference('CALENDAR_FORMAT'); if ($date_format === null) { @@ -268,9 +263,9 @@ class Date { if ($d1 != $d1tmp && $d1tmp !== '') { if ($url) { if ($CALENDAR_FORMAT !== 'none') { - $conv1 .= ' <span dir="' . I18N::direction() . '">(<a href="' . $d1conv->calendarUrl($date_format) . '">' . $d1tmp . '</a>)</span>'; + $conv1 .= ' <span dir="' . I18N::direction() . '">(<a href="' . $d1conv->calendarUrl($date_format) . '" rel="nofollow">' . $d1tmp . '</a>)</span>'; } else { - $conv1 .= ' <span dir="' . I18N::direction() . '"><br><a href="' . $d1conv->calendarUrl($date_format) . '">' . $d1tmp . '</a></span>'; + $conv1 .= ' <span dir="' . I18N::direction() . '"><br><a href="' . $d1conv->calendarUrl($date_format) . '" rel="nofollow">' . $d1tmp . '</a></span>'; } } else { $conv1 .= ' <span dir="' . I18N::direction() . '">(' . $d1tmp . ')</span>'; @@ -278,7 +273,7 @@ class Date { } if (!is_null($this->date2) && $d2 != $d2tmp && $d1tmp != '') { if ($url) { - $conv2 .= ' <span dir="' . I18N::direction() . '">(<a href="' . $d2conv->calendarUrl($date_format) . '">' . $d2tmp . '</a>)</span>'; + $conv2 .= ' <span dir="' . I18N::direction() . '">(<a href="' . $d2conv->calendarUrl($date_format) . '" rel="nofollow">' . $d2tmp . '</a>)</span>'; } else { $conv2 .= ' <span dir="' . I18N::direction() . '">(' . $d2tmp . ')</span>'; } @@ -288,9 +283,9 @@ class Date { // Add URLs, if requested if ($url) { - $d1 = '<a href="' . $this->date1->calendarUrl($date_format) . '">' . $d1 . '</a>'; + $d1 = '<a href="' . $this->date1->calendarUrl($date_format) . '" rel="nofollow">' . $d1 . '</a>'; if (!is_null($this->date2)) { - $d2 = '<a href="' . $this->date2->calendarUrl($date_format) . '">' . $d2 . '</a>'; + $d2 = '<a href="' . $this->date2->calendarUrl($date_format) . '" rel="nofollow">' . $d2 . '</a>'; } } |
