From 348aef798afc67d45e60022b40a2a5becac8ebc4 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 23 Nov 2005 18:33:07 -0500
Subject: [PATCH] added mail_box

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

diff --git a/interface/lib/classes/tform_actions.inc.php b/interface/lib/classes/tform_actions.inc.php
index 56deb43..5eb8ad6 100644
--- a/interface/lib/classes/tform_actions.inc.php
+++ b/interface/lib/classes/tform_actions.inc.php
@@ -71,6 +71,7 @@
 		$this->id = intval($_REQUEST["id"]);
 
 		if(count($_POST) > 1) {
+			$this->dataRecord = $_POST;
 			$this->onSubmit();
 		} else {
 			$this->onShow();
@@ -83,8 +84,6 @@
 	
 	function onSubmit() {
 		global $app, $conf;
-		
-		$this->dataRecord = $_POST;
 		
 		// Calling the action functions
 		if($this->id > 0) {
@@ -105,6 +104,7 @@
 		$sql = $app->tform->getSQL($this->dataRecord,$app->tform->getCurrentTab(),'UPDATE',$this->id,$ext_where);
 		if($app->tform->errorMessage == '') {
 			$app->db->query($sql);
+			if($app->db->errorMessage != '') die($app->db->errorMessage);
 			
 			// Call plugin
 			foreach($this->plugins as $plugin) {
@@ -133,6 +133,7 @@
 		$sql = $app->tform->getSQL($this->dataRecord,$app->tform->getCurrentTab(),'INSERT',$this->id,$ext_where);
 		if($app->tform->errorMessage == '') {
 			$app->db->query($sql);
+			if($app->db->errorMessage != '') die($app->db->errorMessage);
 			$this->id = $app->db->insertID();
 			
 			// Call plugin

--
Gitblit v1.9.1