diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-14 15:46:48 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-14 15:46:48 +0000 |
commit | d074f8bb08d9bb5a0beda35764b5e9b2fe91e03c (patch) | |
tree | 6b2bc7dab770c24b0304d2ee5d73e9a76314ef0b | |
parent | 641dc210aaebb8db131db9100397fc4c386963da (diff) | |
download | elgg-d074f8bb08d9bb5a0beda35764b5e9b2fe91e03c.tar.gz elgg-d074f8bb08d9bb5a0beda35764b5e9b2fe91e03c.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* Removed debug
git-svn-id: https://code.elgg.org/elgg/trunk@221 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/sites.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/engine/lib/sites.php b/engine/lib/sites.php index 6dfbb3063..9f2ae442f 100644 --- a/engine/lib/sites.php +++ b/engine/lib/sites.php @@ -49,16 +49,14 @@ if (!empty($guid)) { // Is $guid is a DB row - either a entity row, or a site table row. - if ($guid instanceof stdClass) { -error_log("Creating by stdClass"); + if ($guid instanceof stdClass) { // Load the rest $this->load($guid->guid); } // Is $guid is an ElggSite? Use a copy constructor else if ($guid instanceof ElggSite) - { -error_log("Creating by ElggSite"); + { foreach ($guid->attributes as $key => $value) $this->attributes[$key] = $value; } @@ -69,8 +67,7 @@ error_log("Creating by ElggSite"); // See if this is a URL else if (strpos($guid, "http")!==false) - { -error_log("Creating by URL"); + { $guid = get_site_by_url($guid); foreach ($guid->attributes as $key => $value) $this->attributes[$key] = $value; @@ -78,8 +75,7 @@ error_log("Creating by URL"); } // We assume if we have got this far, $guid is an int - else { -error_log("Creating by $guid"); + else { if (!$this->load($guid)) throw new IOException("Could not create a new ElggSite object from GUID:$guid"); } } |