From f5c36149efa0b7adca4cc1e27000d3f5a4d21291 Mon Sep 17 00:00:00 2001 From: icewing Date: Mon, 9 Jun 2008 16:54:18 +0000 Subject: Marcus Povey * Added the code to the correct method. Doh! git-svn-id: https://code.elgg.org/elgg/trunk@841 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/sites.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'engine/lib/sites.php') diff --git a/engine/lib/sites.php b/engine/lib/sites.php index 617c62386..86a99525d 100644 --- a/engine/lib/sites.php +++ b/engine/lib/sites.php @@ -124,7 +124,8 @@ // Load missing data $row = get_site_entity_as_row($guid); - + if (($row) && (!$this->isFullyLoaded())) $this->attributes['tables_loaded'] ++; // If $row isn't a cached copy then increment the counter + // Now put these into the attributes array as core values $objarray = (array) $row; foreach($objarray as $key => $value) @@ -143,12 +144,7 @@ return false; // Now save specific stuff - $result = create_site_entity($this->get('guid'), $this->get('name'), $this->get('description'), $this->get('url')); - - // Increment the portion counter - if ($result) $this->attributes['tables_loaded'] ++; - - return $result; + return create_site_entity($this->get('guid'), $this->get('name'), $this->get('description'), $this->get('url')); } /** -- cgit v1.2.3