aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorJerome Bakker <jeabakker@coldtrick.com>2012-09-28 12:40:13 +0200
committerJerome Bakker <jeabakker@coldtrick.com>2012-09-28 12:40:13 +0200
commitddb3c10f7bbd0f0d78aafb5f858119160eb21f12 (patch)
tree6b938eb7d0b568b6196d1e74011b489140457d59 /engine
parent766fe8ebbcc600982dddce4d93b15b65a7b8c1fb (diff)
downloadelgg-ddb3c10f7bbd0f0d78aafb5f858119160eb21f12.tar.gz
elgg-ddb3c10f7bbd0f0d78aafb5f858119160eb21f12.tar.bz2
fixed: elgg_get_site_entity now works as documented
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/sites.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/engine/lib/sites.php b/engine/lib/sites.php
index 850092cad..8b772668d 100644
--- a/engine/lib/sites.php
+++ b/engine/lib/sites.php
@@ -18,11 +18,19 @@
function elgg_get_site_entity($site_guid = 0) {
global $CONFIG;
+ $result = false;
+
if ($site_guid == 0) {
- return $CONFIG->site;
+ $site = $CONFIG->site;
+ } else {
+ $site = get_entity($site_guid);
+ }
+
+ if($site instanceof ElggSite){
+ $result = $site;
}
- return get_entity($site_guid);
+ return $result;
}
/**