From 76ec4aef053c632d26f8bd233535937a9afabe2a Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Fri, 19 Feb 2016 13:28:15 +0100
Subject: [PATCH] - changed processing order (Fixes #3632)

---
 interface/lib/classes/remote.d/sites.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/lib/classes/remote.d/sites.inc.php b/interface/lib/classes/remote.d/sites.inc.php
index e52e91dbd5..22c1657d49 100644
--- a/interface/lib/classes/remote.d/sites.inc.php
+++ b/interface/lib/classes/remote.d/sites.inc.php
@@ -127,9 +127,9 @@ class remoting_sites extends remoting {
 
 			$this->id = 0;
 			$this->dataRecord = $params;
-			$app->sites_database_plugin->processDatabaseInsert($this);
 
 			$retval = $this->insertQueryExecute($sql, $params);
+			$app->sites_database_plugin->processDatabaseInsert($this);
 			
 			// set correct values for backup_interval and backup_copies
 			if(isset($params['backup_interval']) || isset($params['backup_copies'])){
-- 
GitLab