summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/db.inc.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-06-16 10:42:29 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-06-16 10:42:29 +0000
commit400140ceb21e1f141ebfd62afa145cbc4ee2901d (patch)
tree28b3a1dd8f334272dc25dcbe7aa3912915d817ae /frontends/php/include/db.inc.php
parent5603bd407a6fc337ca523ac7f372588f3c645162 (diff)
downloadzabbix-400140ceb21e1f141ebfd62afa145cbc4ee2901d.tar.gz
zabbix-400140ceb21e1f141ebfd62afa145cbc4ee2901d.tar.xz
zabbix-400140ceb21e1f141ebfd62afa145cbc4ee2901d.zip
- [DEV-181] temp expression on triggers copy changed from {???:???} to 0 (Artem)
- [DEV-137] improvements in user operation result determination in hosts,triggers,items screens (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5769 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/db.inc.php')
-rw-r--r--frontends/php/include/db.inc.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/frontends/php/include/db.inc.php b/frontends/php/include/db.inc.php
index 69621042..49f52478 100644
--- a/frontends/php/include/db.inc.php
+++ b/frontends/php/include/db.inc.php
@@ -268,19 +268,25 @@ if(!isset($DB)){
$DB['TRANSACTIONS'] = 0;
- if(empty($result))
- $result = $DB['TRANSACTION_STATE'];
+ if(is_null($result)){
+ $DBresult = $DB['TRANSACTION_STATE'];
+ }
+ else{
+ $DBresult = $result && $DB['TRANSACTION_STATE'];
+ }
//SDI('Result: '.$result);
- if($result){ // OK
- $result = DBcommit();
+ if($DBresult){ // OK
+ $DBresult = DBcommit();
}
- if(!$result){ // FAIL
+ if(!$DBresult){ // FAIL
DBrollback();
}
+ $result = (!is_null($result) && $DBresult)?$result:$DBresult;
+
return $result;
}