summaryrefslogtreecommitdiff
path: root/lib/plugins/authmysql/auth.php
diff options
context:
space:
mode:
authorlupo49 <dokuwiki@lupo49.de>2013-03-31 20:40:03 +0200
committerlupo49 <dokuwiki@lupo49.de>2013-03-31 20:40:03 +0200
commitf6af1fe63a13b2734d1b69817ec800c51e6def9c (patch)
treea2e1acd2d1d3efd036590d01f1037eb92f3a0c73 /lib/plugins/authmysql/auth.php
parent8f989436768f021725a023c5ae7efae150586d0c (diff)
downloadrpg-f6af1fe63a13b2734d1b69817ec800c51e6def9c.tar.gz
rpg-f6af1fe63a13b2734d1b69817ec800c51e6def9c.tar.bz2
de/de-informal: language updates for the core, authldap, authmysql, authpgsql
Diffstat (limited to 'lib/plugins/authmysql/auth.php')
-rw-r--r--lib/plugins/authmysql/auth.php18
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";
}