diff options
author | Andreas Gohr <andi@splitbrain.org> | 2013-04-07 11:26:12 -0700 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2013-04-07 11:26:12 -0700 |
commit | 9ffcf59001805784c8154849511471828bbf6060 (patch) | |
tree | a9b836e975c38bfa4b6c4a6d1732c241569a8051 /lib/plugins/authmysql/auth.php | |
parent | 28e3011634adb583576c1a3a0d2d400dda108356 (diff) | |
parent | 83fd0ad628216c2bea2997cd6c5c1b703ac08ac3 (diff) | |
download | rpg-9ffcf59001805784c8154849511471828bbf6060.tar.gz rpg-9ffcf59001805784c8154849511471828bbf6060.tar.bz2 |
Merge pull request #209 from lupo49/localization
de/de-informal language updates for several components.
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"; } |