From d397e6da631cb6d262ad14ec7b46b75d1b60fbcf Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 12 Mar 2014 15:25:18 +0000 Subject: Restore correct public interface of getUserData() for authldap plugin The outer/public getUserData() implemented as a wrapper for the previous fn which is now protected. --- lib/plugins/authldap/auth.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 6c3637e15..9d03afd7f 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -103,7 +103,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { return true; } else { // See if we can find the user - $info = $this->getUserData($user, true); + $info = $this->_getUserData($user, true); if(empty($info['dn'])) { return false; } else { @@ -145,11 +145,19 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @author Stephane Chazelas * @author Steffen Schoch * + * @param string $user + * @return array containing user data or false + */ + public function getUserData($user) { + return $this->_getUserData($user); + } + + /** * @param string $user * @param bool $inbind authldap specific, true if in bind phase * @return array containing user data or false */ - public function getUserData($user, $inbind = false) { + protected function _getUserData($user, $inbind = false) { global $conf; if(!$this->_openLDAP()) return false; -- cgit v1.2.3 From 2046a6546c8ed62b9a7b33305b6201458f2f8291 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 12 Mar 2014 15:38:28 +0000 Subject: Allow user info to be retrieved without groups Some parts of dokuwiki (e.g. recent changes, old revisions) can requests lots of user info (to provide editor names) without requiring any group information. This change also implements caching of user info by authmysql & authpgsql plugins to avoid repeated querying of the DB to retrieve the same user information. --- lib/plugins/auth.php | 6 +- lib/plugins/authad/auth.php | 3 +- lib/plugins/authldap/auth.php | 3 +- lib/plugins/authmysql/auth.php | 147 +++++++++++++++++++++++++++++++++++------ lib/plugins/authpgsql/auth.php | 8 ++- lib/plugins/authplain/auth.php | 3 +- 6 files changed, 143 insertions(+), 27 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index b04735639..f9e5cded9 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -15,6 +15,9 @@ if(!defined('DOKU_INC')) die(); class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { public $success = true; + const IGNORE_GROUPS = false; + const REQUIRE_GROUPS = true; + /** * Possible things an auth backend module may be able to * do. The things a backend can do need to be set to true @@ -234,9 +237,10 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * * @author Andreas Gohr * @param string $user the user name + * @param bool $requireGroups whether or not the returned data must include groups * @return array containing user data or false */ - public function getUserData($user) { + public function getUserData($user, $requireGroups=true) { if(!$this->cando['external']) msg("no valid authorisation system in use", -1); return false; } diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 0860e5756..a3119dda6 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -177,9 +177,10 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * * @author James Van Lommel * @param string $user + * @param bool $requireGroups (optional) - ignored, groups are always supplied by this plugin * @return array */ - public function getUserData($user) { + public function getUserData($user, $requireGroups=true) { global $conf; global $lang; global $ID; diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 9d03afd7f..eaa2d160a 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -146,9 +146,10 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @author Steffen Schoch * * @param string $user + * @param bool $requireGroups (optional) - ignored, groups are always supplied by this plugin * @return array containing user data or false */ - public function getUserData($user) { + public function getUserData($user, $requireGroups=true) { return $this->_getUserData($user); } diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 1e6e6a4a9..774fce01f 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -21,6 +21,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { /** @var int database subrevision */ protected $dbsub = 0; + /** @var array cache to avoid re-reading user info data */ + protected $cacheUserInfo = array(); + /** * Constructor * @@ -174,12 +177,18 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @author Matthias Grimm * * @param string $user user login to get data for + * @param bool $requireGroups when true, group membership information should be included in the returned array; + * when false, it maybe included, but is not required by the caller * @return array|bool */ - public function getUserData($user) { + public function getUserData($user, $requireGroups=true) { + if($this->_cacheExists($user, $requireGroups)) { + return $this->cacheUserInfo[$user]; + } + if($this->_openDB()) { $this->_lockTables("READ"); - $info = $this->_getUserInfo($user); + $info = $this->_getUserInfo($user, $requireGroups); $this->_unlockTables(); $this->_closeDB(); } else @@ -262,21 +271,23 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { if($this->_openDB()) { $this->_lockTables("WRITE"); - if(($uid = $this->_getUserID($user))) { - $rc = $this->_updateUserInfo($changes, $uid); + $rc = $this->_updateUserInfo($user, $changes); - if($rc && isset($changes['grps']) && $this->cando['modGroups']) { - $groups = $this->_getGroups($user); - $grpadd = array_diff($changes['grps'], $groups); - $grpdel = array_diff($groups, $changes['grps']); + if($rc && isset($changes['grps']) && $this->cando['modGroups']) { + $groups = $this->_getGroups($user); + $grpadd = array_diff($changes['grps'], $groups); + $grpdel = array_diff($groups, $changes['grps']); - foreach($grpadd as $group) - if(($this->_addUserToGroup($user, $group, 1)) == false) - $rc = false; + foreach($grpadd as $group) { + if(($this->_addUserToGroup($user, $group, 1)) == false) { + $rc = false; + } + } - foreach($grpdel as $group) - if(($this->_delUserFromGroup($user, $group)) == false) - $rc = false; + foreach($grpdel as $group) { + if(($this->_delUserFromGroup($user, $group)) == false) { + $rc = false; + } } } @@ -466,7 +477,10 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $sql = str_replace('%{user}', $this->_escape($user), $sql); $sql = str_replace('%{gid}', $this->_escape($gid), $sql); $sql = str_replace('%{group}', $this->_escape($group), $sql); - if($this->_modifyDB($sql) !== false) return true; + if($this->_modifyDB($sql) !== false) { + $this->_flushUserInfoCache($user); + return true; + } if($newgroup) { // remove previously created group on error $sql = str_replace('%{gid}', $this->_escape($gid), $this->getConf('delGroup')); @@ -501,6 +515,10 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $sql = str_replace('%{gid}', $this->_escape($gid), $sql); $sql = str_replace('%{group}', $this->_escape($group), $sql); $rc = $this->_modifyDB($sql) == 0 ? true : false; + + if ($rc) { + $this->_flushUserInfoCache($user); + } } } return $rc; @@ -590,6 +608,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { } if($gid !== false){ + $this->_flushUserInfoCache($user); return true; } else { /* remove the new user and all group relations if a group can't @@ -626,16 +645,96 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $sql = str_replace('%{uid}', $this->_escape($uid), $this->getConf('delUser')); $sql = str_replace('%{user}', $this->_escape($user), $sql); $this->_modifyDB($sql); + $this->_flushUserInfoCache($user); + return true; + } + } + return false; + } + + /** + * Flush cached user information + * + * @author Christopher Smith + * + * @param string $user username of the user whose data is to be removed from the cache + * if null, empty the whole cache + * @return none + */ + protected function _flushUserInfoCache($user=null) { + if (is_null($user)) { + $this->cacheUserInfo = array(); + } else { + unset($this->cacheUserInfo[$user]); + } + } + + /** + * Quick lookup to see if a user's information has been cached + * + * This test does not need a database connection or read lock + * + * @author Christopher Smith + * + * @param string $user username to be looked up in the cache + * @param bool $requireGroups true, if cached info should include group memberships + * + * @return bool existence of required user information in the cache + */ + protected function _cacheExists($user, $requireGroups=true) { + if (isset($this->cacheUserInfo[$user])) { + if (!is_array($this->cacheUserInfo[$user])) { + return true; // user doesn't exist + } + + if (!$requireGroups || isset($this->cacheUserInfo[$user]['grps'])) { return true; } } + return false; } /** - * getUserInfo + * Get a user's information + * + * The database connection must already be established for this function to work. + * + * @author Christopher Smith + * + * @param string $user username of the user whose information is being reterieved + * @param bool $requireGroups true if group memberships should be included + * @param bool $useCache true if ok to return cached data & to cache returned data + * + * @return mixed false|array false if the user doesn't exist + * array containing user information if user does exist + */ + protected function _getUserInfo($user, $requireGroups=true, $useCache=true) { + $info = null; + + if ($useCache && isset($this->cacheUserInfo[$user])) { + $info = $this->cacheUserInfo[$user]; + } + + if (is_null($info)) { + $info = $this->_retrieveUserInfo($user); + } + + if ($requireGroups && $info && !isset($info['grps'])) { + $info['grps'] = $this->_getGroups($user); + } + + if ($useCache) { + $this->cacheUserInfo[$user] = $info; + } + + return $info; + } + + /** + * retrieveUserInfo * - * Gets the data for a specific user The database connection + * Gets the data for a specific user. The database connection * must already be established for this function to work. * Otherwise it will return 'false'. * @@ -644,12 +743,11 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @param string $user user's nick to get data for * @return bool|array false on error, user info on success */ - protected function _getUserInfo($user) { + protected function _retrieveUserInfo($user) { $sql = str_replace('%{user}', $this->_escape($user), $this->getConf('getUserInfo')); $result = $this->_queryDB($sql); if($result !== false && count($result)) { $info = $result[0]; - $info['grps'] = $this->_getGroups($user); return $info; } return false; @@ -666,20 +764,26 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * The database connection has already to be established for this * function to work. Otherwise it will return 'false'. * - * The password will be crypted if necessary. + * The password will be encrypted if necessary. * + * @param string $user user's nick being updated * @param array $changes array of items to change as pairs of item and value * @param mixed $uid user id of dataset to change, must be unique in DB * @return bool true on success or false on error * * @author Matthias Grimm */ - protected function _updateUserInfo($changes, $uid) { + protected function _updateUserInfo($user, $changes) { $sql = $this->getConf('updateUser')." "; $cnt = 0; $err = 0; if($this->dbcon) { + $uid = $this->_getUserID($user); + if ($uid === false) { + return false; + } + foreach($changes as $item => $value) { if($item == 'user') { if(($this->_getUserID($changes['user']))) { @@ -707,6 +811,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $sql .= " ".str_replace('%{uid}', $uid, $this->getConf('UpdateTarget')); if(get_class($this) == 'auth_mysql') $sql .= " LIMIT 1"; //some PgSQL inheritance comp. $this->_modifyDB($sql); + $this->_flushUserInfoCache($user); } return true; } diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php index e51b39858..99f3ed443 100644 --- a/lib/plugins/authpgsql/auth.php +++ b/lib/plugins/authpgsql/auth.php @@ -160,7 +160,7 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { $result = $this->_queryDB($sql); foreach($result as $user) - if(($info = $this->_getUserInfo($user['user']))) + if(($info = $this->_getCachedUserInfo($user['user']))) $out[$user['user']] = $info; $this->_unlockTables(); @@ -212,7 +212,10 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { $sql = str_replace('%{user}', addslashes($user), $sql); $sql = str_replace('%{gid}', addslashes($gid), $sql); $sql = str_replace('%{group}', addslashes($group), $sql); - if($this->_modifyDB($sql) !== false) return true; + if($this->_modifyDB($sql) !== false) { + $this->_flushUserInfoCache($user); + return true; + } if($newgroup) { // remove previously created group on error $sql = str_replace('%{gid}', addslashes($gid), $this->conf['delGroup']); @@ -267,6 +270,7 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { } if($gid !== false){ + $this->_flushUserInfoCache($user); return true; } else { /* remove the new user and all group relations if a group can't diff --git a/lib/plugins/authplain/auth.php b/lib/plugins/authplain/auth.php index 8c4ce0dd9..16ecaa147 100644 --- a/lib/plugins/authplain/auth.php +++ b/lib/plugins/authplain/auth.php @@ -76,9 +76,10 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * * @author Andreas Gohr * @param string $user + * @param bool $requireGroups (optional) ignored by this plugin, grps info always supplied * @return array|bool */ - public function getUserData($user) { + public function getUserData($user, $requireGroups=true) { if($this->users === null) $this->_loadUserData(); return isset($this->users[$user]) ? $this->users[$user] : false; } -- cgit v1.2.3 From 3fb3173756af152604d5d7bb3f1713a95eab5b52 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 12 Mar 2014 17:56:55 +0000 Subject: code styling - add missing braces --- lib/plugins/authmysql/auth.php | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 774fce01f..a5300c604 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -160,10 +160,11 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $result = $this->_queryDB($sql); if($result !== false && count($result) == 1) { - if($this->getConf('forwardClearPass') == 1) + if($this->getConf('forwardClearPass') == 1) { $rc = true; - else + } else { $rc = auth_verifyPassword($pass, $result[0]['pass']); + } } $this->_closeDB(); } @@ -191,8 +192,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $info = $this->_getUserInfo($user, $requireGroups); $this->_unlockTables(); $this->_closeDB(); - } else + } else { $info = false; + } return $info; } @@ -218,12 +220,14 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { global $conf; if($this->_openDB()) { - if(($info = $this->_getUserInfo($user)) !== false) + if(($info = $this->_getUserInfo($user)) !== false) { return false; // user already exists + } // set defaultgroup if no groups were given - if($grps == null) + if($grps == null) { $grps = array($conf['defaultgroup']); + } $this->_lockTables("WRITE"); $pwd = $this->getConf('forwardClearPass') ? $pwd : auth_cryptPassword($pwd); @@ -265,8 +269,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { public function modifyUser($user, $changes) { $rc = false; - if(!is_array($changes) || !count($changes)) + if(!is_array($changes) || !count($changes)) { return true; // nothing to change + } if($this->_openDB()) { $this->_lockTables("WRITE"); @@ -315,8 +320,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { if(is_array($users) && count($users)) { $this->_lockTables("WRITE"); foreach($users as $user) { - if($this->_delUser($user)) + if($this->_delUser($user)) { $count++; + } } $this->_unlockTables(); } @@ -378,9 +384,11 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $result = $this->_queryDB($sql); if(!empty($result)) { - foreach($result as $user) - if(($info = $this->_getUserInfo($user['user']))) + foreach($result as $user) { + if(($info = $this->_getUserInfo($user['user']))) { $out[$user['user']] = $info; + } + } } $this->_unlockTables(); @@ -544,8 +552,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $result = $this->_queryDB($sql); if($result !== false && count($result)) { - foreach($result as $row) + foreach($result as $row) { $groups[] = $row['group']; + } } return $groups; } -- cgit v1.2.3 From 792883c4aaba64146ea38cd62287c96cb8121c1f Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 12 Mar 2014 17:57:34 +0000 Subject: fix comment errors, sp. & grammar --- lib/plugins/authmysql/auth.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index a5300c604..0ddbff99b 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -247,17 +247,17 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * The dataset update will be rejected if the user name should be changed * to an already existing one. * - * The password must be provides unencrypted. Pasword cryption is done + * The password must be provided unencrypted. Pasword encryption is done * automatically if configured. * - * If one or more groups could't be updated, an error would be set. In + * If one or more groups can't be updated, an error will be set. In * this case the dataset might already be changed and we can't rollback - * the changes. Transactions would be really usefull here. + * the changes. Transactions would be really useful here. * * modifyUser() may be called without SQL statements defined that are * needed to change group membership (for example if only the user profile - * should be modified). In this case we asure that we don't touch groups - * even $changes['grps'] is set by mistake. + * should be modified). In this case we assure that we don't touch groups + * even when $changes['grps'] is set by mistake. * * @author Chris Smith * @author Matthias Grimm @@ -642,7 +642,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * * @author Matthias Grimm * - * @param string $user user whose id is desired + * @param string $user username of the user to be deleted * @return bool */ protected function _delUser($user) { -- cgit v1.2.3 From 06e3e0c7b506a637df1ea27c6a8a439756e7139d Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Fri, 14 Mar 2014 17:58:53 +0000 Subject: use $requireGroups constants in auth classes; comments; code improvements --- lib/plugins/auth.php | 4 ++-- lib/plugins/authmysql/auth.php | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index f9e5cded9..9275611be 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -232,7 +232,7 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * at least these fields: * * name string full name of the user - * mail string email addres of the user + * mail string email address of the user * grps array list of groups the user is in * * @author Andreas Gohr @@ -240,7 +240,7 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * @param bool $requireGroups whether or not the returned data must include groups * @return array containing user data or false */ - public function getUserData($user, $requireGroups=true) { + public function getUserData($user, $requireGroups=self::REQUIRE_GROUPS) { if(!$this->cando['external']) msg("no valid authorisation system in use", -1); return false; } diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 0ddbff99b..d3906759b 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -182,7 +182,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * when false, it maybe included, but is not required by the caller * @return array|bool */ - public function getUserData($user, $requireGroups=true) { + public function getUserData($user, $requireGroups=DokuWiki_Auth_Plugin::REQUIRE_GROUPS) { if($this->_cacheExists($user, $requireGroups)) { return $this->cacheUserInfo[$user]; } @@ -690,13 +690,13 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * * @return bool existence of required user information in the cache */ - protected function _cacheExists($user, $requireGroups=true) { + protected function _cacheExists($user, $requireGroups=DokuWiki_Auth_Plugin::REQUIRE_GROUPS) { if (isset($this->cacheUserInfo[$user])) { if (!is_array($this->cacheUserInfo[$user])) { return true; // user doesn't exist } - if (!$requireGroups || isset($this->cacheUserInfo[$user]['grps'])) { + if ($requireGroups == DokuWiki_Auth_Plugin::IGNORE_GROUPS || isset($this->cacheUserInfo[$user]['grps'])) { return true; } } @@ -718,7 +718,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @return mixed false|array false if the user doesn't exist * array containing user information if user does exist */ - protected function _getUserInfo($user, $requireGroups=true, $useCache=true) { + protected function _getUserInfo($user, $requireGroups=DokuWiki_Auth_Plugin::REQUIRE_GROUPS, $useCache=true) { $info = null; if ($useCache && isset($this->cacheUserInfo[$user])) { @@ -729,7 +729,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $info = $this->_retrieveUserInfo($user); } - if ($requireGroups && $info && !isset($info['grps'])) { + if (($requireGroups == DokuWiki_Auth_Plugin::REQUIRE_GROUPS) && $info && !isset($info['grps'])) { $info['grps'] = $this->_getGroups($user); } -- cgit v1.2.3 From 2dc9e90007f12ac996b0e74479137a9dc6243c3c Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 4 May 2014 19:20:11 +0100 Subject: KISS - remove class constants for REQUIRE_GROUPS & IGNORE_GROUPS and replace with boolean values --- lib/plugins/auth.php | 5 +---- lib/plugins/authmysql/auth.php | 10 +++++----- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index 9275611be..b38b591a3 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -15,9 +15,6 @@ if(!defined('DOKU_INC')) die(); class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { public $success = true; - const IGNORE_GROUPS = false; - const REQUIRE_GROUPS = true; - /** * Possible things an auth backend module may be able to * do. The things a backend can do need to be set to true @@ -240,7 +237,7 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * @param bool $requireGroups whether or not the returned data must include groups * @return array containing user data or false */ - public function getUserData($user, $requireGroups=self::REQUIRE_GROUPS) { + public function getUserData($user, $requireGroups=true) { if(!$this->cando['external']) msg("no valid authorisation system in use", -1); return false; } diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index d3906759b..95c62f636 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -182,7 +182,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * when false, it maybe included, but is not required by the caller * @return array|bool */ - public function getUserData($user, $requireGroups=DokuWiki_Auth_Plugin::REQUIRE_GROUPS) { + public function getUserData($user, $requireGroups=true) { if($this->_cacheExists($user, $requireGroups)) { return $this->cacheUserInfo[$user]; } @@ -690,13 +690,13 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * * @return bool existence of required user information in the cache */ - protected function _cacheExists($user, $requireGroups=DokuWiki_Auth_Plugin::REQUIRE_GROUPS) { + protected function _cacheExists($user, $requireGroups=true) { if (isset($this->cacheUserInfo[$user])) { if (!is_array($this->cacheUserInfo[$user])) { return true; // user doesn't exist } - if ($requireGroups == DokuWiki_Auth_Plugin::IGNORE_GROUPS || isset($this->cacheUserInfo[$user]['grps'])) { + if (!$requireGroups || isset($this->cacheUserInfo[$user]['grps'])) { return true; } } @@ -718,7 +718,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @return mixed false|array false if the user doesn't exist * array containing user information if user does exist */ - protected function _getUserInfo($user, $requireGroups=DokuWiki_Auth_Plugin::REQUIRE_GROUPS, $useCache=true) { + protected function _getUserInfo($user, $requireGroups=true, $useCache=true) { $info = null; if ($useCache && isset($this->cacheUserInfo[$user])) { @@ -729,7 +729,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $info = $this->_retrieveUserInfo($user); } - if (($requireGroups == DokuWiki_Auth_Plugin::REQUIRE_GROUPS) && $info && !isset($info['grps'])) { + if (($requireGroups == true) && $info && !isset($info['grps'])) { $info['grps'] = $this->_getGroups($user); } -- cgit v1.2.3 From 06da270e039cf517a6bd847ca0cd4a7819c9f879 Mon Sep 17 00:00:00 2001 From: Axel Angel Date: Sun, 4 May 2014 11:46:35 +0200 Subject: Authldap: implement change password in modifyUser --- lib/plugins/authldap/auth.php | 55 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 6c3637e15..13ffb8be2 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -36,8 +36,8 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { return; } - // auth_ldap currently just handles authentication, so no - // capabilities are set + // Add the capabilities to change the password + $this->cando['modPass'] = true; } /** @@ -263,6 +263,57 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { return $info; } + /** + * Definition of the function modifyUser in order to modify the password + */ + + function modifyUser($user,$changes){ + + // open the connection to the ldap + if(!$this->_openLDAP()){ + msg('LDAP cannot connect: '. htmlspecialchars(ldap_error($this->con))); + return false; + } + + // find the information about the user, in particular the "dn" + $info = $this->getUserData($user,true); + if(empty($info['dn'])) { + msg('LDAP cannot find your user dn: '. htmlspecialchars($info['dn'])); + return false; + } else { + $dn = $info['dn']; + } + + // find the new password and encrypt it whit SSHA + if(empty($changes['pass'])) { + msg('The new password is not allow because it\'s empty'); + return false; + } else { + mt_srand((double)microtime()*1000000); + $salt = pack("CCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand()); + $hash = "{SSHA}" . base64_encode(pack("H*", sha1($changes['pass'] . $salt)) . $salt); + } + + // find the old password of the user + list($loginuser,$loginsticky,$loginpass) = auth_getCookie(); + $secret = auth_cookiesalt(!$sticky, true); //bind non-sticky to session + $pass = auth_decrypt($loginpass, $secret); + + // bind with the ldap + if(!@ldap_bind($this->con,$dn,$pass)){ + msg('LDAP user bind failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + return false; + } + + // change the password + if(!@ldap_mod_replace($this->con, $dn,array('userpassword' => $hash))){ + msg('LDAP mod replace failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con))); + return false; + } + + return true; + } + /** * Most values in LDAP are case-insensitive * -- cgit v1.2.3 From 719c6730c7da93e830205e42dc230de831446e8f Mon Sep 17 00:00:00 2001 From: Axel Angel Date: Sun, 4 May 2014 12:26:13 +0200 Subject: Allow authldap to change password with ldap superuser only if necessary --- lib/plugins/authldap/auth.php | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 13ffb8be2..5bdaf0446 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -296,13 +296,25 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { // find the old password of the user list($loginuser,$loginsticky,$loginpass) = auth_getCookie(); - $secret = auth_cookiesalt(!$sticky, true); //bind non-sticky to session - $pass = auth_decrypt($loginpass, $secret); + if ($loginuser !== null) { // the user is currently logged in + $secret = auth_cookiesalt(!$sticky, true); + $pass = auth_decrypt($loginpass, $secret); - // bind with the ldap - if(!@ldap_bind($this->con,$dn,$pass)){ - msg('LDAP user bind failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); - return false; + // bind with the ldap + if(!@ldap_bind($this->con, $dn, $pass)){ + msg('LDAP user bind failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + return false; + } + } elseif ($this->getConf('binddn') && $this->getConf('bindpw')) { + // we are changing the password on behalf of the user (eg: forgotten password) + // bind with the superuser ldap + if (!@ldap_bind($this->con, $this->getConf('binddn'), $this->getConf('bindpw'))){ + $this->_debug('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + return false; + } + } + else { + return false; // no otherway } // change the password -- cgit v1.2.3 From 67723447f02824ff2df7daa0f1f97d8b289c5d7a Mon Sep 17 00:00:00 2001 From: Axel Angel Date: Sun, 4 May 2014 19:54:37 +0200 Subject: Hash and salt password with PassHash::ssha Moved the block closer to the variable use (indent clearer) --- lib/plugins/authldap/auth.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 5bdaf0446..ecbbc2a3a 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -288,10 +288,6 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { if(empty($changes['pass'])) { msg('The new password is not allow because it\'s empty'); return false; - } else { - mt_srand((double)microtime()*1000000); - $salt = pack("CCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand()); - $hash = "{SSHA}" . base64_encode(pack("H*", sha1($changes['pass'] . $salt)) . $salt); } // find the old password of the user @@ -317,6 +313,10 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { return false; // no otherway } + // Generate the salted hashed password for LDAP + $phash = new PassHash(); + $hash = $phash->hash_ssha($changes['pass']); + // change the password if(!@ldap_mod_replace($this->con, $dn,array('userpassword' => $hash))){ msg('LDAP mod replace failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con))); -- cgit v1.2.3 From 8f2ea93bb09b8744de56a8797176d3a209c2e8d7 Mon Sep 17 00:00:00 2001 From: Axel Angel Date: Thu, 8 May 2014 12:19:39 +0200 Subject: Simplify code and remove unreachable check --- lib/plugins/authldap/auth.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index ecbbc2a3a..bda8f2abe 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -278,17 +278,10 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { // find the information about the user, in particular the "dn" $info = $this->getUserData($user,true); if(empty($info['dn'])) { - msg('LDAP cannot find your user dn: '. htmlspecialchars($info['dn'])); - return false; - } else { - $dn = $info['dn']; - } - - // find the new password and encrypt it whit SSHA - if(empty($changes['pass'])) { - msg('The new password is not allow because it\'s empty'); + msg('LDAP cannot find your user dn'); return false; } + $dn = $info['dn']; // find the old password of the user list($loginuser,$loginsticky,$loginpass) = auth_getCookie(); -- cgit v1.2.3 From bd0092a4db2ae72d5c564d383810c0b65c9b9ece Mon Sep 17 00:00:00 2001 From: Rene Date: Thu, 8 May 2014 13:11:03 +0200 Subject: translation update --- lib/plugins/extension/lang/nl/intro_search.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/nl/intro_search.txt b/lib/plugins/extension/lang/nl/intro_search.txt index 8fc3900ad..f0c8d7435 100644 --- a/lib/plugins/extension/lang/nl/intro_search.txt +++ b/lib/plugins/extension/lang/nl/intro_search.txt @@ -1 +1 @@ -Deze tab verschaft u toegang tot alle plugins en templates vervaardigd door derden en bestemd voor Dokuwiki. Houdt er rekening meel dat indien u Plugins van derden installeerd deze een **veiligheids risico ** kunnen bevatten, geadviseerd wordt om eerst te lezen [[doku>security#plugin_security|plugin security]]. \ No newline at end of file +Deze tab verschaft u toegang tot alle plugins en templates vervaardigd door derden en bestemd voor Dokuwiki. Houdt er rekening mee dat indien u Plugins van derden installeert deze een **veiligheids risico ** kunnen bevatten, geadviseerd wordt om eerst te lezen [[doku>security#plugin_security|plugin security]]. \ No newline at end of file -- cgit v1.2.3 From 90bedf259b8cdbaf36db4b77301e271d0865c642 Mon Sep 17 00:00:00 2001 From: Rene Date: Fri, 9 May 2014 21:22:20 +0200 Subject: translation update --- lib/plugins/extension/lang/nl/intro_plugins.txt | 2 +- lib/plugins/extension/lang/nl/intro_templates.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/nl/intro_plugins.txt b/lib/plugins/extension/lang/nl/intro_plugins.txt index 0077aca30..e12bdf0f8 100644 --- a/lib/plugins/extension/lang/nl/intro_plugins.txt +++ b/lib/plugins/extension/lang/nl/intro_plugins.txt @@ -1 +1 @@ -Dit zijn de momenteel in uw Dokuwiki geïnstalleerde plugins. U kunt deze hier aan of uitschakelen danwel geheel deïnstalleren. Plugin updates zijn hier ook opgenomen, lees de pluin documentatie voordat u update. \ No newline at end of file +Dit zijn de momenteel in uw Dokuwiki geïnstalleerde plugins. U kunt deze hier aan of uitschakelen danwel geheel deïnstalleren. Plugin updates zijn hier ook opgenomen, lees de plugin documentatie voordat u update. \ No newline at end of file diff --git a/lib/plugins/extension/lang/nl/intro_templates.txt b/lib/plugins/extension/lang/nl/intro_templates.txt index 5ef23dadf..52c96cef7 100644 --- a/lib/plugins/extension/lang/nl/intro_templates.txt +++ b/lib/plugins/extension/lang/nl/intro_templates.txt @@ -1 +1 @@ -Deze templates zijn thans in DokuWiki geïnstalleerd. U kent een template selecteren middels [[?do=admin&page=config|Configuration Manager]] . \ No newline at end of file +Deze templates zijn thans in DokuWiki geïnstalleerd. U kunt een template selecteren middels [[?do=admin&page=config|Configuration Manager]] . \ No newline at end of file -- cgit v1.2.3 From 436a2a19870a5c73575f574040be44d333f55409 Mon Sep 17 00:00:00 2001 From: Hideaki SAWADA Date: Sat, 10 May 2014 10:21:16 +0200 Subject: translation update --- lib/plugins/extension/lang/ja/lang.php | 39 ++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php index 0401d7630..b42e4aefd 100644 --- a/lib/plugins/extension/lang/ja/lang.php +++ b/lib/plugins/extension/lang/ja/lang.php @@ -8,6 +8,7 @@ $lang['menu'] = '拡張機能管理'; $lang['tab_plugins'] = 'インストール済プラグイン'; $lang['tab_templates'] = 'インストール済テンプレート'; +$lang['tab_search'] = '検索とインストール'; $lang['tab_install'] = '手動インストール'; $lang['notimplemented'] = 'この機能は未実装です。'; $lang['notinstalled'] = 'この拡張機能はインストールされていません。'; @@ -17,17 +18,38 @@ $lang['pluginlistsaveerror'] = 'プラグイン一覧の保存中にエラー $lang['unknownauthor'] = '作者不明'; $lang['unknownversion'] = 'バージョン不明'; $lang['btn_info'] = '詳細情報を表示する。'; -$lang['btn_update'] = 'アップデート'; +$lang['btn_update'] = '更新'; $lang['btn_uninstall'] = 'アンインストール'; $lang['btn_enable'] = '有効化'; $lang['btn_disable'] = '無効化'; $lang['btn_install'] = 'インストール'; $lang['btn_reinstall'] = '再インストール'; $lang['js']['reallydel'] = 'この拡張機能を本当にアンインストールしますか?'; +$lang['search_for'] = '拡張機能の検索:'; +$lang['search'] = '検索'; +$lang['extensionby'] = '%s 作者: %s'; +$lang['screenshot'] = '%s のスクリーンショット'; +$lang['popularity'] = '利用状況:%s%%'; +$lang['homepage_link'] = '解説'; +$lang['bugs_features'] = 'バグ'; +$lang['tags'] = 'タグ:'; +$lang['author_hint'] = 'この作者で拡張機能を検索'; +$lang['installed'] = 'インストール済:'; $lang['downloadurl'] = 'ダウンロード URL:'; $lang['repository'] = 'リポジトリ:'; +$lang['unknown'] = '不明'; +$lang['installed_version'] = 'インストール済バージョン:'; +$lang['install_date'] = '最終更新日:'; +$lang['available_version'] = '利用可能バージョン:'; +$lang['compatible'] = '互換:'; $lang['depends'] = '依存:'; $lang['similar'] = '類似:'; +$lang['conflicts'] = '競合:'; +$lang['donate'] = 'お気に入り?'; +$lang['donate_action'] = '寄付先'; +$lang['repo_retry'] = '再実行'; +$lang['provides'] = '提供:'; +$lang['status'] = '状態:'; $lang['status_installed'] = 'インストール済'; $lang['status_not_installed'] = '未インストール'; $lang['status_enabled'] = '有効'; @@ -39,16 +61,25 @@ $lang['msg_enabled'] = '%s プラグインを有効化しました。' $lang['msg_disabled'] = '%s プラグインを無効化しました。'; $lang['msg_delete_success'] = '拡張機能をアンインストールしました。'; $lang['msg_template_install_success'] = '%s テンプレートをインストールできました。'; -$lang['msg_template_update_success'] = '%s テンプレートをアップデートできました。'; +$lang['msg_template_update_success'] = '%s テンプレートを更新できました。'; $lang['msg_plugin_install_success'] = '%s プラグインをインストールできました。'; -$lang['msg_plugin_update_success'] = '%s プラグインをアップデートできました。'; +$lang['msg_plugin_update_success'] = '%s プラグインを更新できました。'; $lang['msg_upload_failed'] = 'ファイルのアップロードに失敗しました。'; +$lang['missing_dependency'] = '依存関係が欠落または無効: %s'; $lang['security_issue'] = 'セキュリティ問題: %s'; $lang['security_warning'] = 'セキュリティ警告: %s'; -$lang['update_available'] = 'アップデート:%sの新バージョンが利用可能です。 '; +$lang['update_available'] = '更新: %sの新バージョンが利用可能です。'; +$lang['wrong_folder'] = 'プラグインは正しくインストールされませんでした: プラグインのディレクトリを "%s" から "%s" へ変更して下さい。'; +$lang['url_change'] = 'URL が変更されました: 最後にダウンロードした後、ダウンロード URL が変更されました。拡張機能のアップデート前に新 URL が正しいかを確認して下さい。
新:%s
旧:%s'; $lang['error_badurl'] = 'URLはhttpかhttpsで始まる必要があります。'; $lang['error_dircreate'] = 'ダウンロード用の一時フォルダが作成できません。'; $lang['error_download'] = 'ファイルをダウンロードできません:%s'; +$lang['error_decompress'] = 'ダウンロードしたファイルを解凍できません。ダウンロードの失敗の結果であれば、再度試して下さい。圧縮形式が不明の場合は、手動でダウンロード・インストールしてください。'; +$lang['error_findfolder'] = '拡張機能ディレクトリを認識できません。手動でダウンロード・インストールしてください。'; +$lang['error_copy'] = '%s ディレクトリのファイルをインストールしようとした時、ファイルコピーエラーが発生しました:ディスクがいっぱいかもしれませんし、ファイルのアクセス権が正しくないかもしれません。プラグインが一部分インストールされ、wiki が不安定になるかもしれません。'; $lang['noperms'] = '拡張機能ディレクトリが書き込み不可です。'; $lang['notplperms'] = 'テンプレートディレクトリが書き込み不可です。'; $lang['nopluginperms'] = 'プラグインディレクトリが書き込み不可です。'; +$lang['git'] = 'この拡張機能は Git 経由でインストールされており、ここで更新すべきでないかもしれません。'; +$lang['install_url'] = 'URL からインストール:'; +$lang['install_upload'] = '拡張機能をアップロード:'; -- cgit v1.2.3 From bc34cd3821f87b31d4259fe33c4c853eb1245df8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 10 May 2014 14:33:51 +0200 Subject: added missing translation string in extension manager --- lib/plugins/extension/lang/en/lang.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 5224f694a..72c9b9e2d 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -96,4 +96,6 @@ $lang['nopluginperms'] = 'Plugin directory is not writable'; $lang['git'] = 'This extension was installed via git, you may not want to update it here.'; $lang['install_url'] = 'Install from URL:'; -$lang['install_upload'] = 'Upload Extension:'; \ No newline at end of file +$lang['install_upload'] = 'Upload Extension:'; + +$lang['repo_error'] = 'The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy settings.'; \ No newline at end of file -- cgit v1.2.3 From 52ab27d83d0fa4f6be37eb2d4d58d6c51b76e66f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 10 May 2014 14:43:50 +0200 Subject: corrected german translation --- lib/plugins/extension/lang/de/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php index 89c6b55b7..b0e3b4ff7 100644 --- a/lib/plugins/extension/lang/de/lang.php +++ b/lib/plugins/extension/lang/de/lang.php @@ -85,6 +85,6 @@ $lang['error_copy'] = 'Beim Versuch Dateien in den Ordner %s $lang['noperms'] = 'Das Erweiterungs-Verzeichnis ist schreibgeschützt'; $lang['notplperms'] = 'Das Template-Verzeichnis ist schreibgeschützt'; $lang['nopluginperms'] = 'Das Plugin-Verzeichnis ist schreibgeschützt'; -$lang['git'] = 'Diese Erweiterung wurde über git installiert, daher kann diese nicht hier aktualisiert werden.'; +$lang['git'] = 'Diese Erweiterung wurde über git installiert und sollte daher nicht hier aktualisiert werden.'; $lang['install_url'] = 'Von Webadresse (URL) installieren'; $lang['install_upload'] = 'Erweiterung hochladen:'; -- cgit v1.2.3 From 811653d71565cce94ca1b27f4cdebc60769e2d11 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 10 May 2014 15:18:20 +0200 Subject: fix icon for plugins following templates in extension manager --- lib/plugins/extension/helper/extension.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 7958cd2da..43e4452c0 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -57,6 +57,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { if(substr($id, 0 , 9) == 'template:'){ $this->base = substr($id, 9); $this->is_template = true; + } else { + $this->is_template = false; } $this->localInfo = array(); -- cgit v1.2.3 From 227a9832a9d65a12d88704e2bf18db63dae1ad57 Mon Sep 17 00:00:00 2001 From: lainme Date: Tue, 13 May 2014 06:36:05 +0200 Subject: translation update --- lib/plugins/authad/lang/zh/lang.php | 8 ++++++++ lib/plugins/extension/lang/zh/lang.php | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 lib/plugins/authad/lang/zh/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/zh/lang.php b/lib/plugins/authad/lang/zh/lang.php new file mode 100644 index 000000000..2a05aa168 --- /dev/null +++ b/lib/plugins/authad/lang/zh/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['domain'] = '登录域'; diff --git a/lib/plugins/extension/lang/zh/lang.php b/lib/plugins/extension/lang/zh/lang.php index 4d40acc1d..0264f3e9c 100644 --- a/lib/plugins/extension/lang/zh/lang.php +++ b/lib/plugins/extension/lang/zh/lang.php @@ -6,6 +6,7 @@ * @author Cupen * @author xiqingongzi * @author qinghao + * @author lainme */ $lang['menu'] = '扩展管理器'; $lang['tab_plugins'] = '安装插件'; @@ -42,6 +43,7 @@ $lang['repository'] = '版本库:'; $lang['unknown'] = '未知的'; $lang['installed_version'] = '已安装版本:'; $lang['install_date'] = '您的最后一次升级:'; +$lang['available_version'] = '可用版本:'; $lang['compatible'] = '兼容于:'; $lang['depends'] = '依赖于:'; $lang['similar'] = '相似于:'; @@ -59,6 +61,7 @@ $lang['status_disabled'] = '禁用'; $lang['status_unmodifiable'] = '不可修改'; $lang['status_plugin'] = '插件'; $lang['status_template'] = '模板'; +$lang['status_bundled'] = '内建'; $lang['msg_enabled'] = '插件 %s 已启用'; $lang['msg_disabled'] = '插件 %s 已禁用'; $lang['msg_delete_success'] = '插件已经卸载'; @@ -70,3 +73,19 @@ $lang['msg_upload_failed'] = '上传文件失败'; $lang['missing_dependency'] = '缺少或者被禁用依赖: %s'; $lang['security_issue'] = '安全问题: %s'; $lang['security_warning'] = '安全警告: %s'; +$lang['update_available'] = '更新:新版本 %s 已经可用。'; +$lang['wrong_folder'] = '插件安装不正确:重命名插件目录 "%s" 为 "%s"。'; +$lang['url_change'] = 'URL已改变:自上次下载以来的下载 URL 已经改变。请在更新扩展前检查新 URL 是否有效。
新的:%s
旧的:%s'; +$lang['error_badurl'] = 'URL 应当以 http 或者 https 作为开头'; +$lang['error_dircreate'] = '无法创建用于保存下载的临时文件夹'; +$lang['error_download'] = '无法下载文件:%s'; +$lang['error_decompress'] = '无法解压下载的文件。这可能是由于文件损坏,在这种情况下您可以重试。这也可能是由于压缩格式是未知的,在这种情况下您需要手动下载并且安装。'; +$lang['error_findfolder'] = '无法识别扩展目录,您需要手动下载和安装'; +$lang['error_copy'] = '在尝试安装文件到目录 %s 时出现文件复制错误:磁盘可能已满或者文件访问权限不正确。这可能导致插件被部分安装并使您的维基处在不稳定状态'; +$lang['noperms'] = '扩展目录不可写'; +$lang['notplperms'] = '模板目录不可写'; +$lang['nopluginperms'] = '插件目录不可写'; +$lang['git'] = '这个扩展是通过 git 安装的,您可能不想在这里升级它'; +$lang['install_url'] = '从 URL 安装:'; +$lang['install_upload'] = '上传扩展:'; +$lang['repo_error'] = '无法连接到插件仓库。请确定您的服务器可以连接 www.dokuwiki.org 并检查您的代理设置。'; -- cgit v1.2.3 From 93691af57f65173963a122e19915917814a32b71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ilker=20rifat=20kapa=C3=A7?= Date: Tue, 13 May 2014 10:15:52 +0200 Subject: translation update --- lib/plugins/authldap/lang/tr/settings.php | 8 ++++++++ lib/plugins/authmysql/lang/tr/settings.php | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 lib/plugins/authldap/lang/tr/settings.php create mode 100644 lib/plugins/authmysql/lang/tr/settings.php (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/tr/settings.php b/lib/plugins/authldap/lang/tr/settings.php new file mode 100644 index 000000000..843b7ef9c --- /dev/null +++ b/lib/plugins/authldap/lang/tr/settings.php @@ -0,0 +1,8 @@ + + */ +$lang['bindpw'] = 'Üstteki kullanıcının şifresi'; diff --git a/lib/plugins/authmysql/lang/tr/settings.php b/lib/plugins/authmysql/lang/tr/settings.php new file mode 100644 index 000000000..f38b6a03b --- /dev/null +++ b/lib/plugins/authmysql/lang/tr/settings.php @@ -0,0 +1,12 @@ + + */ +$lang['server'] = 'Sizin MySQL sunucunuz'; +$lang['user'] = 'MySQL kullanıcısının adı'; +$lang['password'] = 'Üstteki kullanıcı için şifre'; +$lang['database'] = 'Kullanılacak veritabanı'; +$lang['charset'] = 'Veritabanında kullanılacak karakter seti'; -- cgit v1.2.3 From b5638884124386a376237d025d6a68583e61e1e4 Mon Sep 17 00:00:00 2001 From: Rene Date: Tue, 13 May 2014 12:56:02 +0200 Subject: translation update --- lib/plugins/extension/lang/nl/lang.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php index 2983f9fee..f1dc125da 100644 --- a/lib/plugins/extension/lang/nl/lang.php +++ b/lib/plugins/extension/lang/nl/lang.php @@ -5,7 +5,7 @@ * * @author Rene */ -$lang['menu'] = 'Extension Manager (Uitbreidings Beheerder)'; +$lang['menu'] = 'Uitbreidings Beheerder'; $lang['tab_plugins'] = 'Geïnstalleerde Plugins'; $lang['tab_templates'] = 'Geïnstalleerde Templates'; $lang['tab_search'] = 'Zoek en installeer'; @@ -24,7 +24,7 @@ $lang['btn_enable'] = 'Schakel aan'; $lang['btn_disable'] = 'Schakel uit'; $lang['btn_install'] = 'Installeer'; $lang['btn_reinstall'] = 'Her-installeer'; -$lang['js']['reallydel'] = 'Wilt u deze uitbreiding deinstalleren ?'; +$lang['js']['reallydel'] = 'Wilt u deze uitbreiding deinstalleren?'; $lang['search_for'] = 'Zoek Uitbreiding:'; $lang['search'] = 'Zoek'; $lang['extensionby'] = '%s by %s'; @@ -36,16 +36,16 @@ $lang['tags'] = 'Tags:'; $lang['author_hint'] = 'Zoek uitbreidingen van deze auteur:'; $lang['installed'] = 'Geinstalleerd:'; $lang['downloadurl'] = 'Download URL:'; -$lang['repository'] = 'Repository ( centrale opslag)'; +$lang['repository'] = 'Centrale opslag:'; $lang['unknown'] = 'onbekend'; -$lang['installed_version'] = 'Geïnstalleerde versie'; -$lang['install_date'] = 'Uw laatste update :'; +$lang['installed_version'] = 'Geïnstalleerde versie:'; +$lang['install_date'] = 'Uw laatste update:'; $lang['available_version'] = 'Beschikbare versie:'; -$lang['compatible'] = 'Compatible met :'; -$lang['depends'] = 'Afhankelijk van :'; -$lang['similar'] = 'Soortgelijk :'; -$lang['conflicts'] = 'Conflicteerd met :'; -$lang['donate'] = 'Vindt u dit leuk ?'; +$lang['compatible'] = 'Compatible met:'; +$lang['depends'] = 'Afhankelijk van:'; +$lang['similar'] = 'Soortgelijk:'; +$lang['conflicts'] = 'Conflicteerd met:'; +$lang['donate'] = 'Vindt u dit leuk?'; $lang['donate_action'] = 'Koop een kop koffie voor de auteur!'; $lang['repo_retry'] = 'Herhaal'; $lang['provides'] = 'Zorgt voor:'; @@ -85,3 +85,4 @@ $lang['nopluginperms'] = 'Plugin directory is niet schrijfbaar'; $lang['git'] = 'De uitbreiding werd geïnstalleerd via git, u wilt deze hier wellicht niet aanpassen.'; $lang['install_url'] = 'Installeer vanaf URL:'; $lang['install_upload'] = 'Upload Uitbreiding:'; +$lang['repo_error'] = 'Er kon geen verbinding worden gemaakt met de centrale plugin opslag. Controleer of de server verbinding mag maken met www.dokuwiki.org en controleer de proxy instellingen.'; -- cgit v1.2.3 From 6222beda4249ebf70fa3bcb226355339ca7d765c Mon Sep 17 00:00:00 2001 From: Mirko Date: Tue, 13 May 2014 14:35:54 +0200 Subject: translation update --- lib/plugins/authmysql/lang/it/settings.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authmysql/lang/it/settings.php b/lib/plugins/authmysql/lang/it/settings.php index e493ec7e9..bae021e98 100644 --- a/lib/plugins/authmysql/lang/it/settings.php +++ b/lib/plugins/authmysql/lang/it/settings.php @@ -4,5 +4,10 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Claudio Lanconelli + * @author Mirko */ +$lang['server'] = 'Il tuo server MySQL'; +$lang['user'] = 'User name di MySQL'; +$lang['database'] = 'Database da usare'; +$lang['charset'] = 'Set di caratteri usato nel database'; $lang['debug'] = 'Mostra ulteriori informazioni di debug'; -- cgit v1.2.3 From 4862797473d3fb509669a7ded14059f3a412bb15 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 13 May 2014 18:41:02 +0200 Subject: translation update --- lib/plugins/extension/lang/nl/lang.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php index f1dc125da..524c2b2e7 100644 --- a/lib/plugins/extension/lang/nl/lang.php +++ b/lib/plugins/extension/lang/nl/lang.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Rene + * @author Gerrit Uitslag */ $lang['menu'] = 'Uitbreidings Beheerder'; $lang['tab_plugins'] = 'Geïnstalleerde Plugins'; @@ -30,7 +31,7 @@ $lang['search'] = 'Zoek'; $lang['extensionby'] = '%s by %s'; $lang['screenshot'] = 'Schermafdruk bij %s'; $lang['popularity'] = 'Populariteit:%s%%'; -$lang['homepage_link'] = 'Dokumenten'; +$lang['homepage_link'] = 'Documentatie'; $lang['bugs_features'] = 'Bugs'; $lang['tags'] = 'Tags:'; $lang['author_hint'] = 'Zoek uitbreidingen van deze auteur:'; -- cgit v1.2.3 From c0d17c851c1bf4371e550a105c91a17644de6b29 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 13 May 2014 18:39:04 +0200 Subject: removed another case of superflous multiple cache invalidation --- lib/plugins/extension/helper/extension.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 43e4452c0..a4736a850 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -597,11 +597,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $path = $this->download($url); $installed = $this->installArchive($path, true); - // purge caches - foreach($installed as $ext => $info){ - $this->setExtension($ext); - $this->purgeCache(); - } + // purge cache + $this->purgeCache(); }catch (Exception $e){ throw $e; } -- cgit v1.2.3 From 59d6be95449db272ee0a6b6d437f535246f795c9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 13 May 2014 19:42:05 +0200 Subject: update manager.dat correctly on install. closes #704 --- lib/plugins/extension/helper/extension.php | 39 ++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index a4736a850..2aca0e218 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -292,7 +292,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function getUpdateDate() { if (!empty($this->managerData['updated'])) return $this->managerData['updated']; - return false; + return $this->getInstallDate(); } /** @@ -577,6 +577,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { try { $installed = $this->installArchive("$tmp/upload.archive", true, $basename); + $this->updateManagerData('', $installed); // purge cache $this->purgeCache(); }catch (Exception $e){ @@ -596,6 +597,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { try { $path = $this->download($url); $installed = $this->installArchive($path, true); + $this->updateManagerData($url, $installed); // purge cache $this->purgeCache(); @@ -612,8 +614,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return array The list of installed extensions */ public function installOrUpdate() { - $path = $this->download($this->getDownloadURL()); + $url = $this->getDownloadURL(); + $path = $this->download($url); $installed = $this->installArchive($path, $this->isInstalled(), $this->getBase()); + $this->updateManagerData($url, $installed); // refresh extension information if (!isset($installed[$this->getID()])) { @@ -727,6 +731,37 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } } + /** + * Save the given URL and current datetime in the manager.dat file of all installed extensions + * + * @param string $url Where the extension was downloaded from. (empty for manual installs via upload) + * @param array $installed Optional list of installed plugins + */ + protected function updateManagerData($url = '', $installed = null) { + $origID = $this->getID(); + + if(is_null($installed)) { + $installed = array($origID); + } + + foreach($installed as $ext => $info) { + if($this->getID() != $ext) $this->setExtension($ext); + if($url) { + $this->managerData['downloadurl'] = $url; + } elseif(isset($this->managerData['downloadurl'])) { + unset($this->managerData['downloadurl']); + } + if(isset($this->managerData['installed'])) { + $this->managerData['updated'] = date('r'); + } else { + $this->managerData['installed'] = date('r'); + } + $this->writeManagerData(); + } + + if($this->getID() != $origID) $this->setExtension($origID); + } + /** * Read the manager.dat file */ -- cgit v1.2.3 From 1b4623e76a474977d730f37c3c54ff1cf66489ac Mon Sep 17 00:00:00 2001 From: Mati Date: Wed, 14 May 2014 07:45:56 +0200 Subject: translation update --- lib/plugins/authad/lang/pl/settings.php | 1 + lib/plugins/authmysql/lang/pl/settings.php | 2 ++ lib/plugins/authpgsql/lang/pl/settings.php | 9 +++++++ lib/plugins/extension/lang/pl/lang.php | 39 ++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 lib/plugins/authpgsql/lang/pl/settings.php create mode 100644 lib/plugins/extension/lang/pl/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/pl/settings.php b/lib/plugins/authad/lang/pl/settings.php index 4e397fc98..91cadca6f 100644 --- a/lib/plugins/authad/lang/pl/settings.php +++ b/lib/plugins/authad/lang/pl/settings.php @@ -5,6 +5,7 @@ * * @author Tomasz Bosak * @author Paweł Jan Czochański + * @author Mati */ $lang['account_suffix'] = 'Przyrostek twojej nazwy konta np. @my.domain.org'; $lang['base_dn'] = 'Twoje bazowe DN. Na przykład: DC=my,DC=domain,DC=org'; diff --git a/lib/plugins/authmysql/lang/pl/settings.php b/lib/plugins/authmysql/lang/pl/settings.php index 88cbd5d6f..9dc798ee0 100644 --- a/lib/plugins/authmysql/lang/pl/settings.php +++ b/lib/plugins/authmysql/lang/pl/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Paweł Jan Czochański + * @author Mati */ $lang['server'] = 'Twój server MySQL'; $lang['user'] = 'Nazwa użytkownika MySQL'; @@ -12,3 +13,4 @@ $lang['database'] = 'Używana baza danych'; $lang['charset'] = 'Zestaw znaków uzyty w bazie danych'; $lang['debug'] = 'Wyświetlaj dodatkowe informacje do debugowania.'; $lang['checkPass'] = 'Zapytanie SQL wykorzystywane do sprawdzania haseł.'; +$lang['debug_o_2'] = 'wszystkie zapytania SQL'; diff --git a/lib/plugins/authpgsql/lang/pl/settings.php b/lib/plugins/authpgsql/lang/pl/settings.php new file mode 100644 index 000000000..25a2afd4f --- /dev/null +++ b/lib/plugins/authpgsql/lang/pl/settings.php @@ -0,0 +1,9 @@ + + */ +$lang['server'] = 'Twój serwer PostgreSQL'; +$lang['database'] = 'Baza danych do użycia'; diff --git a/lib/plugins/extension/lang/pl/lang.php b/lib/plugins/extension/lang/pl/lang.php new file mode 100644 index 000000000..4fdca79c9 --- /dev/null +++ b/lib/plugins/extension/lang/pl/lang.php @@ -0,0 +1,39 @@ + + */ +$lang['menu'] = 'Menedżer rozszerzeń'; +$lang['tab_plugins'] = 'Zainstalowane dodatki'; +$lang['tab_search'] = 'Znajdź i zainstaluj'; +$lang['notinstalled'] = 'Te rozszerzenie nie zostało zainstalowane'; +$lang['alreadyenabled'] = 'Te rozszerzenie jest już uruchomione'; +$lang['unknownauthor'] = 'Nieznany autor'; +$lang['unknownversion'] = 'Nieznana wersja'; +$lang['btn_info'] = 'Pokaż więcej informacji'; +$lang['btn_enable'] = 'Uruchom'; +$lang['btn_disable'] = 'Wyłącz'; +$lang['btn_reinstall'] = 'Ponowna instalacja'; +$lang['js']['reallydel'] = 'Naprawdę odinstalować te rozszerzenie?'; +$lang['search'] = 'Szukaj'; +$lang['bugs_features'] = 'Błędy'; +$lang['tags'] = 'Tagi:'; +$lang['installed'] = 'Zainstalowano:'; +$lang['repository'] = 'Repozytorium'; +$lang['installed_version'] = 'Zainstalowana wersja:'; +$lang['install_date'] = 'Twoja ostatnia aktualizacja:'; +$lang['available_version'] = 'Dostępna wersja:'; +$lang['depends'] = 'Zależy od:'; +$lang['conflicts'] = 'Konflikt z:'; +$lang['donate'] = 'Lubisz to?'; +$lang['donate_action'] = 'Kup autorowi kawę!'; +$lang['repo_retry'] = 'Ponów'; +$lang['status'] = 'Status:'; +$lang['status_installed'] = 'zainstalowano'; +$lang['status_not_installed'] = 'nie zainstalowano'; +$lang['status_enabled'] = 'uruchomione'; +$lang['status_disabled'] = 'wyłączone'; +$lang['status_plugin'] = 'dodatek'; +$lang['msg_delete_success'] = 'Rozszerzenie odinstalowane'; -- cgit v1.2.3 From 33cfab00505903e3bee37020f5e099e5c0fd70a9 Mon Sep 17 00:00:00 2001 From: Francesco Date: Wed, 14 May 2014 21:20:56 +0200 Subject: translation update --- lib/plugins/authldap/lang/it/settings.php | 6 ++++++ lib/plugins/authmysql/lang/it/settings.php | 24 ++++++++++++++++++++++++ lib/plugins/authpgsql/lang/it/settings.php | 11 +++++++++++ 3 files changed, 41 insertions(+) create mode 100644 lib/plugins/authpgsql/lang/it/settings.php (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/it/settings.php b/lib/plugins/authldap/lang/it/settings.php index eba7cde6e..858c694b8 100644 --- a/lib/plugins/authldap/lang/it/settings.php +++ b/lib/plugins/authldap/lang/it/settings.php @@ -5,6 +5,7 @@ * * @author Edmondo Di Tucci * @author Claudio Lanconelli + * @author Francesco */ $lang['server'] = 'Il tuo server LDAP. Inserire o l\'hostname (localhost) oppure un URL completo (ldap://server.tld:389)'; $lang['port'] = 'Porta del server LDAP se non è stato fornito un URL completo più sopra.'; @@ -14,6 +15,11 @@ $lang['userfilter'] = 'Filtro per cercare l\'account utente LDAP. Eg. $lang['groupfilter'] = 'Filtro per cercare i gruppi LDAP. Eg. (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; $lang['version'] = 'Versione protocollo da usare. Pu3'; $lang['starttls'] = 'Usare la connessione TSL?'; +$lang['deref'] = 'Come differenziare un alias?'; $lang['userscope'] = 'Limita il contesto di ricerca per la ricerca degli utenti'; $lang['groupscope'] = 'Limita il contesto di ricerca per la ricerca dei gruppi'; $lang['debug'] = 'In caso di errori mostra ulteriori informazioni di debug'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; diff --git a/lib/plugins/authmysql/lang/it/settings.php b/lib/plugins/authmysql/lang/it/settings.php index bae021e98..10c0de96f 100644 --- a/lib/plugins/authmysql/lang/it/settings.php +++ b/lib/plugins/authmysql/lang/it/settings.php @@ -5,9 +5,33 @@ * * @author Claudio Lanconelli * @author Mirko + * @author Francesco */ $lang['server'] = 'Il tuo server MySQL'; $lang['user'] = 'User name di MySQL'; $lang['database'] = 'Database da usare'; $lang['charset'] = 'Set di caratteri usato nel database'; $lang['debug'] = 'Mostra ulteriori informazioni di debug'; +$lang['TablesToLock'] = 'Lista, separata da virgola, delle tabelle che devono essere bloccate in scrittura'; +$lang['checkPass'] = 'Istruzione SQL per il controllo password'; +$lang['getUserInfo'] = 'Istruzione SQL per recuperare le informazioni utente'; +$lang['getUsers'] = 'Istruzione SQL per listare tutti gli utenti'; +$lang['FilterLogin'] = 'Istruzione SQL per per filtrare gli utenti in funzione del "login name"'; +$lang['SortOrder'] = 'Istruzione SQL per ordinare gli utenti'; +$lang['addUser'] = 'Istruzione SQL per aggiungere un nuovo utente'; +$lang['addGroup'] = 'Istruzione SQL per aggiungere un nuovo gruppo'; +$lang['addUserGroup'] = 'Istruzione SQL per aggiungere un utente ad un gruppo esistente'; +$lang['delGroup'] = 'Istruzione SQL per imuovere un gruppo'; +$lang['getUserID'] = 'Istruzione SQL per recuperare la primary key di un utente'; +$lang['delUser'] = 'Istruzione SQL per cancellare un utente'; +$lang['delUserRefs'] = 'Istruzione SQL per rimuovere un utente da tutti i gruppi'; +$lang['updateUser'] = 'Istruzione SQL per aggiornare il profilo utente'; +$lang['UpdateLogin'] = 'Clausola per aggiornare il "login name" dell\'utente'; +$lang['UpdatePass'] = 'Clausola per aggiornare la password utente'; +$lang['UpdateEmail'] = 'Clausola per aggiornare l\'email utente'; +$lang['UpdateName'] = 'Clausola per aggiornare il nome completo'; +$lang['delUserGroup'] = 'Istruzione SQL per rimuovere un utente da un dato gruppo'; +$lang['getGroupID'] = 'Istruzione SQL per avere la primary key di un dato gruppo'; +$lang['debug_o_0'] = 'Nulla'; +$lang['debug_o_1'] = 'Solo in errore'; +$lang['debug_o_2'] = 'Tutte le query SQL'; diff --git a/lib/plugins/authpgsql/lang/it/settings.php b/lib/plugins/authpgsql/lang/it/settings.php new file mode 100644 index 000000000..baf40a468 --- /dev/null +++ b/lib/plugins/authpgsql/lang/it/settings.php @@ -0,0 +1,11 @@ + + */ +$lang['server'] = 'Il tuo server PostgreSQL '; +$lang['port'] = 'La porta del tuo server PostgreSQL '; +$lang['user'] = 'Lo username PostgreSQL'; +$lang['database'] = 'Database da usare'; -- cgit v1.2.3 From b9b1fa3cc0cbb48e6e911f62909871bb8c72c71d Mon Sep 17 00:00:00 2001 From: Francesco Date: Wed, 14 May 2014 21:30:56 +0200 Subject: translation update --- lib/plugins/extension/lang/it/lang.php | 41 ++++++++++++++++++++++++++++++++ lib/plugins/usermanager/lang/it/lang.php | 8 +++++++ 2 files changed, 49 insertions(+) create mode 100644 lib/plugins/extension/lang/it/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/it/lang.php b/lib/plugins/extension/lang/it/lang.php new file mode 100644 index 000000000..fbf163d57 --- /dev/null +++ b/lib/plugins/extension/lang/it/lang.php @@ -0,0 +1,41 @@ + + */ +$lang['btn_enable'] = 'Abilita'; +$lang['btn_disable'] = 'Disabilita'; +$lang['btn_install'] = 'Installa'; +$lang['btn_reinstall'] = 'Reinstalla'; +$lang['search'] = 'Cerca'; +$lang['homepage_link'] = 'Documenti'; +$lang['bugs_features'] = 'Bug'; +$lang['tags'] = 'Tag:'; +$lang['author_hint'] = 'Cerca estensioni per questo autore'; +$lang['installed'] = 'Installato:'; +$lang['downloadurl'] = 'URL download:'; +$lang['repository'] = 'Repository'; +$lang['installed_version'] = 'Versione installata'; +$lang['install_date'] = 'Il tuo ultimo aggiornamento:'; +$lang['available_version'] = 'Versione disponibile:'; +$lang['compatible'] = 'Compatibile con:'; +$lang['similar'] = 'Simile a:'; +$lang['donate'] = 'Simile a questo?'; +$lang['repo_retry'] = 'Riprova'; +$lang['status'] = 'Status:'; +$lang['status_installed'] = 'installato'; +$lang['status_not_installed'] = 'non installato'; +$lang['status_protected'] = 'protetto'; +$lang['status_enabled'] = 'abilitato'; +$lang['status_disabled'] = 'disabilitato'; +$lang['status_unmodifiable'] = 'inmodificabile'; +$lang['status_plugin'] = 'plugin'; +$lang['status_template'] = 'modello'; +$lang['error_badurl'] = 'URLs deve iniziare con http o https'; +$lang['error_dircreate'] = 'Impossibile creare una cartella temporanea per ricevere il download'; +$lang['error_download'] = 'Impossibile scaricare il file: %s'; +$lang['notplperms'] = 'Il modello di cartella non è scrivibile'; +$lang['nopluginperms'] = 'La cartella plugin non è scrivibile'; +$lang['install_url'] = 'Installa da URL:'; diff --git a/lib/plugins/usermanager/lang/it/lang.php b/lib/plugins/usermanager/lang/it/lang.php index 6c6789442..af19e293e 100644 --- a/lib/plugins/usermanager/lang/it/lang.php +++ b/lib/plugins/usermanager/lang/it/lang.php @@ -16,6 +16,7 @@ * @author Matteo Pasotti * @author snarchio@gmail.com * @author Claudio Lanconelli + * @author Francesco */ $lang['menu'] = 'Gestione Utenti'; $lang['noauth'] = '(autenticazione non disponibile)'; @@ -40,6 +41,9 @@ $lang['clear'] = 'Azzera filtro di ricerca'; $lang['filter'] = 'Filtro'; $lang['export_all'] = 'Esporta tutti gli utenti (CSV)'; $lang['export_filtered'] = 'Esporta elenco utenti filtrati (CSV)'; +$lang['import'] = 'Importa nuovi utenti'; +$lang['line'] = 'Linea numero'; +$lang['error'] = 'Messaggio di errore'; $lang['summary'] = 'Visualizzazione utenti %1$d-%2$d di %3$d trovati. %4$d utenti totali.'; $lang['nonefound'] = 'Nessun utente trovato. %d utenti totali.'; $lang['delete_ok'] = '%d utenti eliminati'; @@ -60,3 +64,7 @@ $lang['add_ok'] = 'Utente aggiunto correttamente'; $lang['add_fail'] = 'Aggiunta utente fallita'; $lang['notify_ok'] = 'Email di notifica inviata'; $lang['notify_fail'] = 'L\'email di notifica non può essere inviata'; +$lang['import_error_badname'] = 'Nome errato'; +$lang['import_error_badmail'] = 'Indirizzo email errato'; +$lang['import_error_readfail'] = 'Importazione in errore. Impossibile leggere i file caricati.'; +$lang['import_error_create'] = 'Impossibile creare l\'utente'; -- cgit v1.2.3 From fde860be8cb3ed16b2b0843b77b093a60397083e Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Fri, 16 May 2014 00:09:32 +0200 Subject: Move colon from code to language strings --- lib/plugins/acl/admin.php | 4 ++-- lib/plugins/acl/lang/ar/lang.php | 4 ++-- lib/plugins/acl/lang/bg/lang.php | 4 ++-- lib/plugins/acl/lang/ca-valencia/lang.php | 4 ++-- lib/plugins/acl/lang/ca/lang.php | 4 ++-- lib/plugins/acl/lang/cs/lang.php | 4 ++-- lib/plugins/acl/lang/da/lang.php | 4 ++-- lib/plugins/acl/lang/de-informal/lang.php | 4 ++-- lib/plugins/acl/lang/de/lang.php | 4 ++-- lib/plugins/acl/lang/el/lang.php | 4 ++-- lib/plugins/acl/lang/en/lang.php | 4 ++-- lib/plugins/acl/lang/eo/lang.php | 4 ++-- lib/plugins/acl/lang/es/lang.php | 4 ++-- lib/plugins/acl/lang/et/lang.php | 4 ++-- lib/plugins/acl/lang/eu/lang.php | 4 ++-- lib/plugins/acl/lang/fa/lang.php | 4 ++-- lib/plugins/acl/lang/fi/lang.php | 4 ++-- lib/plugins/acl/lang/fr/lang.php | 4 ++-- lib/plugins/acl/lang/gl/lang.php | 4 ++-- lib/plugins/acl/lang/he/lang.php | 4 ++-- lib/plugins/acl/lang/hr/lang.php | 4 ++-- lib/plugins/acl/lang/ia/lang.php | 4 ++-- lib/plugins/acl/lang/id/lang.php | 4 ++-- lib/plugins/acl/lang/is/lang.php | 4 ++-- lib/plugins/acl/lang/it/lang.php | 4 ++-- lib/plugins/acl/lang/ja/lang.php | 4 ++-- lib/plugins/acl/lang/kk/lang.php | 4 ++-- lib/plugins/acl/lang/ko/lang.php | 4 ++-- lib/plugins/acl/lang/la/lang.php | 4 ++-- lib/plugins/acl/lang/lt/lang.php | 4 ++-- lib/plugins/acl/lang/lv/lang.php | 4 ++-- lib/plugins/acl/lang/mk/lang.php | 4 ++-- lib/plugins/acl/lang/mr/lang.php | 4 ++-- lib/plugins/acl/lang/ne/lang.php | 4 ++-- lib/plugins/acl/lang/nl/lang.php | 4 ++-- lib/plugins/acl/lang/no/lang.php | 4 ++-- lib/plugins/acl/lang/pl/lang.php | 4 ++-- lib/plugins/acl/lang/pt-br/lang.php | 4 ++-- lib/plugins/acl/lang/pt/lang.php | 4 ++-- lib/plugins/acl/lang/ro/lang.php | 4 ++-- lib/plugins/acl/lang/ru/lang.php | 4 ++-- lib/plugins/acl/lang/sk/lang.php | 4 ++-- lib/plugins/acl/lang/sl/lang.php | 4 ++-- lib/plugins/acl/lang/sq/lang.php | 4 ++-- lib/plugins/acl/lang/sr/lang.php | 4 ++-- lib/plugins/acl/lang/sv/lang.php | 4 ++-- lib/plugins/acl/lang/th/lang.php | 4 ++-- lib/plugins/acl/lang/tr/lang.php | 4 ++-- lib/plugins/acl/lang/uk/lang.php | 4 ++-- lib/plugins/acl/lang/vi/lang.php | 4 ++-- lib/plugins/acl/lang/zh-tw/lang.php | 4 ++-- lib/plugins/acl/lang/zh/lang.php | 4 ++-- 52 files changed, 104 insertions(+), 104 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index de38aedd5..ebb097a04 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -779,8 +779,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { } echo '