aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/sites.php12
1 files 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;
+ }
}
/**