From ff13bda327cfba19188755f50a3eff6bb0c0084b Mon Sep 17 00:00:00 2001 From: icewing Date: Tue, 4 Mar 2008 12:19:00 +0000 Subject: Save git-svn-id: https://code.elgg.org/elgg/trunk@67 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/sites.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/engine/lib/sites.php b/engine/lib/sites.php index 2ab8bc630..4292a31b2 100644 --- a/engine/lib/sites.php +++ b/engine/lib/sites.php @@ -205,11 +205,13 @@ */ function save() { - - - - - + if (isset($this->id)) + return update_site($this->id, $this->title, $this->description, $this->url, $this->owner_id, $this->access_id); // ID Specified, update ID + else + { + $this->id = create_site($this->title, $this->description, $this->url, $this->owner_id, $this->access_id); // Create a site + return $this->id; + } } /** -- cgit v1.2.3