From 52bc49c9551feff226b929c224451698fd8a6c02 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 5 Oct 2009 15:12:45 +0000
Subject: [PATCH] Fixed: FS#918 - Cron file not create/update on cron insert
 but only on cron update

---
 interface/lib/classes/tform_actions.inc.php | 2 +-
 interface/web/sites/cron_edit.php           | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/interface/lib/classes/tform_actions.inc.php b/interface/lib/classes/tform_actions.inc.php
index 0593c031fb..f676b32566 100644
--- a/interface/lib/classes/tform_actions.inc.php
+++ b/interface/lib/classes/tform_actions.inc.php
@@ -195,7 +195,7 @@ class tform_actions {
                         }
 
                         $this->onAfterInsert();
-						
+
 						// Write data history (sys_datalog)
 						if($app->tform->formDef['db_history'] == 'yes') {
 							$new_data_record = $app->tform->getDataRecord($this->id);
diff --git a/interface/web/sites/cron_edit.php b/interface/web/sites/cron_edit.php
index a3244f0ebf..54d021a2c3 100644
--- a/interface/web/sites/cron_edit.php
+++ b/interface/web/sites/cron_edit.php
@@ -168,8 +168,9 @@ class page_action extends tform_actions {
         if($has_error == true) {
             parent::onError();
             exit;
-        }
-        else parent::onInsertSave($sql);
+        } else {
+			return parent::onInsertSave($sql);
+		}
     }
     
 	function onAfterInsert() {
-- 
GitLab