projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c01fc67
)
RooTrait.php
author
edward
<edward@roojs.com>
Wed, 30 Mar 2016 10:25:51 +0000
(18:25 +0800)
committer
edward
<edward@roojs.com>
Wed, 30 Mar 2016 10:25:51 +0000
(18:25 +0800)
RooTrait.php
patch
|
blob
|
history
diff --git
a/RooTrait.php
b/RooTrait.php
index
7b4e40a
..
26f0fb9
100644
(file)
--- a/
RooTrait.php
+++ b/
RooTrait.php
@@
-134,4
+134,24
@@
trait Pman_Core_RooTrait {
$this->jerr($out);
}
+
+ function jok($str)
+ {
+ if ($this->transObj ) {
+ $this->transObj->query( connection_aborted() ? 'ROLLBACK' : 'COMMIT');
+ }
+
+ return parent::jok($str);
+ }
+
+
+ function jerr($str, $errors=array(), $content_type = false)
+ {
+ if ($this->transObj) {
+ $this->transObj->query('ROLLBACK');
+ }
+
+ return parent::jerr($str,$errors,$content_type);
+
+ }
}