aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggEntity.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
committerSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
commite53d410129701ea1c9d19529afa493f11b5f5b70 (patch)
treed9963b24bf8932654b4a47e36602c75975e50dba /engine/classes/ElggEntity.php
parent377da25d2965c64941f83baae119fc970ec60982 (diff)
parent08a962c98e2923724f8013d6eaae89101243752a (diff)
downloadelgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.gz
elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.bz2
Merge github.com:Elgg/Elgg
Conflicts: engine/lib/input.php
Diffstat (limited to 'engine/classes/ElggEntity.php')
-rw-r--r--engine/classes/ElggEntity.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php
index 2fa0d7b02..fdf2a80ea 100644
--- a/engine/classes/ElggEntity.php
+++ b/engine/classes/ElggEntity.php
@@ -1179,16 +1179,16 @@ abstract class ElggEntity extends ElggData implements
return $this->icon_override[$size];
}
- $url = "_graphics/icons/default/$size.png";
- $url = elgg_normalize_url($url);
-
$type = $this->getType();
$params = array(
'entity' => $this,
'size' => $size,
);
- $url = elgg_trigger_plugin_hook('entity:icon:url', $type, $params, $url);
+ $url = elgg_trigger_plugin_hook('entity:icon:url', $type, $params, null);
+ if ($url == null) {
+ $url = "_graphics/icons/default/$size.png";
+ }
return elgg_normalize_url($url);
}
@@ -1434,10 +1434,11 @@ abstract class ElggEntity extends ElggData implements
*
* @param string $location String representation of the location
*
- * @return true
+ * @return bool
*/
public function setLocation($location) {
- return $this->location = $location;
+ $this->location = $location;
+ return true;
}
/**
@@ -1446,7 +1447,7 @@ abstract class ElggEntity extends ElggData implements
* @param float $lat Latitude
* @param float $long Longitude
*
- * @return true
+ * @return bool
* @todo Unimplemented
*/
public function setLatLong($lat, $long) {
@@ -1459,20 +1460,20 @@ abstract class ElggEntity extends ElggData implements
/**
* Return the entity's latitude.
*
- * @return int
+ * @return float
* @todo Unimplemented
*/
public function getLatitude() {
- return $this->get('geo:lat');
+ return (float)$this->get('geo:lat');
}
/**
* Return the entity's longitude
*
- * @return Int
+ * @return float
*/
public function getLongitude() {
- return $this->get('geo:long');
+ return (float)$this->get('geo:long');
}
/*