RooJsonOutputTrait.php
authoredward <edward@roojs.com>
Thu, 28 Apr 2016 08:41:23 +0000 (16:41 +0800)
committeredward <edward@roojs.com>
Thu, 28 Apr 2016 08:41:23 +0000 (16:41 +0800)
RooJsonOutputTrait.php

index c307d27..207986d 100644 (file)
@@ -131,6 +131,10 @@ trait Pman_Core_RooJsonOutputTrait {
     
     function jdata($ar,$total=false, $extra=array(), $cachekey = false)
     {
+        if ($this->transObj ) {
+            $this->transObj->query( connection_aborted() ? 'ROLLBACK' :  'COMMIT');
+        }
+        
         // should do mobile checking???
         if ($total == false) {
             $total = count($ar);