From d074f8bb08d9bb5a0beda35764b5e9b2fe91e03c Mon Sep 17 00:00:00 2001 From: icewing Date: Fri, 14 Mar 2008 15:46:48 +0000 Subject: Marcus Povey * Removed debug git-svn-id: https://code.elgg.org/elgg/trunk@221 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/sites.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'engine') 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"); } } -- cgit v1.2.3