37 private $_rollback = Array();
44 private $_levels = Array();
68 return !empty($this->_levels[$db_name]);
86 $dsn = $dsn_array[
'dsn'];
87 if (isset($dsn_array[
'userName'])) $dsn .=
';user='.$dsn_array[
'userName'];
89 if (isset($this->_levels[$dsn])) {
90 $this->_levels[$dsn]++;
92 $this->_levels[$dsn] = 1;
95 if ($this->_levels[$dsn] == 1) {
121 $dsn = $dsn_array[
'dsn'];
122 if (isset($dsn_array[
'userName'])) $dsn .=
';user='.$dsn_array[
'userName'];
124 if (empty($this->_levels[$dsn])) {
130 if (!empty($this->_rollback[$dsn])) {
131 trigger_localised_error(
'SYS0220', E_USER_WARNING);
133 MatrixDAL::rollback();
140 $this->_levels[$dsn]--;
142 if ($this->_levels[$dsn] == 0) {
169 $dsn = $dsn_array[
'dsn'];
170 if (isset($dsn_array[
'userName'])) $dsn .=
';user='.$dsn_array[
'userName'];
172 if (empty($this->_levels[$dsn])) {
173 trigger_localised_error(
'SYS0231', E_USER_WARNING);
178 $this->_rollback[$dsn] = TRUE;
179 $this->_levels[$dsn]--;
181 if ($this->_levels[$dsn] == 0) {
185 MatrixDAL::rollback();
191 $this->_rollback[$dsn] = FALSE;