diff options
Diffstat (limited to 'lib/plugins/authpdo')
47 files changed, 843 insertions, 252 deletions
diff --git a/lib/plugins/authpdo/_test/mysql/mybb.sql b/lib/plugins/authpdo/_test/mysql/mybb.sql index fdd1a9974..e83215c6e 100644 --- a/lib/plugins/authpdo/_test/mysql/mybb.sql +++ b/lib/plugins/authpdo/_test/mysql/mybb.sql @@ -30,13 +30,13 @@ CREATE TABLE `mybb_usergroups` ( `gid` smallint(5) unsigned NOT NULL, `type` tinyint(1) unsigned NOT NULL DEFAULT '2', `title` varchar(120) NOT NULL DEFAULT '', - `description` text NOT NULL, + `description` text NOT NULL DEFAULT '', `namestyle` varchar(200) NOT NULL DEFAULT '{username}', `usertitle` varchar(120) NOT NULL DEFAULT '', `stars` smallint(4) unsigned NOT NULL DEFAULT '0', `starimage` varchar(120) NOT NULL DEFAULT '', `image` varchar(120) NOT NULL DEFAULT '', - `disporder` smallint(6) unsigned NOT NULL, + `disporder` smallint(6) unsigned NOT NULL DEFAULT '0', `isbannedgroup` tinyint(1) NOT NULL DEFAULT '0', `canview` tinyint(1) NOT NULL DEFAULT '0', `canviewthreads` tinyint(1) NOT NULL DEFAULT '0', @@ -209,7 +209,7 @@ CREATE TABLE `mybb_users` ( `google` varchar(75) NOT NULL DEFAULT '', `birthday` varchar(15) NOT NULL DEFAULT '', `birthdayprivacy` varchar(4) NOT NULL DEFAULT 'all', - `signature` text NOT NULL, + `signature` text NOT NULL DEFAULT '', `allownotices` tinyint(1) NOT NULL DEFAULT '0', `hideemail` tinyint(1) NOT NULL DEFAULT '0', `subscriptionmethod` tinyint(1) NOT NULL DEFAULT '0', @@ -235,15 +235,15 @@ CREATE TABLE `mybb_users` ( `timezone` varchar(5) NOT NULL DEFAULT '', `dst` tinyint(1) NOT NULL DEFAULT '0', `dstcorrection` tinyint(1) NOT NULL DEFAULT '0', - `buddylist` text NOT NULL, - `ignorelist` text NOT NULL, + `buddylist` text NOT NULL DEFAULT '', + `ignorelist` text NOT NULL DEFAULT '', `style` smallint(5) unsigned NOT NULL DEFAULT '0', `away` tinyint(1) NOT NULL DEFAULT '0', `awaydate` int(10) unsigned NOT NULL DEFAULT '0', `returndate` varchar(15) NOT NULL DEFAULT '', `awayreason` varchar(200) NOT NULL DEFAULT '', - `pmfolders` text NOT NULL, - `notepad` text NOT NULL, + `pmfolders` text NOT NULL DEFAULT '', + `notepad` text NOT NULL DEFAULT '', `referrer` int(10) unsigned NOT NULL DEFAULT '0', `referrals` int(10) unsigned NOT NULL DEFAULT '0', `reputation` int(11) NOT NULL DEFAULT '0', @@ -264,7 +264,7 @@ CREATE TABLE `mybb_users` ( `coppauser` tinyint(1) NOT NULL DEFAULT '0', `classicpostbit` tinyint(1) NOT NULL DEFAULT '0', `loginattempts` smallint(2) unsigned NOT NULL DEFAULT '1', - `usernotes` text NOT NULL, + `usernotes` text NOT NULL DEFAULT '', `sourceeditor` tinyint(1) NOT NULL DEFAULT '0' ) ENGINE=MyISAM AUTO_INCREMENT=88 DEFAULT CHARSET=utf8; diff --git a/lib/plugins/authpdo/_test/sqlite.test.php b/lib/plugins/authpdo/_test/sqlite.test.php index 35b612604..89cc9f60d 100644 --- a/lib/plugins/authpdo/_test/sqlite.test.php +++ b/lib/plugins/authpdo/_test/sqlite.test.php @@ -10,8 +10,8 @@ class testable_auth_plugin_authpdo extends auth_plugin_authpdo { return 'authpdo'; } - public function _selectGroups() { - return parent::_selectGroups(); + public function selectGroups() { + return parent::selectGroups(); } public function addGroup($group) { @@ -96,7 +96,7 @@ class sqlite_plugin_authpdo_test extends DokuWikiTest { public function test_internals() { $auth = new testable_auth_plugin_authpdo(); - $groups = $auth->_selectGroups(); + $groups = $auth->selectGroups(); $this->assertArrayHasKey('user', $groups); $this->assertEquals(1, $groups['user']['gid']); $this->assertArrayHasKey('admin', $groups); @@ -104,7 +104,7 @@ class sqlite_plugin_authpdo_test extends DokuWikiTest { $ok = $auth->addGroup('test'); $this->assertTrue($ok); - $groups = $auth->_selectGroups(); + $groups = $auth->selectGroups(); $this->assertArrayHasKey('test', $groups); $this->assertEquals(3, $groups['test']['gid']); } diff --git a/lib/plugins/authpdo/auth.php b/lib/plugins/authpdo/auth.php index dfe125473..9c0968e30 100644 --- a/lib/plugins/authpdo/auth.php +++ b/lib/plugins/authpdo/auth.php @@ -6,13 +6,11 @@ * @author Andreas Gohr <andi@splitbrain.org> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - /** * Class auth_plugin_authpdo */ -class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { +class auth_plugin_authpdo extends DokuWiki_Auth_Plugin +{ /** @var PDO */ protected $pdo; @@ -23,17 +21,18 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { /** * Constructor. */ - public function __construct() { + public function __construct() + { parent::__construct(); // for compatibility - if(!class_exists('PDO')) { - $this->_debug('PDO extension for PHP not found.', -1, __LINE__); + if (!class_exists('PDO')) { + $this->debugMsg('PDO extension for PHP not found.', -1, __LINE__); $this->success = false; return; } - if(!$this->getConf('dsn')) { - $this->_debug('No DSN specified', -1, __LINE__); + if (!$this->getConf('dsn')) { + $this->debugMsg('No DSN specified', -1, __LINE__); $this->success = false; return; } @@ -49,15 +48,15 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, // we want exceptions, not error codes ) ); - } catch(PDOException $e) { - $this->_debug($e); + } catch (PDOException $e) { + $this->debugMsg($e); msg($this->getLang('connectfail'), -1); $this->success = false; return; } // can Users be created? - $this->cando['addUser'] = $this->_chkcnf( + $this->cando['addUser'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -69,7 +68,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can Users be deleted? - $this->cando['delUser'] = $this->_chkcnf( + $this->cando['delUser'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -80,7 +79,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can login names be changed? - $this->cando['modLogin'] = $this->_chkcnf( + $this->cando['modLogin'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -89,7 +88,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can passwords be changed? - $this->cando['modPass'] = $this->_chkcnf( + $this->cando['modPass'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -98,7 +97,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can real names be changed? - $this->cando['modName'] = $this->_chkcnf( + $this->cando['modName'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -107,7 +106,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can real email be changed? - $this->cando['modMail'] = $this->_chkcnf( + $this->cando['modMail'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -116,7 +115,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can groups be changed? - $this->cando['modGroups'] = $this->_chkcnf( + $this->cando['modGroups'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -128,21 +127,21 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can a filtered list of users be retrieved? - $this->cando['getUsers'] = $this->_chkcnf( + $this->cando['getUsers'] = $this->checkConfig( array( 'list-users' ) ); // can the number of users be retrieved? - $this->cando['getUserCount'] = $this->_chkcnf( + $this->cando['getUserCount'] = $this->checkConfig( array( 'count-users' ) ); // can a list of available groups be retrieved? - $this->cando['getGroups'] = $this->_chkcnf( + $this->cando['getGroups'] = $this->checkConfig( array( 'select-groups' ) @@ -154,28 +153,29 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { /** * Check user+password * - * @param string $user the user name - * @param string $pass the clear text password + * @param string $user the user name + * @param string $pass the clear text password * @return bool */ - public function checkPass($user, $pass) { + public function checkPass($user, $pass) + { - $userdata = $this->_selectUser($user); - if($userdata == false) return false; + $userdata = $this->selectUser($user); + if ($userdata == false) return false; // password checking done in SQL? - if($this->_chkcnf(array('check-pass'))) { + if ($this->checkConfig(array('check-pass'))) { $userdata['clear'] = $pass; $userdata['hash'] = auth_cryptPassword($pass); - $result = $this->_query($this->getConf('check-pass'), $userdata); - if($result === false) return false; + $result = $this->query($this->getConf('check-pass'), $userdata); + if ($result === false) return false; return (count($result) == 1); } // we do password checking on our own - if(isset($userdata['hash'])) { + if (isset($userdata['hash'])) { // hashed password - $passhash = new PassHash(); + $passhash = new \dokuwiki\PassHash(); return $passhash->verify_hash($pass, $userdata['hash']); } else { // clear text password in the database O_o @@ -193,20 +193,21 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * mail string email addres of the user * grps array list of groups the user is in * - * @param string $user the user name - * @param bool $requireGroups whether or not the returned data must include groups + * @param string $user the user name + * @param bool $requireGroups whether or not the returned data must include groups * @return array|bool containing user data or false */ - public function getUserData($user, $requireGroups = true) { - $data = $this->_selectUser($user); - if($data == false) return false; + public function getUserData($user, $requireGroups = true) + { + $data = $this->selectUser($user); + if ($data == false) return false; - if(isset($data['hash'])) unset($data['hash']); - if(isset($data['clean'])) unset($data['clean']); + if (isset($data['hash'])) unset($data['hash']); + if (isset($data['clean'])) unset($data['clean']); - if($requireGroups) { - $data['grps'] = $this->_selectUserGroups($data); - if($data['grps'] === false) return false; + if ($requireGroups) { + $data['grps'] = $this->selectUserGroups($data); + if ($data['grps'] === false) return false; } return $data; @@ -223,23 +224,24 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * * Set addUser capability when implemented * - * @param string $user - * @param string $clear - * @param string $name - * @param string $mail - * @param null|array $grps + * @param string $user + * @param string $clear + * @param string $name + * @param string $mail + * @param null|array $grps * @return bool|null */ - public function createUser($user, $clear, $name, $mail, $grps = null) { + public function createUser($user, $clear, $name, $mail, $grps = null) + { global $conf; - if(($info = $this->getUserData($user, false)) !== false) { + if (($info = $this->getUserData($user, false)) !== false) { msg($this->getLang('userexists'), -1); return false; // user already exists } // prepare data - if($grps == null) $grps = array(); + if ($grps == null) $grps = array(); array_unshift($grps, $conf['defaultgroup']); $grps = array_unique($grps); $hash = auth_cryptPassword($clear); @@ -249,25 +251,25 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { $this->pdo->beginTransaction(); { // insert the user - $ok = $this->_query($this->getConf('insert-user'), $userdata); - if($ok === false) goto FAIL; + $ok = $this->query($this->getConf('insert-user'), $userdata); + if ($ok === false) goto FAIL; $userdata = $this->getUserData($user, false); - if($userdata === false) goto FAIL; + if ($userdata === false) goto FAIL; // create all groups that do not exist, the refetch the groups - $allgroups = $this->_selectGroups(); - foreach($grps as $group) { - if(!isset($allgroups[$group])) { + $allgroups = $this->selectGroups(); + foreach ($grps as $group) { + if (!isset($allgroups[$group])) { $ok = $this->addGroup($group); - if($ok === false) goto FAIL; + if ($ok === false) goto FAIL; } } - $allgroups = $this->_selectGroups(); + $allgroups = $this->selectGroups(); // add user to the groups - foreach($grps as $group) { - $ok = $this->_joinGroup($userdata, $allgroups[$group]); - if($ok === false) goto FAIL; + foreach ($grps as $group) { + $ok = $this->joinGroup($userdata, $allgroups[$group]); + if ($ok === false) goto FAIL; } } $this->pdo->commit(); @@ -276,7 +278,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { // something went wrong, rollback FAIL: $this->pdo->rollBack(); - $this->_debug('Transaction rolled back', 0, __LINE__); + $this->debugMsg('Transaction rolled back', 0, __LINE__); msg($this->getLang('writefail'), -1); return null; // return error } @@ -284,11 +286,12 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { /** * Modify user data * - * @param string $user nick of the user to be changed - * @param array $changes array of field/value pairs to be changed (password will be clear text) + * @param string $user nick of the user to be changed + * @param array $changes array of field/value pairs to be changed (password will be clear text) * @return bool */ - public function modifyUser($user, $changes) { + public function modifyUser($user, $changes) + { // secure everything in transaction $this->pdo->beginTransaction(); { @@ -297,64 +300,64 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { unset($olddata['grps']); // changing the user name? - if(isset($changes['user'])) { - if($this->getUserData($changes['user'], false)) goto FAIL; + if (isset($changes['user'])) { + if ($this->getUserData($changes['user'], false)) goto FAIL; $params = $olddata; $params['newlogin'] = $changes['user']; - $ok = $this->_query($this->getConf('update-user-login'), $params); - if($ok === false) goto FAIL; + $ok = $this->query($this->getConf('update-user-login'), $params); + if ($ok === false) goto FAIL; } // changing the password? - if(isset($changes['pass'])) { + if (isset($changes['pass'])) { $params = $olddata; $params['clear'] = $changes['pass']; $params['hash'] = auth_cryptPassword($changes['pass']); - $ok = $this->_query($this->getConf('update-user-pass'), $params); - if($ok === false) goto FAIL; + $ok = $this->query($this->getConf('update-user-pass'), $params); + if ($ok === false) goto FAIL; } // changing info? - if(isset($changes['mail']) || isset($changes['name'])) { + if (isset($changes['mail']) || isset($changes['name'])) { $params = $olddata; - if(isset($changes['mail'])) $params['mail'] = $changes['mail']; - if(isset($changes['name'])) $params['name'] = $changes['name']; + if (isset($changes['mail'])) $params['mail'] = $changes['mail']; + if (isset($changes['name'])) $params['name'] = $changes['name']; - $ok = $this->_query($this->getConf('update-user-info'), $params); - if($ok === false) goto FAIL; + $ok = $this->query($this->getConf('update-user-info'), $params); + if ($ok === false) goto FAIL; } // changing groups? - if(isset($changes['grps'])) { - $allgroups = $this->_selectGroups(); + if (isset($changes['grps'])) { + $allgroups = $this->selectGroups(); // remove membership for previous groups - foreach($oldgroups as $group) { - if(!in_array($group, $changes['grps']) && isset($allgroups[$group])) { - $ok = $this->_leaveGroup($olddata, $allgroups[$group]); - if($ok === false) goto FAIL; + foreach ($oldgroups as $group) { + if (!in_array($group, $changes['grps']) && isset($allgroups[$group])) { + $ok = $this->leaveGroup($olddata, $allgroups[$group]); + if ($ok === false) goto FAIL; } } // create all new groups that are missing $added = 0; - foreach($changes['grps'] as $group) { - if(!isset($allgroups[$group])) { + foreach ($changes['grps'] as $group) { + if (!isset($allgroups[$group])) { $ok = $this->addGroup($group); - if($ok === false) goto FAIL; + if ($ok === false) goto FAIL; $added++; } } // reload group info - if($added > 0) $allgroups = $this->_selectGroups(); + if ($added > 0) $allgroups = $this->selectGroups(); // add membership for new groups - foreach($changes['grps'] as $group) { - if(!in_array($group, $oldgroups)) { - $ok = $this->_joinGroup($olddata, $allgroups[$group]); - if($ok === false) goto FAIL; + foreach ($changes['grps'] as $group) { + if (!in_array($group, $oldgroups)) { + $ok = $this->joinGroup($olddata, $allgroups[$group]); + if ($ok === false) goto FAIL; } } } @@ -366,7 +369,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { // something went wrong, rollback FAIL: $this->pdo->rollBack(); - $this->_debug('Transaction rolled back', 0, __LINE__); + $this->debugMsg('Transaction rolled back', 0, __LINE__); msg($this->getLang('writefail'), -1); return false; // return error } @@ -376,13 +379,14 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * * Set delUser capability when implemented * - * @param array $users + * @param array $users * @return int number of users deleted */ - public function deleteUsers($users) { + public function deleteUsers($users) + { $count = 0; - foreach($users as $user) { - if($this->_deleteUser($user)) $count++; + foreach ($users as $user) { + if ($this->deleteUser($user)) $count++; } return $count; } @@ -392,36 +396,41 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * * Set getUsers capability when implemented * - * @param int $start index of first user to be returned - * @param int $limit max number of users to be returned - * @param array $filter array of field/pattern pairs, null for no filter + * @param int $start index of first user to be returned + * @param int $limit max number of users to be returned + * @param array $filter array of field/pattern pairs, null for no filter * @return array list of userinfo (refer getUserData for internal userinfo details) */ - public function retrieveUsers($start = 0, $limit = -1, $filter = null) { - if($limit < 0) $limit = 10000; // we don't support no limit - if(is_null($filter)) $filter = array(); - - if(isset($filter['grps'])) $filter['group'] = $filter['grps']; - foreach(array('user', 'name', 'mail', 'group') as $key) { - if(!isset($filter[$key])) { + public function retrieveUsers($start = 0, $limit = -1, $filter = null) + { + if ($limit < 0) $limit = 10000; // we don't support no limit + if (is_null($filter)) $filter = array(); + + if (isset($filter['grps'])) $filter['group'] = $filter['grps']; + foreach (array('user', 'name', 'mail', 'group') as $key) { + if (!isset($filter[$key])) { $filter[$key] = '%'; } else { $filter[$key] = '%' . $filter[$key] . '%'; } } - $filter['start'] = (int) $start; - $filter['end'] = (int) $start + $limit; - $filter['limit'] = (int) $limit; + $filter['start'] = (int)$start; + $filter['end'] = (int)$start + $limit; + $filter['limit'] = (int)$limit; - $result = $this->_query($this->getConf('list-users'), $filter); - if(!$result) return array(); + $result = $this->query($this->getConf('list-users'), $filter); + if (!$result) return array(); $users = array(); - foreach($result as $row) { - if(!isset($row['user'])) { - $this->_debug("Statement did not return 'user' attribute", -1, __LINE__); - return array(); + if (is_array($result)) { + foreach ($result as $row) { + if (!isset($row['user'])) { + $this->debugMsg("list-users statement did not return 'user' attribute", -1, __LINE__); + return array(); + } + $users[] = $this->getUserData($row['user']); } - $users[] = $this->getUserData($row['user']); + } else { + $this->debugMsg("list-users statement did not return a list of result", -1, __LINE__); } return $users; } @@ -429,26 +438,27 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { /** * Return a count of the number of user which meet $filter criteria * - * @param array $filter array of field/pattern pairs, empty array for no filter + * @param array $filter array of field/pattern pairs, empty array for no filter * @return int */ - public function getUserCount($filter = array()) { - if(is_null($filter)) $filter = array(); + public function getUserCount($filter = array()) + { + if (is_null($filter)) $filter = array(); - if(isset($filter['grps'])) $filter['group'] = $filter['grps']; - foreach(array('user', 'name', 'mail', 'group') as $key) { - if(!isset($filter[$key])) { + if (isset($filter['grps'])) $filter['group'] = $filter['grps']; + foreach (array('user', 'name', 'mail', 'group') as $key) { + if (!isset($filter[$key])) { $filter[$key] = '%'; } else { $filter[$key] = '%' . $filter[$key] . '%'; } } - $result = $this->_query($this->getConf('count-users'), $filter); - if(!$result || !isset($result[0]['count'])) { - $this->_debug("Statement did not return 'count' attribute", -1, __LINE__); + $result = $this->query($this->getConf('count-users'), $filter); + if (!$result || !isset($result[0]['count'])) { + $this->debugMsg("Statement did not return 'count' attribute", -1, __LINE__); } - return (int) $result[0]['count']; + return (int)$result[0]['count']; } /** @@ -457,12 +467,13 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param string $group * @return bool */ - public function addGroup($group) { + public function addGroup($group) + { $sql = $this->getConf('insert-group'); - $result = $this->_query($sql, array(':group' => $group)); - $this->_clearGroupCache(); - if($result === false) return false; + $result = $this->query($sql, array(':group' => $group)); + $this->clearGroupCache(); + if ($result === false) return false; return true; } @@ -471,15 +482,16 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * * Set getGroups capability when implemented * - * @param int $start - * @param int $limit + * @param int $start + * @param int $limit * @return array */ - public function retrieveGroups($start = 0, $limit = 0) { - $groups = array_keys($this->_selectGroups()); - if($groups === false) return array(); + public function retrieveGroups($start = 0, $limit = 0) + { + $groups = array_keys($this->selectGroups()); + if ($groups === false) return array(); - if(!$limit) { + if (!$limit) { return array_splice($groups, $start); } else { return array_splice($groups, $start, $limit); @@ -492,38 +504,39 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param string $user the user name * @return bool|array user data, false on error */ - protected function _selectUser($user) { + protected function selectUser($user) + { $sql = $this->getConf('select-user'); - $result = $this->_query($sql, array(':user' => $user)); - if(!$result) return false; + $result = $this->query($sql, array(':user' => $user)); + if (!$result) return false; - if(count($result) > 1) { - $this->_debug('Found more than one matching user', -1, __LINE__); + if (count($result) > 1) { + $this->debugMsg('Found more than one matching user', -1, __LINE__); return false; } $data = array_shift($result); $dataok = true; - if(!isset($data['user'])) { - $this->_debug("Statement did not return 'user' attribute", -1, __LINE__); + if (!isset($data['user'])) { + $this->debugMsg("Statement did not return 'user' attribute", -1, __LINE__); $dataok = false; } - if(!isset($data['hash']) && !isset($data['clear']) && !$this->_chkcnf(array('check-pass'))) { - $this->_debug("Statement did not return 'clear' or 'hash' attribute", -1, __LINE__); + if (!isset($data['hash']) && !isset($data['clear']) && !$this->checkConfig(array('check-pass'))) { + $this->debugMsg("Statement did not return 'clear' or 'hash' attribute", -1, __LINE__); $dataok = false; } - if(!isset($data['name'])) { - $this->_debug("Statement did not return 'name' attribute", -1, __LINE__); + if (!isset($data['name'])) { + $this->debugMsg("Statement did not return 'name' attribute", -1, __LINE__); $dataok = false; } - if(!isset($data['mail'])) { - $this->_debug("Statement did not return 'mail' attribute", -1, __LINE__); + if (!isset($data['mail'])) { + $this->debugMsg("Statement did not return 'mail' attribute", -1, __LINE__); $dataok = false; } - if(!$dataok) return false; + if (!$dataok) return false; return $data; } @@ -533,22 +546,23 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param string $user * @return bool true when the user was deleted */ - protected function _deleteUser($user) { + protected function deleteUser($user) + { $this->pdo->beginTransaction(); { $userdata = $this->getUserData($user); - if($userdata === false) goto FAIL; - $allgroups = $this->_selectGroups(); + if ($userdata === false) goto FAIL; + $allgroups = $this->selectGroups(); // remove group memberships (ignore errors) - foreach($userdata['grps'] as $group) { - if(isset($allgroups[$group])) { - $this->_leaveGroup($userdata, $allgroups[$group]); + foreach ($userdata['grps'] as $group) { + if (isset($allgroups[$group])) { + $this->leaveGroup($userdata, $allgroups[$group]); } } - $ok = $this->_query($this->getConf('delete-user'), $userdata); - if($ok === false) goto FAIL; + $ok = $this->query($this->getConf('delete-user'), $userdata); + if ($ok === false) goto FAIL; } $this->pdo->commit(); return true; @@ -564,19 +578,24 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param array $userdata The userdata as returned by _selectUser() * @return array|bool list of group names, false on error */ - protected function _selectUserGroups($userdata) { + protected function selectUserGroups($userdata) + { global $conf; $sql = $this->getConf('select-user-groups'); - $result = $this->_query($sql, $userdata); - if($result === false) return false; + $result = $this->query($sql, $userdata); + if ($result === false) return false; $groups = array($conf['defaultgroup']); // always add default config - foreach($result as $row) { - if(!isset($row['group'])) { - $this->_debug("No 'group' field returned in select-user-groups statement"); - return false; + if (is_array($result)) { + foreach ($result as $row) { + if (!isset($row['group'])) { + $this->debugMsg("No 'group' field returned in select-user-groups statement", -1, __LINE__); + return false; + } + $groups[] = $row['group']; } - $groups[] = $row['group']; + } else { + $this->debugMsg("select-user-groups statement did not return a list of result", -1, __LINE__); } $groups = array_unique($groups); @@ -589,23 +608,28 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * * @return array|bool list of all available groups and their properties */ - protected function _selectGroups() { - if($this->groupcache) return $this->groupcache; + protected function selectGroups() + { + if ($this->groupcache) return $this->groupcache; $sql = $this->getConf('select-groups'); - $result = $this->_query($sql); - if($result === false) return false; + $result = $this->query($sql); + if ($result === false) return false; $groups = array(); - foreach($result as $row) { - if(!isset($row['group'])) { - $this->_debug("No 'group' field returned from select-groups statement", -1, __LINE__); - return false; - } + if (is_array($result)) { + foreach ($result as $row) { + if (!isset($row['group'])) { + $this->debugMsg("No 'group' field returned from select-groups statement", -1, __LINE__); + return false; + } - // relayout result with group name as key - $group = $row['group']; - $groups[$group] = $row; + // relayout result with group name as key + $group = $row['group']; + $groups[$group] = $row; + } + } else { + $this->debugMsg("select-groups statement did not return a list of result", -1, __LINE__); } ksort($groups); @@ -615,7 +639,8 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { /** * Remove all entries from the group cache */ - protected function _clearGroupCache() { + protected function clearGroupCache() + { $this->groupcache = null; } @@ -626,11 +651,12 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param array $groupdata all the group data * @return bool */ - protected function _joinGroup($userdata, $groupdata) { + protected function joinGroup($userdata, $groupdata) + { $data = array_merge($userdata, $groupdata); $sql = $this->getConf('join-group'); - $result = $this->_query($sql, $data); - if($result === false) return false; + $result = $this->query($sql, $data); + if ($result === false) return false; return true; } @@ -641,11 +667,12 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param array $groupdata all the group data * @return bool */ - protected function _leaveGroup($userdata, $groupdata) { + protected function leaveGroup($userdata, $groupdata) + { $data = array_merge($userdata, $groupdata); $sql = $this->getConf('leave-group'); - $result = $this->_query($sql, $data); - if($result === false) return false; + $result = $this->query($sql, $data); + if ($result === false) return false; return true; } @@ -656,25 +683,27 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param array $arguments Named parameters to be used in the statement * @return array|int|bool The result as associative array for SELECTs, affected rows for others, false on error */ - protected function _query($sql, $arguments = array()) { + protected function query($sql, $arguments = array()) + { $sql = trim($sql); - if(empty($sql)) { - $this->_debug('No SQL query given', -1, __LINE__); + if (empty($sql)) { + $this->debugMsg('No SQL query given', -1, __LINE__); return false; } // execute $params = array(); $sth = $this->pdo->prepare($sql); + $result = false; try { // prepare parameters - we only use those that exist in the SQL - foreach($arguments as $key => $value) { - if(is_array($value)) continue; - if(is_object($value)) continue; - if($key[0] != ':') $key = ":$key"; // prefix with colon if needed - if(strpos($sql, $key) === false) continue; // skip if parameter is missing + foreach ($arguments as $key => $value) { + if (is_array($value)) continue; + if (is_object($value)) continue; + if ($key[0] != ':') $key = ":$key"; // prefix with colon if needed + if (strpos($sql, $key) === false) continue; // skip if parameter is missing - if(is_int($value)) { + if (is_int($value)) { $sth->bindValue($key, $value, PDO::PARAM_INT); } else { $sth->bindValue($key, $value); @@ -683,19 +712,32 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { } $sth->execute(); - if(strtolower(substr($sql, 0, 6)) == 'select') { - $result = $sth->fetchAll(); - } else { - $result = $sth->rowCount(); + // only report last line's result + $hasnextrowset = true; + $currentsql = $sql; + while ($hasnextrowset) { + if (strtolower(substr($currentsql, 0, 6)) == 'select') { + $result = $sth->fetchAll(); + } else { + $result = $sth->rowCount(); + } + $semi_pos = strpos($currentsql, ';'); + if ($semi_pos) { + $currentsql = trim(substr($currentsql, $semi_pos + 1)); + } + try { + $hasnextrowset = $sth->nextRowset(); // run next rowset + } catch (PDOException $rowset_e) { + $hasnextrowset = false; // driver does not support multi-rowset, should be executed in one time + } } - } catch(Exception $e) { + } catch (Exception $e) { // report the caller's line $trace = debug_backtrace(); $line = $trace[0]['line']; - $dsql = $this->_debugSQL($sql, $params, !defined('DOKU_UNITTEST')); - $this->_debug($e, -1, $line); - $this->_debug("SQL: <pre>$dsql</pre>", -1, $line); - $result = false; + $dsql = $this->debugSQL($sql, $params, !defined('DOKU_UNITTEST')); + $this->debugMsg($e, -1, $line); + $this->debugMsg("SQL: <pre>$dsql</pre>", -1, $line); } $sth->closeCursor(); $sth = null; @@ -710,17 +752,18 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param int $err * @param int $line */ - protected function _debug($message, $err = 0, $line = 0) { - if(!$this->getConf('debug')) return; - if(is_a($message, 'Exception')) { + protected function debugMsg($message, $err = 0, $line = 0) + { + if (!$this->getConf('debug')) return; + if (is_a($message, 'Exception')) { $err = -1; $msg = $message->getMessage(); - if(!$line) $line = $message->getLine(); + if (!$line) $line = $message->getLine(); } else { $msg = $message; } - if(defined('DOKU_UNITTEST')) { + if (defined('DOKU_UNITTEST')) { printf("\n%s, %s:%d\n", $msg, __FILE__, $line); } else { msg('authpdo: ' . $msg, $err, $line, __FILE__); @@ -730,22 +773,23 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { /** * Check if the given config strings are set * + * @param string[] $keys + * @return bool * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> * - * @param string[] $keys - * @return bool */ - protected function _chkcnf($keys) { - foreach($keys as $key) { + protected function checkConfig($keys) + { + foreach ($keys as $key) { $params = explode(':', $key); $key = array_shift($params); $sql = trim($this->getConf($key)); // check if sql is set - if(!$sql) return false; + if (!$sql) return false; // check if needed params are there - foreach($params as $param) { - if(strpos($sql, ":$param") === false) return false; + foreach ($params as $param) { + if (strpos($sql, ":$param") === false) return false; } } @@ -760,20 +804,21 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param bool $htmlescape Should the result be escaped for output in HTML? * @return string */ - protected function _debugSQL($sql, $params, $htmlescape = true) { - foreach($params as $key => $val) { - if(is_int($val)) { + protected function debugSQL($sql, $params, $htmlescape = true) + { + foreach ($params as $key => $val) { + if (is_int($val)) { $val = $this->pdo->quote($val, PDO::PARAM_INT); - } elseif(is_bool($val)) { + } elseif (is_bool($val)) { $val = $this->pdo->quote($val, PDO::PARAM_BOOL); - } elseif(is_null($val)) { + } elseif (is_null($val)) { $val = 'NULL'; } else { $val = $this->pdo->quote($val); } $sql = str_replace($key, $val, $sql); } - if($htmlescape) $sql = hsc($sql); + if ($htmlescape) $sql = hsc($sql); return $sql; } } diff --git a/lib/plugins/authpdo/conf/metadata.php b/lib/plugins/authpdo/conf/metadata.php index 7c2ee8cdc..34e60a40e 100644 --- a/lib/plugins/authpdo/conf/metadata.php +++ b/lib/plugins/authpdo/conf/metadata.php @@ -23,5 +23,3 @@ $meta['update-user-pass'] = array('', '_caution' => 'danger'); $meta['insert-group'] = array('', '_caution' => 'danger'); $meta['join-group'] = array('', '_caution' => 'danger'); $meta['leave-group'] = array('', '_caution' => 'danger'); - - diff --git a/lib/plugins/authpdo/lang/bg/lang.php b/lib/plugins/authpdo/lang/bg/lang.php index f6532c453..220fbcd60 100644 --- a/lib/plugins/authpdo/lang/bg/lang.php +++ b/lib/plugins/authpdo/lang/bg/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Kiril <neohidra@gmail.com> */ $lang['connectfail'] = 'Свързването с базата данни се провали.'; diff --git a/lib/plugins/authpdo/lang/ca/lang.php b/lib/plugins/authpdo/lang/ca/lang.php new file mode 100644 index 000000000..d8c6eda05 --- /dev/null +++ b/lib/plugins/authpdo/lang/ca/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Adolfo Jayme Barrientos <fito@libreoffice.org> + */ +$lang['connectfail'] = 'Ha fallat la connexió a la base de dades.'; +$lang['userexists'] = 'Ja existeix un usuari amb aquest nom.'; +$lang['writefail'] = 'No es poden modificar les dades de l’usuari. Informeu d’això a l’administrador del wiki'; diff --git a/lib/plugins/authpdo/lang/ca/settings.php b/lib/plugins/authpdo/lang/ca/settings.php new file mode 100644 index 000000000..b599da6f0 --- /dev/null +++ b/lib/plugins/authpdo/lang/ca/settings.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Adolfo Jayme Barrientos <fito@libreoffice.org> + */ +$lang['dsn'] = 'El DNS per a connectar a la base de dades.'; diff --git a/lib/plugins/authpdo/lang/cs/lang.php b/lib/plugins/authpdo/lang/cs/lang.php index cf52a1890..5cbc85077 100644 --- a/lib/plugins/authpdo/lang/cs/lang.php +++ b/lib/plugins/authpdo/lang/cs/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> */ $lang['connectfail'] = 'Selhalo připojení k databázi.'; diff --git a/lib/plugins/authpdo/lang/cs/settings.php b/lib/plugins/authpdo/lang/cs/settings.php new file mode 100644 index 000000000..08de9539e --- /dev/null +++ b/lib/plugins/authpdo/lang/cs/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Robert Surý <rsurycz@seznam.cz> + */ +$lang['debug'] = 'Vytištění podrobných chybových zpráv. Po dokončení nastavení by mělo být deaktivováno.'; +$lang['dsn'] = 'DSN pro připojení k databázi.'; +$lang['user'] = 'Uživatel pro výše uvedené připojení k databázi (prázdný pro sqlite)'; +$lang['pass'] = 'Heslo pro výše uvedené připojení k databázi (prázdné pro sqlite)'; +$lang['select-user'] = 'Příkaz SQL pro výběr dat jednoho uživatele'; +$lang['select-user-groups'] = 'Příkaz SQL pro výběr všech skupin jednoho uživatele'; +$lang['select-groups'] = 'Příkaz SQL pro výběr všech dostupných skupin'; +$lang['insert-user'] = 'Příkaz SQL pro vložení nového uživatele do databáze'; +$lang['delete-user'] = 'Příkaz SQL pro odebrání jednoho uživatele z databáze'; +$lang['list-users'] = 'Příkaz SQL pro výpis seznamu uživatelů odpovídajících filtru'; +$lang['count-users'] = 'Příkaz SQL pro spočítání uživatelů odpovídajících filtru'; +$lang['update-user-info'] = 'Příkaz SQL pro aktualizaci celého jména a e-mailové adresy jednoho uživatele'; +$lang['update-user-login'] = 'Příkaz SQL pro aktualizaci přihlašovacího jména jednoho uživatele'; +$lang['update-user-pass'] = 'Příkaz SQL pro aktualizaci hesla jednoho uživatele'; +$lang['insert-group'] = 'Příkaz SQL pro vložení nové skupiny do databáze'; +$lang['join-group'] = 'Příkaz SQL pro přidání uživatele do existující skupiny'; +$lang['leave-group'] = 'Příkaz SQL pro odebrání uživatele ze skupiny'; +$lang['check-pass'] = 'Příkaz SQL ke kontrole hesla uživatele. Může zůstat prázdný, pokud jsou informace o heslech vyvolány ve vybraném uživateli.'; diff --git a/lib/plugins/authpdo/lang/da/lang.php b/lib/plugins/authpdo/lang/da/lang.php new file mode 100644 index 000000000..85c64f084 --- /dev/null +++ b/lib/plugins/authpdo/lang/da/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jacob Palm <mail@jacobpalm.dk> + */ +$lang['connectfail'] = 'Kunne ikke forbinde til database.'; +$lang['userexists'] = 'Beklager, en bruger med dette loginnavn findes allerede.'; +$lang['writefail'] = 'Kunne ikke ændre brugerdata. Informer venligst wikiens administrator.'; diff --git a/lib/plugins/authpdo/lang/da/settings.php b/lib/plugins/authpdo/lang/da/settings.php new file mode 100644 index 000000000..80b6e2e93 --- /dev/null +++ b/lib/plugins/authpdo/lang/da/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jacob Palm <mail@jacobpalm.dk> + */ +$lang['debug'] = 'Vis detaljerede fejlmeddelelser. Bør deaktiveres efter opsætning.'; +$lang['dsn'] = 'DSN der benyttes til at forbinde til databasen.'; +$lang['user'] = 'Brugerkonto til ovenstående databaseforbindelse (blank ved sqlite)'; +$lang['pass'] = 'Adgangskode til ovenstående databaseforbindelse (blank ved sqlite)'; +$lang['select-user'] = 'SQL statement til at selektere data for en enkelt bruger'; +$lang['select-user-groups'] = 'SQL statement til at selektere alle grupper en enkelt bruger er medlem af'; +$lang['select-groups'] = 'SQL statement til at selektere alle tilgængelige grupper'; +$lang['insert-user'] = 'SQL statement til at indsætte en ny bruger i databasen'; +$lang['delete-user'] = 'SQL statement til at fjerne en bruger fra databasen'; +$lang['list-users'] = 'SQL statement til at selektere brugere ud fra et filter'; +$lang['count-users'] = 'SQL statement til at tælle brugere der matcher et filter'; +$lang['update-user-info'] = 'SQL statement til at opdatere fulde navn og e-mail adresse på en enkelt bruger'; +$lang['update-user-login'] = 'SQL statement til at opdatere loginnavn på en enkelt bruger'; +$lang['update-user-pass'] = 'SQL statement til at opdatere adgangskode på en enkelt bruger'; +$lang['insert-group'] = 'SQL statement til at indsætte en ny gruppe i databasen'; +$lang['join-group'] = 'SQL statement til at tilføje en bruger til en eksisterende gruppe'; +$lang['leave-group'] = 'SQL statement til at fjerne en bruger fra en gruppe'; +$lang['check-pass'] = 'SQL statement til at kontrollere adgangskode for en bruger. Kan efterlades blank hvis adgangskode information hentes når brugeren selekteres.'; diff --git a/lib/plugins/authpdo/lang/de-informal/lang.php b/lib/plugins/authpdo/lang/de-informal/lang.php new file mode 100644 index 000000000..a3d97473a --- /dev/null +++ b/lib/plugins/authpdo/lang/de-informal/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Martin <martin@andev.de> + */ +$lang['connectfail'] = 'Verbindung zur Datenbank fehlgeschlagen.'; +$lang['userexists'] = 'Der Benutzername existiert leider schon.'; +$lang['writefail'] = 'Die Benutzerdaten konnten nicht geändert werden. Bitte wenden Sie sich an den Wiki-Admin.'; diff --git a/lib/plugins/authpdo/lang/de/lang.php b/lib/plugins/authpdo/lang/de/lang.php index 7ae13dd17..3fe2a440b 100644 --- a/lib/plugins/authpdo/lang/de/lang.php +++ b/lib/plugins/authpdo/lang/de/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Noel Tilliot <noeltilliot@byom.de> * @author Hendrik Diel <diel.hendrik@gmail.com> * @author Philip Knack <p.knack@stollfuss.de> diff --git a/lib/plugins/authpdo/lang/de/settings.php b/lib/plugins/authpdo/lang/de/settings.php new file mode 100644 index 000000000..d661d5c01 --- /dev/null +++ b/lib/plugins/authpdo/lang/de/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jürgen Fredriksson <jfriedrich@gmx.at> + */ +$lang['debug'] = 'Zeige detaillierte Fehlermeldungen. Diese sollten nach dem Setup deaktiviert werden.'; +$lang['dsn'] = 'Der DSN(Data Source Name) zur Verbindung mit der Datenbank'; +$lang['user'] = 'Der Benutzer für die obige Datenbankverbindung (leer lassen für SQLite)'; +$lang['pass'] = 'Das Passwort für die obige Datenbankverbindung (leer lassen für SQLite)'; +$lang['select-user'] = 'SQL Anweisung um einen Benutzer abzufragen'; +$lang['select-user-groups'] = 'SQL Anweisung um alle Gruppen eines Benutzers abzufragen'; +$lang['select-groups'] = 'SQL Anweisung um alle verfügbaren Gruppen auszuwählen'; +$lang['insert-user'] = 'SQL Anweisung um einen neuen Benutzer in der Datenbank abzulegen'; +$lang['delete-user'] = 'SQL Anweisung um einen Benutzer aus der Datenbank zu entfernen'; +$lang['list-users'] = 'SQL Anweisung um eine Liste gefilterter Benutzer anzuzeigen'; +$lang['count-users'] = 'SQL Anweisung, welche die Anzahl der gefilterten Benutzer wiedergibt'; +$lang['update-user-info'] = 'SQL Anweisung um den vollen Namen sowie dessen E-Mail Adresse zu aktualisieren'; +$lang['update-user-login'] = 'SQL Anweisung um den Login-Namen eines Benutzers zu aktualisieren'; +$lang['update-user-pass'] = 'SQL Anweisung um das Passwort eines Benutzers zu aktualisieren'; +$lang['insert-group'] = 'SQL Anweisung um eine neue Gruppe in der Datenbank anzulegen'; +$lang['join-group'] = 'SQL Anweisung um einen Benutzer zu einer existierenden Gruppe hinzuzufügen'; +$lang['leave-group'] = 'SQL Anweisung um einen Benutzer aus einer Gruppe zu entfernen'; +$lang['check-pass'] = 'SQL Anweisung um das Passwort eines Benutzers zu überprüfen. Es kann leer gelassen werden wenn die Information über die Benutzerabfrage erhoben wurde.'; diff --git a/lib/plugins/authpdo/lang/el/lang.php b/lib/plugins/authpdo/lang/el/lang.php new file mode 100644 index 000000000..fe944cf44 --- /dev/null +++ b/lib/plugins/authpdo/lang/el/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Aikaterini Katapodi <extragold1234@hotmail.com> + */ +$lang['connectfail'] = 'Δεν μπόρεσε να κάνει σύνδεση με την βάση δεδομένων'; +$lang['userexists'] = 'Συγγνώμη υπάρχει ήδη χρήστης με αυτά τα στοιχεία'; +$lang['writefail'] = 'Δεν μπορέσαμε τα τροποποιήσουμε τα στοιχεία χρήστη. Παρακαλώ ενημερώστε το Wiki-Admin'; diff --git a/lib/plugins/authpdo/lang/el/settings.php b/lib/plugins/authpdo/lang/el/settings.php new file mode 100644 index 000000000..531fefeb2 --- /dev/null +++ b/lib/plugins/authpdo/lang/el/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Aikaterini Katapodi <extragold1234@hotmail.com> + */ +$lang['debug'] = 'Εκτύπωση μηνυμάτων σφαλμάτων λεπτομερώς. Αυτή η ρύθμιση πρέπει μετά να απενεργοποιηθεί.'; +$lang['dsn'] = 'Να συνδεθεί το DSN με τη βάση δεδομένων'; +$lang['user'] = 'Ο συνδεδεμένος χρήστης με την άνω βάση δεδομένων'; +$lang['pass'] = 'Ο κωδικός πρόσβασης της άνω βάσης δεδομένων'; +$lang['select-user'] = 'SQL Αντίγραφο επιλογής δεδομένων ενός απλού χρήστη'; +$lang['select-user-groups'] = 'SQL Αντίγραφο to select all groups of a single user '; +$lang['select-groups'] = 'SQL Αντίγραφο για επιλογή όλων των διαθέσιμων ομάδων '; +$lang['insert-user'] = 'Δηλωτικό SQL για να εισάγει έναν νέο χρήστη στη βάση δεδομένων'; +$lang['delete-user'] = 'Δηλωτικό SQL για αφαίρεση χρήστη από την βάση δεδομένων'; +$lang['list-users'] = 'Δηλωτικό SQL για να ταξινομήσει τους χρήστες με προσαρμογή φίλτρου'; +$lang['count-users'] = 'Δηλωτικό SQL για να μετρήσει τον αριθμό των χρηστών με τη χρήση ενός φίλτρου'; +$lang['update-user-info'] = 'Δηλωτικό SQL για ενημέρωση του ονόματος και της διεύθυνσης email ενός χρήστη'; +$lang['update-user-login'] = 'Δηλωτικό SQL για ενημέρωση του ονόματος σύνδεσης ενός απλού χρήστη '; +$lang['update-user-pass'] = 'Δηλωτικό SQL για ενημέρωση του κωδικού πρόσβασης ενός χρήστη'; +$lang['insert-group'] = 'Δηλωτικό SQL για να εισάγει νέα ομάδα στην βάση δεδομένων'; +$lang['join-group'] = 'Δηλωτικό SQL για πρόσθεση χρήστη σε μια υπάρχουσα ομάδα'; +$lang['leave-group'] = 'Δηλωτικό SQL για αφαίρεση χρήστη από μια ομάδα'; +$lang['check-pass'] = 'Δηλωτικό SQL για να ελέγξει τον κωδικό πρόσβασης για έναν χρήστη. Μπορεί να μείνει κενό αν εισαχθεί κωδικός χρήστη στην ομάδα επιλογής χρήστη.'; diff --git a/lib/plugins/authpdo/lang/es/lang.php b/lib/plugins/authpdo/lang/es/lang.php index 9bd9211e9..c382ebf70 100644 --- a/lib/plugins/authpdo/lang/es/lang.php +++ b/lib/plugins/authpdo/lang/es/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Domingo Redal <docxml@gmail.com> */ $lang['connectfail'] = 'Error al conectar con la base de datos.'; diff --git a/lib/plugins/authpdo/lang/es/settings.php b/lib/plugins/authpdo/lang/es/settings.php new file mode 100644 index 000000000..f866fe1cf --- /dev/null +++ b/lib/plugins/authpdo/lang/es/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author WIRESLINKEA <wireslinkea@gmail.com> + */ +$lang['debug'] = 'Imprime mensajes de error detallados. Debería ser deshabilitado después de la instalación.'; +$lang['dsn'] = 'El DSN para conectarse a la base de datos.'; +$lang['user'] = 'El usuario de la conexión de base de datos anterior (vacía para sqlite)'; +$lang['pass'] = 'La contraseña para la conexión de base de datos anterior (vacía para sqlite)'; +$lang['select-user'] = 'Declaración SQL para seleccionar los datos de un solo usuario'; +$lang['select-user-groups'] = 'Declaración SQL para seleccionar todos los grupos de un solo usuario'; +$lang['select-groups'] = 'Declaración SQL para seleccionar todos los grupos disponibles'; +$lang['insert-user'] = 'Declaración SQL para insertar un nuevo usuario en la base de datos'; +$lang['delete-user'] = 'Declaración SQL para eliminar un único usuario de la base de datos'; +$lang['list-users'] = 'Declaración SQL para mostrar los usuarios que coinciden con un filtro'; +$lang['count-users'] = 'Declaración SQL para contar usuarios que coinciden con un filtro'; +$lang['update-user-info'] = 'Declaración SQL para actualizar el nombre completo y la dirección de correo electrónico de un único usuario'; +$lang['update-user-login'] = 'Declaración SQL para actualizar el nombre de usuario de un solo usuario'; +$lang['update-user-pass'] = 'Declaración SQL para actualizar la contraseña de un solo usuario'; +$lang['insert-group'] = 'Declaración SQL para insertar un nuevo grupo en la base de datos'; +$lang['join-group'] = 'Declaración SQL para agregar un usuario a un grupo existente '; +$lang['leave-group'] = 'Declaración SQL para eliminar un usuario de un grupo'; +$lang['check-pass'] = 'Declaración SQL para verificar la contraseña de un usuario. Puede dejarse vacío si se busca información de contraseña en el usuario de selección.'; diff --git a/lib/plugins/authpdo/lang/fa/lang.php b/lib/plugins/authpdo/lang/fa/lang.php index b26e83698..7f06df888 100644 --- a/lib/plugins/authpdo/lang/fa/lang.php +++ b/lib/plugins/authpdo/lang/fa/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Mohmmad Razavi <sepent@gmail.com> * @author Masoud Sadrnezhaad <masoud@sadrnezhaad.ir> */ diff --git a/lib/plugins/authpdo/lang/fa/settings.php b/lib/plugins/authpdo/lang/fa/settings.php new file mode 100644 index 000000000..201687c00 --- /dev/null +++ b/lib/plugins/authpdo/lang/fa/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Masoud Sadrnezhaad <masoud@sadrnezhaad.ir> + */ +$lang['debug'] = 'جزئیات پیامهای خطا را نمایش بده. باید بعد از تنظیم غیرفعال شود.'; +$lang['dsn'] = 'دیاسان برای اتصال به پایگاه داده'; +$lang['user'] = 'کاربر برای اتصال پایگاه دادهٔ بالا (برای sqlite خالی)'; +$lang['pass'] = 'کلمهٔ عبور برای اتصال پایگاه دادهٔ بالا (برای sqlite خالی)'; +$lang['select-user'] = 'دستور SQL برای انتخاب دادهای از یک کاربر'; +$lang['select-user-groups'] = 'دستور SQL برای انتخاب همهٔ گروههای یک کاربر'; +$lang['select-groups'] = 'دستور SQL برای انتخاب گروههای موجود'; +$lang['insert-user'] = 'دستور SQL برای افزودن یک کاربر جدید به پایگاه داده'; +$lang['delete-user'] = 'دستور SQL برای ححذف یک کاربر از پایگاه داده'; +$lang['list-users'] = 'دستور SQL برای فهرست کردن کاربران دارای ویژگی مشخص'; +$lang['count-users'] = 'دستور SQL برای شمارش کاربران دارای ویژگی مشخص'; +$lang['update-user-info'] = 'دستور SQL برای بهروزرسانی نام کامل و ایمیل یک کاربر'; +$lang['update-user-login'] = 'دستور SQL برای بهروزرسانی نام ورود به سیستم برای یک کاربر'; +$lang['update-user-pass'] = 'دستور SQL برای بهروزرسانی کلمهٔ عبور برای یک کاربر'; +$lang['insert-group'] = 'دستور SQL برای افزودن گروه جدید به پایگاه داده'; +$lang['join-group'] = 'دستور SQL برای افزودن یک کاربر به یک گروه موجود'; +$lang['leave-group'] = 'دستور SQL برای حذف یک کاربر از یک گروه'; +$lang['check-pass'] = 'دستور SQL برای چک کردن کلمهٔ عبور یک کاربر. اگر اطلاعات کلمهٔ عبور در دریافت کاربر گرفته شده میتواند خالی بماند.'; diff --git a/lib/plugins/authpdo/lang/fr/lang.php b/lib/plugins/authpdo/lang/fr/lang.php index ee87b0d52..5473aa71c 100644 --- a/lib/plugins/authpdo/lang/fr/lang.php +++ b/lib/plugins/authpdo/lang/fr/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Pietroni <pietroni@informatique.univ-paris-diderot.fr> */ $lang['connectfail'] = 'Impossible de se connecter à la base de données.'; diff --git a/lib/plugins/authpdo/lang/fr/settings.php b/lib/plugins/authpdo/lang/fr/settings.php new file mode 100644 index 000000000..5c2704a2c --- /dev/null +++ b/lib/plugins/authpdo/lang/fr/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Schplurtz le Déboulonné <schplurtz@laposte.net> + */ +$lang['debug'] = 'Afficher des messages d\'erreur détaillés. Devrait être désactivé passé la configuration.'; +$lang['dsn'] = 'Le DSN de connexion à la base de données.'; +$lang['user'] = 'L\'utilisateur pour la connexion à la base de donnée ci-dessus (vide pour sqlite)'; +$lang['pass'] = 'Le mot de passe pour la connexion à la base de donnée ci-dessus (vide pour sqlite)'; +$lang['select-user'] = 'Instruction SQL pour sélectionner les données d\'un seul utilisateur'; +$lang['select-user-groups'] = 'Instruction SQL pour sélectionner tous les groupes d\'un utilisateur donné'; +$lang['select-groups'] = 'Instruction SQL pour sélectionner tous les groupes disponibles'; +$lang['insert-user'] = 'Instruction SQL pour insérer un nouvel utilisateur dans la base de données'; +$lang['delete-user'] = 'Instruction SQL pour retirer un utilisateur de la base de données'; +$lang['list-users'] = 'Instruction SQL pour lister les utilisateurs correspondant à un filtre'; +$lang['count-users'] = 'Instruction SQL pour compter les utilisateurs correspondant à un filtre'; +$lang['update-user-info'] = 'Instruction SQL pour mettre à jour le nom complet et l\'adresse de courriel d\'un utilisateur donné'; +$lang['update-user-login'] = 'Instruction SQL pour mettre à jour l\'identifiant d\'un utilisateur donné'; +$lang['update-user-pass'] = 'Instruction SQL pour mettre à jour le mot de passe d\'un utilisateur donné'; +$lang['insert-group'] = 'Instruction SQL pour mettre insérer un nouveau groupe dans la base de données'; +$lang['join-group'] = 'Instruction SQL pour ajouter un utilisateur à un groupe existant'; +$lang['leave-group'] = 'Instruction SQL pour retirer un utilisateur d\'un groupe'; +$lang['check-pass'] = 'Instruction SQL pour vérifier le mot de passe d\'un utilisateur. Peut être laissé vide si l\'information de mot de passe est obtenue lors de la sélection d\'un utilisateur.'; diff --git a/lib/plugins/authpdo/lang/it/lang.php b/lib/plugins/authpdo/lang/it/lang.php index 5c0a3f146..56b4a014b 100644 --- a/lib/plugins/authpdo/lang/it/lang.php +++ b/lib/plugins/authpdo/lang/it/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Torpedo <dgtorpedo@gmail.com> */ $lang['connectfail'] = 'Connessione fallita al database.'; diff --git a/lib/plugins/authpdo/lang/it/settings.php b/lib/plugins/authpdo/lang/it/settings.php new file mode 100644 index 000000000..d539c4abd --- /dev/null +++ b/lib/plugins/authpdo/lang/it/settings.php @@ -0,0 +1,26 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Eddy <eddy@mail.it> + * @author Riccardo <riccardo.furlato@gmail.com> + */ +$lang['debug'] = 'Stampa messaggi di errore dettagliati. Dovrebbe essere disabilitato dopo l\'installazione.'; +$lang['dsn'] = 'Il DSN per connettersi al database.'; +$lang['user'] = 'L\'utente per la connessione al database sopra (vuoto per sqlite)'; +$lang['pass'] = 'La password per la connessione al database sopra (vuoto per sqlite)'; +$lang['select-user'] = 'Istruzione SQL per selezionare i dati di un singolo utente'; +$lang['select-user-groups'] = 'Istruzione SQL per selezionare tutti i gruppi di un singolo utente'; +$lang['select-groups'] = 'Istruzione SQL per selezionare tutti i gruppi disponibili'; +$lang['insert-user'] = 'Istruzione SQL per inserire un nuovo utente nel database'; +$lang['delete-user'] = 'Istruzione SQL per rimuovere un singolo utente dal database'; +$lang['list-users'] = 'Istruzione SQL per elencare gli utenti che corrispondono a un filtro'; +$lang['count-users'] = 'Istruzione SQL per contare gli utenti che corrispondono a un filtro'; +$lang['update-user-info'] = 'Istruzione SQL per aggiornare nome completo ed indirizzo email di un singolo utente'; +$lang['update-user-login'] = 'Istruzione SQL per aggiornare il nome di login di un singolo utente'; +$lang['update-user-pass'] = 'Istruzione SQL per aggiornare la password di un singolo utente'; +$lang['insert-group'] = 'Istruzione SQL per inserire un nuovo gruppo nel database'; +$lang['join-group'] = 'Istruzione SQL per aggiungere un utente ad un gruppo esistente'; +$lang['leave-group'] = 'Istruzione SQL per rimuovere un utente da un gruppo'; +$lang['check-pass'] = 'Istruzione SQL per cercare la password di un utente. Può essere omessa se l\'informazioni sulla password è recuperate dalla selezione utente.'; diff --git a/lib/plugins/authpdo/lang/ja/lang.php b/lib/plugins/authpdo/lang/ja/lang.php index 1cd441b60..8893f2d8a 100644 --- a/lib/plugins/authpdo/lang/ja/lang.php +++ b/lib/plugins/authpdo/lang/ja/lang.php @@ -2,9 +2,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> * @author Hideaki SAWADA <chuno@live.jp> */ $lang['connectfail'] = 'データベースへの接続に失敗しました。'; -$lang['userexists'] = 'このログイン名のユーザーが既に存在しています。'; +$lang['userexists'] = '恐れ入りますが、このログイン名のユーザーが既に存在しています。'; $lang['writefail'] = 'ユーザーデータを変更できません。Wiki の管理者に連絡してください。'; diff --git a/lib/plugins/authpdo/lang/ja/settings.php b/lib/plugins/authpdo/lang/ja/settings.php new file mode 100644 index 000000000..b90db26f6 --- /dev/null +++ b/lib/plugins/authpdo/lang/ja/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> + */ +$lang['debug'] = '詳細なエラーメッセージを出力する(セットアップ後、このオプションはオフにすべきです)'; +$lang['dsn'] = 'データベースにアクセスするDSN'; +$lang['user'] = '上記データベースに接続するユーザー名(sqliteの場合は空欄にしておいて下さい)'; +$lang['pass'] = '上記データベースに接続するパスワード(sqliteの場合は空欄にしておいて下さい)'; +$lang['select-user'] = '個々のユーザーのデータを選ぶSQL命令文'; +$lang['select-user-groups'] = '個々のユーザーが属する全てのグループを選ぶSQL命令文'; +$lang['select-groups'] = '利用可能な全グループを選ぶSQL命令文'; +$lang['insert-user'] = 'データベースに新規ユーザーを追加するSQL命令文'; +$lang['delete-user'] = '個々のユーザーをデータベースから取り除くSQL命令文'; +$lang['list-users'] = 'フィルターに一致するユーザーを一覧にするSQL命令文'; +$lang['count-users'] = 'フィルターに一致するユーザーを数えるSQL命令文'; +$lang['update-user-info'] = '個々のユーザーのフルネームとメールアドレスを更新するSQL命令文'; +$lang['update-user-login'] = '個々のユーザーのログイン名を更新するSQL命令文'; +$lang['update-user-pass'] = '個々のユーザーのパスワードを更新するSQL命令文'; +$lang['insert-group'] = 'データベースに新規グループを追加するSQL命令文'; +$lang['join-group'] = '既にあるグループにユーザーを追加するSQL命令文'; +$lang['leave-group'] = 'グループからユーザーを取り除くSQL命令文'; +$lang['check-pass'] = 'ユーザーのパスワードをチェックするSQL命令文(select-userでパスワード情報を呼び出す場合は空欄にしておけます)'; diff --git a/lib/plugins/authpdo/lang/ko/lang.php b/lib/plugins/authpdo/lang/ko/lang.php index 0b14197b4..4a8a4d42e 100644 --- a/lib/plugins/authpdo/lang/ko/lang.php +++ b/lib/plugins/authpdo/lang/ko/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author hyeonsoft <hyeonsoft@live.co.kr> * @author Myeongjin <aranet100@gmail.com> */ diff --git a/lib/plugins/authpdo/lang/ko/settings.php b/lib/plugins/authpdo/lang/ko/settings.php new file mode 100644 index 000000000..e2361d581 --- /dev/null +++ b/lib/plugins/authpdo/lang/ko/settings.php @@ -0,0 +1,29 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author pavement <pavement@rael.cc> + * @author Traend <Traend@ruu.kr> + */ +$lang['debug'] = '자세한 오류 메시지를 출력합니다. 설정 후 비활성화해야 합니다.'; +$lang['dsn'] = '데이터베이스에 연결할 DSN'; +$lang['user'] = '위의 데이터베이스 연결에 대한 사용자(sqlite의 경우 비어 있음)'; +$lang['pass'] = '위의 데이터베이스 연결에 대한 암호(sqlite의 경우 비어 있음)'; +$lang['select-user'] = '단일 사용자의 데이터를 선택하기 위한 SQL 문 +'; +$lang['select-user-groups'] = '단일 사용자의 모든 그룹을 선택하기 위한 SQL 문'; +$lang['select-groups'] = '사용 가능한 모든 그룹을 선택하기 위한 SQL 문 +'; +$lang['insert-user'] = '데이터베이스에 새 사용자를 삽입하는 SQL 문 +'; +$lang['delete-user'] = '데이터베이스에서 단일 사용자를 제거하기 위한 SQL 문'; +$lang['list-users'] = '필터와 일치하는 사용자를 나열하는 SQL 문'; +$lang['count-users'] = '필터와 일치하는 사용자를 계산하는 SQL 문'; +$lang['update-user-info'] = '단일 사용자의 전체 이름과 이메일 주소를 업데이트하는 SQL 문'; +$lang['update-user-login'] = '단일 사용자의 로그인 이름을 업데이트하는 SQL 문'; +$lang['update-user-pass'] = '단일 사용자의 암호를 업데이트하는 SQL 문'; +$lang['insert-group'] = '데이터베이스에 새 그룹을 삽입하는 SQL 문'; +$lang['join-group'] = '기존 그룹에 사용자를 추가하는 SQL 문'; +$lang['leave-group'] = '그룹에서 사용자를 제거하는 SQL 문'; +$lang['check-pass'] = '사용자의 암호를 확인하는 SQL 문입니다. 선택 사용자에서 암호 정보를 가져오는 경우 비워 둘 수 있습니다.'; diff --git a/lib/plugins/authpdo/lang/nl/lang.php b/lib/plugins/authpdo/lang/nl/lang.php index b426f6ba5..c0c688da0 100644 --- a/lib/plugins/authpdo/lang/nl/lang.php +++ b/lib/plugins/authpdo/lang/nl/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Hugo Smet <hugo.smet@scarlet.be> */ $lang['connectfail'] = 'Connectie met de database mislukt.'; diff --git a/lib/plugins/authpdo/lang/nl/settings.php b/lib/plugins/authpdo/lang/nl/settings.php new file mode 100644 index 000000000..4929e9178 --- /dev/null +++ b/lib/plugins/authpdo/lang/nl/settings.php @@ -0,0 +1,26 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Gerrit Uitslag <klapinklapin@gmail.com> + * @author Andy <astolker@icloud.com> + */ +$lang['debug'] = 'Geef gedetailleerde foutmeldingen weer. Dit zou uitgeschakeld moeten zijn na de installatie.'; +$lang['dsn'] = 'De DSN om verbinding te maken met de database.'; +$lang['user'] = 'De gebruikersnaam voor de bovengenoemde database verbinding (laat leeg voor sqlite)'; +$lang['pass'] = 'Het wachtwoord voor de bovengenoemde database verbinding (laat leeg voor sqlite)'; +$lang['select-user'] = 'SQL Statement om de data te selecteren van één gebruiker'; +$lang['select-user-groups'] = 'SQL Statement om alle groepen van één gebruiker te selecteren'; +$lang['select-groups'] = 'SQL Statement om alle beschikbare groepen te selecteren'; +$lang['insert-user'] = 'SQL Statement om een nieuwe gebruiker in de database in te voeren'; +$lang['delete-user'] = 'SQL Statement om één gebruiker uit de database te verwijderen'; +$lang['list-users'] = 'SQL-instructie om gebruikers weer te geven die overeenkomen met een filter'; +$lang['count-users'] = 'SQL-instructie om gebruikers te tellen die overeenkomen met een filter'; +$lang['update-user-info'] = 'SQL-instructie om de volledige naam en e-mailadres van een enkele gebruiker bij te werken'; +$lang['update-user-login'] = 'SQL-instructie om de inlognaam van een enkele gebruiker bij te werken'; +$lang['update-user-pass'] = 'SQL-instructie om het wachtwoord van een enkele gebruiker bij te werken'; +$lang['insert-group'] = 'SQL-instructie om een nieuwe groep aan de database toe te voegen'; +$lang['join-group'] = 'SQL-instructie om een gebruiker aan een bestaande groep toe te voegen'; +$lang['leave-group'] = 'SQL-instructie om een gebruiker uit een groep te verwijderen'; +$lang['check-pass'] = 'SQL-instructie om het wachtwoord van een gebruiker te controleren. Kan leeg gelaten worden als de wachtwoordinformatie wordt opgehaald in select-user'; diff --git a/lib/plugins/authpdo/lang/pl/lang.php b/lib/plugins/authpdo/lang/pl/lang.php new file mode 100644 index 000000000..fd813f1f9 --- /dev/null +++ b/lib/plugins/authpdo/lang/pl/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Przemek <p_kudriawcew@o2.pl> + */ +$lang['connectfail'] = 'Błąd łącznie się z bazą danych'; +$lang['userexists'] = 'Przepraszamy, użytkownik o tym loginie już istnieje'; +$lang['writefail'] = 'Nie można zmodyfikować danych użytkownika. Proszę skontaktować się z Administratorem'; diff --git a/lib/plugins/authpdo/lang/pl/settings.php b/lib/plugins/authpdo/lang/pl/settings.php new file mode 100644 index 000000000..93f328abb --- /dev/null +++ b/lib/plugins/authpdo/lang/pl/settings.php @@ -0,0 +1,17 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Bartek S <sadupl@gmail.com> + * @author Przemek <p_kudriawcew@o2.pl> + */ +$lang['debug'] = 'Wyświetlanie szczegółowej wiadomości o błędzie. Powinno być wyłączone po '; +$lang['dsn'] = 'Nazwa źródła danych do łączenia się z bazą danych'; +$lang['select-user'] = 'Zapytanie SQL, aby wybrać dane jednego użytkownika'; +$lang['select-user-groups'] = 'Zapytanie SQL aby wybrać wszystkie grupy jednego użytkownika'; +$lang['update-user-pass'] = 'Zapytanie SQL do zaktualizowania hasła dla pojedynczego użytkownika'; +$lang['insert-group'] = 'Zapytanie SQL aby dodać nową grupę do bazy danych'; +$lang['join-group'] = 'Zapytanie SQL aby dodać użytkownika do istniejącej grupy'; +$lang['leave-group'] = 'Zapytanie SQL aby usunąć użytkownika z grupy'; +$lang['check-pass'] = 'Zapytanie SQL aby sprawdzić hasło użytkownika. Można pozostawić puste, jeśli informacje o haśle są pobierane w select-user.'; diff --git a/lib/plugins/authpdo/lang/pt-br/lang.php b/lib/plugins/authpdo/lang/pt-br/lang.php index 2008ae609..8f440860b 100644 --- a/lib/plugins/authpdo/lang/pt-br/lang.php +++ b/lib/plugins/authpdo/lang/pt-br/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Frederico Gonçalves Guimarães <frederico@teia.bio.br> */ $lang['connectfail'] = 'Não foi possível conectar ao banco de dados.'; diff --git a/lib/plugins/authpdo/lang/pt-br/settings.php b/lib/plugins/authpdo/lang/pt-br/settings.php new file mode 100644 index 000000000..b1d285bad --- /dev/null +++ b/lib/plugins/authpdo/lang/pt-br/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Frederico Gonçalves Guimarães <frederico@teia.bio.br> + */ +$lang['debug'] = 'Exibir mensagens de erro detalhadas. Deve ser desabilitado após a configuração.'; +$lang['dsn'] = 'O DSN para conectar ao banco de dados.'; +$lang['user'] = 'O usuário para a conexão ao banco de dados acima (em branco para sqlite)'; +$lang['pass'] = 'A senha para a conexão ao banco de dados acima (em branco para sqlite)'; +$lang['select-user'] = 'Declaração SQL para selecionar os dados de um único usuário'; +$lang['select-user-groups'] = 'Declaração SQL para selecionar todos os grupos de um único usuário'; +$lang['select-groups'] = 'Declaração SQL para selecionar todos os grupos disponíveis'; +$lang['insert-user'] = 'Declaração SQL para inserir um novo usuário no banco de dados'; +$lang['delete-user'] = 'Declaração SQL para remover um único usuário do banco de dados'; +$lang['list-users'] = 'Declaração SQL para listar usuários correspondentes a um filtro'; +$lang['count-users'] = 'Declaração SQL para contar usuários correspondentes a um filtro'; +$lang['update-user-info'] = 'Declaração SQL para atualizar o nome completo e endereço de e-mail de um único usuário'; +$lang['update-user-login'] = 'Declaração SQL para atualizar o nome de usuário de e-mail de um único usuário'; +$lang['update-user-pass'] = 'Declaração SQL para atualizar a senha de um único usuário'; +$lang['insert-group'] = 'Declaração SQL para inserir um novo grupo no banco de dados'; +$lang['join-group'] = 'Declaração SQL para adicionar um usuário a um grupo existente'; +$lang['leave-group'] = 'Declaração SQL para remover um usuário de um grupo'; +$lang['check-pass'] = 'Declaração SQL para verificar a senha de um usuário. Pode ser deixada em branco se a informação da senha for obtida a partir do usuário selecionado.'; diff --git a/lib/plugins/authpdo/lang/pt/lang.php b/lib/plugins/authpdo/lang/pt/lang.php index f2eca8f59..3e7ed620b 100644 --- a/lib/plugins/authpdo/lang/pt/lang.php +++ b/lib/plugins/authpdo/lang/pt/lang.php @@ -2,8 +2,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Paulo Schopf <pschopf@gmail.com> + * @author Maykon Oliveira <maykonoliveira850@gmail.com> * @author Paulo Carmino <contato@paulocarmino.com> */ -$lang['connectfail'] = 'Falha ao conectar com o banco de dados.'; +$lang['connectfail'] = 'Erro ao conectar o banco de dados.'; $lang['userexists'] = 'Desculpe, esse login já está sendo usado.'; +$lang['writefail'] = 'Não é possível modificar os dados do usuário. Por favor, informe o Wiki-Admin'; diff --git a/lib/plugins/authpdo/lang/pt/settings.php b/lib/plugins/authpdo/lang/pt/settings.php new file mode 100644 index 000000000..45d259b61 --- /dev/null +++ b/lib/plugins/authpdo/lang/pt/settings.php @@ -0,0 +1,26 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Paulo Ricardo Schopf <pschopf@gmail.com> + * @author Maykon Oliveira <maykonoliveira850@gmail.com> + */ +$lang['debug'] = 'Imprima mensagens de erro detalhadas. Deve ser desativado após a configuração.'; +$lang['dsn'] = 'O DSN para se conectar ao banco de dados.'; +$lang['user'] = 'O usuário para a conexão de banco de dados acima (vazio para sqlite)'; +$lang['pass'] = 'A senha para a conexão de banco de dados acima (vazia para sqlite)'; +$lang['select-user'] = 'Instrução SQL para selecionar os dados de um único usuário'; +$lang['select-user-groups'] = 'Instrução SQL para selecionar todos os grupos de um único usuário'; +$lang['select-groups'] = 'Instrução SQL para selecionar todos os grupos disponíveis'; +$lang['insert-user'] = 'Instrução SQL para inserir um novo usuário no banco de dados'; +$lang['delete-user'] = 'Instrução SQL para remover um usuário do banco de dados'; +$lang['list-users'] = 'Instrução SQL para listar usuários que correspondam a um filtro'; +$lang['count-users'] = 'Instrução SQL para contar usuários que correspondam a um filtro'; +$lang['update-user-info'] = 'Instrução SQL para atualizar o nome completo e e-mail de um usuário'; +$lang['update-user-login'] = 'Instrução SQL para atualizar o nome de login de um usuário'; +$lang['update-user-pass'] = 'Instrução SQL para atualizar a senha de um usuário'; +$lang['insert-group'] = 'Instrução SQL para inserir um novo grupo no banco de dados'; +$lang['join-group'] = 'Instrução SQL para adicionar um usuário a um grupo existente'; +$lang['leave-group'] = 'Instrução SQL para remover um usuário de um grupo'; +$lang['check-pass'] = 'Instrução SQL para verificar a senha de um usuário. Pode ser deixado em branco se a informação da senha for buscada no usuário selecionado.'; diff --git a/lib/plugins/authpdo/lang/ru/lang.php b/lib/plugins/authpdo/lang/ru/lang.php index 9f75d1726..9dc832651 100644 --- a/lib/plugins/authpdo/lang/ru/lang.php +++ b/lib/plugins/authpdo/lang/ru/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Takumo <9206984@mail.ru> * @author Aleksandr Selivanov <alexgearbox@yandex.ru> */ diff --git a/lib/plugins/authpdo/lang/ru/settings.php b/lib/plugins/authpdo/lang/ru/settings.php new file mode 100644 index 000000000..144763a0b --- /dev/null +++ b/lib/plugins/authpdo/lang/ru/settings.php @@ -0,0 +1,26 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> + * @author Vyacheslav Strenadko <vyacheslav.strenadko@gmail.com> + */ +$lang['debug'] = 'Выводить подробные сообщения об ошибках. Должно быть отключено после настройки.'; +$lang['dsn'] = 'DSN (имя источника данных) для подключения к базе данных'; +$lang['user'] = 'Имя пользователя для подключения к базе данных (пустое для SQLite)'; +$lang['pass'] = 'Пароль для подключения к базе данных (пустой для SQLite)'; +$lang['select-user'] = 'SQL-выражение для выбора данных одного пользователя'; +$lang['select-user-groups'] = 'SQL-выражение для выбора всех групп одного пользователя'; +$lang['select-groups'] = 'SQL-выражение для выбора всех доступных групп'; +$lang['insert-user'] = 'SQL-выражение для добавления нового пользователя в базу данных'; +$lang['delete-user'] = 'SQL-выражение для удаления одного пользователя из базы данных'; +$lang['list-users'] = 'SQL-выражение для перечисления пользователей, соответствующих фильтру'; +$lang['count-users'] = 'SQL-выражение для подсчёта пользователей, соответствующих фильтру'; +$lang['update-user-info'] = 'SQL-выражение для обновления полного имени и адреса эл. почты одного пользователя'; +$lang['update-user-login'] = 'SQL-выражение для обновления логина одного пользователя'; +$lang['update-user-pass'] = 'SQL-выражение для обновления пароля одного пользователя'; +$lang['insert-group'] = 'SQL-выражение для добавления новой группы в базу данных'; +$lang['join-group'] = 'SQL-выражение для добавления пользователя в существующую группу'; +$lang['leave-group'] = 'SQL-выражение для удаления пользователя из группы'; +$lang['check-pass'] = 'SQL-выражение для проверки пароля пользователя. Может быть пустым, если информация о пароле выбрана пользователем. (Can be left empty if password info is fetched in select-user.)'; diff --git a/lib/plugins/authpdo/lang/sk/lang.php b/lib/plugins/authpdo/lang/sk/lang.php index d143bbf2c..9f7038157 100644 --- a/lib/plugins/authpdo/lang/sk/lang.php +++ b/lib/plugins/authpdo/lang/sk/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Martin Michalek <michalek.dev@gmail.com> */ $lang['connectfail'] = 'Nepodarilo sa pripojiť k databáze.'; diff --git a/lib/plugins/authpdo/lang/sk/settings.php b/lib/plugins/authpdo/lang/sk/settings.php new file mode 100644 index 000000000..0fdbfa4e3 --- /dev/null +++ b/lib/plugins/authpdo/lang/sk/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Martin Michalek <michalek.dev@gmail.com> + */ +$lang['debug'] = 'Výpis podrobných chybových hlásení. Po nastavení by sa malo vypnúť.'; +$lang['dsn'] = 'DSN pre pripojenie k databáze.'; +$lang['user'] = 'Používateľ uvedeného databázového pripojenia (prázdne pre sqllite)'; +$lang['pass'] = 'Heslo uvedeného databázového pripojenia (prázdne pre sqllite)'; +$lang['select-user'] = 'SQL príkaz pre výber údajov používateľa'; +$lang['select-user-groups'] = 'SQL príkaz pre výber všetkých skupín používateľa'; +$lang['select-groups'] = 'SQL príkaz pre výber dostupných skupín'; +$lang['insert-user'] = 'SQL príkaz pre vloženie údajov používateľa do databázy'; +$lang['delete-user'] = 'SQL príkaz pre odstránenie používateľa z databázy'; +$lang['list-users'] = 'SQL príkaz pre výpis používateľov podľa filtra'; +$lang['count-users'] = 'SQL príkaz pre spočítanie používateľov podľa filtra'; +$lang['update-user-info'] = 'SQL príkaz pre aktualizáciu mena a emailu používateľa'; +$lang['update-user-login'] = 'SQL príkaz pre aktualizáciu prihlasovacieho mena používateľa'; +$lang['update-user-pass'] = 'SQL príkaz pre aktualizáciu hesla používateľa'; +$lang['insert-group'] = 'SQL príkaz pre vloženie údajov skupiny do databázy'; +$lang['join-group'] = 'SQL príkaz pre pridanie používateľa do existujúcej skupiny'; +$lang['leave-group'] = 'SQL príkaz pre odstránenie používateľa zo skupiny'; +$lang['check-pass'] = 'SQL príkaz pre kontrolu hesla používateľa. Môže zostať prázdny, ak je informácia o hesle pripojená k výberu údajov používateľa.'; diff --git a/lib/plugins/authpdo/lang/tr/lang.php b/lib/plugins/authpdo/lang/tr/lang.php index 30576c074..6e907165e 100644 --- a/lib/plugins/authpdo/lang/tr/lang.php +++ b/lib/plugins/authpdo/lang/tr/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Mete Cuma <mcumax@gmail.com> */ $lang['connectfail'] = 'Veritabanına bağlantı kurulamadı.'; diff --git a/lib/plugins/authpdo/lang/uk/lang.php b/lib/plugins/authpdo/lang/uk/lang.php new file mode 100644 index 000000000..e5b9d65a3 --- /dev/null +++ b/lib/plugins/authpdo/lang/uk/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Dmytro Marchenko <dmytro.marchenko1989@gmail.com> + */ +$lang['connectfail'] = 'Не вдалося підключитися до бази даних.'; +$lang['userexists'] = 'На жаль, користувач із цим логіном вже існує.'; +$lang['writefail'] = 'Неможливо змінити дані користувача. Будь-ласка, повідомте про це Wiki-Адміністратора'; diff --git a/lib/plugins/authpdo/lang/uk/settings.php b/lib/plugins/authpdo/lang/uk/settings.php new file mode 100644 index 000000000..94abd897a --- /dev/null +++ b/lib/plugins/authpdo/lang/uk/settings.php @@ -0,0 +1,15 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Dmytro Marchenko <dmytro.marchenko1989@gmail.com> + */ +$lang['dsn'] = 'DSN для підключення до бази даних.'; +$lang['user'] = 'Користувач для вищевказаного з\'єднання з базою даних (порожній для sqlite)'; +$lang['pass'] = 'Пароль для вищезазначеного з\'єднання з базою даних (порожній для sqlite)'; +$lang['select-user'] = 'Запит SQL для вибору даних одного користувача'; +$lang['select-user-groups'] = 'Запит SQL для вибору всіх груп одного користувача'; +$lang['select-groups'] = 'Запит SQL для вибору всіх доступних груп'; +$lang['insert-user'] = 'Запит SQL для вставки нового користувача в базу даних'; +$lang['delete-user'] = 'Запит SQL для видалення одного користувача з бази даних'; diff --git a/lib/plugins/authpdo/lang/vi/lang.php b/lib/plugins/authpdo/lang/vi/lang.php new file mode 100644 index 000000000..42de9865a --- /dev/null +++ b/lib/plugins/authpdo/lang/vi/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['connectfail'] = 'Không thể kết nối với cơ sở dữ liệu.'; +$lang['userexists'] = 'Xin lỗi, thành viên có thông tin đăng nhập này đã tồn tại.'; +$lang['writefail'] = 'Không thể sửa đổi dữ liệu thành viên. Vui lòng thông báo cho Admin-Wiki'; diff --git a/lib/plugins/authpdo/lang/vi/settings.php b/lib/plugins/authpdo/lang/vi/settings.php new file mode 100644 index 000000000..dfc367ac6 --- /dev/null +++ b/lib/plugins/authpdo/lang/vi/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['debug'] = 'In ra các thông báo lỗi chi tiết. Nên bị vô hiệu hóa sau khi thiết lập.'; +$lang['dsn'] = 'DSN để kết nối với cơ sở dữ liệu.'; +$lang['user'] = 'Thành viên cho kết nối cơ sở dữ liệu trên (trống cho sqlite)'; +$lang['pass'] = 'Mật khẩu cho kết nối cơ sở dữ liệu trên (trống cho sqlite)'; +$lang['select-user'] = 'Câu lệnh SQL để chọn dữ liệu của một thành viên'; +$lang['select-user-groups'] = 'Câu lệnh SQL để chọn tất cả các nhóm của một thành viên'; +$lang['select-groups'] = 'Câu lệnh SQL để chọn tất cả các nhóm có sẵn'; +$lang['insert-user'] = 'Câu lệnh SQL để chèn thành viên mới vào cơ sở dữ liệu'; +$lang['delete-user'] = 'Câu lệnh SQL để xóa một thành viên khỏi cơ sở dữ liệu'; +$lang['list-users'] = 'Câu lệnh SQL để liệt kê thành viên khớp với bộ lọc'; +$lang['count-users'] = 'Câu lệnh SQL để đếm thành viên khớp với bộ lọc'; +$lang['update-user-info'] = 'Câu lệnh SQL để cập nhật tên đầy đủ và địa chỉ thư điện thử của một thành viên'; +$lang['update-user-login'] = 'Câu lệnh SQL để cập nhật tên đăng nhập của một thành viên'; +$lang['update-user-pass'] = 'Câu lệnh SQL để cập nhật mật khẩu của một thành viên'; +$lang['insert-group'] = 'Câu lệnh SQL để chèn một nhóm mới vào cơ sở dữ liệu'; +$lang['join-group'] = 'Câu lệnh SQL để thêm thành viên vào một nhóm hiện có'; +$lang['leave-group'] = 'Câu lệnh SQL để xóa thành viên khỏi một nhóm'; +$lang['check-pass'] = 'Câu lệnh SQL để kiểm tra mật khẩu của thành viên. Có thể để trống nếu thông tin mật khẩu được tìm nạp trong thành viên chọn.'; diff --git a/lib/plugins/authpdo/lang/zh/lang.php b/lib/plugins/authpdo/lang/zh/lang.php index 06c258f9b..be66754a6 100644 --- a/lib/plugins/authpdo/lang/zh/lang.php +++ b/lib/plugins/authpdo/lang/zh/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Errol <errol@hotmail.com> */ $lang['connectfail'] = '连接数据库失败'; diff --git a/lib/plugins/authpdo/lang/zh/settings.php b/lib/plugins/authpdo/lang/zh/settings.php new file mode 100644 index 000000000..9374b75d9 --- /dev/null +++ b/lib/plugins/authpdo/lang/zh/settings.php @@ -0,0 +1,26 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Phy <dokuwiki@phy25.com> + * @author Aaron Zhou <iradio@163.com> + */ +$lang['debug'] = '打印详细的错误信息。应该在设定完成后禁用。'; +$lang['dsn'] = '连接到数据库的DSN'; +$lang['user'] = '以上数据库连接的用户名(sqlite 留空)'; +$lang['pass'] = '以上数据库连接的密码 (sqlite 留空)'; +$lang['select-user'] = '选择单一用户数据的SQL语句'; +$lang['select-user-groups'] = '选择单一用户所有用户组的SQL语句'; +$lang['select-groups'] = '选择所有有效组的SQL语句'; +$lang['insert-user'] = '向数据库插入一个新用户的SQL语句'; +$lang['delete-user'] = '从数据库中移除单个用户的SQL语句'; +$lang['list-users'] = '列出与筛选条件匹配用户的SQL语句'; +$lang['count-users'] = '统计与筛选条件匹配的用户数量的SQL语句'; +$lang['update-user-info'] = '更新单一用户全名和email地址的SQL语句'; +$lang['update-user-login'] = '更新单一用户登录名的SQL语句'; +$lang['update-user-pass'] = '更新单一用户密码的SQL语句'; +$lang['insert-group'] = '向数据库中插入一个新组的SQL语句'; +$lang['join-group'] = '把用户增加到现有用户组的 SQL 语句'; +$lang['leave-group'] = '把用户移除出现有用户组的 SQL 语句'; +$lang['check-pass'] = '查询用户密码的 SQL 语句(如密码在 select-user 查询时已经获取,则本设置可留空)'; |