From b318f1e4f422d931395bb73daca878d0d789211c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 14 Jul 2015 10:44:12 +0000 Subject: [PATCH] status value is in column 1 (2. column), also fixed not working fetchColumn --- phpgwapi/inc/adodb/adodb.inc.php | 2 ++ phpgwapi/inc/class.egw_db.inc.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/adodb/adodb.inc.php b/phpgwapi/inc/adodb/adodb.inc.php index ebd3d7d309..415ba1b48c 100644 --- a/phpgwapi/inc/adodb/adodb.inc.php +++ b/phpgwapi/inc/adodb/adodb.inc.php @@ -3441,6 +3441,8 @@ while ($column_number-- >= 0) { $ret = array_shift($row); + + if ($this->fetchMode == ADODB_FETCH_BOTH) array_shift($row); } return $ret; } diff --git a/phpgwapi/inc/class.egw_db.inc.php b/phpgwapi/inc/class.egw_db.inc.php index 23309f0b53..2487a5dc27 100644 --- a/phpgwapi/inc/class.egw_db.inc.php +++ b/phpgwapi/inc/class.egw_db.inc.php @@ -352,7 +352,7 @@ class egw_db // check Galera wsrep_local_state for node is not in state Synced, eg. Donor // check is only done for Type=mysql and will succed if no Galera if ($new_connection && $this->Type == 'mysql' && strpos($this->Host, ';') !== false && - ($state = $this->query("SHOW STATUS LIKE 'wsrep_local_state'")->fetchColumn() !== false) && + ($state = $this->query("SHOW STATUS LIKE 'wsrep_local_state'")->fetchColumn(1) !== false) && $state != 4) // 4 = Synced { throw new egw_exception_db_connection('wsrep-local-state='.array2string($state).' != 4');