Move Cache to src
Cache class moved to Friendica\Core namespace
This commit is contained in:
parent
aec554f4d9
commit
036754e455
4 changed files with 76 additions and 46 deletions
|
@ -7,35 +7,40 @@
|
|||
*
|
||||
*/
|
||||
|
||||
require_once('include/cache.php');
|
||||
use Friendica\Core\Cache;
|
||||
|
||||
|
||||
function googlemaps_install() {
|
||||
function googlemaps_install()
|
||||
{
|
||||
register_hook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
|
||||
|
||||
logger("installed googlemaps");
|
||||
}
|
||||
|
||||
function googlemaps_uninstall() {
|
||||
function googlemaps_uninstall()
|
||||
{
|
||||
unregister_hook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
|
||||
|
||||
logger("removed googlemaps");
|
||||
}
|
||||
|
||||
function googlemaps_location($a, &$item) {
|
||||
function googlemaps_location($a, &$item)
|
||||
{
|
||||
|
||||
if(! (strlen($item['location']) || strlen($item['coord'])))
|
||||
if(! (strlen($item['location']) || strlen($item['coord']))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($item['coord'] != "")
|
||||
if ($item['coord'] != ""){
|
||||
$target = "http://maps.google.com/?q=".urlencode($item['coord']);
|
||||
else
|
||||
} else {
|
||||
$target = "http://maps.google.com/?q=".urlencode($item['location']);
|
||||
}
|
||||
|
||||
if ($item['location'] != "")
|
||||
if ($item['location'] != "") {
|
||||
$title = $item['location'];
|
||||
else
|
||||
} else {
|
||||
$title = $item['coord'];
|
||||
}
|
||||
|
||||
$item['html'] = '<a target="map" title="'.$title.'" href= "'.$target.'">'.$title.'</a>';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue