diff options
Diffstat (limited to 'lib/plugins')
50 files changed, 495 insertions, 130 deletions
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 50377da81..5ab73670d 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -61,7 +61,6 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { // fresh 1:1 copy without replacements $AUTH_ACL = file($config_cascade['acl']['default']); - // namespace given? if($INPUT->str('ns') == '*'){ $this->ns = '*'; @@ -386,7 +385,6 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo '<legend>'.$this->getLang('acl_mod').'</legend>'; } - echo $this->_html_checkboxes($current,empty($this->ns),'acl'); if(is_null($current)){ @@ -686,7 +684,6 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { if($acl_level > AUTH_EDIT) $acl_level = AUTH_EDIT; } - $new_acl = "$acl_scope\t$acl_user\t$acl_level\n"; $new_config = $acl_config.$new_acl; @@ -775,7 +772,6 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $inlist = true; } - echo '<select name="acl_t" class="edit">'.NL; echo ' <option value="__g__" class="aclgroup"'.$gsel.'>'.$this->getLang('acl_group').':</option>'.NL; echo ' <option value="__u__" class="acluser"'.$usel.'>'.$this->getLang('acl_user').':</option>'.NL; diff --git a/lib/plugins/acl/lang/fa/lang.php b/lib/plugins/acl/lang/fa/lang.php index 7fe0f2c43..24bebaeaf 100644 --- a/lib/plugins/acl/lang/fa/lang.php +++ b/lib/plugins/acl/lang/fa/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Persian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author behrad eslamifar <behrad_es@yahoo.com) * @author Mohsen Firoozmandan <info@mambolearn.com> * @author omidmr@gmail.com diff --git a/lib/plugins/acl/lang/hu/lang.php b/lib/plugins/acl/lang/hu/lang.php index 9565eddc3..cc35243e1 100644 --- a/lib/plugins/acl/lang/hu/lang.php +++ b/lib/plugins/acl/lang/hu/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Hungarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Sandor TIHANYI <stihanyi+dw@gmail.com> * @author Siaynoq Mage <siaynoqmage@gmail.com> * @author schilling.janos@gmail.com diff --git a/lib/plugins/acl/lang/sk/lang.php b/lib/plugins/acl/lang/sk/lang.php index 398f8c63d..51837d4b4 100644 --- a/lib/plugins/acl/lang/sk/lang.php +++ b/lib/plugins/acl/lang/sk/lang.php @@ -1,8 +1,8 @@ <?php + /** - * Slovak language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Ondrej Vegh <ov@vsieti.sk> * @author Michal Mesko <michal.mesko@gmail.com> * @author exusik@gmail.com diff --git a/lib/plugins/acl/style.css b/lib/plugins/acl/style.css index d8f0b53f3..a53a03450 100644 --- a/lib/plugins/acl/style.css +++ b/lib/plugins/acl/style.css @@ -1,4 +1,3 @@ - #acl__tree { font-size: 90%; width: 25%; @@ -138,4 +137,3 @@ #acl_manager table tr:hover { background-color: __background_alt__; } - diff --git a/lib/plugins/authad/lang/es/settings.php b/lib/plugins/authad/lang/es/settings.php new file mode 100644 index 000000000..9d0aa80ac --- /dev/null +++ b/lib/plugins/authad/lang/es/settings.php @@ -0,0 +1,13 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author monica <may.dorado@gmail.com> + */ +$lang['account_suffix'] = 'Su cuenta, sufijo. Ejem. <code> @ my.domain.org </ code>'; +$lang['base_dn'] = 'Su base DN. Ejem. <code>DC=my,DC=dominio,DC=org</code>'; +$lang['domain_controllers'] = 'Una lista separada por coma de los controladores de dominios. Ejem. <code>srv1.dominio.org,srv2.dominio.org</code>'; +$lang['admin_username'] = 'Un usuario con privilegios de Active Directory con acceso a los datos de cualquier otro usuario. Opcional, pero es necesario para determinadas acciones como el envío de suscripciones de correos electrónicos.'; +$lang['admin_password'] = 'La contraseña del usuario anterior.'; +$lang['sso'] = 'En caso de inicio de sesión usará ¿Kerberos o NTLM?'; diff --git a/lib/plugins/authad/lang/hu/settings.php b/lib/plugins/authad/lang/hu/settings.php index c2cab410f..1510e1756 100644 --- a/lib/plugins/authad/lang/hu/settings.php +++ b/lib/plugins/authad/lang/hu/settings.php @@ -1,7 +1,8 @@ <?php + /** - * Hungarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Marton Sebok <sebokmarton@gmail.com> */ $lang['account_suffix'] = 'Felhasználói azonosító végződése, pl. <code>@my.domain.org</code>.'; diff --git a/lib/plugins/authad/lang/ja/settings.php b/lib/plugins/authad/lang/ja/settings.php index 72e5cc76e..f308249ef 100644 --- a/lib/plugins/authad/lang/ja/settings.php +++ b/lib/plugins/authad/lang/ja/settings.php @@ -11,6 +11,10 @@ $lang['base_dn'] = 'ベースDN。例:<code>DC=my,DC=domain,DC=o $lang['domain_controllers'] = 'ドメインコントローラのカンマ区切り一覧。例:<code>srv1.domain.org,srv2.domain.org</code>'; $lang['admin_username'] = '全ユーザーデータへのアクセス権のある特権Active Directoryユーザー。任意ですが、メール通知の登録等の特定の動作に必要。'; $lang['admin_password'] = '上記ユーザーのパスワード'; +$lang['sso'] = 'Kerberos か NTLM を使ったシングルサインオン(SSO)をしますか?'; +$lang['real_primarygroup'] = '"Domain Users" を仮定する代わりに本当のプライマリグループを解決する(低速)'; +$lang['use_ssl'] = 'SSL接続を使用しますか?使用した場合、下のSSLを有効にしないでください。'; +$lang['use_tls'] = 'TLS接続を使用しますか?使用した場合、上のSSLを有効にしないでください。'; $lang['debug'] = 'エラー時に追加のデバッグ出力を表示する?'; $lang['expirywarn'] = '何日前からパスワードの有効期限をユーザーに警告する。0 の場合は無効'; $lang['additional'] = 'ユーザデータから取得する追加AD属性のカンマ区切り一覧。いくつかのプラグインが使用する。'; diff --git a/lib/plugins/authad/lang/sk/settings.php b/lib/plugins/authad/lang/sk/settings.php new file mode 100644 index 000000000..55f266dd6 --- /dev/null +++ b/lib/plugins/authad/lang/sk/settings.php @@ -0,0 +1,15 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Martin Michalek <michalek.dev@gmail.com> + */ +$lang['account_suffix'] = 'Prípona používateľského účtu. Napr. <code>@my.domain.org</code>'; +$lang['admin_username'] = 'Privilegovaný používateľ Active Directory s prístupom ku všetkým dátam ostatných používateľov. Nepovinné nastavenie, ale potrebné pre určité akcie ako napríklad zasielanie mailov o zmenách.'; +$lang['admin_password'] = 'Heslo vyššie uvedeného používateľa.'; +$lang['sso'] = 'Použiť Single-Sign-On cez Kerberos alebo NTLM?'; +$lang['use_ssl'] = 'Použiť SSL pripojenie? Ak áno, nepovoľte TLS nižšie.'; +$lang['use_tls'] = 'Použiť TLS pripojenie? Ak áno, nepovoľte SSL vyššie.'; +$lang['debug'] = 'Zobraziť doplňujúce ladiace informácie pri chybe?'; +$lang['additional'] = 'Zoznam dodatočných AD atribútov oddelených čiarkou získaných z údajov používateľa. Používané niektorými pluginmi.'; diff --git a/lib/plugins/authldap/lang/hu/settings.php b/lib/plugins/authldap/lang/hu/settings.php index b4b28d0a0..041f82755 100644 --- a/lib/plugins/authldap/lang/hu/settings.php +++ b/lib/plugins/authldap/lang/hu/settings.php @@ -1,7 +1,8 @@ <?php + /** - * Hungarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Marton Sebok <sebokmarton@gmail.com> */ $lang['server'] = 'LDAP-szerver. Hosztnév (<code>localhost</code>) vagy abszolút URL portszámmal (<code>ldap://server.tld:389</code>)'; diff --git a/lib/plugins/authldap/lang/ja/settings.php b/lib/plugins/authldap/lang/ja/settings.php index fdc6fc434..6dec9a576 100644 --- a/lib/plugins/authldap/lang/ja/settings.php +++ b/lib/plugins/authldap/lang/ja/settings.php @@ -1,6 +1,24 @@ <?php + /** - * Japanese language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Satoshi Sahara <sahara.satoshi@gmail.com> + * @author Hideaki SAWADA <sawadakun@live.jp> + * @author Hideaki SAWADA <chuno@live.jp> */ +$lang['server'] = 'LDAPサーバー。ホスト名(<code>localhost</code)又は完全修飾URL(<code>ldap://server.tld:389</code>)'; +$lang['port'] = '上記が完全修飾URLでない場合、LDAPサーバーポート'; +$lang['usertree'] = 'ユーザーアカウントを探す場所。例:<code>ou=People, dc=server, dc=tld</code>'; +$lang['grouptree'] = 'ユーザーグループを探す場所。例:<code>ou=Group, dc=server, dc=tld</code>'; +$lang['userfilter'] = 'ユーザーアカウントを探すためのLDAP抽出条件。例:<code>(&(uid=%{user})(objectClass=posixAccount))</code>'; +$lang['groupfilter'] = 'グループを探すLDAP抽出条件。例:<code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; +$lang['version'] = '使用するプロトコルのバージョン。<code>3</code>を設定する必要がある場合があります。'; +$lang['starttls'] = 'TLS接続を使用しますか?'; +$lang['binddn'] = '匿名バインドでは不十分な場合、オプションバインドユーザーのDN。例:<code>cn=admin, dc=my, dc=home</code>'; +$lang['bindpw'] = '上記ユーザーのパスワード'; +$lang['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/authldap/lang/sk/settings.php b/lib/plugins/authldap/lang/sk/settings.php new file mode 100644 index 000000000..48bd37395 --- /dev/null +++ b/lib/plugins/authldap/lang/sk/settings.php @@ -0,0 +1,21 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Martin Michalek <michalek.dev@gmail.com> + */ +$lang['server'] = 'LDAP server. Adresa (<code>localhost</code>) alebo úplné URL (<code>ldap://server.tld:389</code>)'; +$lang['port'] = 'Port LDAP servera, ak nebolo vyššie zadané úplné URL'; +$lang['usertree'] = 'Umiestnenie účtov používateľov. Napr. <code>ou=People, dc=server, dc=tld</code>'; +$lang['grouptree'] = 'Umiestnenie skupín používateľov. Napr. <code>ou=Group, dc=server, dc=tld</code>'; +$lang['userfilter'] = 'LDAP filter pre vyhľadávanie používateľských účtov. Napr. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; +$lang['groupfilter'] = 'LDAP filter pre vyhľadávanie skupín. Napr. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; +$lang['version'] = 'Použitá verzia protokolu. Možno bude potrebné nastaviť na hodnotu <code>3</code>'; +$lang['starttls'] = 'Použiť TLS pripojenie?'; +$lang['bindpw'] = 'Heslo vyššie uvedeného používateľa'; +$lang['debug'] = 'Zobraziť doplňujúce ladiace informácie pri chybe'; +$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/en/settings.php b/lib/plugins/authmysql/lang/en/settings.php index 77e4806b9..b95f39701 100644 --- a/lib/plugins/authmysql/lang/en/settings.php +++ b/lib/plugins/authmysql/lang/en/settings.php @@ -19,7 +19,7 @@ $lang['FilterGroup'] = 'SQL clause for filtering users by group membership' $lang['SortOrder'] = 'SQL clause to sort users'; $lang['addUser'] = 'SQL statement to add a new user'; $lang['addGroup'] = 'SQL statement to add a new group'; -$lang['addUserGroup'] = 'SQL statment to add a user to an existing group'; +$lang['addUserGroup'] = 'SQL statement to add a user to an existing group'; $lang['delGroup'] = 'SQL statement to remove a group'; $lang['getUserID'] = 'SQL statement to get the primary key of a user'; $lang['delUser'] = 'SQL statement to delete a user'; @@ -36,4 +36,4 @@ $lang['getGroupID'] = 'SQL statement to get the primary key of a given gro $lang['debug_o_0'] = 'none'; $lang['debug_o_1'] = 'on errors only'; -$lang['debug_o_2'] = 'all SQL queries';
\ No newline at end of file +$lang['debug_o_2'] = 'all SQL queries'; diff --git a/lib/plugins/authmysql/lang/hu/settings.php b/lib/plugins/authmysql/lang/hu/settings.php index 9489c73f9..4edceae1e 100644 --- a/lib/plugins/authmysql/lang/hu/settings.php +++ b/lib/plugins/authmysql/lang/hu/settings.php @@ -1,7 +1,8 @@ <?php + /** - * Hungarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Marton Sebok <sebokmarton@gmail.com> */ $lang['server'] = 'MySQL-szerver'; diff --git a/lib/plugins/authmysql/lang/sk/settings.php b/lib/plugins/authmysql/lang/sk/settings.php new file mode 100644 index 000000000..8c52f905e --- /dev/null +++ b/lib/plugins/authmysql/lang/sk/settings.php @@ -0,0 +1,38 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Martin Michalek <michalek.dev@gmail.com> + */ +$lang['server'] = 'MySQL server'; +$lang['user'] = 'Meno používateľa MySQL'; +$lang['password'] = 'Heslo pre vyššie uvedeného používateľa'; +$lang['database'] = 'Použiť databázu'; +$lang['charset'] = 'Znaková sada databázy'; +$lang['debug'] = 'Zobraziť doplňujúce ladiace informácie'; +$lang['forwardClearPass'] = 'Posielať heslo ako nezakódovaný text nižšie uvedenému SQL príkazu namiesto použitia kódovania'; +$lang['TablesToLock'] = 'Zoznam tabuliek oddelených čiarkou, ktoré by mali byť uzamknuté pri operáciách zápisu'; +$lang['checkPass'] = 'SQL príkaz pre kontrolu hesla'; +$lang['getUserInfo'] = 'SQL príkaz pre získanie informácií o používateľovi'; +$lang['getGroups'] = 'SQL príkaz pre získanie informácií o skupinách používateľa'; +$lang['getUsers'] = 'SQL príkaz pre získanie zoznamu používateľov'; +$lang['FilterLogin'] = 'SQL podmienka pre filtrovanie používateľov podľa prihlasovacieho mena'; +$lang['FilterName'] = 'SQL podmienka pre filtrovanie používateľov podľa mena a priezviska'; +$lang['FilterEmail'] = 'SQL podmienka pre filtrovanie používateľov podľa emailovej adresy'; +$lang['FilterGroup'] = 'SQL podmienka pre filtrovanie používateľov podľa skupiny'; +$lang['SortOrder'] = 'SQL podmienka pre usporiadenia používateľov'; +$lang['addUser'] = 'SQL príkaz pre pridanie nového používateľa'; +$lang['addGroup'] = 'SQL príkaz pre pridanie novej skupiny'; +$lang['addUserGroup'] = 'SQL príkaz pre pridanie používateľa do existujúcej skupiny'; +$lang['delGroup'] = 'SQL príkaz pre zrušenie skupiny'; +$lang['getUserID'] = 'SQL príkaz pre získanie primárneho klúča používateľa'; +$lang['delUser'] = 'SQL príkaz pre zrušenie používateľa'; +$lang['delUserRefs'] = 'SQL príkaz pre vyradenie používateľa zo všetkých skupín'; +$lang['updateUser'] = 'SQL príkaz pre aktualizáciu informácií o používateľovi'; +$lang['UpdateLogin'] = 'SQL podmienka pre aktualizáciu prihlasovacieho mena používateľa'; +$lang['UpdatePass'] = 'SQL podmienka pre aktualizáciu hesla používateľa'; +$lang['UpdateEmail'] = 'SQL podmienka pre aktualizáciu emailovej adresy používateľa'; +$lang['UpdateName'] = 'SQL podmienka pre aktualizáciu mena a priezviska používateľa'; +$lang['delUserGroup'] = 'SQL príkaz pre vyradenie používateľa z danej skupiny'; +$lang['getGroupID'] = 'SQL príkaz pre získanie primárneho kľúča skupiny'; diff --git a/lib/plugins/authpgsql/lang/en/settings.php b/lib/plugins/authpgsql/lang/en/settings.php index e67235cfa..cfb2686cb 100644 --- a/lib/plugins/authpgsql/lang/en/settings.php +++ b/lib/plugins/authpgsql/lang/en/settings.php @@ -18,7 +18,7 @@ $lang['FilterGroup'] = 'SQL clause for filtering users by group membership' $lang['SortOrder'] = 'SQL clause to sort users'; $lang['addUser'] = 'SQL statement to add a new user'; $lang['addGroup'] = 'SQL statement to add a new group'; -$lang['addUserGroup'] = 'SQL statment to add a user to an existing group'; +$lang['addUserGroup'] = 'SQL statement to add a user to an existing group'; $lang['delGroup'] = 'SQL statement to remove a group'; $lang['getUserID'] = 'SQL statement to get the primary key of a user'; $lang['delUser'] = 'SQL statement to delete a user'; diff --git a/lib/plugins/authpgsql/lang/hu/settings.php b/lib/plugins/authpgsql/lang/hu/settings.php index 7b9393256..ff62a7016 100644 --- a/lib/plugins/authpgsql/lang/hu/settings.php +++ b/lib/plugins/authpgsql/lang/hu/settings.php @@ -1,7 +1,8 @@ <?php + /** - * Hungarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Marton Sebok <sebokmarton@gmail.com> */ $lang['server'] = 'PostgreSQL-szerver'; diff --git a/lib/plugins/authpgsql/lang/sk/settings.php b/lib/plugins/authpgsql/lang/sk/settings.php new file mode 100644 index 000000000..9d656415d --- /dev/null +++ b/lib/plugins/authpgsql/lang/sk/settings.php @@ -0,0 +1,37 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Martin Michalek <michalek.dev@gmail.com> + */ +$lang['server'] = 'PostgreSQL server'; +$lang['port'] = 'Port PostgreSQL servera'; +$lang['user'] = 'Meno používateľa PostgreSQL'; +$lang['password'] = 'Heslo pre vyššie uvedeného používateľa'; +$lang['database'] = 'Použiť databázu'; +$lang['debug'] = 'Zobraziť doplňujúce ladiace informácie'; +$lang['forwardClearPass'] = 'Posielať heslo ako nezakódovaný text nižšie uvedenému SQL príkazu namiesto použitia kódovania'; +$lang['checkPass'] = 'SQL príkaz pre kontrolu hesla'; +$lang['getUserInfo'] = 'SQL príkaz pre získanie informácií o používateľovi'; +$lang['getGroups'] = 'SQL príkaz pre získanie informácií o skupinách používateľa'; +$lang['getUsers'] = 'SQL príkaz pre získanie zoznamu používateľov'; +$lang['FilterLogin'] = 'SQL podmienka pre filtrovanie používateľov podľa prihlasovacieho mena'; +$lang['FilterName'] = 'SQL podmienka pre filtrovanie používateľov podľa mena a priezviska'; +$lang['FilterEmail'] = 'SQL podmienka pre filtrovanie používateľov podľa emailovej adresy'; +$lang['FilterGroup'] = 'SQL podmienka pre filtrovanie používateľov podľa skupiny'; +$lang['SortOrder'] = 'SQL podmienka pre usporiadenia používateľov'; +$lang['addUser'] = 'SQL príkaz pre pridanie nového používateľa'; +$lang['addGroup'] = 'SQL príkaz pre pridanie novej skupiny'; +$lang['addUserGroup'] = 'SQL príkaz pre pridanie používateľa do existujúcej skupiny'; +$lang['delGroup'] = 'SQL príkaz pre zrušenie skupiny'; +$lang['getUserID'] = 'SQL príkaz pre získanie primárneho klúča používateľa'; +$lang['delUser'] = 'SQL príkaz pre zrušenie používateľa'; +$lang['delUserRefs'] = 'SQL príkaz pre vyradenie používateľa zo všetkých skupín'; +$lang['updateUser'] = 'SQL príkaz pre aktualizáciu informácií o používateľovi'; +$lang['UpdateLogin'] = 'SQL podmienka pre aktualizáciu prihlasovacieho mena používateľa'; +$lang['UpdatePass'] = 'SQL podmienka pre aktualizáciu hesla používateľa'; +$lang['UpdateEmail'] = 'SQL podmienka pre aktualizáciu emailovej adresy používateľa'; +$lang['UpdateName'] = 'SQL podmienka pre aktualizáciu mena a priezviska používateľa'; +$lang['delUserGroup'] = 'SQL príkaz pre vyradenie používateľa z danej skupiny'; +$lang['getGroupID'] = 'SQL príkaz pre získanie primárneho kľúča skupiny'; diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 182a4c65f..1d2173706 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -176,12 +176,10 @@ if (!class_exists('configuration')) { for ($i=0; $i<count($matches); $i++) { $value = $matches[$i][2]; - // correct issues with the incoming data // FIXME ... for now merge multi-dimensional array indices using ____ $key = preg_replace('/.\]\[./',CM_KEYMARKER,$matches[$i][1]); - // handle arrays if(preg_match('/^array ?\((.*)\)/', $value, $match)){ $arr = explode(',', $match[1]); diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php index 72c58620d..3f019d5e2 100644 --- a/lib/plugins/plugin/admin.php +++ b/lib/plugins/plugin/admin.php @@ -65,7 +65,6 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin { // enable direct access to language strings $this->setupLocale(); - $fn = $INPUT->param('fn'); if (is_array($fn)) { $this->cmd = key($fn); diff --git a/lib/plugins/plugin/classes/ap_info.class.php b/lib/plugins/plugin/classes/ap_info.class.php index dfeb52b9d..b3826b944 100644 --- a/lib/plugins/plugin/classes/ap_info.class.php +++ b/lib/plugins/plugin/classes/ap_info.class.php @@ -13,7 +13,6 @@ class ap_info extends ap_manage { $component_list = $this->get_plugin_components($this->manager->plugin); usort($component_list, array($this,'component_sort')); - foreach ($component_list as $component) { if (($obj = &plugin_load($component['type'],$component['name'],false,true)) === null) continue; diff --git a/lib/plugins/plugin/lang/cs/lang.php b/lib/plugins/plugin/lang/cs/lang.php index a92f8b1c2..fb8b6cc4e 100644 --- a/lib/plugins/plugin/lang/cs/lang.php +++ b/lib/plugins/plugin/lang/cs/lang.php @@ -15,6 +15,7 @@ * @author Jakub A. Těšínský (j@kub.cz) * @author mkucera66@seznam.cz * @author Zbyněk Křivka <krivka@fit.vutbr.cz> + * @author Gerrit Uitslag <klapinklapin@gmail.com> */ $lang['menu'] = 'Správa pluginů'; $lang['download'] = 'Stáhnout a instalovat plugin'; diff --git a/lib/plugins/plugin/lang/fa/lang.php b/lib/plugins/plugin/lang/fa/lang.php index bc43ee3ef..0a8fadb3c 100644 --- a/lib/plugins/plugin/lang/fa/lang.php +++ b/lib/plugins/plugin/lang/fa/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Persian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author behrad eslamifar <behrad_es@yahoo.com) * @author Mohsen Firoozmandan <info@mambolearn.com> * @author omidmr@gmail.com diff --git a/lib/plugins/plugin/lang/hi/lang.php b/lib/plugins/plugin/lang/hi/lang.php index 67b177256..89d27cee1 100644 --- a/lib/plugins/plugin/lang/hi/lang.php +++ b/lib/plugins/plugin/lang/hi/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Hindi language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Abhinav Tyagi <abhinavtyagi11@gmail.com> * @author yndesai@gmail.com */ diff --git a/lib/plugins/plugin/lang/hu/lang.php b/lib/plugins/plugin/lang/hu/lang.php index 235d33a0e..b8fa2cdbe 100644 --- a/lib/plugins/plugin/lang/hu/lang.php +++ b/lib/plugins/plugin/lang/hu/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Hungarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Sandor TIHANYI <stihanyi+dw@gmail.com> * @author Siaynoq Mage <siaynoqmage@gmail.com> * @author schilling.janos@gmail.com diff --git a/lib/plugins/plugin/lang/sk/lang.php b/lib/plugins/plugin/lang/sk/lang.php index 5024872f1..35c07cf80 100644 --- a/lib/plugins/plugin/lang/sk/lang.php +++ b/lib/plugins/plugin/lang/sk/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Slovak language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Ondrej Végh <ov@vsieti.sk> * @author Michal Mesko <michal.mesko@gmail.com> * @author exusik@gmail.com diff --git a/lib/plugins/popularity/action.php b/lib/plugins/popularity/action.php index f0cbb771b..9e2e78d11 100644 --- a/lib/plugins/popularity/action.php +++ b/lib/plugins/popularity/action.php @@ -35,7 +35,6 @@ class action_plugin_popularity extends Dokuwiki_Action_Plugin { //Actually send it $status = $this->helper->sendData( $this->helper->gatherAsString() ); - if ( $status !== '' ){ //If an error occured, log it io_saveFile( $this->helper->autosubmitErrorFile, $status ); diff --git a/lib/plugins/popularity/lang/fa/lang.php b/lib/plugins/popularity/lang/fa/lang.php index 6a0529891..d2f071b07 100644 --- a/lib/plugins/popularity/lang/fa/lang.php +++ b/lib/plugins/popularity/lang/fa/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Persian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author behrad eslamifar <behrad_es@yahoo.com) * @author Mohsen Firoozmandan <info@mambolearn.com> * @author omidmr@gmail.com diff --git a/lib/plugins/popularity/lang/hi/lang.php b/lib/plugins/popularity/lang/hi/lang.php index c0085d72a..c818c7a1e 100644 --- a/lib/plugins/popularity/lang/hi/lang.php +++ b/lib/plugins/popularity/lang/hi/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Hindi language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Abhinav Tyagi <abhinavtyagi11@gmail.com> * @author yndesai@gmail.com */ diff --git a/lib/plugins/popularity/lang/hu/lang.php b/lib/plugins/popularity/lang/hu/lang.php index 5ee40eacc..213d22655 100644 --- a/lib/plugins/popularity/lang/hu/lang.php +++ b/lib/plugins/popularity/lang/hu/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Hungarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Sandor TIHANYI <stihanyi+dw@gmail.com> * @author Siaynoq Mage <siaynoqmage@gmail.com> * @author schilling.janos@gmail.com diff --git a/lib/plugins/popularity/lang/sk/lang.php b/lib/plugins/popularity/lang/sk/lang.php index bc46b03c5..ab7accf0c 100644 --- a/lib/plugins/popularity/lang/sk/lang.php +++ b/lib/plugins/popularity/lang/sk/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Slovak language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Michal Mesko <michal.mesko@gmail.com> * @author exusik@gmail.com * @author Martin Michalek <michalek.dev@gmail.com> diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php index b65472e4c..423d67449 100644 --- a/lib/plugins/revert/admin.php +++ b/lib/plugins/revert/admin.php @@ -120,7 +120,6 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { $recents = getRecents(0,$this->max_lines); echo '<ul>'; - $cnt = 0; foreach($recents as $recent){ if($filter){ diff --git a/lib/plugins/revert/lang/cs/lang.php b/lib/plugins/revert/lang/cs/lang.php index d918e2e69..b9e7284d4 100644 --- a/lib/plugins/revert/lang/cs/lang.php +++ b/lib/plugins/revert/lang/cs/lang.php @@ -14,6 +14,7 @@ * @author Jakub A. Těšínský (j@kub.cz) * @author mkucera66@seznam.cz * @author Zbyněk Křivka <krivka@fit.vutbr.cz> + * @author Gerrit Uitslag <klapinklapin@gmail.com> */ $lang['menu'] = 'Obnova zaspamovaných stránek'; $lang['filter'] = 'Hledat zaspamované stránky'; diff --git a/lib/plugins/revert/lang/fa/lang.php b/lib/plugins/revert/lang/fa/lang.php index ba20313a3..c6ce6176f 100644 --- a/lib/plugins/revert/lang/fa/lang.php +++ b/lib/plugins/revert/lang/fa/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Persian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author behrad eslamifar <behrad_es@yahoo.com) * @author Mohsen Firoozmandan <info@mambolearn.com> * @author omidmr@gmail.com diff --git a/lib/plugins/revert/lang/hu/lang.php b/lib/plugins/revert/lang/hu/lang.php index 051e7b7d7..d16764a35 100644 --- a/lib/plugins/revert/lang/hu/lang.php +++ b/lib/plugins/revert/lang/hu/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Hungarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Sandor TIHANYI <stihanyi+dw@gmail.com> * @author Siaynoq Mage <siaynoqmage@gmail.com> * @author schilling.janos@gmail.com diff --git a/lib/plugins/revert/lang/sk/intro.txt b/lib/plugins/revert/lang/sk/intro.txt index e69de29bb..aa75a2c10 100644 --- a/lib/plugins/revert/lang/sk/intro.txt +++ b/lib/plugins/revert/lang/sk/intro.txt @@ -0,0 +1,3 @@ +====== Obnova dát ====== + +Táto stránka slúži na automatické obnovenie obsahu stránok po útoku spamom. Pre identifikáciu napadnutých stránok zadajte vyhľadávací reťazec (napr. spam URL), potom potvrďte, že nájdené stránky sú skutočne napadnuté, a zrušte posledné zmeny.
\ No newline at end of file diff --git a/lib/plugins/revert/lang/sk/lang.php b/lib/plugins/revert/lang/sk/lang.php index 368d2d929..7ab21f287 100644 --- a/lib/plugins/revert/lang/sk/lang.php +++ b/lib/plugins/revert/lang/sk/lang.php @@ -1,12 +1,13 @@ <?php + /** - * Slovaklanguage file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Michal Mesko <michal.mesko@gmail.com> * @author exusik@gmail.com * @author Martin Michalek <michalek.dev@gmail.com> */ -$lang['menu'] = 'Reverzný manažér'; +$lang['menu'] = 'Obnova dát'; $lang['filter'] = 'Hľadať spamerské stránky'; $lang['revert'] = 'Vrátiť vybrané stránky'; $lang['reverted'] = '%s vrátená na revíziu %s'; diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index 6aa403b61..8df5abb08 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -216,12 +216,12 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { global $conf; // definitely don't invoke "global $lang" $path = DOKU_PLUGIN.$this->getPluginName().'/lang/'; - + $lang = array(); // don't include once, in case several plugin components require the same language file @include($path.'en/lang.php'); if ($conf['lang'] != 'en') @include($path.$conf['lang'].'/lang.php'); - + $this->lang = $lang; $this->localised = true; } diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 3dba5a86e..c4d71cb22 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -21,29 +21,30 @@ if(!defined('DOKU_PLUGIN_IMAGES')) define('DOKU_PLUGIN_IMAGES',DOKU_BASE.'lib/pl */ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { - var $_auth = null; // auth object - var $_user_total = 0; // number of registered users - var $_filter = array(); // user selection filter(s) - var $_start = 0; // index of first user to be displayed - var $_last = 0; // index of the last user to be displayed - var $_pagesize = 20; // number of users to list on one page - var $_edit_user = ''; // set to user selected for editing - var $_edit_userdata = array(); - var $_disabled = ''; // if disabled set to explanatory string - var $_import_failures = array(); + protected $_auth = null; // auth object + protected $_user_total = 0; // number of registered users + protected $_filter = array(); // user selection filter(s) + protected $_start = 0; // index of first user to be displayed + protected $_last = 0; // index of the last user to be displayed + protected $_pagesize = 20; // number of users to list on one page + protected $_edit_user = ''; // set to user selected for editing + protected $_edit_userdata = array(); + protected $_disabled = ''; // if disabled set to explanatory string + protected $_import_failures = array(); /** * Constructor */ - function admin_plugin_usermanager(){ + public function admin_plugin_usermanager(){ + /** @var DokuWiki_Auth_Plugin $auth */ global $auth; $this->setupLocale(); if (!isset($auth)) { - $this->disabled = $this->lang['noauth']; + $this->_disabled = $this->lang['noauth']; } else if (!$auth->canDo('getUsers')) { - $this->disabled = $this->lang['nosupport']; + $this->_disabled = $this->lang['nosupport']; } else { // we're good to go @@ -58,27 +59,27 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } /** - * return prompt for admin menu + * Return prompt for admin menu */ - function getMenuText($language) { + public function getMenuText($language) { if (!is_null($this->_auth)) return parent::getMenuText($language); - return $this->getLang('menu').' '.$this->disabled; + return $this->getLang('menu').' '.$this->_disabled; } /** * return sort order for position in admin menu */ - function getMenuSort() { + public function getMenuSort() { return 2; } /** - * handle user request + * Handle user request */ - function handle() { + public function handle() { global $INPUT; if (is_null($this->_auth)) return false; @@ -122,12 +123,13 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { case 'last' : $this->_start = $this->_user_total; break; } $this->_validatePagination(); + return true; } /** - * output appropriate html + * Output appropriate html */ - function html() { + public function html() { global $ID; if(is_null($this->_auth)) { @@ -136,13 +138,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } $user_list = $this->_auth->retrieveUsers($this->_start, $this->_pagesize, $this->_filter); - $users = array_keys($user_list); $page_buttons = $this->_pagination(); $delete_disable = $this->_auth->canDo('delUser') ? '' : 'disabled="disabled"'; $editable = $this->_auth->canDo('UserMod'); - $export_label = empty($this->_filter) ? $this->lang['export_all'] : $this->lang[export_filtered]; + $export_label = empty($this->_filter) ? $this->lang['export_all'] : $this->lang['export_filtered']; print $this->locale_xhtml('intro'); print $this->locale_xhtml('list'); @@ -153,7 +154,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if ($this->_user_total > 0) { ptln("<p>".sprintf($this->lang['summary'],$this->_start+1,$this->_last,$this->_user_total,$this->_auth->getUserCount())."</p>"); } else { - ptln("<p>".sprintf($this->lang['nonefound'],$this->_auth->getUserCount())."</p>"); + if($this->_user_total < 0) { + $allUserTotal = 0; + } else { + $allUserTotal = $this->_auth->getUserCount(); + } + ptln("<p>".sprintf($this->lang['nonefound'], $allUserTotal)."</p>"); } ptln("<form action=\"".wl($ID)."\" method=\"post\">"); formSecurityToken(); @@ -177,6 +183,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { ptln(" <tbody>"); foreach ($user_list as $user => $userinfo) { extract($userinfo); + /** + * @var string $name + * @var string $pass + * @var string $mail + * @var array $grps + */ $groups = join(', ',$grps); ptln(" <tr class=\"user_info\">"); ptln(" <td class=\"centeralign\"><input type=\"checkbox\" name=\"delete[".$user."]\" ".$delete_disable." /></td>"); @@ -251,13 +263,18 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $this->_htmlImportForm(); } ptln("</div>"); + return true; } - /** - * @todo disable fields which the backend can't change + * Display form to add or modify a user + * + * @param string $cmd 'add' or 'modify' + * @param string $user id of user + * @param array $userdata array with name, mail, pass and grps + * @param int $indent */ - function _htmlUserForm($cmd,$user='',$userdata=array(),$indent=0) { + protected function _htmlUserForm($cmd,$user='',$userdata=array(),$indent=0) { global $conf; global $ID; @@ -327,7 +344,17 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { ptln("</form>",$indent); } - function _htmlInputField($id, $name, $label, $value, $cando, $indent=0) { + /** + * Prints a inputfield + * + * @param string $id + * @param string $name + * @param string $label + * @param string $value + * @param bool $cando whether auth backend is capable to do this action + * @param int $indent + */ + protected function _htmlInputField($id, $name, $label, $value, $cando, $indent=0) { $class = $cando ? '' : ' class="disabled"'; echo str_pad('',$indent); @@ -342,7 +369,6 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $autocomp = ''; } - echo "<tr $class>"; echo "<td><label for=\"$id\" >$label: </label></td>"; echo "<td>"; @@ -356,12 +382,23 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { echo "</tr>"; } - function _htmlFilter($key) { + /** + * Returns htmlescaped filter value + * + * @param string $key name of search field + * @return string html escaped value + */ + protected function _htmlFilter($key) { if (empty($this->_filter)) return ''; return (isset($this->_filter[$key]) ? hsc($this->_filter[$key]) : ''); } - function _htmlFilterSettings($indent=0) { + /** + * Print hidden inputs with the current filter values + * + * @param int $indent + */ + protected function _htmlFilterSettings($indent=0) { ptln("<input type=\"hidden\" name=\"start\" value=\"".$this->_start."\" />",$indent); @@ -370,7 +407,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } } - function _htmlImportForm($indent=0) { + /** + * Print import form and summary of previous import + * + * @param int $indent + */ + protected function _htmlImportForm($indent=0) { global $ID; $failure_download_link = wl($ID,array('do'=>'admin','page'=>'usermanager','fn[importfails]'=>1)); @@ -379,7 +421,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { print $this->locale_xhtml('import'); ptln(' <form action="'.wl($ID).'" method="post" enctype="multipart/form-data">',$indent); formSecurityToken(); - ptln(' <label>User list file (csv): <input type="file" name="import" /></label>',$indent); + ptln(' <label>'.$this->lang['import_userlistcsv'].'<input type="file" name="import" /></label>',$indent); ptln(' <input type="submit" name="fn[import]" value="'.$this->lang['import'].'" />',$indent); ptln(' <input type="hidden" name="do" value="admin" />',$indent); ptln(' <input type="hidden" name="page" value="usermanager" />',$indent); @@ -392,7 +434,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if ($this->_import_failures) { $digits = strlen(count($this->_import_failures)); ptln('<div class="level3 import_failures">',$indent); - ptln(' <h3>Most Recent Import - Failures</h3>'); + ptln(' <h3>'.$this->lang['import_header'].'</h3>'); ptln(' <table class="import_failures">',$indent); ptln(' <thead>',$indent); ptln(' <tr>',$indent); @@ -417,13 +459,18 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } ptln(' </tbody>',$indent); ptln(' </table>',$indent); - ptln(' <p><a href="'.$failure_download_link.'">Download Failures as CSV for correction</a></p>'); + ptln(' <p><a href="'.$failure_download_link.'">'.$this->lang['import_downloadfailures'].'</a></p>'); ptln('</div>'); } } - function _addUser(){ + /** + * Add an user to auth backend + * + * @return bool whether succesful + */ + protected function _addUser(){ global $INPUT; if (!checkSecurityToken()) return false; if (!$this->_auth->canDo('addUser')) return false; @@ -484,9 +531,11 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } /** - * Delete user + * Delete user from auth backend + * + * @return bool whether succesful */ - function _deleteUser(){ + protected function _deleteUser(){ global $conf, $INPUT; if (!checkSecurityToken()) return false; @@ -519,12 +568,14 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * Edit user (a user has been selected for editing) + * + * @param string $param id of the user + * @return bool whether succesful */ - function _editUser($param) { + protected function _editUser($param) { if (!checkSecurityToken()) return false; if (!$this->_auth->canDo('UserMod')) return false; - - $user = cleanID(preg_replace('/.*:/','',$param)); + $user = $this->_auth->cleanUser(preg_replace('/.*[:\/]/','',$param)); $userdata = $this->_auth->getUserData($user); // no user found? @@ -540,16 +591,18 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } /** - * Modify user (modified user data has been recieved) + * Modify user in the auth backend (modified user data has been recieved) + * + * @return bool whether succesful */ - function _modifyUser(){ + protected function _modifyUser(){ global $conf, $INPUT; if (!checkSecurityToken()) return false; if (!$this->_auth->canDo('UserMod')) return false; // get currently valid user data - $olduser = cleanID(preg_replace('/.*:/','',$INPUT->str('userid_old'))); + $olduser = $this->_auth->cleanUser(preg_replace('/.*[:\/]/','',$INPUT->str('userid_old'))); $oldinfo = $this->_auth->getUserData($olduser); // get new user data subject to change @@ -610,9 +663,14 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } /** - * send password change notification email + * Send password change notification email + * + * @param string $user id of user + * @param string $password plain text + * @param bool $status_alert whether status alert should be shown + * @return bool whether succesful */ - function _notifyUser($user, $password, $status_alert=true) { + protected function _notifyUser($user, $password, $status_alert=true) { if ($sent = auth_sendPassword($user,$password)) { if ($status_alert) { @@ -628,11 +686,13 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } /** - * retrieve & clean user data from the form + * Retrieve & clean user data from the form * + * @param bool $clean whether the cleanUser method of the authentication backend is applied * @return array (user, password, full name, email, array(groups)) */ - function _retrieveUser($clean=true) { + protected function _retrieveUser($clean=true) { + /** @var DokuWiki_Auth_Plugin $auth */ global $auth; global $INPUT; @@ -651,7 +711,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { return $user; } - function _setFilter($op) { + /** + * Set the filter with the current search terms or clear the filter + * + * @param string $op 'new' or 'clear' + */ + protected function _setFilter($op) { $this->_filter = array(); @@ -665,7 +730,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } } - function _retrieveFilter() { + /** + * Get the current search terms + * + * @return array + */ + protected function _retrieveFilter() { global $INPUT; $t_filter = $INPUT->arr('filter'); @@ -681,7 +751,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { return $filter; } - function _validatePagination() { + /** + * Validate and improve the pagination values + */ + protected function _validatePagination() { if ($this->_start >= $this->_user_total) { $this->_start = $this->_user_total - $this->_pagesize; @@ -691,10 +764,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $this->_last = min($this->_user_total, $this->_start + $this->_pagesize); } - /* - * return an array of strings to enable/disable pagination buttons + /** + * Return an array of strings to enable/disable pagination buttons + * + * @return array with enable/disable attributes */ - function _pagination() { + protected function _pagination() { $disabled = 'disabled="disabled"'; @@ -710,10 +785,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { return $buttons; } - /* - * export a list of users in csv format using the current filter criteria + /** + * Export a list of users in csv format using the current filter criteria */ - function _export() { + protected function _export() { // list of users for export - based on current filter criteria $user_list = $this->_auth->retrieveUsers(0, 0, $this->_filter); $column_headings = array( @@ -742,12 +817,14 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { die; } - /* - * import a file of users in csv format + /** + * Import a file of users in csv format * * csv file should have 4 columns, user_id, full name, email, groups (comma separated) + * + * @return bool whether succesful */ - function _import() { + protected function _import() { // check we are allowed to add users if (!checkSecurityToken()) return false; if (!$this->_auth->canDo('addUser')) return false; @@ -807,9 +884,17 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $_SESSION['import_failures'] = $this->_import_failures; session_write_close(); } + return true; } - function _cleanImportUser($candidate, & $error){ + /** + * Returns cleaned user data + * + * @param array $candidate raw values of line from input file + * @param $error + * @return array|bool cleaned data or false + */ + protected function _cleanImportUser($candidate, & $error){ global $INPUT; // kludgy .... @@ -848,7 +933,16 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { return $cleaned; } - function _addImportUser($user, & $error){ + /** + * Adds imported user to auth backend + * + * Required a check of canDo('addUser') before + * + * @param array $user data of user + * @param string &$error reference catched error message + * @return bool whether succesful + */ + protected function _addImportUser($user, & $error){ if (!$this->_auth->triggerUserMod('create', $user)) { $error = $this->lang['import_error_create']; return false; @@ -857,7 +951,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { return true; } - function _downloadImportFailures(){ + /** + * Downloads failures as csv file + */ + protected function _downloadImportFailures(){ // ============================================================================================== // GENERATE OUTPUT @@ -869,7 +966,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { // output the csv $fd = fopen('php://output','w'); - foreach ($this->_import_failures as $line => $fail) { + foreach ($this->_import_failures as $fail) { fputs($fd, $fail['orig']); } fclose($fd); diff --git a/lib/plugins/usermanager/lang/en/lang.php b/lib/plugins/usermanager/lang/en/lang.php index 69119e196..f87c77afb 100644 --- a/lib/plugins/usermanager/lang/en/lang.php +++ b/lib/plugins/usermanager/lang/en/lang.php @@ -61,7 +61,9 @@ $lang['add_fail'] = 'User addition failed'; $lang['notify_ok'] = 'Notification email sent'; $lang['notify_fail'] = 'Notification email could not be sent'; -// import errors +// import & errors +$lang['import_userlistcsv'] = 'User list file (CSV): '; +$lang['import_header'] = 'Most Recent Import - Failures'; $lang['import_success_count'] = 'User Import: %d users found, %d imported successfully.'; $lang['import_failure_count'] = 'User Import: %d failed. Failures are listed below.'; $lang['import_error_fields'] = "Insufficient fields, found %d, require 4."; @@ -72,5 +74,6 @@ $lang['import_error_upload'] = 'Import Failed. The csv file could not be upload $lang['import_error_readfail'] = 'Import Failed. Unable to read uploaded file.'; $lang['import_error_create'] = 'Unable to create the user'; $lang['import_notify_fail'] = 'Notification message could not be sent for imported user, %s with email %s.'; +$lang['import_downloadfailures'] = 'Download Failures as CSV for correction'; diff --git a/lib/plugins/usermanager/lang/fa/lang.php b/lib/plugins/usermanager/lang/fa/lang.php index 8176b776b..a6a484411 100644 --- a/lib/plugins/usermanager/lang/fa/lang.php +++ b/lib/plugins/usermanager/lang/fa/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Persian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author behrad eslamifar <behrad_es@yahoo.com) * @author Mohsen Firoozmandan <info@mambolearn.com> * @author omidmr@gmail.com diff --git a/lib/plugins/usermanager/lang/hu/import.txt b/lib/plugins/usermanager/lang/hu/import.txt new file mode 100644 index 000000000..5a4bc8b1c --- /dev/null +++ b/lib/plugins/usermanager/lang/hu/import.txt @@ -0,0 +1,9 @@ +==== Felhasználók tömeges importálása ==== + +Egy, legalább 4 oszlopot tartalmazó, felhasználóikat tartalmazó fájl szükséges hozzá. +Az oszlopok kötelező tartalma, megfelelő sorrendben: felhasználói azonosító, teljes név, e-mailcím és csoportjai. +A CSV mezőit vesszővel (,) kell elválasztani, a szövegeket idézőjelek ("") közé kell foglalni. +Mintafájl megtekintéséhez próbáld ki a fenti, "Felhasználók exportálása" funkciót. A fordított törtvonallal (\) lehet kilépni. +Megegyező felhasználói azonosítók esetén, nem kerülnek feldolgozásra. + +Minden sikeresen importált felhasználó kap egy e-mailt, amiben megtalálja a generált jelszavát.
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/hu/lang.php b/lib/plugins/usermanager/lang/hu/lang.php index 71a5b4bc9..dd76bfd50 100644 --- a/lib/plugins/usermanager/lang/hu/lang.php +++ b/lib/plugins/usermanager/lang/hu/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Hungarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Sandor TIHANYI <stihanyi+dw@gmail.com> * @author Siaynoq Mage <siaynoqmage@gmail.com> * @author schilling.janos@gmail.com @@ -9,6 +10,7 @@ * @author Sándor TIHANYI <stihanyi+dw@gmail.com> * @author David Szabo <szabo.david@gyumolcstarhely.hu> * @author Marton Sebok <sebokmarton@gmail.com> + * @author Serenity87HUN <anikototh87@gmail.com> */ $lang['menu'] = 'Felhasználók kezelése'; $lang['noauth'] = '(A felhasználói azonosítás nem működik.)'; @@ -31,6 +33,11 @@ $lang['search'] = 'Keresés'; $lang['search_prompt'] = 'Keresés'; $lang['clear'] = 'Keresési szűrés törlése'; $lang['filter'] = 'Szűrés'; +$lang['export_all'] = 'Összes felhasználó exportálása (CSV)'; +$lang['export_filtered'] = 'Kiválasztott felhasználók exportálása (CSV)'; +$lang['import'] = 'Új felhasználók importálása'; +$lang['line'] = 'Sor száma'; +$lang['error'] = 'Hibaüzenet'; $lang['summary'] = '%1$d-%2$d. felhasználók megjelenítése a(z) %3$d megtalált felhasználóból. %4$d felhasználó van összesen.'; $lang['nonefound'] = 'Nincs ilyen felhasználó. %d felhasználó van összesen.'; $lang['delete_ok'] = '%d felhasználó törölve.'; @@ -51,3 +58,16 @@ $lang['add_ok'] = 'A felhasználó sikeresen hozzáadva.'; $lang['add_fail'] = 'A felhasználó hozzáadása nem sikerült.'; $lang['notify_ok'] = 'Értesítő levél elküldve.'; $lang['notify_fail'] = 'Nem sikerült az értesítő levelet elküldeni.'; +$lang['import_userlistcsv'] = 'Felhasználók listája fájl (CSV)'; +$lang['import_header'] = 'Legutóbbi importálás - Hibák'; +$lang['import_success_count'] = 'Felhasználók importálása: %d felhasználót találtunk, ebből %d sikeresen importálva.'; +$lang['import_failure_count'] = 'Felhasználók importálása: %d sikertelen. A sikertelenség okait lejjebb találod.'; +$lang['import_error_fields'] = 'Túl kevés mezőt adtál meg, %d darabot találtunk, legalább 4-re van szükség.'; +$lang['import_error_baduserid'] = 'Felhasználói azonosító hiányzik'; +$lang['import_error_badname'] = 'Nem megfelelő név'; +$lang['import_error_badmail'] = 'Nem megfelelő e-mailcím'; +$lang['import_error_upload'] = 'Sikertelen importálás. A csv fájl nem feltölthető vagy üres.'; +$lang['import_error_readfail'] = 'Sikertelen importálás. A feltöltött fájl nem olvasható.'; +$lang['import_error_create'] = 'Ez a felhasználó nem hozható létre'; +$lang['import_notify_fail'] = 'Az értesítő e-mail nem küldhető el az alábbi importált felhasználónak: %s e-mailcíme: %s.'; +$lang['import_downloadfailures'] = 'Töltsd le a hibákat tartalmazó fájlt CSV formátumban, hogy ki tudd javítani a hibákat'; diff --git a/lib/plugins/usermanager/lang/ja/import.txt b/lib/plugins/usermanager/lang/ja/import.txt new file mode 100644 index 000000000..d4f7d08bf --- /dev/null +++ b/lib/plugins/usermanager/lang/ja/import.txt @@ -0,0 +1,10 @@ +===== 一括ユーザーインポート ===== + +少なくとも4列のユーザーCSVファイルが必要です。 +列の順序:ユーザーID、氏名、電子メールアドレス、グループ。 +CSVフィールドはカンマ(,)区切り、文字列は引用符("")区切りです。 +エスケープにバックスラッシュ(\)を使用できます。 +適切なファイル例は、上記の"エクスポートユーザー"機能で試して下さい。 +重複するユーザーIDは無視されます。 + +正常にインポートされたユーザー毎に、パスワードを作成し、電子メールで送付します。
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/ja/lang.php b/lib/plugins/usermanager/lang/ja/lang.php index 8b85ee9fd..0830416f3 100644 --- a/lib/plugins/usermanager/lang/ja/lang.php +++ b/lib/plugins/usermanager/lang/ja/lang.php @@ -10,6 +10,8 @@ * @author Kazutaka Miyasaka <kazmiya@gmail.com> * @author Taisuke Shimamoto <dentostar@gmail.com> * @author Satoshi Sahara <sahara.satoshi@gmail.com> + * @author Hideaki SAWADA <sawadakun@live.jp> + * @author Hideaki SAWADA <chuno@live.jp> */ $lang['menu'] = 'ユーザー管理'; $lang['noauth'] = '(ユーザー認証が無効です)'; @@ -32,6 +34,11 @@ $lang['search'] = '検索'; $lang['search_prompt'] = '検索を実行'; $lang['clear'] = '検索フィルターをリセット'; $lang['filter'] = 'フィルター'; +$lang['export_all'] = '全ユーザーのエクスポート(CSV)'; +$lang['export_filtered'] = '抽出したユーザー一覧のエクスポート(CSV)'; +$lang['import'] = '新規ユーザーのインポート'; +$lang['line'] = '行番号'; +$lang['error'] = 'エラーメッセージ'; $lang['summary'] = 'ユーザー %1$d-%2$d / %3$d, 総ユーザー数 %4$d'; $lang['nonefound'] = 'ユーザーが見つかりません, 総ユーザー数 %d'; $lang['delete_ok'] = '%d ユーザーが削除されました'; @@ -52,3 +59,16 @@ $lang['add_ok'] = 'ユーザーを登録しました'; $lang['add_fail'] = 'ユーザーの登録に失敗しました'; $lang['notify_ok'] = '通知メールを送信しました'; $lang['notify_fail'] = '通知メールを送信できませんでした'; +$lang['import_userlistcsv'] = 'ユーザー一覧ファイル(CSV):'; +$lang['import_header'] = '最新インポート - 失敗'; +$lang['import_success_count'] = 'ユーザーインポート:ユーザーが%d件あり、%d件正常にインポートされました。'; +$lang['import_failure_count'] = 'ユーザーインポート:%d件が失敗しました。失敗は次のとおりです。'; +$lang['import_error_fields'] = '列の不足(4列必要)が%d件ありました。'; +$lang['import_error_baduserid'] = '欠落したユーザーID'; +$lang['import_error_badname'] = '不正な氏名'; +$lang['import_error_badmail'] = '不正な電子メールアドレス'; +$lang['import_error_upload'] = 'インポートが失敗しました。CSVファイルをアップロードできなかったか、ファイルが空です。'; +$lang['import_error_readfail'] = 'インポートが失敗しました。アップロードされたファイルが読込できません。'; +$lang['import_error_create'] = 'ユーザーが作成できません。'; +$lang['import_notify_fail'] = '通知メッセージがインポートされたユーザー(%s)・電子メールアドレス(%s)に送信できませんでした。'; +$lang['import_downloadfailures'] = '修正用に失敗を CSVファイルとしてダウンロードする。'; diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index f2116f688..1905fadc2 100644 --- a/lib/plugins/usermanager/lang/ko/lang.php +++ b/lib/plugins/usermanager/lang/ko/lang.php @@ -9,6 +9,7 @@ * @author Seung-Chul Yoo <dryoo@live.com> * @author erial2@gmail.com * @author Myeongjin <aranet100@gmail.com> + * @author Gerrit Uitslag <klapinklapin@gmail.com> */ $lang['menu'] = '사용자 관리자'; $lang['noauth'] = '(사용자 인증이 불가능합니다)'; @@ -56,6 +57,8 @@ $lang['add_ok'] = '사용자를 성공적으로 추가했습니 $lang['add_fail'] = '사용자 추가를 실패했습니다'; $lang['notify_ok'] = '알림 이메일을 성공적으로 보냈습니다'; $lang['notify_fail'] = '알림 이메일을 보낼 수 없습니다'; +$lang['import_userlistcsv'] = '사용자 목록 파일 (CSV):'; +$lang['import_header'] = '가장 최근 가져오기 - 실패'; $lang['import_success_count'] = '사용자 가져오기: 사용자 %d명을 찾았고, %d명을 성공적으로 가져왔습니다.'; $lang['import_failure_count'] = '사용자 가져오기: %d명을 가져오지 못했습니다. 실패는 아래에 나타나 있습니다.'; $lang['import_error_fields'] = '충분하지 않은 필드로, %d개를 찾았고, 4개가 필요합니다.'; @@ -65,4 +68,5 @@ $lang['import_error_badmail'] = '잘못된 이메일 주소'; $lang['import_error_upload'] = '가져오기를 실패했습니다. csv 파일을 올릴 수 없거나 비어 있습니다.'; $lang['import_error_readfail'] = '가져오기를 실패했습니다. 올린 파일을 읽을 수 없습니다.'; $lang['import_error_create'] = '사용자를 만들 수 없습니다.'; -$lang['import_notify_fail'] = '알림 메시지를 가져온 %s (이메일: %s ) 사용자에게 보낼 수 없습니다.'; +$lang['import_notify_fail'] = '알림 메시지를 가져온 %2$s (이메일: %1$s ) 사용자에게 보낼 수 없습니다.'; +$lang['import_downloadfailures'] = '교정을 위한 CSV로 다운로드 실패'; diff --git a/lib/plugins/usermanager/lang/nl/lang.php b/lib/plugins/usermanager/lang/nl/lang.php index 7be10c16a..5cebede89 100644 --- a/lib/plugins/usermanager/lang/nl/lang.php +++ b/lib/plugins/usermanager/lang/nl/lang.php @@ -14,7 +14,6 @@ * @author Timon Van Overveldt <timonvo@gmail.com> * @author Jeroen * @author Ricardo Guijt <ricardoguijt@gmail.com> - * @author Gerrit <klapinklapin@gmail.com> * @author Gerrit Uitslag <klapinklapin@gmail.com> */ $lang['menu'] = 'Gebruikersmanager'; @@ -39,7 +38,7 @@ $lang['search_prompt'] = 'Voer zoekopdracht uit'; $lang['clear'] = 'Verwijder zoekfilter'; $lang['filter'] = 'Filter'; $lang['export_all'] = 'Exporteer Alle Gebruikers (CSV)'; -$lang['export_filtered'] = 'Exporteer de lijst van Gefilterde Gebruikers (CSV)'; +$lang['export_filtered'] = 'Exporteer Gefilterde Gebruikers (CSV)'; $lang['import'] = 'Importeer Nieuwe Gebruikers'; $lang['line'] = 'Regelnummer'; $lang['error'] = 'Foutmelding'; @@ -63,6 +62,8 @@ $lang['add_ok'] = 'Gebruiker succesvol toegevoegd'; $lang['add_fail'] = 'Gebruiker kon niet worden toegevoegd'; $lang['notify_ok'] = 'Notificatie-e-mail verzonden'; $lang['notify_fail'] = 'Notificatie-e-mail kon niet worden verzonden'; +$lang['import_userlistcsv'] = 'Gebruikerslijst (CSV-bestand):'; +$lang['import_header'] = 'Meest recente import - Gevonden fouten'; $lang['import_success_count'] = 'Gebruikers importeren: %d gebruikers gevonden, %d geïmporteerd'; $lang['import_failure_count'] = 'Gebruikers importeren: %d mislukt. Fouten zijn hieronder weergegeven.'; $lang['import_error_fields'] = 'Onvoldoende velden, gevonden %d, nodig 4.'; @@ -73,3 +74,4 @@ $lang['import_error_upload'] = 'Importeren mislukt. Het CSV bestand kon niet w $lang['import_error_readfail'] = 'Importeren mislukt. Lezen van het geüploade bestand is mislukt.'; $lang['import_error_create'] = 'Aanmaken van de gebruiker was niet mogelijk.'; $lang['import_notify_fail'] = 'Notificatiebericht kon niet naar de geïmporteerde gebruiker worden verstuurd, %s met e-mail %s.'; +$lang['import_downloadfailures'] = 'Download de gevonden fouten als CSV voor correctie'; diff --git a/lib/plugins/usermanager/lang/pt-br/lang.php b/lib/plugins/usermanager/lang/pt-br/lang.php index 8beae392f..9bb37742a 100644 --- a/lib/plugins/usermanager/lang/pt-br/lang.php +++ b/lib/plugins/usermanager/lang/pt-br/lang.php @@ -18,6 +18,8 @@ * @author Isaias Masiero Filho <masiero@masiero.org> * @author Balaco Baco <balacobaco@imap.cc> * @author Victor Westmann <victor.westmann@gmail.com> + * @author Leone Lisboa Magevski <leone1983@gmail.com> + * @author Dário Estevão <darioems@gmail.com> */ $lang['menu'] = 'Gerenciamento de Usuários'; $lang['noauth'] = '(o gerenciamento de usuários não está disponível)'; @@ -40,6 +42,10 @@ $lang['search'] = 'Pesquisar'; $lang['search_prompt'] = 'Executar a pesquisa'; $lang['clear'] = 'Limpar o filtro de pesquisa'; $lang['filter'] = 'Filtro'; +$lang['export_all'] = 'Exportar Todos Usuários (CSV)'; +$lang['import'] = 'Importar Novos Usuários'; +$lang['line'] = 'Linha Nº.'; +$lang['error'] = 'Mensagem de Erro'; $lang['summary'] = 'Exibindo usuários %1$d-%2$d de %3$d encontrados. %4$d usuários no total.'; $lang['nonefound'] = 'Nenhum usuário encontrado. %d usuários no total.'; $lang['delete_ok'] = '%d usuários excluídos'; @@ -60,3 +66,12 @@ $lang['add_ok'] = 'O usuário foi adicionado com sucesso'; $lang['add_fail'] = 'O usuário não foi adicionado'; $lang['notify_ok'] = 'O e-mail de notificação foi enviado'; $lang['notify_fail'] = 'Não foi possível enviar o e-mail de notificação'; +$lang['import_success_count'] = 'Importação de Usuário: %d usuário (s) encontrado (s), %d importado (s) com sucesso.'; +$lang['import_failure_count'] = 'Importação de Usuário: %d falhou. As falhas estão listadas abaixo.'; +$lang['import_error_fields'] = 'Campos insuficientes, encontrado (s) %d, necessário 4.'; +$lang['import_error_baduserid'] = 'Id do usuário não encontrado.'; +$lang['import_error_badname'] = 'Nome errado'; +$lang['import_error_badmail'] = 'Endereço de email errado'; +$lang['import_error_upload'] = 'Falha na Importação: O arquivo csv não pode ser carregado ou está vazio.'; +$lang['import_error_readfail'] = 'Falha na Importação: Habilitar para ler o arquivo a ser carregado.'; +$lang['import_error_create'] = 'Habilitar para criar o usuário.'; diff --git a/lib/plugins/usermanager/lang/sk/import.txt b/lib/plugins/usermanager/lang/sk/import.txt new file mode 100644 index 000000000..91fa3e370 --- /dev/null +++ b/lib/plugins/usermanager/lang/sk/import.txt @@ -0,0 +1,9 @@ +===== Hromadný import používateľov ===== + +Vyžaduje CSV súbor používateľov s minimálne 4 stĺpcami. +Stĺpce musia obsahovať postupne: ID používateľa, meno a priezvisko, emailová adresa a skupiny. +CVS záznamy by mali byť oddelené čiarkou (,) a reťazce uzavreté úvodzovkami (""). Znak (\) sa používa v spojení so špeciálnymi znakmi. +Príklad vhodného súboru je možné získať funkciou "Export používateľov". +Duplicitné ID používateľov budú ignorované. + +Každému úspešne importovanému používateľovi bude vygenerované heslo a zaslaný email.
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/sk/lang.php b/lib/plugins/usermanager/lang/sk/lang.php index 54ed374c6..9aadbb53a 100644 --- a/lib/plugins/usermanager/lang/sk/lang.php +++ b/lib/plugins/usermanager/lang/sk/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Slovak language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Ondrej Végh <ov@vsieti.sk> * @author Michal Mesko <michal.mesko@gmail.com> * @author exusik@gmail.com @@ -28,6 +29,11 @@ $lang['search'] = 'Hľadať'; $lang['search_prompt'] = 'Vykonať vyhľadávanie'; $lang['clear'] = 'Vynulovať vyhľadávací filter'; $lang['filter'] = 'Filter'; +$lang['export_all'] = 'Export všetkých používateľov (CSV)'; +$lang['export_filtered'] = 'Export zoznamu používateľov na základe filtra (CSV)'; +$lang['import'] = 'Import nových používateľov'; +$lang['line'] = 'Riadok č.'; +$lang['error'] = 'Chybová správa'; $lang['summary'] = 'Zobrazenie užívateľov %1$d-%2$d z %3$d nájdených. %4$d užívateľov celkom.'; $lang['nonefound'] = 'Žiadni užívatelia nenájdení. %d užívateľov celkom.'; $lang['delete_ok'] = '%d užívateľov zmazaných'; @@ -48,3 +54,16 @@ $lang['add_ok'] = 'Používateľ úspešne pridaný'; $lang['add_fail'] = 'Pridávanie užívateľa nebolo úspešné'; $lang['notify_ok'] = 'Notifikačný e-mail bol poslaný'; $lang['notify_fail'] = 'Notifikačný e-mail nemohol byť poslaný'; +$lang['import_userlistcsv'] = 'Súbor so zoznamov používateľov (CSV):'; +$lang['import_header'] = 'Chyby pri poslednom importe'; +$lang['import_success_count'] = 'Import používateľov: %d nájdených, %d úspešne importovaných.'; +$lang['import_failure_count'] = 'Import používateľov: %d neúspešných. Problámy vypísané nižšie.'; +$lang['import_error_fields'] = 'Neúplné záznamy, %d nájdené, 4 požadované.'; +$lang['import_error_baduserid'] = 'Chýba ID používateľa'; +$lang['import_error_badname'] = 'Nesprávne meno'; +$lang['import_error_badmail'] = 'Nesprávna emailová adresa'; +$lang['import_error_upload'] = 'Import neúspešný. CSV súbor nemohol byť nahraný alebo je prázdny.'; +$lang['import_error_readfail'] = 'Import neúspešný. Nie je možné prečítať nahraný súbor.'; +$lang['import_error_create'] = 'Nie je možné vytvoriť pouzívateľa'; +$lang['import_notify_fail'] = 'Správa nemohla byť zaslaná importovanému používatelovi, %s s emailom %s.'; +$lang['import_downloadfailures'] = 'Stiahnuť chyby vo formáte CSV za účelom opravy'; |