From 836432bb9abf332894f2891c03adf19f22494ab1 Mon Sep 17 00:00:00 2001
From: Michael Vogel <icarus@dabo.de>
Date: Tue, 30 Jun 2015 07:42:59 +0200
Subject: [PATCH] Removed Google Maps

---
 include/conversation.php | 18 +++++++-----------
 mod/content.php          |  4 ++--
 object/Item.php          |  2 +-
 3 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/include/conversation.php b/include/conversation.php
index cdd3118ce..4aae61180 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -597,7 +597,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
 				$locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
 				call_hooks('render_location',$locate);
 
-				$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate));
+				$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
 
 				localize_item($item);
 				if($mode === 'network-new')
@@ -1229,14 +1229,10 @@ function find_thread_parent_index($arr,$x) {
 	return false;
 }
 
-function render_location_google($item) {
-	$location = (($item['location']) ? '<a target="map" title="' . $item['location'] . '" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
-	$coord = (($item['coord']) ? '<a target="map" title="' . $item['coord'] . '" href="http://maps.google.com/?q=' . urlencode($item['coord']) . '">' . $item['coord'] . '</a>' : '');
-	if($coord) {
-		if($location)
-			$location .= '<br /><span class="smalltext">(' . $coord . ')</span>';
-		else
-			$location = '<span class="smalltext">' . $coord . '</span>';
-	}
-	return $location;
+function render_location_dummy($item) {
+	if ($item['location'] != "")
+		return $item['location'];
+
+	if ($item['coord'] != "")
+		return $item['coord'];
 }
diff --git a/mod/content.php b/mod/content.php
index e20345307..cec23a914 100644
--- a/mod/content.php
+++ b/mod/content.php
@@ -425,7 +425,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
 				$locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
 				call_hooks('render_location',$locate);
 
-				$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate));
+				$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
 
 				localize_item($item);
 				if($mode === 'network-new')
@@ -799,7 +799,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
 				$locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
 				call_hooks('render_location',$locate);
 
-				$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate));
+				$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
 
 				$indent = (($toplevelpost) ? '' : ' comment');
 
diff --git a/object/Item.php b/object/Item.php
index aa9792b15..3211048ce 100644
--- a/object/Item.php
+++ b/object/Item.php
@@ -155,7 +155,7 @@ class Item extends BaseObject {
 
 		$locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
 		call_hooks('render_location',$locate);
-		$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate));
+		$location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
 
 		$searchpath = $a->get_baseurl()."/search?tag=";
 		$tags=array();