diff options
Diffstat (limited to 'lib/plugins/authmysql/auth.php')
-rw-r--r-- | lib/plugins/authmysql/auth.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 7d303726b..5f6e86c71 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -97,6 +97,15 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { ), false ); $this->cando['getUserCount'] = $this->_chkcnf(array('getUsers'), false); + + if($this->getConf('debug') >= 2) { + $candoDebug = ''; + foreach($this->cando as $cd => $value) { + if($value) { $value = 'yes'; } else { $value = 'no'; } + $candoDebug .= $cd . ": " . $value . " | "; + } + $this->_debug("authmysql cando: " . $candoDebug, 0, __LINE__, __FILE__); + } } /** @@ -816,6 +825,10 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @return int|bool insert id or 0, false on error */ protected function _modifyDB($query) { + if($this->getConf('debug') >= 2) { + msg('MySQL query: '.hsc($query), 0, __LINE__, __FILE__); + } + if($this->dbcon) { $result = @mysql_query($query, $this->dbcon); if($result) { @@ -848,11 +861,12 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { */ protected function _lockTables($mode) { if($this->dbcon) { - if(is_array($this->getConf('TablesToLock'))) { + $ttl = $this->getConf('TablesToLock'); + if(is_array($ttl) && !empty($ttl)) { if($mode == "READ" || $mode == "WRITE") { $sql = "LOCK TABLES "; $cnt = 0; - foreach($this->getConf('TablesToLock') as $table) { + foreach($ttl as $table) { if($cnt++ != 0) $sql .= ", "; $sql .= "$table $mode"; } |