diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2014-03-12 18:39:11 +0000 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2014-03-12 18:39:11 +0000 |
commit | 4e60057c8ccbee18b94a64208311f9bbb338eec6 (patch) | |
tree | 08d79159aa78693c27f54ecebc3105034dfc5933 /lib/plugins | |
parent | 57a6f99d09d3662a8a2ad72e312aa6f53bcc2d01 (diff) | |
parent | 069942acdaa5ba825bc3f92c7093b5071789f1ca (diff) | |
download | rpg-4e60057c8ccbee18b94a64208311f9bbb338eec6.tar.gz rpg-4e60057c8ccbee18b94a64208311f9bbb338eec6.tar.bz2 |
Merge branch 'master' into tablethead
Diffstat (limited to 'lib/plugins')
405 files changed, 9205 insertions, 8840 deletions
diff --git a/lib/plugins/acl/action.php b/lib/plugins/acl/action.php new file mode 100644 index 000000000..a7226f598 --- /dev/null +++ b/lib/plugins/acl/action.php @@ -0,0 +1,88 @@ +<?php +/** + * AJAX call handler for ACL plugin + * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Andreas Gohr <andi@splitbrain.org> + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * Register handler + */ +class action_plugin_acl extends DokuWiki_Action_Plugin { + + /** + * Registers a callback function for a given event + * + * @param Doku_Event_Handler $controller DokuWiki's event controller object + * @return void + */ + public function register(Doku_Event_Handler $controller) { + + $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle_ajax_call_acl'); + + } + + /** + * AJAX call handler for ACL plugin + * + * @param Doku_Event $event event object by reference + * @param mixed $param empty + * @return void + */ + + public function handle_ajax_call_acl(Doku_Event &$event, $param) { + if($event->data !== 'plugin_acl') { + return; + } + $event->stopPropagation(); + $event->preventDefault(); + + global $ID; + global $INPUT; + + if(!auth_isadmin()) { + echo 'for admins only'; + return; + } + if(!checkSecurityToken()) { + echo 'CRSF Attack'; + return; + } + + $ID = getID(); + + /** @var $acl admin_plugin_acl */ + $acl = plugin_load('admin', 'acl'); + $acl->handle(); + + $ajax = $INPUT->str('ajax'); + header('Content-Type: text/html; charset=utf-8'); + + if($ajax == 'info') { + $acl->_html_info(); + } elseif($ajax == 'tree') { + + $ns = $INPUT->str('ns'); + if($ns == '*') { + $ns = ''; + } + $ns = cleanID($ns); + $lvl = count(explode(':', $ns)); + $ns = utf8_encodeFN(str_replace(':', '/', $ns)); + + $data = $acl->_get_tree($ns, $ns); + + foreach(array_keys($data) as $item) { + $data[$item]['level'] = $lvl + 1; + } + echo html_buildlist( + $data, 'acl', array($acl, '_html_list_acl'), + array($acl, '_html_li_acl') + ); + } + } +} diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 5ab73670d..de38aedd5 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -268,7 +268,10 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { usort($data,array($this,'_tree_sort')); $count = count($data); if($count>0) for($i=1; $i<$count; $i++){ - if($data[$i-1]['id'] == $data[$i]['id'] && $data[$i-1]['type'] == $data[$i]['type']) unset($data[$i]); + if($data[$i-1]['id'] == $data[$i]['id'] && $data[$i-1]['type'] == $data[$i]['type']) { + unset($data[$i]); + $i++; // duplicate found, next $i can't be a duplicate, so skip forward one + } } return $data; } @@ -345,7 +348,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { } /** - * Print infos and editor + * Print info and editor */ function _html_info(){ global $ID; @@ -488,7 +491,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { function _html_list_acl($item){ $ret = ''; // what to display - if($item['label']){ + if(!empty($item['label'])){ $base = $item['label']; }else{ $base = ':'.$item['id']; @@ -496,8 +499,11 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { } // highlight? - if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) + if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) { $cl = ' cur'; + } else { + $cl = ''; + } // namespace or page? if($item['type']=='d'){ @@ -554,7 +560,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $line = trim(preg_replace('/#.*$/','',$line)); //ignore comments if(!$line) continue; - $acl = preg_split('/\s+/',$line); + $acl = preg_split('/[ \t]+/',$line); //0 is pagename, 1 is user, 2 is acl $acl[1] = rawurldecode($acl[1]); @@ -701,7 +707,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $acl_config = file($config_cascade['acl']['default']); $acl_user = auth_nameencode($acl_user,true); - $acl_pattern = '^'.preg_quote($acl_scope,'/').'\s+'.$acl_user.'\s+[0-8].*$'; + $acl_pattern = '^'.preg_quote($acl_scope,'/').'[ \t]+'.$acl_user.'[ \t]+[0-8].*$'; // save all non!-matching $new_config = preg_grep("/$acl_pattern/", $acl_config, PREG_GREP_INVERT); diff --git a/lib/plugins/acl/ajax.php b/lib/plugins/acl/ajax.php deleted file mode 100644 index 10e18af97..000000000 --- a/lib/plugins/acl/ajax.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -/** - * AJAX call handler for ACL plugin - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Andreas Gohr <andi@splitbrain.org> - */ - -if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../../'); -require_once(DOKU_INC.'inc/init.php'); -//close session -session_write_close(); - -global $conf; -global $ID; -global $INPUT; - -//fix for Opera XMLHttpRequests -$postData = http_get_raw_post_data(); -if(!count($_POST) && !empty($postData)){ - parse_str($postData, $_POST); -} - -if(!auth_isadmin()) die('for admins only'); -if(!checkSecurityToken()) die('CRSF Attack'); - -$ID = getID(); - -/** @var $acl admin_plugin_acl */ -$acl = plugin_load('admin','acl'); -$acl->handle(); - -$ajax = $INPUT->str('ajax'); -header('Content-Type: text/html; charset=utf-8'); - -if($ajax == 'info'){ - $acl->_html_info(); -}elseif($ajax == 'tree'){ - - $dir = $conf['datadir']; - $ns = $INPUT->str('ns'); - if($ns == '*'){ - $ns =''; - } - $ns = cleanID($ns); - $lvl = count(explode(':',$ns)); - $ns = utf8_encodeFN(str_replace(':','/',$ns)); - - $data = $acl->_get_tree($ns,$ns); - - foreach(array_keys($data) as $item){ - $data[$item]['level'] = $lvl+1; - } - echo html_buildlist($data, 'acl', array($acl, '_html_list_acl'), - array($acl, '_html_li_acl')); -} - diff --git a/lib/plugins/acl/lang/ar/lang.php b/lib/plugins/acl/lang/ar/lang.php index 7c05b721c..4e44dab5f 100644 --- a/lib/plugins/acl/lang/ar/lang.php +++ b/lib/plugins/acl/lang/ar/lang.php @@ -1,8 +1,8 @@ <?php + /** - * Arabic language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Mostafa Hussein <mostafa@gmail.com> * @author Yaman Hokan <always.smile.yh@hotmail.com> * @author Usama Akkad <uahello@gmail.com> diff --git a/lib/plugins/acl/lang/bg/lang.php b/lib/plugins/acl/lang/bg/lang.php index 95201750e..14e7d311c 100644 --- a/lib/plugins/acl/lang/bg/lang.php +++ b/lib/plugins/acl/lang/bg/lang.php @@ -1,8 +1,8 @@ <?php + /** - * bulgarian language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Nikolay Vladimirov <nikolay@vladimiroff.com> * @author Viktor Usunov <usun0v@mail.bg> * @author Kiril <neohidra@gmail.com> diff --git a/lib/plugins/acl/lang/da/lang.php b/lib/plugins/acl/lang/da/lang.php index 4a9d11448..2558795fd 100644 --- a/lib/plugins/acl/lang/da/lang.php +++ b/lib/plugins/acl/lang/da/lang.php @@ -1,8 +1,8 @@ <?php + /** - * Danish language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author koeppe <koeppe@kazur.dk> * @author Jon Bendtsen <bendtsen@diku.dk> * @author Lars Næsbye Christensen <larsnaesbye@stud.ku.dk> diff --git a/lib/plugins/acl/lang/et/lang.php b/lib/plugins/acl/lang/et/lang.php index bc4c73a16..84e21d1f8 100644 --- a/lib/plugins/acl/lang/et/lang.php +++ b/lib/plugins/acl/lang/et/lang.php @@ -1,13 +1,14 @@ <?php + /** - * Estonian language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Oliver S6ro <seem.iges@mail.ee> * @author Aari Juhanson <aari@vmg.vil.ee> * @author Kaiko Kaur <kaiko@kultuur.edu.ee> * @author kristian.kankainen@kuu.la * @author Rivo Zängov <eraser@eraser.ee> + * @author Janar Leas <janar.leas@eesti.ee> */ $lang['admin_acl'] = 'Ligipääsukontrolli nimekirja haldamine'; $lang['acl_group'] = 'Grupp'; @@ -16,6 +17,8 @@ $lang['acl_perms'] = 'Lubatud'; $lang['page'] = 'leht'; $lang['namespace'] = 'alajaotus'; $lang['btn_select'] = 'Vali'; +$lang['p_choose_id'] = 'Sisesta ülal-olevasse vormi <b>kasutaja või rühm</b> nägemaks leheküljele <b class="aclpage">%s</b> sätestatud volitusi.'; +$lang['p_choose_ns'] = 'Sisesta ülal-olevasse vormi <b>kasutaja või rühm</b> nägemaks nimeruumile <b class="aclpage">%s</b> sätestatud volitusi.'; $lang['who'] = 'Kasutaja/Grupp'; $lang['perm'] = 'Õigused'; $lang['acl_perm0'] = 'Pole'; diff --git a/lib/plugins/acl/lang/fi/lang.php b/lib/plugins/acl/lang/fi/lang.php index 4f145e0f6..50224dfb4 100644 --- a/lib/plugins/acl/lang/fi/lang.php +++ b/lib/plugins/acl/lang/fi/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Finnish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author otto@valjakko.net * @author Otto Vainio <otto@valjakko.net> * @author Teemu Mattila <ghcsystems@gmail.com> diff --git a/lib/plugins/acl/lang/he/lang.php b/lib/plugins/acl/lang/he/lang.php index 91025f4b8..6716081eb 100644 --- a/lib/plugins/acl/lang/he/lang.php +++ b/lib/plugins/acl/lang/he/lang.php @@ -1,8 +1,8 @@ <?php + /** - * hebrew language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author DoK <kamberd@yahoo.com> * @author Dotan Kamber <kamberd@yahoo.com> * @author Moshe Kaplan <mokplan@gmail.com> diff --git a/lib/plugins/acl/lang/hi/lang.php b/lib/plugins/acl/lang/hi/lang.php deleted file mode 100644 index d6f78ffd6..000000000 --- a/lib/plugins/acl/lang/hi/lang.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * Hindi language file - * - * @author Abhinav Tyagi <abhinavtyagi11@gmail.com> - * @author yndesai@gmail.com - */ diff --git a/lib/plugins/acl/lang/id-ni/lang.php b/lib/plugins/acl/lang/id-ni/lang.php deleted file mode 100644 index d367340b7..000000000 --- a/lib/plugins/acl/lang/id-ni/lang.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * idni language file - * - * @author Harefa <fidelis@harefa.com> - * @author Yustinus Waruwu <juswaruwu@gmail.com> - */ diff --git a/lib/plugins/acl/lang/id/lang.php b/lib/plugins/acl/lang/id/lang.php index 650637635..6f619c5ec 100644 --- a/lib/plugins/acl/lang/id/lang.php +++ b/lib/plugins/acl/lang/id/lang.php @@ -1,8 +1,8 @@ <?php + /** - * Indonesian language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author mubaidillah <mubaidillah@gmail.com> * @author Yustinus Waruwu <juswaruwu@gmail.com> */ diff --git a/lib/plugins/acl/lang/ko/lang.php b/lib/plugins/acl/lang/ko/lang.php index 2f1ba2311..34b93a9f4 100644 --- a/lib/plugins/acl/lang/ko/lang.php +++ b/lib/plugins/acl/lang/ko/lang.php @@ -12,6 +12,7 @@ * @author Seung-Chul Yoo <dryoo@live.com> * @author erial2@gmail.com * @author Myeongjin <aranet100@gmail.com> + * @author Garam <rowain8@gmail.com> */ $lang['admin_acl'] = '접근 제어 목록 관리'; $lang['acl_group'] = '그룹'; @@ -27,7 +28,7 @@ $lang['p_group_ns'] = '<b class="aclgroup">%s</b> 그룹 구성원은 $lang['p_choose_id'] = '<b class="aclpage">%s</b> 문서 접근 권한을 보거나 바꾸려면 <b>사용자</b>나 <b>그룹</b>을 위 양식에 입력하세요.'; $lang['p_choose_ns'] = '<b class="aclns">%s</b> 이름공간 접근 권한을 보거나 바꾸려면 <b>사용자</b>나 <b>그룹</b>을 위 양식에 입력하세요.'; $lang['p_inherited'] = '참고: 권한이 명시적으로 설정되지 않았으므로 다른 그룹이나 상위 이름공간으로부터 가져왔습니다.'; -$lang['p_isadmin'] = '참고: 슈퍼유저로 설정되어 있으므로 선택된 그룹이나 사용자는 언제나 모든 접근 권한을 가집니다.'; +$lang['p_isadmin'] = '참고: 슈퍼 사용자로 설정되어 있으므로 선택된 그룹이나 사용자는 언제나 모든 접근 권한을 가집니다.'; $lang['p_include'] = '더 높은 접근 권한은 하위를 포함합니다. 문서가 아닌 이름공간에는 만들기, 올리기, 삭제 권한만 적용됩니다.'; $lang['current'] = '현재 ACL 규칙'; $lang['where'] = '문서/이름공간'; diff --git a/lib/plugins/acl/lang/lb/lang.php b/lib/plugins/acl/lang/lb/lang.php deleted file mode 100644 index 59acdf7a8..000000000 --- a/lib/plugins/acl/lang/lb/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * lb language file - * - * @author joel@schintgen.net - */ diff --git a/lib/plugins/acl/lang/ms/lang.php b/lib/plugins/acl/lang/ms/lang.php deleted file mode 100644 index 77ad2a1c1..000000000 --- a/lib/plugins/acl/lang/ms/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Malay language file - * - * @author Markos - */ diff --git a/lib/plugins/acl/lang/nl/lang.php b/lib/plugins/acl/lang/nl/lang.php index c3850a86a..abb81ae06 100644 --- a/lib/plugins/acl/lang/nl/lang.php +++ b/lib/plugins/acl/lang/nl/lang.php @@ -20,6 +20,7 @@ * @author Ricardo Guijt <ricardoguijt@gmail.com> * @author Gerrit <klapinklapin@gmail.com> * @author Gerrit Uitslag <klapinklapin@gmail.com> + * @author Remon <no@email.local> */ $lang['admin_acl'] = 'Toegangsrechten'; $lang['acl_group'] = 'Groep'; @@ -38,7 +39,7 @@ $lang['p_inherited'] = 'Let op: Deze permissies zijn niet expliciet in $lang['p_isadmin'] = 'Let op: De geselecteerde groep of gebruiker heeft altijd volledige toegangsrechten omdat hij als superuser geconfigureerd is.'; $lang['p_include'] = 'Hogere permissies bevatten ook de lagere. Aanmaken, uploaden en verwijderen gelden alleen voor namespaces, niet voor pagina\'s.'; $lang['current'] = 'Huidige ACL regels'; -$lang['where'] = 'Pagina/namespace'; +$lang['where'] = 'Pagina/Namespace'; $lang['who'] = 'Gebruiker/Groep'; $lang['perm'] = 'Bevoegdheden'; $lang['acl_perm0'] = 'Geen'; diff --git a/lib/plugins/acl/lang/no/lang.php b/lib/plugins/acl/lang/no/lang.php index 09d71937a..82cdd5eef 100644 --- a/lib/plugins/acl/lang/no/lang.php +++ b/lib/plugins/acl/lang/no/lang.php @@ -1,8 +1,8 @@ <?php + /** - * Norwegian language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Reidar Mosvold <Reidar.Mosvold@hit.no> * @author Jorge Barrera Grandon <jorge@digitalwolves.org> * @author Thomas Nygreen <nygreen@gmail.com> @@ -10,7 +10,7 @@ * @author Torkill Bruland <torkar-b@online.no> * @author Rune M. Andersen <rune.andersen@gmail.com> * @author Jakob Vad Nielsen (me@jakobnielsen.net) - * @author Kjell Tore Næsgaard <kjell.t.nasgaard@ntnu.no> + * @author Kjell Tore Næsgaard <kjell.t.nasgaard@ntnu.no> * @author Knut Staring <knutst@gmail.com> * @author Lisa Ditlefsen <lisa@vervesearch.com> * @author Erik Pedersen <erik.pedersen@shaw.ca> diff --git a/lib/plugins/acl/lang/pl/lang.php b/lib/plugins/acl/lang/pl/lang.php index bef2d2615..42ce7fdaf 100644 --- a/lib/plugins/acl/lang/pl/lang.php +++ b/lib/plugins/acl/lang/pl/lang.php @@ -1,8 +1,8 @@ <?php + /** - * polish language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Grzegorz Żur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> diff --git a/lib/plugins/acl/lang/ru/help.txt b/lib/plugins/acl/lang/ru/help.txt index ecb2fe3d0..e1b76c2c7 100644 --- a/lib/plugins/acl/lang/ru/help.txt +++ b/lib/plugins/acl/lang/ru/help.txt @@ -5,4 +5,4 @@ * Форма выше позволяет вам просмотреть и изменить права доступа для выбранного пользователя или группы. * Текущие права доступа отображены в таблице ниже. Вы можете использовать её для быстрого удаления или изменения правил. -Прочтение [[doku>acl|официальной документации по ACL]] может помочь вам в полном понимании работы управления правами доступа в «ДокуВики». +Прочтение [[doku>acl|официальной документации по правам доступа]] может помочь вам в полном понимании работы управления правами доступа в «Докувики». diff --git a/lib/plugins/acl/lang/tr/lang.php b/lib/plugins/acl/lang/tr/lang.php index 629ca546b..a9699a5f9 100644 --- a/lib/plugins/acl/lang/tr/lang.php +++ b/lib/plugins/acl/lang/tr/lang.php @@ -1,8 +1,8 @@ <?php + /** - * turkish language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Selim Farsakoğlu <farsakogluselim@yahoo.de> * @author Aydın Coşkuner <aydinweb@gmail.com> * @author Cihan Kahveci <kahvecicihan@gmail.com> diff --git a/lib/plugins/acl/lang/vi/lang.php b/lib/plugins/acl/lang/vi/lang.php index ddf764dca..4fc3388ff 100644 --- a/lib/plugins/acl/lang/vi/lang.php +++ b/lib/plugins/acl/lang/vi/lang.php @@ -1,44 +1,35 @@ <?php + /** - * vietnamese language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author NukeViet <admin@nukeviet.vn> + * + * @author NukeViet <admin@nukeviet.vn> */ - -$lang['admin_acl'] = 'Quản lý danh sách quyền truy cập'; -$lang['acl_group'] = 'Nhóm'; -$lang['acl_user'] = 'Thành viên'; -$lang['acl_perms'] = 'Cấp phép cho'; -$lang['page'] = 'Trang'; -$lang['namespace'] = 'Thư mục'; - -$lang['btn_select'] = 'Chọn'; - -$lang['p_user_id'] = 'Thành viên <b class="acluser">%s</b> hiện tại được cấp phép cho trang <b class="aclpage">%s</b>: <i>%s</i>.'; -$lang['p_user_ns'] = 'Thành viên <b class="acluser">%s</b> hiện tại được cấp phép cho thư mục <b class="aclns">%s</b>: <i>%s</i>.'; -$lang['p_group_id'] = 'Thành viên trong nhóm <b class="aclgroup">%s</b> hiện tại được cấp phép cho trang <b class="aclpage">%s</b>: <i>%s</i>.'; -$lang['p_group_ns'] = 'Thành viên trong nhóm <b class="aclgroup">%s</b> hiện tại được cấp phép cho thư mục <b class="aclns">%s</b>: <i>%s</i>.'; - -$lang['p_choose_id'] = 'Hãy <b>nhập tên thành viên hoặc nhóm</b> vào ô trên đây để xem hoặc sửa quyền đã thiết đặt cho trang <b class="aclpage">%s</b>.'; -$lang['p_choose_ns'] = 'Hãy <b>nhập tên thành viên hoặc nhóm</b> vào ô trên đây để xem hoặc sửa quyền đã thiết đặt cho thư mục <b class="aclns">%s</b>.'; - - -$lang['p_inherited'] = 'Ghi chú: Có những quyền không được thể hiện ở đây nhưng nó được cấp phép từ những nhóm hoặc thư mục cấp cao.'; -$lang['p_isadmin'] = 'Ghi chú: Nhóm hoặc thành viên này luôn được cấp đủ quyền vì họ là Quản trị tối cao'; -$lang['p_include'] = 'Một số quyền thấp được thể hiện ở mức cao hơn. Quyền tạo, tải lên và xóa chỉ dành cho thư mục, không dành cho trang.'; - -$lang['current'] = 'Danh sách quyền truy cập hiện tại'; -$lang['where'] = 'Trang/Thư mục'; -$lang['who'] = 'Thành viên/Nhóm'; -$lang['perm'] = 'Quyền'; - -$lang['acl_perm0'] = 'Không'; -$lang['acl_perm1'] = 'Đọc'; -$lang['acl_perm2'] = 'Sửa'; -$lang['acl_perm4'] = 'Tạo'; -$lang['acl_perm8'] = 'Tải lên'; -$lang['acl_perm16'] = 'Xóa'; -$lang['acl_new'] = 'Thêm mục mới'; -$lang['acl_mod'] = 'Sửa'; -//Setup VIM: ex: et ts=2 : +$lang['admin_acl'] = 'Quản lý danh sách quyền truy cập'; +$lang['acl_group'] = 'Nhóm'; +$lang['acl_user'] = 'Thành viên'; +$lang['acl_perms'] = 'Cấp phép cho'; +$lang['page'] = 'Trang'; +$lang['namespace'] = 'Thư mục'; +$lang['btn_select'] = 'Chọn'; +$lang['p_user_id'] = 'Thành viên <b class="acluser">%s</b> hiện tại được cấp phép cho trang <b class="aclpage">%s</b>: <i>%s</i>.'; +$lang['p_user_ns'] = 'Thành viên <b class="acluser">%s</b> hiện tại được cấp phép cho thư mục <b class="aclns">%s</b>: <i>%s</i>.'; +$lang['p_group_id'] = 'Thành viên trong nhóm <b class="aclgroup">%s</b> hiện tại được cấp phép cho trang <b class="aclpage">%s</b>: <i>%s</i>.'; +$lang['p_group_ns'] = 'Thành viên trong nhóm <b class="aclgroup">%s</b> hiện tại được cấp phép cho thư mục <b class="aclns">%s</b>: <i>%s</i>.'; +$lang['p_choose_id'] = 'Hãy <b>nhập tên thành viên hoặc nhóm</b> vào ô trên đây để xem hoặc sửa quyền đã thiết đặt cho trang <b class="aclpage">%s</b>.'; +$lang['p_choose_ns'] = 'Hãy <b>nhập tên thành viên hoặc nhóm</b> vào ô trên đây để xem hoặc sửa quyền đã thiết đặt cho thư mục <b class="aclns">%s</b>.'; +$lang['p_inherited'] = 'Ghi chú: Có những quyền không được thể hiện ở đây nhưng nó được cấp phép từ những nhóm hoặc thư mục cấp cao.'; +$lang['p_isadmin'] = 'Ghi chú: Nhóm hoặc thành viên này luôn được cấp đủ quyền vì họ là Quản trị tối cao'; +$lang['p_include'] = 'Một số quyền thấp được thể hiện ở mức cao hơn. Quyền tạo, tải lên và xóa chỉ dành cho thư mục, không dành cho trang.'; +$lang['current'] = 'Danh sách quyền truy cập hiện tại'; +$lang['where'] = 'Trang/Thư mục'; +$lang['who'] = 'Thành viên/Nhóm'; +$lang['perm'] = 'Quyền'; +$lang['acl_perm0'] = 'Không'; +$lang['acl_perm1'] = 'Đọc'; +$lang['acl_perm2'] = 'Sửa'; +$lang['acl_perm4'] = 'Tạo'; +$lang['acl_perm8'] = 'Tải lên'; +$lang['acl_perm16'] = 'Xóa'; +$lang['acl_new'] = 'Thêm mục mới'; +$lang['acl_mod'] = 'Sửa'; diff --git a/lib/plugins/acl/script.js b/lib/plugins/acl/script.js index 0abb80d67..58598b1e0 100644 --- a/lib/plugins/acl/script.js +++ b/lib/plugins/acl/script.js @@ -25,9 +25,10 @@ var dw_acl = { var $frm = jQuery('#acl__detail form'); jQuery.post( - DOKU_BASE + 'lib/plugins/acl/ajax.php', + DOKU_BASE + 'lib/exe/ajax.php', jQuery.extend(dw_acl.parseatt($clicky.parent().find('a')[0].search), - {ajax: 'tree', + {call: 'plugin_acl', + ajax: 'tree', current_ns: $frm.find('input[name=ns]').val(), current_id: $frm.find('input[name=id]').val()}), show_sublist, @@ -64,8 +65,8 @@ var dw_acl = { .attr('role', 'alert') .html('<img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="..." />') .load( - DOKU_BASE + 'lib/plugins/acl/ajax.php', - jQuery('#acl__detail form').serialize() + '&ajax=info' + DOKU_BASE + 'lib/exe/ajax.php', + jQuery('#acl__detail form').serialize() + '&call=plugin_acl&ajax=info' ); return false; }, diff --git a/lib/plugins/action.php b/lib/plugins/action.php index 04b4f07a6..4b5eef60a 100644 --- a/lib/plugins/action.php +++ b/lib/plugins/action.php @@ -17,7 +17,7 @@ class DokuWiki_Action_Plugin extends DokuWiki_Plugin { /** * Registers a callback function for a given event */ - function register(Doku_Event_Handler $controller) { + public function register(Doku_Event_Handler $controller) { trigger_error('register() not implemented in '.get_class($this), E_USER_WARNING); } } diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index dc66d6380..b04735639 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -316,11 +316,11 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * * @author Chris Smith <chris@jalakai.co.uk> * @param int $start index of first user to be returned - * @param int $limit max number of users to be returned + * @param int $limit max number of users to be returned, 0 for unlimited * @param array $filter array of field/pattern pairs, null for no filter * @return array list of userinfo (refer getUserData for internal userinfo details) */ - public function retrieveUsers($start = 0, $limit = -1, $filter = null) { + public function retrieveUsers($start = 0, $limit = 0, $filter = null) { msg("authorisation method does not support mass retrieval of user data", -1); return array(); } diff --git a/lib/plugins/authad/action.php b/lib/plugins/authad/action.php new file mode 100644 index 000000000..97be9897e --- /dev/null +++ b/lib/plugins/authad/action.php @@ -0,0 +1,91 @@ +<?php +/** + * DokuWiki Plugin addomain (Action Component) + * + * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html + * @author Andreas Gohr <gohr@cosmocode.de> + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * Class action_plugin_addomain + */ +class action_plugin_authad extends DokuWiki_Action_Plugin { + + /** + * Registers a callback function for a given event + */ + public function register(Doku_Event_Handler &$controller) { + + $controller->register_hook('AUTH_LOGIN_CHECK', 'BEFORE', $this, 'handle_auth_login_check'); + $controller->register_hook('HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, 'handle_html_loginform_output'); + + } + + /** + * Adds the selected domain as user postfix when attempting a login + * + * @param Doku_Event $event + * @param array $param + */ + public function handle_auth_login_check(Doku_Event &$event, $param) { + global $INPUT; + + /** @var auth_plugin_authad $auth */ + global $auth; + if(!is_a($auth, 'auth_plugin_authad')) return; // AD not even used + + if($INPUT->str('dom')) { + $usr = $auth->cleanUser($event->data['user']); + $dom = $auth->_userDomain($usr); + if(!$dom) { + $usr = "$usr@".$INPUT->str('dom'); + } + $INPUT->post->set('u', $usr); + $event->data['user'] = $usr; + } + } + + /** + * Shows a domain selection in the login form when more than one domain is configured + * + * @param Doku_Event $event + * @param array $param + */ + public function handle_html_loginform_output(Doku_Event &$event, $param) { + global $INPUT; + /** @var auth_plugin_authad $auth */ + global $auth; + if(!is_a($auth, 'auth_plugin_authad')) return; // AD not even used + $domains = $auth->_getConfiguredDomains(); + if(count($domains) <= 1) return; // no choice at all + + /** @var Doku_Form $form */ + $form =& $event->data; + + // any default? + $dom = ''; + if($INPUT->has('u')) { + $usr = $auth->cleanUser($INPUT->str('u')); + $dom = $auth->_userDomain($usr); + + // update user field value + if($dom) { + $usr = $auth->_userName($usr); + $pos = $form->findElementByAttribute('name', 'u'); + $ele =& $form->getElementAt($pos); + $ele['value'] = $usr; + } + } + + // add select box + $element = form_makeListboxField('dom', $domains, $dom, $this->getLang('domain'), '', 'block'); + $pos = $form->findElementByAttribute('name', 'p'); + $form->insertElement($pos + 1, $element); + } + +} + +// vim:ts=4:sw=4:et:
\ No newline at end of file diff --git a/lib/plugins/authad/adLDAP/adLDAP.php b/lib/plugins/authad/adLDAP/adLDAP.php index a8f33b47e..c1f92abe2 100644 --- a/lib/plugins/authad/adLDAP/adLDAP.php +++ b/lib/plugins/authad/adLDAP/adLDAP.php @@ -1,951 +1,951 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 169 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
- */
-
-/**
-* Main adLDAP class
-*
-* Can be initialised using $adldap = new adLDAP();
-*
-* Something to keep in mind is that Active Directory is a permissions
-* based directory. If you bind as a domain user, you can't fetch as
-* much information on other users as you could as a domain admin.
-*
-* Before asking questions, please read the Documentation at
-* http://adldap.sourceforge.net/wiki/doku.php?id=api
-*/
-require_once(dirname(__FILE__) . '/collections/adLDAPCollection.php');
-require_once(dirname(__FILE__) . '/classes/adLDAPGroups.php');
-require_once(dirname(__FILE__) . '/classes/adLDAPUsers.php');
-require_once(dirname(__FILE__) . '/classes/adLDAPFolders.php');
-require_once(dirname(__FILE__) . '/classes/adLDAPUtils.php');
-require_once(dirname(__FILE__) . '/classes/adLDAPContacts.php');
-require_once(dirname(__FILE__) . '/classes/adLDAPExchange.php');
-require_once(dirname(__FILE__) . '/classes/adLDAPComputers.php');
-
-class adLDAP {
-
- /**
- * Define the different types of account in AD
- */
- const ADLDAP_NORMAL_ACCOUNT = 805306368;
- const ADLDAP_WORKSTATION_TRUST = 805306369;
- const ADLDAP_INTERDOMAIN_TRUST = 805306370;
- const ADLDAP_SECURITY_GLOBAL_GROUP = 268435456;
- const ADLDAP_DISTRIBUTION_GROUP = 268435457;
- const ADLDAP_SECURITY_LOCAL_GROUP = 536870912;
- const ADLDAP_DISTRIBUTION_LOCAL_GROUP = 536870913;
- const ADLDAP_FOLDER = 'OU';
- const ADLDAP_CONTAINER = 'CN';
-
- /**
- * The default port for LDAP non-SSL connections
- */
- const ADLDAP_LDAP_PORT = '389';
- /**
- * The default port for LDAPS SSL connections
- */
- const ADLDAP_LDAPS_PORT = '636';
-
- /**
- * The account suffix for your domain, can be set when the class is invoked
- *
- * @var string
- */
- protected $accountSuffix = "@mydomain.local";
-
- /**
- * The base dn for your domain
- *
- * If this is set to null then adLDAP will attempt to obtain this automatically from the rootDSE
- *
- * @var string
- */
- protected $baseDn = "DC=mydomain,DC=local";
-
- /**
- * Port used to talk to the domain controllers.
- *
- * @var int
- */
- protected $adPort = self::ADLDAP_LDAP_PORT;
-
- /**
- * Array of domain controllers. Specifiy multiple controllers if you
- * would like the class to balance the LDAP queries amongst multiple servers
- *
- * @var array
- */
- protected $domainControllers = array("dc01.mydomain.local");
-
- /**
- * Optional account with higher privileges for searching
- * This should be set to a domain admin account
- *
- * @var string
- * @var string
- */
- protected $adminUsername = NULL;
- protected $adminPassword = NULL;
-
- /**
- * AD does not return the primary group. http://support.microsoft.com/?kbid=321360
- * This tweak will resolve the real primary group.
- * Setting to false will fudge "Domain Users" and is much faster. Keep in mind though that if
- * someone's primary group is NOT domain users, this is obviously going to mess up the results
- *
- * @var bool
- */
- protected $realPrimaryGroup = true;
-
- /**
- * Use SSL (LDAPS), your server needs to be setup, please see
- * http://adldap.sourceforge.net/wiki/doku.php?id=ldap_over_ssl
- *
- * @var bool
- */
- protected $useSSL = false;
-
- /**
- * Use TLS
- * If you wish to use TLS you should ensure that $useSSL is set to false and vice-versa
- *
- * @var bool
- */
- protected $useTLS = false;
-
- /**
- * Use SSO
- * To indicate to adLDAP to reuse password set by the brower through NTLM or Kerberos
- *
- * @var bool
- */
- protected $useSSO = false;
-
- /**
- * When querying group memberships, do it recursively
- * eg. User Fred is a member of Group A, which is a member of Group B, which is a member of Group C
- * user_ingroup("Fred","C") will returns true with this option turned on, false if turned off
- *
- * @var bool
- */
- protected $recursiveGroups = true;
-
- // You should not need to edit anything below this line
- //******************************************************************************************
-
- /**
- * Connection and bind default variables
- *
- * @var mixed
- * @var mixed
- */
- protected $ldapConnection;
- protected $ldapBind;
-
- /**
- * Get the active LDAP Connection
- *
- * @return resource
- */
- public function getLdapConnection() {
- if ($this->ldapConnection) {
- return $this->ldapConnection;
- }
- return false;
- }
-
- /**
- * Get the bind status
- *
- * @return bool
- */
- public function getLdapBind() {
- return $this->ldapBind;
- }
-
- /**
- * Get the current base DN
- *
- * @return string
- */
- public function getBaseDn() {
- return $this->baseDn;
- }
-
- /**
- * The group class
- *
- * @var adLDAPGroups
- */
- protected $groupClass;
-
- /**
- * Get the group class interface
- *
- * @return adLDAPGroups
- */
- public function group() {
- if (!$this->groupClass) {
- $this->groupClass = new adLDAPGroups($this);
- }
- return $this->groupClass;
- }
-
- /**
- * The user class
- *
- * @var adLDAPUsers
- */
- protected $userClass;
-
- /**
- * Get the userclass interface
- *
- * @return adLDAPUsers
- */
- public function user() {
- if (!$this->userClass) {
- $this->userClass = new adLDAPUsers($this);
- }
- return $this->userClass;
- }
-
- /**
- * The folders class
- *
- * @var adLDAPFolders
- */
- protected $folderClass;
-
- /**
- * Get the folder class interface
- *
- * @return adLDAPFolders
- */
- public function folder() {
- if (!$this->folderClass) {
- $this->folderClass = new adLDAPFolders($this);
- }
- return $this->folderClass;
- }
-
- /**
- * The utils class
- *
- * @var adLDAPUtils
- */
- protected $utilClass;
-
- /**
- * Get the utils class interface
- *
- * @return adLDAPUtils
- */
- public function utilities() {
- if (!$this->utilClass) {
- $this->utilClass = new adLDAPUtils($this);
- }
- return $this->utilClass;
- }
-
- /**
- * The contacts class
- *
- * @var adLDAPContacts
- */
- protected $contactClass;
-
- /**
- * Get the contacts class interface
- *
- * @return adLDAPContacts
- */
- public function contact() {
- if (!$this->contactClass) {
- $this->contactClass = new adLDAPContacts($this);
- }
- return $this->contactClass;
- }
-
- /**
- * The exchange class
- *
- * @var adLDAPExchange
- */
- protected $exchangeClass;
-
- /**
- * Get the exchange class interface
- *
- * @return adLDAPExchange
- */
- public function exchange() {
- if (!$this->exchangeClass) {
- $this->exchangeClass = new adLDAPExchange($this);
- }
- return $this->exchangeClass;
- }
-
- /**
- * The computers class
- *
- * @var adLDAPComputers
- */
- protected $computersClass;
-
- /**
- * Get the computers class interface
- *
- * @return adLDAPComputers
- */
- public function computer() {
- if (!$this->computerClass) {
- $this->computerClass = new adLDAPComputers($this);
- }
- return $this->computerClass;
- }
-
- /**
- * Getters and Setters
- */
-
- /**
- * Set the account suffix
- *
- * @param string $accountSuffix
- * @return void
- */
- public function setAccountSuffix($accountSuffix)
- {
- $this->accountSuffix = $accountSuffix;
- }
-
- /**
- * Get the account suffix
- *
- * @return string
- */
- public function getAccountSuffix()
- {
- return $this->accountSuffix;
- }
-
- /**
- * Set the domain controllers array
- *
- * @param array $domainControllers
- * @return void
- */
- public function setDomainControllers(array $domainControllers)
- {
- $this->domainControllers = $domainControllers;
- }
-
- /**
- * Get the list of domain controllers
- *
- * @return void
- */
- public function getDomainControllers()
- {
- return $this->domainControllers;
- }
-
- /**
- * Sets the port number your domain controller communicates over
- *
- * @param int $adPort
- */
- public function setPort($adPort)
- {
- $this->adPort = $adPort;
- }
-
- /**
- * Gets the port number your domain controller communicates over
- *
- * @return int
- */
- public function getPort()
- {
- return $this->adPort;
- }
-
- /**
- * Set the username of an account with higher priviledges
- *
- * @param string $adminUsername
- * @return void
- */
- public function setAdminUsername($adminUsername)
- {
- $this->adminUsername = $adminUsername;
- }
-
- /**
- * Get the username of the account with higher priviledges
- *
- * This will throw an exception for security reasons
- */
- public function getAdminUsername()
- {
- throw new adLDAPException('For security reasons you cannot access the domain administrator account details');
- }
-
- /**
- * Set the password of an account with higher priviledges
- *
- * @param string $adminPassword
- * @return void
- */
- public function setAdminPassword($adminPassword)
- {
- $this->adminPassword = $adminPassword;
- }
-
- /**
- * Get the password of the account with higher priviledges
- *
- * This will throw an exception for security reasons
- */
- public function getAdminPassword()
- {
- throw new adLDAPException('For security reasons you cannot access the domain administrator account details');
- }
-
- /**
- * Set whether to detect the true primary group
- *
- * @param bool $realPrimaryGroup
- * @return void
- */
- public function setRealPrimaryGroup($realPrimaryGroup)
- {
- $this->realPrimaryGroup = $realPrimaryGroup;
- }
-
- /**
- * Get the real primary group setting
- *
- * @return bool
- */
- public function getRealPrimaryGroup()
- {
- return $this->realPrimaryGroup;
- }
-
- /**
- * Set whether to use SSL
- *
- * @param bool $useSSL
- * @return void
- */
- public function setUseSSL($useSSL)
- {
- $this->useSSL = $useSSL;
- // Set the default port correctly
- if($this->useSSL) {
- $this->setPort(self::ADLDAP_LDAPS_PORT);
- }
- else {
- $this->setPort(self::ADLDAP_LDAP_PORT);
- }
- }
-
- /**
- * Get the SSL setting
- *
- * @return bool
- */
- public function getUseSSL()
- {
- return $this->useSSL;
- }
-
- /**
- * Set whether to use TLS
- *
- * @param bool $useTLS
- * @return void
- */
- public function setUseTLS($useTLS)
- {
- $this->useTLS = $useTLS;
- }
-
- /**
- * Get the TLS setting
- *
- * @return bool
- */
- public function getUseTLS()
- {
- return $this->useTLS;
- }
-
- /**
- * Set whether to use SSO
- * Requires ldap_sasl_bind support. Be sure --with-ldap-sasl is used when configuring PHP otherwise this function will be undefined.
- *
- * @param bool $useSSO
- * @return void
- */
- public function setUseSSO($useSSO)
- {
- if ($useSSO === true && !$this->ldapSaslSupported()) {
- throw new adLDAPException('No LDAP SASL support for PHP. See: http://www.php.net/ldap_sasl_bind');
- }
- $this->useSSO = $useSSO;
- }
-
- /**
- * Get the SSO setting
- *
- * @return bool
- */
- public function getUseSSO()
- {
- return $this->useSSO;
- }
-
- /**
- * Set whether to lookup recursive groups
- *
- * @param bool $recursiveGroups
- * @return void
- */
- public function setRecursiveGroups($recursiveGroups)
- {
- $this->recursiveGroups = $recursiveGroups;
- }
-
- /**
- * Get the recursive groups setting
- *
- * @return bool
- */
- public function getRecursiveGroups()
- {
- return $this->recursiveGroups;
- }
-
- /**
- * Default Constructor
- *
- * Tries to bind to the AD domain over LDAP or LDAPs
- *
- * @param array $options Array of options to pass to the constructor
- * @throws Exception - if unable to bind to Domain Controller
- * @return bool
- */
- function __construct($options = array()) {
- // You can specifically overide any of the default configuration options setup above
- if (count($options) > 0) {
- if (array_key_exists("account_suffix",$options)){ $this->accountSuffix = $options["account_suffix"]; }
- if (array_key_exists("base_dn",$options)){ $this->baseDn = $options["base_dn"]; }
- if (array_key_exists("domain_controllers",$options)){
- if (!is_array($options["domain_controllers"])) {
- throw new adLDAPException('[domain_controllers] option must be an array');
- }
- $this->domainControllers = $options["domain_controllers"];
- }
- if (array_key_exists("admin_username",$options)){ $this->adminUsername = $options["admin_username"]; }
- if (array_key_exists("admin_password",$options)){ $this->adminPassword = $options["admin_password"]; }
- if (array_key_exists("real_primarygroup",$options)){ $this->realPrimaryGroup = $options["real_primarygroup"]; }
- if (array_key_exists("use_ssl",$options)){ $this->setUseSSL($options["use_ssl"]); }
- if (array_key_exists("use_tls",$options)){ $this->useTLS = $options["use_tls"]; }
- if (array_key_exists("recursive_groups",$options)){ $this->recursiveGroups = $options["recursive_groups"]; }
- if (array_key_exists("ad_port",$options)){ $this->setPort($options["ad_port"]); }
- if (array_key_exists("sso",$options)) {
- $this->setUseSSO($options["sso"]);
- if (!$this->ldapSaslSupported()) {
- $this->setUseSSO(false);
- }
- }
- }
-
- if ($this->ldapSupported() === false) {
- throw new adLDAPException('No LDAP support for PHP. See: http://www.php.net/ldap');
- }
-
- return $this->connect();
- }
-
- /**
- * Default Destructor
- *
- * Closes the LDAP connection
- *
- * @return void
- */
- function __destruct() {
- $this->close();
- }
-
- /**
- * Connects and Binds to the Domain Controller
- *
- * @return bool
- */
- public function connect()
- {
- // Connect to the AD/LDAP server as the username/password
- $domainController = $this->randomController();
- if ($this->useSSL) {
- $this->ldapConnection = ldap_connect("ldaps://" . $domainController, $this->adPort);
- } else {
- $this->ldapConnection = ldap_connect($domainController, $this->adPort);
- }
-
- // Set some ldap options for talking to AD
- ldap_set_option($this->ldapConnection, LDAP_OPT_PROTOCOL_VERSION, 3);
- ldap_set_option($this->ldapConnection, LDAP_OPT_REFERRALS, 0);
-
- if ($this->useTLS) {
- ldap_start_tls($this->ldapConnection);
- }
-
- // Bind as a domain admin if they've set it up
- if ($this->adminUsername !== NULL && $this->adminPassword !== NULL) {
- $this->ldapBind = @ldap_bind($this->ldapConnection, $this->adminUsername . $this->accountSuffix, $this->adminPassword);
- if (!$this->ldapBind) {
- if ($this->useSSL && !$this->useTLS) {
- // If you have problems troubleshooting, remove the @ character from the ldapldapBind command above to get the actual error message
- throw new adLDAPException('Bind to Active Directory failed. Either the LDAPs connection failed or the login credentials are incorrect. AD said: ' . $this->getLastError());
- }
- else {
- throw new adLDAPException('Bind to Active Directory failed. Check the login credentials and/or server details. AD said: ' . $this->getLastError());
- }
- }
- }
- if ($this->useSSO && $_SERVER['REMOTE_USER'] && $this->adminUsername === null && $_SERVER['KRB5CCNAME']) {
- putenv("KRB5CCNAME=" . $_SERVER['KRB5CCNAME']);
- $this->ldapBind = @ldap_sasl_bind($this->ldapConnection, NULL, NULL, "GSSAPI");
- if (!$this->ldapBind){
- throw new adLDAPException('Rebind to Active Directory failed. AD said: ' . $this->getLastError());
- }
- else {
- return true;
- }
- }
-
-
- if ($this->baseDn == NULL) {
- $this->baseDn = $this->findBaseDn();
- }
-
- return true;
- }
-
- /**
- * Closes the LDAP connection
- *
- * @return void
- */
- public function close() {
- if ($this->ldapConnection) {
- @ldap_close($this->ldapConnection);
- }
- }
-
- /**
- * Validate a user's login credentials
- *
- * @param string $username A user's AD username
- * @param string $password A user's AD password
- * @param bool optional $preventRebind
- * @return bool
- */
- public function authenticate($username, $password, $preventRebind = false) {
- // Prevent null binding
- if ($username === NULL || $password === NULL) { return false; }
- if (empty($username) || empty($password)) { return false; }
-
- // Allow binding over SSO for Kerberos
- if ($this->useSSO && $_SERVER['REMOTE_USER'] && $_SERVER['REMOTE_USER'] == $username && $this->adminUsername === NULL && $_SERVER['KRB5CCNAME']) {
- putenv("KRB5CCNAME=" . $_SERVER['KRB5CCNAME']);
- $this->ldapBind = @ldap_sasl_bind($this->ldapConnection, NULL, NULL, "GSSAPI");
- if (!$this->ldapBind) {
- throw new adLDAPException('Rebind to Active Directory failed. AD said: ' . $this->getLastError());
- }
- else {
- return true;
- }
- }
-
- // Bind as the user
- $ret = true;
- $this->ldapBind = @ldap_bind($this->ldapConnection, $username . $this->accountSuffix, $password);
- if (!$this->ldapBind){
- $ret = false;
- }
-
- // Cnce we've checked their details, kick back into admin mode if we have it
- if ($this->adminUsername !== NULL && !$preventRebind) {
- $this->ldapBind = @ldap_bind($this->ldapConnection, $this->adminUsername . $this->accountSuffix , $this->adminPassword);
- if (!$this->ldapBind){
- // This should never happen in theory
- throw new adLDAPException('Rebind to Active Directory failed. AD said: ' . $this->getLastError());
- }
- }
-
- return $ret;
- }
-
- /**
- * Find the Base DN of your domain controller
- *
- * @return string
- */
- public function findBaseDn()
- {
- $namingContext = $this->getRootDse(array('defaultnamingcontext'));
- return $namingContext[0]['defaultnamingcontext'][0];
- }
-
- /**
- * Get the RootDSE properties from a domain controller
- *
- * @param array $attributes The attributes you wish to query e.g. defaultnamingcontext
- * @return array
- */
- public function getRootDse($attributes = array("*", "+")) {
- if (!$this->ldapBind){ return (false); }
-
- $sr = @ldap_read($this->ldapConnection, NULL, 'objectClass=*', $attributes);
- $entries = @ldap_get_entries($this->ldapConnection, $sr);
- return $entries;
- }
-
- /**
- * Get last error from Active Directory
- *
- * This function gets the last message from Active Directory
- * This may indeed be a 'Success' message but if you get an unknown error
- * it might be worth calling this function to see what errors were raised
- *
- * return string
- */
- public function getLastError() {
- return @ldap_error($this->ldapConnection);
- }
-
- /**
- * Detect LDAP support in php
- *
- * @return bool
- */
- protected function ldapSupported()
- {
- if (!function_exists('ldap_connect')) {
- return false;
- }
- return true;
- }
-
- /**
- * Detect ldap_sasl_bind support in PHP
- *
- * @return bool
- */
- protected function ldapSaslSupported()
- {
- if (!function_exists('ldap_sasl_bind')) {
- return false;
- }
- return true;
- }
-
- /**
- * Schema
- *
- * @param array $attributes Attributes to be queried
- * @return array
- */
- public function adldap_schema($attributes){
-
- // LDAP doesn't like NULL attributes, only set them if they have values
- // If you wish to remove an attribute you should set it to a space
- // TO DO: Adapt user_modify to use ldap_mod_delete to remove a NULL attribute
- $mod=array();
-
- // Check every attribute to see if it contains 8bit characters and then UTF8 encode them
- array_walk($attributes, array($this, 'encode8bit'));
-
- if ($attributes["address_city"]){ $mod["l"][0]=$attributes["address_city"]; }
- if ($attributes["address_code"]){ $mod["postalCode"][0]=$attributes["address_code"]; }
- //if ($attributes["address_country"]){ $mod["countryCode"][0]=$attributes["address_country"]; } // use country codes?
- if ($attributes["address_country"]){ $mod["c"][0]=$attributes["address_country"]; }
- if ($attributes["address_pobox"]){ $mod["postOfficeBox"][0]=$attributes["address_pobox"]; }
- if ($attributes["address_state"]){ $mod["st"][0]=$attributes["address_state"]; }
- if ($attributes["address_street"]){ $mod["streetAddress"][0]=$attributes["address_street"]; }
- if ($attributes["company"]){ $mod["company"][0]=$attributes["company"]; }
- if ($attributes["change_password"]){ $mod["pwdLastSet"][0]=0; }
- if ($attributes["department"]){ $mod["department"][0]=$attributes["department"]; }
- if ($attributes["description"]){ $mod["description"][0]=$attributes["description"]; }
- if ($attributes["display_name"]){ $mod["displayName"][0]=$attributes["display_name"]; }
- if ($attributes["email"]){ $mod["mail"][0]=$attributes["email"]; }
- if ($attributes["expires"]){ $mod["accountExpires"][0]=$attributes["expires"]; } //unix epoch format?
- if ($attributes["firstname"]){ $mod["givenName"][0]=$attributes["firstname"]; }
- if ($attributes["home_directory"]){ $mod["homeDirectory"][0]=$attributes["home_directory"]; }
- if ($attributes["home_drive"]){ $mod["homeDrive"][0]=$attributes["home_drive"]; }
- if ($attributes["initials"]){ $mod["initials"][0]=$attributes["initials"]; }
- if ($attributes["logon_name"]){ $mod["userPrincipalName"][0]=$attributes["logon_name"]; }
- if ($attributes["manager"]){ $mod["manager"][0]=$attributes["manager"]; } //UNTESTED ***Use DistinguishedName***
- if ($attributes["office"]){ $mod["physicalDeliveryOfficeName"][0]=$attributes["office"]; }
- if ($attributes["password"]){ $mod["unicodePwd"][0]=$this->user()->encodePassword($attributes["password"]); }
- if ($attributes["profile_path"]){ $mod["profilepath"][0]=$attributes["profile_path"]; }
- if ($attributes["script_path"]){ $mod["scriptPath"][0]=$attributes["script_path"]; }
- if ($attributes["surname"]){ $mod["sn"][0]=$attributes["surname"]; }
- if ($attributes["title"]){ $mod["title"][0]=$attributes["title"]; }
- if ($attributes["telephone"]){ $mod["telephoneNumber"][0]=$attributes["telephone"]; }
- if ($attributes["mobile"]){ $mod["mobile"][0]=$attributes["mobile"]; }
- if ($attributes["pager"]){ $mod["pager"][0]=$attributes["pager"]; }
- if ($attributes["ipphone"]){ $mod["ipphone"][0]=$attributes["ipphone"]; }
- if ($attributes["web_page"]){ $mod["wWWHomePage"][0]=$attributes["web_page"]; }
- if ($attributes["fax"]){ $mod["facsimileTelephoneNumber"][0]=$attributes["fax"]; }
- if ($attributes["enabled"]){ $mod["userAccountControl"][0]=$attributes["enabled"]; }
- if ($attributes["homephone"]){ $mod["homephone"][0]=$attributes["homephone"]; }
-
- // Distribution List specific schema
- if ($attributes["group_sendpermission"]){ $mod["dlMemSubmitPerms"][0]=$attributes["group_sendpermission"]; }
- if ($attributes["group_rejectpermission"]){ $mod["dlMemRejectPerms"][0]=$attributes["group_rejectpermission"]; }
-
- // Exchange Schema
- if ($attributes["exchange_homemdb"]){ $mod["homeMDB"][0]=$attributes["exchange_homemdb"]; }
- if ($attributes["exchange_mailnickname"]){ $mod["mailNickname"][0]=$attributes["exchange_mailnickname"]; }
- if ($attributes["exchange_proxyaddress"]){ $mod["proxyAddresses"][0]=$attributes["exchange_proxyaddress"]; }
- if ($attributes["exchange_usedefaults"]){ $mod["mDBUseDefaults"][0]=$attributes["exchange_usedefaults"]; }
- if ($attributes["exchange_policyexclude"]){ $mod["msExchPoliciesExcluded"][0]=$attributes["exchange_policyexclude"]; }
- if ($attributes["exchange_policyinclude"]){ $mod["msExchPoliciesIncluded"][0]=$attributes["exchange_policyinclude"]; }
- if ($attributes["exchange_addressbook"]){ $mod["showInAddressBook"][0]=$attributes["exchange_addressbook"]; }
- if ($attributes["exchange_altrecipient"]){ $mod["altRecipient"][0]=$attributes["exchange_altrecipient"]; }
- if ($attributes["exchange_deliverandredirect"]){ $mod["deliverAndRedirect"][0]=$attributes["exchange_deliverandredirect"]; }
-
- // This schema is designed for contacts
- if ($attributes["exchange_hidefromlists"]){ $mod["msExchHideFromAddressLists"][0]=$attributes["exchange_hidefromlists"]; }
- if ($attributes["contact_email"]){ $mod["targetAddress"][0]=$attributes["contact_email"]; }
-
- //echo ("<pre>"); print_r($mod);
- /*
- // modifying a name is a bit fiddly
- if ($attributes["firstname"] && $attributes["surname"]){
- $mod["cn"][0]=$attributes["firstname"]." ".$attributes["surname"];
- $mod["displayname"][0]=$attributes["firstname"]." ".$attributes["surname"];
- $mod["name"][0]=$attributes["firstname"]." ".$attributes["surname"];
- }
- */
-
- if (count($mod)==0){ return (false); }
- return ($mod);
- }
-
- /**
- * Convert 8bit characters e.g. accented characters to UTF8 encoded characters
- */
- protected function encode8Bit(&$item, $key) {
- $encode = false;
- if (is_string($item)) {
- for ($i=0; $i<strlen($item); $i++) {
- if (ord($item[$i]) >> 7) {
- $encode = true;
- }
- }
- }
- if ($encode === true && $key != 'password') {
- $item = utf8_encode($item);
- }
- }
-
- /**
- * Select a random domain controller from your domain controller array
- *
- * @return string
- */
- protected function randomController()
- {
- mt_srand(doubleval(microtime()) * 100000000); // For older PHP versions
- /*if (sizeof($this->domainControllers) > 1) {
- $adController = $this->domainControllers[array_rand($this->domainControllers)];
- // Test if the controller is responding to pings
- $ping = $this->pingController($adController);
- if ($ping === false) {
- // Find the current key in the domain controllers array
- $key = array_search($adController, $this->domainControllers);
- // Remove it so that we don't end up in a recursive loop
- unset($this->domainControllers[$key]);
- // Select a new controller
- return $this->randomController();
- }
- else {
- return ($adController);
- }
- } */
- return $this->domainControllers[array_rand($this->domainControllers)];
- }
-
- /**
- * Test basic connectivity to controller
- *
- * @return bool
- */
- protected function pingController($host) {
- $port = $this->adPort;
- fsockopen($host, $port, $errno, $errstr, 10);
- if ($errno > 0) {
- return false;
- }
- return true;
- }
-
-}
-
-/**
-* adLDAP Exception Handler
-*
-* Exceptions of this type are thrown on bind failure or when SSL is required but not configured
-* Example:
-* try {
-* $adldap = new adLDAP();
-* }
-* catch (adLDAPException $e) {
-* echo $e;
-* exit();
-* }
-*/
-class adLDAPException extends Exception {}
-
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 169 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ + */ + +/** +* Main adLDAP class +* +* Can be initialised using $adldap = new adLDAP(); +* +* Something to keep in mind is that Active Directory is a permissions +* based directory. If you bind as a domain user, you can't fetch as +* much information on other users as you could as a domain admin. +* +* Before asking questions, please read the Documentation at +* http://adldap.sourceforge.net/wiki/doku.php?id=api +*/ +require_once(dirname(__FILE__) . '/collections/adLDAPCollection.php'); +require_once(dirname(__FILE__) . '/classes/adLDAPGroups.php'); +require_once(dirname(__FILE__) . '/classes/adLDAPUsers.php'); +require_once(dirname(__FILE__) . '/classes/adLDAPFolders.php'); +require_once(dirname(__FILE__) . '/classes/adLDAPUtils.php'); +require_once(dirname(__FILE__) . '/classes/adLDAPContacts.php'); +require_once(dirname(__FILE__) . '/classes/adLDAPExchange.php'); +require_once(dirname(__FILE__) . '/classes/adLDAPComputers.php'); + +class adLDAP { + + /** + * Define the different types of account in AD + */ + const ADLDAP_NORMAL_ACCOUNT = 805306368; + const ADLDAP_WORKSTATION_TRUST = 805306369; + const ADLDAP_INTERDOMAIN_TRUST = 805306370; + const ADLDAP_SECURITY_GLOBAL_GROUP = 268435456; + const ADLDAP_DISTRIBUTION_GROUP = 268435457; + const ADLDAP_SECURITY_LOCAL_GROUP = 536870912; + const ADLDAP_DISTRIBUTION_LOCAL_GROUP = 536870913; + const ADLDAP_FOLDER = 'OU'; + const ADLDAP_CONTAINER = 'CN'; + + /** + * The default port for LDAP non-SSL connections + */ + const ADLDAP_LDAP_PORT = '389'; + /** + * The default port for LDAPS SSL connections + */ + const ADLDAP_LDAPS_PORT = '636'; + + /** + * The account suffix for your domain, can be set when the class is invoked + * + * @var string + */ + protected $accountSuffix = "@mydomain.local"; + + /** + * The base dn for your domain + * + * If this is set to null then adLDAP will attempt to obtain this automatically from the rootDSE + * + * @var string + */ + protected $baseDn = "DC=mydomain,DC=local"; + + /** + * Port used to talk to the domain controllers. + * + * @var int + */ + protected $adPort = self::ADLDAP_LDAP_PORT; + + /** + * Array of domain controllers. Specifiy multiple controllers if you + * would like the class to balance the LDAP queries amongst multiple servers + * + * @var array + */ + protected $domainControllers = array("dc01.mydomain.local"); + + /** + * Optional account with higher privileges for searching + * This should be set to a domain admin account + * + * @var string + * @var string + */ + protected $adminUsername = NULL; + protected $adminPassword = NULL; + + /** + * AD does not return the primary group. http://support.microsoft.com/?kbid=321360 + * This tweak will resolve the real primary group. + * Setting to false will fudge "Domain Users" and is much faster. Keep in mind though that if + * someone's primary group is NOT domain users, this is obviously going to mess up the results + * + * @var bool + */ + protected $realPrimaryGroup = true; + + /** + * Use SSL (LDAPS), your server needs to be setup, please see + * http://adldap.sourceforge.net/wiki/doku.php?id=ldap_over_ssl + * + * @var bool + */ + protected $useSSL = false; + + /** + * Use TLS + * If you wish to use TLS you should ensure that $useSSL is set to false and vice-versa + * + * @var bool + */ + protected $useTLS = false; + + /** + * Use SSO + * To indicate to adLDAP to reuse password set by the brower through NTLM or Kerberos + * + * @var bool + */ + protected $useSSO = false; + + /** + * When querying group memberships, do it recursively + * eg. User Fred is a member of Group A, which is a member of Group B, which is a member of Group C + * user_ingroup("Fred","C") will returns true with this option turned on, false if turned off + * + * @var bool + */ + protected $recursiveGroups = true; + + // You should not need to edit anything below this line + //****************************************************************************************** + + /** + * Connection and bind default variables + * + * @var mixed + * @var mixed + */ + protected $ldapConnection; + protected $ldapBind; + + /** + * Get the active LDAP Connection + * + * @return resource + */ + public function getLdapConnection() { + if ($this->ldapConnection) { + return $this->ldapConnection; + } + return false; + } + + /** + * Get the bind status + * + * @return bool + */ + public function getLdapBind() { + return $this->ldapBind; + } + + /** + * Get the current base DN + * + * @return string + */ + public function getBaseDn() { + return $this->baseDn; + } + + /** + * The group class + * + * @var adLDAPGroups + */ + protected $groupClass; + + /** + * Get the group class interface + * + * @return adLDAPGroups + */ + public function group() { + if (!$this->groupClass) { + $this->groupClass = new adLDAPGroups($this); + } + return $this->groupClass; + } + + /** + * The user class + * + * @var adLDAPUsers + */ + protected $userClass; + + /** + * Get the userclass interface + * + * @return adLDAPUsers + */ + public function user() { + if (!$this->userClass) { + $this->userClass = new adLDAPUsers($this); + } + return $this->userClass; + } + + /** + * The folders class + * + * @var adLDAPFolders + */ + protected $folderClass; + + /** + * Get the folder class interface + * + * @return adLDAPFolders + */ + public function folder() { + if (!$this->folderClass) { + $this->folderClass = new adLDAPFolders($this); + } + return $this->folderClass; + } + + /** + * The utils class + * + * @var adLDAPUtils + */ + protected $utilClass; + + /** + * Get the utils class interface + * + * @return adLDAPUtils + */ + public function utilities() { + if (!$this->utilClass) { + $this->utilClass = new adLDAPUtils($this); + } + return $this->utilClass; + } + + /** + * The contacts class + * + * @var adLDAPContacts + */ + protected $contactClass; + + /** + * Get the contacts class interface + * + * @return adLDAPContacts + */ + public function contact() { + if (!$this->contactClass) { + $this->contactClass = new adLDAPContacts($this); + } + return $this->contactClass; + } + + /** + * The exchange class + * + * @var adLDAPExchange + */ + protected $exchangeClass; + + /** + * Get the exchange class interface + * + * @return adLDAPExchange + */ + public function exchange() { + if (!$this->exchangeClass) { + $this->exchangeClass = new adLDAPExchange($this); + } + return $this->exchangeClass; + } + + /** + * The computers class + * + * @var adLDAPComputers + */ + protected $computersClass; + + /** + * Get the computers class interface + * + * @return adLDAPComputers + */ + public function computer() { + if (!$this->computerClass) { + $this->computerClass = new adLDAPComputers($this); + } + return $this->computerClass; + } + + /** + * Getters and Setters + */ + + /** + * Set the account suffix + * + * @param string $accountSuffix + * @return void + */ + public function setAccountSuffix($accountSuffix) + { + $this->accountSuffix = $accountSuffix; + } + + /** + * Get the account suffix + * + * @return string + */ + public function getAccountSuffix() + { + return $this->accountSuffix; + } + + /** + * Set the domain controllers array + * + * @param array $domainControllers + * @return void + */ + public function setDomainControllers(array $domainControllers) + { + $this->domainControllers = $domainControllers; + } + + /** + * Get the list of domain controllers + * + * @return void + */ + public function getDomainControllers() + { + return $this->domainControllers; + } + + /** + * Sets the port number your domain controller communicates over + * + * @param int $adPort + */ + public function setPort($adPort) + { + $this->adPort = $adPort; + } + + /** + * Gets the port number your domain controller communicates over + * + * @return int + */ + public function getPort() + { + return $this->adPort; + } + + /** + * Set the username of an account with higher priviledges + * + * @param string $adminUsername + * @return void + */ + public function setAdminUsername($adminUsername) + { + $this->adminUsername = $adminUsername; + } + + /** + * Get the username of the account with higher priviledges + * + * This will throw an exception for security reasons + */ + public function getAdminUsername() + { + throw new adLDAPException('For security reasons you cannot access the domain administrator account details'); + } + + /** + * Set the password of an account with higher priviledges + * + * @param string $adminPassword + * @return void + */ + public function setAdminPassword($adminPassword) + { + $this->adminPassword = $adminPassword; + } + + /** + * Get the password of the account with higher priviledges + * + * This will throw an exception for security reasons + */ + public function getAdminPassword() + { + throw new adLDAPException('For security reasons you cannot access the domain administrator account details'); + } + + /** + * Set whether to detect the true primary group + * + * @param bool $realPrimaryGroup + * @return void + */ + public function setRealPrimaryGroup($realPrimaryGroup) + { + $this->realPrimaryGroup = $realPrimaryGroup; + } + + /** + * Get the real primary group setting + * + * @return bool + */ + public function getRealPrimaryGroup() + { + return $this->realPrimaryGroup; + } + + /** + * Set whether to use SSL + * + * @param bool $useSSL + * @return void + */ + public function setUseSSL($useSSL) + { + $this->useSSL = $useSSL; + // Set the default port correctly + if($this->useSSL) { + $this->setPort(self::ADLDAP_LDAPS_PORT); + } + else { + $this->setPort(self::ADLDAP_LDAP_PORT); + } + } + + /** + * Get the SSL setting + * + * @return bool + */ + public function getUseSSL() + { + return $this->useSSL; + } + + /** + * Set whether to use TLS + * + * @param bool $useTLS + * @return void + */ + public function setUseTLS($useTLS) + { + $this->useTLS = $useTLS; + } + + /** + * Get the TLS setting + * + * @return bool + */ + public function getUseTLS() + { + return $this->useTLS; + } + + /** + * Set whether to use SSO + * Requires ldap_sasl_bind support. Be sure --with-ldap-sasl is used when configuring PHP otherwise this function will be undefined. + * + * @param bool $useSSO + * @return void + */ + public function setUseSSO($useSSO) + { + if ($useSSO === true && !$this->ldapSaslSupported()) { + throw new adLDAPException('No LDAP SASL support for PHP. See: http://www.php.net/ldap_sasl_bind'); + } + $this->useSSO = $useSSO; + } + + /** + * Get the SSO setting + * + * @return bool + */ + public function getUseSSO() + { + return $this->useSSO; + } + + /** + * Set whether to lookup recursive groups + * + * @param bool $recursiveGroups + * @return void + */ + public function setRecursiveGroups($recursiveGroups) + { + $this->recursiveGroups = $recursiveGroups; + } + + /** + * Get the recursive groups setting + * + * @return bool + */ + public function getRecursiveGroups() + { + return $this->recursiveGroups; + } + + /** + * Default Constructor + * + * Tries to bind to the AD domain over LDAP or LDAPs + * + * @param array $options Array of options to pass to the constructor + * @throws Exception - if unable to bind to Domain Controller + * @return bool + */ + function __construct($options = array()) { + // You can specifically overide any of the default configuration options setup above + if (count($options) > 0) { + if (array_key_exists("account_suffix",$options)){ $this->accountSuffix = $options["account_suffix"]; } + if (array_key_exists("base_dn",$options)){ $this->baseDn = $options["base_dn"]; } + if (array_key_exists("domain_controllers",$options)){ + if (!is_array($options["domain_controllers"])) { + throw new adLDAPException('[domain_controllers] option must be an array'); + } + $this->domainControllers = $options["domain_controllers"]; + } + if (array_key_exists("admin_username",$options)){ $this->adminUsername = $options["admin_username"]; } + if (array_key_exists("admin_password",$options)){ $this->adminPassword = $options["admin_password"]; } + if (array_key_exists("real_primarygroup",$options)){ $this->realPrimaryGroup = $options["real_primarygroup"]; } + if (array_key_exists("use_ssl",$options)){ $this->setUseSSL($options["use_ssl"]); } + if (array_key_exists("use_tls",$options)){ $this->useTLS = $options["use_tls"]; } + if (array_key_exists("recursive_groups",$options)){ $this->recursiveGroups = $options["recursive_groups"]; } + if (array_key_exists("ad_port",$options)){ $this->setPort($options["ad_port"]); } + if (array_key_exists("sso",$options)) { + $this->setUseSSO($options["sso"]); + if (!$this->ldapSaslSupported()) { + $this->setUseSSO(false); + } + } + } + + if ($this->ldapSupported() === false) { + throw new adLDAPException('No LDAP support for PHP. See: http://www.php.net/ldap'); + } + + return $this->connect(); + } + + /** + * Default Destructor + * + * Closes the LDAP connection + * + * @return void + */ + function __destruct() { + $this->close(); + } + + /** + * Connects and Binds to the Domain Controller + * + * @return bool + */ + public function connect() + { + // Connect to the AD/LDAP server as the username/password + $domainController = $this->randomController(); + if ($this->useSSL) { + $this->ldapConnection = ldap_connect("ldaps://" . $domainController, $this->adPort); + } else { + $this->ldapConnection = ldap_connect($domainController, $this->adPort); + } + + // Set some ldap options for talking to AD + ldap_set_option($this->ldapConnection, LDAP_OPT_PROTOCOL_VERSION, 3); + ldap_set_option($this->ldapConnection, LDAP_OPT_REFERRALS, 0); + + if ($this->useTLS) { + ldap_start_tls($this->ldapConnection); + } + + // Bind as a domain admin if they've set it up + if ($this->adminUsername !== NULL && $this->adminPassword !== NULL) { + $this->ldapBind = @ldap_bind($this->ldapConnection, $this->adminUsername . $this->accountSuffix, $this->adminPassword); + if (!$this->ldapBind) { + if ($this->useSSL && !$this->useTLS) { + // If you have problems troubleshooting, remove the @ character from the ldapldapBind command above to get the actual error message + throw new adLDAPException('Bind to Active Directory failed. Either the LDAPs connection failed or the login credentials are incorrect. AD said: ' . $this->getLastError()); + } + else { + throw new adLDAPException('Bind to Active Directory failed. Check the login credentials and/or server details. AD said: ' . $this->getLastError()); + } + } + } + if ($this->useSSO && $_SERVER['REMOTE_USER'] && $this->adminUsername === null && $_SERVER['KRB5CCNAME']) { + putenv("KRB5CCNAME=" . $_SERVER['KRB5CCNAME']); + $this->ldapBind = @ldap_sasl_bind($this->ldapConnection, NULL, NULL, "GSSAPI"); + if (!$this->ldapBind){ + throw new adLDAPException('Rebind to Active Directory failed. AD said: ' . $this->getLastError()); + } + else { + return true; + } + } + + + if ($this->baseDn == NULL) { + $this->baseDn = $this->findBaseDn(); + } + + return true; + } + + /** + * Closes the LDAP connection + * + * @return void + */ + public function close() { + if ($this->ldapConnection) { + @ldap_close($this->ldapConnection); + } + } + + /** + * Validate a user's login credentials + * + * @param string $username A user's AD username + * @param string $password A user's AD password + * @param bool optional $preventRebind + * @return bool + */ + public function authenticate($username, $password, $preventRebind = false) { + // Prevent null binding + if ($username === NULL || $password === NULL) { return false; } + if (empty($username) || empty($password)) { return false; } + + // Allow binding over SSO for Kerberos + if ($this->useSSO && $_SERVER['REMOTE_USER'] && $_SERVER['REMOTE_USER'] == $username && $this->adminUsername === NULL && $_SERVER['KRB5CCNAME']) { + putenv("KRB5CCNAME=" . $_SERVER['KRB5CCNAME']); + $this->ldapBind = @ldap_sasl_bind($this->ldapConnection, NULL, NULL, "GSSAPI"); + if (!$this->ldapBind) { + throw new adLDAPException('Rebind to Active Directory failed. AD said: ' . $this->getLastError()); + } + else { + return true; + } + } + + // Bind as the user + $ret = true; + $this->ldapBind = @ldap_bind($this->ldapConnection, $username . $this->accountSuffix, $password); + if (!$this->ldapBind){ + $ret = false; + } + + // Cnce we've checked their details, kick back into admin mode if we have it + if ($this->adminUsername !== NULL && !$preventRebind) { + $this->ldapBind = @ldap_bind($this->ldapConnection, $this->adminUsername . $this->accountSuffix , $this->adminPassword); + if (!$this->ldapBind){ + // This should never happen in theory + throw new adLDAPException('Rebind to Active Directory failed. AD said: ' . $this->getLastError()); + } + } + + return $ret; + } + + /** + * Find the Base DN of your domain controller + * + * @return string + */ + public function findBaseDn() + { + $namingContext = $this->getRootDse(array('defaultnamingcontext')); + return $namingContext[0]['defaultnamingcontext'][0]; + } + + /** + * Get the RootDSE properties from a domain controller + * + * @param array $attributes The attributes you wish to query e.g. defaultnamingcontext + * @return array + */ + public function getRootDse($attributes = array("*", "+")) { + if (!$this->ldapBind){ return (false); } + + $sr = @ldap_read($this->ldapConnection, NULL, 'objectClass=*', $attributes); + $entries = @ldap_get_entries($this->ldapConnection, $sr); + return $entries; + } + + /** + * Get last error from Active Directory + * + * This function gets the last message from Active Directory + * This may indeed be a 'Success' message but if you get an unknown error + * it might be worth calling this function to see what errors were raised + * + * return string + */ + public function getLastError() { + return @ldap_error($this->ldapConnection); + } + + /** + * Detect LDAP support in php + * + * @return bool + */ + protected function ldapSupported() + { + if (!function_exists('ldap_connect')) { + return false; + } + return true; + } + + /** + * Detect ldap_sasl_bind support in PHP + * + * @return bool + */ + protected function ldapSaslSupported() + { + if (!function_exists('ldap_sasl_bind')) { + return false; + } + return true; + } + + /** + * Schema + * + * @param array $attributes Attributes to be queried + * @return array + */ + public function adldap_schema($attributes){ + + // LDAP doesn't like NULL attributes, only set them if they have values + // If you wish to remove an attribute you should set it to a space + // TO DO: Adapt user_modify to use ldap_mod_delete to remove a NULL attribute + $mod=array(); + + // Check every attribute to see if it contains 8bit characters and then UTF8 encode them + array_walk($attributes, array($this, 'encode8bit')); + + if ($attributes["address_city"]){ $mod["l"][0]=$attributes["address_city"]; } + if ($attributes["address_code"]){ $mod["postalCode"][0]=$attributes["address_code"]; } + //if ($attributes["address_country"]){ $mod["countryCode"][0]=$attributes["address_country"]; } // use country codes? + if ($attributes["address_country"]){ $mod["c"][0]=$attributes["address_country"]; } + if ($attributes["address_pobox"]){ $mod["postOfficeBox"][0]=$attributes["address_pobox"]; } + if ($attributes["address_state"]){ $mod["st"][0]=$attributes["address_state"]; } + if ($attributes["address_street"]){ $mod["streetAddress"][0]=$attributes["address_street"]; } + if ($attributes["company"]){ $mod["company"][0]=$attributes["company"]; } + if ($attributes["change_password"]){ $mod["pwdLastSet"][0]=0; } + if ($attributes["department"]){ $mod["department"][0]=$attributes["department"]; } + if ($attributes["description"]){ $mod["description"][0]=$attributes["description"]; } + if ($attributes["display_name"]){ $mod["displayName"][0]=$attributes["display_name"]; } + if ($attributes["email"]){ $mod["mail"][0]=$attributes["email"]; } + if ($attributes["expires"]){ $mod["accountExpires"][0]=$attributes["expires"]; } //unix epoch format? + if ($attributes["firstname"]){ $mod["givenName"][0]=$attributes["firstname"]; } + if ($attributes["home_directory"]){ $mod["homeDirectory"][0]=$attributes["home_directory"]; } + if ($attributes["home_drive"]){ $mod["homeDrive"][0]=$attributes["home_drive"]; } + if ($attributes["initials"]){ $mod["initials"][0]=$attributes["initials"]; } + if ($attributes["logon_name"]){ $mod["userPrincipalName"][0]=$attributes["logon_name"]; } + if ($attributes["manager"]){ $mod["manager"][0]=$attributes["manager"]; } //UNTESTED ***Use DistinguishedName*** + if ($attributes["office"]){ $mod["physicalDeliveryOfficeName"][0]=$attributes["office"]; } + if ($attributes["password"]){ $mod["unicodePwd"][0]=$this->user()->encodePassword($attributes["password"]); } + if ($attributes["profile_path"]){ $mod["profilepath"][0]=$attributes["profile_path"]; } + if ($attributes["script_path"]){ $mod["scriptPath"][0]=$attributes["script_path"]; } + if ($attributes["surname"]){ $mod["sn"][0]=$attributes["surname"]; } + if ($attributes["title"]){ $mod["title"][0]=$attributes["title"]; } + if ($attributes["telephone"]){ $mod["telephoneNumber"][0]=$attributes["telephone"]; } + if ($attributes["mobile"]){ $mod["mobile"][0]=$attributes["mobile"]; } + if ($attributes["pager"]){ $mod["pager"][0]=$attributes["pager"]; } + if ($attributes["ipphone"]){ $mod["ipphone"][0]=$attributes["ipphone"]; } + if ($attributes["web_page"]){ $mod["wWWHomePage"][0]=$attributes["web_page"]; } + if ($attributes["fax"]){ $mod["facsimileTelephoneNumber"][0]=$attributes["fax"]; } + if ($attributes["enabled"]){ $mod["userAccountControl"][0]=$attributes["enabled"]; } + if ($attributes["homephone"]){ $mod["homephone"][0]=$attributes["homephone"]; } + + // Distribution List specific schema + if ($attributes["group_sendpermission"]){ $mod["dlMemSubmitPerms"][0]=$attributes["group_sendpermission"]; } + if ($attributes["group_rejectpermission"]){ $mod["dlMemRejectPerms"][0]=$attributes["group_rejectpermission"]; } + + // Exchange Schema + if ($attributes["exchange_homemdb"]){ $mod["homeMDB"][0]=$attributes["exchange_homemdb"]; } + if ($attributes["exchange_mailnickname"]){ $mod["mailNickname"][0]=$attributes["exchange_mailnickname"]; } + if ($attributes["exchange_proxyaddress"]){ $mod["proxyAddresses"][0]=$attributes["exchange_proxyaddress"]; } + if ($attributes["exchange_usedefaults"]){ $mod["mDBUseDefaults"][0]=$attributes["exchange_usedefaults"]; } + if ($attributes["exchange_policyexclude"]){ $mod["msExchPoliciesExcluded"][0]=$attributes["exchange_policyexclude"]; } + if ($attributes["exchange_policyinclude"]){ $mod["msExchPoliciesIncluded"][0]=$attributes["exchange_policyinclude"]; } + if ($attributes["exchange_addressbook"]){ $mod["showInAddressBook"][0]=$attributes["exchange_addressbook"]; } + if ($attributes["exchange_altrecipient"]){ $mod["altRecipient"][0]=$attributes["exchange_altrecipient"]; } + if ($attributes["exchange_deliverandredirect"]){ $mod["deliverAndRedirect"][0]=$attributes["exchange_deliverandredirect"]; } + + // This schema is designed for contacts + if ($attributes["exchange_hidefromlists"]){ $mod["msExchHideFromAddressLists"][0]=$attributes["exchange_hidefromlists"]; } + if ($attributes["contact_email"]){ $mod["targetAddress"][0]=$attributes["contact_email"]; } + + //echo ("<pre>"); print_r($mod); + /* + // modifying a name is a bit fiddly + if ($attributes["firstname"] && $attributes["surname"]){ + $mod["cn"][0]=$attributes["firstname"]." ".$attributes["surname"]; + $mod["displayname"][0]=$attributes["firstname"]." ".$attributes["surname"]; + $mod["name"][0]=$attributes["firstname"]." ".$attributes["surname"]; + } + */ + + if (count($mod)==0){ return (false); } + return ($mod); + } + + /** + * Convert 8bit characters e.g. accented characters to UTF8 encoded characters + */ + protected function encode8Bit(&$item, $key) { + $encode = false; + if (is_string($item)) { + for ($i=0; $i<strlen($item); $i++) { + if (ord($item[$i]) >> 7) { + $encode = true; + } + } + } + if ($encode === true && $key != 'password') { + $item = utf8_encode($item); + } + } + + /** + * Select a random domain controller from your domain controller array + * + * @return string + */ + protected function randomController() + { + mt_srand(doubleval(microtime()) * 100000000); // For older PHP versions + /*if (sizeof($this->domainControllers) > 1) { + $adController = $this->domainControllers[array_rand($this->domainControllers)]; + // Test if the controller is responding to pings + $ping = $this->pingController($adController); + if ($ping === false) { + // Find the current key in the domain controllers array + $key = array_search($adController, $this->domainControllers); + // Remove it so that we don't end up in a recursive loop + unset($this->domainControllers[$key]); + // Select a new controller + return $this->randomController(); + } + else { + return ($adController); + } + } */ + return $this->domainControllers[array_rand($this->domainControllers)]; + } + + /** + * Test basic connectivity to controller + * + * @return bool + */ + protected function pingController($host) { + $port = $this->adPort; + fsockopen($host, $port, $errno, $errstr, 10); + if ($errno > 0) { + return false; + } + return true; + } + +} + +/** +* adLDAP Exception Handler +* +* Exceptions of this type are thrown on bind failure or when SSL is required but not configured +* Example: +* try { +* $adldap = new adLDAP(); +* } +* catch (adLDAPException $e) { +* echo $e; +* exit(); +* } +*/ +class adLDAPException extends Exception {} + ?>
\ No newline at end of file diff --git a/lib/plugins/authad/adLDAP/classes/adLDAPComputers.php b/lib/plugins/authad/adLDAP/classes/adLDAPComputers.php index 71b24a04f..aabd88fa5 100644 --- a/lib/plugins/authad/adLDAP/classes/adLDAPComputers.php +++ b/lib/plugins/authad/adLDAP/classes/adLDAPComputers.php @@ -1,153 +1,153 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @subpackage Computers
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 97 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
- */
-require_once(dirname(__FILE__) . '/../adLDAP.php');
-require_once(dirname(__FILE__) . '/../collections/adLDAPComputerCollection.php');
-
-/**
-* COMPUTER MANAGEMENT FUNCTIONS
-*/
-class adLDAPComputers {
-
- /**
- * The current adLDAP connection via dependency injection
- *
- * @var adLDAP
- */
- protected $adldap;
-
- public function __construct(adLDAP $adldap) {
- $this->adldap = $adldap;
- }
-
- /**
- * Get information about a specific computer. Returned in a raw array format from AD
- *
- * @param string $computerName The name of the computer
- * @param array $fields Attributes to return
- * @return array
- */
- public function info($computerName, $fields = NULL)
- {
- if ($computerName === NULL) { return false; }
- if (!$this->adldap->getLdapBind()) { return false; }
-
- $filter = "(&(objectClass=computer)(cn=" . $computerName . "))";
- if ($fields === NULL) {
- $fields = array("memberof","cn","displayname","dnshostname","distinguishedname","objectcategory","operatingsystem","operatingsystemservicepack","operatingsystemversion");
- }
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- return $entries;
- }
-
- /**
- * Find information about the computers. Returned in a raw array format from AD
- *
- * @param string $computerName The name of the computer
- * @param array $fields Array of parameters to query
- * @return mixed
- */
- public function infoCollection($computerName, $fields = NULL)
- {
- if ($computerName === NULL) { return false; }
- if (!$this->adldap->getLdapBind()) { return false; }
-
- $info = $this->info($computerName, $fields);
-
- if ($info !== false) {
- $collection = new adLDAPComputerCollection($info, $this->adldap);
- return $collection;
- }
- return false;
- }
-
- /**
- * Check if a computer is in a group
- *
- * @param string $computerName The name of the computer
- * @param string $group The group to check
- * @param bool $recursive Whether to check recursively
- * @return array
- */
- public function inGroup($computerName, $group, $recursive = NULL)
- {
- if ($computerName === NULL) { return false; }
- if ($group === NULL) { return false; }
- if (!$this->adldap->getLdapBind()) { return false; }
- if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } // use the default option if they haven't set it
-
- //get a list of the groups
- $groups = $this->groups($computerName, array("memberof"), $recursive);
-
- //return true if the specified group is in the group list
- if (in_array($group, $groups)){
- return true;
- }
-
- return false;
- }
-
- /**
- * Get the groups a computer is in
- *
- * @param string $computerName The name of the computer
- * @param bool $recursive Whether to check recursively
- * @return array
- */
- public function groups($computerName, $recursive = NULL)
- {
- if ($computerName === NULL) { return false; }
- if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } //use the default option if they haven't set it
- if (!$this->adldap->getLdapBind()){ return false; }
-
- //search the directory for their information
- $info = @$this->info($computerName, array("memberof", "primarygroupid"));
- $groups = $this->adldap->utilities()->niceNames($info[0]["memberof"]); //presuming the entry returned is our guy (unique usernames)
-
- if ($recursive === true) {
- foreach ($groups as $id => $groupName){
- $extraGroups = $this->adldap->group()->recursiveGroups($groupName);
- $groups = array_merge($groups, $extraGroups);
- }
- }
-
- return $groups;
- }
-
-}
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @subpackage Computers + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 97 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ + */ +require_once(dirname(__FILE__) . '/../adLDAP.php'); +require_once(dirname(__FILE__) . '/../collections/adLDAPComputerCollection.php'); + +/** +* COMPUTER MANAGEMENT FUNCTIONS +*/ +class adLDAPComputers { + + /** + * The current adLDAP connection via dependency injection + * + * @var adLDAP + */ + protected $adldap; + + public function __construct(adLDAP $adldap) { + $this->adldap = $adldap; + } + + /** + * Get information about a specific computer. Returned in a raw array format from AD + * + * @param string $computerName The name of the computer + * @param array $fields Attributes to return + * @return array + */ + public function info($computerName, $fields = NULL) + { + if ($computerName === NULL) { return false; } + if (!$this->adldap->getLdapBind()) { return false; } + + $filter = "(&(objectClass=computer)(cn=" . $computerName . "))"; + if ($fields === NULL) { + $fields = array("memberof","cn","displayname","dnshostname","distinguishedname","objectcategory","operatingsystem","operatingsystemservicepack","operatingsystemversion"); + } + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + return $entries; + } + + /** + * Find information about the computers. Returned in a raw array format from AD + * + * @param string $computerName The name of the computer + * @param array $fields Array of parameters to query + * @return mixed + */ + public function infoCollection($computerName, $fields = NULL) + { + if ($computerName === NULL) { return false; } + if (!$this->adldap->getLdapBind()) { return false; } + + $info = $this->info($computerName, $fields); + + if ($info !== false) { + $collection = new adLDAPComputerCollection($info, $this->adldap); + return $collection; + } + return false; + } + + /** + * Check if a computer is in a group + * + * @param string $computerName The name of the computer + * @param string $group The group to check + * @param bool $recursive Whether to check recursively + * @return array + */ + public function inGroup($computerName, $group, $recursive = NULL) + { + if ($computerName === NULL) { return false; } + if ($group === NULL) { return false; } + if (!$this->adldap->getLdapBind()) { return false; } + if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } // use the default option if they haven't set it + + //get a list of the groups + $groups = $this->groups($computerName, array("memberof"), $recursive); + + //return true if the specified group is in the group list + if (in_array($group, $groups)){ + return true; + } + + return false; + } + + /** + * Get the groups a computer is in + * + * @param string $computerName The name of the computer + * @param bool $recursive Whether to check recursively + * @return array + */ + public function groups($computerName, $recursive = NULL) + { + if ($computerName === NULL) { return false; } + if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } //use the default option if they haven't set it + if (!$this->adldap->getLdapBind()){ return false; } + + //search the directory for their information + $info = @$this->info($computerName, array("memberof", "primarygroupid")); + $groups = $this->adldap->utilities()->niceNames($info[0]["memberof"]); //presuming the entry returned is our guy (unique usernames) + + if ($recursive === true) { + foreach ($groups as $id => $groupName){ + $extraGroups = $this->adldap->group()->recursiveGroups($groupName); + $groups = array_merge($groups, $extraGroups); + } + } + + return $groups; + } + +} ?>
\ No newline at end of file diff --git a/lib/plugins/authad/adLDAP/classes/adLDAPContacts.php b/lib/plugins/authad/adLDAP/classes/adLDAPContacts.php index addd3e5f0..42a0d756b 100644 --- a/lib/plugins/authad/adLDAP/classes/adLDAPContacts.php +++ b/lib/plugins/authad/adLDAP/classes/adLDAPContacts.php @@ -1,294 +1,294 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @subpackage Contacts
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 97 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
- */
-
-require_once(dirname(__FILE__) . '/../adLDAP.php');
-require_once(dirname(__FILE__) . '/../collections/adLDAPContactCollection.php');
-
-class adLDAPContacts {
- /**
- * The current adLDAP connection via dependency injection
- *
- * @var adLDAP
- */
- protected $adldap;
-
- public function __construct(adLDAP $adldap) {
- $this->adldap = $adldap;
- }
-
- //*****************************************************************************************************************
- // CONTACT FUNCTIONS
- // * Still work to do in this area, and new functions to write
-
- /**
- * Create a contact
- *
- * @param array $attributes The attributes to set to the contact
- * @return bool
- */
- public function create($attributes)
- {
- // Check for compulsory fields
- if (!array_key_exists("display_name", $attributes)) { return "Missing compulsory field [display_name]"; }
- if (!array_key_exists("email", $attributes)) { return "Missing compulsory field [email]"; }
- if (!array_key_exists("container", $attributes)) { return "Missing compulsory field [container]"; }
- if (!is_array($attributes["container"])) { return "Container attribute must be an array."; }
-
- // Translate the schema
- $add = $this->adldap->adldap_schema($attributes);
-
- // Additional stuff only used for adding contacts
- $add["cn"][0] = $attributes["display_name"];
- $add["objectclass"][0] = "top";
- $add["objectclass"][1] = "person";
- $add["objectclass"][2] = "organizationalPerson";
- $add["objectclass"][3] = "contact";
- if (!isset($attributes['exchange_hidefromlists'])) {
- $add["msExchHideFromAddressLists"][0] = "TRUE";
- }
-
- // Determine the container
- $attributes["container"] = array_reverse($attributes["container"]);
- $container= "OU=" . implode(",OU=", $attributes["container"]);
-
- // Add the entry
- $result = @ldap_add($this->adldap->getLdapConnection(), "CN=" . $this->adldap->utilities()->escapeCharacters($add["cn"][0]) . ", " . $container . "," . $this->adldap->getBaseDn(), $add);
- if ($result != true) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Determine the list of groups a contact is a member of
- *
- * @param string $distinguisedname The full DN of a contact
- * @param bool $recursive Recursively check groups
- * @return array
- */
- public function groups($distinguishedName, $recursive = NULL)
- {
- if ($distinguishedName === NULL) { return false; }
- if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } //use the default option if they haven't set it
- if (!$this->adldap->getLdapBind()){ return false; }
-
- // Search the directory for their information
- $info = @$this->info($distinguishedName, array("memberof", "primarygroupid"));
- $groups = $this->adldap->utilities()->niceNames($info[0]["memberof"]); //presuming the entry returned is our contact
-
- if ($recursive === true){
- foreach ($groups as $id => $groupName){
- $extraGroups = $this->adldap->group()->recursiveGroups($groupName);
- $groups = array_merge($groups, $extraGroups);
- }
- }
-
- return $groups;
- }
-
- /**
- * Get contact information. Returned in a raw array format from AD
- *
- * @param string $distinguisedname The full DN of a contact
- * @param array $fields Attributes to be returned
- * @return array
- */
- public function info($distinguishedName, $fields = NULL)
- {
- if ($distinguishedName === NULL) { return false; }
- if (!$this->adldap->getLdapBind()) { return false; }
-
- $filter = "distinguishedName=" . $distinguishedName;
- if ($fields === NULL) {
- $fields = array("distinguishedname", "mail", "memberof", "department", "displayname", "telephonenumber", "primarygroupid", "objectsid");
- }
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- if ($entries[0]['count'] >= 1) {
- // AD does not return the primary group in the ldap query, we may need to fudge it
- if ($this->adldap->getRealPrimaryGroup() && isset($entries[0]["primarygroupid"][0]) && isset($entries[0]["primarygroupid"][0])){
- //$entries[0]["memberof"][]=$this->group_cn($entries[0]["primarygroupid"][0]);
- $entries[0]["memberof"][] = $this->adldap->group()->getPrimaryGroup($entries[0]["primarygroupid"][0], $entries[0]["objectsid"][0]);
- } else {
- $entries[0]["memberof"][] = "CN=Domain Users,CN=Users," . $this->adldap->getBaseDn();
- }
- }
-
- $entries[0]["memberof"]["count"]++;
- return $entries;
- }
-
- /**
- * Find information about the contacts. Returned in a raw array format from AD
- *
- * @param string $distinguishedName The full DN of a contact
- * @param array $fields Array of parameters to query
- * @return mixed
- */
- public function infoCollection($distinguishedName, $fields = NULL)
- {
- if ($distinguishedName === NULL) { return false; }
- if (!$this->adldap->getLdapBind()) { return false; }
-
- $info = $this->info($distinguishedName, $fields);
-
- if ($info !== false) {
- $collection = new adLDAPContactCollection($info, $this->adldap);
- return $collection;
- }
- return false;
- }
-
- /**
- * Determine if a contact is a member of a group
- *
- * @param string $distinguisedName The full DN of a contact
- * @param string $group The group name to query
- * @param bool $recursive Recursively check groups
- * @return bool
- */
- public function inGroup($distinguisedName, $group, $recursive = NULL)
- {
- if ($distinguisedName === NULL) { return false; }
- if ($group === NULL) { return false; }
- if (!$this->adldap->getLdapBind()) { return false; }
- if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } //use the default option if they haven't set it
-
- // Get a list of the groups
- $groups = $this->groups($distinguisedName, array("memberof"), $recursive);
-
- // Return true if the specified group is in the group list
- if (in_array($group, $groups)){
- return true;
- }
-
- return false;
- }
-
- /**
- * Modify a contact
- *
- * @param string $distinguishedName The contact to query
- * @param array $attributes The attributes to modify. Note if you set the enabled attribute you must not specify any other attributes
- * @return bool
- */
- public function modify($distinguishedName, $attributes) {
- if ($distinguishedName === NULL) { return "Missing compulsory field [distinguishedname]"; }
-
- // Translate the update to the LDAP schema
- $mod = $this->adldap->adldap_schema($attributes);
-
- // Check to see if this is an enabled status update
- if (!$mod) {
- return false;
- }
-
- // Do the update
- $result = ldap_modify($this->adldap->getLdapConnection(), $distinguishedName, $mod);
- if ($result == false) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Delete a contact
- *
- * @param string $distinguishedName The contact dn to delete (please be careful here!)
- * @return array
- */
- public function delete($distinguishedName)
- {
- $result = $this->folder()->delete($distinguishedName);
- if ($result != true) {
- return false;
- }
- return true;
- }
-
- /**
- * Return a list of all contacts
- *
- * @param bool $includeDescription Include a description of a contact
- * @param string $search The search parameters
- * @param bool $sorted Whether to sort the results
- * @return array
- */
- public function all($includeDescription = false, $search = "*", $sorted = true) {
- if (!$this->adldap->getLdapBind()) { return false; }
-
- // Perform the search and grab all their details
- $filter = "(&(objectClass=contact)(cn=" . $search . "))";
- $fields = array("displayname","distinguishedname");
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- $usersArray = array();
- for ($i=0; $i<$entries["count"]; $i++){
- if ($includeDescription && strlen($entries[$i]["displayname"][0])>0){
- $usersArray[$entries[$i]["distinguishedname"][0]] = $entries[$i]["displayname"][0];
- } elseif ($includeDescription){
- $usersArray[$entries[$i]["distinguishedname"][0]] = $entries[$i]["distinguishedname"][0];
- } else {
- array_push($usersArray, $entries[$i]["distinguishedname"][0]);
- }
- }
- if ($sorted) {
- asort($usersArray);
- }
- return $usersArray;
- }
-
- /**
- * Mail enable a contact
- * Allows email to be sent to them through Exchange
- *
- * @param string $distinguishedname The contact to mail enable
- * @param string $emailaddress The email address to allow emails to be sent through
- * @param string $mailnickname The mailnickname for the contact in Exchange. If NULL this will be set to the display name
- * @return bool
- */
- public function contactMailEnable($distinguishedName, $emailAddress, $mailNickname = NULL){
- return $this->adldap->exchange()->contactMailEnable($distinguishedName, $emailAddress, $mailNickname);
- }
-
-
-}
-?>
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @subpackage Contacts + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 97 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ + */ + +require_once(dirname(__FILE__) . '/../adLDAP.php'); +require_once(dirname(__FILE__) . '/../collections/adLDAPContactCollection.php'); + +class adLDAPContacts { + /** + * The current adLDAP connection via dependency injection + * + * @var adLDAP + */ + protected $adldap; + + public function __construct(adLDAP $adldap) { + $this->adldap = $adldap; + } + + //***************************************************************************************************************** + // CONTACT FUNCTIONS + // * Still work to do in this area, and new functions to write + + /** + * Create a contact + * + * @param array $attributes The attributes to set to the contact + * @return bool + */ + public function create($attributes) + { + // Check for compulsory fields + if (!array_key_exists("display_name", $attributes)) { return "Missing compulsory field [display_name]"; } + if (!array_key_exists("email", $attributes)) { return "Missing compulsory field [email]"; } + if (!array_key_exists("container", $attributes)) { return "Missing compulsory field [container]"; } + if (!is_array($attributes["container"])) { return "Container attribute must be an array."; } + + // Translate the schema + $add = $this->adldap->adldap_schema($attributes); + + // Additional stuff only used for adding contacts + $add["cn"][0] = $attributes["display_name"]; + $add["objectclass"][0] = "top"; + $add["objectclass"][1] = "person"; + $add["objectclass"][2] = "organizationalPerson"; + $add["objectclass"][3] = "contact"; + if (!isset($attributes['exchange_hidefromlists'])) { + $add["msExchHideFromAddressLists"][0] = "TRUE"; + } + + // Determine the container + $attributes["container"] = array_reverse($attributes["container"]); + $container= "OU=" . implode(",OU=", $attributes["container"]); + + // Add the entry + $result = @ldap_add($this->adldap->getLdapConnection(), "CN=" . $this->adldap->utilities()->escapeCharacters($add["cn"][0]) . ", " . $container . "," . $this->adldap->getBaseDn(), $add); + if ($result != true) { + return false; + } + + return true; + } + + /** + * Determine the list of groups a contact is a member of + * + * @param string $distinguisedname The full DN of a contact + * @param bool $recursive Recursively check groups + * @return array + */ + public function groups($distinguishedName, $recursive = NULL) + { + if ($distinguishedName === NULL) { return false; } + if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } //use the default option if they haven't set it + if (!$this->adldap->getLdapBind()){ return false; } + + // Search the directory for their information + $info = @$this->info($distinguishedName, array("memberof", "primarygroupid")); + $groups = $this->adldap->utilities()->niceNames($info[0]["memberof"]); //presuming the entry returned is our contact + + if ($recursive === true){ + foreach ($groups as $id => $groupName){ + $extraGroups = $this->adldap->group()->recursiveGroups($groupName); + $groups = array_merge($groups, $extraGroups); + } + } + + return $groups; + } + + /** + * Get contact information. Returned in a raw array format from AD + * + * @param string $distinguisedname The full DN of a contact + * @param array $fields Attributes to be returned + * @return array + */ + public function info($distinguishedName, $fields = NULL) + { + if ($distinguishedName === NULL) { return false; } + if (!$this->adldap->getLdapBind()) { return false; } + + $filter = "distinguishedName=" . $distinguishedName; + if ($fields === NULL) { + $fields = array("distinguishedname", "mail", "memberof", "department", "displayname", "telephonenumber", "primarygroupid", "objectsid"); + } + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + if ($entries[0]['count'] >= 1) { + // AD does not return the primary group in the ldap query, we may need to fudge it + if ($this->adldap->getRealPrimaryGroup() && isset($entries[0]["primarygroupid"][0]) && isset($entries[0]["primarygroupid"][0])){ + //$entries[0]["memberof"][]=$this->group_cn($entries[0]["primarygroupid"][0]); + $entries[0]["memberof"][] = $this->adldap->group()->getPrimaryGroup($entries[0]["primarygroupid"][0], $entries[0]["objectsid"][0]); + } else { + $entries[0]["memberof"][] = "CN=Domain Users,CN=Users," . $this->adldap->getBaseDn(); + } + } + + $entries[0]["memberof"]["count"]++; + return $entries; + } + + /** + * Find information about the contacts. Returned in a raw array format from AD + * + * @param string $distinguishedName The full DN of a contact + * @param array $fields Array of parameters to query + * @return mixed + */ + public function infoCollection($distinguishedName, $fields = NULL) + { + if ($distinguishedName === NULL) { return false; } + if (!$this->adldap->getLdapBind()) { return false; } + + $info = $this->info($distinguishedName, $fields); + + if ($info !== false) { + $collection = new adLDAPContactCollection($info, $this->adldap); + return $collection; + } + return false; + } + + /** + * Determine if a contact is a member of a group + * + * @param string $distinguisedName The full DN of a contact + * @param string $group The group name to query + * @param bool $recursive Recursively check groups + * @return bool + */ + public function inGroup($distinguisedName, $group, $recursive = NULL) + { + if ($distinguisedName === NULL) { return false; } + if ($group === NULL) { return false; } + if (!$this->adldap->getLdapBind()) { return false; } + if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } //use the default option if they haven't set it + + // Get a list of the groups + $groups = $this->groups($distinguisedName, array("memberof"), $recursive); + + // Return true if the specified group is in the group list + if (in_array($group, $groups)){ + return true; + } + + return false; + } + + /** + * Modify a contact + * + * @param string $distinguishedName The contact to query + * @param array $attributes The attributes to modify. Note if you set the enabled attribute you must not specify any other attributes + * @return bool + */ + public function modify($distinguishedName, $attributes) { + if ($distinguishedName === NULL) { return "Missing compulsory field [distinguishedname]"; } + + // Translate the update to the LDAP schema + $mod = $this->adldap->adldap_schema($attributes); + + // Check to see if this is an enabled status update + if (!$mod) { + return false; + } + + // Do the update + $result = ldap_modify($this->adldap->getLdapConnection(), $distinguishedName, $mod); + if ($result == false) { + return false; + } + + return true; + } + + /** + * Delete a contact + * + * @param string $distinguishedName The contact dn to delete (please be careful here!) + * @return array + */ + public function delete($distinguishedName) + { + $result = $this->folder()->delete($distinguishedName); + if ($result != true) { + return false; + } + return true; + } + + /** + * Return a list of all contacts + * + * @param bool $includeDescription Include a description of a contact + * @param string $search The search parameters + * @param bool $sorted Whether to sort the results + * @return array + */ + public function all($includeDescription = false, $search = "*", $sorted = true) { + if (!$this->adldap->getLdapBind()) { return false; } + + // Perform the search and grab all their details + $filter = "(&(objectClass=contact)(cn=" . $search . "))"; + $fields = array("displayname","distinguishedname"); + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + $usersArray = array(); + for ($i=0; $i<$entries["count"]; $i++){ + if ($includeDescription && strlen($entries[$i]["displayname"][0])>0){ + $usersArray[$entries[$i]["distinguishedname"][0]] = $entries[$i]["displayname"][0]; + } elseif ($includeDescription){ + $usersArray[$entries[$i]["distinguishedname"][0]] = $entries[$i]["distinguishedname"][0]; + } else { + array_push($usersArray, $entries[$i]["distinguishedname"][0]); + } + } + if ($sorted) { + asort($usersArray); + } + return $usersArray; + } + + /** + * Mail enable a contact + * Allows email to be sent to them through Exchange + * + * @param string $distinguishedname The contact to mail enable + * @param string $emailaddress The email address to allow emails to be sent through + * @param string $mailnickname The mailnickname for the contact in Exchange. If NULL this will be set to the display name + * @return bool + */ + public function contactMailEnable($distinguishedName, $emailAddress, $mailNickname = NULL){ + return $this->adldap->exchange()->contactMailEnable($distinguishedName, $emailAddress, $mailNickname); + } + + +} +?> diff --git a/lib/plugins/authad/adLDAP/classes/adLDAPExchange.php b/lib/plugins/authad/adLDAP/classes/adLDAPExchange.php index dd0c6de05..d70aac779 100644 --- a/lib/plugins/authad/adLDAP/classes/adLDAPExchange.php +++ b/lib/plugins/authad/adLDAP/classes/adLDAPExchange.php @@ -1,390 +1,390 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @subpackage Exchange
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 97 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
- */
-require_once(dirname(__FILE__) . '/../adLDAP.php');
-
-/**
-* MICROSOFT EXCHANGE FUNCTIONS
-*/
-class adLDAPExchange {
- /**
- * The current adLDAP connection via dependency injection
- *
- * @var adLDAP
- */
- protected $adldap;
-
- public function __construct(adLDAP $adldap) {
- $this->adldap = $adldap;
- }
-
- /**
- * Create an Exchange account
- *
- * @param string $username The username of the user to add the Exchange account to
- * @param array $storageGroup The mailbox, Exchange Storage Group, for the user account, this must be a full CN
- * If the storage group has a different base_dn to the adLDAP configuration, set it using $base_dn
- * @param string $emailAddress The primary email address to add to this user
- * @param string $mailNickname The mail nick name. If mail nickname is blank, the username will be used
- * @param bool $mdbUseDefaults Indicates whether the store should use the default quota, rather than the per-mailbox quota.
- * @param string $baseDn Specify an alternative base_dn for the Exchange storage group
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return bool
- */
- public function createMailbox($username, $storageGroup, $emailAddress, $mailNickname=NULL, $useDefaults=TRUE, $baseDn=NULL, $isGUID=false)
- {
- if ($username === NULL){ return "Missing compulsory field [username]"; }
- if ($storageGroup === NULL) { return "Missing compulsory array [storagegroup]"; }
- if (!is_array($storageGroup)) { return "[storagegroup] must be an array"; }
- if ($emailAddress === NULL) { return "Missing compulsory field [emailAddress]"; }
-
- if ($baseDn === NULL) {
- $baseDn = $this->adldap->getBaseDn();
- }
-
- $container = "CN=" . implode(",CN=", $storageGroup);
-
- if ($mailNickname === NULL) {
- $mailNickname = $username;
- }
- $mdbUseDefaults = $this->adldap->utilities()->boolToString($useDefaults);
-
- $attributes = array(
- 'exchange_homemdb'=>$container.",".$baseDn,
- 'exchange_proxyaddress'=>'SMTP:' . $emailAddress,
- 'exchange_mailnickname'=>$mailNickname,
- 'exchange_usedefaults'=>$mdbUseDefaults
- );
- $result = $this->adldap->user()->modify($username, $attributes, $isGUID);
- if ($result == false) {
- return false;
- }
- return true;
- }
-
- /**
- * Add an X400 address to Exchange
- * See http://tools.ietf.org/html/rfc1685 for more information.
- * An X400 Address looks similar to this X400:c=US;a= ;p=Domain;o=Organization;s=Doe;g=John;
- *
- * @param string $username The username of the user to add the X400 to to
- * @param string $country Country
- * @param string $admd Administration Management Domain
- * @param string $pdmd Private Management Domain (often your AD domain)
- * @param string $org Organization
- * @param string $surname Surname
- * @param string $givenName Given name
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return bool
- */
- public function addX400($username, $country, $admd, $pdmd, $org, $surname, $givenName, $isGUID=false)
- {
- if ($username === NULL){ return "Missing compulsory field [username]"; }
-
- $proxyValue = 'X400:';
-
- // Find the dn of the user
- $user = $this->adldap->user()->info($username, array("cn","proxyaddresses"), $isGUID);
- if ($user[0]["dn"] === NULL) { return false; }
- $userDn = $user[0]["dn"];
-
- // We do not have to demote an email address from the default so we can just add the new proxy address
- $attributes['exchange_proxyaddress'] = $proxyValue . 'c=' . $country . ';a=' . $admd . ';p=' . $pdmd . ';o=' . $org . ';s=' . $surname . ';g=' . $givenName . ';';
-
- // Translate the update to the LDAP schema
- $add = $this->adldap->adldap_schema($attributes);
-
- if (!$add) { return false; }
-
- // Do the update
- // Take out the @ to see any errors, usually this error might occur because the address already
- // exists in the list of proxyAddresses
- $result = @ldap_mod_add($this->adldap->getLdapConnection(), $userDn, $add);
- if ($result == false) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Add an address to Exchange
- *
- * @param string $username The username of the user to add the Exchange account to
- * @param string $emailAddress The email address to add to this user
- * @param bool $default Make this email address the default address, this is a bit more intensive as we have to demote any existing default addresses
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return bool
- */
- public function addAddress($username, $emailAddress, $default = FALSE, $isGUID = false)
- {
- if ($username === NULL) { return "Missing compulsory field [username]"; }
- if ($emailAddress === NULL) { return "Missing compulsory fields [emailAddress]"; }
-
- $proxyValue = 'smtp:';
- if ($default === true) {
- $proxyValue = 'SMTP:';
- }
-
- // Find the dn of the user
- $user = $this->adldap->user()->info($username, array("cn","proxyaddresses"), $isGUID);
- if ($user[0]["dn"] === NULL){ return false; }
- $userDn = $user[0]["dn"];
-
- // We need to scan existing proxy addresses and demote the default one
- if (is_array($user[0]["proxyaddresses"]) && $default === true) {
- $modAddresses = array();
- for ($i=0;$i<sizeof($user[0]['proxyaddresses']);$i++) {
- if (strstr($user[0]['proxyaddresses'][$i], 'SMTP:') !== false) {
- $user[0]['proxyaddresses'][$i] = str_replace('SMTP:', 'smtp:', $user[0]['proxyaddresses'][$i]);
- }
- if ($user[0]['proxyaddresses'][$i] != '') {
- $modAddresses['proxyAddresses'][$i] = $user[0]['proxyaddresses'][$i];
- }
- }
- $modAddresses['proxyAddresses'][(sizeof($user[0]['proxyaddresses'])-1)] = 'SMTP:' . $emailAddress;
-
- $result = @ldap_mod_replace($this->adldap->getLdapConnection(), $userDn, $modAddresses);
- if ($result == false) {
- return false;
- }
-
- return true;
- }
- else {
- // We do not have to demote an email address from the default so we can just add the new proxy address
- $attributes['exchange_proxyaddress'] = $proxyValue . $emailAddress;
-
- // Translate the update to the LDAP schema
- $add = $this->adldap->adldap_schema($attributes);
-
- if (!$add) {
- return false;
- }
-
- // Do the update
- // Take out the @ to see any errors, usually this error might occur because the address already
- // exists in the list of proxyAddresses
- $result = @ldap_mod_add($this->adldap->getLdapConnection(), $userDn,$add);
- if ($result == false) {
- return false;
- }
-
- return true;
- }
- }
-
- /**
- * Remove an address to Exchange
- * If you remove a default address the account will no longer have a default,
- * we recommend changing the default address first
- *
- * @param string $username The username of the user to add the Exchange account to
- * @param string $emailAddress The email address to add to this user
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return bool
- */
- public function deleteAddress($username, $emailAddress, $isGUID=false)
- {
- if ($username === NULL) { return "Missing compulsory field [username]"; }
- if ($emailAddress === NULL) { return "Missing compulsory fields [emailAddress]"; }
-
- // Find the dn of the user
- $user = $this->adldap->user()->info($username, array("cn","proxyaddresses"), $isGUID);
- if ($user[0]["dn"] === NULL) { return false; }
- $userDn = $user[0]["dn"];
-
- if (is_array($user[0]["proxyaddresses"])) {
- $mod = array();
- for ($i=0;$i<sizeof($user[0]['proxyaddresses']);$i++) {
- if (strstr($user[0]['proxyaddresses'][$i], 'SMTP:') !== false && $user[0]['proxyaddresses'][$i] == 'SMTP:' . $emailAddress) {
- $mod['proxyAddresses'][0] = 'SMTP:' . $emailAddress;
- }
- elseif (strstr($user[0]['proxyaddresses'][$i], 'smtp:') !== false && $user[0]['proxyaddresses'][$i] == 'smtp:' . $emailAddress) {
- $mod['proxyAddresses'][0] = 'smtp:' . $emailAddress;
- }
- }
-
- $result = @ldap_mod_del($this->adldap->getLdapConnection(), $userDn,$mod);
- if ($result == false) {
- return false;
- }
-
- return true;
- }
- else {
- return false;
- }
- }
- /**
- * Change the default address
- *
- * @param string $username The username of the user to add the Exchange account to
- * @param string $emailAddress The email address to make default
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return bool
- */
- public function primaryAddress($username, $emailAddress, $isGUID = false)
- {
- if ($username === NULL) { return "Missing compulsory field [username]"; }
- if ($emailAddress === NULL) { return "Missing compulsory fields [emailAddress]"; }
-
- // Find the dn of the user
- $user = $this->adldap->user()->info($username, array("cn","proxyaddresses"), $isGUID);
- if ($user[0]["dn"] === NULL){ return false; }
- $userDn = $user[0]["dn"];
-
- if (is_array($user[0]["proxyaddresses"])) {
- $modAddresses = array();
- for ($i=0;$i<sizeof($user[0]['proxyaddresses']);$i++) {
- if (strstr($user[0]['proxyaddresses'][$i], 'SMTP:') !== false) {
- $user[0]['proxyaddresses'][$i] = str_replace('SMTP:', 'smtp:', $user[0]['proxyaddresses'][$i]);
- }
- if ($user[0]['proxyaddresses'][$i] == 'smtp:' . $emailAddress) {
- $user[0]['proxyaddresses'][$i] = str_replace('smtp:', 'SMTP:', $user[0]['proxyaddresses'][$i]);
- }
- if ($user[0]['proxyaddresses'][$i] != '') {
- $modAddresses['proxyAddresses'][$i] = $user[0]['proxyaddresses'][$i];
- }
- }
-
- $result = @ldap_mod_replace($this->adldap->getLdapConnection(), $userDn, $modAddresses);
- if ($result == false) {
- return false;
- }
-
- return true;
- }
-
- }
-
- /**
- * Mail enable a contact
- * Allows email to be sent to them through Exchange
- *
- * @param string $distinguishedName The contact to mail enable
- * @param string $emailAddress The email address to allow emails to be sent through
- * @param string $mailNickname The mailnickname for the contact in Exchange. If NULL this will be set to the display name
- * @return bool
- */
- public function contactMailEnable($distinguishedName, $emailAddress, $mailNickname = NULL)
- {
- if ($distinguishedName === NULL) { return "Missing compulsory field [distinguishedName]"; }
- if ($emailAddress === NULL) { return "Missing compulsory field [emailAddress]"; }
-
- if ($mailNickname !== NULL) {
- // Find the dn of the user
- $user = $this->adldap->contact()->info($distinguishedName, array("cn","displayname"));
- if ($user[0]["displayname"] === NULL) { return false; }
- $mailNickname = $user[0]['displayname'][0];
- }
-
- $attributes = array("email"=>$emailAddress,"contact_email"=>"SMTP:" . $emailAddress,"exchange_proxyaddress"=>"SMTP:" . $emailAddress,"exchange_mailnickname" => $mailNickname);
-
- // Translate the update to the LDAP schema
- $mod = $this->adldap->adldap_schema($attributes);
-
- // Check to see if this is an enabled status update
- if (!$mod) { return false; }
-
- // Do the update
- $result = ldap_modify($this->adldap->getLdapConnection(), $distinguishedName, $mod);
- if ($result == false) { return false; }
-
- return true;
- }
-
- /**
- * Returns a list of Exchange Servers in the ConfigurationNamingContext of the domain
- *
- * @param array $attributes An array of the AD attributes you wish to return
- * @return array
- */
- public function servers($attributes = array('cn','distinguishedname','serialnumber'))
- {
- if (!$this->adldap->getLdapBind()){ return false; }
-
- $configurationNamingContext = $this->adldap->getRootDse(array('configurationnamingcontext'));
- $sr = @ldap_search($this->adldap->getLdapConnection(), $configurationNamingContext[0]['configurationnamingcontext'][0],'(&(objectCategory=msExchExchangeServer))', $attributes);
- $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr);
- return $entries;
- }
-
- /**
- * Returns a list of Storage Groups in Exchange for a given mail server
- *
- * @param string $exchangeServer The full DN of an Exchange server. You can use exchange_servers() to find the DN for your server
- * @param array $attributes An array of the AD attributes you wish to return
- * @param bool $recursive If enabled this will automatically query the databases within a storage group
- * @return array
- */
- public function storageGroups($exchangeServer, $attributes = array('cn','distinguishedname'), $recursive = NULL)
- {
- if (!$this->adldap->getLdapBind()){ return false; }
- if ($exchangeServer === NULL) { return "Missing compulsory field [exchangeServer]"; }
- if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); }
-
- $filter = '(&(objectCategory=msExchStorageGroup))';
- $sr = @ldap_search($this->adldap->getLdapConnection(), $exchangeServer, $filter, $attributes);
- $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- if ($recursive === true) {
- for ($i=0; $i<$entries['count']; $i++) {
- $entries[$i]['msexchprivatemdb'] = $this->storageDatabases($entries[$i]['distinguishedname'][0]);
- }
- }
-
- return $entries;
- }
-
- /**
- * Returns a list of Databases within any given storage group in Exchange for a given mail server
- *
- * @param string $storageGroup The full DN of an Storage Group. You can use exchange_storage_groups() to find the DN
- * @param array $attributes An array of the AD attributes you wish to return
- * @return array
- */
- public function storageDatabases($storageGroup, $attributes = array('cn','distinguishedname','displayname')) {
- if (!$this->adldap->getLdapBind()){ return false; }
- if ($storageGroup === NULL) { return "Missing compulsory field [storageGroup]"; }
-
- $filter = '(&(objectCategory=msExchPrivateMDB))';
- $sr = @ldap_search($this->adldap->getLdapConnection(), $storageGroup, $filter, $attributes);
- $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr);
- return $entries;
- }
-}
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @subpackage Exchange + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 97 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ + */ +require_once(dirname(__FILE__) . '/../adLDAP.php'); + +/** +* MICROSOFT EXCHANGE FUNCTIONS +*/ +class adLDAPExchange { + /** + * The current adLDAP connection via dependency injection + * + * @var adLDAP + */ + protected $adldap; + + public function __construct(adLDAP $adldap) { + $this->adldap = $adldap; + } + + /** + * Create an Exchange account + * + * @param string $username The username of the user to add the Exchange account to + * @param array $storageGroup The mailbox, Exchange Storage Group, for the user account, this must be a full CN + * If the storage group has a different base_dn to the adLDAP configuration, set it using $base_dn + * @param string $emailAddress The primary email address to add to this user + * @param string $mailNickname The mail nick name. If mail nickname is blank, the username will be used + * @param bool $mdbUseDefaults Indicates whether the store should use the default quota, rather than the per-mailbox quota. + * @param string $baseDn Specify an alternative base_dn for the Exchange storage group + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return bool + */ + public function createMailbox($username, $storageGroup, $emailAddress, $mailNickname=NULL, $useDefaults=TRUE, $baseDn=NULL, $isGUID=false) + { + if ($username === NULL){ return "Missing compulsory field [username]"; } + if ($storageGroup === NULL) { return "Missing compulsory array [storagegroup]"; } + if (!is_array($storageGroup)) { return "[storagegroup] must be an array"; } + if ($emailAddress === NULL) { return "Missing compulsory field [emailAddress]"; } + + if ($baseDn === NULL) { + $baseDn = $this->adldap->getBaseDn(); + } + + $container = "CN=" . implode(",CN=", $storageGroup); + + if ($mailNickname === NULL) { + $mailNickname = $username; + } + $mdbUseDefaults = $this->adldap->utilities()->boolToString($useDefaults); + + $attributes = array( + 'exchange_homemdb'=>$container.",".$baseDn, + 'exchange_proxyaddress'=>'SMTP:' . $emailAddress, + 'exchange_mailnickname'=>$mailNickname, + 'exchange_usedefaults'=>$mdbUseDefaults + ); + $result = $this->adldap->user()->modify($username, $attributes, $isGUID); + if ($result == false) { + return false; + } + return true; + } + + /** + * Add an X400 address to Exchange + * See http://tools.ietf.org/html/rfc1685 for more information. + * An X400 Address looks similar to this X400:c=US;a= ;p=Domain;o=Organization;s=Doe;g=John; + * + * @param string $username The username of the user to add the X400 to to + * @param string $country Country + * @param string $admd Administration Management Domain + * @param string $pdmd Private Management Domain (often your AD domain) + * @param string $org Organization + * @param string $surname Surname + * @param string $givenName Given name + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return bool + */ + public function addX400($username, $country, $admd, $pdmd, $org, $surname, $givenName, $isGUID=false) + { + if ($username === NULL){ return "Missing compulsory field [username]"; } + + $proxyValue = 'X400:'; + + // Find the dn of the user + $user = $this->adldap->user()->info($username, array("cn","proxyaddresses"), $isGUID); + if ($user[0]["dn"] === NULL) { return false; } + $userDn = $user[0]["dn"]; + + // We do not have to demote an email address from the default so we can just add the new proxy address + $attributes['exchange_proxyaddress'] = $proxyValue . 'c=' . $country . ';a=' . $admd . ';p=' . $pdmd . ';o=' . $org . ';s=' . $surname . ';g=' . $givenName . ';'; + + // Translate the update to the LDAP schema + $add = $this->adldap->adldap_schema($attributes); + + if (!$add) { return false; } + + // Do the update + // Take out the @ to see any errors, usually this error might occur because the address already + // exists in the list of proxyAddresses + $result = @ldap_mod_add($this->adldap->getLdapConnection(), $userDn, $add); + if ($result == false) { + return false; + } + + return true; + } + + /** + * Add an address to Exchange + * + * @param string $username The username of the user to add the Exchange account to + * @param string $emailAddress The email address to add to this user + * @param bool $default Make this email address the default address, this is a bit more intensive as we have to demote any existing default addresses + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return bool + */ + public function addAddress($username, $emailAddress, $default = FALSE, $isGUID = false) + { + if ($username === NULL) { return "Missing compulsory field [username]"; } + if ($emailAddress === NULL) { return "Missing compulsory fields [emailAddress]"; } + + $proxyValue = 'smtp:'; + if ($default === true) { + $proxyValue = 'SMTP:'; + } + + // Find the dn of the user + $user = $this->adldap->user()->info($username, array("cn","proxyaddresses"), $isGUID); + if ($user[0]["dn"] === NULL){ return false; } + $userDn = $user[0]["dn"]; + + // We need to scan existing proxy addresses and demote the default one + if (is_array($user[0]["proxyaddresses"]) && $default === true) { + $modAddresses = array(); + for ($i=0;$i<sizeof($user[0]['proxyaddresses']);$i++) { + if (strstr($user[0]['proxyaddresses'][$i], 'SMTP:') !== false) { + $user[0]['proxyaddresses'][$i] = str_replace('SMTP:', 'smtp:', $user[0]['proxyaddresses'][$i]); + } + if ($user[0]['proxyaddresses'][$i] != '') { + $modAddresses['proxyAddresses'][$i] = $user[0]['proxyaddresses'][$i]; + } + } + $modAddresses['proxyAddresses'][(sizeof($user[0]['proxyaddresses'])-1)] = 'SMTP:' . $emailAddress; + + $result = @ldap_mod_replace($this->adldap->getLdapConnection(), $userDn, $modAddresses); + if ($result == false) { + return false; + } + + return true; + } + else { + // We do not have to demote an email address from the default so we can just add the new proxy address + $attributes['exchange_proxyaddress'] = $proxyValue . $emailAddress; + + // Translate the update to the LDAP schema + $add = $this->adldap->adldap_schema($attributes); + + if (!$add) { + return false; + } + + // Do the update + // Take out the @ to see any errors, usually this error might occur because the address already + // exists in the list of proxyAddresses + $result = @ldap_mod_add($this->adldap->getLdapConnection(), $userDn,$add); + if ($result == false) { + return false; + } + + return true; + } + } + + /** + * Remove an address to Exchange + * If you remove a default address the account will no longer have a default, + * we recommend changing the default address first + * + * @param string $username The username of the user to add the Exchange account to + * @param string $emailAddress The email address to add to this user + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return bool + */ + public function deleteAddress($username, $emailAddress, $isGUID=false) + { + if ($username === NULL) { return "Missing compulsory field [username]"; } + if ($emailAddress === NULL) { return "Missing compulsory fields [emailAddress]"; } + + // Find the dn of the user + $user = $this->adldap->user()->info($username, array("cn","proxyaddresses"), $isGUID); + if ($user[0]["dn"] === NULL) { return false; } + $userDn = $user[0]["dn"]; + + if (is_array($user[0]["proxyaddresses"])) { + $mod = array(); + for ($i=0;$i<sizeof($user[0]['proxyaddresses']);$i++) { + if (strstr($user[0]['proxyaddresses'][$i], 'SMTP:') !== false && $user[0]['proxyaddresses'][$i] == 'SMTP:' . $emailAddress) { + $mod['proxyAddresses'][0] = 'SMTP:' . $emailAddress; + } + elseif (strstr($user[0]['proxyaddresses'][$i], 'smtp:') !== false && $user[0]['proxyaddresses'][$i] == 'smtp:' . $emailAddress) { + $mod['proxyAddresses'][0] = 'smtp:' . $emailAddress; + } + } + + $result = @ldap_mod_del($this->adldap->getLdapConnection(), $userDn,$mod); + if ($result == false) { + return false; + } + + return true; + } + else { + return false; + } + } + /** + * Change the default address + * + * @param string $username The username of the user to add the Exchange account to + * @param string $emailAddress The email address to make default + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return bool + */ + public function primaryAddress($username, $emailAddress, $isGUID = false) + { + if ($username === NULL) { return "Missing compulsory field [username]"; } + if ($emailAddress === NULL) { return "Missing compulsory fields [emailAddress]"; } + + // Find the dn of the user + $user = $this->adldap->user()->info($username, array("cn","proxyaddresses"), $isGUID); + if ($user[0]["dn"] === NULL){ return false; } + $userDn = $user[0]["dn"]; + + if (is_array($user[0]["proxyaddresses"])) { + $modAddresses = array(); + for ($i=0;$i<sizeof($user[0]['proxyaddresses']);$i++) { + if (strstr($user[0]['proxyaddresses'][$i], 'SMTP:') !== false) { + $user[0]['proxyaddresses'][$i] = str_replace('SMTP:', 'smtp:', $user[0]['proxyaddresses'][$i]); + } + if ($user[0]['proxyaddresses'][$i] == 'smtp:' . $emailAddress) { + $user[0]['proxyaddresses'][$i] = str_replace('smtp:', 'SMTP:', $user[0]['proxyaddresses'][$i]); + } + if ($user[0]['proxyaddresses'][$i] != '') { + $modAddresses['proxyAddresses'][$i] = $user[0]['proxyaddresses'][$i]; + } + } + + $result = @ldap_mod_replace($this->adldap->getLdapConnection(), $userDn, $modAddresses); + if ($result == false) { + return false; + } + + return true; + } + + } + + /** + * Mail enable a contact + * Allows email to be sent to them through Exchange + * + * @param string $distinguishedName The contact to mail enable + * @param string $emailAddress The email address to allow emails to be sent through + * @param string $mailNickname The mailnickname for the contact in Exchange. If NULL this will be set to the display name + * @return bool + */ + public function contactMailEnable($distinguishedName, $emailAddress, $mailNickname = NULL) + { + if ($distinguishedName === NULL) { return "Missing compulsory field [distinguishedName]"; } + if ($emailAddress === NULL) { return "Missing compulsory field [emailAddress]"; } + + if ($mailNickname !== NULL) { + // Find the dn of the user + $user = $this->adldap->contact()->info($distinguishedName, array("cn","displayname")); + if ($user[0]["displayname"] === NULL) { return false; } + $mailNickname = $user[0]['displayname'][0]; + } + + $attributes = array("email"=>$emailAddress,"contact_email"=>"SMTP:" . $emailAddress,"exchange_proxyaddress"=>"SMTP:" . $emailAddress,"exchange_mailnickname" => $mailNickname); + + // Translate the update to the LDAP schema + $mod = $this->adldap->adldap_schema($attributes); + + // Check to see if this is an enabled status update + if (!$mod) { return false; } + + // Do the update + $result = ldap_modify($this->adldap->getLdapConnection(), $distinguishedName, $mod); + if ($result == false) { return false; } + + return true; + } + + /** + * Returns a list of Exchange Servers in the ConfigurationNamingContext of the domain + * + * @param array $attributes An array of the AD attributes you wish to return + * @return array + */ + public function servers($attributes = array('cn','distinguishedname','serialnumber')) + { + if (!$this->adldap->getLdapBind()){ return false; } + + $configurationNamingContext = $this->adldap->getRootDse(array('configurationnamingcontext')); + $sr = @ldap_search($this->adldap->getLdapConnection(), $configurationNamingContext[0]['configurationnamingcontext'][0],'(&(objectCategory=msExchExchangeServer))', $attributes); + $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr); + return $entries; + } + + /** + * Returns a list of Storage Groups in Exchange for a given mail server + * + * @param string $exchangeServer The full DN of an Exchange server. You can use exchange_servers() to find the DN for your server + * @param array $attributes An array of the AD attributes you wish to return + * @param bool $recursive If enabled this will automatically query the databases within a storage group + * @return array + */ + public function storageGroups($exchangeServer, $attributes = array('cn','distinguishedname'), $recursive = NULL) + { + if (!$this->adldap->getLdapBind()){ return false; } + if ($exchangeServer === NULL) { return "Missing compulsory field [exchangeServer]"; } + if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } + + $filter = '(&(objectCategory=msExchStorageGroup))'; + $sr = @ldap_search($this->adldap->getLdapConnection(), $exchangeServer, $filter, $attributes); + $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + if ($recursive === true) { + for ($i=0; $i<$entries['count']; $i++) { + $entries[$i]['msexchprivatemdb'] = $this->storageDatabases($entries[$i]['distinguishedname'][0]); + } + } + + return $entries; + } + + /** + * Returns a list of Databases within any given storage group in Exchange for a given mail server + * + * @param string $storageGroup The full DN of an Storage Group. You can use exchange_storage_groups() to find the DN + * @param array $attributes An array of the AD attributes you wish to return + * @return array + */ + public function storageDatabases($storageGroup, $attributes = array('cn','distinguishedname','displayname')) { + if (!$this->adldap->getLdapBind()){ return false; } + if ($storageGroup === NULL) { return "Missing compulsory field [storageGroup]"; } + + $filter = '(&(objectCategory=msExchPrivateMDB))'; + $sr = @ldap_search($this->adldap->getLdapConnection(), $storageGroup, $filter, $attributes); + $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr); + return $entries; + } +} ?>
\ No newline at end of file diff --git a/lib/plugins/authad/adLDAP/classes/adLDAPFolders.php b/lib/plugins/authad/adLDAP/classes/adLDAPFolders.php index 55120152d..67b1474db 100644 --- a/lib/plugins/authad/adLDAP/classes/adLDAPFolders.php +++ b/lib/plugins/authad/adLDAP/classes/adLDAPFolders.php @@ -1,179 +1,179 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @subpackage Folders
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 97 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
- */
-require_once(dirname(__FILE__) . '/../adLDAP.php');
-
-/**
-* FOLDER / OU MANAGEMENT FUNCTIONS
-*/
-class adLDAPFolders {
- /**
- * The current adLDAP connection via dependency injection
- *
- * @var adLDAP
- */
- protected $adldap;
-
- public function __construct(adLDAP $adldap) {
- $this->adldap = $adldap;
- }
-
- /**
- * Delete a distinguished name from Active Directory
- * You should never need to call this yourself, just use the wrapper functions user_delete and contact_delete
- *
- * @param string $dn The distinguished name to delete
- * @return bool
- */
- public function delete($dn){
- $result = ldap_delete($this->adldap->getLdapConnection(), $dn);
- if ($result != true) {
- return false;
- }
- return true;
- }
-
- /**
- * Returns a folder listing for a specific OU
- * See http://adldap.sourceforge.net/wiki/doku.php?id=api_folder_functions
- *
- * @param array $folderName An array to the OU you wish to list.
- * If set to NULL will list the root, strongly recommended to set
- * $recursive to false in that instance!
- * @param string $dnType The type of record to list. This can be ADLDAP_FOLDER or ADLDAP_CONTAINER.
- * @param bool $recursive Recursively search sub folders
- * @param bool $type Specify a type of object to search for
- * @return array
- */
- public function listing($folderName = NULL, $dnType = adLDAP::ADLDAP_FOLDER, $recursive = NULL, $type = NULL)
- {
- if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } //use the default option if they haven't set it
- if (!$this->adldap->getLdapBind()) { return false; }
-
- $filter = '(&';
- if ($type !== NULL) {
- switch ($type) {
- case 'contact':
- $filter .= '(objectClass=contact)';
- break;
- case 'computer':
- $filter .= '(objectClass=computer)';
- break;
- case 'group':
- $filter .= '(objectClass=group)';
- break;
- case 'folder':
- $filter .= '(objectClass=organizationalUnit)';
- break;
- case 'container':
- $filter .= '(objectClass=container)';
- break;
- case 'domain':
- $filter .= '(objectClass=builtinDomain)';
- break;
- default:
- $filter .= '(objectClass=user)';
- break;
- }
- }
- else {
- $filter .= '(objectClass=*)';
- }
- // If the folder name is null then we will search the root level of AD
- // This requires us to not have an OU= part, just the base_dn
- $searchOu = $this->adldap->getBaseDn();
- if (is_array($folderName)) {
- $ou = $dnType . "=" . implode("," . $dnType . "=", $folderName);
- $filter .= '(!(distinguishedname=' . $ou . ',' . $this->adldap->getBaseDn() . ')))';
- $searchOu = $ou . ',' . $this->adldap->getBaseDn();
- }
- else {
- $filter .= '(!(distinguishedname=' . $this->adldap->getBaseDn() . ')))';
- }
-
- if ($recursive === true) {
- $sr = ldap_search($this->adldap->getLdapConnection(), $searchOu, $filter, array('objectclass', 'distinguishedname', 'samaccountname'));
- $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr);
- if (is_array($entries)) {
- return $entries;
- }
- }
- else {
- $sr = ldap_list($this->adldap->getLdapConnection(), $searchOu, $filter, array('objectclass', 'distinguishedname', 'samaccountname'));
- $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr);
- if (is_array($entries)) {
- return $entries;
- }
- }
-
- return false;
- }
-
- /**
- * Create an organizational unit
- *
- * @param array $attributes Default attributes of the ou
- * @return bool
- */
- public function create($attributes)
- {
- if (!is_array($attributes)){ return "Attributes must be an array"; }
- if (!is_array($attributes["container"])) { return "Container attribute must be an array."; }
- if (!array_key_exists("ou_name",$attributes)) { return "Missing compulsory field [ou_name]"; }
- if (!array_key_exists("container",$attributes)) { return "Missing compulsory field [container]"; }
-
- $attributes["container"] = array_reverse($attributes["container"]);
-
- $add=array();
- $add["objectClass"] = "organizationalUnit";
- $add["OU"] = $attributes['ou_name'];
- $containers = "";
- if (count($attributes['container']) > 0) {
- $containers = "OU=" . implode(",OU=", $attributes["container"]) . ",";
- }
-
- $containers = "OU=" . implode(",OU=", $attributes["container"]);
- $result = ldap_add($this->adldap->getLdapConnection(), "OU=" . $add["OU"] . ", " . $containers . $this->adldap->getBaseDn(), $add);
- if ($result != true) {
- return false;
- }
-
- return true;
- }
-
-}
-
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @subpackage Folders + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 97 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ + */ +require_once(dirname(__FILE__) . '/../adLDAP.php'); + +/** +* FOLDER / OU MANAGEMENT FUNCTIONS +*/ +class adLDAPFolders { + /** + * The current adLDAP connection via dependency injection + * + * @var adLDAP + */ + protected $adldap; + + public function __construct(adLDAP $adldap) { + $this->adldap = $adldap; + } + + /** + * Delete a distinguished name from Active Directory + * You should never need to call this yourself, just use the wrapper functions user_delete and contact_delete + * + * @param string $dn The distinguished name to delete + * @return bool + */ + public function delete($dn){ + $result = ldap_delete($this->adldap->getLdapConnection(), $dn); + if ($result != true) { + return false; + } + return true; + } + + /** + * Returns a folder listing for a specific OU + * See http://adldap.sourceforge.net/wiki/doku.php?id=api_folder_functions + * + * @param array $folderName An array to the OU you wish to list. + * If set to NULL will list the root, strongly recommended to set + * $recursive to false in that instance! + * @param string $dnType The type of record to list. This can be ADLDAP_FOLDER or ADLDAP_CONTAINER. + * @param bool $recursive Recursively search sub folders + * @param bool $type Specify a type of object to search for + * @return array + */ + public function listing($folderName = NULL, $dnType = adLDAP::ADLDAP_FOLDER, $recursive = NULL, $type = NULL) + { + if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } //use the default option if they haven't set it + if (!$this->adldap->getLdapBind()) { return false; } + + $filter = '(&'; + if ($type !== NULL) { + switch ($type) { + case 'contact': + $filter .= '(objectClass=contact)'; + break; + case 'computer': + $filter .= '(objectClass=computer)'; + break; + case 'group': + $filter .= '(objectClass=group)'; + break; + case 'folder': + $filter .= '(objectClass=organizationalUnit)'; + break; + case 'container': + $filter .= '(objectClass=container)'; + break; + case 'domain': + $filter .= '(objectClass=builtinDomain)'; + break; + default: + $filter .= '(objectClass=user)'; + break; + } + } + else { + $filter .= '(objectClass=*)'; + } + // If the folder name is null then we will search the root level of AD + // This requires us to not have an OU= part, just the base_dn + $searchOu = $this->adldap->getBaseDn(); + if (is_array($folderName)) { + $ou = $dnType . "=" . implode("," . $dnType . "=", $folderName); + $filter .= '(!(distinguishedname=' . $ou . ',' . $this->adldap->getBaseDn() . ')))'; + $searchOu = $ou . ',' . $this->adldap->getBaseDn(); + } + else { + $filter .= '(!(distinguishedname=' . $this->adldap->getBaseDn() . ')))'; + } + + if ($recursive === true) { + $sr = ldap_search($this->adldap->getLdapConnection(), $searchOu, $filter, array('objectclass', 'distinguishedname', 'samaccountname')); + $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr); + if (is_array($entries)) { + return $entries; + } + } + else { + $sr = ldap_list($this->adldap->getLdapConnection(), $searchOu, $filter, array('objectclass', 'distinguishedname', 'samaccountname')); + $entries = @ldap_get_entries($this->adldap->getLdapConnection(), $sr); + if (is_array($entries)) { + return $entries; + } + } + + return false; + } + + /** + * Create an organizational unit + * + * @param array $attributes Default attributes of the ou + * @return bool + */ + public function create($attributes) + { + if (!is_array($attributes)){ return "Attributes must be an array"; } + if (!is_array($attributes["container"])) { return "Container attribute must be an array."; } + if (!array_key_exists("ou_name",$attributes)) { return "Missing compulsory field [ou_name]"; } + if (!array_key_exists("container",$attributes)) { return "Missing compulsory field [container]"; } + + $attributes["container"] = array_reverse($attributes["container"]); + + $add=array(); + $add["objectClass"] = "organizationalUnit"; + $add["OU"] = $attributes['ou_name']; + $containers = ""; + if (count($attributes['container']) > 0) { + $containers = "OU=" . implode(",OU=", $attributes["container"]) . ","; + } + + $containers = "OU=" . implode(",OU=", $attributes["container"]); + $result = ldap_add($this->adldap->getLdapConnection(), "OU=" . $add["OU"] . ", " . $containers . $this->adldap->getBaseDn(), $add); + if ($result != true) { + return false; + } + + return true; + } + +} + ?>
\ No newline at end of file diff --git a/lib/plugins/authad/adLDAP/classes/adLDAPGroups.php b/lib/plugins/authad/adLDAP/classes/adLDAPGroups.php index 05e4cc93b..94bc04853 100644 --- a/lib/plugins/authad/adLDAP/classes/adLDAPGroups.php +++ b/lib/plugins/authad/adLDAP/classes/adLDAPGroups.php @@ -1,631 +1,631 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @subpackage Groups
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 97 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
- */
-require_once(dirname(__FILE__) . '/../adLDAP.php');
-require_once(dirname(__FILE__) . '/../collections/adLDAPGroupCollection.php');
-
-/**
-* GROUP FUNCTIONS
-*/
-class adLDAPGroups {
- /**
- * The current adLDAP connection via dependency injection
- *
- * @var adLDAP
- */
- protected $adldap;
-
- public function __construct(adLDAP $adldap) {
- $this->adldap = $adldap;
- }
-
- /**
- * Add a group to a group
- *
- * @param string $parent The parent group name
- * @param string $child The child group name
- * @return bool
- */
- public function addGroup($parent,$child){
-
- // Find the parent group's dn
- $parentGroup = $this->ginfo($parent, array("cn"));
- if ($parentGroup[0]["dn"] === NULL){
- return false;
- }
- $parentDn = $parentGroup[0]["dn"];
-
- // Find the child group's dn
- $childGroup = $this->info($child, array("cn"));
- if ($childGroup[0]["dn"] === NULL){
- return false;
- }
- $childDn = $childGroup[0]["dn"];
-
- $add = array();
- $add["member"] = $childDn;
-
- $result = @ldap_mod_add($this->adldap->getLdapConnection(), $parentDn, $add);
- if ($result == false) {
- return false;
- }
- return true;
- }
-
- /**
- * Add a user to a group
- *
- * @param string $group The group to add the user to
- * @param string $user The user to add to the group
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return bool
- */
- public function addUser($group, $user, $isGUID = false)
- {
- // Adding a user is a bit fiddly, we need to get the full DN of the user
- // and add it using the full DN of the group
-
- // Find the user's dn
- $userDn = $this->adldap->user()->dn($user, $isGUID);
- if ($userDn === false) {
- return false;
- }
-
- // Find the group's dn
- $groupInfo = $this->info($group, array("cn"));
- if ($groupInfo[0]["dn"] === NULL) {
- return false;
- }
- $groupDn = $groupInfo[0]["dn"];
-
- $add = array();
- $add["member"] = $userDn;
-
- $result = @ldap_mod_add($this->adldap->getLdapConnection(), $groupDn, $add);
- if ($result == false) {
- return false;
- }
- return true;
- }
-
- /**
- * Add a contact to a group
- *
- * @param string $group The group to add the contact to
- * @param string $contactDn The DN of the contact to add
- * @return bool
- */
- public function addContact($group, $contactDn)
- {
- // To add a contact we take the contact's DN
- // and add it using the full DN of the group
-
- // Find the group's dn
- $groupInfo = $this->info($group, array("cn"));
- if ($groupInfo[0]["dn"] === NULL) {
- return false;
- }
- $groupDn = $groupInfo[0]["dn"];
-
- $add = array();
- $add["member"] = $contactDn;
-
- $result = @ldap_mod_add($this->adldap->getLdapConnection(), $groupDn, $add);
- if ($result == false) {
- return false;
- }
- return true;
- }
-
- /**
- * Create a group
- *
- * @param array $attributes Default attributes of the group
- * @return bool
- */
- public function create($attributes)
- {
- if (!is_array($attributes)){ return "Attributes must be an array"; }
- if (!array_key_exists("group_name", $attributes)){ return "Missing compulsory field [group_name]"; }
- if (!array_key_exists("container", $attributes)){ return "Missing compulsory field [container]"; }
- if (!array_key_exists("description", $attributes)){ return "Missing compulsory field [description]"; }
- if (!is_array($attributes["container"])){ return "Container attribute must be an array."; }
- $attributes["container"] = array_reverse($attributes["container"]);
-
- //$member_array = array();
- //$member_array[0] = "cn=user1,cn=Users,dc=yourdomain,dc=com";
- //$member_array[1] = "cn=administrator,cn=Users,dc=yourdomain,dc=com";
-
- $add = array();
- $add["cn"] = $attributes["group_name"];
- $add["samaccountname"] = $attributes["group_name"];
- $add["objectClass"] = "Group";
- $add["description"] = $attributes["description"];
- //$add["member"] = $member_array; UNTESTED
-
- $container = "OU=" . implode(",OU=", $attributes["container"]);
- $result = ldap_add($this->adldap->getLdapConnection(), "CN=" . $add["cn"] . ", " . $container . "," . $this->adldap->getBaseDn(), $add);
- if ($result != true) {
- return false;
- }
- return true;
- }
-
- /**
- * Delete a group account
- *
- * @param string $group The group to delete (please be careful here!)
- *
- * @return array
- */
- public function delete($group) {
- if (!$this->adldap->getLdapBind()){ return false; }
- if ($group === null){ return "Missing compulsory field [group]"; }
-
- $groupInfo = $this->info($group, array("*"));
- $dn = $groupInfo[0]['distinguishedname'][0];
- $result = $this->adldap->folder()->delete($dn);
- if ($result !== true) {
- return false;
- } return true;
- }
-
- /**
- * Remove a group from a group
- *
- * @param string $parent The parent group name
- * @param string $child The child group name
- * @return bool
- */
- public function removeGroup($parent , $child)
- {
-
- // Find the parent dn
- $parentGroup = $this->info($parent, array("cn"));
- if ($parentGroup[0]["dn"] === NULL) {
- return false;
- }
- $parentDn = $parentGroup[0]["dn"];
-
- // Find the child dn
- $childGroup = $this->info($child, array("cn"));
- if ($childGroup[0]["dn"] === NULL) {
- return false;
- }
- $childDn = $childGroup[0]["dn"];
-
- $del = array();
- $del["member"] = $childDn;
-
- $result = @ldap_mod_del($this->adldap->getLdapConnection(), $parentDn, $del);
- if ($result == false) {
- return false;
- }
- return true;
- }
-
- /**
- * Remove a user from a group
- *
- * @param string $group The group to remove a user from
- * @param string $user The AD user to remove from the group
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return bool
- */
- public function removeUser($group, $user, $isGUID = false)
- {
-
- // Find the parent dn
- $groupInfo = $this->info($group, array("cn"));
- if ($groupInfo[0]["dn"] === NULL){
- return false;
- }
- $groupDn = $groupInfo[0]["dn"];
-
- // Find the users dn
- $userDn = $this->adldap->user()->dn($user, $isGUID);
- if ($userDn === false) {
- return false;
- }
-
- $del = array();
- $del["member"] = $userDn;
-
- $result = @ldap_mod_del($this->adldap->getLdapConnection(), $groupDn, $del);
- if ($result == false) {
- return false;
- }
- return true;
- }
-
- /**
- * Remove a contact from a group
- *
- * @param string $group The group to remove a user from
- * @param string $contactDn The DN of a contact to remove from the group
- * @return bool
- */
- public function removeContact($group, $contactDn)
- {
-
- // Find the parent dn
- $groupInfo = $this->info($group, array("cn"));
- if ($groupInfo[0]["dn"] === NULL) {
- return false;
- }
- $groupDn = $groupInfo[0]["dn"];
-
- $del = array();
- $del["member"] = $contactDn;
-
- $result = @ldap_mod_del($this->adldap->getLdapConnection(), $groupDn, $del);
- if ($result == false) {
- return false;
- }
- return true;
- }
-
- /**
- * Return a list of groups in a group
- *
- * @param string $group The group to query
- * @param bool $recursive Recursively get groups
- * @return array
- */
- public function inGroup($group, $recursive = NULL)
- {
- if (!$this->adldap->getLdapBind()){ return false; }
- if ($recursive === NULL){ $recursive = $this->adldap->getRecursiveGroups(); } // Use the default option if they haven't set it
-
- // Search the directory for the members of a group
- $info = $this->info($group, array("member","cn"));
- $groups = $info[0]["member"];
- if (!is_array($groups)) {
- return false;
- }
-
- $groupArray = array();
-
- for ($i=0; $i<$groups["count"]; $i++){
- $filter = "(&(objectCategory=group)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($groups[$i]) . "))";
- $fields = array("samaccountname", "distinguishedname", "objectClass");
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- // not a person, look for a group
- if ($entries['count'] == 0 && $recursive == true) {
- $filter = "(&(objectCategory=group)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($groups[$i]) . "))";
- $fields = array("distinguishedname");
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
- if (!isset($entries[0]['distinguishedname'][0])) {
- continue;
- }
- $subGroups = $this->inGroup($entries[0]['distinguishedname'][0], $recursive);
- if (is_array($subGroups)) {
- $groupArray = array_merge($groupArray, $subGroups);
- $groupArray = array_unique($groupArray);
- }
- continue;
- }
-
- $groupArray[] = $entries[0]['distinguishedname'][0];
- }
- return $groupArray;
- }
-
- /**
- * Return a list of members in a group
- *
- * @param string $group The group to query
- * @param bool $recursive Recursively get group members
- * @return array
- */
- public function members($group, $recursive = NULL)
- {
- if (!$this->adldap->getLdapBind()){ return false; }
- if ($recursive === NULL){ $recursive = $this->adldap->getRecursiveGroups(); } // Use the default option if they haven't set it
- // Search the directory for the members of a group
- $info = $this->info($group, array("member","cn"));
- $users = $info[0]["member"];
- if (!is_array($users)) {
- return false;
- }
-
- $userArray = array();
-
- for ($i=0; $i<$users["count"]; $i++){
- $filter = "(&(objectCategory=person)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($users[$i]) . "))";
- $fields = array("samaccountname", "distinguishedname", "objectClass");
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- // not a person, look for a group
- if ($entries['count'] == 0 && $recursive == true) {
- $filter = "(&(objectCategory=group)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($users[$i]) . "))";
- $fields = array("samaccountname");
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
- if (!isset($entries[0]['samaccountname'][0])) {
- continue;
- }
- $subUsers = $this->members($entries[0]['samaccountname'][0], $recursive);
- if (is_array($subUsers)) {
- $userArray = array_merge($userArray, $subUsers);
- $userArray = array_unique($userArray);
- }
- continue;
- }
- else if ($entries['count'] == 0) {
- continue;
- }
-
- if ((!isset($entries[0]['samaccountname'][0]) || $entries[0]['samaccountname'][0] === NULL) && $entries[0]['distinguishedname'][0] !== NULL) {
- $userArray[] = $entries[0]['distinguishedname'][0];
- }
- else if ($entries[0]['samaccountname'][0] !== NULL) {
- $userArray[] = $entries[0]['samaccountname'][0];
- }
- }
- return $userArray;
- }
-
- /**
- * Group Information. Returns an array of raw information about a group.
- * The group name is case sensitive
- *
- * @param string $groupName The group name to retrieve info about
- * @param array $fields Fields to retrieve
- * @return array
- */
- public function info($groupName, $fields = NULL)
- {
- if ($groupName === NULL) { return false; }
- if (!$this->adldap->getLdapBind()) { return false; }
-
- if (stristr($groupName, '+')) {
- $groupName = stripslashes($groupName);
- }
-
- $filter = "(&(objectCategory=group)(name=" . $this->adldap->utilities()->ldapSlashes($groupName) . "))";
- if ($fields === NULL) {
- $fields = array("member","memberof","cn","description","distinguishedname","objectcategory","samaccountname");
- }
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- return $entries;
- }
-
- /**
- * Group Information. Returns an collection
- * The group name is case sensitive
- *
- * @param string $groupName The group name to retrieve info about
- * @param array $fields Fields to retrieve
- * @return adLDAPGroupCollection
- */
- public function infoCollection($groupName, $fields = NULL)
- {
- if ($groupName === NULL) { return false; }
- if (!$this->adldap->getLdapBind()) { return false; }
-
- $info = $this->info($groupName, $fields);
- if ($info !== false) {
- $collection = new adLDAPGroupCollection($info, $this->adldap);
- return $collection;
- }
- return false;
- }
-
- /**
- * Return a complete list of "groups in groups"
- *
- * @param string $group The group to get the list from
- * @return array
- */
- public function recursiveGroups($group)
- {
- if ($group === NULL) { return false; }
-
- $stack = array();
- $processed = array();
- $retGroups = array();
-
- array_push($stack, $group); // Initial Group to Start with
- while (count($stack) > 0) {
- $parent = array_pop($stack);
- array_push($processed, $parent);
-
- $info = $this->info($parent, array("memberof"));
-
- if (isset($info[0]["memberof"]) && is_array($info[0]["memberof"])) {
- $groups = $info[0]["memberof"];
- if ($groups) {
- $groupNames = $this->adldap->utilities()->niceNames($groups);
- $retGroups = array_merge($retGroups, $groupNames); //final groups to return
- foreach ($groupNames as $id => $groupName) {
- if (!in_array($groupName, $processed)) {
- array_push($stack, $groupName);
- }
- }
- }
- }
- }
-
- return $retGroups;
- }
-
- /**
- * Returns a complete list of the groups in AD based on a SAM Account Type
- *
- * @param string $sAMAaccountType The account type to return
- * @param bool $includeDescription Whether to return a description
- * @param string $search Search parameters
- * @param bool $sorted Whether to sort the results
- * @return array
- */
- public function search($sAMAaccountType = adLDAP::ADLDAP_SECURITY_GLOBAL_GROUP, $includeDescription = false, $search = "*", $sorted = true) {
- if (!$this->adldap->getLdapBind()) { return false; }
-
- $filter = '(&(objectCategory=group)';
- if ($sAMAaccountType !== null) {
- $filter .= '(samaccounttype='. $sAMAaccountType .')';
- }
- $filter .= '(cn=' . $search . '))';
- // Perform the search and grab all their details
- $fields = array("samaccountname", "description");
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- $groupsArray = array();
- for ($i=0; $i<$entries["count"]; $i++){
- if ($includeDescription && strlen($entries[$i]["description"][0]) > 0 ) {
- $groupsArray[$entries[$i]["samaccountname"][0]] = $entries[$i]["description"][0];
- }
- else if ($includeDescription){
- $groupsArray[$entries[$i]["samaccountname"][0]] = $entries[$i]["samaccountname"][0];
- }
- else {
- array_push($groupsArray, $entries[$i]["samaccountname"][0]);
- }
- }
- if ($sorted) {
- asort($groupsArray);
- }
- return $groupsArray;
- }
-
- /**
- * Returns a complete list of all groups in AD
- *
- * @param bool $includeDescription Whether to return a description
- * @param string $search Search parameters
- * @param bool $sorted Whether to sort the results
- * @return array
- */
- public function all($includeDescription = false, $search = "*", $sorted = true){
- $groupsArray = $this->search(null, $includeDescription, $search, $sorted);
- return $groupsArray;
- }
-
- /**
- * Returns a complete list of security groups in AD
- *
- * @param bool $includeDescription Whether to return a description
- * @param string $search Search parameters
- * @param bool $sorted Whether to sort the results
- * @return array
- */
- public function allSecurity($includeDescription = false, $search = "*", $sorted = true){
- $groupsArray = $this->search(adLDAP::ADLDAP_SECURITY_GLOBAL_GROUP, $includeDescription, $search, $sorted);
- return $groupsArray;
- }
-
- /**
- * Returns a complete list of distribution lists in AD
- *
- * @param bool $includeDescription Whether to return a description
- * @param string $search Search parameters
- * @param bool $sorted Whether to sort the results
- * @return array
- */
- public function allDistribution($includeDescription = false, $search = "*", $sorted = true){
- $groupsArray = $this->search(adLDAP::ADLDAP_DISTRIBUTION_GROUP, $includeDescription, $search, $sorted);
- return $groupsArray;
- }
-
- /**
- * Coping with AD not returning the primary group
- * http://support.microsoft.com/?kbid=321360
- *
- * This is a re-write based on code submitted by Bruce which prevents the
- * need to search each security group to find the true primary group
- *
- * @param string $gid Group ID
- * @param string $usersid User's Object SID
- * @return mixed
- */
- public function getPrimaryGroup($gid, $usersid)
- {
- if ($gid === NULL || $usersid === NULL) { return false; }
- $sr = false;
-
- $gsid = substr_replace($usersid, pack('V',$gid), strlen($usersid)-4,4);
- $filter = '(objectsid=' . $this->adldap->utilities()->getTextSID($gsid).')';
- $fields = array("samaccountname","distinguishedname");
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- if (isset($entries[0]['distinguishedname'][0])) {
- return $entries[0]['distinguishedname'][0];
- }
- return false;
- }
-
- /**
- * Coping with AD not returning the primary group
- * http://support.microsoft.com/?kbid=321360
- *
- * For some reason it's not possible to search on primarygrouptoken=XXX
- * If someone can show otherwise, I'd like to know about it :)
- * this way is resource intensive and generally a pain in the @#%^
- *
- * @deprecated deprecated since version 3.1, see get get_primary_group
- * @param string $gid Group ID
- * @return string
- */
- public function cn($gid){
- if ($gid === NULL) { return false; }
- $sr = false;
- $r = '';
-
- $filter = "(&(objectCategory=group)(samaccounttype=" . adLDAP::ADLDAP_SECURITY_GLOBAL_GROUP . "))";
- $fields = array("primarygrouptoken", "samaccountname", "distinguishedname");
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- for ($i=0; $i<$entries["count"]; $i++){
- if ($entries[$i]["primarygrouptoken"][0] == $gid) {
- $r = $entries[$i]["distinguishedname"][0];
- $i = $entries["count"];
- }
- }
-
- return $r;
- }
-}
-?>
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @subpackage Groups + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 97 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ + */ +require_once(dirname(__FILE__) . '/../adLDAP.php'); +require_once(dirname(__FILE__) . '/../collections/adLDAPGroupCollection.php'); + +/** +* GROUP FUNCTIONS +*/ +class adLDAPGroups { + /** + * The current adLDAP connection via dependency injection + * + * @var adLDAP + */ + protected $adldap; + + public function __construct(adLDAP $adldap) { + $this->adldap = $adldap; + } + + /** + * Add a group to a group + * + * @param string $parent The parent group name + * @param string $child The child group name + * @return bool + */ + public function addGroup($parent,$child){ + + // Find the parent group's dn + $parentGroup = $this->ginfo($parent, array("cn")); + if ($parentGroup[0]["dn"] === NULL){ + return false; + } + $parentDn = $parentGroup[0]["dn"]; + + // Find the child group's dn + $childGroup = $this->info($child, array("cn")); + if ($childGroup[0]["dn"] === NULL){ + return false; + } + $childDn = $childGroup[0]["dn"]; + + $add = array(); + $add["member"] = $childDn; + + $result = @ldap_mod_add($this->adldap->getLdapConnection(), $parentDn, $add); + if ($result == false) { + return false; + } + return true; + } + + /** + * Add a user to a group + * + * @param string $group The group to add the user to + * @param string $user The user to add to the group + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return bool + */ + public function addUser($group, $user, $isGUID = false) + { + // Adding a user is a bit fiddly, we need to get the full DN of the user + // and add it using the full DN of the group + + // Find the user's dn + $userDn = $this->adldap->user()->dn($user, $isGUID); + if ($userDn === false) { + return false; + } + + // Find the group's dn + $groupInfo = $this->info($group, array("cn")); + if ($groupInfo[0]["dn"] === NULL) { + return false; + } + $groupDn = $groupInfo[0]["dn"]; + + $add = array(); + $add["member"] = $userDn; + + $result = @ldap_mod_add($this->adldap->getLdapConnection(), $groupDn, $add); + if ($result == false) { + return false; + } + return true; + } + + /** + * Add a contact to a group + * + * @param string $group The group to add the contact to + * @param string $contactDn The DN of the contact to add + * @return bool + */ + public function addContact($group, $contactDn) + { + // To add a contact we take the contact's DN + // and add it using the full DN of the group + + // Find the group's dn + $groupInfo = $this->info($group, array("cn")); + if ($groupInfo[0]["dn"] === NULL) { + return false; + } + $groupDn = $groupInfo[0]["dn"]; + + $add = array(); + $add["member"] = $contactDn; + + $result = @ldap_mod_add($this->adldap->getLdapConnection(), $groupDn, $add); + if ($result == false) { + return false; + } + return true; + } + + /** + * Create a group + * + * @param array $attributes Default attributes of the group + * @return bool + */ + public function create($attributes) + { + if (!is_array($attributes)){ return "Attributes must be an array"; } + if (!array_key_exists("group_name", $attributes)){ return "Missing compulsory field [group_name]"; } + if (!array_key_exists("container", $attributes)){ return "Missing compulsory field [container]"; } + if (!array_key_exists("description", $attributes)){ return "Missing compulsory field [description]"; } + if (!is_array($attributes["container"])){ return "Container attribute must be an array."; } + $attributes["container"] = array_reverse($attributes["container"]); + + //$member_array = array(); + //$member_array[0] = "cn=user1,cn=Users,dc=yourdomain,dc=com"; + //$member_array[1] = "cn=administrator,cn=Users,dc=yourdomain,dc=com"; + + $add = array(); + $add["cn"] = $attributes["group_name"]; + $add["samaccountname"] = $attributes["group_name"]; + $add["objectClass"] = "Group"; + $add["description"] = $attributes["description"]; + //$add["member"] = $member_array; UNTESTED + + $container = "OU=" . implode(",OU=", $attributes["container"]); + $result = ldap_add($this->adldap->getLdapConnection(), "CN=" . $add["cn"] . ", " . $container . "," . $this->adldap->getBaseDn(), $add); + if ($result != true) { + return false; + } + return true; + } + + /** + * Delete a group account + * + * @param string $group The group to delete (please be careful here!) + * + * @return array + */ + public function delete($group) { + if (!$this->adldap->getLdapBind()){ return false; } + if ($group === null){ return "Missing compulsory field [group]"; } + + $groupInfo = $this->info($group, array("*")); + $dn = $groupInfo[0]['distinguishedname'][0]; + $result = $this->adldap->folder()->delete($dn); + if ($result !== true) { + return false; + } return true; + } + + /** + * Remove a group from a group + * + * @param string $parent The parent group name + * @param string $child The child group name + * @return bool + */ + public function removeGroup($parent , $child) + { + + // Find the parent dn + $parentGroup = $this->info($parent, array("cn")); + if ($parentGroup[0]["dn"] === NULL) { + return false; + } + $parentDn = $parentGroup[0]["dn"]; + + // Find the child dn + $childGroup = $this->info($child, array("cn")); + if ($childGroup[0]["dn"] === NULL) { + return false; + } + $childDn = $childGroup[0]["dn"]; + + $del = array(); + $del["member"] = $childDn; + + $result = @ldap_mod_del($this->adldap->getLdapConnection(), $parentDn, $del); + if ($result == false) { + return false; + } + return true; + } + + /** + * Remove a user from a group + * + * @param string $group The group to remove a user from + * @param string $user The AD user to remove from the group + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return bool + */ + public function removeUser($group, $user, $isGUID = false) + { + + // Find the parent dn + $groupInfo = $this->info($group, array("cn")); + if ($groupInfo[0]["dn"] === NULL){ + return false; + } + $groupDn = $groupInfo[0]["dn"]; + + // Find the users dn + $userDn = $this->adldap->user()->dn($user, $isGUID); + if ($userDn === false) { + return false; + } + + $del = array(); + $del["member"] = $userDn; + + $result = @ldap_mod_del($this->adldap->getLdapConnection(), $groupDn, $del); + if ($result == false) { + return false; + } + return true; + } + + /** + * Remove a contact from a group + * + * @param string $group The group to remove a user from + * @param string $contactDn The DN of a contact to remove from the group + * @return bool + */ + public function removeContact($group, $contactDn) + { + + // Find the parent dn + $groupInfo = $this->info($group, array("cn")); + if ($groupInfo[0]["dn"] === NULL) { + return false; + } + $groupDn = $groupInfo[0]["dn"]; + + $del = array(); + $del["member"] = $contactDn; + + $result = @ldap_mod_del($this->adldap->getLdapConnection(), $groupDn, $del); + if ($result == false) { + return false; + } + return true; + } + + /** + * Return a list of groups in a group + * + * @param string $group The group to query + * @param bool $recursive Recursively get groups + * @return array + */ + public function inGroup($group, $recursive = NULL) + { + if (!$this->adldap->getLdapBind()){ return false; } + if ($recursive === NULL){ $recursive = $this->adldap->getRecursiveGroups(); } // Use the default option if they haven't set it + + // Search the directory for the members of a group + $info = $this->info($group, array("member","cn")); + $groups = $info[0]["member"]; + if (!is_array($groups)) { + return false; + } + + $groupArray = array(); + + for ($i=0; $i<$groups["count"]; $i++){ + $filter = "(&(objectCategory=group)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($groups[$i]) . "))"; + $fields = array("samaccountname", "distinguishedname", "objectClass"); + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + // not a person, look for a group + if ($entries['count'] == 0 && $recursive == true) { + $filter = "(&(objectCategory=group)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($groups[$i]) . "))"; + $fields = array("distinguishedname"); + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + if (!isset($entries[0]['distinguishedname'][0])) { + continue; + } + $subGroups = $this->inGroup($entries[0]['distinguishedname'][0], $recursive); + if (is_array($subGroups)) { + $groupArray = array_merge($groupArray, $subGroups); + $groupArray = array_unique($groupArray); + } + continue; + } + + $groupArray[] = $entries[0]['distinguishedname'][0]; + } + return $groupArray; + } + + /** + * Return a list of members in a group + * + * @param string $group The group to query + * @param bool $recursive Recursively get group members + * @return array + */ + public function members($group, $recursive = NULL) + { + if (!$this->adldap->getLdapBind()){ return false; } + if ($recursive === NULL){ $recursive = $this->adldap->getRecursiveGroups(); } // Use the default option if they haven't set it + // Search the directory for the members of a group + $info = $this->info($group, array("member","cn")); + $users = $info[0]["member"]; + if (!is_array($users)) { + return false; + } + + $userArray = array(); + + for ($i=0; $i<$users["count"]; $i++){ + $filter = "(&(objectCategory=person)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($users[$i]) . "))"; + $fields = array("samaccountname", "distinguishedname", "objectClass"); + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + // not a person, look for a group + if ($entries['count'] == 0 && $recursive == true) { + $filter = "(&(objectCategory=group)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($users[$i]) . "))"; + $fields = array("samaccountname"); + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + if (!isset($entries[0]['samaccountname'][0])) { + continue; + } + $subUsers = $this->members($entries[0]['samaccountname'][0], $recursive); + if (is_array($subUsers)) { + $userArray = array_merge($userArray, $subUsers); + $userArray = array_unique($userArray); + } + continue; + } + else if ($entries['count'] == 0) { + continue; + } + + if ((!isset($entries[0]['samaccountname'][0]) || $entries[0]['samaccountname'][0] === NULL) && $entries[0]['distinguishedname'][0] !== NULL) { + $userArray[] = $entries[0]['distinguishedname'][0]; + } + else if ($entries[0]['samaccountname'][0] !== NULL) { + $userArray[] = $entries[0]['samaccountname'][0]; + } + } + return $userArray; + } + + /** + * Group Information. Returns an array of raw information about a group. + * The group name is case sensitive + * + * @param string $groupName The group name to retrieve info about + * @param array $fields Fields to retrieve + * @return array + */ + public function info($groupName, $fields = NULL) + { + if ($groupName === NULL) { return false; } + if (!$this->adldap->getLdapBind()) { return false; } + + if (stristr($groupName, '+')) { + $groupName = stripslashes($groupName); + } + + $filter = "(&(objectCategory=group)(name=" . $this->adldap->utilities()->ldapSlashes($groupName) . "))"; + if ($fields === NULL) { + $fields = array("member","memberof","cn","description","distinguishedname","objectcategory","samaccountname"); + } + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + return $entries; + } + + /** + * Group Information. Returns an collection + * The group name is case sensitive + * + * @param string $groupName The group name to retrieve info about + * @param array $fields Fields to retrieve + * @return adLDAPGroupCollection + */ + public function infoCollection($groupName, $fields = NULL) + { + if ($groupName === NULL) { return false; } + if (!$this->adldap->getLdapBind()) { return false; } + + $info = $this->info($groupName, $fields); + if ($info !== false) { + $collection = new adLDAPGroupCollection($info, $this->adldap); + return $collection; + } + return false; + } + + /** + * Return a complete list of "groups in groups" + * + * @param string $group The group to get the list from + * @return array + */ + public function recursiveGroups($group) + { + if ($group === NULL) { return false; } + + $stack = array(); + $processed = array(); + $retGroups = array(); + + array_push($stack, $group); // Initial Group to Start with + while (count($stack) > 0) { + $parent = array_pop($stack); + array_push($processed, $parent); + + $info = $this->info($parent, array("memberof")); + + if (isset($info[0]["memberof"]) && is_array($info[0]["memberof"])) { + $groups = $info[0]["memberof"]; + if ($groups) { + $groupNames = $this->adldap->utilities()->niceNames($groups); + $retGroups = array_merge($retGroups, $groupNames); //final groups to return + foreach ($groupNames as $id => $groupName) { + if (!in_array($groupName, $processed)) { + array_push($stack, $groupName); + } + } + } + } + } + + return $retGroups; + } + + /** + * Returns a complete list of the groups in AD based on a SAM Account Type + * + * @param string $sAMAaccountType The account type to return + * @param bool $includeDescription Whether to return a description + * @param string $search Search parameters + * @param bool $sorted Whether to sort the results + * @return array + */ + public function search($sAMAaccountType = adLDAP::ADLDAP_SECURITY_GLOBAL_GROUP, $includeDescription = false, $search = "*", $sorted = true) { + if (!$this->adldap->getLdapBind()) { return false; } + + $filter = '(&(objectCategory=group)'; + if ($sAMAaccountType !== null) { + $filter .= '(samaccounttype='. $sAMAaccountType .')'; + } + $filter .= '(cn=' . $search . '))'; + // Perform the search and grab all their details + $fields = array("samaccountname", "description"); + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + $groupsArray = array(); + for ($i=0; $i<$entries["count"]; $i++){ + if ($includeDescription && strlen($entries[$i]["description"][0]) > 0 ) { + $groupsArray[$entries[$i]["samaccountname"][0]] = $entries[$i]["description"][0]; + } + else if ($includeDescription){ + $groupsArray[$entries[$i]["samaccountname"][0]] = $entries[$i]["samaccountname"][0]; + } + else { + array_push($groupsArray, $entries[$i]["samaccountname"][0]); + } + } + if ($sorted) { + asort($groupsArray); + } + return $groupsArray; + } + + /** + * Returns a complete list of all groups in AD + * + * @param bool $includeDescription Whether to return a description + * @param string $search Search parameters + * @param bool $sorted Whether to sort the results + * @return array + */ + public function all($includeDescription = false, $search = "*", $sorted = true){ + $groupsArray = $this->search(null, $includeDescription, $search, $sorted); + return $groupsArray; + } + + /** + * Returns a complete list of security groups in AD + * + * @param bool $includeDescription Whether to return a description + * @param string $search Search parameters + * @param bool $sorted Whether to sort the results + * @return array + */ + public function allSecurity($includeDescription = false, $search = "*", $sorted = true){ + $groupsArray = $this->search(adLDAP::ADLDAP_SECURITY_GLOBAL_GROUP, $includeDescription, $search, $sorted); + return $groupsArray; + } + + /** + * Returns a complete list of distribution lists in AD + * + * @param bool $includeDescription Whether to return a description + * @param string $search Search parameters + * @param bool $sorted Whether to sort the results + * @return array + */ + public function allDistribution($includeDescription = false, $search = "*", $sorted = true){ + $groupsArray = $this->search(adLDAP::ADLDAP_DISTRIBUTION_GROUP, $includeDescription, $search, $sorted); + return $groupsArray; + } + + /** + * Coping with AD not returning the primary group + * http://support.microsoft.com/?kbid=321360 + * + * This is a re-write based on code submitted by Bruce which prevents the + * need to search each security group to find the true primary group + * + * @param string $gid Group ID + * @param string $usersid User's Object SID + * @return mixed + */ + public function getPrimaryGroup($gid, $usersid) + { + if ($gid === NULL || $usersid === NULL) { return false; } + $sr = false; + + $gsid = substr_replace($usersid, pack('V',$gid), strlen($usersid)-4,4); + $filter = '(objectsid=' . $this->adldap->utilities()->getTextSID($gsid).')'; + $fields = array("samaccountname","distinguishedname"); + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + if (isset($entries[0]['distinguishedname'][0])) { + return $entries[0]['distinguishedname'][0]; + } + return false; + } + + /** + * Coping with AD not returning the primary group + * http://support.microsoft.com/?kbid=321360 + * + * For some reason it's not possible to search on primarygrouptoken=XXX + * If someone can show otherwise, I'd like to know about it :) + * this way is resource intensive and generally a pain in the @#%^ + * + * @deprecated deprecated since version 3.1, see get get_primary_group + * @param string $gid Group ID + * @return string + */ + public function cn($gid){ + if ($gid === NULL) { return false; } + $sr = false; + $r = ''; + + $filter = "(&(objectCategory=group)(samaccounttype=" . adLDAP::ADLDAP_SECURITY_GLOBAL_GROUP . "))"; + $fields = array("primarygrouptoken", "samaccountname", "distinguishedname"); + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + for ($i=0; $i<$entries["count"]; $i++){ + if ($entries[$i]["primarygrouptoken"][0] == $gid) { + $r = $entries[$i]["distinguishedname"][0]; + $i = $entries["count"]; + } + } + + return $r; + } +} +?> diff --git a/lib/plugins/authad/adLDAP/classes/adLDAPUsers.php b/lib/plugins/authad/adLDAP/classes/adLDAPUsers.php index 96a93b512..839fd592d 100644 --- a/lib/plugins/authad/adLDAP/classes/adLDAPUsers.php +++ b/lib/plugins/authad/adLDAP/classes/adLDAPUsers.php @@ -1,682 +1,682 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @subpackage User
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 97 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
- */
-require_once(dirname(__FILE__) . '/../adLDAP.php');
-require_once(dirname(__FILE__) . '/../collections/adLDAPUserCollection.php');
-
-/**
-* USER FUNCTIONS
-*/
-class adLDAPUsers {
- /**
- * The current adLDAP connection via dependency injection
- *
- * @var adLDAP
- */
- protected $adldap;
-
- public function __construct(adLDAP $adldap) {
- $this->adldap = $adldap;
- }
-
- /**
- * Validate a user's login credentials
- *
- * @param string $username A user's AD username
- * @param string $password A user's AD password
- * @param bool optional $prevent_rebind
- * @return bool
- */
- public function authenticate($username, $password, $preventRebind = false) {
- return $this->adldap->authenticate($username, $password, $preventRebind);
- }
-
- /**
- * Create a user
- *
- * If you specify a password here, this can only be performed over SSL
- *
- * @param array $attributes The attributes to set to the user account
- * @return bool
- */
- public function create($attributes)
- {
- // Check for compulsory fields
- if (!array_key_exists("username", $attributes)){ return "Missing compulsory field [username]"; }
- if (!array_key_exists("firstname", $attributes)){ return "Missing compulsory field [firstname]"; }
- if (!array_key_exists("surname", $attributes)){ return "Missing compulsory field [surname]"; }
- if (!array_key_exists("email", $attributes)){ return "Missing compulsory field [email]"; }
- if (!array_key_exists("container", $attributes)){ return "Missing compulsory field [container]"; }
- if (!is_array($attributes["container"])){ return "Container attribute must be an array."; }
-
- if (array_key_exists("password",$attributes) && (!$this->adldap->getUseSSL() && !$this->adldap->getUseTLS())){
- throw new adLDAPException('SSL must be configured on your webserver and enabled in the class to set passwords.');
- }
-
- if (!array_key_exists("display_name", $attributes)) {
- $attributes["display_name"] = $attributes["firstname"] . " " . $attributes["surname"];
- }
-
- // Translate the schema
- $add = $this->adldap->adldap_schema($attributes);
-
- // Additional stuff only used for adding accounts
- $add["cn"][0] = $attributes["display_name"];
- $add["samaccountname"][0] = $attributes["username"];
- $add["objectclass"][0] = "top";
- $add["objectclass"][1] = "person";
- $add["objectclass"][2] = "organizationalPerson";
- $add["objectclass"][3] = "user"; //person?
- //$add["name"][0]=$attributes["firstname"]." ".$attributes["surname"];
-
- // Set the account control attribute
- $control_options = array("NORMAL_ACCOUNT");
- if (!$attributes["enabled"]) {
- $control_options[] = "ACCOUNTDISABLE";
- }
- $add["userAccountControl"][0] = $this->accountControl($control_options);
-
- // Determine the container
- $attributes["container"] = array_reverse($attributes["container"]);
- $container = "OU=" . implode(", OU=",$attributes["container"]);
-
- // Add the entry
- $result = @ldap_add($this->adldap->getLdapConnection(), "CN=" . $add["cn"][0] . ", " . $container . "," . $this->adldap->getBaseDn(), $add);
- if ($result != true) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Account control options
- *
- * @param array $options The options to convert to int
- * @return int
- */
- protected function accountControl($options)
- {
- $val=0;
-
- if (is_array($options)) {
- if (in_array("SCRIPT",$options)){ $val=$val+1; }
- if (in_array("ACCOUNTDISABLE",$options)){ $val=$val+2; }
- if (in_array("HOMEDIR_REQUIRED",$options)){ $val=$val+8; }
- if (in_array("LOCKOUT",$options)){ $val=$val+16; }
- if (in_array("PASSWD_NOTREQD",$options)){ $val=$val+32; }
- //PASSWD_CANT_CHANGE Note You cannot assign this permission by directly modifying the UserAccountControl attribute.
- //For information about how to set the permission programmatically, see the "Property flag descriptions" section.
- if (in_array("ENCRYPTED_TEXT_PWD_ALLOWED",$options)){ $val=$val+128; }
- if (in_array("TEMP_DUPLICATE_ACCOUNT",$options)){ $val=$val+256; }
- if (in_array("NORMAL_ACCOUNT",$options)){ $val=$val+512; }
- if (in_array("INTERDOMAIN_TRUST_ACCOUNT",$options)){ $val=$val+2048; }
- if (in_array("WORKSTATION_TRUST_ACCOUNT",$options)){ $val=$val+4096; }
- if (in_array("SERVER_TRUST_ACCOUNT",$options)){ $val=$val+8192; }
- if (in_array("DONT_EXPIRE_PASSWORD",$options)){ $val=$val+65536; }
- if (in_array("MNS_LOGON_ACCOUNT",$options)){ $val=$val+131072; }
- if (in_array("SMARTCARD_REQUIRED",$options)){ $val=$val+262144; }
- if (in_array("TRUSTED_FOR_DELEGATION",$options)){ $val=$val+524288; }
- if (in_array("NOT_DELEGATED",$options)){ $val=$val+1048576; }
- if (in_array("USE_DES_KEY_ONLY",$options)){ $val=$val+2097152; }
- if (in_array("DONT_REQ_PREAUTH",$options)){ $val=$val+4194304; }
- if (in_array("PASSWORD_EXPIRED",$options)){ $val=$val+8388608; }
- if (in_array("TRUSTED_TO_AUTH_FOR_DELEGATION",$options)){ $val=$val+16777216; }
- }
- return $val;
- }
-
- /**
- * Delete a user account
- *
- * @param string $username The username to delete (please be careful here!)
- * @param bool $isGUID Is the username a GUID or a samAccountName
- * @return array
- */
- public function delete($username, $isGUID = false)
- {
- $userinfo = $this->info($username, array("*"), $isGUID);
- $dn = $userinfo[0]['distinguishedname'][0];
- $result = $this->adldap->folder()->delete($dn);
- if ($result != true) {
- return false;
- }
- return true;
- }
-
- /**
- * Groups the user is a member of
- *
- * @param string $username The username to query
- * @param bool $recursive Recursive list of groups
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return array
- */
- public function groups($username, $recursive = NULL, $isGUID = false)
- {
- if ($username === NULL) { return false; }
- if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } // Use the default option if they haven't set it
- if (!$this->adldap->getLdapBind()) { return false; }
-
- // Search the directory for their information
- $info = @$this->info($username, array("memberof", "primarygroupid"), $isGUID);
- $groups = $this->adldap->utilities()->niceNames($info[0]["memberof"]); // Presuming the entry returned is our guy (unique usernames)
-
- if ($recursive === true){
- foreach ($groups as $id => $groupName){
- $extraGroups = $this->adldap->group()->recursiveGroups($groupName);
- $groups = array_merge($groups, $extraGroups);
- }
- }
-
- return $groups;
- }
-
- /**
- * Find information about the users. Returned in a raw array format from AD
- *
- * @param string $username The username to query
- * @param array $fields Array of parameters to query
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return array
- */
- public function info($username, $fields = NULL, $isGUID = false)
- {
- if ($username === NULL) { return false; }
- if (!$this->adldap->getLdapBind()) { return false; }
-
- if ($isGUID === true) {
- $username = $this->adldap->utilities()->strGuidToHex($username);
- $filter = "objectguid=" . $username;
- }
- else if (strstr($username, "@")) {
- $filter = "userPrincipalName=" . $username;
- }
- else {
- $filter = "samaccountname=" . $username;
- }
- $filter = "(&(objectCategory=person)({$filter}))";
- if ($fields === NULL) {
- $fields = array("samaccountname","mail","memberof","department","displayname","telephonenumber","primarygroupid","objectsid");
- }
- if (!in_array("objectsid", $fields)) {
- $fields[] = "objectsid";
- }
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- if (isset($entries[0])) {
- if ($entries[0]['count'] >= 1) {
- if (in_array("memberof", $fields)) {
- // AD does not return the primary group in the ldap query, we may need to fudge it
- if ($this->adldap->getRealPrimaryGroup() && isset($entries[0]["primarygroupid"][0]) && isset($entries[0]["objectsid"][0])){
- //$entries[0]["memberof"][]=$this->group_cn($entries[0]["primarygroupid"][0]);
- $entries[0]["memberof"][] = $this->adldap->group()->getPrimaryGroup($entries[0]["primarygroupid"][0], $entries[0]["objectsid"][0]);
- } else {
- $entries[0]["memberof"][] = "CN=Domain Users,CN=Users," . $this->adldap->getBaseDn();
- }
- if (!isset($entries[0]["memberof"]["count"])) {
- $entries[0]["memberof"]["count"] = 0;
- }
- $entries[0]["memberof"]["count"]++;
- }
- }
-
- return $entries;
- }
- return false;
- }
-
- /**
- * Find information about the users. Returned in a raw array format from AD
- *
- * @param string $username The username to query
- * @param array $fields Array of parameters to query
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return mixed
- */
- public function infoCollection($username, $fields = NULL, $isGUID = false)
- {
- if ($username === NULL) { return false; }
- if (!$this->adldap->getLdapBind()) { return false; }
-
- $info = $this->info($username, $fields, $isGUID);
-
- if ($info !== false) {
- $collection = new adLDAPUserCollection($info, $this->adldap);
- return $collection;
- }
- return false;
- }
-
- /**
- * Determine if a user is in a specific group
- *
- * @param string $username The username to query
- * @param string $group The name of the group to check against
- * @param bool $recursive Check groups recursively
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return bool
- */
- public function inGroup($username, $group, $recursive = NULL, $isGUID = false)
- {
- if ($username === NULL) { return false; }
- if ($group === NULL) { return false; }
- if (!$this->adldap->getLdapBind()) { return false; }
- if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } // Use the default option if they haven't set it
-
- // Get a list of the groups
- $groups = $this->groups($username, $recursive, $isGUID);
-
- // Return true if the specified group is in the group list
- if (in_array($group, $groups)) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Determine a user's password expiry date
- *
- * @param string $username The username to query
- * @param book $isGUID Is the username passed a GUID or a samAccountName
- * @requires bcmath http://www.php.net/manual/en/book.bc.php
- * @return array
- */
- public function passwordExpiry($username, $isGUID = false)
- {
- if ($username === NULL) { return "Missing compulsory field [username]"; }
- if (!$this->adldap->getLdapBind()) { return false; }
- if (!function_exists('bcmod')) { throw new adLDAPException("Missing function support [bcmod] http://www.php.net/manual/en/book.bc.php"); };
-
- $userInfo = $this->info($username, array("pwdlastset", "useraccountcontrol"), $isGUID);
- $pwdLastSet = $userInfo[0]['pwdlastset'][0];
- $status = array();
-
- if ($userInfo[0]['useraccountcontrol'][0] == '66048') {
- // Password does not expire
- return "Does not expire";
- }
- if ($pwdLastSet === '0') {
- // Password has already expired
- return "Password has expired";
- }
-
- // Password expiry in AD can be calculated from TWO values:
- // - User's own pwdLastSet attribute: stores the last time the password was changed
- // - Domain's maxPwdAge attribute: how long passwords last in the domain
- //
- // Although Microsoft chose to use a different base and unit for time measurements.
- // This function will convert them to Unix timestamps
- $sr = ldap_read($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), 'objectclass=*', array('maxPwdAge'));
- if (!$sr) {
- return false;
- }
- $info = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
- $maxPwdAge = $info[0]['maxpwdage'][0];
-
-
- // See MSDN: http://msdn.microsoft.com/en-us/library/ms974598.aspx
- //
- // pwdLastSet contains the number of 100 nanosecond intervals since January 1, 1601 (UTC),
- // stored in a 64 bit integer.
- //
- // The number of seconds between this date and Unix epoch is 11644473600.
- //
- // maxPwdAge is stored as a large integer that represents the number of 100 nanosecond
- // intervals from the time the password was set before the password expires.
- //
- // We also need to scale this to seconds but also this value is a _negative_ quantity!
- //
- // If the low 32 bits of maxPwdAge are equal to 0 passwords do not expire
- //
- // Unfortunately the maths involved are too big for PHP integers, so I've had to require
- // BCMath functions to work with arbitrary precision numbers.
- if (bcmod($maxPwdAge, 4294967296) === '0') {
- return "Domain does not expire passwords";
- }
-
- // Add maxpwdage and pwdlastset and we get password expiration time in Microsoft's
- // time units. Because maxpwd age is negative we need to subtract it.
- $pwdExpire = bcsub($pwdLastSet, $maxPwdAge);
-
- // Convert MS's time to Unix time
- $status['expiryts'] = bcsub(bcdiv($pwdExpire, '10000000'), '11644473600');
- $status['expiryformat'] = date('Y-m-d H:i:s', bcsub(bcdiv($pwdExpire, '10000000'), '11644473600'));
-
- return $status;
- }
-
- /**
- * Modify a user
- *
- * @param string $username The username to query
- * @param array $attributes The attributes to modify. Note if you set the enabled attribute you must not specify any other attributes
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return bool
- */
- public function modify($username, $attributes, $isGUID = false)
- {
- if ($username === NULL) { return "Missing compulsory field [username]"; }
- if (array_key_exists("password", $attributes) && !$this->adldap->getUseSSL() && !$this->adldap->getUseTLS()) {
- throw new adLDAPException('SSL/TLS must be configured on your webserver and enabled in the class to set passwords.');
- }
-
- // Find the dn of the user
- $userDn = $this->dn($username, $isGUID);
- if ($userDn === false) {
- return false;
- }
-
- // Translate the update to the LDAP schema
- $mod = $this->adldap->adldap_schema($attributes);
-
- // Check to see if this is an enabled status update
- if (!$mod && !array_key_exists("enabled", $attributes)){
- return false;
- }
-
- // Set the account control attribute (only if specified)
- if (array_key_exists("enabled", $attributes)){
- if ($attributes["enabled"]){
- $controlOptions = array("NORMAL_ACCOUNT");
- }
- else {
- $controlOptions = array("NORMAL_ACCOUNT", "ACCOUNTDISABLE");
- }
- $mod["userAccountControl"][0] = $this->accountControl($controlOptions);
- }
-
- // Do the update
- $result = @ldap_modify($this->adldap->getLdapConnection(), $userDn, $mod);
- if ($result == false) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Disable a user account
- *
- * @param string $username The username to disable
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return bool
- */
- public function disable($username, $isGUID = false)
- {
- if ($username === NULL) { return "Missing compulsory field [username]"; }
- $attributes = array("enabled" => 0);
- $result = $this->modify($username, $attributes, $isGUID);
- if ($result == false) { return false; }
-
- return true;
- }
-
- /**
- * Enable a user account
- *
- * @param string $username The username to enable
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return bool
- */
- public function enable($username, $isGUID = false)
- {
- if ($username === NULL) { return "Missing compulsory field [username]"; }
- $attributes = array("enabled" => 1);
- $result = $this->modify($username, $attributes, $isGUID);
- if ($result == false) { return false; }
-
- return true;
- }
-
- /**
- * Set the password of a user - This must be performed over SSL
- *
- * @param string $username The username to modify
- * @param string $password The new password
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return bool
- */
- public function password($username, $password, $isGUID = false)
- {
- if ($username === NULL) { return false; }
- if ($password === NULL) { return false; }
- if (!$this->adldap->getLdapBind()) { return false; }
- if (!$this->adldap->getUseSSL() && !$this->adldap->getUseTLS()) {
- throw new adLDAPException('SSL must be configured on your webserver and enabled in the class to set passwords.');
- }
-
- $userDn = $this->dn($username, $isGUID);
- if ($userDn === false) {
- return false;
- }
-
- $add=array();
- $add["unicodePwd"][0] = $this->encodePassword($password);
-
- $result = @ldap_mod_replace($this->adldap->getLdapConnection(), $userDn, $add);
- if ($result === false){
- $err = ldap_errno($this->adldap->getLdapConnection());
- if ($err) {
- $msg = 'Error ' . $err . ': ' . ldap_err2str($err) . '.';
- if($err == 53) {
- $msg .= ' Your password might not match the password policy.';
- }
- throw new adLDAPException($msg);
- }
- else {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Encode a password for transmission over LDAP
- *
- * @param string $password The password to encode
- * @return string
- */
- public function encodePassword($password)
- {
- $password="\"".$password."\"";
- $encoded="";
- for ($i=0; $i <strlen($password); $i++){ $encoded.="{$password{$i}}\000"; }
- return $encoded;
- }
-
- /**
- * Obtain the user's distinguished name based on their userid
- *
- *
- * @param string $username The username
- * @param bool $isGUID Is the username passed a GUID or a samAccountName
- * @return string
- */
- public function dn($username, $isGUID=false)
- {
- $user = $this->info($username, array("cn"), $isGUID);
- if ($user[0]["dn"] === NULL) {
- return false;
- }
- $userDn = $user[0]["dn"];
- return $userDn;
- }
-
- /**
- * Return a list of all users in AD
- *
- * @param bool $includeDescription Return a description of the user
- * @param string $search Search parameter
- * @param bool $sorted Sort the user accounts
- * @return array
- */
- public function all($includeDescription = false, $search = "*", $sorted = true)
- {
- if (!$this->adldap->getLdapBind()) { return false; }
-
- // Perform the search and grab all their details
- $filter = "(&(objectClass=user)(samaccounttype=" . adLDAP::ADLDAP_NORMAL_ACCOUNT .")(objectCategory=person)(cn=" . $search . "))";
- $fields = array("samaccountname","displayname");
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- $usersArray = array();
- for ($i=0; $i<$entries["count"]; $i++){
- if ($includeDescription && strlen($entries[$i]["displayname"][0])>0){
- $usersArray[$entries[$i]["samaccountname"][0]] = $entries[$i]["displayname"][0];
- } elseif ($includeDescription){
- $usersArray[$entries[$i]["samaccountname"][0]] = $entries[$i]["samaccountname"][0];
- } else {
- array_push($usersArray, $entries[$i]["samaccountname"][0]);
- }
- }
- if ($sorted) {
- asort($usersArray);
- }
- return $usersArray;
- }
-
- /**
- * Converts a username (samAccountName) to a GUID
- *
- * @param string $username The username to query
- * @return string
- */
- public function usernameToGuid($username)
- {
- if (!$this->adldap->getLdapBind()){ return false; }
- if ($username === null){ return "Missing compulsory field [username]"; }
-
- $filter = "samaccountname=" . $username;
- $fields = array("objectGUID");
- $sr = @ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- if (ldap_count_entries($this->adldap->getLdapConnection(), $sr) > 0) {
- $entry = @ldap_first_entry($this->adldap->getLdapConnection(), $sr);
- $guid = @ldap_get_values_len($this->adldap->getLdapConnection(), $entry, 'objectGUID');
- $strGUID = $this->adldap->utilities()->binaryToText($guid[0]);
- return $strGUID;
- }
- return false;
- }
-
- /**
- * Return a list of all users in AD that have a specific value in a field
- *
- * @param bool $includeDescription Return a description of the user
- * @param string $searchField Field to search search for
- * @param string $searchFilter Value to search for in the specified field
- * @param bool $sorted Sort the user accounts
- * @return array
- */
- public function find($includeDescription = false, $searchField = false, $searchFilter = false, $sorted = true){
- if (!$this->adldap->getLdapBind()){ return false; }
-
- // Perform the search and grab all their details
- $searchParams = "";
- if ($searchField) {
- $searchParams = "(" . $searchField . "=" . $searchFilter . ")";
- }
- $filter = "(&(objectClass=user)(samaccounttype=" . adLDAP::ADLDAP_NORMAL_ACCOUNT .")(objectCategory=person)" . $searchParams . ")";
- $fields = array("samaccountname","displayname");
- $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields);
- $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr);
-
- $usersArray = array();
- for ($i=0; $i < $entries["count"]; $i++) {
- if ($includeDescription && strlen($entries[$i]["displayname"][0]) > 0) {
- $usersArray[$entries[$i]["samaccountname"][0]] = $entries[$i]["displayname"][0];
- }
- else if ($includeDescription) {
- $usersArray[$entries[$i]["samaccountname"][0]] = $entries[$i]["samaccountname"][0];
- }
- else {
- array_push($usersArray, $entries[$i]["samaccountname"][0]);
- }
- }
- if ($sorted){
- asort($usersArray);
- }
- return ($usersArray);
- }
-
- /**
- * Move a user account to a different OU
- *
- * @param string $username The username to move (please be careful here!)
- * @param array $container The container or containers to move the user to (please be careful here!).
- * accepts containers in 1. parent 2. child order
- * @return array
- */
- public function move($username, $container)
- {
- if (!$this->adldap->getLdapBind()) { return false; }
- if ($username === null) { return "Missing compulsory field [username]"; }
- if ($container === null) { return "Missing compulsory field [container]"; }
- if (!is_array($container)) { return "Container must be an array"; }
-
- $userInfo = $this->info($username, array("*"));
- $dn = $userInfo[0]['distinguishedname'][0];
- $newRDn = "cn=" . $username;
- $container = array_reverse($container);
- $newContainer = "ou=" . implode(",ou=",$container);
- $newBaseDn = strtolower($newContainer) . "," . $this->adldap->getBaseDn();
- $result = @ldap_rename($this->adldap->getLdapConnection(), $dn, $newRDn, $newBaseDn, true);
- if ($result !== true) {
- return false;
- }
- return true;
- }
-
- /**
- * Get the last logon time of any user as a Unix timestamp
- *
- * @param string $username
- * @return long $unixTimestamp
- */
- public function getLastLogon($username) {
- if (!$this->adldap->getLdapBind()) { return false; }
- if ($username === null) { return "Missing compulsory field [username]"; }
- $userInfo = $this->info($username, array("lastLogonTimestamp"));
- $lastLogon = adLDAPUtils::convertWindowsTimeToUnixTime($userInfo[0]['lastLogonTimestamp'][0]);
- return $lastLogon;
- }
-
-}
-?>
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @subpackage User + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 97 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ + */ +require_once(dirname(__FILE__) . '/../adLDAP.php'); +require_once(dirname(__FILE__) . '/../collections/adLDAPUserCollection.php'); + +/** +* USER FUNCTIONS +*/ +class adLDAPUsers { + /** + * The current adLDAP connection via dependency injection + * + * @var adLDAP + */ + protected $adldap; + + public function __construct(adLDAP $adldap) { + $this->adldap = $adldap; + } + + /** + * Validate a user's login credentials + * + * @param string $username A user's AD username + * @param string $password A user's AD password + * @param bool optional $prevent_rebind + * @return bool + */ + public function authenticate($username, $password, $preventRebind = false) { + return $this->adldap->authenticate($username, $password, $preventRebind); + } + + /** + * Create a user + * + * If you specify a password here, this can only be performed over SSL + * + * @param array $attributes The attributes to set to the user account + * @return bool + */ + public function create($attributes) + { + // Check for compulsory fields + if (!array_key_exists("username", $attributes)){ return "Missing compulsory field [username]"; } + if (!array_key_exists("firstname", $attributes)){ return "Missing compulsory field [firstname]"; } + if (!array_key_exists("surname", $attributes)){ return "Missing compulsory field [surname]"; } + if (!array_key_exists("email", $attributes)){ return "Missing compulsory field [email]"; } + if (!array_key_exists("container", $attributes)){ return "Missing compulsory field [container]"; } + if (!is_array($attributes["container"])){ return "Container attribute must be an array."; } + + if (array_key_exists("password",$attributes) && (!$this->adldap->getUseSSL() && !$this->adldap->getUseTLS())){ + throw new adLDAPException('SSL must be configured on your webserver and enabled in the class to set passwords.'); + } + + if (!array_key_exists("display_name", $attributes)) { + $attributes["display_name"] = $attributes["firstname"] . " " . $attributes["surname"]; + } + + // Translate the schema + $add = $this->adldap->adldap_schema($attributes); + + // Additional stuff only used for adding accounts + $add["cn"][0] = $attributes["display_name"]; + $add["samaccountname"][0] = $attributes["username"]; + $add["objectclass"][0] = "top"; + $add["objectclass"][1] = "person"; + $add["objectclass"][2] = "organizationalPerson"; + $add["objectclass"][3] = "user"; //person? + //$add["name"][0]=$attributes["firstname"]." ".$attributes["surname"]; + + // Set the account control attribute + $control_options = array("NORMAL_ACCOUNT"); + if (!$attributes["enabled"]) { + $control_options[] = "ACCOUNTDISABLE"; + } + $add["userAccountControl"][0] = $this->accountControl($control_options); + + // Determine the container + $attributes["container"] = array_reverse($attributes["container"]); + $container = "OU=" . implode(", OU=",$attributes["container"]); + + // Add the entry + $result = @ldap_add($this->adldap->getLdapConnection(), "CN=" . $add["cn"][0] . ", " . $container . "," . $this->adldap->getBaseDn(), $add); + if ($result != true) { + return false; + } + + return true; + } + + /** + * Account control options + * + * @param array $options The options to convert to int + * @return int + */ + protected function accountControl($options) + { + $val=0; + + if (is_array($options)) { + if (in_array("SCRIPT",$options)){ $val=$val+1; } + if (in_array("ACCOUNTDISABLE",$options)){ $val=$val+2; } + if (in_array("HOMEDIR_REQUIRED",$options)){ $val=$val+8; } + if (in_array("LOCKOUT",$options)){ $val=$val+16; } + if (in_array("PASSWD_NOTREQD",$options)){ $val=$val+32; } + //PASSWD_CANT_CHANGE Note You cannot assign this permission by directly modifying the UserAccountControl attribute. + //For information about how to set the permission programmatically, see the "Property flag descriptions" section. + if (in_array("ENCRYPTED_TEXT_PWD_ALLOWED",$options)){ $val=$val+128; } + if (in_array("TEMP_DUPLICATE_ACCOUNT",$options)){ $val=$val+256; } + if (in_array("NORMAL_ACCOUNT",$options)){ $val=$val+512; } + if (in_array("INTERDOMAIN_TRUST_ACCOUNT",$options)){ $val=$val+2048; } + if (in_array("WORKSTATION_TRUST_ACCOUNT",$options)){ $val=$val+4096; } + if (in_array("SERVER_TRUST_ACCOUNT",$options)){ $val=$val+8192; } + if (in_array("DONT_EXPIRE_PASSWORD",$options)){ $val=$val+65536; } + if (in_array("MNS_LOGON_ACCOUNT",$options)){ $val=$val+131072; } + if (in_array("SMARTCARD_REQUIRED",$options)){ $val=$val+262144; } + if (in_array("TRUSTED_FOR_DELEGATION",$options)){ $val=$val+524288; } + if (in_array("NOT_DELEGATED",$options)){ $val=$val+1048576; } + if (in_array("USE_DES_KEY_ONLY",$options)){ $val=$val+2097152; } + if (in_array("DONT_REQ_PREAUTH",$options)){ $val=$val+4194304; } + if (in_array("PASSWORD_EXPIRED",$options)){ $val=$val+8388608; } + if (in_array("TRUSTED_TO_AUTH_FOR_DELEGATION",$options)){ $val=$val+16777216; } + } + return $val; + } + + /** + * Delete a user account + * + * @param string $username The username to delete (please be careful here!) + * @param bool $isGUID Is the username a GUID or a samAccountName + * @return array + */ + public function delete($username, $isGUID = false) + { + $userinfo = $this->info($username, array("*"), $isGUID); + $dn = $userinfo[0]['distinguishedname'][0]; + $result = $this->adldap->folder()->delete($dn); + if ($result != true) { + return false; + } + return true; + } + + /** + * Groups the user is a member of + * + * @param string $username The username to query + * @param bool $recursive Recursive list of groups + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return array + */ + public function groups($username, $recursive = NULL, $isGUID = false) + { + if ($username === NULL) { return false; } + if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } // Use the default option if they haven't set it + if (!$this->adldap->getLdapBind()) { return false; } + + // Search the directory for their information + $info = @$this->info($username, array("memberof", "primarygroupid"), $isGUID); + $groups = $this->adldap->utilities()->niceNames($info[0]["memberof"]); // Presuming the entry returned is our guy (unique usernames) + + if ($recursive === true){ + foreach ($groups as $id => $groupName){ + $extraGroups = $this->adldap->group()->recursiveGroups($groupName); + $groups = array_merge($groups, $extraGroups); + } + } + + return $groups; + } + + /** + * Find information about the users. Returned in a raw array format from AD + * + * @param string $username The username to query + * @param array $fields Array of parameters to query + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return array + */ + public function info($username, $fields = NULL, $isGUID = false) + { + if ($username === NULL) { return false; } + if (!$this->adldap->getLdapBind()) { return false; } + + if ($isGUID === true) { + $username = $this->adldap->utilities()->strGuidToHex($username); + $filter = "objectguid=" . $username; + } + else if (strstr($username, "@")) { + $filter = "userPrincipalName=" . $username; + } + else { + $filter = "samaccountname=" . $username; + } + $filter = "(&(objectCategory=person)({$filter}))"; + if ($fields === NULL) { + $fields = array("samaccountname","mail","memberof","department","displayname","telephonenumber","primarygroupid","objectsid"); + } + if (!in_array("objectsid", $fields)) { + $fields[] = "objectsid"; + } + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + if (isset($entries[0])) { + if ($entries[0]['count'] >= 1) { + if (in_array("memberof", $fields)) { + // AD does not return the primary group in the ldap query, we may need to fudge it + if ($this->adldap->getRealPrimaryGroup() && isset($entries[0]["primarygroupid"][0]) && isset($entries[0]["objectsid"][0])){ + //$entries[0]["memberof"][]=$this->group_cn($entries[0]["primarygroupid"][0]); + $entries[0]["memberof"][] = $this->adldap->group()->getPrimaryGroup($entries[0]["primarygroupid"][0], $entries[0]["objectsid"][0]); + } else { + $entries[0]["memberof"][] = "CN=Domain Users,CN=Users," . $this->adldap->getBaseDn(); + } + if (!isset($entries[0]["memberof"]["count"])) { + $entries[0]["memberof"]["count"] = 0; + } + $entries[0]["memberof"]["count"]++; + } + } + + return $entries; + } + return false; + } + + /** + * Find information about the users. Returned in a raw array format from AD + * + * @param string $username The username to query + * @param array $fields Array of parameters to query + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return mixed + */ + public function infoCollection($username, $fields = NULL, $isGUID = false) + { + if ($username === NULL) { return false; } + if (!$this->adldap->getLdapBind()) { return false; } + + $info = $this->info($username, $fields, $isGUID); + + if ($info !== false) { + $collection = new adLDAPUserCollection($info, $this->adldap); + return $collection; + } + return false; + } + + /** + * Determine if a user is in a specific group + * + * @param string $username The username to query + * @param string $group The name of the group to check against + * @param bool $recursive Check groups recursively + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return bool + */ + public function inGroup($username, $group, $recursive = NULL, $isGUID = false) + { + if ($username === NULL) { return false; } + if ($group === NULL) { return false; } + if (!$this->adldap->getLdapBind()) { return false; } + if ($recursive === NULL) { $recursive = $this->adldap->getRecursiveGroups(); } // Use the default option if they haven't set it + + // Get a list of the groups + $groups = $this->groups($username, $recursive, $isGUID); + + // Return true if the specified group is in the group list + if (in_array($group, $groups)) { + return true; + } + + return false; + } + + /** + * Determine a user's password expiry date + * + * @param string $username The username to query + * @param book $isGUID Is the username passed a GUID or a samAccountName + * @requires bcmath http://www.php.net/manual/en/book.bc.php + * @return array + */ + public function passwordExpiry($username, $isGUID = false) + { + if ($username === NULL) { return "Missing compulsory field [username]"; } + if (!$this->adldap->getLdapBind()) { return false; } + if (!function_exists('bcmod')) { throw new adLDAPException("Missing function support [bcmod] http://www.php.net/manual/en/book.bc.php"); }; + + $userInfo = $this->info($username, array("pwdlastset", "useraccountcontrol"), $isGUID); + $pwdLastSet = $userInfo[0]['pwdlastset'][0]; + $status = array(); + + if ($userInfo[0]['useraccountcontrol'][0] == '66048') { + // Password does not expire + return "Does not expire"; + } + if ($pwdLastSet === '0') { + // Password has already expired + return "Password has expired"; + } + + // Password expiry in AD can be calculated from TWO values: + // - User's own pwdLastSet attribute: stores the last time the password was changed + // - Domain's maxPwdAge attribute: how long passwords last in the domain + // + // Although Microsoft chose to use a different base and unit for time measurements. + // This function will convert them to Unix timestamps + $sr = ldap_read($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), 'objectclass=*', array('maxPwdAge')); + if (!$sr) { + return false; + } + $info = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + $maxPwdAge = $info[0]['maxpwdage'][0]; + + + // See MSDN: http://msdn.microsoft.com/en-us/library/ms974598.aspx + // + // pwdLastSet contains the number of 100 nanosecond intervals since January 1, 1601 (UTC), + // stored in a 64 bit integer. + // + // The number of seconds between this date and Unix epoch is 11644473600. + // + // maxPwdAge is stored as a large integer that represents the number of 100 nanosecond + // intervals from the time the password was set before the password expires. + // + // We also need to scale this to seconds but also this value is a _negative_ quantity! + // + // If the low 32 bits of maxPwdAge are equal to 0 passwords do not expire + // + // Unfortunately the maths involved are too big for PHP integers, so I've had to require + // BCMath functions to work with arbitrary precision numbers. + if (bcmod($maxPwdAge, 4294967296) === '0') { + return "Domain does not expire passwords"; + } + + // Add maxpwdage and pwdlastset and we get password expiration time in Microsoft's + // time units. Because maxpwd age is negative we need to subtract it. + $pwdExpire = bcsub($pwdLastSet, $maxPwdAge); + + // Convert MS's time to Unix time + $status['expiryts'] = bcsub(bcdiv($pwdExpire, '10000000'), '11644473600'); + $status['expiryformat'] = date('Y-m-d H:i:s', bcsub(bcdiv($pwdExpire, '10000000'), '11644473600')); + + return $status; + } + + /** + * Modify a user + * + * @param string $username The username to query + * @param array $attributes The attributes to modify. Note if you set the enabled attribute you must not specify any other attributes + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return bool + */ + public function modify($username, $attributes, $isGUID = false) + { + if ($username === NULL) { return "Missing compulsory field [username]"; } + if (array_key_exists("password", $attributes) && !$this->adldap->getUseSSL() && !$this->adldap->getUseTLS()) { + throw new adLDAPException('SSL/TLS must be configured on your webserver and enabled in the class to set passwords.'); + } + + // Find the dn of the user + $userDn = $this->dn($username, $isGUID); + if ($userDn === false) { + return false; + } + + // Translate the update to the LDAP schema + $mod = $this->adldap->adldap_schema($attributes); + + // Check to see if this is an enabled status update + if (!$mod && !array_key_exists("enabled", $attributes)){ + return false; + } + + // Set the account control attribute (only if specified) + if (array_key_exists("enabled", $attributes)){ + if ($attributes["enabled"]){ + $controlOptions = array("NORMAL_ACCOUNT"); + } + else { + $controlOptions = array("NORMAL_ACCOUNT", "ACCOUNTDISABLE"); + } + $mod["userAccountControl"][0] = $this->accountControl($controlOptions); + } + + // Do the update + $result = @ldap_modify($this->adldap->getLdapConnection(), $userDn, $mod); + if ($result == false) { + return false; + } + + return true; + } + + /** + * Disable a user account + * + * @param string $username The username to disable + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return bool + */ + public function disable($username, $isGUID = false) + { + if ($username === NULL) { return "Missing compulsory field [username]"; } + $attributes = array("enabled" => 0); + $result = $this->modify($username, $attributes, $isGUID); + if ($result == false) { return false; } + + return true; + } + + /** + * Enable a user account + * + * @param string $username The username to enable + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return bool + */ + public function enable($username, $isGUID = false) + { + if ($username === NULL) { return "Missing compulsory field [username]"; } + $attributes = array("enabled" => 1); + $result = $this->modify($username, $attributes, $isGUID); + if ($result == false) { return false; } + + return true; + } + + /** + * Set the password of a user - This must be performed over SSL + * + * @param string $username The username to modify + * @param string $password The new password + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return bool + */ + public function password($username, $password, $isGUID = false) + { + if ($username === NULL) { return false; } + if ($password === NULL) { return false; } + if (!$this->adldap->getLdapBind()) { return false; } + if (!$this->adldap->getUseSSL() && !$this->adldap->getUseTLS()) { + throw new adLDAPException('SSL must be configured on your webserver and enabled in the class to set passwords.'); + } + + $userDn = $this->dn($username, $isGUID); + if ($userDn === false) { + return false; + } + + $add=array(); + $add["unicodePwd"][0] = $this->encodePassword($password); + + $result = @ldap_mod_replace($this->adldap->getLdapConnection(), $userDn, $add); + if ($result === false){ + $err = ldap_errno($this->adldap->getLdapConnection()); + if ($err) { + $msg = 'Error ' . $err . ': ' . ldap_err2str($err) . '.'; + if($err == 53) { + $msg .= ' Your password might not match the password policy.'; + } + throw new adLDAPException($msg); + } + else { + return false; + } + } + + return true; + } + + /** + * Encode a password for transmission over LDAP + * + * @param string $password The password to encode + * @return string + */ + public function encodePassword($password) + { + $password="\"".$password."\""; + $encoded=""; + for ($i=0; $i <strlen($password); $i++){ $encoded.="{$password{$i}}\000"; } + return $encoded; + } + + /** + * Obtain the user's distinguished name based on their userid + * + * + * @param string $username The username + * @param bool $isGUID Is the username passed a GUID or a samAccountName + * @return string + */ + public function dn($username, $isGUID=false) + { + $user = $this->info($username, array("cn"), $isGUID); + if ($user[0]["dn"] === NULL) { + return false; + } + $userDn = $user[0]["dn"]; + return $userDn; + } + + /** + * Return a list of all users in AD + * + * @param bool $includeDescription Return a description of the user + * @param string $search Search parameter + * @param bool $sorted Sort the user accounts + * @return array + */ + public function all($includeDescription = false, $search = "*", $sorted = true) + { + if (!$this->adldap->getLdapBind()) { return false; } + + // Perform the search and grab all their details + $filter = "(&(objectClass=user)(samaccounttype=" . adLDAP::ADLDAP_NORMAL_ACCOUNT .")(objectCategory=person)(cn=" . $search . "))"; + $fields = array("samaccountname","displayname"); + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + $usersArray = array(); + for ($i=0; $i<$entries["count"]; $i++){ + if ($includeDescription && strlen($entries[$i]["displayname"][0])>0){ + $usersArray[$entries[$i]["samaccountname"][0]] = $entries[$i]["displayname"][0]; + } elseif ($includeDescription){ + $usersArray[$entries[$i]["samaccountname"][0]] = $entries[$i]["samaccountname"][0]; + } else { + array_push($usersArray, $entries[$i]["samaccountname"][0]); + } + } + if ($sorted) { + asort($usersArray); + } + return $usersArray; + } + + /** + * Converts a username (samAccountName) to a GUID + * + * @param string $username The username to query + * @return string + */ + public function usernameToGuid($username) + { + if (!$this->adldap->getLdapBind()){ return false; } + if ($username === null){ return "Missing compulsory field [username]"; } + + $filter = "samaccountname=" . $username; + $fields = array("objectGUID"); + $sr = @ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + if (ldap_count_entries($this->adldap->getLdapConnection(), $sr) > 0) { + $entry = @ldap_first_entry($this->adldap->getLdapConnection(), $sr); + $guid = @ldap_get_values_len($this->adldap->getLdapConnection(), $entry, 'objectGUID'); + $strGUID = $this->adldap->utilities()->binaryToText($guid[0]); + return $strGUID; + } + return false; + } + + /** + * Return a list of all users in AD that have a specific value in a field + * + * @param bool $includeDescription Return a description of the user + * @param string $searchField Field to search search for + * @param string $searchFilter Value to search for in the specified field + * @param bool $sorted Sort the user accounts + * @return array + */ + public function find($includeDescription = false, $searchField = false, $searchFilter = false, $sorted = true){ + if (!$this->adldap->getLdapBind()){ return false; } + + // Perform the search and grab all their details + $searchParams = ""; + if ($searchField) { + $searchParams = "(" . $searchField . "=" . $searchFilter . ")"; + } + $filter = "(&(objectClass=user)(samaccounttype=" . adLDAP::ADLDAP_NORMAL_ACCOUNT .")(objectCategory=person)" . $searchParams . ")"; + $fields = array("samaccountname","displayname"); + $sr = ldap_search($this->adldap->getLdapConnection(), $this->adldap->getBaseDn(), $filter, $fields); + $entries = ldap_get_entries($this->adldap->getLdapConnection(), $sr); + + $usersArray = array(); + for ($i=0; $i < $entries["count"]; $i++) { + if ($includeDescription && strlen($entries[$i]["displayname"][0]) > 0) { + $usersArray[$entries[$i]["samaccountname"][0]] = $entries[$i]["displayname"][0]; + } + else if ($includeDescription) { + $usersArray[$entries[$i]["samaccountname"][0]] = $entries[$i]["samaccountname"][0]; + } + else { + array_push($usersArray, $entries[$i]["samaccountname"][0]); + } + } + if ($sorted){ + asort($usersArray); + } + return ($usersArray); + } + + /** + * Move a user account to a different OU + * + * @param string $username The username to move (please be careful here!) + * @param array $container The container or containers to move the user to (please be careful here!). + * accepts containers in 1. parent 2. child order + * @return array + */ + public function move($username, $container) + { + if (!$this->adldap->getLdapBind()) { return false; } + if ($username === null) { return "Missing compulsory field [username]"; } + if ($container === null) { return "Missing compulsory field [container]"; } + if (!is_array($container)) { return "Container must be an array"; } + + $userInfo = $this->info($username, array("*")); + $dn = $userInfo[0]['distinguishedname'][0]; + $newRDn = "cn=" . $username; + $container = array_reverse($container); + $newContainer = "ou=" . implode(",ou=",$container); + $newBaseDn = strtolower($newContainer) . "," . $this->adldap->getBaseDn(); + $result = @ldap_rename($this->adldap->getLdapConnection(), $dn, $newRDn, $newBaseDn, true); + if ($result !== true) { + return false; + } + return true; + } + + /** + * Get the last logon time of any user as a Unix timestamp + * + * @param string $username + * @return long $unixTimestamp + */ + public function getLastLogon($username) { + if (!$this->adldap->getLdapBind()) { return false; } + if ($username === null) { return "Missing compulsory field [username]"; } + $userInfo = $this->info($username, array("lastLogonTimestamp")); + $lastLogon = adLDAPUtils::convertWindowsTimeToUnixTime($userInfo[0]['lastLogonTimestamp'][0]); + return $lastLogon; + } + +} +?> diff --git a/lib/plugins/authad/adLDAP/classes/adLDAPUtils.php b/lib/plugins/authad/adLDAP/classes/adLDAPUtils.php index f039a4290..5e8644188 100644 --- a/lib/plugins/authad/adLDAP/classes/adLDAPUtils.php +++ b/lib/plugins/authad/adLDAP/classes/adLDAPUtils.php @@ -1,264 +1,264 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @subpackage Utils
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 97 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
- */
-require_once(dirname(__FILE__) . '/../adLDAP.php');
-
-/**
-* UTILITY FUNCTIONS
-*/
-class adLDAPUtils {
- const ADLDAP_VERSION = '4.0.4';
-
- /**
- * The current adLDAP connection via dependency injection
- *
- * @var adLDAP
- */
- protected $adldap;
-
- public function __construct(adLDAP $adldap) {
- $this->adldap = $adldap;
- }
-
-
- /**
- * Take an LDAP query and return the nice names, without all the LDAP prefixes (eg. CN, DN)
- *
- * @param array $groups
- * @return array
- */
- public function niceNames($groups)
- {
-
- $groupArray = array();
- for ($i=0; $i<$groups["count"]; $i++){ // For each group
- $line = $groups[$i];
-
- if (strlen($line)>0) {
- // More presumptions, they're all prefixed with CN=
- // so we ditch the first three characters and the group
- // name goes up to the first comma
- $bits=explode(",", $line);
- $groupArray[] = substr($bits[0], 3, (strlen($bits[0])-3));
- }
- }
- return $groupArray;
- }
-
- /**
- * Escape characters for use in an ldap_create function
- *
- * @param string $str
- * @return string
- */
- public function escapeCharacters($str) {
- $str = str_replace(",", "\,", $str);
- return $str;
- }
-
- /**
- * Escape strings for the use in LDAP filters
- *
- * DEVELOPERS SHOULD BE DOING PROPER FILTERING IF THEY'RE ACCEPTING USER INPUT
- * Ported from Perl's Net::LDAP::Util escape_filter_value
- *
- * @param string $str The string the parse
- * @author Port by Andreas Gohr <andi@splitbrain.org>
- * @return string
- */
- public function ldapSlashes($str){
- return preg_replace('/([\x00-\x1F\*\(\)\\\\])/e',
- '"\\\\\".join("",unpack("H2","$1"))',
- $str);
- }
-
- /**
- * Converts a string GUID to a hexdecimal value so it can be queried
- *
- * @param string $strGUID A string representation of a GUID
- * @return string
- */
- public function strGuidToHex($strGUID)
- {
- $strGUID = str_replace('-', '', $strGUID);
-
- $octet_str = '\\' . substr($strGUID, 6, 2);
- $octet_str .= '\\' . substr($strGUID, 4, 2);
- $octet_str .= '\\' . substr($strGUID, 2, 2);
- $octet_str .= '\\' . substr($strGUID, 0, 2);
- $octet_str .= '\\' . substr($strGUID, 10, 2);
- $octet_str .= '\\' . substr($strGUID, 8, 2);
- $octet_str .= '\\' . substr($strGUID, 14, 2);
- $octet_str .= '\\' . substr($strGUID, 12, 2);
- //$octet_str .= '\\' . substr($strGUID, 16, strlen($strGUID));
- for ($i=16; $i<=(strlen($strGUID)-2); $i++) {
- if (($i % 2) == 0) {
- $octet_str .= '\\' . substr($strGUID, $i, 2);
- }
- }
-
- return $octet_str;
- }
-
- /**
- * Convert a binary SID to a text SID
- *
- * @param string $binsid A Binary SID
- * @return string
- */
- public function getTextSID($binsid) {
- $hex_sid = bin2hex($binsid);
- $rev = hexdec(substr($hex_sid, 0, 2));
- $subcount = hexdec(substr($hex_sid, 2, 2));
- $auth = hexdec(substr($hex_sid, 4, 12));
- $result = "$rev-$auth";
-
- for ($x=0;$x < $subcount; $x++) {
- $subauth[$x] =
- hexdec($this->littleEndian(substr($hex_sid, 16 + ($x * 8), 8)));
- $result .= "-" . $subauth[$x];
- }
-
- // Cheat by tacking on the S-
- return 'S-' . $result;
- }
-
- /**
- * Converts a little-endian hex number to one that hexdec() can convert
- *
- * @param string $hex A hex code
- * @return string
- */
- public function littleEndian($hex)
- {
- $result = '';
- for ($x = strlen($hex) - 2; $x >= 0; $x = $x - 2) {
- $result .= substr($hex, $x, 2);
- }
- return $result;
- }
-
- /**
- * Converts a binary attribute to a string
- *
- * @param string $bin A binary LDAP attribute
- * @return string
- */
- public function binaryToText($bin)
- {
- $hex_guid = bin2hex($bin);
- $hex_guid_to_guid_str = '';
- for($k = 1; $k <= 4; ++$k) {
- $hex_guid_to_guid_str .= substr($hex_guid, 8 - 2 * $k, 2);
- }
- $hex_guid_to_guid_str .= '-';
- for($k = 1; $k <= 2; ++$k) {
- $hex_guid_to_guid_str .= substr($hex_guid, 12 - 2 * $k, 2);
- }
- $hex_guid_to_guid_str .= '-';
- for($k = 1; $k <= 2; ++$k) {
- $hex_guid_to_guid_str .= substr($hex_guid, 16 - 2 * $k, 2);
- }
- $hex_guid_to_guid_str .= '-' . substr($hex_guid, 16, 4);
- $hex_guid_to_guid_str .= '-' . substr($hex_guid, 20);
- return strtoupper($hex_guid_to_guid_str);
- }
-
- /**
- * Converts a binary GUID to a string GUID
- *
- * @param string $binaryGuid The binary GUID attribute to convert
- * @return string
- */
- public function decodeGuid($binaryGuid)
- {
- if ($binaryGuid === null){ return "Missing compulsory field [binaryGuid]"; }
-
- $strGUID = $this->binaryToText($binaryGuid);
- return $strGUID;
- }
-
- /**
- * Convert a boolean value to a string
- * You should never need to call this yourself
- *
- * @param bool $bool Boolean value
- * @return string
- */
- public function boolToStr($bool)
- {
- return ($bool) ? 'TRUE' : 'FALSE';
- }
-
- /**
- * Convert 8bit characters e.g. accented characters to UTF8 encoded characters
- */
- public function encode8Bit(&$item, $key) {
- $encode = false;
- if (is_string($item)) {
- for ($i=0; $i<strlen($item); $i++) {
- if (ord($item[$i]) >> 7) {
- $encode = true;
- }
- }
- }
- if ($encode === true && $key != 'password') {
- $item = utf8_encode($item);
- }
- }
-
- /**
- * Get the current class version number
- *
- * @return string
- */
- public function getVersion() {
- return self::ADLDAP_VERSION;
- }
-
- /**
- * Round a Windows timestamp down to seconds and remove the seconds between 1601-01-01 and 1970-01-01
- *
- * @param long $windowsTime
- * @return long $unixTime
- */
- public static function convertWindowsTimeToUnixTime($windowsTime) {
- $unixTime = round($windowsTime / 10000000) - 11644477200;
- return $unixTime;
- }
-}
-
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @subpackage Utils + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 97 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ + */ +require_once(dirname(__FILE__) . '/../adLDAP.php'); + +/** +* UTILITY FUNCTIONS +*/ +class adLDAPUtils { + const ADLDAP_VERSION = '4.0.4'; + + /** + * The current adLDAP connection via dependency injection + * + * @var adLDAP + */ + protected $adldap; + + public function __construct(adLDAP $adldap) { + $this->adldap = $adldap; + } + + + /** + * Take an LDAP query and return the nice names, without all the LDAP prefixes (eg. CN, DN) + * + * @param array $groups + * @return array + */ + public function niceNames($groups) + { + + $groupArray = array(); + for ($i=0; $i<$groups["count"]; $i++){ // For each group + $line = $groups[$i]; + + if (strlen($line)>0) { + // More presumptions, they're all prefixed with CN= + // so we ditch the first three characters and the group + // name goes up to the first comma + $bits=explode(",", $line); + $groupArray[] = substr($bits[0], 3, (strlen($bits[0])-3)); + } + } + return $groupArray; + } + + /** + * Escape characters for use in an ldap_create function + * + * @param string $str + * @return string + */ + public function escapeCharacters($str) { + $str = str_replace(",", "\,", $str); + return $str; + } + + /** + * Escape strings for the use in LDAP filters + * + * DEVELOPERS SHOULD BE DOING PROPER FILTERING IF THEY'RE ACCEPTING USER INPUT + * Ported from Perl's Net::LDAP::Util escape_filter_value + * + * @param string $str The string the parse + * @author Port by Andreas Gohr <andi@splitbrain.org> + * @return string + */ + public function ldapSlashes($str){ + return preg_replace('/([\x00-\x1F\*\(\)\\\\])/e', + '"\\\\\".join("",unpack("H2","$1"))', + $str); + } + + /** + * Converts a string GUID to a hexdecimal value so it can be queried + * + * @param string $strGUID A string representation of a GUID + * @return string + */ + public function strGuidToHex($strGUID) + { + $strGUID = str_replace('-', '', $strGUID); + + $octet_str = '\\' . substr($strGUID, 6, 2); + $octet_str .= '\\' . substr($strGUID, 4, 2); + $octet_str .= '\\' . substr($strGUID, 2, 2); + $octet_str .= '\\' . substr($strGUID, 0, 2); + $octet_str .= '\\' . substr($strGUID, 10, 2); + $octet_str .= '\\' . substr($strGUID, 8, 2); + $octet_str .= '\\' . substr($strGUID, 14, 2); + $octet_str .= '\\' . substr($strGUID, 12, 2); + //$octet_str .= '\\' . substr($strGUID, 16, strlen($strGUID)); + for ($i=16; $i<=(strlen($strGUID)-2); $i++) { + if (($i % 2) == 0) { + $octet_str .= '\\' . substr($strGUID, $i, 2); + } + } + + return $octet_str; + } + + /** + * Convert a binary SID to a text SID + * + * @param string $binsid A Binary SID + * @return string + */ + public function getTextSID($binsid) { + $hex_sid = bin2hex($binsid); + $rev = hexdec(substr($hex_sid, 0, 2)); + $subcount = hexdec(substr($hex_sid, 2, 2)); + $auth = hexdec(substr($hex_sid, 4, 12)); + $result = "$rev-$auth"; + + for ($x=0;$x < $subcount; $x++) { + $subauth[$x] = + hexdec($this->littleEndian(substr($hex_sid, 16 + ($x * 8), 8))); + $result .= "-" . $subauth[$x]; + } + + // Cheat by tacking on the S- + return 'S-' . $result; + } + + /** + * Converts a little-endian hex number to one that hexdec() can convert + * + * @param string $hex A hex code + * @return string + */ + public function littleEndian($hex) + { + $result = ''; + for ($x = strlen($hex) - 2; $x >= 0; $x = $x - 2) { + $result .= substr($hex, $x, 2); + } + return $result; + } + + /** + * Converts a binary attribute to a string + * + * @param string $bin A binary LDAP attribute + * @return string + */ + public function binaryToText($bin) + { + $hex_guid = bin2hex($bin); + $hex_guid_to_guid_str = ''; + for($k = 1; $k <= 4; ++$k) { + $hex_guid_to_guid_str .= substr($hex_guid, 8 - 2 * $k, 2); + } + $hex_guid_to_guid_str .= '-'; + for($k = 1; $k <= 2; ++$k) { + $hex_guid_to_guid_str .= substr($hex_guid, 12 - 2 * $k, 2); + } + $hex_guid_to_guid_str .= '-'; + for($k = 1; $k <= 2; ++$k) { + $hex_guid_to_guid_str .= substr($hex_guid, 16 - 2 * $k, 2); + } + $hex_guid_to_guid_str .= '-' . substr($hex_guid, 16, 4); + $hex_guid_to_guid_str .= '-' . substr($hex_guid, 20); + return strtoupper($hex_guid_to_guid_str); + } + + /** + * Converts a binary GUID to a string GUID + * + * @param string $binaryGuid The binary GUID attribute to convert + * @return string + */ + public function decodeGuid($binaryGuid) + { + if ($binaryGuid === null){ return "Missing compulsory field [binaryGuid]"; } + + $strGUID = $this->binaryToText($binaryGuid); + return $strGUID; + } + + /** + * Convert a boolean value to a string + * You should never need to call this yourself + * + * @param bool $bool Boolean value + * @return string + */ + public function boolToStr($bool) + { + return ($bool) ? 'TRUE' : 'FALSE'; + } + + /** + * Convert 8bit characters e.g. accented characters to UTF8 encoded characters + */ + public function encode8Bit(&$item, $key) { + $encode = false; + if (is_string($item)) { + for ($i=0; $i<strlen($item); $i++) { + if (ord($item[$i]) >> 7) { + $encode = true; + } + } + } + if ($encode === true && $key != 'password') { + $item = utf8_encode($item); + } + } + + /** + * Get the current class version number + * + * @return string + */ + public function getVersion() { + return self::ADLDAP_VERSION; + } + + /** + * Round a Windows timestamp down to seconds and remove the seconds between 1601-01-01 and 1970-01-01 + * + * @param long $windowsTime + * @return long $unixTime + */ + public static function convertWindowsTimeToUnixTime($windowsTime) { + $unixTime = round($windowsTime / 10000000) - 11644477200; + return $unixTime; + } +} + ?>
\ No newline at end of file diff --git a/lib/plugins/authad/adLDAP/collections/adLDAPCollection.php b/lib/plugins/authad/adLDAP/collections/adLDAPCollection.php index c0a2eb2fa..433d39f18 100644 --- a/lib/plugins/authad/adLDAP/collections/adLDAPCollection.php +++ b/lib/plugins/authad/adLDAP/collections/adLDAPCollection.php @@ -1,137 +1,137 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @subpackage Collection
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 97 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
-*/
-
-abstract class adLDAPCollection
-{
- /**
- * The current adLDAP connection via dependency injection
- *
- * @var adLDAP
- */
- protected $adldap;
-
- /**
- * The current object being modifed / called
- *
- * @var mixed
- */
- protected $currentObject;
-
- /**
- * The raw info array from Active Directory
- *
- * @var array
- */
- protected $info;
-
- public function __construct($info, adLDAP $adldap)
- {
- $this->setInfo($info);
- $this->adldap = $adldap;
- }
-
- /**
- * Set the raw info array from Active Directory
- *
- * @param array $info
- */
- public function setInfo(array $info)
- {
- if ($this->info && sizeof($info) >= 1) {
- unset($this->info);
- }
- $this->info = $info;
- }
-
- /**
- * Magic get method to retrieve data from the raw array in a formatted way
- *
- * @param string $attribute
- * @return mixed
- */
- public function __get($attribute)
- {
- if (isset($this->info[0]) && is_array($this->info[0])) {
- foreach ($this->info[0] as $keyAttr => $valueAttr) {
- if (strtolower($keyAttr) == strtolower($attribute)) {
- if ($this->info[0][strtolower($attribute)]['count'] == 1) {
- return $this->info[0][strtolower($attribute)][0];
- }
- else {
- $array = array();
- foreach ($this->info[0][strtolower($attribute)] as $key => $value) {
- if ((string)$key != 'count') {
- $array[$key] = $value;
- }
- }
- return $array;
- }
- }
- }
- }
- else {
- return NULL;
- }
- }
-
- /**
- * Magic set method to update an attribute
- *
- * @param string $attribute
- * @param string $value
- * @return bool
- */
- abstract public function __set($attribute, $value);
-
- /**
- * Magic isset method to check for the existence of an attribute
- *
- * @param string $attribute
- * @return bool
- */
- public function __isset($attribute) {
- if (isset($this->info[0]) && is_array($this->info[0])) {
- foreach ($this->info[0] as $keyAttr => $valueAttr) {
- if (strtolower($keyAttr) == strtolower($attribute)) {
- return true;
- }
- }
- }
- return false;
- }
-}
-?>
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @subpackage Collection + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 97 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ +*/ + +abstract class adLDAPCollection +{ + /** + * The current adLDAP connection via dependency injection + * + * @var adLDAP + */ + protected $adldap; + + /** + * The current object being modifed / called + * + * @var mixed + */ + protected $currentObject; + + /** + * The raw info array from Active Directory + * + * @var array + */ + protected $info; + + public function __construct($info, adLDAP $adldap) + { + $this->setInfo($info); + $this->adldap = $adldap; + } + + /** + * Set the raw info array from Active Directory + * + * @param array $info + */ + public function setInfo(array $info) + { + if ($this->info && sizeof($info) >= 1) { + unset($this->info); + } + $this->info = $info; + } + + /** + * Magic get method to retrieve data from the raw array in a formatted way + * + * @param string $attribute + * @return mixed + */ + public function __get($attribute) + { + if (isset($this->info[0]) && is_array($this->info[0])) { + foreach ($this->info[0] as $keyAttr => $valueAttr) { + if (strtolower($keyAttr) == strtolower($attribute)) { + if ($this->info[0][strtolower($attribute)]['count'] == 1) { + return $this->info[0][strtolower($attribute)][0]; + } + else { + $array = array(); + foreach ($this->info[0][strtolower($attribute)] as $key => $value) { + if ((string)$key != 'count') { + $array[$key] = $value; + } + } + return $array; + } + } + } + } + else { + return NULL; + } + } + + /** + * Magic set method to update an attribute + * + * @param string $attribute + * @param string $value + * @return bool + */ + abstract public function __set($attribute, $value); + + /** + * Magic isset method to check for the existence of an attribute + * + * @param string $attribute + * @return bool + */ + public function __isset($attribute) { + if (isset($this->info[0]) && is_array($this->info[0])) { + foreach ($this->info[0] as $keyAttr => $valueAttr) { + if (strtolower($keyAttr) == strtolower($attribute)) { + return true; + } + } + } + return false; + } +} +?> diff --git a/lib/plugins/authad/adLDAP/collections/adLDAPComputerCollection.php b/lib/plugins/authad/adLDAP/collections/adLDAPComputerCollection.php index 4f11d8f41..09f82cadc 100644 --- a/lib/plugins/authad/adLDAP/collections/adLDAPComputerCollection.php +++ b/lib/plugins/authad/adLDAP/collections/adLDAPComputerCollection.php @@ -1,46 +1,46 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @subpackage ComputerCollection
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 97 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
-*/
-
-class adLDAPComputerCollection extends adLDAPCollection
-{
-
- public function __set($attribute, $value)
- {
-
- }
-}
-?>
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @subpackage ComputerCollection + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 97 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ +*/ + +class adLDAPComputerCollection extends adLDAPCollection +{ + + public function __set($attribute, $value) + { + + } +} +?> diff --git a/lib/plugins/authad/adLDAP/collections/adLDAPContactCollection.php b/lib/plugins/authad/adLDAP/collections/adLDAPContactCollection.php index d42fe6d4c..a9efad5a9 100644 --- a/lib/plugins/authad/adLDAP/collections/adLDAPContactCollection.php +++ b/lib/plugins/authad/adLDAP/collections/adLDAPContactCollection.php @@ -1,46 +1,46 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @subpackage ContactCollection
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 97 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
-*/
-
-class adLDAPContactCollection extends adLDAPCollection
-{
-
- public function __set($attribute, $value)
- {
-
- }
-}
-?>
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @subpackage ContactCollection + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 97 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ +*/ + +class adLDAPContactCollection extends adLDAPCollection +{ + + public function __set($attribute, $value) + { + + } +} +?> diff --git a/lib/plugins/authad/adLDAP/collections/adLDAPGroupCollection.php b/lib/plugins/authad/adLDAP/collections/adLDAPGroupCollection.php index cff12fc20..ef4af8df2 100644 --- a/lib/plugins/authad/adLDAP/collections/adLDAPGroupCollection.php +++ b/lib/plugins/authad/adLDAP/collections/adLDAPGroupCollection.php @@ -1,46 +1,46 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @subpackage GroupCollection
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 97 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
-*/
-
-class adLDAPGroupCollection extends adLDAPCollection
-{
-
- public function __set($attribute, $value)
- {
-
- }
-}
-?>
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @subpackage GroupCollection + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 97 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ +*/ + +class adLDAPGroupCollection extends adLDAPCollection +{ + + public function __set($attribute, $value) + { + + } +} +?> diff --git a/lib/plugins/authad/adLDAP/collections/adLDAPUserCollection.php b/lib/plugins/authad/adLDAP/collections/adLDAPUserCollection.php index 801d90296..63fce5f96 100644 --- a/lib/plugins/authad/adLDAP/collections/adLDAPUserCollection.php +++ b/lib/plugins/authad/adLDAP/collections/adLDAPUserCollection.php @@ -1,46 +1,46 @@ -<?php
-/**
- * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY
- * Version 4.0.4
- *
- * PHP Version 5 with SSL and LDAP support
- *
- * Written by Scott Barnett, Richard Hyland
- * email: scott@wiggumworld.com, adldap@richardhyland.com
- * http://adldap.sourceforge.net/
- *
- * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- *
- * We'd appreciate any improvements or additions to be submitted back
- * to benefit the entire community :)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * @category ToolsAndUtilities
- * @package adLDAP
- * @subpackage UserCollection
- * @author Scott Barnett, Richard Hyland
- * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland
- * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1
- * @revision $Revision: 97 $
- * @version 4.0.4
- * @link http://adldap.sourceforge.net/
-*/
-
-class adLDAPUserCollection extends adLDAPCollection
-{
-
- public function __set($attribute, $value)
- {
-
- }
-}
-?>
+<?php +/** + * PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY + * Version 4.0.4 + * + * PHP Version 5 with SSL and LDAP support + * + * Written by Scott Barnett, Richard Hyland + * email: scott@wiggumworld.com, adldap@richardhyland.com + * http://adldap.sourceforge.net/ + * + * Copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * + * We'd appreciate any improvements or additions to be submitted back + * to benefit the entire community :) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * @category ToolsAndUtilities + * @package adLDAP + * @subpackage UserCollection + * @author Scott Barnett, Richard Hyland + * @copyright (c) 2006-2012 Scott Barnett, Richard Hyland + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 + * @revision $Revision: 97 $ + * @version 4.0.4 + * @link http://adldap.sourceforge.net/ +*/ + +class adLDAPUserCollection extends adLDAPCollection +{ + + public function __set($attribute, $value) + { + + } +} +?> diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index fcbd2eeef..0860e5756 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -92,16 +92,24 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { } // Prepare SSO - if(!utf8_check($_SERVER['REMOTE_USER'])) { - $_SERVER['REMOTE_USER'] = utf8_encode($_SERVER['REMOTE_USER']); - } - if($_SERVER['REMOTE_USER'] && $this->conf['sso']) { - $_SERVER['REMOTE_USER'] = $this->cleanUser($_SERVER['REMOTE_USER']); + if(!empty($_SERVER['REMOTE_USER'])) { + + // make sure the right encoding is used + if($this->getConf('sso_charset')) { + $_SERVER['REMOTE_USER'] = iconv($this->getConf('sso_charset'), 'UTF-8', $_SERVER['REMOTE_USER']); + } elseif(!utf8_check($_SERVER['REMOTE_USER'])) { + $_SERVER['REMOTE_USER'] = utf8_encode($_SERVER['REMOTE_USER']); + } + + // trust the incoming user + if($this->conf['sso']) { + $_SERVER['REMOTE_USER'] = $this->cleanUser($_SERVER['REMOTE_USER']); - // we need to simulate a login - if(empty($_COOKIE[DOKU_COOKIE])) { - $INPUT->set('u', $_SERVER['REMOTE_USER']); - $INPUT->set('p', 'sso_only'); + // we need to simulate a login + if(empty($_COOKIE[DOKU_COOKIE])) { + $INPUT->set('u', $_SERVER['REMOTE_USER']); + $INPUT->set('p', 'sso_only'); + } } } @@ -324,11 +332,11 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param array $filter array of field/pattern pairs, null for no filter * @return array userinfo (refer getUserData for internal userinfo details) */ - public function retrieveUsers($start = 0, $limit = -1, $filter = array()) { + public function retrieveUsers($start = 0, $limit = 0, $filter = array()) { $adldap = $this->_adldap(null); if(!$adldap) return false; - if($this->users === null) { + if(!$this->users) { //get info for given user $result = $adldap->user()->all(); if (!$result) return array(); @@ -349,7 +357,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { } if($this->_filter($user, $info)) { $result[$user] = $info; - if(($limit >= 0) && (++$count >= $limit)) break; + if(($limit > 0) && (++$count >= $limit)) break; } } return $result; @@ -504,6 +512,31 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { } /** + * Returns a list of configured domains + * + * The default domain has an empty string as key + * + * @return array associative array(key => domain) + */ + public function _getConfiguredDomains() { + $domains = array(); + if(empty($this->conf['account_suffix'])) return $domains; // not configured yet + + // add default domain, using the name from account suffix + $domains[''] = ltrim($this->conf['account_suffix'], '@'); + + // find additional domains + foreach($this->conf as $key => $val) { + if(is_array($val) && isset($val['account_suffix'])) { + $domains[$key] = ltrim($val['account_suffix'], '@'); + } + } + ksort($domains); + + return $domains; + } + + /** * Check provided user and userinfo for matching patterns * * The patterns are set up with $this->_constructPattern() diff --git a/lib/plugins/authad/conf/default.php b/lib/plugins/authad/conf/default.php index f71202cfc..6fb4c9145 100644 --- a/lib/plugins/authad/conf/default.php +++ b/lib/plugins/authad/conf/default.php @@ -4,6 +4,7 @@ $conf['account_suffix'] = ''; $conf['base_dn'] = ''; $conf['domain_controllers'] = ''; $conf['sso'] = 0; +$conf['sso_charset'] = ''; $conf['admin_username'] = ''; $conf['admin_password'] = ''; $conf['real_primarygroup'] = 0; diff --git a/lib/plugins/authad/conf/metadata.php b/lib/plugins/authad/conf/metadata.php index 7b4f895d0..560d25315 100644 --- a/lib/plugins/authad/conf/metadata.php +++ b/lib/plugins/authad/conf/metadata.php @@ -4,6 +4,7 @@ $meta['account_suffix'] = array('string','_caution' => 'danger'); $meta['base_dn'] = array('string','_caution' => 'danger'); $meta['domain_controllers'] = array('string','_caution' => 'danger'); $meta['sso'] = array('onoff','_caution' => 'danger'); +$meta['sso_charset'] = array('string','_caution' => 'danger'); $meta['admin_username'] = array('string','_caution' => 'danger'); $meta['admin_password'] = array('password','_caution' => 'danger'); $meta['real_primarygroup'] = array('onoff','_caution' => 'danger'); diff --git a/lib/plugins/authad/lang/ar/settings.php b/lib/plugins/authad/lang/ar/settings.php new file mode 100644 index 000000000..d2a2e2a35 --- /dev/null +++ b/lib/plugins/authad/lang/ar/settings.php @@ -0,0 +1,12 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author alhajr <alhajr300@gmail.com> + */ +$lang['account_suffix'] = 'لاحقة الحساب الخاص بك. على سبيل المثال. <code>@my.domain.org</code>'; +$lang['domain_controllers'] = 'قائمة مفصولة بفواصل من وحدات التحكم بالمجال. على سبيل المثال. <code>srv1.domain.org,srv2.domain.org</code>'; +$lang['admin_password'] = 'كلمة المرور للمستخدم أعلاه.'; +$lang['real_primarygroup'] = 'ينبغي أن تحل المجموعة الأساسية الحقيقية بدلاً من افتراض "Domain Users" (أبطأ).'; +$lang['expirywarn'] = 'عدد الأيام المقدمة لتحذير المستخدم حول كلمة مرور منتهية الصلاحية. (0) للتعطيل.'; diff --git a/lib/plugins/authad/lang/bg/settings.php b/lib/plugins/authad/lang/bg/settings.php index 877810c4e..bf7a2d8ce 100644 --- a/lib/plugins/authad/lang/bg/settings.php +++ b/lib/plugins/authad/lang/bg/settings.php @@ -1,18 +1,19 @@ <?php + /** - * Bulgarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Kiril <neohidra@gmail.com> */ -$lang['account_suffix'] = 'Наставка на акаунта Ви. Например <code>@някакъв.домейн.org</code>'; -$lang['base_dn'] = 'Вашият основен DN. Например <code>DC=моят,DC=домейн,DC=org</code>'; -$lang['domain_controllers'] = 'Domain controller списък, разделете сървърите със запетая. Например <code>сървър1.домейн.org,сървър2.домейн.org</code>'; -$lang['admin_username'] = 'Привилегирован Active Directory потребител с достъп до данните на останалите потребители. Не е задължително, но е необходимо за някои функционалности като изпращането на имейл за абонаменти.'; -$lang['admin_password'] = 'Паролата на горния потребител.'; -$lang['sso'] = 'Да се ползва ли еднократно вписване чрез Kerberos или NTLM?'; -$lang['real_primarygroup'] = 'Да се извлича ли истинската група вместо да се предполага "Domain Users" (по-бавно)'; -$lang['use_ssl'] = 'Ползване на SSL свързаност? Не отбелязвайте TLS (по-долу) ако включите опцията.'; -$lang['use_tls'] = 'Ползване на TLS свързаност? Не отбелязвайте SSL (по-горе) ако включите опцията.'; -$lang['debug'] = 'Показване на допълнителна debug информация при грешка?'; -$lang['expirywarn'] = 'Предупреждаване на потребителите Х дни преди изтичане валидността на паролата им. Въведете 0 за изключване.'; -$lang['additional'] = 'Списък с допълнителни AD атрибути за извличане от потребителските данни (разделяйте ги със запетая). Ползва се от няколко приставки.';
\ No newline at end of file +$lang['account_suffix'] = 'Наставка на акаунта Ви. Например <code>@някакъв.домейн.org</code>'; +$lang['base_dn'] = 'Вашият основен DN. Например <code>DC=моят,DC=домейн,DC=org</code>'; +$lang['domain_controllers'] = 'Domain controller списък, разделете сървърите със запетая. Например <code>сървър1.домейн.org,сървър2.домейн.org</code>'; +$lang['admin_username'] = 'Привилегирован Active Directory потребител с достъп до данните на останалите потребители. Не е задължително, но е необходимо за някои функционалности като изпращането на имейл за абонаменти.'; +$lang['admin_password'] = 'Паролата на горния потребител.'; +$lang['sso'] = 'Да се ползва ли еднократно вписване чрез Kerberos или NTLM?'; +$lang['real_primarygroup'] = 'Да се извлича ли истинската група вместо да се предполага "Domain Users" (по-бавно)'; +$lang['use_ssl'] = 'Ползване на SSL свързаност? Не отбелязвайте TLS (по-долу) ако включите опцията.'; +$lang['use_tls'] = 'Ползване на TLS свързаност? Не отбелязвайте SSL (по-горе) ако включите опцията.'; +$lang['debug'] = 'Показване на допълнителна debug информация при грешка?'; +$lang['expirywarn'] = 'Предупреждаване на потребителите Х дни преди изтичане валидността на паролата им. Въведете 0 за изключване.'; +$lang['additional'] = 'Списък с допълнителни AD атрибути за извличане от потребителските данни (разделяйте ги със запетая). Ползва се от няколко приставки.'; diff --git a/lib/plugins/authad/lang/da/settings.php b/lib/plugins/authad/lang/da/settings.php new file mode 100644 index 000000000..f50abf1ce --- /dev/null +++ b/lib/plugins/authad/lang/da/settings.php @@ -0,0 +1,20 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Soren Birk <soer9648@hotmail.com> + * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> + */ +$lang['account_suffix'] = 'Dit konto suffiks. F.eks. <code>@mit.domæne.dk</code>'; +$lang['base_dn'] = 'Dit grund DN. F.eks. <code>DC=mit,DC=domæne,DC=dk</code>'; +$lang['domain_controllers'] = 'En kommasepareret liste over domænecontrollere. F.eks. <code>srv1.domain.org,srv2.domain.org</code>'; +$lang['admin_username'] = 'En privilegeret Active Directory bruger med adgang til alle andre brugeres data. Valgfri, men skal bruges til forskellige handlinger såsom at sende abonnement e-mails.'; +$lang['admin_password'] = 'Kodeordet til den ovenstående bruger.'; +$lang['sso'] = 'Bør Single-Sign-On via Kerberos eller NTLM bruges?'; +$lang['real_primarygroup'] = 'Bør den korrekte primære gruppe findes i stedet for at antage "Domain Users" (langsommere)'; +$lang['use_ssl'] = 'Benyt SSL forbindelse? hvis ja, vælg ikke TLS herunder.'; +$lang['use_tls'] = 'Benyt TLS forbindelse? hvis ja, vælg ikke SSL herover.'; +$lang['debug'] = 'Vis yderligere debug output ved fejl?'; +$lang['expirywarn'] = 'Dage før brugere skal advares om udløben adgangskode. 0 for at deaktivere.'; +$lang['additional'] = 'En kommasepareret liste over yderligere AD attributter der skal hentes fra brugerdata. Brug af nogen udvidelser.'; diff --git a/lib/plugins/authad/lang/de/lang.php b/lib/plugins/authad/lang/de/lang.php new file mode 100644 index 000000000..eea511d1b --- /dev/null +++ b/lib/plugins/authad/lang/de/lang.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Andreas Gohr <gohr@cosmocode.de> + */ +$lang['domain'] = 'Anmelde-Domäne'; diff --git a/lib/plugins/authad/lang/de/settings.php b/lib/plugins/authad/lang/de/settings.php index fd624ad02..8105fb6f2 100644 --- a/lib/plugins/authad/lang/de/settings.php +++ b/lib/plugins/authad/lang/de/settings.php @@ -5,6 +5,8 @@ * * @author Frank Loizzi <contact@software.bacal.de> * @author Matthias Schulte <dokuwiki@lupo49.de> + * @author Ben Fey <benedikt.fey@beck-heun.de> + * @author Jonas Gröger <jonas.groeger@gmail.com> */ $lang['account_suffix'] = 'Ihr Account-Suffix. Z. B. <code>@my.domain.org</code>'; $lang['base_dn'] = 'Ihr Base-DN. Z. B. <code>DC=my,DC=domain,DC=org</code>'; @@ -12,6 +14,7 @@ $lang['domain_controllers'] = 'Eine Komma-separierte Liste von Domänen-Contr $lang['admin_username'] = 'Ein priviligierter Active Directory-Benutzer mit Zugriff zu allen anderen Benutzerdaten. Optional, aber wird benötigt für Aktionen wie z. B. dass Senden von Benachrichtigungs-Mails.'; $lang['admin_password'] = 'Das Passwort des obigen Benutzers.'; $lang['sso'] = 'Soll Single-Sign-On via Kerberos oder NTLM benutzt werden?'; +$lang['sso_charset'] = 'Der Zeichensatz, mit dem der Server den Kerberos- oder NTLM-Benutzernamen versendet. Leer lassen für UTF-8 oder latin-1. Benötigt die iconv-Erweiterung.'; $lang['real_primarygroup'] = 'Soll die echte primäre Gruppe aufgelöst werden anstelle der Annahme "Domain Users" (langsamer)'; $lang['use_ssl'] = 'SSL-Verbindung benutzen? Falls ja, TLS unterhalb nicht aktivieren.'; $lang['use_tls'] = 'TLS-Verbindung benutzen? Falls ja, SSL oberhalb nicht aktivieren.'; diff --git a/lib/plugins/authad/lang/el/settings.php b/lib/plugins/authad/lang/el/settings.php new file mode 100644 index 000000000..9bf23ea1c --- /dev/null +++ b/lib/plugins/authad/lang/el/settings.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author chris taklis <ctaklis@gmail.com> + */ +$lang['admin_password'] = 'Ο κωδικός του παραπάνω χρήστη.'; diff --git a/lib/plugins/authad/lang/en/lang.php b/lib/plugins/authad/lang/en/lang.php new file mode 100644 index 000000000..e2967d662 --- /dev/null +++ b/lib/plugins/authad/lang/en/lang.php @@ -0,0 +1,10 @@ +<?php +/** + * English language file for addomain plugin + * + * @author Andreas Gohr <gohr@cosmocode.de> + */ + +$lang['domain'] = 'Logon Domain'; + +//Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/authad/lang/en/settings.php b/lib/plugins/authad/lang/en/settings.php index aff49550b..92e9ac4e8 100644 --- a/lib/plugins/authad/lang/en/settings.php +++ b/lib/plugins/authad/lang/en/settings.php @@ -6,7 +6,8 @@ $lang['domain_controllers'] = 'A comma separated list of Domain controllers. Eg. $lang['admin_username'] = 'A privileged Active Directory user with access to all other user\'s data. Optional, but needed for certain actions like sending subscription mails.'; $lang['admin_password'] = 'The password of the above user.'; $lang['sso'] = 'Should Single-Sign-On via Kerberos or NTLM be used?'; -$lang['real_primarygroup'] = 'Should the real primary group be resolved instead of assuming "Domain Users" (slower)'; +$lang['sso_charset'] = 'The charset your webserver will pass the Kerberos or NTLM username in. Empty for UTF-8 or latin-1. Requires the iconv extension.'; +$lang['real_primarygroup'] = 'Should the real primary group be resolved instead of assuming "Domain Users" (slower).'; $lang['use_ssl'] = 'Use SSL connection? If used, do not enable TLS below.'; $lang['use_tls'] = 'Use TLS connection? If used, do not enable SSL above.'; $lang['debug'] = 'Display additional debugging output on errors?'; diff --git a/lib/plugins/authad/lang/eo/settings.php b/lib/plugins/authad/lang/eo/settings.php index ee672ecd3..11640ebb7 100644 --- a/lib/plugins/authad/lang/eo/settings.php +++ b/lib/plugins/authad/lang/eo/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Robert Bogenschneider <bogi@uea.org> */ $lang['account_suffix'] = 'Via konto-aldonaĵo, ekz. <code>@mia.domajno.lando</code>'; $lang['base_dn'] = 'Via baza DN, ekz. <code>DC=mia,DC=domajno,DC=lando</code>'; @@ -10,6 +11,7 @@ $lang['domain_controllers'] = 'Komodisigita listo de domajno-serviloj, ekz. < $lang['admin_username'] = 'Privilegiita Aktiv-Dosieruja uzanto kun aliro al ĉiuj uzantaj datumoj. Libervole, sed necesa por iuj agadoj kiel sendi abonan retpoŝton.'; $lang['admin_password'] = 'La pasvorto de tiu uzanto.'; $lang['sso'] = 'Ĉu uzi Sola Aliro tra Kerberos aŭ NTLM?'; +$lang['sso_charset'] = 'Per kiu karaktraro via retservilo pludonas uzantonomojn al Kerberos aŭ NTLM? Malplena por UTF-8 aŭ latin-1. Bezonas iconv-aldonaĵon.'; $lang['real_primarygroup'] = 'Ĉu trovi la veran ĉefan grupon anstataŭ supozi "Domajnuzantoj" (pli malrapida)?'; $lang['use_ssl'] = 'Ĉu uzi SSL-konekton? Se jes, ne aktivigu TLS sube.'; $lang['use_tls'] = 'Ĉu uzi TLS-konekton? Se jes, ne aktivigu SSL supre.'; diff --git a/lib/plugins/authad/lang/es/lang.php b/lib/plugins/authad/lang/es/lang.php new file mode 100644 index 000000000..c5b242cba --- /dev/null +++ b/lib/plugins/authad/lang/es/lang.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Juan De La Cruz <juann.dlc@gmail.com> + */ +$lang['domain'] = 'Dominio de inicio'; diff --git a/lib/plugins/authad/lang/es/settings.php b/lib/plugins/authad/lang/es/settings.php index 9d0aa80ac..9dbd44be8 100644 --- a/lib/plugins/authad/lang/es/settings.php +++ b/lib/plugins/authad/lang/es/settings.php @@ -4,6 +4,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author monica <may.dorado@gmail.com> + * @author Antonio Bueno <atnbueno@gmail.com> + * @author Juan De La Cruz <juann.dlc@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>'; @@ -11,3 +13,5 @@ $lang['domain_controllers'] = 'Una lista separada por coma de los controlador $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?'; +$lang['sso_charset'] = 'La codificación con que tu servidor web pasará el nombre de usuario Kerberos o NTLM. Si es UTF-8 o latin-1 dejar en blanco. Requiere la extensión iconv.'; +$lang['debug'] = 'Mostrar información adicional de depuración sobre los errores?'; diff --git a/lib/plugins/authad/lang/fi/settings.php b/lib/plugins/authad/lang/fi/settings.php index d3aa13e07..e2f432f36 100644 --- a/lib/plugins/authad/lang/fi/settings.php +++ b/lib/plugins/authad/lang/fi/settings.php @@ -1,6 +1,9 @@ <?php + /** - * Finnish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Otto Vainio <otto@valjakko.net> */ +$lang['debug'] = 'Näytä lisää debug-koodia virheistä?'; +$lang['expirywarn'] = 'Montako päivää etukäteen varoitetaan salasanan vanhenemissta. 0 poistaa.'; diff --git a/lib/plugins/authad/lang/fr/settings.php b/lib/plugins/authad/lang/fr/settings.php index d05390efc..84e0d00d9 100644 --- a/lib/plugins/authad/lang/fr/settings.php +++ b/lib/plugins/authad/lang/fr/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Bruno Veilleux <bruno.vey@gmail.com> + * @author Momo50 <c.brothelande@gmail.com> */ $lang['account_suffix'] = 'Le suffixe de votre compte. Ex.: <code>@mon.domaine.org</code>'; $lang['base_dn'] = 'Votre nom de domaine de base. <code>DC=mon,DC=domaine,DC=org</code>'; @@ -11,6 +12,7 @@ $lang['domain_controllers'] = 'Une liste de contrôleurs de domaine séparés $lang['admin_username'] = 'Un utilisateur Active Directory avec accès aux données de tous les autres utilisateurs. Facultatif, mais nécessaire pour certaines actions telles que l\'envoi de courriels d\'abonnement.'; $lang['admin_password'] = 'Le mot de passe de l\'utilisateur ci-dessus.'; $lang['sso'] = 'Est-ce que la connexion unique (Single-Sign-On) par Kerberos ou NTLM doit être utilisée?'; +$lang['sso_charset'] = 'Le jeu de caractères de votre serveur web va passer le nom d\'utilisateur Kerberos ou NTLM. Vide pour UTF-8 ou latin-1. Nécessite l\'extension iconv.'; $lang['real_primarygroup'] = 'Est-ce que le véritable groupe principal doit être résolu au lieu de présumer "Domain Users" (plus lent)?'; $lang['use_ssl'] = 'Utiliser une connexion SSL? Si utilisée, n\'activez pas TLS ci-dessous.'; $lang['use_tls'] = 'Utiliser une connexion TLS? Si utilisée, n\'activez pas SSL ci-dessus.'; diff --git a/lib/plugins/authad/lang/hu/settings.php b/lib/plugins/authad/lang/hu/settings.php index 1510e1756..be0592d68 100644 --- a/lib/plugins/authad/lang/hu/settings.php +++ b/lib/plugins/authad/lang/hu/settings.php @@ -4,16 +4,18 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Marton Sebok <sebokmarton@gmail.com> + * @author Marina Vladi <deldadam@gmail.com> */ $lang['account_suffix'] = 'Felhasználói azonosító végződése, pl. <code>@my.domain.org</code>.'; $lang['base_dn'] = 'Bázis DN, pl. <code>DC=my,DC=domain,DC=org</code>.'; $lang['domain_controllers'] = 'Tartománykezelők listája vesszővel elválasztva, pl. <code>srv1.domain.org,srv2.domain.org</code>.'; $lang['admin_username'] = 'Privilegizált AD felhasználó, aki az összes feéhasználó adatait elérheti. Elhagyható, de bizonyos funkciókhoz, például a feliratkozási e-mailek kiküldéséhez szükséges.'; $lang['admin_password'] = 'Ehhez tartozó jelszó.'; -$lang['sso'] = 'Single-Sign-On Kerberos-szal vagy NTML használata?'; +$lang['sso'] = 'Kerberos egyszeri bejelentkezés vagy NTLM használata?'; +$lang['sso_charset'] = 'A webkiszolgáló karakterkészlete megfelel a Kerberos- és NTLM-felhasználóneveknek. Üres UTF-8 és Latin-1-hez. Szükséges az iconv bővítmény.'; $lang['real_primarygroup'] = 'A valódi elsődleges csoport feloldása a "Tartományfelhasználók" csoport használata helyett? (lassabb)'; $lang['use_ssl'] = 'SSL használata? Ha használjuk, tiltsuk le a TLS-t!'; $lang['use_tls'] = 'TLS használata? Ha használjuk, tiltsuk le az SSL-t!'; -$lang['debug'] = 'Debug-üzenetek megjelenítése?'; +$lang['debug'] = 'További hibakeresési üzenetek megjelenítése hiba esetén'; $lang['expirywarn'] = 'Felhasználók értesítése ennyi nappal a jelszavuk lejárata előtt. 0 a funkció kikapcsolásához.'; -$lang['additional'] = 'Vesszővel elválasztott lista a további AD attribútumok lekéréshez. Néhány plugin használhatja.'; +$lang['additional'] = 'Vesszővel elválasztott lista a további AD attribútumok lekéréséhez. Néhány bővítmény használhatja.'; diff --git a/lib/plugins/authad/lang/ko/lang.php b/lib/plugins/authad/lang/ko/lang.php new file mode 100644 index 000000000..1aa436708 --- /dev/null +++ b/lib/plugins/authad/lang/ko/lang.php @@ -0,0 +1,10 @@ +<?php +/** + * Korean language file for addomain plugin + * + * @author Myeongjin <aranet100@gmail.com> + */ + +$lang['domain'] = '로그온 도메인'; + +//Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/authad/lang/ko/settings.php b/lib/plugins/authad/lang/ko/settings.php index 2914bf47b..b104371fe 100644 --- a/lib/plugins/authad/lang/ko/settings.php +++ b/lib/plugins/authad/lang/ko/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Myeongjin <aranet100@gmail.com> + * @author Garam <rowain8@gmail.com> */ $lang['account_suffix'] = '계정 접미어. 예를 들어 <code>@my.domain.org</code>'; $lang['base_dn'] = '기본 DN. 예를 들어 <code>DC=my,DC=domain,DC=org</code>'; @@ -11,7 +12,8 @@ $lang['domain_controllers'] = '도메인 컨트롤러의 쉼표로 구분한 $lang['admin_username'] = '다른 모든 사용자의 데이터에 접근할 수 있는 권한이 있는 Active Directory 사용자. 선택적이지만 구독 메일을 보내는 등의 특정 작업에 필요합니다.'; $lang['admin_password'] = '위 사용자의 비밀번호.'; $lang['sso'] = 'Kerberos나 NTLM을 통해 Single-Sign-On을 사용해야 합니까?'; -$lang['real_primarygroup'] = '실제 기본 그룹은 "도메인 사용자"를 가정하는 대신 해결될 것입니다 (느림)'; +$lang['sso_charset'] = '당신의 웹서버의 문자집합은 Kerberos나 NTLM 사용자 이름으로 전달됩니다. UTF-8이나 라린-1이 비어 있습니다. icov 확장 기능이 필요합니다.'; +$lang['real_primarygroup'] = '실제 기본 그룹은 "도메인 사용자"를 가정하는 대신 해결될 것입니다. (느림)'; $lang['use_ssl'] = 'SSL 연결을 사용합니까? 사용한다면 아래 TLS을 활성화하지 마세요.'; $lang['use_tls'] = 'TLS 연결을 사용합니까? 사용한다면 위 SSL을 활성화하지 마세요.'; $lang['debug'] = '오류에 대한 추가적인 디버그 정보를 보이겠습니까?'; diff --git a/lib/plugins/authad/lang/lv/settings.php b/lib/plugins/authad/lang/lv/settings.php deleted file mode 100644 index ced5dabf8..000000000 --- a/lib/plugins/authad/lang/lv/settings.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Latvian, Lettish language file - * - * @author Aivars Miška <allefm@gmail.com> - */ diff --git a/lib/plugins/authad/lang/nl/settings.php b/lib/plugins/authad/lang/nl/settings.php index 8f5c84043..591d72941 100644 --- a/lib/plugins/authad/lang/nl/settings.php +++ b/lib/plugins/authad/lang/nl/settings.php @@ -3,16 +3,19 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Remon <no@email.local> + * @author Gerrit Uitslag <klapinklapin@gmail.com> */ $lang['account_suffix'] = 'Je account domeinnaam. Bijv <code>@mijn.domein.org</code>'; $lang['base_dn'] = 'Je basis DN. Bijv. <code>DC=mijn,DC=domein,DC=org</code>'; -$lang['domain_controllers'] = 'Eeen commagesepareerde lijst van domeinservers. Bijv. <code>srv1.domein.org,srv2.domein.org</code>'; -$lang['admin_username'] = 'Een geprivilegeerde Active Directory gebruiker die bij alle gebruikersgegevens kan komen. Optioneel, maar kan nodig zijn voor bepaalde acties, zoals het versturen van abonnementsmailtjes.'; -$lang['admin_password'] = 'Het wachtwoord van bovernvermelde gebruiker.'; +$lang['domain_controllers'] = 'Eeen kommagescheiden lijst van domeinservers. Bijv. <code>srv1.domein.org,srv2.domein.org</code>'; +$lang['admin_username'] = 'Een geprivilegeerde Active Directory gebruiker die bij alle gebruikersgegevens kan komen. Dit is optioneel maar kan nodig zijn voor bepaalde acties, zoals het versturen van abonnementsmailtjes.'; +$lang['admin_password'] = 'Het wachtwoord van bovenstaande gebruiker.'; $lang['sso'] = 'Wordt voor Single-Sign-on Kerberos of NTLM gebruikt?'; +$lang['sso_charset'] = 'Het tekenset waarin je webserver de Kerberos of NTLM gebruikersnaam doorsturen. Leeglaten voor UTF-8 of latin-1. Vereist de iconv extensie.'; $lang['real_primarygroup'] = 'Moet de echte primaire groep worden opgezocht in plaats van het aannemen van "Domeingebruikers" (langzamer)'; -$lang['use_ssl'] = 'SSL verbinding gebruiken? Zo ja, gebruik dan TLS hieronder niet.'; +$lang['use_ssl'] = 'SSL verbinding gebruiken? Zo ja, activeer dan niet de TLS optie hieronder.'; $lang['use_tls'] = 'TLS verbinding gebruiken? Zo ja, activeer dan niet de SSL verbinding hierboven.'; $lang['debug'] = 'Aanvullende debug informatie tonen bij fouten?'; $lang['expirywarn'] = 'Waarschuwingstermijn voor vervallen wachtwoord. 0 om te deactiveren.'; -$lang['additional'] = 'Commagesepareerde lijst van aanvullend uit AD op te halen attributen. Gebruikt door sommige plugins.'; +$lang['additional'] = 'Een kommagescheiden lijst van extra AD attributen van de gebruiker. Wordt gebruikt door sommige plugins.'; diff --git a/lib/plugins/authad/lang/pl/settings.php b/lib/plugins/authad/lang/pl/settings.php index 9113c0e51..4e397fc98 100644 --- a/lib/plugins/authad/lang/pl/settings.php +++ b/lib/plugins/authad/lang/pl/settings.php @@ -1,10 +1,20 @@ <?php + /** - * Polish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Tomasz Bosak <bosak.tomasz@gmail.com> + * @author Paweł Jan Czochański <czochanski@gmail.com> */ $lang['account_suffix'] = 'Przyrostek twojej nazwy konta np. <code>@my.domain.org</code>'; +$lang['base_dn'] = 'Twoje bazowe DN. Na przykład: <code>DC=my,DC=domain,DC=org</code>'; +$lang['domain_controllers'] = 'Podzielona przecinkami lista kontrolerów domen np. <code>srv1.domena.pl,srv2.domena.pl</code>'; +$lang['admin_username'] = 'Uprawniony użytkownik katalogu Active Directory z dostępem do danych wszystkich użytkowników. +Opcjonalne, ale wymagane dla niektórych akcji np. wysyłania emailowych subskrypcji.'; $lang['admin_password'] = 'Hasło dla powyższego użytkownika.'; +$lang['sso'] = 'Czy pojedyncze logowanie powinno korzystać z Kerberos czy NTML?'; +$lang['sso_charset'] = 'Kodowanie znaków wykorzystywane do przesyłania nazwy użytkownika dla Kerberos lub NTLM. Pozostaw puste dla UTF-8 lub latin-1. Wymaga rozszerzenia iconv.'; $lang['use_ssl'] = 'Użyć połączenie SSL? Jeśli tak to nie aktywuj TLS poniżej.'; $lang['use_tls'] = 'Użyć połączenie TLS? Jeśli tak to nie aktywuj SSL powyżej.'; +$lang['debug'] = 'Wyświetlać dodatkowe informacje do debugowania w przypadku błędów?'; $lang['expirywarn'] = 'Dni poprzedzających powiadomienie użytkownika o wygasającym haśle. 0 aby wyłączyć.'; diff --git a/lib/plugins/authad/lang/pt-br/settings.php b/lib/plugins/authad/lang/pt-br/settings.php index 76fb419a6..cdc748055 100644 --- a/lib/plugins/authad/lang/pt-br/settings.php +++ b/lib/plugins/authad/lang/pt-br/settings.php @@ -5,6 +5,7 @@ * * @author Victor Westmann <victor.westmann@gmail.com> * @author Frederico Guimarães <frederico@teia.bio.br> + * @author Juliano Marconi Lanigra <juliano.marconi@gmail.com> */ $lang['account_suffix'] = 'Sufixo de sua conta. Eg. <code>@meu.domínio.org</code>'; $lang['base_dn'] = 'Sua base DN. Eg. <code>DC=meu,DC=domínio,DC=org</code>'; @@ -12,6 +13,7 @@ $lang['domain_controllers'] = 'Uma lista de controles de domínios separada p $lang['admin_username'] = 'Um usuário do Active Directory com privilégios para acessar os dados de todos os outros usuários. Opcional, mas necessário para realizar certas ações, tais como enviar mensagens de assinatura.'; $lang['admin_password'] = 'A senha do usuário acima.'; $lang['sso'] = 'Usar Single-Sign-On através do Kerberos ou NTLM?'; +$lang['sso_charset'] = 'A codificação de caracteres que seu servidor web passará o nome de usuário Kerberos ou NTLM. Vazio para UTF-8 ou latin-1. Requere a extensão iconv.'; $lang['real_primarygroup'] = 'O grupo primário real deve ser resolvido ao invés de assumirmos como "Usuários do Domínio" (mais lento)'; $lang['use_ssl'] = 'Usar conexão SSL? Se usar, não habilitar TLS abaixo.'; $lang['use_tls'] = 'Usar conexão TLS? se usar, não habilitar SSL acima.'; diff --git a/lib/plugins/authad/lang/ru/lang.php b/lib/plugins/authad/lang/ru/lang.php new file mode 100644 index 000000000..6f3c03e39 --- /dev/null +++ b/lib/plugins/authad/lang/ru/lang.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> + */ +$lang['domain'] = 'Домен'; diff --git a/lib/plugins/authad/lang/ru/settings.php b/lib/plugins/authad/lang/ru/settings.php index f849c201a..e662300d7 100644 --- a/lib/plugins/authad/lang/ru/settings.php +++ b/lib/plugins/authad/lang/ru/settings.php @@ -5,5 +5,12 @@ * * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Aleksandr Selivanov <alexgearbox@gmail.com> + * @author Artur <ncuxxx@gmail.com> + * @author Erli Moen <evseev.jr@gmail.com> */ +$lang['domain_controllers'] = 'Список DNS-серверов, разделенных запятой. Например:<code>srv1.domain.org,srv2.domain.org</code>'; $lang['admin_password'] = 'Пароль для указанного пользователя.'; +$lang['sso'] = 'Использовать SSO (Single-Sign-On) через Kerberos или NTLM?'; +$lang['use_ssl'] = 'Использовать SSL? Если да, то не включайте TLS.'; +$lang['use_tls'] = 'Использовать TLS? Если да, то не включайте SSL.'; +$lang['debug'] = 'Выводить дополнительную информацию при ошибках?'; diff --git a/lib/plugins/authad/lang/sk/settings.php b/lib/plugins/authad/lang/sk/settings.php index 55f266dd6..266b372bb 100644 --- a/lib/plugins/authad/lang/sk/settings.php +++ b/lib/plugins/authad/lang/sk/settings.php @@ -6,10 +6,15 @@ * @author Martin Michalek <michalek.dev@gmail.com> */ $lang['account_suffix'] = 'Prípona používateľského účtu. Napr. <code>@my.domain.org</code>'; +$lang['base_dn'] = 'Vaše base DN. Napr. <code>DC=my,DC=domain,DC=org</code>'; +$lang['domain_controllers'] = 'Zoznam doménových radičov oddelených čiarkou. Napr. <code>srv1.domain.org,srv2.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['sso_charset'] = 'Znaková sada, v ktorej bude webserver prenášať meno Kerberos or NTLM používateľa. Prázne pole znamená UTF-8 alebo latin-1. Vyžaduje iconv rozšírenie.'; +$lang['real_primarygroup'] = 'Použiť skutočnú primárnu skupinu používateľa namiesto "Doménoví používatelia" (pomalšie).'; $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['debug'] = 'Zobraziť dodatočné ladiace informácie pri chybe?'; +$lang['expirywarn'] = 'Počet dní pred uplynutím platnosti hesla, počas ktorých používateľ dostáva upozornenie. 0 deaktivuje túto voľbu.'; $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/authad/lang/sl/settings.php b/lib/plugins/authad/lang/sl/settings.php new file mode 100644 index 000000000..bae467d6d --- /dev/null +++ b/lib/plugins/authad/lang/sl/settings.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author matej <mateju@svn.gnome.org> + */ +$lang['debug'] = 'Ali naj bodo prikazane dodatne podrobnosti napak?'; diff --git a/lib/plugins/authad/lang/zh/settings.php b/lib/plugins/authad/lang/zh/settings.php index 84bdc1e5c..52ba2131b 100644 --- a/lib/plugins/authad/lang/zh/settings.php +++ b/lib/plugins/authad/lang/zh/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author lainme <lainme993@gmail.com> + * @author oott123 <ip.192.168.1.1@qq.com> */ $lang['account_suffix'] = '您的账户后缀。例如 <code>@my.domain.org</code>'; $lang['base_dn'] = '您的基本分辨名。例如 <code>DC=my,DC=domain,DC=org</code>'; @@ -11,6 +12,7 @@ $lang['domain_controllers'] = '逗号分隔的域名控制器列表。例如 $lang['admin_username'] = '一个活动目录的特权用户,可以查看其他所有用户的数据。可选,但对某些活动例如发送订阅邮件是必须的。'; $lang['admin_password'] = '上述用户的密码。'; $lang['sso'] = '是否使用经由 Kerberos 和 NTLM 的 Single-Sign-On?'; +$lang['sso_charset'] = '服务器传入 Kerberos 或者 NTLM 用户名的编码。留空为 UTF-8 或 latin-1 。此功能需要服务器支持iconv扩展。'; $lang['real_primarygroup'] = ' 是否解析真实的主要组,而不是假设为“域用户” (较慢)'; $lang['use_ssl'] = '使用 SSL 连接?如果是,不要激活下面的 TLS。'; $lang['use_tls'] = '使用 TLS 连接?如果是 ,不要激活上面的 SSL。'; diff --git a/lib/plugins/authad/plugin.info.txt b/lib/plugins/authad/plugin.info.txt index 3af1ddfbe..8774fcf3c 100644 --- a/lib/plugins/authad/plugin.info.txt +++ b/lib/plugins/authad/plugin.info.txt @@ -1,7 +1,7 @@ base authad author Andreas Gohr email andi@splitbrain.org -date 2013-04-25 +date 2014-02-14 name Active Directory Auth Plugin desc Provides user authentication against a Microsoft Active Directory url http://www.dokuwiki.org/plugin:authad diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index de1332282..6c3637e15 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -143,6 +143,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @author Dan Allen <dan.j.allen@gmail.com> * @author <evaldas.auryla@pheur.org> * @author Stephane Chazelas <stephane.chazelas@emerson.com> + * @author Steffen Schoch <schoch@dsb.net> * * @param string $user * @param bool $inbind authldap specific, true if in bind phase @@ -166,7 +167,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { // be accessible anonymously, so we try to rebind the current user here list($loginuser, $loginsticky, $loginpass) = auth_getCookie(); if($loginuser && $loginpass) { - $loginpass = PMA_blowfish_decrypt($loginpass, auth_cookiesalt(!$loginsticky)); + $loginpass = auth_decrypt($loginpass, auth_cookiesalt(!$loginsticky, true)); $this->checkPass($loginuser, $loginpass); } } @@ -240,9 +241,17 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { ldap_free_result($sr); if(is_array($result)) foreach($result as $grp) { - if(!empty($grp[$this->getConf('groupkey')][0])) { - $this->_debug('LDAP usergroup: '.htmlspecialchars($grp[$this->getConf('groupkey')][0]), 0, __LINE__, __FILE__); - $info['grps'][] = $grp[$this->getConf('groupkey')][0]; + if(!empty($grp[$this->getConf('groupkey')])) { + $group = $grp[$this->getConf('groupkey')]; + if(is_array($group)){ + $group = $group[0]; + } else { + $this->_debug('groupkey did not return a detailled result', 0, __LINE__, __FILE__); + } + if($group === '') continue; + + $this->_debug('LDAP usergroup: '.htmlspecialchars($group), 0, __LINE__, __FILE__); + $info['grps'][] = $group; } } } @@ -272,7 +281,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @param array $filter array of field/pattern pairs, null for no filter * @return array of userinfo (refer getUserData for internal userinfo details) */ - function retrieveUsers($start = 0, $limit = -1, $filter = array()) { + function retrieveUsers($start = 0, $limit = 0, $filter = array()) { if(!$this->_openLDAP()) return false; if(is_null($this->users)) { @@ -307,7 +316,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } if($this->_filter($user, $info)) { $result[$user] = $info; - if(($limit >= 0) && (++$count >= $limit)) break; + if(($limit > 0) && (++$count >= $limit)) break; } } return $result; diff --git a/lib/plugins/authldap/lang/ar/settings.php b/lib/plugins/authldap/lang/ar/settings.php new file mode 100644 index 000000000..aaef7763f --- /dev/null +++ b/lib/plugins/authldap/lang/ar/settings.php @@ -0,0 +1,13 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author alhajr <alhajr300@gmail.com> + */ +$lang['port'] = 'LDAP المنفذ الملقم إذا لم يعط أي عنوان URL كامل أعلاه'; +$lang['version'] = 'إصدار نسخة البروتوكول الستخدامه. قد تحتاج لتعيين هذه القيمة إلى <code>3</code>'; +$lang['starttls'] = 'استخدام اتصالات TLS؟'; +$lang['referrals'] = 'يتبع الإحالات؟'; +$lang['deref'] = 'كيفية إلغاء مرجعية الأسماء المستعارة؟'; +$lang['bindpw'] = 'كلمة مرور المستخدم أعلاه'; diff --git a/lib/plugins/authldap/lang/bg/settings.php b/lib/plugins/authldap/lang/bg/settings.php index 644672ca7..165216de8 100644 --- a/lib/plugins/authldap/lang/bg/settings.php +++ b/lib/plugins/authldap/lang/bg/settings.php @@ -1,7 +1,8 @@ <?php + /** - * Bulgarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Kiril <neohidra@gmail.com> */ $lang['server'] = 'Вашият LDAP сървър. Име на хоста (<code>localhost</code>) или целият URL адрес (<code>ldap://сървър.tld:389</code>)'; @@ -16,4 +17,4 @@ $lang['referrals'] = 'Да бъдат ли следвани преп $lang['bindpw'] = 'Парола за горния потребител'; $lang['userscope'] = 'Ограничаване на обхвата за търсене на потребители'; $lang['groupscope'] = 'Ограничаване на обхвата за търсене на потребителски групи'; -$lang['debug'] = 'Показване на допълнителна debug информация при грешка';
\ No newline at end of file +$lang['debug'] = 'Показване на допълнителна debug информация при грешка'; diff --git a/lib/plugins/authldap/lang/cs/settings.php b/lib/plugins/authldap/lang/cs/settings.php index b2b5b59dc..20491f1fb 100644 --- a/lib/plugins/authldap/lang/cs/settings.php +++ b/lib/plugins/authldap/lang/cs/settings.php @@ -10,7 +10,7 @@ $lang['port'] = 'Port serveru LDAP. Pokud není, bude využito $lang['usertree'] = 'Kde najít uživatelské účty, tj. <code>ou=Lide, dc=server, dc=tld</code>'; $lang['grouptree'] = 'Kde najít uživatelské skupiny, tj. <code>ou=Skupina, dc=server, dc=tld</code>'; $lang['userfilter'] = 'Filter LDAPu pro vyhledávání uživatelských účtů, tj. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; -$lang['groupfilter'] = 'Filter LDAPu pro vyhledávání uživatelských skupin, tj. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; +$lang['groupfilter'] = 'Filter LDAPu pro vyhledávání uživatelských skupin, tj. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; $lang['version'] = 'Verze použitého protokolu. Můžete potřebovat jej nastavit na <code>3</code>'; $lang['starttls'] = 'Využít spojení TLS?'; $lang['referrals'] = 'Přeposílat odkazy?'; diff --git a/lib/plugins/authldap/lang/da/settings.php b/lib/plugins/authldap/lang/da/settings.php new file mode 100644 index 000000000..b736504a5 --- /dev/null +++ b/lib/plugins/authldap/lang/da/settings.php @@ -0,0 +1,15 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> + * @author soer9648 <soer9648@eucl.dk> + */ +$lang['server'] = 'Din LDAP server. Enten værtsnavn (<code>localhost</code>) eller fuld kvalificeret URL (<code>ldap://server.tld:389</code>)'; +$lang['port'] = 'LDAP server port, hvis der ikke er angivet en komplet URL ovenfor.'; +$lang['usertree'] = 'Hvor findes brugerkonti. F.eks. <code>ou=Personer, dc=server, dc=tld</code>'; +$lang['grouptree'] = 'Hvor findes brugergrupper. F.eks. <code>ou=Grupper, dc=server, dc=tld</code>'; +$lang['starttls'] = 'Benyt TLS forbindelser?'; +$lang['bindpw'] = 'Kodeord til ovenstående bruger'; +$lang['debug'] = 'Vis yderligere debug output ved fejl'; diff --git a/lib/plugins/authldap/lang/es/settings.php b/lib/plugins/authldap/lang/es/settings.php new file mode 100644 index 000000000..f8c3ad014 --- /dev/null +++ b/lib/plugins/authldap/lang/es/settings.php @@ -0,0 +1,13 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Antonio Bueno <atnbueno@gmail.com> + */ +$lang['starttls'] = 'Usar conexiones TLS?'; +$lang['debug'] = 'Mostrar información adicional para depuración de errores'; +$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/fi/settings.php b/lib/plugins/authldap/lang/fi/settings.php index d3aa13e07..b15d8c676 100644 --- a/lib/plugins/authldap/lang/fi/settings.php +++ b/lib/plugins/authldap/lang/fi/settings.php @@ -1,6 +1,11 @@ <?php + /** - * Finnish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Otto Vainio <otto@valjakko.net> */ +$lang['starttls'] = 'Käytä TLS yhteyttä'; +$lang['bindpw'] = 'Ylläolevan käyttäjän salasana'; +$lang['userscope'] = 'Etsi vain käyttäjiä'; +$lang['groupscope'] = 'Etsi vain ryhmiä'; diff --git a/lib/plugins/authldap/lang/he/settings.php b/lib/plugins/authldap/lang/he/settings.php new file mode 100644 index 000000000..357a58c56 --- /dev/null +++ b/lib/plugins/authldap/lang/he/settings.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author matt carroll <matt.carroll@gmail.com> + */ +$lang['starttls'] = 'השתמש בחיבורי TLS'; diff --git a/lib/plugins/authldap/lang/hu/settings.php b/lib/plugins/authldap/lang/hu/settings.php index 041f82755..1e6608dab 100644 --- a/lib/plugins/authldap/lang/hu/settings.php +++ b/lib/plugins/authldap/lang/hu/settings.php @@ -4,9 +4,10 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Marton Sebok <sebokmarton@gmail.com> + * @author Marina Vladi <deldadam@gmail.com> */ -$lang['server'] = 'LDAP-szerver. Hosztnév (<code>localhost</code>) vagy abszolút URL portszámmal (<code>ldap://server.tld:389</code>)'; -$lang['port'] = 'LDAP-szerver port, ha nem URL lett megadva'; +$lang['server'] = 'LDAP-szerver. Kiszolgálónév (<code>localhost</code>) vagy teljes URL-cím (<code>ldap://server.tld:389</code>)'; +$lang['port'] = 'LDAP-kiszolgáló portja, ha URL-cím nem lett megadva'; $lang['usertree'] = 'Hol találom a felhasználókat? Pl. <code>ou=People, dc=server, dc=tld</code>'; $lang['grouptree'] = 'Hol találom a csoportokat? Pl. <code>ou=Group, dc=server, dc=tld</code>'; $lang['userfilter'] = 'LDAP szűrő a felhasználók kereséséhez, pl. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; @@ -20,7 +21,7 @@ $lang['bindpw'] = 'Ehhez tartozó jelszó.'; $lang['userscope'] = 'A keresési tartomány korlátozása erre a felhasználókra való keresésnél'; $lang['groupscope'] = 'A keresési tartomány korlátozása erre a csoportokra való keresésnél'; $lang['groupkey'] = 'Csoport meghatározása a következő attribútumból (az alapértelmezett AD csoporttagság helyett), pl. a szervezeti egység vagy a telefonszám'; -$lang['debug'] = 'Debug-üzenetek megjelenítése?'; +$lang['debug'] = 'Továbi hibakeresési információk megjelenítése hiba esetén'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; $lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; diff --git a/lib/plugins/authldap/lang/it/settings.php b/lib/plugins/authldap/lang/it/settings.php index 023159489..eba7cde6e 100644 --- a/lib/plugins/authldap/lang/it/settings.php +++ b/lib/plugins/authldap/lang/it/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Edmondo Di Tucci <snarchio@gmail.com> + * @author Claudio Lanconelli <lancos@libero.it> */ $lang['server'] = 'Il tuo server LDAP. Inserire o l\'hostname (<code>localhost</code>) oppure un URL completo (<code>ldap://server.tld:389</code>)'; $lang['port'] = 'Porta del server LDAP se non è stato fornito un URL completo più sopra.'; @@ -13,3 +14,6 @@ $lang['userfilter'] = 'Filtro per cercare l\'account utente LDAP. Eg. $lang['groupfilter'] = 'Filtro per cercare i gruppi LDAP. Eg. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; $lang['version'] = 'Versione protocollo da usare. Pu<code>3</code>'; $lang['starttls'] = 'Usare la connessione TSL?'; +$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'; diff --git a/lib/plugins/authldap/lang/ko/settings.php b/lib/plugins/authldap/lang/ko/settings.php index 5c5341b31..ae8dc7ab6 100644 --- a/lib/plugins/authldap/lang/ko/settings.php +++ b/lib/plugins/authldap/lang/ko/settings.php @@ -17,8 +17,8 @@ $lang['referrals'] = '참고(referrals)를 허용하겠습니까? '; $lang['deref'] = '어떻게 별명을 간접 참고하겠습니까?'; $lang['binddn'] = '익명 바인드가 충분하지 않으면 선택적인 바인드 사용자의 DN. 예를 들어 <code>cn=admin, dc=my, dc=home</code>'; $lang['bindpw'] = '위 사용자의 비밀번호'; -$lang['userscope'] = '사용자 찾기에 대한 찾기 범위 제한'; -$lang['groupscope'] = '그룹 찾기에 대한 찾기 범위 제한'; +$lang['userscope'] = '사용자 검색에 대한 검색 범위 제한'; +$lang['groupscope'] = '그룹 검색에 대한 검색 범위 제한'; $lang['groupkey'] = '(표준 AD 그룹 대신) 사용자 속성에서 그룹 구성원. 예를 들어 부서나 전화에서 그룹'; $lang['debug'] = '오류에 대한 추가적인 디버그 정보를 보이기'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; diff --git a/lib/plugins/authldap/lang/lv/settings.php b/lib/plugins/authldap/lang/lv/settings.php deleted file mode 100644 index ced5dabf8..000000000 --- a/lib/plugins/authldap/lang/lv/settings.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Latvian, Lettish language file - * - * @author Aivars Miška <allefm@gmail.com> - */ diff --git a/lib/plugins/authldap/lang/nl/settings.php b/lib/plugins/authldap/lang/nl/settings.php index b6eed6f38..193d1a386 100644 --- a/lib/plugins/authldap/lang/nl/settings.php +++ b/lib/plugins/authldap/lang/nl/settings.php @@ -4,16 +4,17 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Gerrit Uitslag <klapinklapin@gmail.com> + * @author Remon <no@email.local> */ -$lang['server'] = 'Je LDAP server. Ofwel servernaam (<code>localhost</code>) of volledige URL (<code>ldap://server.tld:389</code>)'; -$lang['port'] = 'LDAP server poort als hiervoor geen volledige URL is opgegeven'; +$lang['server'] = 'Je LDAP server. Of de servernaam (<code>localhost</code>) of de volledige URL (<code>ldap://server.tld:389</code>)'; +$lang['port'] = 'LDAP server poort als bij de entry hierboven geen volledige URL is opgegeven'; $lang['usertree'] = 'Locatie van de gebruikersaccounts. Bijv. <code>ou=Personen,dc=server,dc=tld</code>'; $lang['grouptree'] = 'Locatie van de gebruikersgroepen. Bijv. <code>ou=Group,dc=server,dc=tld</code>'; $lang['userfilter'] = 'LDAP gebruikersfilter. Bijv. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; $lang['groupfilter'] = 'LDAP groepsfilter. Bijv. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; -$lang['version'] = 'Te gebruiken protocolversie. Je zou het moeten kunnen instellen op <code>3</code>'; -$lang['starttls'] = 'Gebruiken TLS verbindingen'; -$lang['referrals'] = 'Moeten verwijzingen worden gevolg'; +$lang['version'] = 'Te gebruiken protocolversie. Mogelijk dat dit ingesteld moet worden op <code>3</code>'; +$lang['starttls'] = 'Gebruik maken van TLS verbindingen?'; +$lang['referrals'] = 'Moeten verwijzingen worden gevolgd?'; $lang['deref'] = 'Hoe moeten de verwijzing van aliases worden bepaald?'; $lang['binddn'] = 'DN van een optionele bind gebruiker als anonieme bind niet genoeg is. Bijv. <code>cn=beheer, dc=mijn, dc=thuis</code>'; $lang['bindpw'] = 'Wachtwoord van bovenstaande gebruiker'; diff --git a/lib/plugins/authldap/lang/pl/settings.php b/lib/plugins/authldap/lang/pl/settings.php index 44641f514..7010988e6 100644 --- a/lib/plugins/authldap/lang/pl/settings.php +++ b/lib/plugins/authldap/lang/pl/settings.php @@ -1,7 +1,16 @@ <?php + /** - * Polish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Paweł Jan Czochański <czochanski@gmail.com> */ +$lang['server'] = 'Twój serwer LDAP. Podaj nazwę hosta (<code>localhost</code>) albo pełen adres URL (<code>ldap://server.tld:389</code>).'; +$lang['port'] = 'Port serwera LDAP jeżeli nie podano pełnego adresu URL wyżej.'; +$lang['usertree'] = 'Gdzie szukać kont użytkownika? np. <code>ou=People, dc=server, dc=tld</code>'; +$lang['grouptree'] = 'Gdzie szukać grup użytkowników? np. <code>ou=Group, dc=server, dc=tld</code>'; +$lang['userfilter'] = 'Filtr LDAP wykorzystany przy szukaniu kont użytkowników np. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; +$lang['groupfilter'] = 'Filtr LDAP wykorzystany przy szukaniu grup użytkowników np. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; +$lang['version'] = 'Wykorzystywana wersja protokołu. Być może konieczne jest ustawienie tego na <code>3</code>.'; $lang['starttls'] = 'Użyć połączeń TLS?'; $lang['bindpw'] = 'Hasło powyższego użytkownika'; diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php index 70ad7b6f4..04a3ee784 100644 --- a/lib/plugins/authldap/lang/ru/settings.php +++ b/lib/plugins/authldap/lang/ru/settings.php @@ -5,5 +5,12 @@ * * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Aleksandr Selivanov <alexgearbox@gmail.com> + * @author Erli Moen <evseev.jr@gmail.com> + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> */ +$lang['deref'] = 'Как расшифровывать псевдонимы?'; $lang['bindpw'] = 'Пароль для указанного пользователя.'; +$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 index 48bd37395..26c8d9edd 100644 --- a/lib/plugins/authldap/lang/sk/settings.php +++ b/lib/plugins/authldap/lang/sk/settings.php @@ -13,8 +13,14 @@ $lang['userfilter'] = 'LDAP filter pre vyhľadávanie používateľsk $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['referrals'] = 'Majú byť nasledované odkazy na používateľov (referrals)?'; +$lang['deref'] = 'Ako previesť aliasy?'; +$lang['binddn'] = 'DN prípadného priradenia používateľa, ak anonymné priradenie nie je dostatočné. Napr. <code>cn=admin, dc=my, dc=home</code>'; $lang['bindpw'] = 'Heslo vyššie uvedeného používateľa'; -$lang['debug'] = 'Zobraziť doplňujúce ladiace informácie pri chybe'; +$lang['userscope'] = 'Obmedzenie oblasti pri vyhľadávaní používateľa'; +$lang['groupscope'] = 'Obmedzenie oblasti pri vyhľadávaní skupiny'; +$lang['groupkey'] = 'Príslušnost k skupine určená z daného atribútu používateľa (namiesto štandardnej AD skupiny) napr. skupiny podľa oddelenia alebo telefónneho čísla'; +$lang['debug'] = 'Zobraziť dodatočné 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'; diff --git a/lib/plugins/authldap/lang/sl/settings.php b/lib/plugins/authldap/lang/sl/settings.php new file mode 100644 index 000000000..f180226fc --- /dev/null +++ b/lib/plugins/authldap/lang/sl/settings.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author matej <mateju@svn.gnome.org> + */ +$lang['starttls'] = 'Ali naj se uporabijo povezave TLS?'; diff --git a/lib/plugins/authldap/lang/zh-tw/settings.php b/lib/plugins/authldap/lang/zh-tw/settings.php index d2513eeff..7e35ef632 100644 --- a/lib/plugins/authldap/lang/zh-tw/settings.php +++ b/lib/plugins/authldap/lang/zh-tw/settings.php @@ -1,5 +1,4 @@ <?php - /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @@ -20,3 +19,8 @@ $lang['userscope'] = '限制使用者搜索的範圍'; $lang['groupscope'] = '限制群組搜索的範圍'; $lang['groupkey'] = '以其他使用者屬性 (而非標準 AD 群組) 來把使用者分組,例如以部門或電話號碼分類'; $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/zh/settings.php b/lib/plugins/authldap/lang/zh/settings.php index b531c192a..cdaf3dc64 100644 --- a/lib/plugins/authldap/lang/zh/settings.php +++ b/lib/plugins/authldap/lang/zh/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author lainme <lainme993@gmail.com> + * @author oott123 <ip.192.168.1.1@qq.com> */ $lang['server'] = '您的 LDAP 服务器。填写主机名 (<code>localhost</code>) 或者完整的 URL (<code>ldap://server.tld:389</code>)'; $lang['port'] = 'LDAP 服务器端口 (如果上面没有给出完整的 URL)'; @@ -14,9 +15,14 @@ $lang['groupfilter'] = '用于搜索组的 LDAP 筛选器。例如 <co $lang['version'] = '使用的协议版本。您或许需要设置为 <code>3</code>'; $lang['starttls'] = '使用 TLS 连接?'; $lang['referrals'] = '是否允许引用 (referrals)?'; +$lang['deref'] = '如何间接引用别名?'; $lang['binddn'] = '一个可选的绑定用户的 DN (如果匿名绑定不满足要求)。例如 <code>cn=admin, dc=my, dc=home</code>'; $lang['bindpw'] = '上述用户的密码'; $lang['userscope'] = '限制用户搜索的范围'; $lang['groupscope'] = '限制组搜索的范围'; $lang['groupkey'] = '根据任何用户属性得来的组成员(而不是标准的 AD 组),例如根据部门或者电话号码得到的组。'; $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/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 036644a67..1e6e6a4a9 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -352,13 +352,18 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @param array|string $filter array of field/pattern pairs * @return array userinfo (refer getUserData for internal userinfo details) */ - public function retrieveUsers($first = 0, $limit = 10, $filter = array()) { + public function retrieveUsers($first = 0, $limit = 0, $filter = array()) { $out = array(); if($this->_openDB()) { $this->_lockTables("READ"); $sql = $this->_createSQLFilter($this->getConf('getUsers'), $filter); - $sql .= " ".$this->getConf('SortOrder')." LIMIT $first, $limit"; + $sql .= " ".$this->getConf('SortOrder'); + if($limit) { + $sql .= " LIMIT $first, $limit"; + } elseif($first) { + $sql .= " LIMIT $first"; + } $result = $this->_queryDB($sql); if(!empty($result)) { diff --git a/lib/plugins/authmysql/lang/bg/settings.php b/lib/plugins/authmysql/lang/bg/settings.php index fcc7f625d..cd6370218 100644 --- a/lib/plugins/authmysql/lang/bg/settings.php +++ b/lib/plugins/authmysql/lang/bg/settings.php @@ -1,8 +1,10 @@ <?php + /** - * Bulgarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Kiril <neohidra@gmail.com> + * @author Ivan Peltekov <ivan.peltekov@abv.bg> */ $lang['server'] = 'Вашият MySQL сървър'; $lang['user'] = 'MySQL потребителско име'; @@ -10,8 +12,8 @@ $lang['password'] = 'Парола за горния потреби $lang['database'] = 'Име на базата от данни'; $lang['charset'] = 'Набор от знаци, който се ползва в базата от данни'; $lang['debug'] = 'Показване на допълнителна debug информация'; - - -$lang['debug_o_0'] = 'не'; -$lang['debug_o_1'] = 'само при грешка'; -$lang['debug_o_2'] = 'за всяко SQL запитване';
\ No newline at end of file +$lang['checkPass'] = 'SQL заявка за проверка на паролите'; +$lang['getUserInfo'] = 'SQL заявка за извличане на информация за потребителя н'; +$lang['debug_o_0'] = 'не'; +$lang['debug_o_1'] = 'само при грешка'; +$lang['debug_o_2'] = 'за всяко SQL запитване'; diff --git a/lib/plugins/authmysql/lang/da/settings.php b/lib/plugins/authmysql/lang/da/settings.php new file mode 100644 index 000000000..1e38cb6b4 --- /dev/null +++ b/lib/plugins/authmysql/lang/da/settings.php @@ -0,0 +1,27 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> + * @author soer9648 <soer9648@eucl.dk> + */ +$lang['server'] = 'Din MySQL server'; +$lang['user'] = 'MySQL brugernavn'; +$lang['password'] = 'Kodeord til ovenstående bruger'; +$lang['database'] = 'Database der skal benyttes'; +$lang['charset'] = 'Tegnsæt benyttet i database'; +$lang['checkPass'] = 'SQL-sætning til at kontrollere kodeord'; +$lang['getUserInfo'] = 'SQL-sætning til at hente brugerinformation'; +$lang['getUsers'] = 'SQL-sætning til at liste alle brugere'; +$lang['addUser'] = 'SQL-sætning til at tilføje en ny bruger'; +$lang['addGroup'] = 'SQL-sætning til at tilføje en ny gruppe'; +$lang['addUserGroup'] = 'SQL-sætning til at tilføje en bruger til en eksisterende gruppe'; +$lang['delGroup'] = 'SQL-sætning til at fjerne en gruppe'; +$lang['delUser'] = 'SQL-sætning til at slette en bruger'; +$lang['delUserRefs'] = 'SQL-sætning til at fjerne en bruger fra alle grupper'; +$lang['updateUser'] = 'SQL-sætning til at opdatere en brugerprofil'; +$lang['debug'] = 'Vis yderligere debug output'; +$lang['debug_o_0'] = 'ingen'; +$lang['debug_o_1'] = 'kun ved fejl'; +$lang['debug_o_2'] = 'alle SQL forespørgsler'; diff --git a/lib/plugins/authmysql/lang/es/settings.php b/lib/plugins/authmysql/lang/es/settings.php new file mode 100644 index 000000000..64d422102 --- /dev/null +++ b/lib/plugins/authmysql/lang/es/settings.php @@ -0,0 +1,12 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Antonio Bueno <atnbueno@gmail.com> + */ +$lang['server'] = 'Tu servidor MySQL'; +$lang['user'] = 'Nombre de usuario MySQL'; +$lang['database'] = 'Base de datos a usar'; +$lang['charset'] = 'Codificación usada en la base de datos'; +$lang['debug'] = 'Mostrar información adicional para depuración de errores'; diff --git a/lib/plugins/authmysql/lang/fi/settings.php b/lib/plugins/authmysql/lang/fi/settings.php deleted file mode 100644 index d3aa13e07..000000000 --- a/lib/plugins/authmysql/lang/fi/settings.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Finnish language file - * - * @author Otto Vainio <otto@valjakko.net> - */ diff --git a/lib/plugins/authmysql/lang/hu/settings.php b/lib/plugins/authmysql/lang/hu/settings.php index 4edceae1e..cf7b26bb9 100644 --- a/lib/plugins/authmysql/lang/hu/settings.php +++ b/lib/plugins/authmysql/lang/hu/settings.php @@ -4,39 +4,40 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Marton Sebok <sebokmarton@gmail.com> + * @author Marina Vladi <deldadam@gmail.com> */ -$lang['server'] = 'MySQL-szerver'; -$lang['user'] = 'MySQL felhasználónév'; -$lang['password'] = 'Ehhez a jelszó'; +$lang['server'] = 'MySQL-kiszolgáló'; +$lang['user'] = 'MySQL-felhasználónév'; +$lang['password'] = 'Fenti felhasználó jelszava'; $lang['database'] = 'Adatbázis'; $lang['charset'] = 'Az adatbázisban használt karakterkészlet'; -$lang['debug'] = 'Debug-üzenetek megjelenítése?'; -$lang['forwardClearPass'] = 'A jelszó nyílt szövegben való átadása a következő SQL utasításokban a passcrypt opció használata helyett'; -$lang['TablesToLock'] = 'Az íráskor zárolandó táblák vesszővel elválasztott listája'; -$lang['checkPass'] = 'SQL utasítás a jelszavak ellenőrzéséhez'; -$lang['getUserInfo'] = 'SQL utasítás a felhasználói információk lekérdezéséhez'; -$lang['getGroups'] = 'SQL utasítás egy felhasználó csoporttagságainak lekérdezéséhez'; -$lang['getUsers'] = 'SQL utasítás a felhasználók listázásához'; -$lang['FilterLogin'] = 'SQL kifejezés a felhasználók azonosító alapú szűréséhez'; -$lang['FilterName'] = 'SQL kifejezés a felhasználók név alapú szűréséhez'; -$lang['FilterEmail'] = 'SQL kifejezés a felhasználók e-mail cím alapú szűréséhez'; -$lang['FilterGroup'] = 'SQL kifejezés a felhasználók csoporttagság alapú szűréséhez'; -$lang['SortOrder'] = 'SQL kifejezés a felhasználók rendezéséhez'; -$lang['addUser'] = 'SQL utasítás új felhasználó hozzáadásához'; -$lang['addGroup'] = 'SQL utasítás új csoport hozzáadásához'; -$lang['addUserGroup'] = 'SQL utasítás egy felhasználó egy meglévő csoporthoz való hozzáadásához'; -$lang['delGroup'] = 'SQL utasítás egy csoport törléséhez'; -$lang['getUserID'] = 'SQL utasítás egy felhasználó elsődleges kulcsának lekérdezéséhez'; -$lang['delUser'] = 'SQL utasítás egy felhasználó törléséhez'; -$lang['delUserRefs'] = 'SQL utasítás egy felhasználó eltávolításához az összes csoportból'; -$lang['updateUser'] = 'SQL utasítás egy felhasználó profiljának frissítéséhez'; -$lang['UpdateLogin'] = 'SQL kifejezés a felhasználó azonosítójának frissítéséhez'; -$lang['UpdatePass'] = 'SQL kifejezés a felhasználó jelszavának frissítéséhez'; -$lang['UpdateEmail'] = 'SQL kifejezés a felhasználó e-mail címének frissítéséhez'; -$lang['UpdateName'] = 'SQL kifejezés a felhasználó nevének frissítéséhez'; -$lang['UpdateTarget'] = 'SQL kifejezés a felhasználó kiválasztásához az adatok frissítésekor'; -$lang['delUserGroup'] = 'SQL utasítás egy felhasználó eltávolításához egy adott csoportból'; -$lang['getGroupID'] = 'SQL utasítás egy csoport elsődleges kulcsának lekérdezéséhez'; +$lang['debug'] = 'Hibakeresési üzenetek megjelenítése'; +$lang['forwardClearPass'] = 'A jelszó nyílt szövegként történő átadása az alábbi SQL-utasításoknak a passcrypt opció használata helyett'; +$lang['TablesToLock'] = 'Az íráskor zárolni kívánt táblák vesszővel elválasztott listája'; +$lang['checkPass'] = 'SQL-utasítás a jelszavak ellenőrzéséhez'; +$lang['getUserInfo'] = 'SQL-utasítás a felhasználói információk lekérdezéséhez'; +$lang['getGroups'] = 'SQL-utasítás egy felhasználó csoporttagságainak lekérdezéséhez'; +$lang['getUsers'] = 'SQL-utasítás a felhasználók listázásához'; +$lang['FilterLogin'] = 'SQL-kifejezés a felhasználók azonosító alapú szűréséhez'; +$lang['FilterName'] = 'SQL-kifejezés a felhasználók név alapú szűréséhez'; +$lang['FilterEmail'] = 'SQL-kifejezés a felhasználók e-mail cím alapú szűréséhez'; +$lang['FilterGroup'] = 'SQL-kifejezés a felhasználók csoporttagság alapú szűréséhez'; +$lang['SortOrder'] = 'SQL-kifejezés a felhasználók rendezéséhez'; +$lang['addUser'] = 'SQL-utasítás új felhasználó hozzáadásához'; +$lang['addGroup'] = 'SQL-utasítás új csoport hozzáadásához'; +$lang['addUserGroup'] = 'SQL-utasítás egy felhasználó egy meglévő csoporthoz való hozzáadásához'; +$lang['delGroup'] = 'SQL-utasítás egy csoport törléséhez'; +$lang['getUserID'] = 'SQL-utasítás egy felhasználó elsődleges kulcsának lekérdezéséhez'; +$lang['delUser'] = 'SQL-utasítás egy felhasználó törléséhez'; +$lang['delUserRefs'] = 'SQL-utasítás egy felhasználó eltávolításához az összes csoportból'; +$lang['updateUser'] = 'SQL-utasítás egy felhasználó profiljának frissítéséhez'; +$lang['UpdateLogin'] = 'UPDATE-klauzula a felhasználó azonosítójának frissítéséhez'; +$lang['UpdatePass'] = 'UPDATE-klauzula a felhasználó jelszavának frissítéséhez'; +$lang['UpdateEmail'] = 'UPDATE-klauzula a felhasználó e-mail címének frissítéséhez'; +$lang['UpdateName'] = 'UPDATE-klauzula a felhasználó teljes nevének frissítéséhez'; +$lang['UpdateTarget'] = 'LIMIT-klauzula a felhasználó kiválasztásához az adatok frissítésekor'; +$lang['delUserGroup'] = 'SQL-utasítás felhasználó adott csoportból történő törléséhez '; +$lang['getGroupID'] = 'SQL-utasítás adott csoport elsődleges kulcsának lekérdezéséhez'; $lang['debug_o_0'] = 'nem'; $lang['debug_o_1'] = 'csak hiba esetén'; $lang['debug_o_2'] = 'minden SQL-lekérdezésnél'; diff --git a/lib/plugins/authmysql/lang/it/settings.php b/lib/plugins/authmysql/lang/it/settings.php index 10ae72f87..e493ec7e9 100644 --- a/lib/plugins/authmysql/lang/it/settings.php +++ b/lib/plugins/authmysql/lang/it/settings.php @@ -1,5 +1,8 @@ <?php + /** - * Italian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Claudio Lanconelli <lancos@libero.it> */ +$lang['debug'] = 'Mostra ulteriori informazioni di debug'; diff --git a/lib/plugins/authmysql/lang/ja/settings.php b/lib/plugins/authmysql/lang/ja/settings.php index 0dc5f1ad8..e5d5689df 100644 --- a/lib/plugins/authmysql/lang/ja/settings.php +++ b/lib/plugins/authmysql/lang/ja/settings.php @@ -11,7 +11,7 @@ $lang['password'] = 'MySQL 接続用ユーザーのパスワード' $lang['database'] = '使用するデータベース名'; $lang['charset'] = 'データベースの文字コード'; $lang['debug'] = 'デバック情報を表示する'; -$lang['forwardClearPass'] = '以下で定義する SQL ステートメントにおいて, パスワード変数 %{pass} を平文とする(DokiWiki側で暗号化しない)'; +$lang['forwardClearPass'] = '以下で定義する SQL ステートメントにおいて, パスワード変数 %{pass} を平文とする(DokiWiki側で暗号化しない)'; $lang['TablesToLock'] = '書き込み時にロックするテーブル(コンマ区切りで列挙)'; $lang['checkPass'] = 'パスワードの照合に用いる SQL ステートメント'; $lang['getUserInfo'] = 'ユーザー情報の取得に用いる SQL ステートメント'; diff --git a/lib/plugins/authmysql/lang/ko/settings.php b/lib/plugins/authmysql/lang/ko/settings.php index 2175c1eea..b3479ad41 100644 --- a/lib/plugins/authmysql/lang/ko/settings.php +++ b/lib/plugins/authmysql/lang/ko/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Myeongjin <aranet100@gmail.com> + * @author Garam <rowain8@gmail.com> */ $lang['server'] = 'MySQL 서버'; $lang['user'] = 'MySQL 사용자 이름'; @@ -17,10 +18,10 @@ $lang['checkPass'] = '비밀번호를 확인하기 위한 SQL 문'; $lang['getUserInfo'] = '사용자 정보를 가져오기 위한 SQL 문'; $lang['getGroups'] = '사용자의 그룹 구성원을 가져오기 위한 SQL 문'; $lang['getUsers'] = '모든 사용자를 나타낼 SQL 문'; -$lang['FilterLogin'] = '로그인 이름 별로 사용자를 필터하기 위한 SQL 조항'; -$lang['FilterName'] = '전체 이름 별로 사용자를 필터하기 위한 SQL 조항'; -$lang['FilterEmail'] = '이메일 주소 별로 사용자를 필터하기 위한 SQL 조항'; -$lang['FilterGroup'] = '그룹 구성원 별로 사용자를 필터하기 위한 SQL 조항'; +$lang['FilterLogin'] = '로그인 이름별로 사용자를 필터하기 위한 SQL 조항'; +$lang['FilterName'] = '전체 이름별로 사용자를 필터하기 위한 SQL 조항'; +$lang['FilterEmail'] = '이메일 주소별로 사용자를 필터하기 위한 SQL 조항'; +$lang['FilterGroup'] = '그룹 구성원별로 사용자를 필터하기 위한 SQL 조항'; $lang['SortOrder'] = '사용자를 정렬할 SQL 조항'; $lang['addUser'] = '새 사용자를 추가할 SQL 문'; $lang['addGroup'] = '새 그룹을 추가할 SQL 문'; diff --git a/lib/plugins/authmysql/lang/lv/settings.php b/lib/plugins/authmysql/lang/lv/settings.php deleted file mode 100644 index ced5dabf8..000000000 --- a/lib/plugins/authmysql/lang/lv/settings.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Latvian, Lettish language file - * - * @author Aivars Miška <allefm@gmail.com> - */ diff --git a/lib/plugins/authmysql/lang/nl/settings.php b/lib/plugins/authmysql/lang/nl/settings.php index 39fa32112..9848f2019 100644 --- a/lib/plugins/authmysql/lang/nl/settings.php +++ b/lib/plugins/authmysql/lang/nl/settings.php @@ -3,38 +3,39 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Remon <no@email.local> */ -$lang['server'] = 'Je MySQL server'; +$lang['server'] = 'De MySQL server'; $lang['user'] = 'MySql gebruikersnaam'; $lang['password'] = 'Wachtwoord van bovenstaande gebruiker'; $lang['database'] = 'Te gebruiken database'; $lang['charset'] = 'Tekenset voor database'; $lang['debug'] = 'Tonen aanvullende debuginformatie'; $lang['forwardClearPass'] = 'Wachtwoorden als leesbare tekst in SQL commando\'s opnemen in plaats van versleutelde tekens'; -$lang['TablesToLock'] = 'Commagesepareerde lijst van tabellen die gelocked moeten worden bij schrijfacties'; -$lang['checkPass'] = 'SQL commando voor verifiëren van wachtwoorden'; -$lang['getUserInfo'] = 'SQL commando voor ophalen gebruikersinformatie'; -$lang['getGroups'] = 'SQL commando voor ophalen groepslidmaatschappen'; -$lang['getUsers'] = 'SQL commando voor tonen alle gebruikers'; -$lang['FilterLogin'] = 'SQL clausule voor filteren gebruikers op inlognaam'; -$lang['FilterName'] = 'SQL clausule voor filteren gebruikers op volledige naam'; -$lang['FilterEmail'] = 'SQL clausule voor filteren gebruikers op e-mailadres'; -$lang['FilterGroup'] = 'SQL clausule voor filteren gebruikers op groepslidmaatschap'; -$lang['SortOrder'] = 'SQL clausule voor sorteren gebruikers'; -$lang['addUser'] = 'SQL commando om een gebruiker toe te voegen'; -$lang['addGroup'] = 'SQL commando om een groep toe te voegen'; -$lang['addUserGroup'] = 'SQL commando om een gebruiker aan een groep toe te voegen'; +$lang['TablesToLock'] = 'Kommagescheiden lijst van tabellen die gelocked moeten worden bij schrijfacties'; +$lang['checkPass'] = 'SQL commando voor het verifiëren van wachtwoorden'; +$lang['getUserInfo'] = 'SQL commando voor het ophalen van gebruikersinformatie'; +$lang['getGroups'] = 'SQL commando voor het ophalen van groepslidmaatschappen'; +$lang['getUsers'] = 'SQL commando voor het tonen van alle gebruikers'; +$lang['FilterLogin'] = 'SQL clausule voor het filteren van gebruikers op inlognaam'; +$lang['FilterName'] = 'SQL clausule voor het filteren van gebruikers op volledige naam'; +$lang['FilterEmail'] = 'SQL clausule voor het filteren van gebruikers op e-mailadres'; +$lang['FilterGroup'] = 'SQL clausule voor het filteren van gebruikers op groepslidmaatschap'; +$lang['SortOrder'] = 'SQL clausule voor het sorteren van gebruikers'; +$lang['addUser'] = 'SQL commando om een nieuwe gebruiker toe te voegen'; +$lang['addGroup'] = 'SQL commando om een nieuwe groep toe te voegen'; +$lang['addUserGroup'] = 'SQL commando om een gebruiker aan een bestaande groep toe te voegen'; $lang['delGroup'] = 'SQL commando om een groep te verwijderen'; $lang['getUserID'] = 'SQL commando om de de primaire sleutel van een gebruiker op te halen'; $lang['delUser'] = 'SQL commando om een gebruiker te verwijderen'; $lang['delUserRefs'] = 'SQL commando om een gebruiker uit alle groepen te verwijderen'; $lang['updateUser'] = 'SQL commando om een gebruikersprofiel bij te werken'; -$lang['UpdateLogin'] = 'Bijwerkcommando om een inlognaam bij te werken'; -$lang['UpdatePass'] = 'Bijwerkcommando om een wachtwoord bij te werken'; -$lang['UpdateEmail'] = 'Bijwerkcommando om een e-mailadres bij te werken'; -$lang['UpdateName'] = 'Bijwerkcommando om een volledige naam te werken'; -$lang['UpdateTarget'] = 'Beperkingsclausule om gebruiker te identificeren voor bijwerken'; -$lang['delUserGroup'] = 'SQL commando om een gebruiker uit een bepaalde te verwijderen'; +$lang['UpdateLogin'] = 'Bijwerkcommando om de inlognaam van de gebruiker bij te werken'; +$lang['UpdatePass'] = 'Bijwerkcommando om het wachtwoord van de gebruiker bij te werken'; +$lang['UpdateEmail'] = 'Bijwerkcommando om het e-mailadres van de gebruiker bij te werken'; +$lang['UpdateName'] = 'Bijwerkcommando om de volledige naam van de gebruiker bij te werken'; +$lang['UpdateTarget'] = 'Beperkingsclausule om de gebruiker te identificeren voor bijwerken'; +$lang['delUserGroup'] = 'SQL commando om een gebruiker uit een bepaalde groep te verwijderen'; $lang['getGroupID'] = 'SQL commando om de primaire sletel van een bepaalde groep op te halen'; $lang['debug_o_0'] = 'geen'; $lang['debug_o_1'] = 'alleen bij fouten'; diff --git a/lib/plugins/authmysql/lang/pl/settings.php b/lib/plugins/authmysql/lang/pl/settings.php index 93528cf34..88cbd5d6f 100644 --- a/lib/plugins/authmysql/lang/pl/settings.php +++ b/lib/plugins/authmysql/lang/pl/settings.php @@ -1,10 +1,14 @@ <?php + /** - * Polish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Paweł Jan Czochański <czochanski@gmail.com> */ $lang['server'] = 'Twój server MySQL'; $lang['user'] = 'Nazwa użytkownika MySQL'; $lang['password'] = 'Hasło dla powyższego użytkownika'; $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ł.'; diff --git a/lib/plugins/authmysql/lang/sk/settings.php b/lib/plugins/authmysql/lang/sk/settings.php index 8c52f905e..8042c6902 100644 --- a/lib/plugins/authmysql/lang/sk/settings.php +++ b/lib/plugins/authmysql/lang/sk/settings.php @@ -10,7 +10,7 @@ $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['debug'] = 'Zobraziť dodatočné 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'; @@ -34,5 +34,9 @@ $lang['UpdateLogin'] = 'SQL podmienka pre aktualizáciu prihlasovacieh $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['UpdateTarget'] = 'Podmienka identifikácie používateľa pri aktualizácii'; $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'; +$lang['debug_o_0'] = 'žiadne'; +$lang['debug_o_1'] = 'iba pri chybách'; +$lang['debug_o_2'] = 'všetky SQL dopyty'; diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php index 3f8ff3249..e51b39858 100644 --- a/lib/plugins/authpgsql/auth.php +++ b/lib/plugins/authpgsql/auth.php @@ -148,13 +148,15 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { * @param array $filter array of field/pattern pairs * @return array userinfo (refer getUserData for internal userinfo details) */ - public function retrieveUsers($first = 0, $limit = 10, $filter = array()) { + public function retrieveUsers($first = 0, $limit = 0, $filter = array()) { $out = array(); if($this->_openDB()) { $this->_lockTables("READ"); $sql = $this->_createSQLFilter($this->conf['getUsers'], $filter); - $sql .= " ".$this->conf['SortOrder']." LIMIT $limit OFFSET $first"; + $sql .= " ".$this->conf['SortOrder']; + if($limit) $sql .= " LIMIT $limit"; + if($first) $sql .= " OFFSET $first"; $result = $this->_queryDB($sql); foreach($result as $user) diff --git a/lib/plugins/authpgsql/lang/bg/settings.php b/lib/plugins/authpgsql/lang/bg/settings.php index 0defdc4ff..bd6ae1cee 100644 --- a/lib/plugins/authpgsql/lang/bg/settings.php +++ b/lib/plugins/authpgsql/lang/bg/settings.php @@ -1,7 +1,8 @@ <?php + /** - * Bulgarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Kiril <neohidra@gmail.com> */ $lang['server'] = 'Вашият PostgreSQL сървър'; @@ -9,4 +10,4 @@ $lang['port'] = 'Порт за PostgreSQL сървъра'; $lang['user'] = 'PostgreSQL потребител'; $lang['password'] = 'Парола за горния потребител'; $lang['database'] = 'Име на базата от данни'; -$lang['debug'] = 'Показване на допълнителна debug информация';
\ No newline at end of file +$lang['debug'] = 'Показване на допълнителна debug информация'; diff --git a/lib/plugins/authpgsql/lang/da/settings.php b/lib/plugins/authpgsql/lang/da/settings.php new file mode 100644 index 000000000..007174815 --- /dev/null +++ b/lib/plugins/authpgsql/lang/da/settings.php @@ -0,0 +1,22 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> + * @author soer9648 <soer9648@eucl.dk> + */ +$lang['server'] = 'Din PostgresSQL server'; +$lang['port'] = 'Din PostgresSQL servers port'; +$lang['password'] = 'Kodeord til ovenstående bruger'; +$lang['database'] = 'Database der skal benyttes'; +$lang['debug'] = 'Vis yderligere debug output'; +$lang['checkPass'] = 'SQL-sætning til at kontrollere kodeord'; +$lang['getUsers'] = 'SQL-sætning til at liste alle brugere'; +$lang['addUser'] = 'SQL-sætning til at tilføje en ny bruger'; +$lang['addGroup'] = 'SQL-sætning til at tilføje en ny gruppe'; +$lang['addUserGroup'] = 'SQL-sætning til at tilføje en bruger til en eksisterende gruppe'; +$lang['delGroup'] = 'SQL-sætning til at fjerne en gruppe'; +$lang['delUser'] = 'SQL-sætning til at slette en bruger'; +$lang['delUserRefs'] = 'SQL-sætning til at fjerne en bruger fra alle grupper'; +$lang['updateUser'] = 'SQL-sætning til at opdatere en brugerprofil'; diff --git a/lib/plugins/authpgsql/lang/fi/settings.php b/lib/plugins/authpgsql/lang/fi/settings.php deleted file mode 100644 index d3aa13e07..000000000 --- a/lib/plugins/authpgsql/lang/fi/settings.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Finnish language file - * - * @author Otto Vainio <otto@valjakko.net> - */ diff --git a/lib/plugins/authpgsql/lang/hu/settings.php b/lib/plugins/authpgsql/lang/hu/settings.php index ff62a7016..213fc8751 100644 --- a/lib/plugins/authpgsql/lang/hu/settings.php +++ b/lib/plugins/authpgsql/lang/hu/settings.php @@ -4,35 +4,36 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Marton Sebok <sebokmarton@gmail.com> + * @author Marina Vladi <deldadam@gmail.com> */ -$lang['server'] = 'PostgreSQL-szerver'; -$lang['port'] = 'PostgreSQL-port'; -$lang['user'] = 'PostgreSQL felhasználónév'; -$lang['password'] = 'Ehhez a jelszó'; +$lang['server'] = 'PostgreSQL-kiszolgáló'; +$lang['port'] = 'PostgreSQL-kiszolgáló portja'; +$lang['user'] = 'PostgreSQL-felhasználónév'; +$lang['password'] = 'Fenti felhasználó jelszava'; $lang['database'] = 'Adatbázis'; -$lang['debug'] = 'Debug-üzenetek megjelenítése?'; +$lang['debug'] = 'Hibakeresési üzenetek megjelenítése'; $lang['forwardClearPass'] = 'A jelszó nyílt szövegben való átadása a következő SQL utasításokban a passcrypt opció használata helyett'; -$lang['checkPass'] = 'SQL utasítás a jelszavak ellenőrzéséhez'; -$lang['getUserInfo'] = 'SQL utasítás a felhasználói információk lekérdezéséhez'; -$lang['getGroups'] = 'SQL utasítás egy felhasználó csoporttagságainak lekérdezéséhez'; -$lang['getUsers'] = 'SQL utasítás a felhasználók listázásához'; -$lang['FilterLogin'] = 'SQL kifejezés a felhasználók azonosító alapú szűréséhez'; -$lang['FilterName'] = 'SQL kifejezés a felhasználók név alapú szűréséhez'; -$lang['FilterEmail'] = 'SQL kifejezés a felhasználók e-mail cím alapú szűréséhez'; -$lang['FilterGroup'] = 'SQL kifejezés a felhasználók csoporttagság alapú szűréséhez'; -$lang['SortOrder'] = 'SQL kifejezés a felhasználók rendezéséhez'; -$lang['addUser'] = 'SQL utasítás új felhasználó hozzáadásához'; -$lang['addGroup'] = 'SQL utasítás új csoport hozzáadásához'; -$lang['addUserGroup'] = 'SQL utasítás egy felhasználó egy meglévő csoporthoz való hozzáadásához'; -$lang['delGroup'] = 'SQL utasítás egy csoport törléséhez'; -$lang['getUserID'] = 'SQL utasítás egy felhasználó elsődleges kulcsának lekérdezéséhez'; -$lang['delUser'] = 'SQL utasítás egy felhasználó törléséhez'; -$lang['delUserRefs'] = 'SQL utasítás egy felhasználó eltávolításához az összes csoportból'; -$lang['updateUser'] = 'SQL utasítás egy felhasználó profiljának frissítéséhez'; -$lang['UpdateLogin'] = 'SQL kifejezés a felhasználó azonosítójának frissítéséhez'; -$lang['UpdatePass'] = 'SQL kifejezés a felhasználó jelszavának frissítéséhez'; -$lang['UpdateEmail'] = 'SQL kifejezés a felhasználó e-mail címének frissítéséhez'; -$lang['UpdateName'] = 'SQL kifejezés a felhasználó nevének frissítéséhez'; -$lang['UpdateTarget'] = 'SQL kifejezés a felhasználó kiválasztásához az adatok frissítésekor'; -$lang['delUserGroup'] = 'SQL utasítás egy felhasználó eltávolításához egy adott csoportból'; -$lang['getGroupID'] = 'SQL utasítás egy csoport elsődleges kulcsának lekérdezéséhez'; +$lang['checkPass'] = 'SQL-utasítás a jelszavak ellenőrzéséhez'; +$lang['getUserInfo'] = 'SQL-utasítás a felhasználói információk lekérdezéséhez'; +$lang['getGroups'] = 'SQL-utasítás egy felhasználó csoporttagságainak lekérdezéséhez'; +$lang['getUsers'] = 'SQL-utasítás a felhasználók listázásához'; +$lang['FilterLogin'] = 'SQL-kifejezés a felhasználók azonosító alapú szűréséhez'; +$lang['FilterName'] = 'SQL-klauzula a felhasználók név alapú szűréséhez'; +$lang['FilterEmail'] = 'SQL-klauzula a felhasználók e-mail cím alapú szűréséhez'; +$lang['FilterGroup'] = 'SQL-klauzula a felhasználók csoporttagság alapú szűréséhez'; +$lang['SortOrder'] = 'SQL-klauzula a felhasználók rendezéséhez'; +$lang['addUser'] = 'SQL-klauzula új felhasználó hozzáadásához'; +$lang['addGroup'] = 'SQL-klauzula új csoport hozzáadásához'; +$lang['addUserGroup'] = 'SQL-utasítás felhasználó meglévő csoporthoz való hozzáadásához'; +$lang['delGroup'] = 'SQL-utasítás csoport törléséhez'; +$lang['getUserID'] = 'SQL-utasítás felhasználó elsődleges kulcsának lekérdezéséhez'; +$lang['delUser'] = 'SQL-utasítás felhasználó törléséhez'; +$lang['delUserRefs'] = 'SQL-utasítás felhasználó összes csoportból való törléséhez'; +$lang['updateUser'] = 'SQL-utasítás felhasználó profiljának frissítéséhez'; +$lang['UpdateLogin'] = 'UPDATE-klauzula felhasználók azonosítójának frissítéséhez'; +$lang['UpdatePass'] = 'UPDATE-klauzula felhasználók jelszavának frissítéséhez'; +$lang['UpdateEmail'] = 'UPDATE-klauzula felhasználók e-mailcímének frissítéséhez'; +$lang['UpdateName'] = 'SQL-kifejezés a felhasználó nevének frissítéséhez'; +$lang['UpdateTarget'] = 'SQL-kifejezés a felhasználó kiválasztásához az adatok frissítésekor'; +$lang['delUserGroup'] = 'SQL-utasítás egy felhasználó eltávolításához egy adott csoportból'; +$lang['getGroupID'] = 'SQL-utasítás egy csoport elsődleges kulcsának lekérdezéséhez'; diff --git a/lib/plugins/authpgsql/lang/it/settings.php b/lib/plugins/authpgsql/lang/it/settings.php deleted file mode 100644 index 10ae72f87..000000000 --- a/lib/plugins/authpgsql/lang/it/settings.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php -/** - * Italian language file - * - */ diff --git a/lib/plugins/authpgsql/lang/ja/settings.php b/lib/plugins/authpgsql/lang/ja/settings.php index 2ce63a34a..d7a5f6cf2 100644 --- a/lib/plugins/authpgsql/lang/ja/settings.php +++ b/lib/plugins/authpgsql/lang/ja/settings.php @@ -11,7 +11,7 @@ $lang['user'] = 'PostgreSQL 接続用ユーザー名'; $lang['password'] = 'PostgreSQL 接続用ユーザーのパスワード'; $lang['database'] = '使用するデータベース名'; $lang['debug'] = 'デバック情報を表示する'; -$lang['forwardClearPass'] = '以下で定義する SQL ステートメントにおいて, パスワード変数 %{pass} を平文とする(DokiWiki側で暗号化しない)'; +$lang['forwardClearPass'] = '以下で定義する SQL ステートメントにおいて, パスワード変数 %{pass} を平文とする(DokiWiki側で暗号化しない)'; $lang['checkPass'] = 'パスワードの照合に用いる SQL ステートメント'; $lang['getUserInfo'] = 'ユーザー情報の取得に用いる SQL ステートメント'; $lang['getGroups'] = 'ユーザーが所属する全てのグループの取得に用いる SQL ステートメント'; diff --git a/lib/plugins/authpgsql/lang/ko/settings.php b/lib/plugins/authpgsql/lang/ko/settings.php index bdd8c2718..bdf38b3c7 100644 --- a/lib/plugins/authpgsql/lang/ko/settings.php +++ b/lib/plugins/authpgsql/lang/ko/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Myeongjin <aranet100@gmail.com> + * @author Garam <rowain8@gmail.com> */ $lang['server'] = 'PostgreSQL 서버'; $lang['port'] = 'PostgreSQL 서버의 포트'; @@ -16,10 +17,10 @@ $lang['checkPass'] = '비밀번호를 확인하기 위한 SQL 문'; $lang['getUserInfo'] = '사용자 정보를 가져오기 위한 SQL 문'; $lang['getGroups'] = '사용자의 그룹 구성원을 가져오기 위한 SQL 문'; $lang['getUsers'] = '모든 사용자를 나타낼 SQL 문'; -$lang['FilterLogin'] = '로그인 이름 별로 사용자를 필터하기 위한 SQL 조항'; -$lang['FilterName'] = '전체 이름 별로 사용자를 필터하기 위한 SQL 조항'; -$lang['FilterEmail'] = '이메일 주소 별로 사용자를 필터하기 위한 SQL 조항'; -$lang['FilterGroup'] = '그룹 구성원 별로 사용자를 필터하기 위한 SQL 조항'; +$lang['FilterLogin'] = '로그인 이름별로 사용자를 필터하기 위한 SQL 조항'; +$lang['FilterName'] = '전체 이름별로 사용자를 필터하기 위한 SQL 조항'; +$lang['FilterEmail'] = '이메일 주소별로 사용자를 필터하기 위한 SQL 조항'; +$lang['FilterGroup'] = '그룹 구성원별로 사용자를 필터하기 위한 SQL 조항'; $lang['SortOrder'] = '사용자를 정렬할 SQL 조항'; $lang['addUser'] = '새 사용자를 추가할 SQL 문'; $lang['addGroup'] = '새 그룹을 추가할 SQL 문'; diff --git a/lib/plugins/authpgsql/lang/lv/settings.php b/lib/plugins/authpgsql/lang/lv/settings.php deleted file mode 100644 index ced5dabf8..000000000 --- a/lib/plugins/authpgsql/lang/lv/settings.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Latvian, Lettish language file - * - * @author Aivars Miška <allefm@gmail.com> - */ diff --git a/lib/plugins/authpgsql/lang/nl/settings.php b/lib/plugins/authpgsql/lang/nl/settings.php index 496017f1c..3faa78705 100644 --- a/lib/plugins/authpgsql/lang/nl/settings.php +++ b/lib/plugins/authpgsql/lang/nl/settings.php @@ -3,35 +3,36 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Remon <no@email.local> */ -$lang['server'] = 'Je PostgrSQL server'; +$lang['server'] = 'Je PostgreSQL server'; $lang['port'] = 'Je PostgreSQL server poort'; -$lang['user'] = 'PostgrSQL gebruikersnaam'; +$lang['user'] = 'PostgreSQL gebruikersnaam'; $lang['password'] = 'Wachtwoord voor bovenstaande gebruiker'; $lang['database'] = 'Te gebruiken database'; $lang['debug'] = 'Tonen aanvullende debuginformatie'; -$lang['forwardClearPass'] = 'Wachtwoorden als leesbare tekst in SQL commando\'s opnemen in plaats van versleutelde tekens'; -$lang['checkPass'] = 'SQL commando voor verifiëren wachtwoorden'; -$lang['getUserInfo'] = 'SQL commando voor ophalen gebruikersinformatie'; -$lang['getGroups'] = 'SQL commando voor ophalen groepslidmaatschappen van gebruikers'; -$lang['getUsers'] = 'SQL commando voor tonen alle gebruikers'; -$lang['FilterLogin'] = 'SQL commando voor filteren gebruikers op inlognaam'; -$lang['FilterName'] = 'SQL commando voor filteren gebruikers op volledige naam'; -$lang['FilterEmail'] = 'SQL commando voor filteren gebruikers op e-mailadres'; -$lang['FilterGroup'] = 'SQL commando voor filteren gebruikers op groepslidmaatschap'; -$lang['SortOrder'] = 'SQL commando voor sorteren gebruikers'; -$lang['addUser'] = 'SQL commando voor toevoegen nieuwe gebruiker'; -$lang['addGroup'] = 'SQL commando voor toevoegen nieuwe groep'; -$lang['addUserGroup'] = 'SQL commando voor toevoegen gebruiker aan bestaande groep'; -$lang['delGroup'] = 'SQL commando voor verwijderen groep'; +$lang['forwardClearPass'] = 'Wachtwoorden als leesbare tekst in SQL commando\'s opnemen in plaats van versleuteld'; +$lang['checkPass'] = 'SQL commando voor het verifiëren van wachtwoorden'; +$lang['getUserInfo'] = 'SQL commando voor het ophalen van gebruikersinformatie'; +$lang['getGroups'] = 'SQL commando voor het ophalen van groepslidmaatschappen van gebruikers'; +$lang['getUsers'] = 'SQL commando voor het tonen van alle gebruikers'; +$lang['FilterLogin'] = 'SQL commando voor het filteren van gebruikers op inlognaam'; +$lang['FilterName'] = 'SQL commando voor het filteren van gebruikers op volledige naam'; +$lang['FilterEmail'] = 'SQL commando voor het filteren van gebruikers op e-mailadres'; +$lang['FilterGroup'] = 'SQL commando voor het filteren van gebruikers op groepslidmaatschap'; +$lang['SortOrder'] = 'SQL commando voor het sorteren van gebruikers'; +$lang['addUser'] = 'SQL commando voor het toevoegen van een nieuwe gebruiker'; +$lang['addGroup'] = 'SQL commando voor het toevoegen van een nieuwe groep'; +$lang['addUserGroup'] = 'SQL commando voor toevoegen van een gebruiker aan een bestaande groep'; +$lang['delGroup'] = 'SQL commando voor het verwijderen van een groep'; $lang['getUserID'] = 'SQL commando om de primaire sleutel van een gebruiker op te halen'; -$lang['delUser'] = 'SQL commando voor verwijderen gebruiker'; +$lang['delUser'] = 'SQL commando voor het verwijderen van een gebruiker'; $lang['delUserRefs'] = 'SQL commando om een gebruiker uit alle groepen te verwijderen'; $lang['updateUser'] = 'SQL commando om een gebruikersprofiel bij te werken'; $lang['UpdateLogin'] = 'SQL commando om een inlognaam bij te werken'; $lang['UpdatePass'] = 'SQL commando om een wachtwoord bij te werken'; $lang['UpdateEmail'] = 'SQL commando om een e-mailadres bij te werken'; $lang['UpdateName'] = 'SQL commando om een volledige naam bij te werken'; -$lang['UpdateTarget'] = 'Beperkingsclausule om gebruiker te identificeren voor bijwerken'; +$lang['UpdateTarget'] = 'Beperkingsclausule om de gebruiker te identificeren bij het bijwerken'; $lang['delUserGroup'] = 'SQL commando om een gebruiker uit een bepaalde groep te verwijderen'; $lang['getGroupID'] = 'SQL commando om de primaire sleutel van een bepaalde groep op te halen'; diff --git a/lib/plugins/authpgsql/lang/pl/settings.php b/lib/plugins/authpgsql/lang/pl/settings.php deleted file mode 100644 index 37afb252d..000000000 --- a/lib/plugins/authpgsql/lang/pl/settings.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php -/** - * Polish language file - * - */ diff --git a/lib/plugins/authpgsql/lang/ru/settings.php b/lib/plugins/authpgsql/lang/ru/settings.php index 48dd2a87c..65cbce8df 100644 --- a/lib/plugins/authpgsql/lang/ru/settings.php +++ b/lib/plugins/authpgsql/lang/ru/settings.php @@ -5,12 +5,14 @@ * * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Aleksandr Selivanov <alexgearbox@gmail.com> + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> */ $lang['server'] = 'Ваш PostgreSQL-сервер'; $lang['port'] = 'Порт вашего PostgreSQL-сервера'; $lang['user'] = 'Имя пользователя PostgreSQL'; $lang['password'] = 'Пароль для указанного пользователя.'; $lang['database'] = 'Имя базы данных'; +$lang['debug'] = 'Отображать дополнительную отладочную информацию'; $lang['checkPass'] = 'Выражение SQL, осуществляющее проверку пароля'; $lang['getUserInfo'] = 'Выражение SQL, осуществляющее извлечение информации о пользователе'; $lang['getGroups'] = 'Выражение SQL, осуществляющее извлечение информации о членстве пользователе в группах'; diff --git a/lib/plugins/authpgsql/lang/sk/settings.php b/lib/plugins/authpgsql/lang/sk/settings.php index 9d656415d..9013a752b 100644 --- a/lib/plugins/authpgsql/lang/sk/settings.php +++ b/lib/plugins/authpgsql/lang/sk/settings.php @@ -10,7 +10,7 @@ $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['debug'] = 'Zobraziť dodatočné 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'; @@ -33,5 +33,6 @@ $lang['UpdateLogin'] = 'SQL podmienka pre aktualizáciu prihlasovacieh $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['UpdateTarget'] = 'Podmienka identifikácie používateľa pri aktualizácii'; $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/sl/settings.php b/lib/plugins/authpgsql/lang/sl/settings.php index 4c369abc0..08d3cbca3 100644 --- a/lib/plugins/authpgsql/lang/sl/settings.php +++ b/lib/plugins/authpgsql/lang/sl/settings.php @@ -4,5 +4,14 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Matej Urbančič <mateju@svn.gnome.org> + * @author matej <mateju@svn.gnome.org> */ $lang['database'] = 'Podatkovna zbirka za uporabo'; +$lang['addUserGroup'] = 'Ukaz SQL za dodajanje uporabnika v obstoječo skupino'; +$lang['delGroup'] = 'Ukaz SQL za odstranitev skupine'; +$lang['getUserID'] = 'Ukaz SQL za pridobitev osnovnega ključa uporabnika'; +$lang['delUser'] = 'Ukaz SQL za izbris uporabnika'; +$lang['delUserRefs'] = 'Ukaz SQL za odstranitev uporabnika iz vseh skupin'; +$lang['updateUser'] = 'Ukaz SQL za posodobitev profila uporabnika'; +$lang['delUserGroup'] = 'Ukaz SQL za odstranitev uporabnika iz podane skupine'; +$lang['getGroupID'] = 'Ukaz SQL za pridobitev osnovnega ključa podane skupine'; diff --git a/lib/plugins/config/lang/de-informal/lang.php b/lib/plugins/config/lang/de-informal/lang.php index 598c1a72d..7a17ace4a 100644 --- a/lib/plugins/config/lang/de-informal/lang.php +++ b/lib/plugins/config/lang/de-informal/lang.php @@ -108,7 +108,6 @@ $lang['target____media'] = 'Zielfenstername für Medienlinks'; $lang['target____windows'] = 'Zielfenstername für Windows-Freigaben-Links'; $lang['mediarevisions'] = 'Media-Revisionen (ältere Versionen) aktivieren?'; $lang['refcheck'] = 'Auf Verwendung beim Löschen von Media-Dateien testen'; -$lang['refshow'] = 'Wie viele Verwendungsorte der Media-Datei zeigen'; $lang['gdlib'] = 'GD Lib Version'; $lang['im_convert'] = 'Pfad zu ImageMagicks-Konvertierwerkzeug'; $lang['jpg_quality'] = 'JPEG Kompressionsqualität (0-100)'; diff --git a/lib/plugins/config/lang/de/lang.php b/lib/plugins/config/lang/de/lang.php index 07eb4a750..e55081a91 100644 --- a/lib/plugins/config/lang/de/lang.php +++ b/lib/plugins/config/lang/de/lang.php @@ -76,7 +76,6 @@ $lang['camelcase'] = 'CamelCase-Verlinkungen verwenden'; $lang['deaccent'] = 'Seitennamen bereinigen'; $lang['useheading'] = 'Erste Überschrift als Seitennamen verwenden'; $lang['refcheck'] = 'Auf Verwendung beim Löschen von Media-Dateien testen'; -$lang['refshow'] = 'Wie viele Verwendungsorte der Media-Datei zeigen'; $lang['allowdebug'] = 'Debug-Ausgaben erlauben <b>Abschalten wenn nicht benötigt!</b>'; $lang['mediarevisions'] = 'Media-Revisionen (ältere Versionen) aktivieren?'; $lang['usewordblock'] = 'Spam-Blocking benutzen'; diff --git a/lib/plugins/config/lang/hr/lang.php b/lib/plugins/config/lang/hr/lang.php deleted file mode 100644 index 96f1d6afe..000000000 --- a/lib/plugins/config/lang/hr/lang.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -/** - * Croatian language file - * - * @author Branko Rihtman <theney@gmail.com> - * @author Dražen Odobašić <dodobasic@gmail.com> - * @author Dejan Igrec dejan.igrec@gmail.com - */ diff --git a/lib/plugins/config/lang/id/lang.php b/lib/plugins/config/lang/id/lang.php deleted file mode 100644 index c3d485930..000000000 --- a/lib/plugins/config/lang/id/lang.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * Indonesian language file - * - * @author Irwan Butar Butar <irwansah.putra@gmail.com> - * @author Yustinus Waruwu <juswaruwu@gmail.com> - */ diff --git a/lib/plugins/config/lang/kk/lang.php b/lib/plugins/config/lang/kk/lang.php deleted file mode 100644 index dde5b9577..000000000 --- a/lib/plugins/config/lang/kk/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * kazakh language file - * - * @author Nurgozha Kaliaskarov astana08@gmail.com - */ diff --git a/lib/plugins/config/lang/ko/intro.txt b/lib/plugins/config/lang/ko/intro.txt index d0b85606c..979bbcb14 100644 --- a/lib/plugins/config/lang/ko/intro.txt +++ b/lib/plugins/config/lang/ko/intro.txt @@ -6,4 +6,3 @@ 이 페이지를 떠나기 전에 **저장** 버튼을 누르지 않으면 바뀜이 사라지는 것에 주의하세요. - diff --git a/lib/plugins/config/lang/ko/lang.php b/lib/plugins/config/lang/ko/lang.php index ac52090e3..0cdaca90d 100644 --- a/lib/plugins/config/lang/ko/lang.php +++ b/lib/plugins/config/lang/ko/lang.php @@ -71,7 +71,7 @@ $lang['deaccent'] = '문서 이름을 지우는 방법'; $lang['useheading'] = '문서 이름으로 첫 문단 제목 사용'; $lang['sneaky_index'] = '기본적으로 도쿠위키는 색인 목록에 모든 이름공간을 보여줍니다. 이 옵션을 설정하면 사용자가 읽기 권한을 가지고 있지 않은 이름공간은 보여주지 않습니다. 접근 가능한 하위 이름공간을 보이지 않게 설정하면 자동으로 설정됩니다. 특정 ACL 설정은 색인 사용이 불가능하게 할 수도 있습니다.'; -$lang['hidepages'] = '사이트맵과 기타 자동 색인과 같은 찾기에서 정규 표현식과 일치하는 문서 숨기기'; +$lang['hidepages'] = '검색, 사이트맵과 기타 자동 색인에서 정규 표현식과 일치하는 문서 숨기기'; $lang['useacl'] = '접근 제어 목록 (ACL) 사용'; $lang['autopasswd'] = '자동으로 만들어진 비밀번호'; $lang['authtype'] = '인증 백-엔드'; @@ -137,7 +137,7 @@ $lang['gzip_output'] = 'xhml 내용 gzip 압축 사용'; $lang['compress'] = '최적화된 CSS, 자바스크립트 출력'; $lang['cssdatauri'] = '그림이 렌더링될 최대 용량 크기를 CSS에 규정해야 HTTP 요청 헤더 오버헤드 크기를 감소시킬 수 있습니다. 이 기술은 IE 7 이하에서는 작동하지 않습니다! <code>400</code>에서 <code>600</code> 정도면 좋은 효율을 가져옵니다. <code>0</code>로 지정할 경우 비활성화 됩니다.'; $lang['send404'] = '존재하지 않는 페이지에 대해 "HTTP 404/페이지를 찾을 수 없습니다" 응답'; -$lang['broken_iua'] = '설치된 시스템에서 ignore_user_abort 기능에 문제가 있습니까? 문제가 있다면 색인이 정상적으로 동작하지 않습니다. 이 기능이 IIS+PHP/CGI에서 문제가 있는 것으로 알려졌습니다. 자세한 정보는 <a href="http://bugs.dokuwiki.org/?do=details&task_id=852">버그 852</a>를 참고하시기 바랍니다.'; +$lang['broken_iua'] = '설치된 시스템에서 ignore_user_abort 기능에 문제가 있습니까? 문제가 있다면 검색 색인이 정상적으로 동작하지 않습니다. 이 기능이 IIS+PHP/CGI에서 문제가 있는 것으로 알려졌습니다. 자세한 정보는 <a href="http://bugs.dokuwiki.org/?do=details&task_id=852">버그 852</a>를 참고하시기 바랍니다.'; $lang['xsendfile'] = '웹 서버가 정적 파일을 제공하도록 X-Sendfile 헤더를 사용하겠습니까? 웹 서버가 이 기능을 지원해야 합니다.'; $lang['renderer_xhtml'] = '주 (xhtml) 위키 출력 처리기'; $lang['renderer__core'] = '%s (도쿠위키 내부)'; diff --git a/lib/plugins/config/lang/lb/lang.php b/lib/plugins/config/lang/lb/lang.php deleted file mode 100644 index 59acdf7a8..000000000 --- a/lib/plugins/config/lang/lb/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * lb language file - * - * @author joel@schintgen.net - */ diff --git a/lib/plugins/config/lang/mk/lang.php b/lib/plugins/config/lang/mk/lang.php deleted file mode 100644 index 6d4530f79..000000000 --- a/lib/plugins/config/lang/mk/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Macedonian language file - * - * @author Dimitar Talevski <dimi3.14@gmail.com> - */ diff --git a/lib/plugins/config/lang/ms/lang.php b/lib/plugins/config/lang/ms/lang.php deleted file mode 100644 index 77ad2a1c1..000000000 --- a/lib/plugins/config/lang/ms/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Malay language file - * - * @author Markos - */ diff --git a/lib/plugins/config/lang/pt-br/lang.php b/lib/plugins/config/lang/pt-br/lang.php index ee1447b4e..795ee81c0 100644 --- a/lib/plugins/config/lang/pt-br/lang.php +++ b/lib/plugins/config/lang/pt-br/lang.php @@ -114,7 +114,6 @@ $lang['target____media'] = 'Parâmetro "target" para links de mídia'; $lang['target____windows'] = 'Parâmetro "target" para links do Windows'; $lang['mediarevisions'] = 'Habilitar revisões de mídias?'; $lang['refcheck'] = 'Verificação de referência da mídia'; -$lang['refshow'] = 'Número de referências de mídia a exibir'; $lang['gdlib'] = 'Versão da biblioteca "GD Lib"'; $lang['im_convert'] = 'Caminho para a ferramenta de conversão ImageMagick'; $lang['jpg_quality'] = 'Qualidade de compressão do JPG (0-100)'; diff --git a/lib/plugins/config/lang/vi/lang.php b/lib/plugins/config/lang/vi/lang.php deleted file mode 100644 index 2933d8875..000000000 --- a/lib/plugins/config/lang/vi/lang.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php -/** - * Vietnamese language file - * - */ diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 1d2173706..05f8470f7 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -330,8 +330,7 @@ if (!class_exists('configuration')) { foreach ($this->get_plugin_list() as $plugin) { $plugin_dir = plugin_directory($plugin); if (@file_exists(DOKU_PLUGIN.$plugin_dir.$file)){ - $conf = array(); - @include(DOKU_PLUGIN.$plugin_dir.$file); + $conf = $this->_read_config(DOKU_PLUGIN.$plugin_dir.$file); foreach ($conf as $key => $value){ $default['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.$key] = $value; } @@ -340,8 +339,7 @@ if (!class_exists('configuration')) { // the same for the active template if (@file_exists(tpl_incdir().$file)){ - $conf = array(); - @include(tpl_incdir().$file); + $conf = $this->_read_config(tpl_incdir().$file); foreach ($conf as $key => $value){ $default['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value; } @@ -794,7 +792,7 @@ if (!class_exists('setting_numericopt')) { if (!class_exists('setting_onoff')) { class setting_onoff extends setting_numeric { - function html(&$plugin) { + function html(&$plugin, $echo = false) { $value = ''; $disable = ''; @@ -830,7 +828,7 @@ if (!class_exists('setting_multichoice')) { class setting_multichoice extends setting_string { var $_choices = array(); - function html(&$plugin) { + function html(&$plugin, $echo = false) { $value = ''; $disable = ''; $nochoice = ''; diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index f4c2ed265..f9dabfeb0 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -48,6 +48,7 @@ * 'compression' - no additional parameters. checks php installation supports possible compression alternatives * 'licence' - as multichoice, selection constructed from licence strings in language files * 'renderer' - as multichoice, selection constructed from enabled renderer plugins which canRender() + * 'authtype' - as multichoice, selection constructed from the enabled auth plugins * * Any setting commented or missing will use 'setting' class - text input, minimal validation, quoted output * diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index d0f99fa8f..83de802a3 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -176,7 +176,7 @@ if (!class_exists('setting_renderer')) { $format = $this->_format; foreach (plugin_list('renderer') as $plugin) { - $renderer =& plugin_load('renderer',$plugin); + $renderer = plugin_load('renderer',$plugin); if (method_exists($renderer,'canRender') && $renderer->canRender($format)) { $this->_choices[] = $plugin; diff --git a/lib/plugins/extension/_test/extension.test.php b/lib/plugins/extension/_test/extension.test.php new file mode 100644 index 000000000..453b95e79 --- /dev/null +++ b/lib/plugins/extension/_test/extension.test.php @@ -0,0 +1,293 @@ +<?php + +/** + * Class mock_helper_plugin_extension_extension + * + * makes protected methods accessible + */ +class mock_helper_plugin_extension_extension extends helper_plugin_extension_extension { + public function find_folders(&$result, $base, $default_type = 'plugin', $dir = '') { + return parent::find_folders($result, $base, $default_type, $dir); + } + +} + +/** + * @group plugin_extension + * @group plugins + */ +class helper_plugin_extension_extension_test extends DokuWikiTest { + + protected $pluginsEnabled = array('extension'); + + /** + * FIXME should we test this without internet first? + * + * @group internet + */ + public function testExtensionParameters() { + $extension = new helper_plugin_extension_extension(); + + $extension->setExtension('extension'); + $this->assertEquals('extension', $extension->getID()); + $this->assertEquals('extension', $extension->getBase()); + $this->assertEquals('Extension Manager', $extension->getDisplayName()); + $this->assertEquals('Michael Hamann', $extension->getAuthor()); + $this->assertEquals('michael@content-space.de', $extension->getEmail()); + $this->assertEquals(md5('michael@content-space.de'), $extension->getEmailID()); + $this->assertEquals('https://www.dokuwiki.org/plugin:extension', $extension->getURL()); + $this->assertEquals('Allows managing and installing plugins and templates', $extension->getDescription()); + $this->assertFalse($extension->isTemplate()); + $this->assertTrue($extension->isEnabled()); + $this->assertTrue($extension->isInstalled()); + $this->assertTrue($extension->isBundled()); + + $extension->setExtension('testing'); + $this->assertEquals('testing', $extension->getID()); + $this->assertEquals('testing', $extension->getBase()); + $this->assertEquals('Testing Plugin', $extension->getDisplayName()); + $this->assertEquals('Tobias Sarnowski', $extension->getAuthor()); + $this->assertEquals('tobias@trustedco.de', $extension->getEmail()); + $this->assertEquals(md5('tobias@trustedco.de'), $extension->getEmailID()); + $this->assertEquals('http://www.dokuwiki.org/plugin:testing', $extension->getURL()); + $this->assertEquals('Used to test the test framework. Should always be disabled.', $extension->getDescription()); + $this->assertFalse($extension->isTemplate()); + $this->assertFalse($extension->isEnabled()); + $this->assertTrue($extension->isInstalled()); + $this->assertTrue($extension->isBundled()); + + $extension->setExtension('template:dokuwiki'); + $this->assertEquals('template:dokuwiki', $extension->getID()); + $this->assertEquals('dokuwiki', $extension->getBase()); + $this->assertEquals('DokuWiki Template', $extension->getDisplayName()); + $this->assertEquals('Anika Henke', $extension->getAuthor()); + $this->assertEquals('anika@selfthinker.org', $extension->getEmail()); + $this->assertEquals(md5('anika@selfthinker.org'), $extension->getEmailID()); + $this->assertEquals('http://www.dokuwiki.org/template:dokuwiki', $extension->getURL()); + $this->assertEquals('DokuWiki\'s default template since 2012', $extension->getDescription()); + $this->assertTrue($extension->isTemplate()); + $this->assertTrue($extension->isEnabled()); + $this->assertTrue($extension->isInstalled()); + $this->assertTrue($extension->isBundled()); + } + + public function testFindFoldersPlugins() { + $extension = new mock_helper_plugin_extension_extension(); + $tdir = dirname(__FILE__).'/testdata'; + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/plugin1", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('plugin', $result['old'][0]['type']); + $this->assertEquals('plugin1', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/plugin2", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('plugin', $result['new'][0]['type']); + $this->assertEquals('plugin2', $result['new'][0]['base']); + $this->assertEquals('plugin2', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/plgsub3", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('plugin', $result['old'][0]['type']); + $this->assertEquals('plgsub3/plugin3', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/plgsub4", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('plugin', $result['new'][0]['type']); + $this->assertEquals('plugin4', $result['new'][0]['base']); + $this->assertEquals('plgsub4/plugin4', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/plgfoo5", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('plugin', $result['new'][0]['type']); + $this->assertEquals('plugin5', $result['new'][0]['base']); + $this->assertEquals('plgfoo5', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/plgsub6/plgfoo6", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('plugin', $result['new'][0]['type']); + $this->assertEquals('plugin6', $result['new'][0]['base']); + $this->assertEquals('plgsub6/plgfoo6', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/either1", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('plugin', $result['old'][0]['type']); + $this->assertEquals('either1', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/eithersub2/either2", 'plugin'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('plugin', $result['old'][0]['type']); + $this->assertEquals('eithersub2/either2', $this->extdir($result['old'][0]['tmp'])); + } + + public function testFindFoldersTemplates() { + $extension = new mock_helper_plugin_extension_extension(); + $tdir = dirname(__FILE__).'/testdata'; + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/template1", 'template'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('template', $result['old'][0]['type']); + $this->assertEquals('template1', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/template2", 'template'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template2', $result['new'][0]['base']); + $this->assertEquals('template2', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplsub3", 'template'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('template', $result['old'][0]['type']); + $this->assertEquals('tplsub3/template3', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplsub4", 'template'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template4', $result['new'][0]['base']); + $this->assertEquals('tplsub4/template4', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplfoo5", 'template'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template5', $result['new'][0]['base']); + $this->assertEquals('tplfoo5', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplsub6/tplfoo6", 'template'); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template6', $result['new'][0]['base']); + $this->assertEquals('tplsub6/tplfoo6', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/either1", 'template'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('template', $result['old'][0]['type']); + $this->assertEquals('either1', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/eithersub2/either2", 'template'); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('template', $result['old'][0]['type']); + $this->assertEquals('eithersub2/either2', $this->extdir($result['old'][0]['tmp'])); + } + + public function testFindFoldersTemplatesAutodetect() { + $extension = new mock_helper_plugin_extension_extension(); + $tdir = dirname(__FILE__).'/testdata'; + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/template1"); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('template', $result['old'][0]['type']); + $this->assertEquals('template1', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/template2"); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template2', $result['new'][0]['base']); + $this->assertEquals('template2', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplsub3"); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('template', $result['old'][0]['type']); + $this->assertEquals('tplsub3/template3', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplsub4"); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template4', $result['new'][0]['base']); + $this->assertEquals('tplsub4/template4', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplfoo5"); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template5', $result['new'][0]['base']); + $this->assertEquals('tplfoo5', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/tplsub6/tplfoo6"); + $this->assertTrue($ok); + $this->assertEquals(1, count($result['new'])); + $this->assertEquals('template', $result['new'][0]['type']); + $this->assertEquals('template6', $result['new'][0]['base']); + $this->assertEquals('tplsub6/tplfoo6', $this->extdir($result['new'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/either1"); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('plugin', $result['old'][0]['type']); + $this->assertEquals('either1', $this->extdir($result['old'][0]['tmp'])); + + $result = array('old' => array(), 'new' => array()); + $ok = $extension->find_folders($result, "$tdir/eithersub2/either2"); + $this->assertTrue($ok); + $this->assertEquals(0, count($result['new'])); + $this->assertEquals(1, count($result['old'])); + $this->assertEquals('plugin', $result['old'][0]['type']); + $this->assertEquals('eithersub2/either2', $this->extdir($result['old'][0]['tmp'])); + } + + /** + * remove the test data directory from a dir name for cross install comparison + * + * @param string $dir + * @return string + */ + protected function extdir($dir) { + $tdir = dirname(__FILE__).'/testdata'; + $len = strlen($tdir); + $dir = trim(substr($dir, $len), '/'); + return $dir; + } +}
\ No newline at end of file diff --git a/lib/plugins/extension/_test/testdata/either1/script.js b/lib/plugins/extension/_test/testdata/either1/script.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/lib/plugins/extension/_test/testdata/either1/script.js diff --git a/lib/plugins/extension/_test/testdata/eithersub2/either2/script.js b/lib/plugins/extension/_test/testdata/eithersub2/either2/script.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/lib/plugins/extension/_test/testdata/eithersub2/either2/script.js diff --git a/lib/plugins/extension/_test/testdata/plgfoo5/plugin.info.txt b/lib/plugins/extension/_test/testdata/plgfoo5/plugin.info.txt new file mode 100644 index 000000000..cc4532d29 --- /dev/null +++ b/lib/plugins/extension/_test/testdata/plgfoo5/plugin.info.txt @@ -0,0 +1,7 @@ +base plugin5 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Plugin +desc Dummy plugin data +url http://example.com/plugin:plugin5 diff --git a/lib/plugins/extension/_test/testdata/plgsub3/plugin3/syntax.php b/lib/plugins/extension/_test/testdata/plgsub3/plugin3/syntax.php new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/lib/plugins/extension/_test/testdata/plgsub3/plugin3/syntax.php diff --git a/lib/plugins/extension/_test/testdata/plgsub4/plugin4/plugin.info.txt b/lib/plugins/extension/_test/testdata/plgsub4/plugin4/plugin.info.txt new file mode 100644 index 000000000..374b6bf24 --- /dev/null +++ b/lib/plugins/extension/_test/testdata/plgsub4/plugin4/plugin.info.txt @@ -0,0 +1,7 @@ +base plugin4 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Plugin +desc Dummy plugin data +url http://example.com/plugin:plugin4 diff --git a/lib/plugins/extension/_test/testdata/plgsub6/plgfoo6/plugin.info.txt b/lib/plugins/extension/_test/testdata/plgsub6/plgfoo6/plugin.info.txt new file mode 100644 index 000000000..461ff8735 --- /dev/null +++ b/lib/plugins/extension/_test/testdata/plgsub6/plgfoo6/plugin.info.txt @@ -0,0 +1,7 @@ +base plugin6 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Plugin +desc Dummy plugin data +url http://example.com/plugin:plugin6 diff --git a/lib/plugins/extension/_test/testdata/plugin1/syntax.php b/lib/plugins/extension/_test/testdata/plugin1/syntax.php new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/lib/plugins/extension/_test/testdata/plugin1/syntax.php diff --git a/lib/plugins/extension/_test/testdata/plugin2/plugin.info.txt b/lib/plugins/extension/_test/testdata/plugin2/plugin.info.txt new file mode 100644 index 000000000..d56758fe9 --- /dev/null +++ b/lib/plugins/extension/_test/testdata/plugin2/plugin.info.txt @@ -0,0 +1,7 @@ +base plugin2 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Plugin +desc Dummy Plugin data +url http://example.com/plugin:plugin2 diff --git a/lib/plugins/extension/_test/testdata/template1/main.php b/lib/plugins/extension/_test/testdata/template1/main.php new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/lib/plugins/extension/_test/testdata/template1/main.php diff --git a/lib/plugins/extension/_test/testdata/template1/style.ini b/lib/plugins/extension/_test/testdata/template1/style.ini new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/lib/plugins/extension/_test/testdata/template1/style.ini diff --git a/lib/plugins/extension/_test/testdata/template2/template.info.txt b/lib/plugins/extension/_test/testdata/template2/template.info.txt new file mode 100644 index 000000000..882a7b914 --- /dev/null +++ b/lib/plugins/extension/_test/testdata/template2/template.info.txt @@ -0,0 +1,7 @@ +base template2 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Template +desc Dummy template data +url http://example.com/template:template2 diff --git a/lib/plugins/extension/_test/testdata/tplfoo5/template.info.txt b/lib/plugins/extension/_test/testdata/tplfoo5/template.info.txt new file mode 100644 index 000000000..4d7ecb8ef --- /dev/null +++ b/lib/plugins/extension/_test/testdata/tplfoo5/template.info.txt @@ -0,0 +1,7 @@ +base template5 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Template +desc Dummy template data +url http://example.com/template:template5 diff --git a/lib/plugins/extension/_test/testdata/tplsub3/template3/main.php b/lib/plugins/extension/_test/testdata/tplsub3/template3/main.php new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/lib/plugins/extension/_test/testdata/tplsub3/template3/main.php diff --git a/lib/plugins/extension/_test/testdata/tplsub3/template3/style.ini b/lib/plugins/extension/_test/testdata/tplsub3/template3/style.ini new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/lib/plugins/extension/_test/testdata/tplsub3/template3/style.ini diff --git a/lib/plugins/extension/_test/testdata/tplsub4/template4/template.info.txt b/lib/plugins/extension/_test/testdata/tplsub4/template4/template.info.txt new file mode 100644 index 000000000..f050555e5 --- /dev/null +++ b/lib/plugins/extension/_test/testdata/tplsub4/template4/template.info.txt @@ -0,0 +1,7 @@ +base template4 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Template +desc Dummy template data +url http://example.com/template:template4 diff --git a/lib/plugins/extension/_test/testdata/tplsub6/tplfoo6/template.info.txt b/lib/plugins/extension/_test/testdata/tplsub6/tplfoo6/template.info.txt new file mode 100644 index 000000000..ea4dc230d --- /dev/null +++ b/lib/plugins/extension/_test/testdata/tplsub6/tplfoo6/template.info.txt @@ -0,0 +1,7 @@ +base template6 +author Andreas Gohr +email andi@splitbrain.org +date 2013-05-02 +name Dummy Template +desc Dummy template data +url http://example.com/template:template6 diff --git a/lib/plugins/extension/action.php b/lib/plugins/extension/action.php new file mode 100644 index 000000000..9e48f134b --- /dev/null +++ b/lib/plugins/extension/action.php @@ -0,0 +1,85 @@ +<?php +/** DokuWiki Plugin extension (Action Component) + * + * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html + * @author Andreas Gohr <andi@splitbrain.org> + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +class action_plugin_extension extends DokuWiki_Action_Plugin { + + /** + * Registers a callback function for a given event + * + * @param Doku_Event_Handler $controller DokuWiki's event controller object + * @return void + */ + public function register(Doku_Event_Handler $controller) { + + $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'info'); + + } + + /** + * Create the detail info for a single plugin + * + * @param Doku_Event $event + * @param $param + */ + public function info(Doku_Event &$event, $param) { + global $USERINFO; + global $INPUT; + + if($event->data != 'plugin_extension') return; + $event->preventDefault(); + $event->stopPropagation(); + + if(empty($_SERVER['REMOTE_USER']) || !auth_isadmin($_SERVER['REMOTE_USER'], $USERINFO['grps'])) { + http_status(403); + echo 'Forbidden'; + exit; + } + + $ext = $INPUT->str('ext'); + if(!$ext) { + http_status(400); + echo 'no extension given'; + return; + } + + /** @var helper_plugin_extension_extension $extension */ + $extension = plugin_load('helper', 'extension_extension'); + $extension->setExtension($ext); + + $act = $INPUT->str('act'); + switch($act) { + case 'enable': + case 'disable': + $json = new JSON(); + $extension->$act(); //enables/disables + + $reverse = ($act == 'disable') ? 'enable' : 'disable'; + + $return = array( + 'state' => $act.'d', // isn't English wonderful? :-) + 'reverse' => $reverse, + 'label' => $extension->getLang('btn_'.$reverse) + ); + + header('Content-Type: application/json'); + echo $json->encode($return); + break; + + case 'info': + default: + /** @var helper_plugin_extension_list $list */ + $list = plugin_load('helper', 'extension_list'); + header('Content-Type: text/html; charset=utf-8'); + echo $list->make_info($extension); + } + } + +} + diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php new file mode 100644 index 000000000..99c74848b --- /dev/null +++ b/lib/plugins/extension/admin.php @@ -0,0 +1,155 @@ +<?php +/** + * DokuWiki Plugin extension (Admin Component) + * + * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html + * @author Michael Hamann <michael@content-space.de> + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * Admin part of the extension manager + */ +class admin_plugin_extension extends DokuWiki_Admin_Plugin { + protected $infoFor = null; + /** @var helper_plugin_extension_gui */ + protected $gui; + + /** + * Constructor + * + * loads additional helpers + */ + public function __construct() { + $this->gui = plugin_load('helper', 'extension_gui'); + } + + /** + * @return int sort number in admin menu + */ + public function getMenuSort() { + return 0; + } + + /** + * @return bool true if only access for superuser, false is for superusers and moderators + */ + public function forAdminOnly() { + return true; + } + + /** + * Execute the requested action(s) and initialize the plugin repository + */ + public function handle() { + global $INPUT; + // initialize the remote repository + /* @var helper_plugin_extension_repository $repository */ + $repository = $this->loadHelper('extension_repository'); + + if(!$repository->hasAccess()) { + $url = $this->gui->tabURL('', array('purge' => 1)); + msg($this->getLang('repo_error').' [<a href="'.$url.'">'.$this->getLang('repo_retry').'</a>]', -1); + } + + /* @var helper_plugin_extension_extension $extension */ + $extension = $this->loadHelper('extension_extension'); + + try { + if($INPUT->post->has('fn') && checkSecurityToken()) { + $actions = $INPUT->post->arr('fn'); + foreach($actions as $action => $extensions) { + foreach($extensions as $extname => $label) { + switch($action) { + case 'install': + case 'reinstall': + case 'update': + $extension->setExtension($extname); + $installed = $extension->installOrUpdate(); + foreach($installed as $ext => $info) { + msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); + } + break; + case 'uninstall': + $extension->setExtension($extname); + $status = $extension->uninstall(); + if($status !== true) { + msg($status, -1); + } else { + msg(sprintf($this->getLang('msg_delete_success'), hsc($extension->getDisplayName())), 1); + } + break; + case 'enable'; + $extension->setExtension($extname); + $status = $extension->enable(); + if($status !== true) { + msg($status, -1); + } else { + msg(sprintf($this->getLang('msg_enabled'), hsc($extension->getDisplayName())), 1); + } + break; + case 'disable'; + $extension->setExtension($extname); + $status = $extension->disable(); + if($status !== true) { + msg($status, -1); + } else { + msg(sprintf($this->getLang('msg_disabled'), hsc($extension->getDisplayName())), 1); + } + break; + } + } + } + send_redirect($this->gui->tabURL('', array(), '&', true)); + } elseif($INPUT->post->str('installurl') && checkSecurityToken()) { + $installed = $extension->installFromURL($INPUT->post->str('installurl')); + foreach($installed as $ext => $info) { + msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); + } + send_redirect($this->gui->tabURL('', array(), '&', true)); + } elseif(isset($_FILES['installfile']) && checkSecurityToken()) { + $installed = $extension->installFromUpload('installfile'); + foreach($installed as $ext => $info) { + msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); + } + send_redirect($this->gui->tabURL('', array(), '&', true)); + } + + } catch(Exception $e) { + msg($e->getMessage(), -1); + send_redirect($this->gui->tabURL('', array(), '&', true)); + } + + } + + /** + * Render HTML output + */ + public function html() { + ptln('<h1>'.$this->getLang('menu').'</h1>'); + ptln('<div id="extension__manager">'); + + $this->gui->tabNavigation(); + + switch($this->gui->currentTab()) { + case 'search': + $this->gui->tabSearch(); + break; + case 'templates': + $this->gui->tabTemplates(); + break; + case 'install': + $this->gui->tabInstall(); + break; + case 'plugins': + default: + $this->gui->tabPlugins(); + } + + ptln('</div>'); + } +} + +// vim:ts=4:sw=4:et:
\ No newline at end of file diff --git a/lib/plugins/extension/all.less b/lib/plugins/extension/all.less new file mode 100644 index 000000000..3d9688e14 --- /dev/null +++ b/lib/plugins/extension/all.less @@ -0,0 +1,37 @@ + +@media only screen and (max-width: 600px) { + +#extension__list .legend { + > div { + padding-left: 0; + } + + div.screenshot { + margin: 0 .5em .5em 0; + } + + h2 { + width: auto; + float: none; + } + + div.linkbar { + clear: left; + } +} + +[dir=rtl] #extension__list .legend { + > div { + padding-right: 0; + } + + div.screenshot { + margin: 0 0 .5em .5em; + } + + div.linkbar { + clear: right; + } +} + +} /* /@media */ diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php new file mode 100644 index 000000000..7958cd2da --- /dev/null +++ b/lib/plugins/extension/helper/extension.php @@ -0,0 +1,1093 @@ +<?php +/** + * DokuWiki Plugin extension (Helper Component) + * + * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html + * @author Michael Hamann <michael@content-space.de> + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); +if(!defined('DOKU_TPLLIB')) define('DOKU_TPLLIB', DOKU_INC.'lib/tpl/'); + +/** + * Class helper_plugin_extension_extension represents a single extension (plugin or template) + */ +class helper_plugin_extension_extension extends DokuWiki_Plugin { + private $id; + private $base; + private $is_template = false; + private $localInfo; + private $remoteInfo; + private $managerData; + /** @var helper_plugin_extension_repository $repository */ + private $repository = null; + + /** @var array list of temporary directories */ + private $temporary = array(); + + /** + * Destructor + * + * deletes any dangling temporary directories + */ + public function __destruct() { + foreach($this->temporary as $dir){ + io_rmdir($dir, true); + } + } + + /** + * @return bool false, this component is not a singleton + */ + public function isSingleton() { + return false; + } + + /** + * Set the name of the extension this instance shall represents, triggers loading the local and remote data + * + * @param string $id The id of the extension (prefixed with template: for templates) + * @return bool If some (local or remote) data was found + */ + public function setExtension($id) { + $this->id = $id; + $this->base = $id; + + if(substr($id, 0 , 9) == 'template:'){ + $this->base = substr($id, 9); + $this->is_template = true; + } + + $this->localInfo = array(); + $this->managerData = array(); + $this->remoteInfo = array(); + + if ($this->isInstalled()) { + $this->readLocalData(); + $this->readManagerData(); + } + + if ($this->repository == null) { + $this->repository = $this->loadHelper('extension_repository'); + } + + $this->remoteInfo = $this->repository->getData($this->getID()); + + return ($this->localInfo || $this->remoteInfo); + } + + /** + * If the extension is installed locally + * + * @return bool If the extension is installed locally + */ + public function isInstalled() { + return is_dir($this->getInstallDir()); + } + + /** + * If the extension is under git control + * + * @return bool + */ + public function isGitControlled() { + if(!$this->isInstalled()) return false; + return is_dir($this->getInstallDir().'/.git'); + } + + /** + * If the extension is bundled + * + * @return bool If the extension is bundled + */ + public function isBundled() { + if (!empty($this->remoteInfo['bundled'])) return $this->remoteInfo['bundled']; + return in_array($this->base, + array( + 'authad', 'authldap', 'authmysql', 'authpgsql', 'authplain', 'acl', 'info', 'extension', + 'revert', 'popularity', 'config', 'safefnrecode', 'testing', 'template:dokuwiki' + ) + ); + } + + /** + * If the extension is protected against any modification (disable/uninstall) + * + * @return bool if the extension is protected + */ + public function isProtected() { + // never allow deinstalling the current auth plugin: + global $conf; + if ($this->id == $conf['authtype']) return true; + + /** @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + $cascade = $plugin_controller->getCascade(); + return (isset($cascade['protected'][$this->id]) && $cascade['protected'][$this->id]); + } + + /** + * If the extension is installed in the correct directory + * + * @return bool If the extension is installed in the correct directory + */ + public function isInWrongFolder() { + return $this->base != $this->getBase(); + } + + /** + * If the extension is enabled + * + * @return bool If the extension is enabled + */ + public function isEnabled() { + global $conf; + if($this->isTemplate()){ + return ($conf['template'] == $this->getBase()); + } + + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + return !$plugin_controller->isdisabled($this->base); + } + + /** + * If the extension should be updated, i.e. if an updated version is available + * + * @return bool If an update is available + */ + public function updateAvailable() { + if(!$this->isInstalled()) return false; + if($this->isBundled()) return false; + $lastupdate = $this->getLastUpdate(); + if ($lastupdate === false) return false; + $installed = $this->getInstalledVersion(); + if ($installed === false || $installed === $this->getLang('unknownversion')) return true; + return $this->getInstalledVersion() < $this->getLastUpdate(); + } + + /** + * If the extension is a template + * + * @return bool If this extension is a template + */ + public function isTemplate() { + return $this->is_template; + } + + /** + * Get the ID of the extension + * + * This is the same as getName() for plugins, for templates it's getName() prefixed with 'template:' + * + * @return string + */ + public function getID() { + return $this->id; + } + + /** + * Get the name of the installation directory + * + * @return string The name of the installation directory + */ + public function getInstallName() { + return $this->base; + } + + // Data from plugin.info.txt/template.info.txt or the repo when not available locally + /** + * Get the basename of the extension + * + * @return string The basename + */ + public function getBase() { + if (!empty($this->localInfo['base'])) return $this->localInfo['base']; + return $this->base; + } + + /** + * Get the display name of the extension + * + * @return string The display name + */ + public function getDisplayName() { + if (!empty($this->localInfo['name'])) return $this->localInfo['name']; + if (!empty($this->remoteInfo['name'])) return $this->remoteInfo['name']; + return $this->base; + } + + /** + * Get the author name of the extension + * + * @return string|bool The name of the author or false if there is none + */ + public function getAuthor() { + if (!empty($this->localInfo['author'])) return $this->localInfo['author']; + if (!empty($this->remoteInfo['author'])) return $this->remoteInfo['author']; + return false; + } + + /** + * Get the email of the author of the extension if there is any + * + * @return string|bool The email address or false if there is none + */ + public function getEmail() { + // email is only in the local data + if (!empty($this->localInfo['email'])) return $this->localInfo['email']; + return false; + } + + /** + * Get the email id, i.e. the md5sum of the email + * + * @return string|bool The md5sum of the email if there is any, false otherwise + */ + public function getEmailID() { + if (!empty($this->remoteInfo['emailid'])) return $this->remoteInfo['emailid']; + if (!empty($this->localInfo['email'])) return md5($this->localInfo['email']); + return false; + } + + /** + * Get the description of the extension + * + * @return string The description + */ + public function getDescription() { + if (!empty($this->localInfo['desc'])) return $this->localInfo['desc']; + if (!empty($this->remoteInfo['description'])) return $this->remoteInfo['description']; + return ''; + } + + /** + * Get the URL of the extension, usually a page on dokuwiki.org + * + * @return string The URL + */ + public function getURL() { + if (!empty($this->localInfo['url'])) return $this->localInfo['url']; + return 'https://www.dokuwiki.org/'.($this->isTemplate() ? 'template' : 'plugin').':'.$this->getBase(); + } + + /** + * Get the installed version of the extension + * + * @return string|bool The version, usually in the form yyyy-mm-dd if there is any + */ + public function getInstalledVersion() { + if (!empty($this->localInfo['date'])) return $this->localInfo['date']; + if ($this->isInstalled()) return $this->getLang('unknownversion'); + return false; + } + + /** + * Get the install date of the current version + * + * @return string|bool The date of the last update or false if not available + */ + public function getUpdateDate() { + if (!empty($this->managerData['updated'])) return $this->managerData['updated']; + return false; + } + + /** + * Get the date of the installation of the plugin + * + * @return string|bool The date of the installation or false if not available + */ + public function getInstallDate() { + if (!empty($this->managerData['installed'])) return $this->managerData['installed']; + return false; + } + + /** + * Get the names of the dependencies of this extension + * + * @return array The base names of the dependencies + */ + public function getDependencies() { + if (!empty($this->remoteInfo['dependencies'])) return $this->remoteInfo['dependencies']; + return array(); + } + + /** + * Get the names of the missing dependencies + * + * @return array The base names of the missing dependencies + */ + public function getMissingDependencies() { + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + $dependencies = $this->getDependencies(); + $missing_dependencies = array(); + foreach ($dependencies as $dependency) { + if ($plugin_controller->isdisabled($dependency)) { + $missing_dependencies[] = $dependency; + } + } + return $missing_dependencies; + } + + /** + * Get the names of all conflicting extensions + * + * @return array The names of the conflicting extensions + */ + public function getConflicts() { + if (!empty($this->remoteInfo['conflicts'])) return $this->remoteInfo['dependencies']; + return array(); + } + + /** + * Get the names of similar extensions + * + * @return array The names of similar extensions + */ + public function getSimilarExtensions() { + if (!empty($this->remoteInfo['similar'])) return $this->remoteInfo['similar']; + return array(); + } + + /** + * Get the names of the tags of the extension + * + * @return array The names of the tags of the extension + */ + public function getTags() { + if (!empty($this->remoteInfo['tags'])) return $this->remoteInfo['tags']; + return array(); + } + + /** + * Get the popularity information as floating point number [0,1] + * + * @return float|bool The popularity information or false if it isn't available + */ + public function getPopularity() { + if (!empty($this->remoteInfo['popularity'])) return $this->remoteInfo['popularity']; + return false; + } + + + /** + * Get the text of the security warning if there is any + * + * @return string|bool The security warning if there is any, false otherwise + */ + public function getSecurityWarning() { + if (!empty($this->remoteInfo['securitywarning'])) return $this->remoteInfo['securitywarning']; + return false; + } + + /** + * Get the text of the security issue if there is any + * + * @return string|bool The security issue if there is any, false otherwise + */ + public function getSecurityIssue() { + if (!empty($this->remoteInfo['securityissue'])) return $this->remoteInfo['securityissue']; + return false; + } + + /** + * Get the URL of the screenshot of the extension if there is any + * + * @return string|bool The screenshot URL if there is any, false otherwise + */ + public function getScreenshotURL() { + if (!empty($this->remoteInfo['screenshoturl'])) return $this->remoteInfo['screenshoturl']; + return false; + } + + /** + * Get the URL of the thumbnail of the extension if there is any + * + * @return string|bool The thumbnail URL if there is any, false otherwise + */ + public function getThumbnailURL() { + if (!empty($this->remoteInfo['thumbnailurl'])) return $this->remoteInfo['thumbnailurl']; + return false; + } + /** + * Get the last used download URL of the extension if there is any + * + * @return string|bool The previously used download URL, false if the extension has been installed manually + */ + public function getLastDownloadURL() { + if (!empty($this->managerData['downloadurl'])) return $this->managerData['downloadurl']; + return false; + } + + /** + * Get the download URL of the extension if there is any + * + * @return string|bool The download URL if there is any, false otherwise + */ + public function getDownloadURL() { + if (!empty($this->remoteInfo['downloadurl'])) return $this->remoteInfo['downloadurl']; + return false; + } + + /** + * If the download URL has changed since the last download + * + * @return bool If the download URL has changed + */ + public function hasDownloadURLChanged() { + $lasturl = $this->getLastDownloadURL(); + $currenturl = $this->getDownloadURL(); + return ($lasturl && $currenturl && $lasturl != $currenturl); + } + + /** + * Get the bug tracker URL of the extension if there is any + * + * @return string|bool The bug tracker URL if there is any, false otherwise + */ + public function getBugtrackerURL() { + if (!empty($this->remoteInfo['bugtracker'])) return $this->remoteInfo['bugtracker']; + return false; + } + + /** + * Get the URL of the source repository if there is any + * + * @return string|bool The URL of the source repository if there is any, false otherwise + */ + public function getSourcerepoURL() { + if (!empty($this->remoteInfo['sourcerepo'])) return $this->remoteInfo['sourcerepo']; + return false; + } + + /** + * Get the donation URL of the extension if there is any + * + * @return string|bool The donation URL if there is any, false otherwise + */ + public function getDonationURL() { + if (!empty($this->remoteInfo['donationurl'])) return $this->remoteInfo['donationurl']; + return false; + } + + /** + * Get the extension type(s) + * + * @return array The type(s) as array of strings + */ + public function getTypes() { + if (!empty($this->remoteInfo['types'])) return $this->remoteInfo['types']; + if ($this->isTemplate()) return array(32 => 'template'); + return array(); + } + + /** + * Get a list of all DokuWiki versions this extension is compatible with + * + * @return array The versions in the form yyyy-mm-dd => ('label' => label, 'implicit' => implicit) + */ + public function getCompatibleVersions() { + if (!empty($this->remoteInfo['compatible'])) return $this->remoteInfo['compatible']; + return array(); + } + + /** + * Get the date of the last available update + * + * @return string|bool The last available update in the form yyyy-mm-dd if there is any, false otherwise + */ + public function getLastUpdate() { + if (!empty($this->remoteInfo['lastupdate'])) return $this->remoteInfo['lastupdate']; + return false; + } + + /** + * Get the base path of the extension + * + * @return string The base path of the extension + */ + public function getInstallDir() { + if ($this->isTemplate()) { + return DOKU_TPLLIB.$this->base; + } else { + return DOKU_PLUGIN.$this->base; + } + } + + /** + * The type of extension installation + * + * @return string One of "none", "manual", "git" or "automatic" + */ + public function getInstallType() { + if (!$this->isInstalled()) return 'none'; + if (!empty($this->managerData)) return 'automatic'; + if (is_dir($this->getInstallDir().'/.git')) return 'git'; + return 'manual'; + } + + /** + * If the extension can probably be installed/updated or uninstalled + * + * @return bool|string True or error string + */ + public function canModify() { + if($this->isInstalled()) { + if(!is_writable($this->getInstallDir())) { + return 'noperms'; + } + } + + if($this->isTemplate() && !is_writable(DOKU_TPLLIB)) { + return 'notplperms'; + + } elseif(!is_writable(DOKU_PLUGIN)) { + return 'nopluginperms'; + } + return true; + } + + /** + * Install an extension from a user upload + * + * @param string $field name of the upload file + * @throws Exception when something goes wrong + * @return array The list of installed extensions + */ + public function installFromUpload($field){ + if($_FILES[$field]['error']){ + throw new Exception($this->getLang('msg_upload_failed').' ('.$_FILES[$field]['error'].')'); + } + + $tmp = $this->mkTmpDir(); + if(!$tmp) throw new Exception($this->getLang('error_dircreate')); + + // filename may contain the plugin name for old style plugins... + $basename = basename($_FILES[$field]['name']); + $basename = preg_replace('/\.(tar\.gz|tar\.bz|tar\.bz2|tar|tgz|tbz|zip)$/', '', $basename); + $basename = preg_replace('/[\W]+/', '', $basename); + + if(!move_uploaded_file($_FILES[$field]['tmp_name'], "$tmp/upload.archive")){ + throw new Exception($this->getLang('msg_upload_failed')); + } + + try { + $installed = $this->installArchive("$tmp/upload.archive", true, $basename); + // purge cache + $this->purgeCache(); + }catch (Exception $e){ + throw $e; + } + return $installed; + } + + /** + * Install an extension from a remote URL + * + * @param string $url + * @throws Exception when something goes wrong + * @return array The list of installed extensions + */ + public function installFromURL($url){ + try { + $path = $this->download($url); + $installed = $this->installArchive($path, true); + + // purge caches + foreach($installed as $ext => $info){ + $this->setExtension($ext); + $this->purgeCache(); + } + }catch (Exception $e){ + throw $e; + } + return $installed; + } + + /** + * Install or update the extension + * + * @throws \Exception when something goes wrong + * @return array The list of installed extensions + */ + public function installOrUpdate() { + $path = $this->download($this->getDownloadURL()); + $installed = $this->installArchive($path, $this->isInstalled(), $this->getBase()); + + // refresh extension information + if (!isset($installed[$this->getID()])) { + throw new Exception('Error, the requested extension hasn\'t been installed or updated'); + } + $this->setExtension($this->getID()); + $this->purgeCache(); + return $installed; + } + + /** + * Uninstall the extension + * + * @return bool If the plugin was sucessfully uninstalled + */ + public function uninstall() { + $this->purgeCache(); + return io_rmdir($this->getInstallDir(), true); + } + + /** + * Enable the extension + * + * @return bool|string True or an error message + */ + public function enable() { + if ($this->isTemplate()) return $this->getLang('notimplemented'); + if (!$this->isInstalled()) return $this->getLang('notinstalled'); + if ($this->isEnabled()) return $this->getLang('alreadyenabled'); + + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + if ($plugin_controller->enable($this->base)) { + $this->purgeCache(); + return true; + } else { + return $this->getLang('pluginlistsaveerror'); + } + } + + /** + * Disable the extension + * + * @return bool|string True or an error message + */ + public function disable() { + if ($this->isTemplate()) return $this->getLang('notimplemented'); + + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + if (!$this->isInstalled()) return $this->getLang('notinstalled'); + if (!$this->isEnabled()) return $this->getLang('alreadydisabled'); + if ($plugin_controller->disable($this->base)) { + $this->purgeCache(); + return true; + } else { + return $this->getLang('pluginlistsaveerror'); + } + } + + /** + * Purge the cache by touching the main configuration file + */ + protected function purgeCache() { + global $config_cascade; + + // expire dokuwiki caches + // touching local.php expires wiki page, JS and CSS caches + @touch(reset($config_cascade['main']['local'])); + } + + /** + * Read local extension data either from info.txt or getInfo() + */ + protected function readLocalData() { + if ($this->isTemplate()) { + $infopath = $this->getInstallDir().'/template.info.txt'; + } else { + $infopath = $this->getInstallDir().'/plugin.info.txt'; + } + + if (is_readable($infopath)) { + $this->localInfo = confToHash($infopath); + } elseif (!$this->isTemplate() && $this->isEnabled()) { + global $plugin_types; + $path = $this->getInstallDir().'/'; + $plugin = null; + + foreach($plugin_types as $type) { + if(@file_exists($path.$type.'.php')) { + $plugin = plugin_load($type, $this->base); + if ($plugin) break; + } + + if($dh = @opendir($path.$type.'/')) { + while(false !== ($cp = readdir($dh))) { + if($cp == '.' || $cp == '..' || strtolower(substr($cp, -4)) != '.php') continue; + + $plugin = plugin_load($type, $this->base.'_'.substr($cp, 0, -4)); + if ($plugin) break; + } + if ($plugin) break; + closedir($dh); + } + } + + if ($plugin) { + /* @var DokuWiki_Plugin $plugin */ + $this->localInfo = $plugin->getInfo(); + } + } + } + + /** + * Read the manager.dat file + */ + protected function readManagerData() { + $managerpath = $this->getInstallDir().'/manager.dat'; + if (is_readable($managerpath)) { + $file = @file($managerpath); + if(!empty($file)) { + foreach($file as $line) { + list($key, $value) = explode('=', trim($line, DOKU_LF), 2); + $key = trim($key); + $value = trim($value); + // backwards compatible with old plugin manager + if($key == 'url') $key = 'downloadurl'; + $this->managerData[$key] = $value; + } + } + } + } + + /** + * Write the manager.data file + */ + protected function writeManagerData() { + $managerpath = $this->getInstallDir().'/manager.dat'; + $data = ''; + foreach ($this->managerData as $k => $v) { + $data .= $k.'='.$v.DOKU_LF; + } + io_saveFile($managerpath, $data); + } + + /** + * Returns a temporary directory + * + * The directory is registered for cleanup when the class is destroyed + * + * @return bool|string + */ + protected function mkTmpDir(){ + $dir = io_mktmpdir(); + if(!$dir) return false; + $this->temporary[] = $dir; + return $dir; + } + + /** + * Download an archive to a protected path + * + * @param string $url The url to get the archive from + * @throws Exception when something goes wrong + * @return string The path where the archive was saved + */ + public function download($url) { + // check the url + if(!preg_match('/https?:\/\//i', $url)){ + throw new Exception($this->getLang('error_badurl')); + } + + // try to get the file from the path (used as plugin name fallback) + $file = parse_url($url, PHP_URL_PATH); + if(is_null($file)){ + $file = md5($url); + }else{ + $file = utf8_basename($file); + } + + // create tmp directory for download + if(!($tmp = $this->mkTmpDir())) { + throw new Exception($this->getLang('error_dircreate')); + } + + // download + if(!$file = io_download($url, $tmp.'/', true, $file, 0)) { + io_rmdir($tmp, true); + throw new Exception(sprintf($this->getLang('error_download'), '<bdi>'.hsc($url).'</bdi>')); + } + + return $tmp.'/'.$file; + } + + /** + * @param string $file The path to the archive that shall be installed + * @param bool $overwrite If an already installed plugin should be overwritten + * @param string $base The basename of the plugin if it's known + * @throws Exception when something went wrong + * @return array list of installed extensions + */ + public function installArchive($file, $overwrite=false, $base = '') { + $installed_extensions = array(); + + // create tmp directory for decompression + if(!($tmp = $this->mkTmpDir())) { + throw new Exception($this->getLang('error_dircreate')); + } + + // add default base folder if specified to handle case where zip doesn't contain this + if($base && !@mkdir($tmp.'/'.$base)) { + throw new Exception($this->getLang('error_dircreate')); + } + + // decompress + $this->decompress($file, "$tmp/".$base); + + // search $tmp/$base for the folder(s) that has been created + // move the folder(s) to lib/.. + $result = array('old'=>array(), 'new'=>array()); + $default = ($this->isTemplate() ? 'template' : 'plugin'); + if(!$this->find_folders($result, $tmp.'/'.$base, $default)) { + throw new Exception($this->getLang('error_findfolder')); + } + + // choose correct result array + if(count($result['new'])) { + $install = $result['new']; + }else{ + $install = $result['old']; + } + + if(!count($install)){ + throw new Exception($this->getLang('error_findfolder')); + } + + // now install all found items + foreach($install as $item) { + // where to install? + if($item['type'] == 'template') { + $target_base_dir = DOKU_TPLLIB; + }else{ + $target_base_dir = DOKU_PLUGIN; + } + + if(!empty($item['base'])) { + // use base set in info.txt + } elseif($base && count($install) == 1) { + $item['base'] = $base; + } else { + // default - use directory as found in zip + // plugins from github/master without *.info.txt will install in wrong folder + // but using $info->id will make 'code3' fail (which should install in lib/code/..) + $item['base'] = basename($item['tmp']); + } + + // check to make sure we aren't overwriting anything + $target = $target_base_dir.$item['base']; + if(!$overwrite && @file_exists($target)) { + // TODO remember our settings, ask the user to confirm overwrite + continue; + } + + $action = @file_exists($target) ? 'update' : 'install'; + + // copy action + if($this->dircopy($item['tmp'], $target)) { + // return info + $id = $item['base']; + if($item['type'] == 'template') $id = 'template:'.$id; + $installed_extensions[$id] = array( + 'base' => $item['base'], + 'type' => $item['type'], + 'action' => $action + ); + } else { + throw new Exception(sprintf($this->getLang('error_copy').DOKU_LF, '<bdi>'.$item['base'].'</bdi>')); + } + } + + // cleanup + if($tmp) io_rmdir($tmp, true); + + return $installed_extensions; + } + + /** + * Find out what was in the extracted directory + * + * Correct folders are searched recursively using the "*.info.txt" configs + * as indicator for a root folder. When such a file is found, it's base + * setting is used (when set). All folders found by this method are stored + * in the 'new' key of the $result array. + * + * For backwards compatibility all found top level folders are stored as + * in the 'old' key of the $result array. + * + * When no items are found in 'new' the copy mechanism should fall back + * the 'old' list. + * + * @author Andreas Gohr <andi@splitbrain.org> + * @param array $result - results are stored here + * @param string $directory - the temp directory where the package was unpacked to + * @param string $default_type - type used if no info.txt available + * @param string $subdir - a subdirectory. do not set. used by recursion + * @return bool - false on error + */ + protected function find_folders(&$result, $directory, $default_type='plugin', $subdir='') { + $this_dir = "$directory$subdir"; + $dh = @opendir($this_dir); + if(!$dh) return false; + + $found_dirs = array(); + $found_files = 0; + $found_template_parts = 0; + while (false !== ($f = readdir($dh))) { + if($f == '.' || $f == '..') continue; + + if(is_dir("$this_dir/$f")) { + $found_dirs[] = "$subdir/$f"; + + } else { + // it's a file -> check for config + $found_files++; + switch ($f) { + case 'plugin.info.txt': + case 'template.info.txt': + // we have found a clear marker, save and return + $info = array(); + $type = explode('.', $f, 2); + $info['type'] = $type[0]; + $info['tmp'] = $this_dir; + $conf = confToHash("$this_dir/$f"); + $info['base'] = basename($conf['base']); + $result['new'][] = $info; + return true; + + case 'main.php': + case 'details.php': + case 'mediamanager.php': + case 'style.ini': + $found_template_parts++; + break; + } + } + } + closedir($dh); + + // files where found but no info.txt - use old method + if($found_files){ + $info = array(); + $info['tmp'] = $this_dir; + // does this look like a template or should we use the default type? + if($found_template_parts >= 2) { + $info['type'] = 'template'; + } else { + $info['type'] = $default_type; + } + + $result['old'][] = $info; + return true; + } + + // we have no files yet -> recurse + foreach ($found_dirs as $found_dir) { + $this->find_folders($result, $directory, $default_type, "$found_dir"); + } + return true; + } + + /** + * Decompress a given file to the given target directory + * + * Determines the compression type from the file extension + * + * @param string $file archive to extract + * @param string $target directory to extract to + * @throws Exception + * @return bool + */ + private function decompress($file, $target) { + // decompression library doesn't like target folders ending in "/" + if(substr($target, -1) == "/") $target = substr($target, 0, -1); + + $ext = $this->guess_archive($file); + if(in_array($ext, array('tar', 'bz', 'gz'))) { + switch($ext) { + case 'bz': + $compress_type = Tar::COMPRESS_BZIP; + break; + case 'gz': + $compress_type = Tar::COMPRESS_GZIP; + break; + default: + $compress_type = Tar::COMPRESS_NONE; + } + + $tar = new Tar(); + try { + $tar->open($file, $compress_type); + $tar->extract($target); + } catch (Exception $e) { + throw new Exception($this->getLang('error_decompress').' '.$e->getMessage()); + } + + return true; + } elseif($ext == 'zip') { + + $zip = new ZipLib(); + $ok = $zip->Extract($file, $target); + + if($ok == -1){ + throw new Exception($this->getLang('error_decompress').' Error extracting the zip archive'); + } + + return true; + } + + // the only case when we don't get one of the recognized archive types is when the archive file can't be read + throw new Exception($this->getLang('error_decompress').' Couldn\'t read archive file'); + } + + /** + * Determine the archive type of the given file + * + * Reads the first magic bytes of the given file for content type guessing, + * if neither bz, gz or zip are recognized, tar is assumed. + * + * @author Andreas Gohr <andi@splitbrain.org> + * @param string $file The file to analyze + * @return string|bool false if the file can't be read, otherwise an "extension" + */ + private function guess_archive($file) { + $fh = fopen($file, 'rb'); + if(!$fh) return false; + $magic = fread($fh, 5); + fclose($fh); + + if(strpos($magic, "\x42\x5a") === 0) return 'bz'; + if(strpos($magic, "\x1f\x8b") === 0) return 'gz'; + if(strpos($magic, "\x50\x4b\x03\x04") === 0) return 'zip'; + return 'tar'; + } + + /** + * Copy with recursive sub-directory support + */ + private function dircopy($src, $dst) { + global $conf; + + if(is_dir($src)) { + if(!$dh = @opendir($src)) return false; + + if($ok = io_mkdir_p($dst)) { + while ($ok && (false !== ($f = readdir($dh)))) { + if($f == '..' || $f == '.') continue; + $ok = $this->dircopy("$src/$f", "$dst/$f"); + } + } + + closedir($dh); + return $ok; + + } else { + $exists = @file_exists($dst); + + if(!@copy($src, $dst)) return false; + if(!$exists && !empty($conf['fperm'])) chmod($dst, $conf['fperm']); + @touch($dst, filemtime($src)); + } + + return true; + } +} + +// vim:ts=4:sw=4:et: diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php new file mode 100644 index 000000000..3a0f0c589 --- /dev/null +++ b/lib/plugins/extension/helper/gui.php @@ -0,0 +1,193 @@ +<?php +/** + * DokuWiki Plugin extension (Helper Component) + * + * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html + * @author Andreas Gohr <andi@splitbrain.org> + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * Class helper_plugin_extension_list takes care of the overall GUI + */ +class helper_plugin_extension_gui extends DokuWiki_Plugin { + + protected $tabs = array('plugins', 'templates', 'search', 'install'); + + /** @var string the extension that should have an open info window FIXME currently broken */ + protected $infoFor = ''; + + /** + * Constructor + * + * initializes requested info window + */ + public function __construct() { + global $INPUT; + $this->infoFor = $INPUT->str('info'); + } + + /** + * display the plugin tab + */ + public function tabPlugins() { + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + + echo '<div class="panelHeader">'; + echo $this->locale_xhtml('intro_plugins'); + echo '</div>'; + + $pluginlist = $plugin_controller->getList('', true); + sort($pluginlist); + /* @var helper_plugin_extension_extension $extension */ + $extension = $this->loadHelper('extension_extension'); + /* @var helper_plugin_extension_list $list */ + $list = $this->loadHelper('extension_list'); + $list->start_form(); + foreach($pluginlist as $name) { + $extension->setExtension($name); + $list->add_row($extension, $extension->getID() == $this->infoFor); + } + $list->end_form(); + $list->render(); + } + + /** + * Display the template tab + */ + public function tabTemplates() { + echo '<div class="panelHeader">'; + echo $this->locale_xhtml('intro_templates'); + echo '</div>'; + + // FIXME do we have a real way? + $tpllist = glob(DOKU_INC.'lib/tpl/*', GLOB_ONLYDIR); + $tpllist = array_map('basename', $tpllist); + sort($tpllist); + + /* @var helper_plugin_extension_extension $extension */ + $extension = $this->loadHelper('extension_extension'); + /* @var helper_plugin_extension_list $list */ + $list = $this->loadHelper('extension_list'); + $list->start_form(); + foreach($tpllist as $name) { + $extension->setExtension("template:$name"); + $list->add_row($extension, $extension->getID() == $this->infoFor); + } + $list->end_form(); + $list->render(); + } + + /** + * Display the search tab + */ + public function tabSearch() { + global $INPUT; + echo '<div class="panelHeader">'; + echo $this->locale_xhtml('intro_search'); + echo '</div>'; + + $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'), 'class' => 'search')); + $form->addElement(form_makeTextField('q', $INPUT->str('q'), $this->getLang('search_for'))); + $form->addElement(form_makeButton('submit', '', $this->getLang('search'))); + $form->printForm(); + + if(!$INPUT->bool('q')) return; + + /* @var helper_plugin_extension_repository $repository FIXME should we use some gloabl instance? */ + $repository = $this->loadHelper('extension_repository'); + $result = $repository->search($INPUT->str('q')); + + /* @var helper_plugin_extension_extension $extension */ + $extension = $this->loadHelper('extension_extension'); + /* @var helper_plugin_extension_list $list */ + $list = $this->loadHelper('extension_list'); + $list->start_form(); + if($result){ + foreach($result as $name) { + $extension->setExtension($name); + $list->add_row($extension, $extension->getID() == $this->infoFor); + } + } else { + $list->nothing_found(); + } + $list->end_form(); + $list->render(); + + } + + /** + * Display the template tab + */ + public function tabInstall() { + echo '<div class="panelHeader">'; + echo $this->locale_xhtml('intro_install'); + echo '</div>'; + + $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'), 'enctype' => 'multipart/form-data', 'class' => 'install')); + $form->addElement(form_makeTextField('installurl', '', $this->getLang('install_url'), '', 'block')); + $form->addElement(form_makeFileField('installfile', $this->getLang('install_upload'), '', 'block')); + $form->addElement(form_makeButton('submit', '', $this->getLang('btn_install'))); + $form->printForm(); + } + + /** + * Print the tab navigation + * + * @fixme style active one + */ + public function tabNavigation() { + echo '<ul class="tabs">'; + foreach($this->tabs as $tab) { + $url = $this->tabURL($tab); + if($this->currentTab() == $tab) { + $class = 'class="active"'; + } else { + $class = ''; + } + echo '<li '.$class.'><a href="'.$url.'">'.$this->getLang('tab_'.$tab).'</a></li>'; + } + echo '</ul>'; + } + + /** + * Return the currently selected tab + * + * @return string + */ + public function currentTab() { + global $INPUT; + + $tab = $INPUT->str('tab', 'plugins', true); + if(!in_array($tab, $this->tabs)) $tab = 'plugins'; + return $tab; + } + + /** + * Create an URL inside the extension manager + * + * @param string $tab tab to load, empty for current tab + * @param array $params associative array of parameter to set + * @param string $sep seperator to build the URL + * @param bool $absolute create absolute URLs? + * @return string + */ + public function tabURL($tab = '', $params = array(), $sep = '&', $absolute = false) { + global $ID; + global $INPUT; + + if(!$tab) $tab = $this->currentTab(); + $defaults = array( + 'do' => 'admin', + 'page' => 'extension', + 'tab' => $tab, + ); + if($tab == 'search') $defaults['q'] = $INPUT->str('q'); + + return wl($ID, array_merge($defaults, $params), $absolute, $sep); + } + +} diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php new file mode 100644 index 000000000..47edca8c1 --- /dev/null +++ b/lib/plugins/extension/helper/list.php @@ -0,0 +1,568 @@ +<?php +/** + * DokuWiki Plugin extension (Helper Component) + * + * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html + * @author Michael Hamann <michael@content-space.de> + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * Class helper_plugin_extension_list takes care of creating a HTML list of extensions + */ +class helper_plugin_extension_list extends DokuWiki_Plugin { + protected $form = ''; + /** @var helper_plugin_extension_gui */ + protected $gui; + + /** + * Constructor + * + * loads additional helpers + */ + public function __construct(){ + $this->gui = plugin_load('helper', 'extension_gui'); + } + + function start_form() { + $this->form .= '<form id="extension__list" accept-charset="utf-8" method="post" action="">'; + $hidden = array( + 'do'=>'admin', + 'page'=>'extension', + 'sectok'=>getSecurityToken() + ); + $this->add_hidden($hidden); + $this->form .= '<ul class="extensionList">'; + } + /** + * Build single row of extension table + * @param helper_plugin_extension_extension $extension The extension that shall be added + * @param bool $showinfo Show the info area + */ + function add_row(helper_plugin_extension_extension $extension, $showinfo = false) { + $this->start_row($extension); + $this->populate_column('legend', $this->make_legend($extension, $showinfo)); + $this->populate_column('actions', $this->make_actions($extension)); + $this->end_row(); + } + + /** + * Adds a header to the form + * + * @param string $id The id of the header + * @param string $header The content of the header + * @param int $level The level of the header + */ + function add_header($id, $header, $level = 2) { + $this->form .='<h'.$level.' id="'.$id.'">'.hsc($header).'</h'.$level.'>'.DOKU_LF; + } + + /** + * Adds a paragraph to the form + * + * @param string $data The content + */ + function add_p($data) { + $this->form .= '<p>'.hsc($data).'</p>'.DOKU_LF; + } + + /** + * Add hidden fields to the form with the given data + * @param array $array + */ + function add_hidden(array $array) { + $this->form .= '<div class="no">'; + foreach ($array as $key => $value) { + $this->form .= '<input type="hidden" name="'.hsc($key).'" value="'.hsc($value).'" />'; + } + $this->form .= '</div>'.DOKU_LF; + } + + /** + * Add closing tags + */ + function end_form() { + $this->form .= '</ul>'; + $this->form .= '</form>'.DOKU_LF; + } + + /** + * Show message when no results are found + */ + function nothing_found() { + global $lang; + $this->form .= '<li class="notfound">'.$lang['nothingfound'].'</li>'; + } + + /** + * Print the form + */ + function render() { + echo $this->form; + } + + /** + * Start the HTML for the row for the extension + * + * @param helper_plugin_extension_extension $extension The extension + */ + private function start_row(helper_plugin_extension_extension $extension) { + $this->form .= '<li id="extensionplugin__'.hsc($extension->getID()).'" class="'.$this->make_class($extension).'">'; + } + + /** + * Add a column with the given class and content + * @param string $class The class name + * @param string $html The content + */ + private function populate_column($class, $html) { + $this->form .= '<div class="'.$class.' col">'.$html.'</div>'.DOKU_LF; + } + + /** + * End the row + */ + private function end_row() { + $this->form .= '</li>'.DOKU_LF; + } + + /** + * Generate the link to the plugin homepage + * + * @param helper_plugin_extension_extension $extension The extension + * @return string The HTML code + */ + function make_homepagelink(helper_plugin_extension_extension $extension) { + $text = $this->getLang('homepage_link'); + $url = hsc($extension->getURL()); + return '<a href="'.$url.'" title="'.$url.'" class ="urlextern">'.$text.'</a> '; + } + + /** + * Generate the class name for the row of the extensio + * + * @param helper_plugin_extension_extension $extension The extension object + * @return string The class name + */ + function make_class(helper_plugin_extension_extension $extension) { + $class = ($extension->isTemplate()) ? 'template' : 'plugin'; + if($extension->isInstalled()) { + $class.=' installed'; + $class.= ($extension->isEnabled()) ? ' enabled':' disabled'; + } + if(!$extension->canModify()) $class.= ' notselect'; + if($extension->isProtected()) $class.= ' protected'; + //if($this->showinfo) $class.= ' showinfo'; + return $class; + } + + /** + * Generate a link to the author of the extension + * + * @param helper_plugin_extension_extension $extension The extension object + * @return string The HTML code of the link + */ + function make_author(helper_plugin_extension_extension $extension) { + global $ID; + + if($extension->getAuthor()) { + + $mailid = $extension->getEmailID(); + if($mailid){ + $url = $this->gui->tabURL('search', array('q' => 'authorid:'.$mailid)); + return '<bdi><a href="'.$url.'" class="author" title="'.$this->getLang('author_hint').'" ><img src="//www.gravatar.com/avatar/'.$mailid.'?s=20&d=mm" width="20" height="20" alt="" /> '.hsc($extension->getAuthor()).'</a></bdi>'; + + }else{ + return '<bdi><span class="author">'.hsc($extension->getAuthor()).'</span></bdi>'; + } + } + return "<em class=\"author\">".$this->getLang('unknown_author')."</em>".DOKU_LF; + } + + /** + * Get the link and image tag for the screenshot/thumbnail + * + * @param helper_plugin_extension_extension $extension The extension object + * @return string The HTML code + */ + function make_screenshot(helper_plugin_extension_extension $extension) { + $screen = $extension->getScreenshotURL(); + $thumb = $extension->getThumbnailURL(); + + if($screen) { + // use protocol independent URLs for images coming from us #595 + $screen = str_replace('http://www.dokuwiki.org', '//www.dokuwiki.org', $screen); + $thumb = str_replace('http://www.dokuwiki.org', '//www.dokuwiki.org', $thumb); + + $title = sprintf($this->getLang('screenshot'), hsc($extension->getDisplayName())); + $img = '<a href="'.hsc($screen).'" target="_blank" class="extension_screenshot">'. + '<img alt="'.$title.'" width="120" height="70" src="'.hsc($thumb).'" />'. + '</a>'; + } elseif($extension->isTemplate()) { + $img = '<img alt="" width="120" height="70" src="'.DOKU_BASE.'lib/plugins/extension/images/template.png" />'; + + } else { + $img = '<img alt="" width="120" height="70" src="'.DOKU_BASE.'lib/plugins/extension/images/plugin.png" />'; + } + return '<div class="screenshot" >'.$img.'<span></span></div>'.DOKU_LF; + } + + /** + * Extension main description + * + * @param helper_plugin_extension_extension $extension The extension object + * @param bool $showinfo Show the info section + * @return string The HTML code + */ + function make_legend(helper_plugin_extension_extension $extension, $showinfo = false) { + $return = '<div>'; + $return .= '<h2>'; + $return .= sprintf($this->getLang('extensionby'), '<bdi>'.hsc($extension->getDisplayName()).'</bdi>', $this->make_author($extension)); + $return .= '</h2>'.DOKU_LF; + + $return .= $this->make_screenshot($extension); + + $popularity = $extension->getPopularity(); + if ($popularity !== false && !$extension->isBundled()) { + $popularityText = sprintf($this->getLang('popularity'), round($popularity*100, 2)); + $return .= '<div class="popularity" title="'.$popularityText.'"><div style="width: '.($popularity * 100).'%;"><span class="a11y">'.$popularityText.'</span></div></div>'.DOKU_LF; + } + + if($extension->getDescription()) { + $return .= '<p><bdi>'; + $return .= hsc($extension->getDescription()).' '; + $return .= '</bdi></p>'.DOKU_LF; + } + + $return .= $this->make_linkbar($extension); + + if($showinfo){ + $url = $this->gui->tabURL(''); + $class = 'close'; + }else{ + $url = $this->gui->tabURL('', array('info' => $extension->getID())); + $class = ''; + } + $return .= ' <a href="'.$url.'#extensionplugin__'.$extension->getID().'" class="info '.$class.'" title="'.$this->getLang('btn_info').'" data-extid="'.$extension->getID().'">'.$this->getLang('btn_info').'</a>'; + + if ($showinfo) { + $return .= $this->make_info($extension); + } + $return .= $this->make_noticearea($extension); + $return .= '</div>'.DOKU_LF; + return $return; + } + + /** + * Generate the link bar HTML code + * + * @param helper_plugin_extension_extension $extension The extension instance + * @return string The HTML code + */ + function make_linkbar(helper_plugin_extension_extension $extension) { + $return = '<div class="linkbar">'; + $return .= $this->make_homepagelink($extension); + if ($extension->getBugtrackerURL()) { + $return .= ' <a href="'.hsc($extension->getBugtrackerURL()).'" title="'.hsc($extension->getBugtrackerURL()).'" class ="interwiki iw_dokubug">'.$this->getLang('bugs_features').'</a> '; + } + if ($extension->getTags()){ + $first = true; + $return .= '<span class="tags">'.$this->getLang('tags').' '; + foreach ($extension->getTags() as $tag) { + if (!$first){ + $return .= ', '; + } else { + $first = false; + } + $url = $this->gui->tabURL('search', array('q' => 'tag:'.$tag)); + $return .= '<bdi><a href="'.$url.'">'.hsc($tag).'</a></bdi>'; + } + $return .= '</span>'; + } + $return .= '</div>'.DOKU_LF; + return $return; + } + + /** + * Notice area + * + * @param helper_plugin_extension_extension $extension The extension + * @return string The HTML code + */ + function make_noticearea(helper_plugin_extension_extension $extension) { + $return = ''; + $missing_dependencies = $extension->getMissingDependencies(); + if(!empty($missing_dependencies)) { + $return .= '<div class="msg error">'. + sprintf($this->getLang('missing_dependency'), '<bdi>'.implode(', ', /*array_map(array($this->helper, 'make_extensionsearchlink'),*/ $missing_dependencies).'</bdi>'). + '</div>'; + } + if($extension->isInWrongFolder()) { + $return .= '<div class="msg error">'. + sprintf($this->getLang('wrong_folder'), '<bdi>'.hsc($extension->getInstallName()).'</bdi>', '<bdi>'.hsc($extension->getBase()).'</bdi>'). + '</div>'; + } + if(($securityissue = $extension->getSecurityIssue()) !== false) { + $return .= '<div class="msg error">'. + sprintf($this->getLang('security_issue'), '<bdi>'.hsc($securityissue).'</bdi>'). + '</div>'; + } + if(($securitywarning = $extension->getSecurityWarning()) !== false) { + $return .= '<div class="msg notify">'. + sprintf($this->getLang('security_warning'), '<bdi>'.hsc($securitywarning).'</bdi>'). + '</div>'; + } + if($extension->updateAvailable()) { + $return .= '<div class="msg notify">'. + sprintf($this->getLang('update_available'), hsc($extension->getLastUpdate())). + '</div>'; + } + if($extension->hasDownloadURLChanged()) { + $return .= '<div class="msg notify">'. + sprintf($this->getLang('url_change'), '<bdi>'.hsc($extension->getDownloadURL()).'</bdi>', '<bdi>'.hsc($extension->getLastDownloadURL()).'</bdi>'). + '</div>'; + } + return $return.DOKU_LF; + } + + /** + * Create a link from the given URL + * + * Shortens the URL for display + * + * @param string $url + * + * @return string HTML link + */ + function shortlink($url){ + $link = parse_url($url); + + $base = $link['host']; + if($link['port']) $base .= $base.':'.$link['port']; + $long = $link['path']; + if($link['query']) $long .= $link['query']; + + $name = shorten($base, $long, 55); + + return '<a href="'.hsc($url).'" class="urlextern">'.hsc($name).'</a>'; + } + + /** + * Plugin/template details + * + * @param helper_plugin_extension_extension $extension The extension + * @return string The HTML code + */ + function make_info(helper_plugin_extension_extension $extension) { + $default = $this->getLang('unknown'); + $return = '<dl class="details">'; + + $return .= '<dt>'.$this->getLang('status').'</dt>'; + $return .= '<dd>'.$this->make_status($extension).'</dd>'; + + if ($extension->getDonationURL()) { + $return .= '<dt>'.$this->getLang('donate').'</dt>'; + $return .= '<dd>'; + $return .= '<a href="'.$extension->getDonationURL().'" class="donate">'.$this->getLang('donate_action').'</a>'; + $return .= '</dd>'; + } + + if (!$extension->isBundled()) { + $return .= '<dt>'.$this->getLang('downloadurl').'</dt>'; + $return .= '<dd><bdi>'; + $return .= ($extension->getDownloadURL() ? $this->shortlink($extension->getDownloadURL()) : $default); + $return .= '</bdi></dd>'; + + $return .= '<dt>'.$this->getLang('repository').'</dt>'; + $return .= '<dd><bdi>'; + $return .= ($extension->getSourcerepoURL() ? $this->shortlink($extension->getSourcerepoURL()) : $default); + $return .= '</bdi></dd>'; + } + + if ($extension->isInstalled()) { + if ($extension->getInstalledVersion()) { + $return .= '<dt>'.$this->getLang('installed_version').'</dt>'; + $return .= '<dd>'; + $return .= hsc($extension->getInstalledVersion()); + $return .= '</dd>'; + } else { + $return .= '<dt>'.$this->getLang('install_date').'</dt>'; + $return .= '<dd>'; + $return .= ($extension->getUpdateDate() ? hsc($extension->getUpdateDate()) : $this->getLang('unknown')); + $return .= '</dd>'; + } + } + if (!$extension->isInstalled() || $extension->updateAvailable()) { + $return .= '<dt>'.$this->getLang('available_version').'</dt>'; + $return .= '<dd>'; + $return .= ($extension->getLastUpdate() ? hsc($extension->getLastUpdate()) : $this->getLang('unknown')); + $return .= '</dd>'; + } + + if($extension->getInstallDate()) { + $return .= '<dt>'.$this->getLang('installed').'</dt>'; + $return .= '<dd>'; + $return .= hsc($extension->getInstallDate()); + $return .= '</dd>'; + } + + $return .= '<dt>'.$this->getLang('provides').'</dt>'; + $return .= '<dd><bdi>'; + $return .= ($extension->getTypes() ? hsc(implode(', ', $extension->getTypes())) : $default); + $return .= '</bdi></dd>'; + + if(!$extension->isBundled() && $extension->getCompatibleVersions()) { + $return .= '<dt>'.$this->getLang('compatible').'</dt>'; + $return .= '<dd>'; + foreach ($extension->getCompatibleVersions() as $date => $version) { + $return .= '<bdi>'.$version['label'].' ('.$date.')</bdi>, '; + } + $return = rtrim($return, ', '); + $return .= '</dd>'; + } + if($extension->getDependencies()) { + $return .= '<dt>'.$this->getLang('depends').'</dt>'; + $return .= '<dd>'; + $return .= $this->make_linklist($extension->getDependencies()); + $return .= '</dd>'; + } + + if($extension->getSimilarExtensions()) { + $return .= '<dt>'.$this->getLang('similar').'</dt>'; + $return .= '<dd>'; + $return .= $this->make_linklist($extension->getSimilarExtensions()); + $return .= '</dd>'; + } + + if($extension->getConflicts()) { + $return .= '<dt>'.$this->getLang('conflicts').'</dt>'; + $return .= '<dd>'; + $return .= $this->make_linklist($extension->getConflicts()); + $return .= '</dd>'; + } + $return .= '</dl>'.DOKU_LF; + return $return; + } + + /** + * Generate a list of links for extensions + * + * @param array $ext The extensions + * @return string The HTML code + */ + function make_linklist($ext) { + $return = ''; + foreach ($ext as $link) { + $return .= '<bdi><a href="'.$this->gui->tabURL('search', array('q'=>'ext:'.$link)).'">'.hsc($link).'</a></bdi>, '; + } + return rtrim($return, ', '); + } + + /** + * Display the action buttons if they are possible + * + * @param helper_plugin_extension_extension $extension The extension + * @return string The HTML code + */ + function make_actions(helper_plugin_extension_extension $extension) { + $return = ''; + $errors = ''; + + if ($extension->isInstalled()) { + if (($canmod = $extension->canModify()) === true) { + if (!$extension->isProtected()) { + $return .= $this->make_action('uninstall', $extension); + } + if ($extension->getDownloadURL()) { + if ($extension->updateAvailable()) { + $return .= $this->make_action('update', $extension); + } else { + $return .= $this->make_action('reinstall', $extension); + } + } + }else{ + $errors .= '<p class="permerror">'.$this->getLang($canmod).'</p>'; + } + + if (!$extension->isProtected() && !$extension->isTemplate()) { // no enable/disable for templates + if ($extension->isEnabled()) { + $return .= $this->make_action('disable', $extension); + } else { + $return .= $this->make_action('enable', $extension); + } + } + + if ($extension->isGitControlled()){ + $errors .= '<p class="permerror">'.$this->getLang('git').'</p>'; + } + + }else{ + if (($canmod = $extension->canModify()) === true) { + if ($extension->getDownloadURL()) { + $return .= $this->make_action('install', $extension); + } + }else{ + $errors .= '<div class="permerror">'.$this->getLang($canmod).'</div>'; + } + } + + if (!$extension->isInstalled() && $extension->getDownloadURL()) { + $return .= ' <span class="version">'.$this->getLang('available_version').' '; + $return .= ($extension->getLastUpdate() ? hsc($extension->getLastUpdate()) : $this->getLang('unknown')).'</span>'; + } + + return $return.' '.$errors.DOKU_LF; + } + + /** + * Display an action button for an extension + * + * @param string $action The action + * @param helper_plugin_extension_extension $extension The extension + * @return string The HTML code + */ + function make_action($action, $extension) { + $title = ''; + + switch ($action) { + case 'install': + case 'reinstall': + $title = 'title="'.hsc($extension->getDownloadURL()).'"'; + break; + } + + $classes = 'button '.$action; + $name = 'fn['.$action.']['.hsc($extension->getID()).']'; + + return '<input class="'.$classes.'" name="'.$name.'" type="submit" value="'.$this->getLang('btn_'.$action).'" '.$title.' />'; + } + + /** + * Plugin/template status + * + * @param helper_plugin_extension_extension $extension The extension + * @return string The description of all relevant statusses + */ + function make_status(helper_plugin_extension_extension $extension) { + $status = array(); + + + if ($extension->isInstalled()) { + $status[] = $this->getLang('status_installed'); + if ($extension->isProtected()) { + $status[] = $this->getLang('status_protected'); + } else { + $status[] = $extension->isEnabled() ? $this->getLang('status_enabled') : $this->getLang('status_disabled'); + } + } else { + $status[] = $this->getLang('status_not_installed'); + } + if(!$extension->canModify()) $status[] = $this->getLang('status_unmodifiable'); + if($extension->isBundled()) $status[] = $this->getLang('status_bundled'); + $status[] = $extension->isTemplate() ? $this->getLang('status_template') : $this->getLang('status_plugin'); + return join(', ', $status); + } + +} diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php new file mode 100644 index 000000000..6ffe89eb7 --- /dev/null +++ b/lib/plugins/extension/helper/repository.php @@ -0,0 +1,191 @@ +<?php +/** + * DokuWiki Plugin extension (Helper Component) + * + * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html + * @author Michael Hamann <michael@content-space.de> + */ + +#define('EXTENSION_REPOSITORY_API', 'http://localhost/dokuwiki/lib/plugins/pluginrepo/api.php'); + +if (!defined('EXTENSION_REPOSITORY_API_ENDPOINT')) + define('EXTENSION_REPOSITORY_API', 'http://www.dokuwiki.org/lib/plugins/pluginrepo/api.php'); + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * Class helper_plugin_extension_repository provides access to the extension repository on dokuwiki.org + */ +class helper_plugin_extension_repository extends DokuWiki_Plugin { + private $loaded_extensions = array(); + private $has_access = null; + /** + * Initialize the repository (cache), fetches data for all installed plugins + */ + public function init() { + /* @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + if ($this->hasAccess()) { + $list = $plugin_controller->getList('', true); + $request_data = array('fmt' => 'php'); + $request_needed = false; + foreach ($list as $name) { + $cache = new cache('##extension_manager##'.$name, '.repo'); + $result = null; + if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) { + $this->loaded_extensions[$name] = true; + $request_data['ext'][] = $name; + $request_needed = true; + } + } + + if ($request_needed) { + $httpclient = new DokuHTTPClient(); + $data = $httpclient->post(EXTENSION_REPOSITORY_API, $request_data); + if ($data !== false) { + $extensions = unserialize($data); + foreach ($extensions as $extension) { + $cache = new cache('##extension_manager##'.$extension['plugin'], '.repo'); + $cache->storeCache(serialize($extension)); + } + } else { + $this->has_access = false; + } + } + } + } + + /** + * If repository access is available + * + * @return bool If repository access is available + */ + public function hasAccess() { + if ($this->has_access === null) { + $cache = new cache('##extension_manager###hasAccess', '.repo'); + $result = null; + if (!$cache->useCache(array('age' => 3600 * 24, 'purge'=>1))) { + $httpclient = new DokuHTTPClient(); + $httpclient->timeout = 5; + $data = $httpclient->get(EXTENSION_REPOSITORY_API.'?cmd=ping'); + if ($data !== false) { + $this->has_access = true; + $cache->storeCache(1); + } else { + $this->has_access = false; + $cache->storeCache(0); + } + } else { + $this->has_access = ($cache->retrieveCache(false) == 1); + } + } + return $this->has_access; + } + + /** + * Get the remote data of an individual plugin or template + * + * @param string $name The plugin name to get the data for, template names need to be prefix by 'template:' + * @return array The data or null if nothing was found (possibly no repository access) + */ + public function getData($name) { + $cache = new cache('##extension_manager##'.$name, '.repo'); + $result = null; + if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) { + $this->loaded_extensions[$name] = true; + $httpclient = new DokuHTTPClient(); + $data = $httpclient->get(EXTENSION_REPOSITORY_API.'?fmt=php&ext[]='.urlencode($name)); + if ($data !== false) { + $result = unserialize($data); + $cache->storeCache(serialize($result[0])); + return $result[0]; + } else { + $this->has_access = false; + } + } + if (file_exists($cache->cache)) { + return unserialize($cache->retrieveCache(false)); + } + return array(); + } + + /** + * Search for plugins or templates using the given query string + * + * @param string $q the query string + * @return array a list of matching extensions + */ + public function search($q){ + $query = $this->parse_query($q); + $query['fmt'] = 'php'; + + $httpclient = new DokuHTTPClient(); + $data = $httpclient->post(EXTENSION_REPOSITORY_API, $query); + if ($data === false) return array(); + $result = unserialize($data); + + $ids = array(); + + // store cache info for each extension + foreach($result as $ext){ + $name = $ext['plugin']; + $cache = new cache('##extension_manager##'.$name, '.repo'); + $cache->storeCache(serialize($ext)); + $ids[] = $name; + } + + return $ids; + } + + /** + * Parses special queries from the query string + * + * @param string $q + * @return array + */ + protected function parse_query($q){ + $parameters = array( + 'tag' => array(), + 'mail' => array(), + 'type' => array(), + 'ext' => array() + ); + + // extract tags + if(preg_match_all('/(^|\s)(tag:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ + foreach($matches as $m){ + $q = str_replace($m[2], '', $q); + $parameters['tag'][] = $m[3]; + } + } + // extract author ids + if(preg_match_all('/(^|\s)(authorid:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ + foreach($matches as $m){ + $q = str_replace($m[2], '', $q); + $parameters['mail'][] = $m[3]; + } + } + // extract extensions + if(preg_match_all('/(^|\s)(ext:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ + foreach($matches as $m){ + $q = str_replace($m[2], '', $q); + $parameters['ext'][] = $m[3]; + } + } + // extract types + if(preg_match_all('/(^|\s)(type:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ + foreach($matches as $m){ + $q = str_replace($m[2], '', $q); + $parameters['type'][] = $m[3]; + } + } + + // FIXME make integer from type value + + $parameters['q'] = trim($q); + return $parameters; + } +} + +// vim:ts=4:sw=4:et: diff --git a/lib/plugins/extension/images/disabled.png b/lib/plugins/extension/images/disabled.png Binary files differnew file mode 100644 index 000000000..7a0dbb3b5 --- /dev/null +++ b/lib/plugins/extension/images/disabled.png diff --git a/lib/plugins/extension/images/donate.png b/lib/plugins/extension/images/donate.png Binary files differnew file mode 100644 index 000000000..9e234da1c --- /dev/null +++ b/lib/plugins/extension/images/donate.png diff --git a/lib/plugins/extension/images/down.png b/lib/plugins/extension/images/down.png Binary files differnew file mode 100644 index 000000000..df7beda4e --- /dev/null +++ b/lib/plugins/extension/images/down.png diff --git a/lib/plugins/extension/images/enabled.png b/lib/plugins/extension/images/enabled.png Binary files differnew file mode 100644 index 000000000..7c051cda1 --- /dev/null +++ b/lib/plugins/extension/images/enabled.png diff --git a/lib/plugins/extension/images/icons.xcf b/lib/plugins/extension/images/icons.xcf Binary files differnew file mode 100644 index 000000000..ab69b3099 --- /dev/null +++ b/lib/plugins/extension/images/icons.xcf diff --git a/lib/plugins/extension/images/license.txt b/lib/plugins/extension/images/license.txt new file mode 100644 index 000000000..254b9cdf6 --- /dev/null +++ b/lib/plugins/extension/images/license.txt @@ -0,0 +1,4 @@ +enabled.png - CC-BY-ND, (c) Emey87 http://www.iconfinder.com/icondetails/65590/48/lightbulb_icon +disabled.png - CC-BY-ND, (c) Emey87 http://www.iconfinder.com/icondetails/65589/48/idea_lightbulb_off_icon +plugin.png - public domain, (c) nicubunu, http://openclipart.org/detail/15093/blue-jigsaw-piece-07-by-nicubunu +template.png - public domain, (c) mathec, http://openclipart.org/detail/166596/palette-by-mathec diff --git a/lib/plugins/extension/images/overlay.png b/lib/plugins/extension/images/overlay.png Binary files differnew file mode 100644 index 000000000..8f92c2fe7 --- /dev/null +++ b/lib/plugins/extension/images/overlay.png diff --git a/lib/plugins/extension/images/plugin.png b/lib/plugins/extension/images/plugin.png Binary files differnew file mode 100644 index 000000000..e4a2d3be6 --- /dev/null +++ b/lib/plugins/extension/images/plugin.png diff --git a/lib/plugins/extension/images/tag.png b/lib/plugins/extension/images/tag.png Binary files differnew file mode 100644 index 000000000..155dbb3dd --- /dev/null +++ b/lib/plugins/extension/images/tag.png diff --git a/lib/plugins/extension/images/template.png b/lib/plugins/extension/images/template.png Binary files differnew file mode 100644 index 000000000..ee74bc1d5 --- /dev/null +++ b/lib/plugins/extension/images/template.png diff --git a/lib/plugins/extension/images/up.png b/lib/plugins/extension/images/up.png Binary files differnew file mode 100644 index 000000000..ec9337715 --- /dev/null +++ b/lib/plugins/extension/images/up.png diff --git a/lib/plugins/extension/images/warning.png b/lib/plugins/extension/images/warning.png Binary files differnew file mode 100644 index 000000000..c5e482f84 --- /dev/null +++ b/lib/plugins/extension/images/warning.png diff --git a/lib/plugins/extension/lang/de/intro_install.txt b/lib/plugins/extension/lang/de/intro_install.txt new file mode 100644 index 000000000..4ecebe959 --- /dev/null +++ b/lib/plugins/extension/lang/de/intro_install.txt @@ -0,0 +1 @@ +Hier können Sie Plugins und Templates von Hand installieren indem Sie sie hochladen oder eine Download-URL angeben.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/de/intro_plugins.txt b/lib/plugins/extension/lang/de/intro_plugins.txt new file mode 100644 index 000000000..1a1521050 --- /dev/null +++ b/lib/plugins/extension/lang/de/intro_plugins.txt @@ -0,0 +1 @@ +Dies sind die Plugins, die bereits installiert sind. Sie können sie hier an- oder abschalten oder sie komplett deinstallieren. Außerdem werden hier Updates zu den installiereten Plugins angezeigt. Bitte lesen Sie vor einem Update die zugehörige Dokumentation.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/de/intro_search.txt b/lib/plugins/extension/lang/de/intro_search.txt new file mode 100644 index 000000000..7df8de185 --- /dev/null +++ b/lib/plugins/extension/lang/de/intro_search.txt @@ -0,0 +1 @@ +Dieser Tab gibt Ihnen Zugriff auf alle vorhandenen Plugins und Templates für DokuWiki. Bitte bedenken sie das jede installierte Erweiterung ein Sicherheitsrisiko darstellen kann. Sie sollten vor einer Installation die [[doku>security#plugin_security|Plugin Security]] Informationen lesen.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/de/intro_templates.txt b/lib/plugins/extension/lang/de/intro_templates.txt new file mode 100644 index 000000000..d71ce6237 --- /dev/null +++ b/lib/plugins/extension/lang/de/intro_templates.txt @@ -0,0 +1 @@ +Dies sind die in Ihrem Dokuwiki installierten Templates. Sie können das gewünschte Template im [[?do=admin&page=config|Konfigurations Manager]] aktivieren.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php new file mode 100644 index 000000000..f2333cc25 --- /dev/null +++ b/lib/plugins/extension/lang/de/lang.php @@ -0,0 +1,83 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author H. Richard <wanderer379@t-online.de> + * @author Joerg <scooter22@gmx.de> + */ +$lang['menu'] = 'Erweiterungen verwalten'; +$lang['tab_plugins'] = 'Installierte Plugins'; +$lang['tab_templates'] = 'Installierte Templates'; +$lang['tab_search'] = 'Suchen und Installieren'; +$lang['tab_install'] = 'Händisch installieren'; +$lang['notimplemented'] = 'Dieses Fähigkeit/Eigenschaft wurde noch nicht implementiert'; +$lang['notinstalled'] = 'Diese Erweiterung ist nicht installiert'; +$lang['alreadyenabled'] = 'Diese Erweiterung ist bereits aktiviert'; +$lang['alreadydisabled'] = 'Diese Erweiterung ist bereits deaktiviert'; +$lang['pluginlistsaveerror'] = 'Es gab einen Fehler beim Speichern der Plugin-Liste'; +$lang['unknownauthor'] = 'Unbekannter Autor'; +$lang['unknownversion'] = 'Unbekannte Version'; +$lang['btn_info'] = 'Zeige weitere Info'; +$lang['btn_update'] = 'Update'; +$lang['btn_uninstall'] = 'Deinstallation'; +$lang['btn_enable'] = 'Aktivieren'; +$lang['btn_disable'] = 'Deaktivieren'; +$lang['btn_install'] = 'Installieren'; +$lang['btn_reinstall'] = 'Neu installieren'; +$lang['js']['reallydel'] = 'Wollen Sie diese Erweiterung wirklich löschen?'; +$lang['search_for'] = 'Erweiterung suchen:'; +$lang['search'] = 'Suchen'; +$lang['extensionby'] = '<strong>%s</strong> von %s'; +$lang['screenshot'] = 'Bildschirmfoto von %s'; +$lang['popularity'] = 'Popularität: %s%%'; +$lang['homepage_link'] = 'Doku'; +$lang['bugs_features'] = 'Bugs'; +$lang['tags'] = 'Schlagworte'; +$lang['author_hint'] = 'Suche weitere Erweiterungen dieses Autors'; +$lang['installed'] = 'Installiert:'; +$lang['downloadurl'] = 'URL zum Herunterladen'; +$lang['repository'] = 'Quelle:'; +$lang['unknown'] = '<em>unbekannt</em>'; +$lang['installed_version'] = 'Installierte Version'; +$lang['install_date'] = 'Ihr letztes Update:'; +$lang['available_version'] = 'Verfügbare Version: '; +$lang['compatible'] = 'Kompatibel mit:'; +$lang['depends'] = 'Benötigt:'; +$lang['similar'] = 'Ist ähnlich zu:'; +$lang['conflicts'] = 'Nicht kompatibel mit:'; +$lang['donate'] = 'Nützlich?'; +$lang['donate_action'] = 'Spendieren Sie dem Autor einen Kaffee!'; +$lang['repo_retry'] = 'Neu versuchen'; +$lang['provides'] = 'Enthält'; +$lang['status'] = 'Status'; +$lang['status_installed'] = 'installiert'; +$lang['status_not_installed'] = 'nicht installiert'; +$lang['status_protected'] = 'geschützt'; +$lang['status_enabled'] = 'aktiviert'; +$lang['status_disabled'] = 'deaktiviert'; +$lang['status_unmodifiable'] = 'unveränderlich'; +$lang['status_plugin'] = 'Plugin'; +$lang['status_template'] = 'Template'; +$lang['status_bundled'] = 'gebündelt'; +$lang['msg_enabled'] = 'Plugin %s ist aktiviert'; +$lang['msg_disabled'] = 'Erweiterung %s ist deaktiviert'; +$lang['msg_delete_success'] = 'Erweiterung wurde entfernt'; +$lang['msg_template_install_success'] = 'Das Template %s wurde erfolgreich installiert'; +$lang['msg_template_update_success'] = 'Das Update des Templates %s war erfolgreich '; +$lang['msg_plugin_install_success'] = 'Das Plugin %s wurde erfolgreich installiert'; +$lang['msg_plugin_update_success'] = 'Das Update des Plugins %s war erfolgreich'; +$lang['msg_upload_failed'] = 'Fehler beim Hochladen der Datei'; +$lang['missing_dependency'] = '<strong>fehlende oder deaktivierte Abhängigkeit:<strong>%s'; +$lang['error_badurl'] = 'URLs sollten mit http oder https beginnen'; +$lang['error_dircreate'] = 'Temporären Ordner konnte nicht erstellt werden, um Download zu empfangen'; +$lang['error_download'] = 'Download der Datei: %s nicht möglich.'; +$lang['error_decompress'] = 'Die heruntergeladene Datei konnte nicht entpackt werden. Dies kann die Folge eines fehlerhaften Downloads sein. In diesem Fall sollten Sie versuchen den Vorgang zu wiederholen. Es kann auch die Folge eines unbekannten Kompressionsformates sein, in diesem Fall müssen Sie die Datei selber herunterladen und manuell installieren.'; +$lang['error_findfolder'] = 'Das Erweiterungs-Verzeichnis konnte nicht identifiziert werden, laden und installieren sie die Datei manuell.'; +$lang['error_copy'] = 'Beim Versuch Dateien in den Ordner <em>%s</em>: zu installieren trat ein Kopierfehler auf. Die Dateizugriffsberechtigungen könnten falsch sein. Dies kann an einem unvollständig installierten Plugin liegen und beeinträchtigt somit die Stabilität Ihre Wiki-Installation.'; +$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['install_url'] = 'Von Webadresse (URL) installieren'; +$lang['install_upload'] = 'Erweiterung hochladen:'; diff --git a/lib/plugins/extension/lang/en/intro_install.txt b/lib/plugins/extension/lang/en/intro_install.txt new file mode 100644 index 000000000..a5d5ab008 --- /dev/null +++ b/lib/plugins/extension/lang/en/intro_install.txt @@ -0,0 +1 @@ +Here you can manually install plugins and templates by either uploading them or providing a direct download URL. diff --git a/lib/plugins/extension/lang/en/intro_plugins.txt b/lib/plugins/extension/lang/en/intro_plugins.txt new file mode 100644 index 000000000..4e42efee1 --- /dev/null +++ b/lib/plugins/extension/lang/en/intro_plugins.txt @@ -0,0 +1 @@ +These are the plugins currently installed in your DokuWiki. You can enable or disable or even completely uninstall them here. Plugin updates are shown here as well, be sure to read the plugin's documentation before updating.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/en/intro_search.txt b/lib/plugins/extension/lang/en/intro_search.txt new file mode 100644 index 000000000..244cd6812 --- /dev/null +++ b/lib/plugins/extension/lang/en/intro_search.txt @@ -0,0 +1 @@ +This tab gives you access to all available 3rd party plugins and templates for DokuWiki. Please be aware that installing 3rd party code may pose a **security risk**, you may want to read about [[doku>security#plugin_security|plugin security]] first.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/en/intro_templates.txt b/lib/plugins/extension/lang/en/intro_templates.txt new file mode 100644 index 000000000..012a74995 --- /dev/null +++ b/lib/plugins/extension/lang/en/intro_templates.txt @@ -0,0 +1 @@ +These are the templates currently installed in your DokuWiki. You can select the template to be used in the [[?do=admin&page=config|Configuration Manager]]. diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php new file mode 100644 index 000000000..5224f694a --- /dev/null +++ b/lib/plugins/extension/lang/en/lang.php @@ -0,0 +1,99 @@ +<?php +/** + * English language file for extension plugin + * + * @author Michael Hamann <michael@content-space.de> + * @author Christopher Smith <chris@jalakai.co.uk> + */ + +$lang['menu'] = 'Extension Manager'; + +$lang['tab_plugins'] = 'Installed Plugins'; +$lang['tab_templates'] = 'Installed Templates'; +$lang['tab_search'] = 'Search and Install'; +$lang['tab_install'] = 'Manual Install'; + +$lang['notimplemented'] = 'This feature hasn\'t been implemented yet'; +$lang['notinstalled'] = 'This extension is not installed'; +$lang['alreadyenabled'] = 'This extension has already been enabled'; +$lang['alreadydisabled'] = 'This extension has already been disabled'; +$lang['pluginlistsaveerror'] = 'There was an error saving the plugin list'; +$lang['unknownauthor'] = 'Unknown author'; +$lang['unknownversion'] = 'Unknown version'; + +$lang['btn_info'] = 'Show more info'; +$lang['btn_update'] = 'Update'; +$lang['btn_uninstall'] = 'Uninstall'; +$lang['btn_enable'] = 'Enable'; +$lang['btn_disable'] = 'Disable'; +$lang['btn_install'] = 'Install'; +$lang['btn_reinstall'] = 'Re-install'; + +$lang['js']['reallydel'] = 'Really uninstall this extension?'; + +$lang['search_for'] = 'Search Extension:'; +$lang['search'] = 'Search'; + +$lang['extensionby'] = '<strong>%s</strong> by %s'; +$lang['screenshot'] = 'Screenshot of %s'; +$lang['popularity'] = 'Popularity: %s%%'; +$lang['homepage_link'] = 'Docs'; +$lang['bugs_features'] = 'Bugs'; +$lang['tags'] = 'Tags:'; +$lang['author_hint'] = 'Search extensions by this author'; +$lang['installed'] = 'Installed:'; +$lang['downloadurl'] = 'Download URL:'; +$lang['repository'] = 'Repository:'; +$lang['unknown'] = '<em>unknown</em>'; +$lang['installed_version'] = 'Installed version:'; +$lang['install_date'] = 'Your last update:'; +$lang['available_version'] = 'Available version:'; +$lang['compatible'] = 'Compatible with:'; +$lang['depends'] = 'Depends on:'; +$lang['similar'] = 'Similar to:'; +$lang['conflicts'] = 'Conflicts with:'; +$lang['donate'] = 'Like this?'; +$lang['donate_action'] = 'Buy the author a coffee!'; +$lang['repo_retry'] = 'Retry'; +$lang['provides'] = 'Provides:'; +$lang['status'] = 'Status:'; +$lang['status_installed'] = 'installed'; +$lang['status_not_installed'] = 'not installed'; +$lang['status_protected'] = 'protected'; +$lang['status_enabled'] = 'enabled'; +$lang['status_disabled'] = 'disabled'; +$lang['status_unmodifiable'] = 'unmodifiable'; +$lang['status_plugin'] = 'plugin'; +$lang['status_template'] = 'template'; +$lang['status_bundled'] = 'bundled'; + +$lang['msg_enabled'] = 'Plugin %s enabled'; +$lang['msg_disabled'] = 'Plugin %s disabled'; +$lang['msg_delete_success'] = 'Extension uninstalled'; +$lang['msg_template_install_success'] = 'Template %s installed successfully'; +$lang['msg_template_update_success'] = 'Template %s updated successfully'; +$lang['msg_plugin_install_success'] = 'Plugin %s installed successfully'; +$lang['msg_plugin_update_success'] = 'Plugin %s updated successfully'; +$lang['msg_upload_failed'] = 'Uploading the file failed'; + +$lang['missing_dependency'] = '<strong>Missing or disabled dependency:</strong> %s'; +$lang['security_issue'] = '<strong>Security Issue:</strong> %s'; +$lang['security_warning'] = '<strong>Security Warning:</strong> %s'; +$lang['update_available'] = '<strong>Update:</strong> New version %s is available.'; +$lang['wrong_folder'] = '<strong>Plugin installed incorrectly:</strong> Rename plugin directory "%s" to "%s".'; +$lang['url_change'] = '<strong>URL changed:</strong> Download URL has changed since last download. Check if the new URL is valid before updating the extension.<br />New: %s<br />Old: %s'; + +$lang['error_badurl'] = 'URLs should start with http or https'; +$lang['error_dircreate'] = 'Unable to create temporary folder to receive download'; +$lang['error_download'] = 'Unable to download the file: %s'; +$lang['error_decompress'] = 'Unable to decompress the downloaded file. This maybe as a result of a bad download, in which case you should try again; or the compression format may be unknown, in which case you will need to download and install manually.'; +$lang['error_findfolder'] = 'Unable to identify extension directory, you need to download and install manually'; +$lang['error_copy'] = 'There was a file copy error while attempting to install files for directory <em>%s</em>: the disk could be full or file access permissions may be incorrect. This may have resulted in a partially installed plugin and leave your wiki installation unstable'; + +$lang['noperms'] = 'Extension directory is not writable'; +$lang['notplperms'] = 'Template directory is not writable'; +$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 diff --git a/lib/plugins/extension/lang/eo/intro_install.txt b/lib/plugins/extension/lang/eo/intro_install.txt new file mode 100644 index 000000000..d9c63da1d --- /dev/null +++ b/lib/plugins/extension/lang/eo/intro_install.txt @@ -0,0 +1 @@ +Tie vi povas permane instali kromaĵojn kaj ŝablonojn tra alŝuto aŭ indiko de URL por rekta elŝuto.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/eo/intro_plugins.txt b/lib/plugins/extension/lang/eo/intro_plugins.txt new file mode 100644 index 000000000..cc7ae6628 --- /dev/null +++ b/lib/plugins/extension/lang/eo/intro_plugins.txt @@ -0,0 +1 @@ +Jenaj kromaĵoj momente estas instalitaj en via DokuWiki. Vi povas ebligi, malebligi aŭ eĉ tute malinstali ilin tie. Ankaŭ montriĝos aktualigoj de kromaĵoj -- certiĝu, ke vi legis la dokumentadon de la kromaĵo antaŭ aktualigo.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/eo/intro_search.txt b/lib/plugins/extension/lang/eo/intro_search.txt new file mode 100644 index 000000000..5d194948c --- /dev/null +++ b/lib/plugins/extension/lang/eo/intro_search.txt @@ -0,0 +1 @@ +Tiu tabelo donas aliron al ĉiuj haveblaj eksteraj kromaĵoj kaj ŝablonoj por DokuWiki. Bonvolu konscii, ke instali eksteran kodaĵon povas enkonduki **sekurecriskon**, prefere legu antaŭe pri [[doku>security#plugin_security|sekureco de kromaĵo]].
\ No newline at end of file diff --git a/lib/plugins/extension/lang/eo/intro_templates.txt b/lib/plugins/extension/lang/eo/intro_templates.txt new file mode 100644 index 000000000..6dc0ef671 --- /dev/null +++ b/lib/plugins/extension/lang/eo/intro_templates.txt @@ -0,0 +1 @@ +Jenaj ŝablonoj momente instaliĝis en via DokuWiki. Elektu la ŝablonon por uzi en la [[?do=admin&page=config|Opcia administrilo]].
\ No newline at end of file diff --git a/lib/plugins/extension/lang/eo/lang.php b/lib/plugins/extension/lang/eo/lang.php new file mode 100644 index 000000000..6ce840be8 --- /dev/null +++ b/lib/plugins/extension/lang/eo/lang.php @@ -0,0 +1,87 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Robert Bogenschneider <bogi@uea.org> + */ +$lang['menu'] = 'Aldonaĵa administrado'; +$lang['tab_plugins'] = 'Instalitaj kromaĵoj'; +$lang['tab_templates'] = 'Instalitaj ŝablonoj'; +$lang['tab_search'] = 'Serĉi kaj instali'; +$lang['tab_install'] = 'Permana instalado'; +$lang['notimplemented'] = 'Tiu funkcio ankoraŭ ne realiĝis'; +$lang['notinstalled'] = 'Tiu aldonaĵo ne estas instalita'; +$lang['alreadyenabled'] = 'Tiu aldonaĵo jam ebliĝis'; +$lang['alreadydisabled'] = 'Tiu aldonaĵo jam malebliĝis'; +$lang['pluginlistsaveerror'] = 'Okazis eraro dum la kromaĵlisto konserviĝis'; +$lang['unknownauthor'] = 'Nekonata aŭtoro'; +$lang['unknownversion'] = 'Nekonata versio'; +$lang['btn_info'] = 'Montri pliajn informojn'; +$lang['btn_update'] = 'Aktualigi'; +$lang['btn_uninstall'] = 'Malinstali'; +$lang['btn_enable'] = 'Ebligi'; +$lang['btn_disable'] = 'Malebligi'; +$lang['btn_install'] = 'Instali'; +$lang['btn_reinstall'] = 'Re-instali'; +$lang['js']['reallydel'] = 'Ĉu vere malinstali la aldonaĵon?'; +$lang['search_for'] = 'Serĉi la aldonaĵon:'; +$lang['search'] = 'Serĉi'; +$lang['extensionby'] = '<strong>%s</strong> fare de %s'; +$lang['screenshot'] = 'Ekrankopio de %s'; +$lang['popularity'] = 'Populareco: %s%%'; +$lang['homepage_link'] = 'Dokumentoj'; +$lang['bugs_features'] = 'Cimoj'; +$lang['tags'] = 'Etikedoj:'; +$lang['author_hint'] = 'Serĉi aldonaĵojn laŭ tiu aŭtoro:'; +$lang['installed'] = 'Instalitaj:'; +$lang['downloadurl'] = 'URL por elŝuti:'; +$lang['repository'] = 'Kodbranĉo:'; +$lang['unknown'] = '<em>nekonata</em>'; +$lang['installed_version'] = 'Instalita versio:'; +$lang['install_date'] = 'Via lasta aktualigo:'; +$lang['available_version'] = 'Havebla versio:'; +$lang['compatible'] = 'Kompatibla kun:'; +$lang['depends'] = 'Dependas de:'; +$lang['similar'] = 'Simila al:'; +$lang['conflicts'] = 'Konfliktas kun:'; +$lang['donate'] = 'Ĉu vi ŝatas tion?'; +$lang['donate_action'] = 'Aĉetu kafon al la aŭtoro!'; +$lang['repo_retry'] = 'Reprovi'; +$lang['provides'] = 'Provizas per:'; +$lang['status'] = 'Statuso:'; +$lang['status_installed'] = 'instalita'; +$lang['status_not_installed'] = 'ne instalita'; +$lang['status_protected'] = 'protektita'; +$lang['status_enabled'] = 'ebligita'; +$lang['status_disabled'] = 'malebligita'; +$lang['status_unmodifiable'] = 'neŝanĝebla'; +$lang['status_plugin'] = 'kromaĵo'; +$lang['status_template'] = 'ŝablono'; +$lang['status_bundled'] = 'kunliverita'; +$lang['msg_enabled'] = 'Kromaĵo %s ebligita'; +$lang['msg_disabled'] = 'Kromaĵo %s malebligita'; +$lang['msg_delete_success'] = 'Aldonaĵo malinstaliĝis'; +$lang['msg_template_install_success'] = 'Ŝablono %s sukcese instaliĝis'; +$lang['msg_template_update_success'] = 'Ŝablono %s sukcese aktualiĝis'; +$lang['msg_plugin_install_success'] = 'Kromaĵo %s sukcese instaliĝis'; +$lang['msg_plugin_update_success'] = 'Kromaĵo %s sukcese aktualiĝis'; +$lang['msg_upload_failed'] = 'Ne eblis alŝuti la dosieron'; +$lang['missing_dependency'] = '<strong>Mankanta aŭ malebligita dependeco:</strong> %s'; +$lang['security_issue'] = '<strong>Sekureca problemo:</strong> %s'; +$lang['security_warning'] = '<strong>Sekureca averto:</strong> %s'; +$lang['update_available'] = '<strong>Aktualigo:</strong> Nova versio %s haveblas.'; +$lang['wrong_folder'] = '<strong>Kromaĵo instalita malĝuste:</strong> Renomu la kromaĵdosierujon "%s" al "%s".'; +$lang['url_change'] = '<strong>URL ŝanĝita:</strong> La elŝuta URL ŝanĝiĝis ekde la lasta elŝuto. Kontrolu, ĉu la nova URL validas antaŭ aktualigi aldonaĵon.<br />Nova: %s<br />Malnova: %s'; +$lang['error_badurl'] = 'URLoj komenciĝu per http aŭ https'; +$lang['error_dircreate'] = 'Ne eblis krei portempan dosierujon por akcepti la elŝuton'; +$lang['error_download'] = 'Ne eblis elŝuti la dosieron: %s'; +$lang['error_decompress'] = 'Ne eblis malpaki la elŝutitan dosieron. Kialo povus esti fuŝa elŝuto, kaj vi reprovu; aŭ la pakiga formato estas nekonata, kaj vi devas elŝuti kaj instali permane.'; +$lang['error_findfolder'] = 'Ne eblis rekoni la aldonaĵ-dosierujon, vi devas elŝuti kaj instali permane'; +$lang['error_copy'] = 'Okazis kopiad-eraro dum la provo instali dosierojn por la dosierujo <em>%s</em>: la disko povus esti plena aŭ la alirpermesoj por dosieroj malĝustaj. Rezulto eble estas nur parte instalita kromaĵo, kiu malstabiligas vian vikion'; +$lang['noperms'] = 'La aldonaĵ-dosierujo ne estas skribebla'; +$lang['notplperms'] = 'La ŝablon-dosierujo ne estas skribebla'; +$lang['nopluginperms'] = 'La kromaĵ-dosierujo ne estas skribebla'; +$lang['git'] = 'Tiu aldonaĵo estis instalita pere de git, eble vi ne aktualigu ĝin ĉi tie.'; +$lang['install_url'] = 'Instali de URL:'; +$lang['install_upload'] = 'Alŝuti aldonaĵon:'; diff --git a/lib/plugins/extension/lang/fr/intro_install.txt b/lib/plugins/extension/lang/fr/intro_install.txt new file mode 100644 index 000000000..6f68a2606 --- /dev/null +++ b/lib/plugins/extension/lang/fr/intro_install.txt @@ -0,0 +1 @@ +Ici, vous pouvez installer des extensions, greffons et modèles. Soit en les téléversant, soit en indiquant un URL de téléchargement.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/fr/intro_plugins.txt b/lib/plugins/extension/lang/fr/intro_plugins.txt new file mode 100644 index 000000000..a40b863d2 --- /dev/null +++ b/lib/plugins/extension/lang/fr/intro_plugins.txt @@ -0,0 +1 @@ +Voilà la liste des extensions actuellement installées. À partir d'ici, vous pouvez les activer, les désactiver ou même les désinstaller complètement. Cette page affiche également les mises à jour. Assurez vous de lire la documentation avant de faire la mise à jour.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/fr/intro_search.txt b/lib/plugins/extension/lang/fr/intro_search.txt new file mode 100644 index 000000000..418e35972 --- /dev/null +++ b/lib/plugins/extension/lang/fr/intro_search.txt @@ -0,0 +1 @@ +Cet onglet vous donne accès à toutes les extensions de tierces parties. Restez conscients qu'installer du code de tierce partie peut poser un problème de **sécurité**. Vous voudrez peut-être au préalable lire l'article sur la [[doku>fr:security##securite_des_plugins|sécurité des plugins]].
\ No newline at end of file diff --git a/lib/plugins/extension/lang/fr/intro_templates.txt b/lib/plugins/extension/lang/fr/intro_templates.txt new file mode 100644 index 000000000..fefdb5538 --- /dev/null +++ b/lib/plugins/extension/lang/fr/intro_templates.txt @@ -0,0 +1 @@ +Voici la liste des modèles actuellement installés. Le [[?do=admin&page=config|gestionnaire de configuration]] vous permet de choisir le modèle à utiliser.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/fr/lang.php b/lib/plugins/extension/lang/fr/lang.php new file mode 100644 index 000000000..c2dae0fc9 --- /dev/null +++ b/lib/plugins/extension/lang/fr/lang.php @@ -0,0 +1,87 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Schplurtz le Déboulonné <schplurtz@laposte.net> + */ +$lang['menu'] = 'Gestionnaire d\'extension'; +$lang['tab_plugins'] = 'Greffons installés'; +$lang['tab_templates'] = 'Modèles installés'; +$lang['tab_search'] = 'Rechercher et installer'; +$lang['tab_install'] = 'Installation manuelle'; +$lang['notimplemented'] = 'Cette fonctionnalité n\'est pas encore installée'; +$lang['notinstalled'] = 'Cette extension n\'est pas installée'; +$lang['alreadyenabled'] = 'Cette extension a déjà été installée'; +$lang['alreadydisabled'] = 'Cette extension a déjà été désactivée'; +$lang['pluginlistsaveerror'] = 'Une erreur s\'est produite lors de l\'enregistrement de la liste des greffons.'; +$lang['unknownauthor'] = 'Auteur inconnu'; +$lang['unknownversion'] = 'Version inconnue'; +$lang['btn_info'] = 'Montrer plus d\'informations'; +$lang['btn_update'] = 'Mettre à jour'; +$lang['btn_uninstall'] = 'Désinstaller'; +$lang['btn_enable'] = 'Activer'; +$lang['btn_disable'] = 'Désactiver'; +$lang['btn_install'] = 'Installer'; +$lang['btn_reinstall'] = 'Réinstaller'; +$lang['js']['reallydel'] = 'Vraiment désinstaller cette extension'; +$lang['search_for'] = 'Rechercher l\'extension :'; +$lang['search'] = 'Chercher'; +$lang['extensionby'] = '<strong>%s</strong> de %s'; +$lang['screenshot'] = 'Aperçu de %s'; +$lang['popularity'] = 'Popularité : %s%%'; +$lang['homepage_link'] = 'Documents'; +$lang['bugs_features'] = 'Bugs'; +$lang['tags'] = 'Étiquettes :'; +$lang['author_hint'] = 'Chercher les extensions de cet auteur'; +$lang['installed'] = 'Installés :'; +$lang['downloadurl'] = 'URL de téléchargement :'; +$lang['repository'] = 'Entrepôt : '; +$lang['unknown'] = '<em>inconnu</em>'; +$lang['installed_version'] = 'Version installée :'; +$lang['install_date'] = 'Votre dernière mise à jour :'; +$lang['available_version'] = 'Version disponible :'; +$lang['compatible'] = 'Compatible avec :'; +$lang['depends'] = 'Dépend de :'; +$lang['similar'] = 'Similaire à :'; +$lang['conflicts'] = 'En conflit avec :'; +$lang['donate'] = 'Vous aimez ?'; +$lang['donate_action'] = 'Payer un café à l\'auteur !'; +$lang['repo_retry'] = 'Réessayer'; +$lang['provides'] = 'Fournit :'; +$lang['status'] = 'État :'; +$lang['status_installed'] = 'installé'; +$lang['status_not_installed'] = 'non installé'; +$lang['status_protected'] = 'protégé'; +$lang['status_enabled'] = 'activé'; +$lang['status_disabled'] = 'désactivé'; +$lang['status_unmodifiable'] = 'non modifiable'; +$lang['status_plugin'] = 'greffon'; +$lang['status_template'] = 'modèle'; +$lang['status_bundled'] = 'fourni'; +$lang['msg_enabled'] = 'Greffon %s activé'; +$lang['msg_disabled'] = 'Greffon %s désactivé'; +$lang['msg_delete_success'] = 'Extension désinstallée'; +$lang['msg_template_install_success'] = 'Modèle %s installée avec succès'; +$lang['msg_template_update_success'] = 'Modèle %s mis à jour avec succès'; +$lang['msg_plugin_install_success'] = 'Greffon %s installé avec succès'; +$lang['msg_plugin_update_success'] = 'Greffon %s mis à jour avec succès'; +$lang['msg_upload_failed'] = 'Téléversement échoué'; +$lang['missing_dependency'] = '<strong>Dépendance absente ou désactivée :</strong> %s'; +$lang['security_issue'] = '<strong>Problème de sécurité :</strong> %s'; +$lang['security_warning'] = '<strong>Avertissement deSécurité :</strong> %s'; +$lang['update_available'] = '<strong>Mise à jour :</strong> La version %s est disponible.'; +$lang['wrong_folder'] = '<strong>Greffon installé incorrectement :</strong> Renomer le dossier du greffon "%s" en "%s".'; +$lang['url_change'] = '<strong>URL modifié :</strong> L\'URL de téléchargement a changé depuis le dernier téléchargement. Vérifiez si l\'URL est valide avant de mettre à jour l\'extension.<br />Nouvel URL : %s<br />Ancien : %s'; +$lang['error_badurl'] = 'Les URL doivent commencer par http ou https'; +$lang['error_dircreate'] = 'Impossible de créer le dossier temporaire pour le téléchargement.'; +$lang['error_download'] = 'Impossible de télécharger le fichier : %s'; +$lang['error_decompress'] = 'Impossible de décompresser le fichier téléchargé. C\'est peut être le résultat d\'une erreur de téléchargement, auquel cas vous devriez réessayer. Le format de compression est peut-être inconnu. Dans ce cas il vous faudra procéder à une installation manuelle.'; +$lang['error_findfolder'] = 'Impossible d\'idnetifier le dossier de l\'extension. vous devez procéder à une installation manuelle.'; +$lang['error_copy'] = 'Une erreur de copie de fichier s\'est produite lors de l\'installation des fichiers dans le dossier <em>%s</em>. Il se peut que le disque soit plein, ou que les permissions d\'accès aux fichiers soient incorrectes. Il est possible que le greffon soit partiellement installé et que cela laisse votre installation de DoluWiki instable.'; +$lang['noperms'] = 'Impossible d\'écrire dans le dossier des extensions.'; +$lang['notplperms'] = 'Impossible d\'écrire dans le dossier des modèles.'; +$lang['nopluginperms'] = 'Impossible d\'écrire dans le dossier des greffons.'; +$lang['git'] = 'Cette extension a été installé via git, vous voudrez peut-être ne pas la mettre à jour ici.'; +$lang['install_url'] = 'Installez depuis l\'URL :'; +$lang['install_upload'] = 'Téléversez l\'extension :'; diff --git a/lib/plugins/extension/lang/ja/intro_install.txt b/lib/plugins/extension/lang/ja/intro_install.txt new file mode 100644 index 000000000..889ed6879 --- /dev/null +++ b/lib/plugins/extension/lang/ja/intro_install.txt @@ -0,0 +1 @@ +ここでは、アップロードするかダウンロードURLを指定して、手動でプラグインやテンプレートをインストールできます。 diff --git a/lib/plugins/extension/lang/ja/intro_plugins.txt b/lib/plugins/extension/lang/ja/intro_plugins.txt new file mode 100644 index 000000000..9bfc68431 --- /dev/null +++ b/lib/plugins/extension/lang/ja/intro_plugins.txt @@ -0,0 +1 @@ +このDokuWikiに現在インストールされているプラグインです。ここでは、これらプラグインを有効化、無効化、アンインストールすることができます。同様にプラグインのアップデートも表示されます。アップデート前に、プラグインのマニュアルをお読みください。
\ No newline at end of file diff --git a/lib/plugins/extension/lang/ja/intro_search.txt b/lib/plugins/extension/lang/ja/intro_search.txt new file mode 100644 index 000000000..66d977b1b --- /dev/null +++ b/lib/plugins/extension/lang/ja/intro_search.txt @@ -0,0 +1 @@ +このタブでは、DokuWiki用の利用可能なすべてのサードパーティのプラグインとテンプレートにアクセスできます。サードパーティ製のコードには、**セキュリティ上のリスク**の可能性があることに注意してください、最初に[[doku>ja:security#プラグインのセキュリティ|プラグインのセキュリティ]]を読むことをお勧めします。
\ No newline at end of file diff --git a/lib/plugins/extension/lang/ja/intro_templates.txt b/lib/plugins/extension/lang/ja/intro_templates.txt new file mode 100644 index 000000000..f97694aaa --- /dev/null +++ b/lib/plugins/extension/lang/ja/intro_templates.txt @@ -0,0 +1 @@ +このDokuWikiに現在インストールされているテンプレートです。[[?do=admin&page=config|設定管理]]で使用するテンプレートを選択できます。
\ No newline at end of file diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php new file mode 100644 index 000000000..0401d7630 --- /dev/null +++ b/lib/plugins/extension/lang/ja/lang.php @@ -0,0 +1,54 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Hideaki SAWADA <chuno@live.jp> + */ +$lang['menu'] = '拡張機能管理'; +$lang['tab_plugins'] = 'インストール済プラグイン'; +$lang['tab_templates'] = 'インストール済テンプレート'; +$lang['tab_install'] = '手動インストール'; +$lang['notimplemented'] = 'この機能は未実装です。'; +$lang['notinstalled'] = 'この拡張機能はインストールされていません。'; +$lang['alreadyenabled'] = 'この拡張機能は有効です。'; +$lang['alreadydisabled'] = 'この拡張機能は無効です。'; +$lang['pluginlistsaveerror'] = 'プラグイン一覧の保存中にエラーが発生しました。'; +$lang['unknownauthor'] = '作者不明'; +$lang['unknownversion'] = 'バージョン不明'; +$lang['btn_info'] = '詳細情報を表示する。'; +$lang['btn_update'] = 'アップデート'; +$lang['btn_uninstall'] = 'アンインストール'; +$lang['btn_enable'] = '有効化'; +$lang['btn_disable'] = '無効化'; +$lang['btn_install'] = 'インストール'; +$lang['btn_reinstall'] = '再インストール'; +$lang['js']['reallydel'] = 'この拡張機能を本当にアンインストールしますか?'; +$lang['downloadurl'] = 'ダウンロード URL:'; +$lang['repository'] = 'リポジトリ:'; +$lang['depends'] = '依存:'; +$lang['similar'] = '類似:'; +$lang['status_installed'] = 'インストール済'; +$lang['status_not_installed'] = '未インストール'; +$lang['status_enabled'] = '有効'; +$lang['status_disabled'] = '無効'; +$lang['status_plugin'] = 'プラグイン'; +$lang['status_template'] = 'テンプレート'; +$lang['status_bundled'] = '同梱'; +$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_plugin_install_success'] = '%s プラグインをインストールできました。'; +$lang['msg_plugin_update_success'] = '%s プラグインをアップデートできました。'; +$lang['msg_upload_failed'] = 'ファイルのアップロードに失敗しました。'; +$lang['security_issue'] = '<strong>セキュリティ問題:</strong> %s'; +$lang['security_warning'] = '<strong>セキュリティ警告:</strong> %s'; +$lang['update_available'] = '<strong>アップデート:</strong>%sの新バージョンが利用可能です。 '; +$lang['error_badurl'] = 'URLはhttpかhttpsで始まる必要があります。'; +$lang['error_dircreate'] = 'ダウンロード用の一時フォルダが作成できません。'; +$lang['error_download'] = 'ファイルをダウンロードできません:%s'; +$lang['noperms'] = '拡張機能ディレクトリが書き込み不可です。'; +$lang['notplperms'] = 'テンプレートディレクトリが書き込み不可です。'; +$lang['nopluginperms'] = 'プラグインディレクトリが書き込み不可です。'; diff --git a/lib/plugins/extension/lang/nl/intro_install.txt b/lib/plugins/extension/lang/nl/intro_install.txt new file mode 100644 index 000000000..6a0b41055 --- /dev/null +++ b/lib/plugins/extension/lang/nl/intro_install.txt @@ -0,0 +1 @@ +Hier kunt u handmatig plugins en templates installeren door deze te uploaden of door een directe download URL op te geven.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/nl/intro_plugins.txt b/lib/plugins/extension/lang/nl/intro_plugins.txt new file mode 100644 index 000000000..0077aca30 --- /dev/null +++ b/lib/plugins/extension/lang/nl/intro_plugins.txt @@ -0,0 +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 diff --git a/lib/plugins/extension/lang/nl/intro_search.txt b/lib/plugins/extension/lang/nl/intro_search.txt new file mode 100644 index 000000000..8fc3900ad --- /dev/null +++ b/lib/plugins/extension/lang/nl/intro_search.txt @@ -0,0 +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 diff --git a/lib/plugins/extension/lang/nl/intro_templates.txt b/lib/plugins/extension/lang/nl/intro_templates.txt new file mode 100644 index 000000000..5ef23dadf --- /dev/null +++ b/lib/plugins/extension/lang/nl/intro_templates.txt @@ -0,0 +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 diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php new file mode 100644 index 000000000..783168c2e --- /dev/null +++ b/lib/plugins/extension/lang/nl/lang.php @@ -0,0 +1,87 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Rene <wllywlnt@yahoo.com> + */ +$lang['menu'] = 'Extension Manager (Uitbreidings Beheerder)'; +$lang['tab_plugins'] = 'Geïnstalleerde Plugins'; +$lang['tab_templates'] = 'Geïnstalleerde Templates'; +$lang['tab_search'] = 'Zoek en installeer'; +$lang['tab_install'] = 'Handmatige installatie'; +$lang['notimplemented'] = 'Deze toepassing is nog niet geïnstalleerd'; +$lang['notinstalled'] = 'Deze uitbreiding is nog niet geïnstalleerd'; +$lang['alreadyenabled'] = 'Deze uitbreiding is reeds ingeschakeld'; +$lang['alreadydisabled'] = 'Deze uitbreiding is reeds uitgeschakeld'; +$lang['pluginlistsaveerror'] = 'Fout bij het opslaan van de plugin lijst'; +$lang['unknownauthor'] = 'Onbekende auteur'; +$lang['unknownversion'] = 'Onbekende versie'; +$lang['btn_info'] = 'Toon meer informatie'; +$lang['btn_update'] = 'Update'; +$lang['btn_uninstall'] = 'Deinstalleer'; +$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['search_for'] = 'Zoek Uitbreiding:'; +$lang['search'] = 'Zoek'; +$lang['extensionby'] = '<strong>%s</strong> by %s'; +$lang['screenshot'] = 'Schermafdruk bij %s'; +$lang['popularity'] = 'Populariteit:%s%%'; +$lang['homepage_link'] = 'Dokumenten'; +$lang['msg_delete_success'] = 'Uitbreiding gedeinstalleerd'; +$lang['msg_template_install_success'] = 'Template %s werd succesvol geïnstalleerd'; +$lang['msg_template_update_success'] = 'Template %s werd succesvol ge-update'; +$lang['msg_plugin_install_success'] = 'Plugin %s werd succesvol geïnstalleerd'; +$lang['msg_plugin_update_success'] = 'Plugin %s werd succesvol ge-update'; +$lang['msg_upload_failed'] = 'Uploaden van het bestand is mislukt'; +$lang['missing_dependency'] = '<strong>niet aanwezige of uitgeschakelde afhankelijkheid</strong> %s'; +$lang['security_issue'] = '<strong>Veiligheids kwestie:</strong> %s'; +$lang['security_warning'] = '<strong>Veiligheids Waarschuwing</strong> %s'; +$lang['update_available'] = '<strong>Update:</strong> Nieuwe versie %s is beschikbaar.'; +$lang['wrong_folder'] = '<strong>Plugin onjuist geïnstalleerd:</strong> Hernoem de plugin directory van "%s" naar"%s"'; +$lang['url_change'] = '<strong>URL gewijzigd:</strong> Download URL is gewijzigd sinds de laatste download. Controleer of de nieuwe URL juist is voordat u de uitbreiding update. <br />Nieuw:%s<Br /> Vorig: %s'; +$lang['error_badurl'] = 'URLs moeten beginnen met http of https'; +$lang['error_dircreate'] = 'De tijdelijke map kon niet worden gemaakt om de download te ontvangen'; +$lang['error_download'] = 'Het is niet mogelijk het bestand te downloaden: %s'; +$lang['error_decompress'] = 'Onmogelijk om het gedownloade bestand uit te pakken. Dit is wellicht het gevolg van een onvolledige/onjuiste download, in welk geval u het nog eens moet proberen; of het compressie formaat is onbekend in welk geval u het bestand handmatig moet downloaden en installeren.'; +$lang['error_findfolder'] = 'Onmogelijk om de uitbreidings directory te vinden, u moet het zelf downloaden en installeren'; +$lang['error_copy'] = 'Er was een bestand kopieer fout tijdens het installeren van bestanden in directory <em>%s</em>: de schijf kan vol zijn of de bestand toegangs rechten kunnen onjuist zijn. Dit kan tot gevolg hebben dat de plugin slechts gedeeltelijk werd geïnstalleerd waardoor uw wiki installatie onstabiel is '; +$lang['noperms'] = 'Uitbreidings directory is niet schrijfbaar'; +$lang['notplperms'] = 'Template directory is niet schrijfbaar'; +$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['bugs_features'] = 'Bugs'; +$lang['tags'] = 'Tags:'; +$lang['author_hint'] = 'Zoek uitbreidingen van deze auteur:'; +$lang['installed'] = 'Geinstalleerd:'; +$lang['downloadurl'] = 'Download URL:'; +$lang['repository'] = 'Repository ( centrale opslag)'; +$lang['unknown'] = '<em>onbekend</em>'; +$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['donate_action'] = 'Koop een kop koffie voor de auteur!'; +$lang['repo_retry'] = 'Herhaal'; +$lang['provides'] = 'Zorgt voor:'; +$lang['status'] = 'Status:'; +$lang['status_installed'] = 'Geïnstalleerd'; +$lang['status_not_installed'] = 'niet geïnstalleerd '; +$lang['status_protected'] = 'beschermd'; +$lang['status_enabled'] = 'ingeschakeld'; +$lang['status_disabled'] = 'uitgeschakeld'; +$lang['status_unmodifiable'] = 'Niet wijzigbaar'; +$lang['status_plugin'] = 'plugin'; +$lang['status_template'] = 'template'; +$lang['status_bundled'] = 'Gebundeld'; +$lang['msg_enabled'] = 'Plugin %s ingeschakeld'; +$lang['msg_disabled'] = 'Plugin %s uitgeschakeld'; diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php new file mode 100644 index 000000000..4a36cb85d --- /dev/null +++ b/lib/plugins/extension/lang/ru/lang.php @@ -0,0 +1,41 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> + */ +$lang['menu'] = 'Управление дополнениями'; +$lang['tab_plugins'] = 'Установленные плагины'; +$lang['tab_templates'] = 'Установленные шаблоны'; +$lang['tab_search'] = 'Поиск и установка'; +$lang['tab_install'] = 'Ручная установка'; +$lang['notinstalled'] = 'Это дополнение не установлено'; +$lang['unknownauthor'] = 'Автор неизвестен'; +$lang['unknownversion'] = 'Версия неизвестна'; +$lang['btn_info'] = 'Отобразить доп. информацию'; +$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'] = '<strong>%s</strong> — %s'; +$lang['popularity'] = 'Попоулярность: %s%%'; +$lang['bugs_features'] = 'Ошибки'; +$lang['tags'] = 'Метки:'; +$lang['repository'] = 'Репозиторий:'; +$lang['unknown'] = '<em>неизвестно</em>'; +$lang['repo_retry'] = 'Повторить'; +$lang['status_enabled'] = 'включен'; +$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'] = 'Дополнение удалено'; diff --git a/lib/plugins/extension/lang/sk/lang.php b/lib/plugins/extension/lang/sk/lang.php new file mode 100644 index 000000000..d00c2e32b --- /dev/null +++ b/lib/plugins/extension/lang/sk/lang.php @@ -0,0 +1,58 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Martin Michalek <michalek.dev@gmail.com> + */ +$lang['tab_plugins'] = 'Inštalované pluginy'; +$lang['tab_templates'] = 'Inštalované šablóny'; +$lang['tab_search'] = 'Hľadanie e inštalácia'; +$lang['tab_install'] = 'Manuálna inštalácia'; +$lang['notimplemented'] = 'Táto vlastnosť ešte nebola implementovaná'; +$lang['unknownauthor'] = 'Neznámy autor'; +$lang['unknownversion'] = 'Neznáma verzia'; +$lang['btn_info'] = 'Viac informácií'; +$lang['btn_update'] = 'Aktualizácia'; +$lang['btn_uninstall'] = 'Odinštalovanie'; +$lang['btn_enable'] = 'Povolenie'; +$lang['btn_disable'] = 'Zablokovanie'; +$lang['btn_install'] = 'Inštalácia'; +$lang['btn_reinstall'] = 'Re-Inštalácia'; +$lang['search'] = 'Vyhľadávanie'; +$lang['extensionby'] = '<strong>%s</strong> od %s'; +$lang['screenshot'] = 'Obrázok od %s'; +$lang['popularity'] = 'Popularita: %s%%'; +$lang['homepage_link'] = 'Dokumentácia'; +$lang['bugs_features'] = 'Chyby:'; +$lang['tags'] = 'Kľúčové slová:'; +$lang['unknown'] = '<em>neznámy</em>'; +$lang['installed_version'] = 'Inštalovaná verzia:'; +$lang['install_date'] = 'Posledná aktualizácia:'; +$lang['available_version'] = 'Dostupné verzie:'; +$lang['compatible'] = 'Kompaktibilita:'; +$lang['similar'] = 'Podobné:'; +$lang['conflicts'] = 'V konflikte:'; +$lang['status_installed'] = 'inštalovaný'; +$lang['status_not_installed'] = 'neinštalovaný'; +$lang['status_protected'] = 'chránený'; +$lang['status_enabled'] = 'povolený'; +$lang['status_disabled'] = 'nepovolený'; +$lang['status_plugin'] = 'plugin'; +$lang['status_template'] = 'šablóna'; +$lang['msg_enabled'] = 'Plugin %s povolený'; +$lang['msg_disabled'] = 'Plugin %s nepovolený'; +$lang['msg_template_install_success'] = 'Šablóna %s úspešne nainštalovaná'; +$lang['msg_template_update_success'] = 'Šablóna %s úspešne aktualizovaná'; +$lang['msg_plugin_install_success'] = 'Plugin %s úspešne nainštalovaný'; +$lang['msg_plugin_update_success'] = 'Plugin %s úspešne aktualizovaný'; +$lang['msg_upload_failed'] = 'Nahrávanie súboru zlyhalo'; +$lang['update_available'] = '<strong>Aktualizácia:</strong> Nová verzia %s.'; +$lang['wrong_folder'] = '<strong>Plugin nesprávne nainštalovaný:</strong> Premenujte adresár s pluginom "%s" na "%s".'; +$lang['error_badurl'] = 'URL by mali mať na začiatku http alebo https'; +$lang['error_dircreate'] = 'Nie je možné vytvoriť dočasný adresár pre uloženie sťahovaného súboru'; +$lang['error_download'] = 'Nie je možné stiahnuť súbor: %s'; +$lang['error_decompress'] = 'Nie je možné dekomprimovať stiahnutý súbor. Môže to byť dôvodom chyby sťahovania (v tom prípade to skúste znova) alebo neznámym kompresným formátom (v tom prípade musíte stiahnuť a inštalovať manuálne).'; +$lang['error_copy'] = 'Chyba kopírovania pri inštalácii do adresára <em>%s</em>: disk môže byť plný alebo nemáte potrebné prístupové oprávnenie. Dôsledkom može byť čiastočne inštalovaný plugin a nestabilná wiki inštalácia.'; +$lang['nopluginperms'] = 'Adresár s pluginom nie je zapisovateľný.'; +$lang['install_url'] = 'Inštalácia z URL:'; diff --git a/lib/plugins/extension/lang/zh/intro_install.txt b/lib/plugins/extension/lang/zh/intro_install.txt new file mode 100644 index 000000000..640839319 --- /dev/null +++ b/lib/plugins/extension/lang/zh/intro_install.txt @@ -0,0 +1 @@ +你可以通过上传或直接提供下载链接来安装插件和模板。
\ No newline at end of file diff --git a/lib/plugins/extension/lang/zh/intro_search.txt b/lib/plugins/extension/lang/zh/intro_search.txt new file mode 100644 index 000000000..0059075c0 --- /dev/null +++ b/lib/plugins/extension/lang/zh/intro_search.txt @@ -0,0 +1 @@ +这个标签会为你展示所有DokuWiki的第三方插件和模板。但你需要知道这些由第三方提供的代码可能会给你带来**安全方面的风险**,你最好先读一下[[doku>security#plugin_security|插件安全性]]。
\ No newline at end of file diff --git a/lib/plugins/extension/lang/zh/intro_templates.txt b/lib/plugins/extension/lang/zh/intro_templates.txt new file mode 100644 index 000000000..20575d381 --- /dev/null +++ b/lib/plugins/extension/lang/zh/intro_templates.txt @@ -0,0 +1 @@ +DokuWiki当前所使用的模板已经安装了,你可以在[[?do=admin&page=config|配置管理器]]里选择你要的模板。
\ No newline at end of file diff --git a/lib/plugins/extension/lang/zh/lang.php b/lib/plugins/extension/lang/zh/lang.php new file mode 100644 index 000000000..b9db01540 --- /dev/null +++ b/lib/plugins/extension/lang/zh/lang.php @@ -0,0 +1,50 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Cupen <Cupenoruler@foxmail.com> + * @author xiqingongzi <Xiqingongzi@Gmail.com> + */ +$lang['menu'] = '扩展管理器'; +$lang['tab_plugins'] = '安装插件'; +$lang['tab_templates'] = '安装模板'; +$lang['tab_search'] = '搜索和安装'; +$lang['tab_install'] = '手动安装'; +$lang['notimplemented'] = '未实现的特性'; +$lang['notinstalled'] = '该扩展未安装'; +$lang['alreadyenabled'] = '该扩展已激活'; +$lang['alreadydisabled'] = '该扩展已关闭'; +$lang['pluginlistsaveerror'] = '保存插件列表时碰到个错误'; +$lang['unknownauthor'] = '未知作者'; +$lang['unknownversion'] = '未知版本'; +$lang['btn_info'] = '查看更多信息'; +$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'] = '<strong>%s</strong> by %s'; +$lang['screenshot'] = '%s 的截图'; +$lang['popularity'] = '人气: %s%%'; +$lang['homepage_link'] = '文档'; +$lang['bugs_features'] = '错误'; +$lang['tags'] = '标签:'; +$lang['author_hint'] = '搜索这个作者的插件'; +$lang['installed'] = '已安装的:'; +$lang['downloadurl'] = '下载地址:'; +$lang['repository'] = '版本库:'; +$lang['unknown'] = '<em>未知的</em>'; +$lang['installed_version'] = '已安装版本:'; +$lang['install_date'] = '您的最后一次升级:'; +$lang['donate'] = '喜欢?'; +$lang['donate_action'] = '捐给作者一杯咖啡钱!'; +$lang['repo_retry'] = '重试'; +$lang['status'] = '现状:'; +$lang['status_installed'] = '已安装的'; +$lang['status_plugin'] = '插件'; +$lang['status_template'] = '模板'; diff --git a/lib/plugins/extension/plugin.info.txt b/lib/plugins/extension/plugin.info.txt new file mode 100644 index 000000000..ef16d78a1 --- /dev/null +++ b/lib/plugins/extension/plugin.info.txt @@ -0,0 +1,7 @@ +base extension +author Michael Hamann +email michael@content-space.de +date 2013-08-01 +name Extension Manager +desc Allows managing and installing plugins and templates +url https://www.dokuwiki.org/plugin:extension diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js new file mode 100644 index 000000000..fab88162d --- /dev/null +++ b/lib/plugins/extension/script.js @@ -0,0 +1,113 @@ +jQuery(function(){ + + var $extmgr = jQuery('#extension__manager'); + + /** + * Confirm uninstalling + */ + $extmgr.find('input.uninstall').click(function(e){ + if(!window.confirm(LANG.plugins.extension.reallydel)){ + e.preventDefault(); + return false; + } + return true; + }); + + /** + * very simple lightbox + * @link http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/super-simple-lightbox-with-css-and-jquery/ + */ + $extmgr.find('a.extension_screenshot').click(function(e) { + e.preventDefault(); + + //Get clicked link href + var image_href = jQuery(this).attr("href"); + + // create lightbox if needed + var $lightbox = jQuery('#plugin__extensionlightbox'); + if(!$lightbox.length){ + $lightbox = jQuery('<div id="plugin__extensionlightbox"><p>Click to close</p><div></div></div>') + .appendTo(jQuery('body')) + .hide() + .click(function(){ + $lightbox.hide(); + }); + } + + // fill and show it + $lightbox + .show() + .find('div').html('<img src="' + image_href + '" />'); + + + return false; + }); + + /** + * Enable/Disable extension via AJAX + */ + $extmgr.find('input.disable, input.enable').click(function (e) { + e.preventDefault(); + var $btn = jQuery(this); + + // get current state + var extension = $btn.attr('name').split('[')[2]; + extension = extension.substr(0, extension.length - 1); + var act = ($btn.hasClass('disable')) ? 'disable' : 'enable'; + + // disable while we wait + $btn.attr('disabled', 'disabled'); + $btn.css('cursor', 'wait'); + + // execute + jQuery.get( + DOKU_BASE + 'lib/exe/ajax.php', + { + call: 'plugin_extension', + ext: extension, + act: act + }, + function (data) { + $btn.css('cursor', '') + .removeAttr('disabled') + .removeClass('disable') + .removeClass('enable') + .val(data.label) + .addClass(data.reverse) + .parents('li') + .removeClass('disabled') + .removeClass('enabled') + .addClass(data.state); + } + ); + }); + + /** + * AJAX detail infos + */ + $extmgr.find('a.info').click(function(e){ + e.preventDefault(); + + var $link = jQuery(this); + var $details = $link.parent().find('dl.details'); + if($details.length){ + $link.toggleClass('close'); + $details.toggle(); + return; + } + + $link.addClass('close'); + jQuery.get( + DOKU_BASE + 'lib/exe/ajax.php', + { + call: 'plugin_extension', + ext: $link.data('extid'), + act: 'info' + }, + function(data){ + $link.parent().append(data); + } + ); + }); + +});
\ No newline at end of file diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less new file mode 100644 index 000000000..d20689099 --- /dev/null +++ b/lib/plugins/extension/style.less @@ -0,0 +1,363 @@ +/* + * Extension plugin styles + * + * @author Christopher Smith <chris@jalakai.co.uk> + * @author Piyush Mishra <me@piyushmishra.com> + * @author Håkan Sandell <sandell.hakan@gmail.com> + * @author Anika Henke <anika@selfthinker.org> + */ + +/** + * very simple lightbox + * @link http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/super-simple-lightbox-with-css-and-jquery/ + */ +#plugin__extensionlightbox { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: url(images/overlay.png) repeat; + text-align: center; + cursor: pointer; + z-index: 9999; + + p { + text-align: right; + color: #fff; + margin-right: 20px; + font-size: 12px; + } + + img { + box-shadow: 0 0 25px #111; + -webkit-box-shadow: 0 0 25px #111; + -moz-box-shadow: 0 0 25px #111; + max-width: 90%; + max-height: 90%; + } +} + +/** + * general styles + */ +#extension__manager { + // tab layout - most of it is in the main template + ul.tabs li.active a { + background-color: @ini_background_alt; + border-bottom: solid 1px @ini_background_alt; + z-index: 2; + } + .panelHeader { + background-color: @ini_background_alt; + margin: 0 0 10px 0; + padding: 10px 10px 8px; + overflow: hidden; + } + + // message spacing + div.msg { + margin: 0.4em 0 0 0; + } +} + +/* + * extensions table + */ +#extension__list { + ul.extensionList { + margin-left: 0; + margin-right: 0; + padding: 0; + list-style: none; + } + + ul.extensionList li { + margin: 0 0 .5em; + padding: 0 0 .5em; + color: @ini_text; + border-bottom: 1px solid @ini_border; + overflow: hidden; + } + + input.button { + margin: 0 .3em .3em 0; + } +} + +/** + * extension table left column + */ +#extension__list .legend { + position: relative; + width: 75%; + float: left; + + // padding + > div { + padding: 0 .5em 0 132px; + border-right: 1px solid @ini_background_alt; + overflow: hidden; + } + + // screenshot + div.screenshot { + margin-top: 4px; + margin-left: -132px; + max-width: 120px; + float: left; + position: relative; + + img { + width: 120px; + height: 70px; + border-radius: 5px; + box-shadow: 2px 2px 2px #666; + } + + span { + min-height: 24px; + min-width: 24px; + position: absolute; + left: 0; + top: 0; + } + } + + // plugin headline + h2 { + width: 100%; + float: right; + margin: 0.2em 0 0.5em; + font-size: 100%; + font-weight: normal; + border: none; + + strong { + font-size: 120%; + font-weight: bold; + vertical-align: baseline; + } + } + + // description + p { + margin: 0 0 0.6em 0; + } + + // popularity bar + div.popularity { + background-color: @ini_background; + border: 1px solid silver; + height: .4em; + margin: 0 auto; + padding: 1px; + width: 5.5em; + position: absolute; + right: .5em; + top: 0.2em; + + div { + background-color: @ini_border; + height: 100%; + } + } + + // Docs, Bugs, Tags + div.linkbar { + font-size: 85%; + + span.tags { + padding-left: 18px; + background: transparent url(images/tag.png) no-repeat 0 0; + } + } + + // more info button + a.info { + background: transparent url(images/down.png) no-repeat 0 0; + border-width: 0; + height: 13px; + width: 13px; + text-indent: -9999px; + float: right; + margin: .5em 0 0; + overflow: hidden; + + &.close { + background: transparent url(images/up.png) no-repeat 0 0; + } + } + + // detailed info box + dl.details { + margin: 0.4em 0 0 0; + font-size: 85%; + border-top: 1px solid @ini_background_alt; + clear: both; + + dt { + clear: left; + float: left; + width: 25%; + margin: 0; + text-align: right; + font-weight: normal; + padding: 0.2em 5px 0 0; + font-weight: bold; + } + + dd { + margin-left: 25%; + padding: 0.2em 0 0 5px; + + a.donate { + padding-left: 18px; + background: transparent url(images/donate.png) left center no-repeat; + } + } + } +} + +[dir=rtl] #extension__list .legend { + float: right; + + > div { + padding: 0 132px 0 .5em; + border-left: 1px solid @ini_background_alt; + border-right-width: 0; + } + + div.screenshot { + margin-left: 0; + margin-right: -132px; + float: right; + + span { + left: auto; + right: 0; + } + } + + h2 { + float: left; + } + + div.popularity { + right: auto; + left: .5em; + } + + div.linkbar span.tags, + dl.details dd a.donate { + padding-left: 0; + padding-right: 18px; + background-position: top right; + } + + a.info { + float: left; + } + + dl.details { + dt { + clear: right; + float: right; + text-align: left; + padding-left: 5px; + padding-right: 0; + } + + dd { + margin-left: 0; + margin-right: 25%; + padding-left: 0; + padding-right: 5px; + } + } +} + +/* + * Enabled/Disabled overrides + */ +#extension__list { + .enabled div.screenshot span { + background: transparent url(images/enabled.png) no-repeat 2px 2px; + } + + .disabled div.screenshot span { + background: transparent url(images/disabled.png) no-repeat 2px 2px; + } + + .disabled .legend { + opacity: 0.7; + } +} + +/** + * extension table right column + */ +#extension__manager .actions { + padding: 0; + font-size: 95%; + width: 25%; + float: right; + text-align: right; + + .version { + display: block; + } + + p { + margin: 0.2em 0; + text-align: center; + } + + p.permerror { + margin-left: 0.4em; + text-align: left; + padding-left: 19px; + background: transparent url(images/warning.png) center left no-repeat; + line-height: 18px; + font-size: 12px; + } +} + +[dir=rtl] #extension__manager .actions { + float: left; + text-align: left; + + p.permerror { + margin-left: 0; + margin-right: 0.4em; + text-align: right; + padding-left: 0; + padding-right: 19px; + background-position: center right; + } +} + +/** + * Search form + */ +#extension__manager form.search { + display: block; + margin-bottom: 2em; + + span { + font-weight: bold; + } + + input.edit { + width: 25em; + } +} + +/** + * Install form + */ +#extension__manager form.install { + text-align: center; + display: block; + width: 60%; +} diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php index 5d969d7a2..9265f44d5 100644 --- a/lib/plugins/info/syntax.php +++ b/lib/plugins/info/syntax.php @@ -48,7 +48,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * Handle the match */ - function handle($match, $state, $pos, Doku_Handler &$handler){ + function handle($match, $state, $pos, Doku_Handler $handler){ $match = substr($match,7,-2); //strip ~~INFO: from start and ~~ from end return array(strtolower($match)); } @@ -56,8 +56,9 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * Create output */ - function render($format, Doku_Renderer &$renderer, $data) { + function render($format, Doku_Renderer $renderer, $data) { if($format == 'xhtml'){ + /** @var Doku_Renderer_xhtml $renderer */ //handle various info stuff switch ($data[0]){ case 'syntaxmodes': @@ -142,8 +143,6 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * uses some of the original renderer methods */ function _helpermethods_xhtml(Doku_Renderer &$renderer){ - global $lang; - $plugins = plugin_list('helper'); foreach($plugins as $p){ if (!$po = plugin_load('helper',$p)) continue; @@ -251,10 +250,11 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * Adds a TOC item */ - function _addToTOC($text, $level, Doku_Renderer_xhtml &$renderer){ + function _addToTOC($text, $level, Doku_Renderer &$renderer){ global $conf; if (($level >= $conf['toptoclevel']) && ($level <= $conf['maxtoclevel'])){ + /** @var $renderer Doku_Renderer_xhtml */ $hid = $renderer->_headerToLink($text, 'true'); $renderer->toc[] = array( 'hid' => $hid, diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php deleted file mode 100644 index 3f019d5e2..000000000 --- a/lib/plugins/plugin/admin.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php -/** - * Plugin management functions - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Christopher Smith <chris@jalakai.co.uk> - */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -// todo -// - maintain a history of file modified -// - allow a plugin to contain extras to be copied to the current template (extra/tpl/) -// - to images (lib/images/) [ not needed, should go in lib/plugin/images/ ] - -require_once(DOKU_PLUGIN."/plugin/classes/ap_manage.class.php"); - -//--------------------------[ GLOBALS ]------------------------------------------------ -// note: probably should be dokuwiki wide globals, where they can be accessed by pluginutils.php -// global $plugin_types; -// $plugin_types = array('syntax', 'admin'); - -// plugins that are an integral part of dokuwiki, they shouldn't be disabled or deleted -global $plugin_protected; -$plugin_protected = array('acl','plugin','config','info','usermanager','revert'); - -/** - * All DokuWiki plugins to extend the admin function - * need to inherit from this class - */ -class admin_plugin_plugin extends DokuWiki_Admin_Plugin { - - var $disabled = 0; - var $plugin = ''; - var $cmd = ''; - - /** - * @var ap_manage - */ - var $handler = null; - - var $functions = array('delete','update',/*'settings',*/'info'); // require a plugin name - var $commands = array('manage','download','enable'); // don't require a plugin name - var $plugin_list = array(); - - var $msg = ''; - var $error = ''; - - function admin_plugin_plugin() { - $this->disabled = plugin_isdisabled('plugin'); - } - - /** - * return sort order for position in admin menu - */ - function getMenuSort() { - return 20; - } - - /** - * handle user request - */ - function handle() { - global $INPUT; - // enable direct access to language strings - $this->setupLocale(); - - $fn = $INPUT->param('fn'); - if (is_array($fn)) { - $this->cmd = key($fn); - $this->plugin = is_array($fn[$this->cmd]) ? key($fn[$this->cmd]) : null; - } else { - $this->cmd = $fn; - $this->plugin = null; - } - $this->_get_plugin_list(); - - // verify $_REQUEST vars - if (in_array($this->cmd, $this->commands)) { - $this->plugin = ''; - } else if (!in_array($this->cmd, $this->functions) || !in_array($this->plugin, $this->plugin_list)) { - $this->cmd = 'manage'; - $this->plugin = ''; - } - - if(($this->cmd != 'manage' || $this->plugin != '') && !checkSecurityToken()){ - $this->cmd = 'manage'; - $this->plugin = ''; - } - - // create object to handle the command - $class = "ap_".$this->cmd; - @require_once(DOKU_PLUGIN."/plugin/classes/$class.class.php"); - if (!class_exists($class)){ - $class = 'ap_manage'; - } - - $this->handler = new $class($this, $this->plugin); - $this->msg = $this->handler->process(); - - } - - /** - * output appropriate html - */ - function html() { - // enable direct access to language strings - $this->setupLocale(); - $this->_get_plugin_list(); - - if ($this->handler === null) $this->handler = new ap_manage($this, $this->plugin); - - ptln('<div id="plugin__manager">'); - $this->handler->html(); - ptln('</div><!-- #plugin_manager -->'); - } - - /** - * Returns a list of all plugins, including the disabled ones - */ - function _get_plugin_list() { - if (empty($this->plugin_list)) { - $list = plugin_list('',true); // all plugins, including disabled ones - sort($list); - trigger_event('PLUGIN_PLUGINMANAGER_PLUGINLIST',$list); - $this->plugin_list = $list; - } - return $this->plugin_list; - } - -} - - - - - - diff --git a/lib/plugins/plugin/classes/ap_delete.class.php b/lib/plugins/plugin/classes/ap_delete.class.php deleted file mode 100644 index 581a6295f..000000000 --- a/lib/plugins/plugin/classes/ap_delete.class.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -class ap_delete extends ap_manage { - - function process() { - - if (!$this->dir_delete(DOKU_PLUGIN.plugin_directory($this->manager->plugin))) { - $this->manager->error = sprintf($this->lang['error_delete'],$this->manager->plugin); - } else { - msg(sprintf($this->lang['deleted'],$this->plugin)); - $this->refresh(); - } - } - - function html() { - parent::html(); - - ptln('<div class="pm_info">'); - ptln('<h2>'.$this->lang['deleting'].'</h2>'); - - if ($this->manager->error) { - ptln('<div class="error">'.str_replace("\n","<br />",$this->manager->error).'</div>'); - } else { - ptln('<p>'.sprintf($this->lang['deleted'],$this->plugin).'</p>'); - } - ptln('</div>'); - } -} - diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php deleted file mode 100644 index 3cc455867..000000000 --- a/lib/plugins/plugin/classes/ap_download.class.php +++ /dev/null @@ -1,288 +0,0 @@ -<?php -class ap_download extends ap_manage { - - var $overwrite = true; - - /** - * Initiate the plugin download - */ - function process() { - global $INPUT; - - $plugin_url = $INPUT->str('url'); - $this->download($plugin_url, $this->overwrite); - return ''; - } - - /** - * Print results of the download - */ - function html() { - parent::html(); - - ptln('<div class="pm_info">'); - ptln('<h2>'.$this->lang['downloading'].'</h2>'); - - if ($this->manager->error) { - ptln('<div class="error">'.str_replace("\n","<br />",$this->manager->error).'</div>'); - } else if (count($this->downloaded) == 1) { - ptln('<p>'.sprintf($this->lang['downloaded'],$this->downloaded[0]).'</p>'); - } else if (count($this->downloaded)) { // more than one plugin in the download - ptln('<p>'.$this->lang['downloads'].'</p>'); - ptln('<ul>'); - foreach ($this->downloaded as $plugin) { - ptln('<li><div class="li">'.$plugin.'</div></li>',2); - } - ptln('</ul>'); - } else { // none found in download - ptln('<p>'.$this->lang['download_none'].'</p>'); - } - ptln('</div>'); - } - - /** - * Process the downloaded file - */ - function download($url, $overwrite=false) { - // check the url - $matches = array(); - if (!preg_match("/[^\/]*$/", $url, $matches) || !$matches[0]) { - $this->manager->error = $this->lang['error_badurl']."\n"; - return false; - } - - $file = $matches[0]; - - if (!($tmp = io_mktmpdir())) { - $this->manager->error = $this->lang['error_dircreate']."\n"; - return false; - } - - if (!$file = io_download($url, "$tmp/", true, $file, 0)) { - $this->manager->error = sprintf($this->lang['error_download'],$url)."\n"; - } - - if (!$this->manager->error && !$this->decompress("$tmp/$file", $tmp)) { - $this->manager->error = sprintf($this->lang['error_decompress'],$file)."\n"; - } - - // search $tmp for the folder(s) that has been created - // move the folder(s) to lib/plugins/ - if (!$this->manager->error) { - $result = array('old'=>array(), 'new'=>array()); - if($this->find_folders($result,$tmp)){ - // choose correct result array - if(count($result['new'])){ - $install = $result['new']; - }else{ - $install = $result['old']; - } - - // now install all found items - foreach($install as $item){ - // where to install? - if($item['type'] == 'template'){ - $target = DOKU_INC.'lib/tpl/'.$item['base']; - }else{ - $target = DOKU_INC.'lib/plugins/'.$item['base']; - } - - // check to make sure we aren't overwriting anything - if (!$overwrite && @file_exists($target)) { - // remember our settings, ask the user to confirm overwrite, FIXME - continue; - } - - $instruction = @file_exists($target) ? 'update' : 'install'; - - // copy action - if ($this->dircopy($item['tmp'], $target)) { - $this->downloaded[] = $item['base']; - $this->plugin_writelog($target, $instruction, array($url)); - } else { - $this->manager->error .= sprintf($this->lang['error_copy']."\n", $item['base']); - } - } - - } else { - $this->manager->error = $this->lang['error']."\n"; - } - } - - // cleanup - if ($tmp) $this->dir_delete($tmp); - - if (!$this->manager->error) { - msg(sprintf($this->lang['packageinstalled'], count($this->downloaded), join(',',$this->downloaded)),1); - $this->refresh(); - return true; - } - - return false; - } - - /** - * Find out what was in the extracted directory - * - * Correct folders are searched recursively using the "*.info.txt" configs - * as indicator for a root folder. When such a file is found, it's base - * setting is used (when set). All folders found by this method are stored - * in the 'new' key of the $result array. - * - * For backwards compatibility all found top level folders are stored as - * in the 'old' key of the $result array. - * - * When no items are found in 'new' the copy mechanism should fall back - * the 'old' list. - * - * @author Andreas Gohr <andi@splitbrain.org> - * @param arrayref $result - results are stored here - * @param string $base - the temp directory where the package was unpacked to - * @param string $dir - a subdirectory. do not set. used by recursion - * @return bool - false on error - */ - function find_folders(&$result,$base,$dir=''){ - $dh = @opendir("$base/$dir"); - if(!$dh) return false; - while (false !== ($f = readdir($dh))) { - if ($f == '.' || $f == '..' || $f == 'tmp') continue; - - if(!is_dir("$base/$dir/$f")){ - // it's a file -> check for config - if($f == 'plugin.info.txt'){ - $info = array(); - $info['type'] = 'plugin'; - $info['tmp'] = "$base/$dir"; - $conf = confToHash("$base/$dir/$f"); - $info['base'] = utf8_basename($conf['base']); - if(!$info['base']) $info['base'] = utf8_basename("$base/$dir"); - $result['new'][] = $info; - }elseif($f == 'template.info.txt'){ - $info = array(); - $info['type'] = 'template'; - $info['tmp'] = "$base/$dir"; - $conf = confToHash("$base/$dir/$f"); - $info['base'] = utf8_basename($conf['base']); - if(!$info['base']) $info['base'] = utf8_basename("$base/$dir"); - $result['new'][] = $info; - } - }else{ - // it's a directory -> add to dir list for old method, then recurse - if(!$dir){ - $info = array(); - $info['type'] = 'plugin'; - $info['tmp'] = "$base/$dir/$f"; - $info['base'] = $f; - $result['old'][] = $info; - } - $this->find_folders($result,$base,"$dir/$f"); - } - } - closedir($dh); - return true; - } - - - /** - * Decompress a given file to the given target directory - * - * Determines the compression type from the file extension - */ - function decompress($file, $target) { - global $conf; - - // decompression library doesn't like target folders ending in "/" - if (substr($target, -1) == "/") $target = substr($target, 0, -1); - - $ext = $this->guess_archive($file); - if (in_array($ext, array('tar','bz','gz'))) { - switch($ext){ - case 'bz': - $compress_type = Tar::COMPRESS_BZIP; - break; - case 'gz': - $compress_type = Tar::COMPRESS_GZIP; - break; - default: - $compress_type = Tar::COMPRESS_NONE; - } - - $tar = new Tar(); - try { - $tar->open($file, $compress_type); - $tar->extract($target); - return true; - }catch(Exception $e){ - if($conf['allowdebug']){ - msg('Tar Error: '.$e->getMessage().' ['.$e->getFile().':'.$e->getLine().']',-1); - } - return false; - } - } else if ($ext == 'zip') { - - $zip = new ZipLib(); - $ok = $zip->Extract($file, $target); - - // FIXME sort something out for handling zip error messages meaningfully - return ($ok==-1?false:true); - - } - - // unsupported file type - return false; - } - - /** - * Determine the archive type of the given file - * - * Reads the first magic bytes of the given file for content type guessing, - * if neither bz, gz or zip are recognized, tar is assumed. - * - * @author Andreas Gohr <andi@splitbrain.org> - * @returns boolean|string false if the file can't be read, otherwise an "extension" - */ - function guess_archive($file){ - $fh = fopen($file,'rb'); - if(!$fh) return false; - $magic = fread($fh,5); - fclose($fh); - - if(strpos($magic,"\x42\x5a") === 0) return 'bz'; - if(strpos($magic,"\x1f\x8b") === 0) return 'gz'; - if(strpos($magic,"\x50\x4b\x03\x04") === 0) return 'zip'; - return 'tar'; - } - - /** - * Copy with recursive sub-directory support - */ - function dircopy($src, $dst) { - global $conf; - - if (is_dir($src)) { - if (!$dh = @opendir($src)) return false; - - if ($ok = io_mkdir_p($dst)) { - while ($ok && (false !== ($f = readdir($dh)))) { - if ($f == '..' || $f == '.') continue; - $ok = $this->dircopy("$src/$f", "$dst/$f"); - } - } - - closedir($dh); - return $ok; - - } else { - $exists = @file_exists($dst); - - if (!@copy($src,$dst)) return false; - if (!$exists && !empty($conf['fperm'])) chmod($dst, $conf['fperm']); - @touch($dst,filemtime($src)); - } - - return true; - } - - -} - diff --git a/lib/plugins/plugin/classes/ap_enable.class.php b/lib/plugins/plugin/classes/ap_enable.class.php deleted file mode 100644 index a25c7ede8..000000000 --- a/lib/plugins/plugin/classes/ap_enable.class.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -class ap_enable extends ap_manage { - - var $enabled = array(); - - function process() { - global $plugin_protected; - global $INPUT; - - $count_enabled = $count_disabled = 0; - - $this->enabled = $INPUT->arr('enabled'); - - foreach ($this->manager->plugin_list as $plugin) { - if (in_array($plugin, $plugin_protected)) continue; - - $new = in_array($plugin, $this->enabled); - $old = !plugin_isdisabled($plugin); - - if ($new != $old) { - switch ($new) { - // enable plugin - case true : - if(plugin_enable($plugin)){ - msg(sprintf($this->lang['enabled'],$plugin),1); - $count_enabled++; - }else{ - msg(sprintf($this->lang['notenabled'],$plugin),-1); - } - break; - case false: - if(plugin_disable($plugin)){ - msg(sprintf($this->lang['disabled'],$plugin),1); - $count_disabled++; - }else{ - msg(sprintf($this->lang['notdisabled'],$plugin),-1); - } - break; - } - } - } - - // refresh plugins, including expiring any dokuwiki cache(s) - if ($count_enabled || $count_disabled) { - $this->refresh(); - } - } - -} - diff --git a/lib/plugins/plugin/classes/ap_info.class.php b/lib/plugins/plugin/classes/ap_info.class.php deleted file mode 100644 index b3826b944..000000000 --- a/lib/plugins/plugin/classes/ap_info.class.php +++ /dev/null @@ -1,143 +0,0 @@ -<?php - -class ap_info extends ap_manage { - - var $plugin_info = array(); // the plugin itself - var $details = array(); // any component plugins - - function process() { - - // sanity check - if (!$this->manager->plugin) { return; } - - $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; - - $compname = explode('_',$component['name']); - if($compname[1]){ - $compname = '['.$compname[1].']'; - }else{ - $compname = ''; - } - - $this->details[] = array_merge( - $obj->getInfo(), - array( - 'type' => $component['type'], - 'compname' => $compname - )); - unset($obj); - } - - // review details to simplify things - foreach($this->details as $info) { - foreach($info as $item => $value) { - if (!isset($this->plugin_info[$item])) { $this->plugin_info[$item] = $value; continue; } - if ($this->plugin_info[$item] != $value) $this->plugin_info[$item] = ''; - } - } - } - - function html() { - - // output the standard menu stuff - parent::html(); - - // sanity check - if (!$this->manager->plugin) { return; } - - ptln('<div class="pm_info">'); - ptln("<h2>".$this->manager->getLang('plugin')." {$this->manager->plugin}</h2>"); - - // collect pertinent information from the log - $installed = $this->plugin_readlog($this->manager->plugin, 'installed'); - $source = $this->plugin_readlog($this->manager->plugin, 'url'); - $updated = $this->plugin_readlog($this->manager->plugin, 'updated'); - if (strrpos($updated, "\n") !== false) $updated = substr($updated, strrpos($updated, "\n")+1); - - ptln("<dl>",2); - ptln("<dt>".$this->manager->getLang('source').'</dt><dd>'.($source ? $source : $this->manager->getLang('unknown'))."</dd>",4); - ptln("<dt>".$this->manager->getLang('installed').'</dt><dd>'.($installed ? $installed : $this->manager->getLang('unknown'))."</dd>",4); - if ($updated) ptln("<dt>".$this->manager->getLang('lastupdate').'</dt><dd>'.$updated."</dd>",4); - ptln("</dl>",2); - - if (count($this->details) == 0) { - ptln("<p>".$this->manager->getLang('noinfo')."</p>",2); - } else { - - ptln("<dl>",2); - if ($this->plugin_info['name']) ptln("<dt>".$this->manager->getLang('name')."</dt><dd>".$this->out($this->plugin_info['name'])."</dd>",4); - if ($this->plugin_info['date']) ptln("<dt>".$this->manager->getLang('date')."</dt><dd>".$this->out($this->plugin_info['date'])."</dd>",4); - if ($this->plugin_info['type']) ptln("<dt>".$this->manager->getLang('type')."</dt><dd>".$this->out($this->plugin_info['type'])."</dd>",4); - if ($this->plugin_info['desc']) ptln("<dt>".$this->manager->getLang('desc')."</dt><dd>".$this->out($this->plugin_info['desc'])."</dd>",4); - if ($this->plugin_info['author']) ptln("<dt>".$this->manager->getLang('author')."</dt><dd>".$this->manager->email($this->plugin_info['email'], $this->plugin_info['author'])."</dd>",4); - if ($this->plugin_info['url']) ptln("<dt>".$this->manager->getLang('www')."</dt><dd>".$this->manager->external_link($this->plugin_info['url'], '', 'urlextern')."</dd>",4); - ptln("</dl>",2); - - if (count($this->details) > 1) { - ptln("<h3>".$this->manager->getLang('components')."</h3>",2); - ptln("<div>",2); - - foreach ($this->details as $info) { - - ptln("<dl>",4); - ptln("<dt>".$this->manager->getLang('name')."</dt><dd>".$this->out($info['name'].' '.$info['compname'])."</dd>",6); - if (!$this->plugin_info['date']) ptln("<dt>".$this->manager->getLang('date')."</dt><dd>".$this->out($info['date'])."</dd>",6); - if (!$this->plugin_info['type']) ptln("<dt>".$this->manager->getLang('type')."</dt><dd>".$this->out($info['type'])."</dd>",6); - if (!$this->plugin_info['desc']) ptln("<dt>".$this->manager->getLang('desc')."</dt><dd>".$this->out($info['desc'])."</dd>",6); - if (!$this->plugin_info['author']) ptln("<dt>".$this->manager->getLang('author')."</dt><dd>".$this->manager->email($info['email'], $info['author'])."</dd>",6); - if (!$this->plugin_info['url']) ptln("<dt>".$this->manager->getLang('www')."</dt><dd>".$this->manager->external_link($info['url'], '', 'urlextern')."</dd>",6); - ptln("</dl>",4); - - } - ptln("</div>",2); - } - } - ptln("</div>"); - } - - // simple output filter, make html entities safe and convert new lines to <br /> - function out($text) { - return str_replace("\n",'<br />',htmlspecialchars($text)); - } - - - /** - * return a list (name & type) of all the component plugins that make up this plugin - * - * @todo can this move to pluginutils? - */ - function get_plugin_components($plugin) { - - global $plugin_types; - - $components = array(); - $path = DOKU_PLUGIN.plugin_directory($plugin).'/'; - - foreach ($plugin_types as $type) { - if (@file_exists($path.$type.'.php')) { $components[] = array('name'=>$plugin, 'type'=>$type); continue; } - - if ($dh = @opendir($path.$type.'/')) { - while (false !== ($cp = readdir($dh))) { - if ($cp == '.' || $cp == '..' || strtolower(substr($cp,-4)) != '.php') continue; - - $components[] = array('name'=>$plugin.'_'.substr($cp, 0, -4), 'type'=>$type); - } - closedir($dh); - } - } - - return $components; - } - - /** - * usort callback to sort plugin components - */ - function component_sort($a, $b) { - if ($a['name'] == $b['name']) return 0; - return ($a['name'] < $b['name']) ? -1 : 1; - } -} diff --git a/lib/plugins/plugin/classes/ap_manage.class.php b/lib/plugins/plugin/classes/ap_manage.class.php deleted file mode 100644 index 48be63050..000000000 --- a/lib/plugins/plugin/classes/ap_manage.class.php +++ /dev/null @@ -1,202 +0,0 @@ -<?php - -class ap_manage { - - var $manager = null; - var $lang = array(); - var $plugin = ''; - var $downloaded = array(); - - function ap_manage(&$manager, $plugin) { - $this->manager = & $manager; - $this->plugin = $plugin; - $this->lang = & $manager->lang; - } - - function process() { - return ''; - } - - function html() { - print $this->manager->locale_xhtml('admin_plugin'); - $this->html_menu(); - } - - // build our standard menu - function html_menu($listPlugins = true) { - global $ID; - - ptln('<div class="pm_menu">'); - - ptln('<div class="common">'); - ptln(' <h2>'.$this->lang['download'].'</h2>'); - ptln(' <form action="'.wl($ID).'" method="post">'); - ptln(' <fieldset class="hidden">',4); - ptln(' <input type="hidden" name="do" value="admin" />'); - ptln(' <input type="hidden" name="page" value="plugin" />'); - formSecurityToken(); - ptln(' </fieldset>'); - ptln(' <fieldset>'); - ptln(' <legend>'.$this->lang['download'].'</legend>'); - ptln(' <label for="dw__url">'.$this->lang['url'].'<input name="url" id="dw__url" class="edit" type="text" maxlength="200" /></label>'); - ptln(' <input type="submit" class="button" name="fn[download]" value="'.$this->lang['btn_download'].'" />'); - ptln(' </fieldset>'); - ptln(' </form>'); - ptln('</div>'); - - if ($listPlugins) { - ptln('<h2>'.$this->lang['manage'].'</h2>'); - - ptln('<form action="'.wl($ID).'" method="post" class="plugins">'); - - ptln(' <fieldset class="hidden">'); - ptln(' <input type="hidden" name="do" value="admin" />'); - ptln(' <input type="hidden" name="page" value="plugin" />'); - formSecurityToken(); - ptln(' </fieldset>'); - - $this->html_pluginlist(); - - ptln(' <fieldset class="buttons">'); - ptln(' <input type="submit" class="button" name="fn[enable]" value="'.$this->lang['btn_enable'].'" />'); - ptln(' </fieldset>'); - - // ptln(' </div>'); - ptln('</form>'); - } - - ptln('</div>'); - } - - function html_pluginlist() { - global $plugin_protected; - - foreach ($this->manager->plugin_list as $plugin) { - - $disabled = plugin_isdisabled($plugin); - $protected = in_array($plugin,$plugin_protected); - - $checked = ($disabled) ? '' : ' checked="checked"'; - $check_disabled = ($protected) ? ' disabled="disabled"' : ''; - - // determine display class(es) - $class = array(); - if (in_array($plugin, $this->downloaded)) $class[] = 'new'; - if ($disabled) $class[] = 'disabled'; - if ($protected) $class[] = 'protected'; - - $class = count($class) ? ' class="'.join(' ', $class).'"' : ''; - - ptln(' <fieldset'.$class.'>'); - ptln(' <legend>'.$plugin.'</legend>'); - ptln(' <input type="checkbox" class="enable" name="enabled[]" id="dw__p_'.$plugin.'" value="'.$plugin.'"'.$checked.$check_disabled.' />'); - ptln(' <h3 class="legend"><label for="dw__p_'.$plugin.'">'.$plugin.'</label></h3>'); - - $this->html_button($plugin, 'info', false, 6); - if (in_array('settings', $this->manager->functions)) { - $this->html_button($plugin, 'settings', !@file_exists(DOKU_PLUGIN.$plugin.'/settings.php'), 6); - } - $this->html_button($plugin, 'update', !$this->plugin_readlog($plugin, 'url'), 6); - $this->html_button($plugin, 'delete', $protected, 6); - - ptln(' </fieldset>'); - } - } - - function html_button($plugin, $btn, $disabled=false, $indent=0) { - $disabled = ($disabled) ? 'disabled="disabled"' : ''; - ptln('<input type="submit" class="button" '.$disabled.' name="fn['.$btn.']['.$plugin.']" value="'.$this->lang['btn_'.$btn].'" />',$indent); - } - - /** - * Refresh plugin list - */ - function refresh() { - global $config_cascade; - - // expire dokuwiki caches - // touching local.php expires wiki page, JS and CSS caches - @touch(reset($config_cascade['main']['local'])); - - // update latest plugin date - FIXME - global $ID; - send_redirect(wl($ID,array('do'=>'admin','page'=>'plugin'),true, '&')); - } - - /** - * Write a log entry to the given target directory - */ - function plugin_writelog($target, $cmd, $data) { - - $file = $target.'/manager.dat'; - - switch ($cmd) { - case 'install' : - $url = $data[0]; - $date = date('r'); - if (!$fp = @fopen($file, 'w')) return; - fwrite($fp, "installed=$date\nurl=$url\n"); - fclose($fp); - break; - - case 'update' : - $url = $data[0]; - $date = date('r'); - if (!$fp = @fopen($file, 'r+')) return; - $buffer = ""; - while (($line = fgets($fp)) !== false) { - $urlFound = strpos($line,"url"); - if($urlFound !== false) $line="url=$url\n"; - $buffer .= $line; - } - $buffer .= "updated=$date\n"; - fseek($fp, 0); - fwrite($fp, $buffer); - fclose($fp); - break; - } - } - - function plugin_readlog($plugin, $field) { - static $log = array(); - $file = DOKU_PLUGIN.plugin_directory($plugin).'/manager.dat'; - - if (!isset($log[$plugin])) { - $tmp = @file_get_contents($file); - if (!$tmp) return ''; - $log[$plugin] = & $tmp; - } - - if ($field == 'ALL') { - return $log[$plugin]; - } - - $match = array(); - if (preg_match_all('/'.$field.'=(.*)$/m',$log[$plugin], $match)) - return implode("\n", $match[1]); - - return ''; - } - - /** - * delete, with recursive sub-directory support - */ - function dir_delete($path) { - if (!is_string($path) || $path == "") return false; - - if (is_dir($path) && !is_link($path)) { - if (!$dh = @opendir($path)) return false; - - while ($f = readdir($dh)) { - if ($f == '..' || $f == '.') continue; - $this->dir_delete("$path/$f"); - } - - closedir($dh); - return @rmdir($path); - } - return @unlink($path); - } - - -} diff --git a/lib/plugins/plugin/classes/ap_update.class.php b/lib/plugins/plugin/classes/ap_update.class.php deleted file mode 100644 index 5d7f6cb08..000000000 --- a/lib/plugins/plugin/classes/ap_update.class.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -require_once(DOKU_PLUGIN."/plugin/classes/ap_download.class.php"); -class ap_update extends ap_download { - - var $overwrite = true; - - function process() { - $plugin_url = $this->plugin_readlog($this->plugin, 'url'); - $this->download($plugin_url, $this->overwrite); - return ''; - } - - function html() { - parent::html(); - - ptln('<div class="pm_info">'); - ptln('<h2>'.$this->lang['updating'].'</h2>'); - - if ($this->manager->error) { - ptln('<div class="error">'.str_replace("\n","<br />", $this->manager->error).'</div>'); - } else if (count($this->downloaded) == 1) { - ptln('<p>'.sprintf($this->lang['updated'],$this->downloaded[0]).'</p>'); - } else if (count($this->downloaded)) { // more than one plugin in the download - ptln('<p>'.$this->lang['updates'].'</p>'); - ptln('<ul>'); - foreach ($this->downloaded as $plugin) { - ptln('<li><div class="li">'.$plugin.'</div></li>',2); - } - ptln('</ul>'); - } else { // none found in download - ptln('<p>'.$this->lang['update_none'].'</p>'); - } - ptln('</div>'); - } -} - diff --git a/lib/plugins/plugin/lang/af/lang.php b/lib/plugins/plugin/lang/af/lang.php deleted file mode 100644 index 669fdd5ce..000000000 --- a/lib/plugins/plugin/lang/af/lang.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/** - * Afrikaans language file - * - */ -$lang['btn_download'] = 'Af laai'; -$lang['btn_enable'] = 'Store'; -$lang['url'] = 'URL'; -$lang['unknown'] = 'unbekende'; -$lang['name'] = 'Naam:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Tipe:'; -$lang['www'] = 'Web-werf:'; diff --git a/lib/plugins/plugin/lang/ar/admin_plugin.txt b/lib/plugins/plugin/lang/ar/admin_plugin.txt deleted file mode 100644 index 2ef9fd595..000000000 --- a/lib/plugins/plugin/lang/ar/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== إدارة الإضافات ====== - -على هذه الصفحة يمكنك إدارة كل ما يتعلق ب[[doku>plugins|إضافات]] دوكو ويكي. لتتمكن من تنزيل و تثبيت الإضافات يجب أن يكون دليل الاضافات قابلا للكتابة من خادوم الوب. - diff --git a/lib/plugins/plugin/lang/ar/lang.php b/lib/plugins/plugin/lang/ar/lang.php deleted file mode 100644 index a1a778131..000000000 --- a/lib/plugins/plugin/lang/ar/lang.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * Arabic language file - * - * @author Yaman Hokan <always.smile.yh@hotmail.com> - * @author Usama Akkad <uahello@gmail.com> - * @author uahello@gmail.com - */ -$lang['menu'] = 'إدارة الملحقات'; -$lang['download'] = 'نزّل و ثبت اضافة جديدة'; -$lang['manage'] = 'الإضافات المثبتة'; -$lang['btn_info'] = 'معلومات'; -$lang['btn_update'] = 'حدّث'; -$lang['btn_delete'] = 'احذف'; -$lang['btn_settings'] = 'إعدادات'; -$lang['btn_download'] = 'نزل'; -$lang['btn_enable'] = 'احفظ'; -$lang['url'] = 'رابط'; -$lang['installed'] = 'ثُبتت:'; -$lang['lastupdate'] = 'آخر تحديث:'; -$lang['source'] = 'المصدر:'; -$lang['unknown'] = 'مجهول'; -$lang['updating'] = 'تُحدث ...'; -$lang['updated'] = 'الاضافة %s حُدثت بنجاح'; -$lang['updates'] = 'الاضافة التالية حُدثت بنجاح'; -$lang['update_none'] = 'لا يوجد تحديثات.'; -$lang['deleting'] = 'تُحذف ... '; -$lang['deleted'] = 'حُذفت الإضافة %s.'; -$lang['downloading'] = 'يُنزل ...'; -$lang['downloaded'] = 'الاضافة %s ثبتت بنجاح'; -$lang['downloads'] = 'الاضافة التالية ثبتت بنجاح:'; -$lang['download_none'] = 'لم يجد إضافة، أو ان هناك مشكلة غير معروفة أثناء التنزيل و التثبيت.'; -$lang['plugin'] = 'الإضافة:'; -$lang['components'] = 'المكون:'; -$lang['noinfo'] = 'لم تعطي الإضافة أية معلومة، قد تكون معطوبة.'; -$lang['name'] = 'الاسم :'; -$lang['date'] = 'التاريخ :'; -$lang['type'] = 'النوع :'; -$lang['desc'] = 'الوصف :'; -$lang['author'] = 'الكاتب :'; -$lang['www'] = 'الشابكة :'; -$lang['error'] = 'حث خطأ مجهول.'; -$lang['error_download'] = 'تعذر تنزيل ملف الاضافة: %s'; -$lang['error_badurl'] = 'اشتبه بعنوان خاطئ - تعذر الحصول على الاسم من العنوان'; -$lang['error_dircreate'] = 'تعذر إنشاء مجلد مؤقت للتنزيل'; -$lang['error_decompress'] = 'تعذر على مدير الاضافات فك ضغط الملف المُنزّل. قد يكون ذلك نتيجة لتنزيل خاطئ، في هذه الحالة أعد المحاولة; أو ان هيئة الضغط غير معروفة، في هذه الحالة عليك تنزيل و تثبيت الاضافة يدويا.'; -$lang['error_copy'] = 'كان هناك خطأ في نسخ ملف عند محاولة تثبيت ملفات للإضافة <em>%s</em>: قد يكون القرص ممتلئا أو أن صلاحيات الوصول للملف خاطئة. لربما نتج عن ذلك اضافة مثبته جزئيا تجعل نظام الويكي غير ثابت.'; -$lang['error_delete'] = 'كان هناك خطأ عند محاولة حذف الاضافة <em>%s</em>. السبب الاكثر احتمالا هو صلاحيات غير كافية على الملف أو المجلد'; -$lang['enabled'] = 'الاضافة %s فُعلت. '; -$lang['notenabled'] = 'تعذر تفعيل الاضافة %s، تحقق من اذونات الملف.'; -$lang['disabled'] = 'عُطلت الإضافة %s.'; -$lang['notdisabled'] = 'تعذر تعطيل الإضافة %s، تحقق من اذونات الملف.'; -$lang['packageinstalled'] = 'حزمة الإضافة (%d plugin(s): %s) ثبتت بنجاج.'; diff --git a/lib/plugins/plugin/lang/bg/admin_plugin.txt b/lib/plugins/plugin/lang/bg/admin_plugin.txt deleted file mode 100644 index bad73e136..000000000 --- a/lib/plugins/plugin/lang/bg/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Управление на приставките ====== - -От тази страница можете на управлявате [[doku>plugins|приставките]] на Dokuwiki. За да свалите и инсталирате приставка, е необходимо писането в директорията .../lib/plugins/ да е позволено на сървъра. diff --git a/lib/plugins/plugin/lang/bg/lang.php b/lib/plugins/plugin/lang/bg/lang.php deleted file mode 100644 index 09ac35229..000000000 --- a/lib/plugins/plugin/lang/bg/lang.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * bulgarian language file - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Nikolay Vladimirov <nikolay@vladimiroff.com> - * @author Viktor Usunov <usun0v@mail.bg> - * @author Kiril <neohidra@gmail.com> - */ -$lang['menu'] = 'Управление на приставките'; -$lang['download'] = 'Сваляне и инсталиране на нова приставка'; -$lang['manage'] = 'Инсталирани приставки'; -$lang['btn_info'] = 'информация'; -$lang['btn_update'] = 'обновяване'; -$lang['btn_delete'] = 'изтриване'; -$lang['btn_settings'] = 'настройки'; -$lang['btn_download'] = 'Сваляне'; -$lang['btn_enable'] = 'Запис'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Инсталирана:'; -$lang['lastupdate'] = 'Актуализирана:'; -$lang['source'] = 'Източник:'; -$lang['unknown'] = 'непознат'; -$lang['updating'] = 'Актуализиране ...'; -$lang['updated'] = 'Приставката %s е качена успешно'; -$lang['updates'] = 'Следните приставки са актуализирани успешно'; -$lang['update_none'] = 'Не са намерени нови версии.'; -$lang['deleting'] = 'Изтриване ...'; -$lang['deleted'] = 'Приставката %s е изтрита успешно.'; -$lang['downloading'] = 'Сваляне ...'; -$lang['downloaded'] = 'Приставката %s е инсталирана успешно '; -$lang['downloads'] = 'Следните приставки са инсталирани успешно:'; -$lang['download_none'] = 'Не са намерени приставки или е възникнала непозната грешка при свалянето и инсталирането.'; -$lang['plugin'] = 'Приставка:'; -$lang['components'] = 'Компоненти'; -$lang['noinfo'] = 'Приставка не върна информация, може да е повредена.'; -$lang['name'] = 'Име:'; -$lang['date'] = 'Дата:'; -$lang['type'] = 'Тип:'; -$lang['desc'] = 'Описание:'; -$lang['author'] = 'Автор:'; -$lang['www'] = 'Уебстраница:'; -$lang['error'] = 'Възникна непозната грешка.'; -$lang['error_download'] = 'Свалянето на приставката %s е невъзможно.'; -$lang['error_badurl'] = 'Предполагаем грешен адрес - не може да се определи име на файла от URL адреса'; -$lang['error_dircreate'] = 'Създаването на временна директория за сваляне не е възможно.'; -$lang['error_decompress'] = 'Разархивирането на сваленият файл е невъзможно. Вероятно е резултат от грешка при свалянето, в този случай трябва да опитате отново; или формата на компресия е непознат - тогава трябва да свалите и инсталирате приставката ръчно.'; -$lang['error_copy'] = 'Възникна грешка при копиране на файл по време на инсталиране на приставката <em>%s</em>: вероятно дискът е пълен или правата за достъп до файловете са грешни. Може да доведе до частично инсталирана приставка и да причини нестабилно функциониране на wiki-то ви.'; -$lang['error_delete'] = 'Възникна грешка при изтриването на приставката <em>%s</em>. Най-вероятната причина е в правата за достъп до файл или директория'; -$lang['enabled'] = 'Приставката %s е включена.'; -$lang['notenabled'] = 'Приставката %s не може да бъде включена, моля проверете правата за файловете.'; -$lang['disabled'] = 'Приставката %s е изключена.'; -$lang['notdisabled'] = 'Приставката %s не е изключена, моля проверете правата за файловете.'; -$lang['packageinstalled'] = 'Пакетът е инсталиран успешно (%d приставка: %s).'; diff --git a/lib/plugins/plugin/lang/ca-valencia/admin_plugin.txt b/lib/plugins/plugin/lang/ca-valencia/admin_plugin.txt deleted file mode 100644 index 6b5a95838..000000000 --- a/lib/plugins/plugin/lang/ca-valencia/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Gestor de plúgins ====== - -Des d'esta pàgina pot gestionar tot lo relacionat en els [[doku>plugins|plúgins]] de DokuWiki. Per a poder descarregar i instalar un plúgin, el servidor web deu poder escriure en la carpeta de plúgins. - diff --git a/lib/plugins/plugin/lang/ca-valencia/lang.php b/lib/plugins/plugin/lang/ca-valencia/lang.php deleted file mode 100644 index 3fbdb134d..000000000 --- a/lib/plugins/plugin/lang/ca-valencia/lang.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * valencian language file - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Bernat Arlandis i Mañó <berarma@ya.com> - * @author Bernat Arlandis <berarma@ya.com> - * @author Bernat Arlandis <berarma@llenguaitecnologia.com> - */ -$lang['menu'] = 'Gestor de plúgins'; -$lang['download'] = 'Descarregar i instalar un nou plúgin'; -$lang['manage'] = 'Plúgins instalats'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'actualisar'; -$lang['btn_delete'] = 'borrar'; -$lang['btn_settings'] = 'ajusts'; -$lang['btn_download'] = 'Descarregar'; -$lang['btn_enable'] = 'Guardar'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalat:'; -$lang['lastupdate'] = 'Última actualisació:'; -$lang['source'] = 'Font:'; -$lang['unknown'] = 'desconegut'; -$lang['updating'] = 'Actualisant ...'; -$lang['updated'] = 'Plúgin %s actualisat correctament'; -$lang['updates'] = 'Els següents plúgins s\'han actualisat correctament:'; -$lang['update_none'] = 'No s\'han trobat actualisacions.'; -$lang['deleting'] = 'Borrant ...'; -$lang['deleted'] = 'Plúgin %s borrat.'; -$lang['downloading'] = 'Descarregant ...'; -$lang['downloaded'] = 'Plúgin %s instalat correctament'; -$lang['downloads'] = 'Els següents plúgins s\'han instalat correctament:'; -$lang['download_none'] = 'No s\'han trobat plúgins o ha hagut algun problema descarregant i instalant.'; -$lang['plugin'] = 'Plúgin:'; -$lang['components'] = 'Components'; -$lang['noinfo'] = 'Este plúgin no ha tornat informació, pot ser invàlit.'; -$lang['name'] = 'Nom:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Classe:'; -$lang['desc'] = 'Descripció:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Ha ocorregut un erro desconegut.'; -$lang['error_download'] = 'No es pot descarregar l\'archiu del plúgin: %s'; -$lang['error_badurl'] = 'Possible URL roïn - no es pot determinar el nom de l\'archiu a partir de la URL'; -$lang['error_dircreate'] = 'No es pot crear la carpeta temporal per a rebre descàrregues'; -$lang['error_decompress'] = 'El gestor de plúgins no ha pogut descomprimir l\'archiu descarregat. Açò pot ser degut a una descàrrega fallida, en eixe cas deuria intentar-ho de nou; o el format de compressió pot ser desconegut, en eixe cas necessitarà descarregar i instalar el plúgin manualment.'; -$lang['error_copy'] = 'Ha ocorregut un erro copiant archius a l\'instalar archius del plúgin <em>%s</em>: el disc podria estar ple o els permissos d\'accés a l\'archiu estar mal. El plúgin podria haver quedat parcialment instalat i deixar el wiki inestable.'; -$lang['error_delete'] = 'Ha ocorregut un erro intentant borrar el plúgin <em>%s</em>. La causa més provable és que els permissos d\'accés a l\'archiu o el directori no siguen suficients'; -$lang['enabled'] = 'Plúgin %s activat.'; -$lang['notenabled'] = 'No s\'ha pogut activar el plúgin %s, comprove els permissos dels archius.'; -$lang['disabled'] = 'Plúgin %s desactivat.'; -$lang['notdisabled'] = 'No s\'ha pogut desactivar el plúgin %s, comprove els permissos dels archius.'; diff --git a/lib/plugins/plugin/lang/ca/admin_plugin.txt b/lib/plugins/plugin/lang/ca/admin_plugin.txt deleted file mode 100644 index c21e3f502..000000000 --- a/lib/plugins/plugin/lang/ca/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Gestió de connectors ====== - -En aquesta pàgina podeu gestionar tot allò referent als [[doku>plugins|connectors]] de Dokuwiki. Per a baixar i instal·lar connectors, cal que el servidor web tingui permís d'escriptura en la carpeta de connectors.
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/ca/lang.php b/lib/plugins/plugin/lang/ca/lang.php deleted file mode 100644 index 5c7933666..000000000 --- a/lib/plugins/plugin/lang/ca/lang.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * Catalan language file - * - * @author Carles Bellver <carles.bellver@gmail.com> - * @author carles.bellver@gmail.com - * @author carles.bellver@cent.uji.es - * @author Carles Bellver <carles.bellver@cent.uji.es> - * @author daniel@6temes.cat - */ -$lang['menu'] = 'Gestió de connectors'; -$lang['download'] = 'Baixa i instal·la un nou connector'; -$lang['manage'] = 'Connectors instal·lats'; -$lang['btn_info'] = 'informació'; -$lang['btn_update'] = 'actualitza'; -$lang['btn_delete'] = 'suprimeix'; -$lang['btn_settings'] = 'paràmetres'; -$lang['btn_download'] = 'Baixa'; -$lang['btn_enable'] = 'Desa'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instal·lació:'; -$lang['lastupdate'] = 'Darrera actualitació:'; -$lang['source'] = 'Font:'; -$lang['unknown'] = 'desconegut'; -$lang['updating'] = 'S\'està actualitzant...'; -$lang['updated'] = 'El connector %s s\'ha actualitzat amb èxit.'; -$lang['updates'] = 'Els connectors següents s\'han actualitzat amb èxit'; -$lang['update_none'] = 'No s\'han trobat actualitzacions.'; -$lang['deleting'] = 'S\'està suprimint...'; -$lang['deleted'] = 'S\'ha suprimit el connector %s.'; -$lang['downloading'] = 'S\'està baixant...'; -$lang['downloaded'] = 'El connector %s s\'ha instal·lat amb èxit'; -$lang['downloads'] = 'Els connectors següents s\'han instal·lat amb èxit:'; -$lang['download_none'] = 'No s\'han trobat connectors, o hi ha hagut un problema desconegut durant el procés de baixada i instal·lació.'; -$lang['plugin'] = 'Connector:'; -$lang['components'] = 'Components'; -$lang['noinfo'] = 'Aquest connector no ha retornat informació. Potser no és vàlid.'; -$lang['name'] = 'Nom:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipus:'; -$lang['desc'] = 'Descripció:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'S\'ha produït un error desconegut.'; -$lang['error_download'] = 'No s\'ha pogut baixar el fitxer del connector: %s'; -$lang['error_badurl'] = 'L\'URL no sembla vàlid: no permet determinar el nom del fitxer'; -$lang['error_dircreate'] = 'No s\'ha pogut crear una carpeta temporal per rebre la baixada'; -$lang['error_decompress'] = 'El gestor de connectors no ha pogut descomprimir el fitxer baixat. Potser no s\'ha baixat correctament, en el qual cas podríeu tornar a intentar-ho. O el format de compressió podria ser desconegut, en el qual cas hauríeu de baixar i instal·lar el connector manualment.'; -$lang['error_copy'] = 'S\'ha produït un error de còpia de fitxers quan s\'estaven instal·lant els fitxers del connector <em>%s</em>: potser el disc està ple o els permisos d\'accés són incorrectes. Això pot haver causat una instal·lació incompleta del connector i per tant el vostre wiki pot haver quedat en un estat inestable.'; -$lang['error_delete'] = 'S\'ha produït un error quan s\'intentava suprimir el connector <em>%s</em>. La causa més probable d\'això són uns permisos d\'accés insuficients al fitxer o al directori. '; -$lang['enabled'] = 'S\'ha habilitat el connector %s.'; -$lang['notenabled'] = 'No s\'ha pogut habilitar el connector %s. Comproveu els permisos dels fitxers.'; -$lang['disabled'] = 'S\'ha inhabilitat el connector %s.'; -$lang['notdisabled'] = 'No s\'ha pogut inhabilitar el connector %s. Comproveu els permisos dels fitxers.'; -$lang['packageinstalled'] = 'El paquet del connector (%d plugins(s): %s) s\'ha instal·lat correctament.'; diff --git a/lib/plugins/plugin/lang/cs/admin_plugin.txt b/lib/plugins/plugin/lang/cs/admin_plugin.txt deleted file mode 100644 index 6ebf1e78f..000000000 --- a/lib/plugins/plugin/lang/cs/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Správa pluginů ====== - -Na této stránce lze spravovat pluginy DokuWiki [[doku>plugins|plugins]]. Aby bylo možné stahovat a instalovat pluginy, musí mít webový server přístup pro zápis do adresáře //plugin//. diff --git a/lib/plugins/plugin/lang/cs/lang.php b/lib/plugins/plugin/lang/cs/lang.php deleted file mode 100644 index fb8b6cc4e..000000000 --- a/lib/plugins/plugin/lang/cs/lang.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Tomas Valenta <t.valenta@sh.cvut.cz> - * @author Zbynek Krivka <zbynek.krivka@seznam.cz> - * @author Bohumir Zamecnik <bohumir@zamecnik.org> - * @author tomas@valenta.cz - * @author Marek Sacha <sachamar@fel.cvut.cz> - * @author Lefty <lefty@multihost.cz> - * @author Vojta Beran <xmamut@email.cz> - * @author zbynek.krivka@seznam.cz - * @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com> - * @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'; -$lang['manage'] = 'Seznam instalovaných pluginů'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'aktualizovat'; -$lang['btn_delete'] = 'smazat'; -$lang['btn_settings'] = 'nastavení'; -$lang['btn_download'] = 'Stáhnout'; -$lang['btn_enable'] = 'Uložit'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalován:'; -$lang['lastupdate'] = 'Poslední aktualizace:'; -$lang['source'] = 'Zdroj:'; -$lang['unknown'] = 'neznámý'; -$lang['updating'] = 'Aktualizuji ...'; -$lang['updated'] = 'Modul %s úspěšně aktualizován'; -$lang['updates'] = 'Následující pluginy byly úspěšně aktualizovány'; -$lang['update_none'] = 'Žádné aktualizace nenalezeny.'; -$lang['deleting'] = 'Probíhá mazání ...'; -$lang['deleted'] = 'Plugin %s smazán.'; -$lang['downloading'] = 'Stahuji ...'; -$lang['downloaded'] = 'Plugin %s nainstalován'; -$lang['downloads'] = 'Následující pluginy byly úspěšně instalovány:'; -$lang['download_none'] = 'Žádné pluginy nebyly nenalezeny, nebo se vyskytla nějaká chyba při -stahování a instalaci.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Součásti'; -$lang['noinfo'] = 'Plugin nevrátil žádné informace. Může být poškozen nebo špatný.'; -$lang['name'] = 'Jméno:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Popis:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Nastala neznámá chyba.'; -$lang['error_download'] = 'Nelze stáhnout soubor s pluginem: %s'; -$lang['error_badurl'] = 'URL je zřejmě chybná - nelze z ní určit název souboru'; -$lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář ke stažení dat'; -$lang['error_decompress'] = 'Správce pluginů nemůže rozbalit stažený soubor. Toto může být způsobeno chybou při stahování. Můžete se pokusit stahování opakovat. Chyba může být také v kompresním formátu souboru. V tom případě bude nutné stáhnout a nainstalovat plugin ručně.'; -$lang['error_copy'] = 'Došlo k chybě při instalaci pluginu <em>%s</em>. Je možné, že na disku není volné místo, nebo mohou být špatně nastavena přístupová práva. Pozor, mohlo dojít k částečné a tudíž chybné instalaci pluginu a tím může být ohrožena stabilita wiki.'; -$lang['error_delete'] = 'Došlo k chybě při pokusu o smazání pluginu <em>%s</em>. Nejspíše je chyba v nastavení přístupových práv k některým souborům či adresářům.'; -$lang['enabled'] = 'Plugin %s aktivován.'; -$lang['notenabled'] = 'Plugin %s nelze aktivovat, zkontrolujte práva k souborům.'; -$lang['disabled'] = 'Plugin %s deaktivován.'; -$lang['notdisabled'] = 'Plugin %s nelze deaktivovat, zkontrolujte práva k souborům.'; -$lang['packageinstalled'] = 'Balíček pluginů (%d plugin(ů): %s) úspěšně nainstalován.'; diff --git a/lib/plugins/plugin/lang/da/admin_plugin.txt b/lib/plugins/plugin/lang/da/admin_plugin.txt deleted file mode 100644 index 300b6618b..000000000 --- a/lib/plugins/plugin/lang/da/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Udvidelsesstyring ====== - -På denne side kan du kontrollere alle Dokuwikis [[doku>plugins|udvidelser]]. For at hente og opsætte en udvidelse, må din udvidelsesmappe kunne skrives til af serveren. - - diff --git a/lib/plugins/plugin/lang/da/lang.php b/lib/plugins/plugin/lang/da/lang.php deleted file mode 100644 index d1deb6310..000000000 --- a/lib/plugins/plugin/lang/da/lang.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -/** - * Danish language file - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Lars Næsbye Christensen <larsnaesbye@stud.ku.dk> - * @author Kalle Sommer Nielsen <kalle@php.net> - * @author Esben Laursen <hyber@hyber.dk> - * @author Harith <haj@berlingske.dk> - * @author Daniel Ejsing-Duun <dokuwiki@zilvador.dk> - * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author rasmus@kinnerup.com - * @author Michael Pedersen subben@gmail.com - * @author Mikael Lyngvig <mikael@lyngvig.org> - */ -$lang['menu'] = 'Håndter udvidelser'; -$lang['download'] = 'Hent og tilføj ny udvidelse'; -$lang['manage'] = 'Tilføjede udvidelser'; -$lang['btn_info'] = 'oplysninger'; -$lang['btn_update'] = 'opdater'; -$lang['btn_delete'] = 'slet'; -$lang['btn_settings'] = 'indstillinger'; -$lang['btn_download'] = 'Hent'; -$lang['btn_enable'] = 'Gem'; -$lang['url'] = 'URL-adresse'; -$lang['installed'] = 'Tliføjet:'; -$lang['lastupdate'] = 'Sidst opdateret:'; -$lang['source'] = 'Kilde:'; -$lang['unknown'] = 'ukendt'; -$lang['updating'] = 'Opdaterer ...'; -$lang['updated'] = 'Udvidelse %s blev korrekt opdateret'; -$lang['updates'] = 'De følgende udvidelser blev opdateret korrekt:'; -$lang['update_none'] = 'Ingen opdateringer fundet.'; -$lang['deleting'] = 'Sletter ...'; -$lang['deleted'] = 'Udvidelsen %s slettet.'; -$lang['downloading'] = 'Henter ...'; -$lang['downloaded'] = 'Udvidelse %s blev korrekt installeret'; -$lang['downloads'] = 'De følgende udvidelser blev installeret korrekt:'; -$lang['download_none'] = 'Ingen udvidelser blev fundet, eller en ukendt fejl opstod under hentning og opsætning'; -$lang['plugin'] = 'Udvidelse:'; -$lang['components'] = 'Komponenter'; -$lang['noinfo'] = 'Denne udvidelse videregav ingen oplysninger. Den kan være fejlagtig.'; -$lang['name'] = 'Navn:'; -$lang['date'] = 'Dato:'; -$lang['type'] = 'Type:'; -$lang['desc'] = 'Beskrivelse:'; -$lang['author'] = 'Programmør:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'En ukendt fejl opstod.'; -$lang['error_download'] = 'Kunne ikke hente udvidelsesfilen: %s'; -$lang['error_badurl'] = 'Muligvis dårlig netadresse; kunne ikke hente filnavn fra adressen.'; -$lang['error_dircreate'] = 'Kunne ikke oprette midlertidig mappe til hentning'; -$lang['error_decompress'] = 'Udvidelseshåndtering kunne ikke udpakke den hentede fil. Det kan skyldes et fejlagtigt download, i hvilket fald du må prøve igen. Komprimeringsformatet kan også være ukendt, hvorved du du vil være nødt til at hente og opsætte udvidelsen manuelt.'; -$lang['error_copy'] = 'Der opstod en filkopieringsfejl under forsøget på at installere filerne til udvidelsen <em>%s</em>: Disken kan være fuld eller filadgangsrettighederne kan være forkert sat. Dette kan have ført til en delvist installeret udvidelse og efterladt din wiki-opsætning ustabil.'; -$lang['error_delete'] = 'Der opstod en fejl ved forsøget på at slette udvidelsen <em>%s</em>. Dette skyldes sandsynligvis utilstrækkelig adgang til filer eller mapper.'; -$lang['enabled'] = 'Udvidelsen %s blev aktiveret.'; -$lang['notenabled'] = 'Udvidelsen %s kunne ikke aktiveres. Kontroller filtilladelser.'; -$lang['disabled'] = 'Udvidelsen %s blev ikke aktiveret.'; -$lang['notdisabled'] = 'Udvidelsen %s kunne ikke aktiveres. Kontroller filtilladelser.'; -$lang['packageinstalled'] = 'Plugin pakke (%d plugin(s): %s) installeret korrekt.'; diff --git a/lib/plugins/plugin/lang/de-informal/admin_plugin.txt b/lib/plugins/plugin/lang/de-informal/admin_plugin.txt deleted file mode 100644 index 576797d57..000000000 --- a/lib/plugins/plugin/lang/de-informal/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -===== Erweiterungsmanagement ===== - -Auf dieser Seite kannst du alles anpassen was mit den DokuWiki [[doku>plugins|Erweiterungen]] zu tun hat. Der Ordner der Erweiterungen muss für den Webserver beschreibbar sein, um Erweiterungen herunterladen und installieren zu können.
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/de-informal/lang.php b/lib/plugins/plugin/lang/de-informal/lang.php deleted file mode 100644 index 8f1cea5e5..000000000 --- a/lib/plugins/plugin/lang/de-informal/lang.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Alexander Fischer <tbanus@os-forge.net> - * @author Juergen Schwarzer <jschwarzer@freenet.de> - * @author Marcel Metz <marcel_metz@gmx.de> - * @author Matthias Schulte <post@lupo49.de> - * @author Christian Wichmann <nospam@zone0.de> - * @author Pierre Corell <info@joomla-praxis.de> - * @author Frank Loizzi <contact@software.bacal.de> - * @author Volker Bödker <volker@boedker.de> - */ -$lang['menu'] = 'Plugins verwalten'; -$lang['download'] = 'Herunterladen und installieren einer neuen Erweiterung'; -$lang['manage'] = 'Installierte Erweiterungen'; -$lang['btn_info'] = 'Information'; -$lang['btn_update'] = 'aktualisieren'; -$lang['btn_delete'] = 'löschen'; -$lang['btn_settings'] = 'Einstellungen'; -$lang['btn_download'] = 'Herunterladen'; -$lang['btn_enable'] = 'Speichern'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installiert:'; -$lang['lastupdate'] = 'Letzte Aktualisierung:'; -$lang['source'] = 'Quellen:'; -$lang['unknown'] = 'unbekannt'; -$lang['updating'] = 'Aktualisiere...'; -$lang['updated'] = 'Erweiterung %s wurde erfolgreich aktualisiert.'; -$lang['updates'] = 'Die folgenden Erweiterungen wurden erfolgreich aktualisiert.'; -$lang['update_none'] = 'Keine Aktualisierungen gefunden.'; -$lang['deleting'] = 'Lösche...'; -$lang['deleted'] = 'Erweiterung %s wurde gelöscht.'; -$lang['downloading'] = 'Herunterladen...'; -$lang['downloaded'] = 'Erweiterung %s wurde erfolgreich installiert'; -$lang['downloads'] = 'Die folgenden Erweiterungen wurden erfolgreich installiert:'; -$lang['download_none'] = 'Keine Erweiterungen gefunden oder es trat ein unbekanntest Problem beim Herunterladen und Installieren auf.'; -$lang['plugin'] = 'Erweiterung:'; -$lang['components'] = 'Komponenten'; -$lang['noinfo'] = 'Diese Erweiterung gab keine Information zurück - sie könnte ungültig sein.'; -$lang['name'] = 'Name:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Beschreibung:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Internet:'; -$lang['error'] = 'Es ist ein unbekannter Fehler aufgetreten.'; -$lang['error_download'] = 'Nicht möglich die Erweiterung herunterzuladen: %s'; -$lang['error_badurl'] = 'Vermute schlechte URL - nicht möglich den Dateinamen aus der URL zu ermitteln'; -$lang['error_dircreate'] = 'Nicht möglich einen temporären Ordner zu erstellen um den Download zu empfangen.'; -$lang['error_decompress'] = 'Dem Erweiterungsmanager war es nicht möglich die heruntergeladene Datei zu dekomprimieren. Dies kann an einem defekten Download liegen, in diesem Fall sollten Sie es erneut versuchen; oder das Format mit dem die Datei komprimiert ist, ist unbekannt, da müssen Sie die Erweiterung manuell herunterladen und installieren. '; -$lang['error_copy'] = 'Es trat ein Dateifehler beim Kopieren der Installationsdateien für die Erweiterung <em>%s</em> auf: Die Festplatte könnte voll oder die Zugriffsrechte verweigert worden sein. Dies führt zu einer teilweise installierten Erweiterung und belässt dein Wiki in einem instabilen Zustand.'; -$lang['error_delete'] = 'Es trat ein Fehler beim Löschen der Erweiterung <em>%s</em> auf. Die wahrscheinlichste Ursache ist eine unzureichende Datei- oder Ordnerzugriffserlaubnis.'; -$lang['enabled'] = 'Erweiterung %s aktiviert.'; -$lang['notenabled'] = 'Erweiterung %s konnte nicht aktiviert werden. Überprüfen sie die Zugriffsberechtigung der Datei.'; -$lang['disabled'] = 'Erweiterung %s deaktiviert.'; -$lang['notdisabled'] = 'Erweiterung %s konnte nicht deaktiviert werden - überprüfe Dateiberechtigungen'; -$lang['packageinstalled'] = 'Plugin-Paket (%d Plugin(s): %s) erfolgreich installiert.'; diff --git a/lib/plugins/plugin/lang/de/admin_plugin.txt b/lib/plugins/plugin/lang/de/admin_plugin.txt deleted file mode 100644 index f3b2caa0c..000000000 --- a/lib/plugins/plugin/lang/de/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Verwaltung der Plugins ====== - -Auf dieser Seite kannst du alles machen, was mit DokuWiki [[doku>plugins|Plugins]] zu tun hat. Um Plugins automatisch herunterladen und installieren zu können, muss der Webserver im Plugin-Ordner schreiben dürfen. - - diff --git a/lib/plugins/plugin/lang/de/lang.php b/lib/plugins/plugin/lang/de/lang.php deleted file mode 100644 index f41486007..000000000 --- a/lib/plugins/plugin/lang/de/lang.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Esther Brunner <esther@kaffeehaus.ch> - * @author Andreas Gohr <andi@splitbrain.org> - * @author Michael Klier <chi@chimeric.de> - * @author Leo Moll <leo@yeasoft.com> - * @author Florian Anderiasch <fa@art-core.org> - * @author Robin Kluth <commi1993@gmail.com> - * @author Arne Pelka <mail@arnepelka.de> - * @author Dirk Einecke <dirk@dirkeinecke.de> - * @author Blitzi94@gmx.de - * @author Robert Bogenschneider <robog@GMX.de> - * @author Robert Bogenschneider <robog@gmx.de> - * @author Niels Lange <niels@boldencursief.nl> - * @author Christian Wichmann <nospam@zone0.de> - * @author Paul Lachewsky <kaeptn.haddock@gmail.com> - * @author Pierre Corell <info@joomla-praxis.de> - */ -$lang['menu'] = 'Plugins verwalten'; -$lang['download'] = 'Neues Plugin herunterladen und installieren'; -$lang['manage'] = 'Installierte Plugins'; -$lang['btn_info'] = 'Info'; -$lang['btn_update'] = 'Update'; -$lang['btn_delete'] = 'Löschen'; -$lang['btn_settings'] = 'Einstellungen'; -$lang['btn_download'] = 'Herunterladen'; -$lang['btn_enable'] = 'Speichern'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installiert:'; -$lang['lastupdate'] = 'Letzte Version:'; -$lang['source'] = 'Quelle:'; -$lang['unknown'] = 'unbekannt'; -$lang['updating'] = 'Lade Update ...'; -$lang['updated'] = 'Update von Plugin %s erfolgreich installiert'; -$lang['updates'] = 'Die folgenden Plugins wurden erfolgreich aktualisiert'; -$lang['update_none'] = 'Keine Updates gefunden.'; -$lang['deleting'] = 'Löschen ...'; -$lang['deleted'] = 'Plugin %s gelöscht.'; -$lang['downloading'] = 'Lade herunter ...'; -$lang['downloaded'] = 'Plugin %s erfolgreich installiert'; -$lang['downloads'] = 'Die folgenden Plugins wurden erfolgreich installiert:'; -$lang['download_none'] = 'Keine Plugins gefunden oder es trat ein Fehler beim Herunterladen auf.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Komponenten'; -$lang['noinfo'] = 'Dieses Plugin liefert keine Informationen, möglicherweise ist es fehlerhaft.'; -$lang['name'] = 'Name:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Beschreibung:'; -$lang['author'] = 'Entwickler:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Ein unbekannter Fehler ist aufgetreten.'; -$lang['error_download'] = 'Konnte das Plugin %s nicht herunterladen'; -$lang['error_badurl'] = 'Wahrscheinlich ungültige URL, konnte keinen Dateinamen ausfindig machen'; -$lang['error_dircreate'] = 'Konnte keinen temporären Ordner für die Downloads erstellen'; -$lang['error_decompress'] = 'Der Plugin Manager konnte das Plugin-Archiv nicht entpacken. Entweder ist der Download fehlerhaft oder das Komprimierungsverfahren wird nicht unterstützt. Bitte versuchen Sie es erneut oder downloaden und installieren Sie das Plugin manuell.'; -$lang['error_copy'] = 'Beim Kopieren der Dateien des Plugins trat ein Fehler auf <em>%s</em>: möglicherweise ist die Festplatte voll oder die Dateiberechtigungen falsch. Möglicherweise wurde das Plugin nur teilweise installiert. Sie sollten das Plugin manuell entfernen um Instabilitäten zu vermeiden.'; -$lang['error_delete'] = 'Es gab einem Fehler beim Versuch das Plugin zu löschen <em>%s</em>. Dies liegt wahrscheinlich an fehlenden Dateiberechtigungen.'; -$lang['enabled'] = 'Plugin %s wurde aktiviert.'; -$lang['notenabled'] = 'Plugin %s konnte nicht aktiviert werden, überprüfen Sie die Dateirechte.'; -$lang['disabled'] = 'Plugin %s wurde deaktiviert.'; -$lang['notdisabled'] = 'Plugin %s konnte nicht deaktiviert werden, überprüfen Sie die Dateirechte.'; -$lang['packageinstalled'] = 'Plugin-Paket (%d Plugin(s): %s) erfolgreich installiert.'; diff --git a/lib/plugins/plugin/lang/el/admin_plugin.txt b/lib/plugins/plugin/lang/el/admin_plugin.txt deleted file mode 100644 index 8b292935d..000000000 --- a/lib/plugins/plugin/lang/el/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Διαχείριση Επεκτάσεων ====== - -Σε αυτή την σελίδα μπορείτε να διαχειριστείτε τις [[doku>plugins|επεκτάσεις]] του Dokuwiki σας. Για να μπορέσετε να εγκαταστήσετε νέες επεκτάσεις, ο αντίστοιχος φάκελος συστήματος θα πρέπει να είναι εγγράψιμος από τον χρήστη κάτω από τον οποίο εκτελείται η εφαρμογή του εξυπηρετητή σας. - - diff --git a/lib/plugins/plugin/lang/el/lang.php b/lib/plugins/plugin/lang/el/lang.php deleted file mode 100644 index f50e26c46..000000000 --- a/lib/plugins/plugin/lang/el/lang.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Christopher Smith <chris@jalakai.co.uk> - * @author Thanos Massias <tm@thriasio.gr> - * @author Αθανάσιος Νταής <homunculus@wana.gr> - * @author Konstantinos Koryllos <koryllos@gmail.com> - * @author George Petsagourakis <petsagouris@gmail.com> - * @author Petros Vidalis <pvidalis@gmail.com> - * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com - */ -$lang['menu'] = 'Διαχείριση Επεκτάσεων'; -$lang['download'] = 'Κατεβάστε και εγκαταστήστε μια νέα επέκταση (plugin)'; -$lang['manage'] = 'Εγκατεστημένες επεκτάσεις'; -$lang['btn_info'] = 'πληροφορίες'; -$lang['btn_update'] = 'ενημέρωση'; -$lang['btn_delete'] = 'διαγραφή'; -$lang['btn_settings'] = 'ρυθμίσεις'; -$lang['btn_download'] = 'Μεταφόρτωση'; -$lang['btn_enable'] = 'Αποθήκευση'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Εγκατεστημένη:'; -$lang['lastupdate'] = 'Τελευταία ενημέρωση:'; -$lang['source'] = 'Προέλευση:'; -$lang['unknown'] = 'άγνωστο'; -$lang['updating'] = 'Σε διαδικασία ενημέρωσης ...'; -$lang['updated'] = 'Η επέκταση %s ενημερώθηκε με επιτυχία'; -$lang['updates'] = 'Οι παρακάτω επεκτάσεις ενημερώθηκαν με επιτυχία:'; -$lang['update_none'] = 'Δεν βρέθηκαν ενημερώσεις.'; -$lang['deleting'] = 'Σε διαδικασία διαγραφής ...'; -$lang['deleted'] = 'Η επέκταση %s διαγράφηκε.'; -$lang['downloading'] = 'Σε διαδικασία μεταφόρτωσης ...'; -$lang['downloaded'] = 'Η επέκταση %s εγκαταστάθηκε με επιτυχία'; -$lang['downloads'] = 'Οι παρακάτω επεκτάσεις εγκαταστάθηκαν με επιτυχία:'; -$lang['download_none'] = 'Δεν βρέθηκαν επεκτάσεις ή εμφανίστηκε κάποιο πρόβλημα κατά την σχετική διαδικασία.'; -$lang['plugin'] = 'Επέκταση:'; -$lang['components'] = 'Συστατικά'; -$lang['noinfo'] = 'Αυτή η επέκταση δεν επέστρεψε κάποια πληροφορία - η επέκταση μπορεί να μην λειτουργεί κανονικά.'; -$lang['name'] = 'Όνομα:'; -$lang['date'] = 'Ημερομηνία:'; -$lang['type'] = 'Τύπος:'; -$lang['desc'] = 'Περιγραφή:'; -$lang['author'] = 'Συγγραφέας:'; -$lang['www'] = 'Διεύθυνση στο διαδίκτυο:'; -$lang['error'] = 'Εμφανίστηκε άγνωστο σφάλμα.'; -$lang['error_download'] = 'Δεν είναι δυνατή η μεταφόρτωση του αρχείου: %s'; -$lang['error_badurl'] = 'Το URL είναι μάλλον λανθασμένο - είναι αδύνατον να εξαχθεί το όνομα αρχείου από αυτό το URL'; -$lang['error_dircreate'] = 'Δεν είναι δυνατή η δημιουργία ενός προσωρινού φακέλου αποθήκευσης των μεταφορτώσεων'; -$lang['error_decompress'] = 'Δεν είναι δυνατή η αποσυμπίεση των μεταφορτώσεων. Αυτό μπορεί να οφείλεται σε μερική λήψη των μεταφορτώσεων, οπότε θα πρέπει να επαναλάβετε την διαδικασία ή το σύστημά σας δεν μπορεί να διαχειριστεί το συγκεκριμένο είδος συμπίεσης, οπότε θα πρέπει να εγκαταστήσετε την επέκταση χειροκίνητα.'; -$lang['error_copy'] = 'Εμφανίστηκε ένα σφάλμα αντιγραφής αρχείων κατά την διάρκεια εγκατάστασης της επέκτασης <em>%s</em>: ο δίσκος μπορεί να είναι γεμάτος ή να μην είναι σωστά ρυθμισμένα τα δικαιώματα πρόσβασης. Αυτό το γεγονός μπορεί να οδήγησε σε μερική εγκατάσταση της επέκτασης και άρα η DokuWiki εγκατάστασή σας να εμφανίσει προβλήματα σταθερότητας.'; -$lang['error_delete'] = 'Εμφανίστηκε ένα σφάλμα κατά την διαδικασία διαγραφής της επέκτασης <em>%s</em>. Η πιθανότερη αιτία είναι να μην είναι σωστά ρυθμισμένα τα δικαιώματα πρόσβασης.'; -$lang['enabled'] = 'Η επέκταση %s ενεργοποιήθηκε.'; -$lang['notenabled'] = 'Η επέκταση %s δεν μπορεί να ενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.'; -$lang['disabled'] = 'Η επέκταση %s απενεργοποιήθηκε.'; -$lang['notdisabled'] = 'Η επέκταση %s δεν μπορεί να απενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.'; -$lang['packageinstalled'] = 'Το πακέτο της επέκτασης (%d επέκταση(εις): %s) εγκαστήθηκε επιτυχημένα.'; diff --git a/lib/plugins/plugin/lang/en/admin_plugin.txt b/lib/plugins/plugin/lang/en/admin_plugin.txt deleted file mode 100644 index cb23b1e02..000000000 --- a/lib/plugins/plugin/lang/en/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Plugin Management ====== - -On this page you can manage everything to do with Dokuwiki [[doku>plugins|plugins]]. To be able to download and install a plugin your plugin folder must be writeable by the webserver. - - diff --git a/lib/plugins/plugin/lang/en/lang.php b/lib/plugins/plugin/lang/en/lang.php deleted file mode 100644 index 87570a708..000000000 --- a/lib/plugins/plugin/lang/en/lang.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php -/** - * english language file - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Christopher Smith <chris@jalakai.co.uk> - */ - -$lang['menu'] = 'Manage Plugins'; - -// custom language strings for the plugin -$lang['download'] = "Download and install a new plugin"; -$lang['manage'] = "Installed Plugins"; - -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'update'; -$lang['btn_delete'] = 'delete'; -$lang['btn_settings'] = 'settings'; -$lang['btn_download'] = 'Download'; -$lang['btn_enable'] = 'Save'; - -$lang['url'] = 'URL'; - -$lang['installed'] = 'Installed:'; -$lang['lastupdate'] = 'Last updated:'; -$lang['source'] = 'Source:'; -$lang['unknown'] = 'unknown'; - -// ..ing = header message -// ..ed = success message - -$lang['updating'] = 'Updating ...'; -$lang['updated'] = 'Plugin %s updated successfully'; -$lang['updates'] = 'The following plugins have been updated successfully'; -$lang['update_none'] = 'No updates found.'; - -$lang['deleting'] = 'Deleting ...'; -$lang['deleted'] = 'Plugin %s deleted.'; - -$lang['downloading'] = 'Downloading ...'; -$lang['downloaded'] = 'Plugin %s installed successfully'; -$lang['downloads'] = 'The following plugins have been installed successfully:'; -$lang['download_none'] = 'No plugins found, or there has been an unknown problem during downloading and installing.'; - -// info titles -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Components'; -$lang['noinfo'] = 'This plugin returned no information, it may be invalid.'; -$lang['name'] = 'Name:'; -$lang['date'] = 'Date:'; -$lang['type'] = 'Type:'; -$lang['desc'] = 'Description:'; -$lang['author'] = 'Author:'; -$lang['www'] = 'Web:'; - -// error messages -$lang['error'] = 'An unknown error occurred.'; -$lang['error_download'] = 'Unable to download the plugin file: %s'; -$lang['error_badurl'] = 'Suspect bad url - unable to determine file name from the url'; -$lang['error_dircreate'] = 'Unable to create temporary folder to receive download'; -$lang['error_decompress'] = 'The plugin manager was unable to decompress the downloaded file. '. - 'This maybe as a result of a bad download, in which case you should try again; '. - 'or the compression format may be unknown, in which case you will need to '. - 'download and install the plugin manually.'; -$lang['error_copy'] = 'There was a file copy error while attempting to install files for plugin '. - '<em>%s</em>: the disk could be full or file access permissions may be incorrect. '. - 'This may have resulted in a partially installed plugin and leave your wiki '. - 'installation unstable.'; -$lang['error_delete'] = 'There was an error while attempting to delete plugin <em>%s</em>. '. - 'The most probably cause is insufficient file or directory access permissions'; - -$lang['enabled'] = 'Plugin %s enabled.'; -$lang['notenabled'] = 'Plugin %s could not be enabled, check file permissions.'; -$lang['disabled'] = 'Plugin %s disabled.'; -$lang['notdisabled'] = 'Plugin %s could not be disabled, check file permissions.'; -$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) successfully installed.'; - -//Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/plugin/lang/eo/admin_plugin.txt b/lib/plugins/plugin/lang/eo/admin_plugin.txt deleted file mode 100644 index c97dddf56..000000000 --- a/lib/plugins/plugin/lang/eo/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Administrado de Kromaĵoj ====== - -En tiu ĉi paĝo vi povas administri ĉion pri DokuWiki-aj [[doku>plugins|kromaĵoj]]. Por sukcesi elŝuti kaj instali kromaĵon, via dosierujo de kromaĵoj devas esti konservebla por la retservilo. diff --git a/lib/plugins/plugin/lang/eo/lang.php b/lib/plugins/plugin/lang/eo/lang.php deleted file mode 100644 index 624246a21..000000000 --- a/lib/plugins/plugin/lang/eo/lang.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Felipe Castro <fefcas@uol.com.br> - * @author Felipe Castro <fefcas@gmail.com> - * @author Felipe Castro <fefcas (cxe) gmail (punkto) com> - * @author Felipo Kastro <fefcas@gmail.com> - * @author Erik Pedersen <erik pedersen@shaw.ca> - * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert BOGENSCHNEIDER <robog@gmx.de> - * @author Robert Bogenschneider <bogi@uea.org> - * @author Robert Bogenschneider <robog@gmx.de> - */ -$lang['menu'] = 'Administri Kromaĵojn'; -$lang['download'] = 'Elŝuti kaj instali novan kromaĵon'; -$lang['manage'] = 'Instalitaj kromaĵoj'; -$lang['btn_info'] = 'Info'; -$lang['btn_update'] = 'Ĝisdatigo'; -$lang['btn_delete'] = 'Forigi'; -$lang['btn_settings'] = 'agordoj'; -$lang['btn_download'] = 'Elŝuti'; -$lang['btn_enable'] = 'Konservi'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalite:'; -$lang['lastupdate'] = 'Laste ĝisdatigite:'; -$lang['source'] = 'Fonto:'; -$lang['unknown'] = 'nekonate'; -$lang['updating'] = 'Ĝisdatiganta ...'; -$lang['updated'] = 'Kromaĵo %s estas sukcese ĝisdatigita'; -$lang['updates'] = 'Jenaj kromaĵoj estas sukcese ĝisdatigitaj'; -$lang['update_none'] = 'Neniu ĝisdatigo troviĝas.'; -$lang['deleting'] = 'Foriganta ...'; -$lang['deleted'] = 'Kromaĵo %s estas forigita.'; -$lang['downloading'] = 'Elŝutanta ...'; -$lang['downloaded'] = 'La kromaĵo %s estas sukcese instalita'; -$lang['downloads'] = 'Jenaj kromaĵoj estas sukcese instalitaj:'; -$lang['download_none'] = 'Neniu kromaĵo troveblas, aŭ eble okazis nekonata problemo dum elŝuto kaj instalo.'; -$lang['plugin'] = 'Kromaĵo:'; -$lang['components'] = 'Komponantoj'; -$lang['noinfo'] = 'Tiu ĉi kromaĵo liveris neniun informon: eble ĝi ne validas.'; -$lang['name'] = 'Nomo:'; -$lang['date'] = 'Dato:'; -$lang['type'] = 'Tipo:'; -$lang['desc'] = 'Priskribo:'; -$lang['author'] = 'Aŭtoro:'; -$lang['www'] = 'Retpaĝo:'; -$lang['error'] = 'Nekonata eraro okazis.'; -$lang['error_download'] = 'Maleblas elŝuti la kromaĵan dosieron: %s'; -$lang['error_badurl'] = 'Suspektinda malbona URL - maleblas difini la dosieran nomon el la URL'; -$lang['error_dircreate'] = 'Maleblas krei provizoran dosierujon por ricevi elŝutaĵon'; -$lang['error_decompress'] = 'La administrilo de kromaĵoj ne kapablis malkompakti la elŝutitan dosieron. Tio povas esti pro malkompleta elŝuto, tiaokaze provu refoje; aŭ eble la kompakta formato ne estas konata, tiaokaze elŝutu kaj instalu la kromaĵon permane.'; -$lang['error_copy'] = 'Okazis eraro de dosierkopio dum provo instali dosierojn por la kromaĵo <em>%s&</em>: la disko povus esti plenplena aŭ aliro-rajtoj povus esti misdifinitaj. Tio povus rezulti en malkomplete instalita kromaĵo kaj igi vian vikion malstabila.'; -$lang['error_delete'] = 'Okazis eraro dum provo forigi la kromaĵon <em>%s</em>. Verŝajne tio sekvas de nesufiĉa rajto por aliri la dosieron aŭ ties ujon.'; -$lang['enabled'] = 'La kromaĵo %s estas ebligita.'; -$lang['notenabled'] = 'La kromaĵo %s ne povis esti ebligita, kontrolu dosier-permesojn.'; -$lang['disabled'] = 'La kromaĵo %s estas malebligita.'; -$lang['notdisabled'] = 'La kromaĵo %s ne povis esti malebligita, kontrolu dosier-permesojn.'; -$lang['packageinstalled'] = 'Kromaĵa pakaĵo (%d kromaĵo(j): %s) sukcese instalita.'; diff --git a/lib/plugins/plugin/lang/es/admin_plugin.txt b/lib/plugins/plugin/lang/es/admin_plugin.txt deleted file mode 100644 index 973789f03..000000000 --- a/lib/plugins/plugin/lang/es/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Administración de Plugin (agregados) ====== - -En esta página tu puedes administrar todo lo que tenga que ver con los [[doku>plugins|plugins]] de Dokuwiki. Para poder descargar e instalar un plugin el usuario correspondiente al servidor de web debe poder escribir en el directorio de plugins. diff --git a/lib/plugins/plugin/lang/es/lang.php b/lib/plugins/plugin/lang/es/lang.php deleted file mode 100644 index 0ec39285b..000000000 --- a/lib/plugins/plugin/lang/es/lang.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Miguel Pagano <miguel.pagano@gmail.com> - * @author Oscar M. Lage <r0sk10@gmail.com> - * @author Gabriel Castillo <gch@pumas.ii.unam.mx> - * @author oliver@samera.com.py - * @author Enrico Nicoletto <liverig@gmail.com> - * @author Manuel Meco <manuel.meco@gmail.com> - * @author VictorCastelan <victorcastelan@gmail.com> - * @author Jordan Mero hack.jord@gmail.com - * @author Felipe Martinez <metalmartinez@gmail.com> - * @author Javier Aranda <internet@javierav.com> - * @author Zerial <fernando@zerial.org> - * @author Marvin Ortega <maty1206@maryanlinux.com> - * @author Daniel Castro Alvarado <dancas2@gmail.com> - * @author Fernando J. Gómez <fjgomez@gmail.com> - * @author Victor Castelan <victorcastelan@gmail.com> - * @author Mauro Javier Giamberardino <mgiamberardino@gmail.com> - * @author emezeta <emezeta@infoprimo.com> - * @author Oscar Ciudad <oscar@jacho.net> - * @author Ruben Figols <ruben.figols@gmail.com> - * @author Gerardo Zamudio <gerardo@gerardozamudio.net> - * @author Mercè López mercelz@gmail.com - */ -$lang['menu'] = 'Administración de Plugins'; -$lang['download'] = 'Descargar e instalar un nuevo plugin'; -$lang['manage'] = 'Plugins instalados'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'actualizar'; -$lang['btn_delete'] = 'borrar'; -$lang['btn_settings'] = 'configuraciones'; -$lang['btn_download'] = 'Descargar'; -$lang['btn_enable'] = 'Guardar'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalado:'; -$lang['lastupdate'] = 'Última actualización:'; -$lang['source'] = 'Origen:'; -$lang['unknown'] = 'desconocido'; -$lang['updating'] = 'Actualizando ...'; -$lang['updated'] = 'El plugin %s ha sido actualizado con éxito'; -$lang['updates'] = 'Los siguientes plugins han sido actualizados con éxito'; -$lang['update_none'] = 'No se encontraron actualizaciones.'; -$lang['deleting'] = 'Eliminando ...'; -$lang['deleted'] = 'El plugin %s ha sido eliminado.'; -$lang['downloading'] = 'Descargando ...'; -$lang['downloaded'] = 'El plugin %s ha sido instalado con éxito'; -$lang['downloads'] = 'Los siguientes plugins han sido instalados con éxito:'; -$lang['download_none'] = 'No se han encontrado plugins, o hubo algún problema durante la descarga o la instalación.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Componentes'; -$lang['noinfo'] = 'Este plugin no devolvió información, puede ser inválido.'; -$lang['name'] = 'Nombre:'; -$lang['date'] = 'Fecha:'; -$lang['type'] = 'Tipo:'; -$lang['desc'] = 'Descripción:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Ha ocurrido un error desconocido.'; -$lang['error_download'] = 'Incapaz de descargar el archivo del plugin: %s'; -$lang['error_badurl'] = 'Se sospecha que la URL es incorrecta - incapaz de determinar el nombre del archivo a partir de la URL.'; -$lang['error_dircreate'] = 'Incapaz de crear el directorio temporal para la descarga'; -$lang['error_decompress'] = 'El administrador de plugins fue incapaz de descomprimir el fichero descargado. Esto puede ser por una descarga errónea, en cuyo caso debieras intentar nuevamente; o el formato de compresión es desconocido, en este caso deberás descargar e instalar el plugin manualmente.'; -$lang['error_copy'] = 'Hubo un error al copiar el fichero mientras se intentaban instalar ficheros para el plugin <em>%s</em>: el disco puede estar lleno o los permisos del fichero pueden ser incorrectos. Esto puede haber terminado con una instalación parcial del plugin y haber dejado la instalación del wiki en una situación inestable'; -$lang['error_delete'] = 'Hubo un error al intentar eliminar el plugin <em>%s</em>. La causa más probable es que no se cuente con los permisos necesarios en el fichero o en el directorio'; -$lang['enabled'] = 'Plugin %s habilitado.'; -$lang['notenabled'] = 'Plugin %s no puede ser habilitado, verifica los permisos del archivo.'; -$lang['disabled'] = 'Plugin %s deshabilitado.'; -$lang['notdisabled'] = 'Plugin %s no puede ser deshabilitado, verifica los permisos de archivo.'; -$lang['packageinstalled'] = 'Plugin (%d plugin(s): %s) instalado exitosamente.'; diff --git a/lib/plugins/plugin/lang/et/lang.php b/lib/plugins/plugin/lang/et/lang.php deleted file mode 100644 index 088acf39b..000000000 --- a/lib/plugins/plugin/lang/et/lang.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -/** - * Estonian language file - * - * @author kristian.kankainen@kuu.la - * @author Rivo Zängov <eraser@eraser.ee> - */ -$lang['manage'] = 'Paigaldatud pluginad'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'uuenda'; -$lang['btn_delete'] = 'kustuta'; -$lang['btn_settings'] = 'seaded'; -$lang['btn_download'] = 'Lae alla'; -$lang['btn_enable'] = 'Salvesta'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Paigaldatud:'; -$lang['lastupdate'] = 'Viimati uuendatud:'; -$lang['source'] = 'Allikas:'; -$lang['unknown'] = 'tundmatu'; -$lang['updating'] = 'Uuendamine ...'; -$lang['update_none'] = 'Uuendusi ei leitud.'; -$lang['deleting'] = 'Kustutamine ...'; -$lang['deleted'] = 'Plugin %s on kustutatud.'; -$lang['downloading'] = 'Allalaadimine ...'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Komponendid'; -$lang['name'] = 'Nimi:'; -$lang['date'] = 'Kuupäev'; -$lang['type'] = 'Tüüp:'; -$lang['desc'] = 'Kirjeldus:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Veeb:'; diff --git a/lib/plugins/plugin/lang/eu/admin_plugin.txt b/lib/plugins/plugin/lang/eu/admin_plugin.txt deleted file mode 100644 index 367cf37ee..000000000 --- a/lib/plugins/plugin/lang/eu/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Plugin Kudeaketa ====== - -Orri honetan Dokuwiki [[doku>plugins|plugin-ekin]] erlazionatutako edozer kudeatu dezakezu. Plugin-en bat deskargatu eta instalatu ahal izateko, plugin-en direktorioak web zerbitzariarengatik idazgarria izan behar du. diff --git a/lib/plugins/plugin/lang/eu/lang.php b/lib/plugins/plugin/lang/eu/lang.php deleted file mode 100644 index 2fc07fef9..000000000 --- a/lib/plugins/plugin/lang/eu/lang.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * Basque language file - * - * @author Inko Illarramendi <inko.i.a@gmail.com> - * @author Zigor Astarbe <astarbe@gmail.com> - */ -$lang['menu'] = 'Plugin-ak Kudeatu'; -$lang['download'] = 'Plugin berri bat deskargatu eta instalatu'; -$lang['manage'] = 'Instalatutako Plugin-ak'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'eguneratu'; -$lang['btn_delete'] = 'ezabatu'; -$lang['btn_settings'] = 'ezarpenak'; -$lang['btn_download'] = 'Deskargatu'; -$lang['btn_enable'] = 'Gorde'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalatua:'; -$lang['lastupdate'] = 'Azken aldiz eguneratua:'; -$lang['source'] = 'Iturria:'; -$lang['unknown'] = 'ezezaguna'; -$lang['updating'] = 'Eguneratzen ...'; -$lang['updated'] = 'Arrakastaz eguneratu da %s plugin-a'; -$lang['updates'] = 'Ondorengo plugin-ak ondo eguneratu dira'; -$lang['update_none'] = 'Ez da eguneraketarik aurkitu.'; -$lang['deleting'] = 'Ezabatzen ...'; -$lang['deleted'] = '%s plugin-a ezabatua.'; -$lang['downloading'] = 'Deskargatzen ...'; -$lang['downloaded'] = '%s Plugin-a arrakastaz instalatua'; -$lang['downloads'] = 'Ondorengo plugin-ak arrakastaz instalatu dira:'; -$lang['download_none'] = 'Ez da plugin-ik aurkitu, edo arazo ezezagunen bat egon da deskargatu eta instalatzerako garaian.'; -$lang['plugin'] = 'Plugin-a:'; -$lang['components'] = 'Osagaiak'; -$lang['noinfo'] = 'Plugin honek ez du informaziorik itzuli, agian ez da erabilgarria.'; -$lang['name'] = 'izena:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Mota:'; -$lang['desc'] = 'Deskribapena:'; -$lang['author'] = 'Egilea:'; -$lang['www'] = 'Web-gunea:'; -$lang['error'] = 'Akats ezezagun bat gertatu da.'; -$lang['error_download'] = 'Ezin izan da plugin-aren honako fitxategia deskargatu: %s'; -$lang['error_badurl'] = 'Ustezko url okerra - ezin izan da fitxategi izena url-tik zehaztu'; -$lang['error_dircreate'] = 'Ezin izan da aldiroko karpeta sortu deskarga jasotzeko'; -$lang['error_decompress'] = 'Plugin kudeatzaileak ezin izan du deskargatutako fitxategia erauzi. Deskarga oker baten ondorioa izan daiteke, eta hala bada berriz saiatu beharko zenuke; edo agian trinkotze formatua ezezaguna da, hala izanik plugin-a eskuz deskargatu eta instalatu beharko zenuelarik.'; -$lang['error_copy'] = 'Fitxategi kopia akats bat egon da <em>%s</em> plugin-arentzat fitxategiak instalatzen saiatzean: diska betea egon liteke edo fitxategi atzipen baimena okerra izan daiteke. Honek partzialki instalatutako plugin bat eta wiki instalazioa ezegonkor utzi dezake.'; -$lang['error_delete'] = 'Akats bat gertatu da <em>%s</em> plugin-a ezabatzeko saiakera egitean. Arrazoia ziurrenik fitxategi edo direktorio atzipen baimen nahikoak ez izatea da.'; -$lang['enabled'] = '%s Plugin-a gaitua.'; -$lang['notenabled'] = '%s Plugin-a ezin izan da gaitu, egiaztatu fitxategi baimenak.'; -$lang['disabled'] = '%s Plugin-a ezgaitua.'; -$lang['notdisabled'] = '%s Plugin-a ezin izan da ezgaitu, egiaztatu fitxategi baimenak. '; -$lang['packageinstalled'] = 'Plugin paketea (%d plugin(s): %s) arrakastaz instalatua izan da.'; diff --git a/lib/plugins/plugin/lang/fa/admin_plugin.txt b/lib/plugins/plugin/lang/fa/admin_plugin.txt deleted file mode 100644 index cd11fb460..000000000 --- a/lib/plugins/plugin/lang/fa/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== مدیریت افزونهها ====== - -در این صفحه شما میتوانید [[doku>plugins|افزونههای]] Dokuwiki را مدیریت کنید. برای امکان دریافت و نصب افزونهها، باید به شاخهی افزونهها (lib/plugin) دسترسی نوشتن برای وبسرور را محیا کنید.
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/fa/lang.php b/lib/plugins/plugin/lang/fa/lang.php deleted file mode 100644 index 0a8fadb3c..000000000 --- a/lib/plugins/plugin/lang/fa/lang.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/** - * @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 - * @author Omid Mottaghi <omidmr@gmail.com> - * @author Mohammad Reza Shoaei <shoaei@gmail.com> - * @author Milad DZand <M.DastanZand@gmail.com> - * @author AmirH Hassaneini <mytechmix@gmail.com> - */ -$lang['menu'] = 'مدیریت افزونهها'; -$lang['download'] = 'دریافت و نصب افزونه'; -$lang['manage'] = 'افزونههای نصب شده'; -$lang['btn_info'] = 'مشخصات'; -$lang['btn_update'] = 'بروزرسانی'; -$lang['btn_delete'] = 'حذف'; -$lang['btn_settings'] = 'تنظیمات'; -$lang['btn_download'] = 'دانلود'; -$lang['btn_enable'] = 'ذخیره'; -$lang['url'] = 'آدرس'; -$lang['installed'] = 'نصب شده:'; -$lang['lastupdate'] = 'آخرین بروزرسانی:'; -$lang['source'] = 'منبع:'; -$lang['unknown'] = 'ناشناس'; -$lang['updating'] = 'در حال به روز رسانی...'; -$lang['updated'] = 'افزونهی %s با موفقیت به روز رسانی شد'; -$lang['updates'] = 'افزونههای زیر با موفقیت به روز رسانی شده است.'; -$lang['update_none'] = 'به روز رسانیای یافت نشد .'; -$lang['deleting'] = 'در حال حذف...'; -$lang['deleted'] = 'افزونهی %s پاک شد.'; -$lang['downloading'] = 'در حال دریافت...'; -$lang['downloaded'] = 'افزونهی %s با موفقیت نصب شد'; -$lang['downloads'] = 'افزونههای زیر با موفقیت نصب شدند:'; -$lang['download_none'] = 'هیچ افزونهای یافت نشد، یا یک مشکل ناشناخته در زمان دریافت و نصب پیش آمده است.'; -$lang['plugin'] = 'افزونه:'; -$lang['components'] = 'کامپوننت'; -$lang['noinfo'] = 'این افزونه هیچ اطلاعاتی را برنگردانده است، ممکن است بیاعتبار باشد.'; -$lang['name'] = 'اسم:'; -$lang['date'] = 'تاریخ:'; -$lang['type'] = 'نوع:'; -$lang['desc'] = 'توضیحات:'; -$lang['author'] = 'نویسنده:'; -$lang['www'] = 'وبسایت:'; -$lang['error'] = 'یک مشکل ناشناخته پیش آمده.'; -$lang['error_download'] = 'توانایی دریافت افزونهی %s نمیباشد.'; -$lang['error_badurl'] = 'آدرس مشکل دارد - توانایی تشخیص نام فایل از آدرس وجود ندارد'; -$lang['error_dircreate'] = 'امکان ایجاد شاخهی موقتی برای دریافت فایل نیست.'; -$lang['error_decompress'] = 'باز کردن فایل با مشکل مواجه شد. این اشکال ممکن است به خاطر دریافت ناقصِ فایل باشد که باید دوباره تلاش کنید، یا فرمت فشردهسازی شناخته شده نیست، که باید این افزونه رو دستی نصب کنید.'; -$lang['error_copy'] = 'توانایی کپی کردن فایلهای افزونهی <em>%s</em> در زمان نصب وجود ندارد. ممکن است دسترسی شاخهی افزونهها مشکل داشته باشد. این مشکل ممکن است باعث نصب ناقص افزونه شود و ویکی را با مشکل مواجه کند.'; -$lang['error_delete'] = 'توانایی حذف افزونهی <em>%s</em> وجود ندارد. این مشکل به خاطر دسترسی فایل یا شاخهی افزونه پیش میآید.'; -$lang['enabled'] = 'افزونهی %s فعال شد.'; -$lang['notenabled'] = 'افزونهی %s قابلیت فعال کردن ندارد، دسترسیها را چک کنید.'; -$lang['disabled'] = 'افزونهی %s غیرفعال شد.'; -$lang['notdisabled'] = 'افزونهی %s قابلیت غیرفعال کردن ندارد، دسترسیها را چک کنید.'; -$lang['packageinstalled'] = 'بسته افزونه (%d افزونه: %s) به درستی نصب شد.'; diff --git a/lib/plugins/plugin/lang/fi/admin_plugin.txt b/lib/plugins/plugin/lang/fi/admin_plugin.txt deleted file mode 100644 index 9cdfa1c11..000000000 --- a/lib/plugins/plugin/lang/fi/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Liitännäisten hallinta ====== - -Tällä sivulla voit hallita DokuWikin [[doku>plugins|liitännäisiä]]. Voidaksesi ladata ja asentaa liitännäisiä pitää web-palvelimella olla kirjoitusoikeudet plugin hakemistoon. diff --git a/lib/plugins/plugin/lang/fi/lang.php b/lib/plugins/plugin/lang/fi/lang.php deleted file mode 100644 index 923029a6f..000000000 --- a/lib/plugins/plugin/lang/fi/lang.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * Finnish language file - * - * @author otto@valjakko.net - * @author Otto Vainio <otto@valjakko.net> - * @author Teemu Mattila <ghcsystems@gmail.com> - * @author Sami Olmari <sami@olmari.fi> - */ -$lang['menu'] = 'Ylläpidä liitännäisiä'; -$lang['download'] = 'Lataa ja asenna uusi liitännäinen'; -$lang['manage'] = 'Asennetut liitännäiset'; -$lang['btn_info'] = 'tietoa'; -$lang['btn_update'] = 'päivitä'; -$lang['btn_delete'] = 'poista'; -$lang['btn_settings'] = 'asetukset'; -$lang['btn_download'] = 'Lataa'; -$lang['btn_enable'] = 'Tallenna'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Asennettu:'; -$lang['lastupdate'] = 'Päivitetty viimeksi:'; -$lang['source'] = 'Lähde:'; -$lang['unknown'] = 'tuntematon'; -$lang['updating'] = 'Päivitetään ...'; -$lang['updated'] = 'Liitännäinen %s päivitetty onnistuneesti'; -$lang['updates'] = 'Seuraavat liitännäiset on päivitetty onnistuneesti'; -$lang['update_none'] = 'Päivityksiä ei löytynyt'; -$lang['deleting'] = 'Poistetaan ...'; -$lang['deleted'] = 'Liitännäinen %s poistettu.'; -$lang['downloading'] = 'Ladataan ...'; -$lang['downloaded'] = 'Liitännäinen %s asennettu onnistuneesti'; -$lang['downloads'] = 'Seuraavat liitännäiset on asennettu onnistuneesti'; -$lang['download_none'] = 'Liitännäisiä ei löytynyt tai on tapahtunut joku tuntematon virhe latauksen ja asennuksen aikana.'; -$lang['plugin'] = 'Liitännäinen:'; -$lang['components'] = 'Osa'; -$lang['noinfo'] = 'Liitännäinen ei palauttanut mitään tietoa ja se voi olla epäkelpo.'; -$lang['name'] = 'Nimi:'; -$lang['date'] = 'Päiväys:'; -$lang['type'] = 'Tyyppi:'; -$lang['desc'] = 'Kuvaus:'; -$lang['author'] = 'Tekijä:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Tapahtui tuntematon virhe.'; -$lang['error_download'] = 'Liitännäistiedoston %s latauksessa tapahtui tuntematon virhe.'; -$lang['error_badurl'] = 'URL vaikuttaa olleen virheellinen. Siitä ei pystytty päättelemään tiedoston nimeä'; -$lang['error_dircreate'] = 'Ei pystytty luomaan väliaikaista hakemistoa latausta varten'; -$lang['error_decompress'] = 'Liitännäishallinta ei pystynyt purkamaan ladattua tiedostoa. Lataus voi olla epäonnistunut. Siinä tapauksessa voit yrittää uudestaan. Pakkaustapa voi myös olla tuntematon. Siinä tapauksessa sinun pitää ladata ja asentaa liitännäinen käsin.'; -$lang['error_copy'] = 'Tiedoston kopioinnissa tapahtui liitännäisen <em>%s</em> asennuksen aikana virhe. Levy voi olla täynnä tai kansioiden oikeudet voivat olla väärin. Liitännäinen voi olla osittain asennettu ja tämä voi jättää wikiasennukseesi epävakaaseen tilaan.'; -$lang['error_delete'] = 'Liitännäisen <em>%s</em> poistossa tapahtui virhe. Todennäköisin syy on puutteelliset tiedoston tai hakemiston oikeudet'; -$lang['enabled'] = 'Liitännäinen %s käytössä'; -$lang['notenabled'] = 'Liitännäistä %s ei voitu ottaa käyttöön. Tarkista tiedostojen oikeudet.'; -$lang['disabled'] = 'Liitännäinen %s pois käytössä'; -$lang['notdisabled'] = 'Liitännäistä %s ei voitu ottaa pois käytöstä. Tarkista tiedostojen oikeudet.'; -$lang['packageinstalled'] = 'Pluginpaketti (%d plugin: %s:) asennettu onnistuneesti.'; diff --git a/lib/plugins/plugin/lang/fr/admin_plugin.txt b/lib/plugins/plugin/lang/fr/admin_plugin.txt deleted file mode 100644 index b7beba25a..000000000 --- a/lib/plugins/plugin/lang/fr/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Gestion des extensions ====== - -Cette page vous permet de gérer tout ce qui a trait aux [[doku>fr:plugins|extensions]] de DokuWiki. Pour pouvoir télécharger et installer un module, le répertoire « ''plugin'' » doit être accessible en écriture pour le serveur web. - diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php deleted file mode 100644 index 0592f3c7d..000000000 --- a/lib/plugins/plugin/lang/fr/lang.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Guy Brand <gb@unistra.fr> - * @author Delassaux Julien <julien@delassaux.fr> - * @author Maurice A. LeBlanc <leblancma@cooptel.qc.ca> - * @author stephane.gully@gmail.com - * @author Guillaume Turri <guillaume.turri@gmail.com> - * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author olivier duperray <duperray.olivier@laposte.net> - * @author Vincent Feltz <psycho@feltzv.fr> - * @author Philippe Bajoit <philippe.bajoit@gmail.com> - * @author Florian Gaub <floriang@floriang.net> - * @author Samuel Dorsaz samuel.dorsaz@novelion.net - * @author Johan Guilbaud <guilbaud.johan@gmail.com> - * @author schplurtz@laposte.net - * @author skimpax@gmail.com - * @author Yannick Aure <yannick.aure@gmail.com> - * @author Olivier DUVAL <zorky00@gmail.com> - * @author Anael Mobilia <contrib@anael.eu> - * @author Bruno Veilleux <bruno.vey@gmail.com> - */ -$lang['menu'] = 'Gestion des extensions'; -$lang['download'] = 'Télécharger et installer une nouvelle extension'; -$lang['manage'] = 'Extensions installées'; -$lang['btn_info'] = 'Info'; -$lang['btn_update'] = 'Mettre à jour'; -$lang['btn_delete'] = 'Supprimer'; -$lang['btn_settings'] = 'Paramètres'; -$lang['btn_download'] = 'Télécharger'; -$lang['btn_enable'] = 'Enregistrer'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installé :'; -$lang['lastupdate'] = 'Dernière mise à jour :'; -$lang['source'] = 'Source :'; -$lang['unknown'] = 'inconnu'; -$lang['updating'] = 'Mise à jour…'; -$lang['updated'] = 'Extension %s mise à jour avec succès'; -$lang['updates'] = 'Les extensions suivantes ont été mises à jour avec succès'; -$lang['update_none'] = 'Aucune mise à jour n\'a été trouvée.'; -$lang['deleting'] = 'Suppression…'; -$lang['deleted'] = 'Extension %s supprimée.'; -$lang['downloading'] = 'Téléchargement…'; -$lang['downloaded'] = 'Extension %s installée avec succès'; -$lang['downloads'] = 'Les extensions suivantes ont été installées avec succès :'; -$lang['download_none'] = 'Aucune extension n\'a été trouvée, ou un problème inconnu est survenu durant le téléchargement et l\'installation.'; -$lang['plugin'] = 'Extension :'; -$lang['components'] = 'Composants'; -$lang['noinfo'] = 'Cette extension n\'a transmis aucune information, elle pourrait être invalide.'; -$lang['name'] = 'Nom :'; -$lang['date'] = 'Date :'; -$lang['type'] = 'Type :'; -$lang['desc'] = 'Description :'; -$lang['author'] = 'Auteur :'; -$lang['www'] = 'Site web :'; -$lang['error'] = 'Une erreur inconnue est survenue.'; -$lang['error_download'] = 'Impossible de télécharger le fichier de l\'extension : %s'; -$lang['error_badurl'] = 'URL suspecte : impossible de déterminer le nom du fichier à partir de l\'URL'; -$lang['error_dircreate'] = 'Impossible de créer le répertoire temporaire pour effectuer le téléchargement'; -$lang['error_decompress'] = 'Le gestionnaire d\'extensions a été incapable de décompresser le fichier téléchargé. Ceci peut être le résultat d\'un mauvais téléchargement, auquel cas vous devriez réessayer ; ou bien le format de compression est inconnu, auquel cas vous devez télécharger et installer l\'extension manuellement.'; -$lang['error_copy'] = 'Une erreur de copie est survenue lors de l\'installation des fichiers de l\'extension <em>%s</em> : le disque est peut-être plein ou les autorisations d\'accès sont incorrects. Il a pu en résulter une installation partielle de l\'extension et laisser votre installation du wiki instable.'; -$lang['error_delete'] = 'Une erreur est survenue lors de la suppression de l\'extension <em>%s</em>. La raison la plus probable est l\'insuffisance des autorisations sur les fichiers ou les répertoires.'; -$lang['enabled'] = 'Extension %s activée.'; -$lang['notenabled'] = 'L\'extension %s n\'a pas pu être activée, vérifiez les autorisations des fichiers.'; -$lang['disabled'] = 'Extension %s désactivée.'; -$lang['notdisabled'] = 'L\'extension %s n\'a pas pu être désactivée, vérifiez les autorisations des fichiers.'; -$lang['packageinstalled'] = 'Ensemble d\'extensions (%d extension(s): %s) installé avec succès.'; diff --git a/lib/plugins/plugin/lang/gl/admin_plugin.txt b/lib/plugins/plugin/lang/gl/admin_plugin.txt deleted file mode 100644 index 216285a8d..000000000 --- a/lib/plugins/plugin/lang/gl/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Xestión de Extensións ====== - -Nesta páxina podes xestionar todas as accións posíbeis cos [[doku>plugins|extensións]] do DokuWiki. Para poder descargar e instalar unha extensión, o teu cartafol de extensións debe ser escribíbel polo servidor web. diff --git a/lib/plugins/plugin/lang/gl/lang.php b/lib/plugins/plugin/lang/gl/lang.php deleted file mode 100644 index b3da44096..000000000 --- a/lib/plugins/plugin/lang/gl/lang.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * Galicianlanguage file - * - * @author Medúlio <medulio@ciberirmandade.org> - * @author Oscar M. Lage <r0sk10@gmail.com> - * @author Rodrigo Rega <rodrigorega@gmail.com> - */ -$lang['menu'] = 'Xestionar Extensións'; -$lang['download'] = 'Descargar e instalar unha nova extensión'; -$lang['manage'] = 'Extensións Instalados'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'actualización'; -$lang['btn_delete'] = 'eliminar'; -$lang['btn_settings'] = 'configuración'; -$lang['btn_download'] = 'Descargar'; -$lang['btn_enable'] = 'Gardar'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalado:'; -$lang['lastupdate'] = 'Última actualización:'; -$lang['source'] = 'Fonte:'; -$lang['unknown'] = 'descoñecido'; -$lang['updating'] = 'Actualizando...'; -$lang['updated'] = 'Actualizouse correctamente a extensión %s'; -$lang['updates'] = 'Actualizáronse correctamente as seguintes extensións'; -$lang['update_none'] = 'Non se atoparon actualizacións.'; -$lang['deleting'] = 'Eliminando...'; -$lang['deleted'] = 'Eliminado a extensión %s.'; -$lang['downloading'] = 'Descargando...'; -$lang['downloaded'] = 'Instalouse correctamente a extensión %s'; -$lang['downloads'] = 'Instaláronse correctamente as seguintes extensións:'; -$lang['download_none'] = 'Non se atoparon extensións, ou aconteceu un problema descoñecido durante a descarga e instalación.'; -$lang['plugin'] = 'Extensión:'; -$lang['components'] = 'Compoñentes'; -$lang['noinfo'] = 'Esta extensión non devolveu información ningunha. Pode que non sexa válida.'; -$lang['name'] = 'Nome:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipo:'; -$lang['desc'] = 'Descrición:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Houbo un erro descoñecido.'; -$lang['error_download'] = 'Non se puido descargar o arquivo de extensión: %s'; -$lang['error_badurl'] = 'URL posiblemente incorrecto - non se puido determinar o nome do arquivo mediante o URL'; -$lang['error_dircreate'] = 'Non se puido crear un cartafol temporal para recibir a descarga'; -$lang['error_decompress'] = 'O xestor de extensións non foi quen de descomprimir o arquivo descargado. Isto podería ser causado por unha descarga corrupta, polo que, en tal caso, podes tentalo de novo; ou pode que o formato de compresión sexa descoñecido, co que precisarás descargar e instalar a extensión de xeito manual.'; -$lang['error_copy'] = 'Houbo un erro de copia de arquivo ao tentar instalar a extensión <em>%s</em>: pode que o disco estea cheo ou que os permisos de acceso sexan incorrectos. Isto podería dar lugar a unha instalación parcial da extensión e facer que a túa instalación do wiki se volva inestable.'; -$lang['error_delete'] = 'Houbo un erro ao tentar eliminar a extensión <em>%s</em>. O máis probable é que sexa causado por permisos de acceso ao arquivo ou directorio insuficientes.'; -$lang['enabled'] = 'Extensión %s activado.'; -$lang['notenabled'] = 'A extensión %s non puido ser activada, comproba os permisos de arquivo.'; -$lang['disabled'] = 'Extensión %s desactivada.'; -$lang['notdisabled'] = 'A extensión %s non puido ser desactivada, comproba os permisos de arquivo.'; -$lang['packageinstalled'] = 'Paquete de extensión (%d plugin(s): %s) instalado axeitadamente.'; diff --git a/lib/plugins/plugin/lang/he/admin_plugin.txt b/lib/plugins/plugin/lang/he/admin_plugin.txt deleted file mode 100644 index 206d368db..000000000 --- a/lib/plugins/plugin/lang/he/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== ניהול הרחבות ====== - -בדף זה ניתן לנהל כל דבר הקשור ל[[doku>plugins|הרחבות]] של DokuWiki. כדי שניתן יהיה להוריד ולהתקין הרחבה על תיקית ה-plugins שלך להיות ברת כתיבה על ידי שרת הרשת. - - diff --git a/lib/plugins/plugin/lang/he/lang.php b/lib/plugins/plugin/lang/he/lang.php deleted file mode 100644 index 47253e335..000000000 --- a/lib/plugins/plugin/lang/he/lang.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * hebrew language file - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author DoK <kamberd@yahoo.com> - * @author Dotan Kamber <kamberd@yahoo.com> - * @author Moshe Kaplan <mokplan@gmail.com> - * @author Yaron Yogev <yaronyogev@gmail.com> - * @author Yaron Shahrabani <sh.yaron@gmail.com> - */ -$lang['menu'] = 'ניהול הרחבות'; -$lang['download'] = 'הורדת והתקנת הרחבה חדשה'; -$lang['manage'] = 'הרחבות מותקנות'; -$lang['btn_info'] = 'מידע'; -$lang['btn_update'] = 'עידכון'; -$lang['btn_delete'] = 'מחיקה'; -$lang['btn_settings'] = 'הגדרות'; -$lang['btn_download'] = 'הורדה'; -$lang['btn_enable'] = 'שמירה'; -$lang['url'] = 'URL'; -$lang['installed'] = 'מותקנות:'; -$lang['lastupdate'] = 'עודכנו לאחרונה:'; -$lang['source'] = 'מקור:'; -$lang['unknown'] = 'לא ידוע'; -$lang['updating'] = 'מעדכן ...'; -$lang['updated'] = 'ההרחבה %s עודכנה בהצלחה'; -$lang['updates'] = 'ההרחבות הבאות עודכנו בהצלחה'; -$lang['update_none'] = 'לא נמצאו עידכונים.'; -$lang['deleting'] = 'מוחק ...'; -$lang['deleted'] = 'ההרחבה %s נמחקה.'; -$lang['downloading'] = 'מוריד ...'; -$lang['downloaded'] = 'ההרחבה %s הותקנה בהצלחה'; -$lang['downloads'] = 'ההרחבות הבאות הותקנו בהצלחה:'; -$lang['download_none'] = 'לא נמצאו הרחבות או שחלה בעיה בלתי ידועה במהלך ההורדה וההתקנה.'; -$lang['plugin'] = 'הרחבה:'; -$lang['components'] = 'רכיבים'; -$lang['noinfo'] = 'הרחבה זו לא השיבה מידע, יתכן כי היא אינה בתוקף.'; -$lang['name'] = 'שם:'; -$lang['date'] = 'תאריך:'; -$lang['type'] = 'סוג:'; -$lang['desc'] = 'תיאור:'; -$lang['author'] = 'מחבר:'; -$lang['www'] = 'רשת:'; -$lang['error'] = 'שגיאה לא ידועה ארעה.'; -$lang['error_download'] = 'כשל בהורדת קובץ ההרחבה: %s'; -$lang['error_badurl'] = 'כנראה כתובת שגויה - כשל בקביעת שם הקובץ מהכתובת'; -$lang['error_dircreate'] = 'כשל ביצירת תיקיה זמנית לקבלת ההורדה'; -$lang['error_decompress'] = 'מנהל ההרחבות כשל בפרישת הקובץ שהורד. יתכן כי זו תוצאה של הורדה תקולה ובמקרה זה עליך לנסות שנית; או שיתכן כי תסדיר הכיווץ אינו ידוע, במקרה זה יהיה עליך להוריד ולהתקין את ההרחבה ידנית.'; -$lang['error_copy'] = 'חלה שגיאה בהעתקת הקובץ בניסיון להתקין קבצים להרחבה <em>%s</em>: ייתכן כי הדיסק מלא או שהרשאות הגישה לקבצים שגויות. יתכן כי בשל כך נוצרה התקנה חלקית של ההרחבה שתשאיר את התקנת הויקי שלך לא יציבה.'; -$lang['error_delete'] = 'חלה שגיאה בעת ניסיון למחיקת ההרחבה <em>%s</em>. הסיבה הסבירה ביותר היא הרשאות גישה לקבצים ולספריות שאינן מספקות'; -$lang['enabled'] = 'תוסף %s מופעל.'; -$lang['notenabled'] = 'לא ניתן להפעיל את התוסף %s, בדוק הרשאות קבצים.'; -$lang['disabled'] = 'תוסף %s מושבת.'; -$lang['notdisabled'] = 'לא ניתן להשבית את התוסף %s, בדוק הרשאות קבצים.'; diff --git a/lib/plugins/plugin/lang/hi/lang.php b/lib/plugins/plugin/lang/hi/lang.php deleted file mode 100644 index 89d27cee1..000000000 --- a/lib/plugins/plugin/lang/hi/lang.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Abhinav Tyagi <abhinavtyagi11@gmail.com> - * @author yndesai@gmail.com - */ -$lang['unknown'] = 'अज्ञात'; -$lang['date'] = 'दिनांक:'; -$lang['author'] = 'लेखक:'; -$lang['error'] = 'अज्ञात त्रुटि हुइ'; diff --git a/lib/plugins/plugin/lang/hr/lang.php b/lib/plugins/plugin/lang/hr/lang.php deleted file mode 100644 index 96f1d6afe..000000000 --- a/lib/plugins/plugin/lang/hr/lang.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -/** - * Croatian language file - * - * @author Branko Rihtman <theney@gmail.com> - * @author Dražen Odobašić <dodobasic@gmail.com> - * @author Dejan Igrec dejan.igrec@gmail.com - */ diff --git a/lib/plugins/plugin/lang/hu/admin_plugin.txt b/lib/plugins/plugin/lang/hu/admin_plugin.txt deleted file mode 100644 index afa08d349..000000000 --- a/lib/plugins/plugin/lang/hu/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Bővítménykezelő ====== - -Ezen az oldalon a Dokuwiki [[doku>plugins|bővítményeivel]] kapcsolatos teendőket láthatod el. A webszervernek tudni kell írnia a //plugin// könyvtárat, hogy új bővítményeket tudj ezen a felületen keresztül letölteni és telepíteni. - diff --git a/lib/plugins/plugin/lang/hu/lang.php b/lib/plugins/plugin/lang/hu/lang.php deleted file mode 100644 index b8fa2cdbe..000000000 --- a/lib/plugins/plugin/lang/hu/lang.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/** - * @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 - * @author Szabó Dávid <szabo.david@gyumolcstarhely.hu> - * @author Sándor TIHANYI <stihanyi+dw@gmail.com> - * @author David Szabo <szabo.david@gyumolcstarhely.hu> - * @author Marton Sebok <sebokmarton@gmail.com> - */ -$lang['menu'] = 'Bővítménykezelő'; -$lang['download'] = 'Új bővítmény letöltése és telepítése'; -$lang['manage'] = 'Telepített bővítmények'; -$lang['btn_info'] = 'infó'; -$lang['btn_update'] = 'frissítés'; -$lang['btn_delete'] = 'törlés'; -$lang['btn_settings'] = 'beállítások'; -$lang['btn_download'] = 'Letöltés'; -$lang['btn_enable'] = 'Mentés'; -$lang['url'] = 'Cím'; -$lang['installed'] = 'Telepítve:'; -$lang['lastupdate'] = 'Utolsó frissítés:'; -$lang['source'] = 'Forrás:'; -$lang['unknown'] = 'ismeretlen'; -$lang['updating'] = 'Frissítés...'; -$lang['updated'] = 'A %s bővítmény frissítése sikeres'; -$lang['updates'] = 'A következő bővítmények frissítése sikeres:'; -$lang['update_none'] = 'Nem találtam újabb verziót.'; -$lang['deleting'] = 'Törlés...'; -$lang['deleted'] = 'A %s bővítményt eltávolítva.'; -$lang['downloading'] = 'Letöltés...'; -$lang['downloaded'] = 'A %s bővítmény telepítése sikeres.'; -$lang['downloads'] = 'A következő bővítmények telepítése sikeres.'; -$lang['download_none'] = 'Nem találtam bővítményt vagy ismeretlen hiba történt a letöltés/telepítés közben.'; -$lang['plugin'] = 'Bővítmény:'; -$lang['components'] = 'Részek'; -$lang['noinfo'] = 'Ez a bővítmény nem tartalmaz információt, lehet, hogy hibás.'; -$lang['name'] = 'Név:'; -$lang['date'] = 'Dátum:'; -$lang['type'] = 'Típus:'; -$lang['desc'] = 'Leírás:'; -$lang['author'] = 'Szerző:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Ismeretlen hiba lépett fel.'; -$lang['error_download'] = 'Nem tudom letölteni a fájlt a bővítményhez: %s'; -$lang['error_badurl'] = 'Feltehetően rossz URL - nem tudom meghatározni a fájlnevet az URL-ből.'; -$lang['error_dircreate'] = 'Nem tudom létrehozni az átmeneti könyvtárat a letöltéshez.'; -$lang['error_decompress'] = 'A Bővítménykezelő nem tudta a letöltött állományt kicsomagolni. Ennek oka lehet hibás letöltés, ebben az esetben újra letöltéssel próbálkozhatsz, esetleg a tömörítés módja ismeretlen, ebben az esetben kézzel kell letölteni és telepíteni a bővítményt.'; -$lang['error_copy'] = 'Fájl másolási hiba történt a(z) <em>%s</em> bővítmény telepítése közben: vagy a lemezterület fogyott el, vagy az állomány hozzáférési jogosultságai nem megfelelőek. Emiatt előfordulhat, hogy a bővítményt csak részben sikerült telepíteni és a wiki összeomolhat.'; -$lang['error_delete'] = 'Hiba történt a(z) <em>%s</em> bővítmény eltávolítása közben. A legvalószínűbb ok, hogy a könyvtár vagy állomány hozzáférési jogosultságai nem megfelelőek.'; -$lang['enabled'] = 'A(z) %s bővítmény bekapcsolva.'; -$lang['notenabled'] = 'A(z) %s bővítmény engedélyezése nem sikerült. Ellenőrizze a fájlhozzáférési jogosultságokat.'; -$lang['disabled'] = 'A(z) %s bővítmény kikapcsolva.'; -$lang['notdisabled'] = 'A(z) %s bővítmény kikapcsolása nem sikerült. Ellenőrizze a fájlhozzáférési jogosultságokat.'; -$lang['packageinstalled'] = 'A bővítménycsomag(ok) feltelepült(ek): %d plugin(s): %s'; diff --git a/lib/plugins/plugin/lang/ia/admin_plugin.txt b/lib/plugins/plugin/lang/ia/admin_plugin.txt deleted file mode 100644 index c7f758c16..000000000 --- a/lib/plugins/plugin/lang/ia/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Gestion de plug-ins ====== - -In iste pagina tu pote gerer omne cosas con relation al [[doku>plugins|plug-ins]] de DokuWiki. Pro poter discargar e installar un plug-in, le directorio de plug-ins debe permitter le accesso de scriptura al servitor web.
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/ia/lang.php b/lib/plugins/plugin/lang/ia/lang.php deleted file mode 100644 index 523f8581d..000000000 --- a/lib/plugins/plugin/lang/ia/lang.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** - * Interlingua language file - * - * @author robocap <robocap1@gmail.com> - * @author Martijn Dekker <martijn@inlv.org> - */ -$lang['menu'] = 'Gestion de plug-ins'; -$lang['download'] = 'Discargar e installar un nove plug-in'; -$lang['manage'] = 'Plug-ins installate'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'actualisar'; -$lang['btn_delete'] = 'deler'; -$lang['btn_settings'] = 'configurationes'; -$lang['btn_download'] = 'Discargar'; -$lang['btn_enable'] = 'Salveguardar'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installate:'; -$lang['lastupdate'] = 'Ultime actualisation:'; -$lang['source'] = 'Origine:'; -$lang['unknown'] = 'incognite'; -$lang['updating'] = 'Actualisation…'; -$lang['updated'] = 'Actualisation del plug-in %s succedite'; -$lang['updates'] = 'Le sequente plug-ins ha essite actualisate con successo'; -$lang['update_none'] = 'Nulle actualisation trovate.'; -$lang['deleting'] = 'Deletion…'; -$lang['deleted'] = 'Le plug-in %s ha essite delite.'; -$lang['downloading'] = 'Discargamento…'; -$lang['downloaded'] = 'Installation del plug-in %s succedite.'; -$lang['downloads'] = 'Le sequente plug-ins ha essite installate con successo:'; -$lang['download_none'] = 'Nulle plug-in trovate, o il ha occurrite un problema incognite durante le discargamento e installation.'; -$lang['plugin'] = 'Plug-in:'; -$lang['components'] = 'Componentes'; -$lang['noinfo'] = 'Iste plug-in retornava nulle information; illo pote esser invalide.'; -$lang['name'] = 'Nomine:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Typo:'; -$lang['desc'] = 'Description:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Un error incognite ha occurrite.'; -$lang['error_download'] = 'Impossibile discargar le file del plug-in: %s'; -$lang['error_badurl'] = 'URL probabilemente invalide; impossibile determinar le nomine del file ex le URL'; -$lang['error_dircreate'] = 'Impossibile crear le dossier temporari pro reciper le discargamento'; -$lang['error_decompress'] = 'Le gestor de plug-ins non poteva decomprimer le file discargate. Isto pote esser le resultato de un discargamento defectuose, in le qual caso tu deberea probar lo de novo; o le formato de compression pote esser incognite, in le qual caso tu debe discargar e installar le plug-in manualmente.'; -$lang['error_copy'] = 'Il occurreva un error durante le tentativa de installar files pro le plugin <em>%s</em>: le disco pote esser plen o le permissiones de accesso a files pote esser incorrecte. Isto pote haber resultate in un plug-in partialmente installate e lassar tu installation del wiki instabile.'; -$lang['error_delete'] = 'Il occurreva un error durante le tentativa de deler le plug-in <em>%s</em>. Le causa le plus probabile es insufficiente permissiones de files o directorios.'; -$lang['enabled'] = 'Plug-in %s activate.'; -$lang['notenabled'] = 'Le plug-in %s non poteva esser activate; verifica le permissiones de accesso a files.'; -$lang['disabled'] = 'Plug-in %s disactivate.'; -$lang['notdisabled'] = 'Le plug-in %s non poteva esser disactivate; verifica le permissiones de accesso a files.'; diff --git a/lib/plugins/plugin/lang/id-ni/lang.php b/lib/plugins/plugin/lang/id-ni/lang.php deleted file mode 100644 index d367340b7..000000000 --- a/lib/plugins/plugin/lang/id-ni/lang.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * idni language file - * - * @author Harefa <fidelis@harefa.com> - * @author Yustinus Waruwu <juswaruwu@gmail.com> - */ diff --git a/lib/plugins/plugin/lang/id/lang.php b/lib/plugins/plugin/lang/id/lang.php deleted file mode 100644 index f3a1fe4e6..000000000 --- a/lib/plugins/plugin/lang/id/lang.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -/** - * Indonesian language file - * - * @author Irwan Butar Butar <irwansah.putra@gmail.com> - * @author Yustinus Waruwu <juswaruwu@gmail.com> - */ -$lang['btn_info'] = 'Info'; -$lang['btn_update'] = 'Baharui'; -$lang['btn_delete'] = 'Hapus'; -$lang['btn_settings'] = 'Pengaturan'; -$lang['btn_download'] = 'Unduh'; -$lang['btn_enable'] = 'Simpan'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instal'; -$lang['lastupdate'] = 'Pembaharuan terakhir:'; -$lang['source'] = 'Sumber:'; -$lang['unknown'] = 'Tidak kenal'; -$lang['updating'] = 'Terbaharui ...'; -$lang['update_none'] = 'Tidak ditemukan pembaharuan'; -$lang['deleting'] = 'Terhapus ...'; -$lang['deleted'] = 'Hapus Plugin %s.'; -$lang['downloading'] = 'Unduh ...'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Komponen'; -$lang['name'] = 'Nama:'; -$lang['date'] = 'Tanggal:'; -$lang['type'] = 'Tipe:'; -$lang['desc'] = 'Penjelasan:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; diff --git a/lib/plugins/plugin/lang/is/lang.php b/lib/plugins/plugin/lang/is/lang.php deleted file mode 100644 index 0ef1243ef..000000000 --- a/lib/plugins/plugin/lang/is/lang.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php -/** - * Icelandic language file - * - * @author Hrannar Baldursson <hrannar.baldursson@gmail.com> - * @author Ólafur Gunnlaugsson <oli@audiotools.com> - * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - */ -$lang['menu'] = 'Umsýsla viðbóta'; -$lang['download'] = 'Hlaða niður og innsetja viðbót'; -$lang['manage'] = 'Uppsettar viðbætur'; -$lang['btn_info'] = 'upplýsingar'; -$lang['btn_update'] = 'uppfæra'; -$lang['btn_delete'] = 'eyða'; -$lang['btn_settings'] = 'stillingar'; -$lang['btn_download'] = 'Niðurhal'; -$lang['btn_enable'] = 'Vista'; -$lang['url'] = 'Veffang'; -$lang['installed'] = 'Innsett:'; -$lang['lastupdate'] = 'Síðast uppfærð:'; -$lang['source'] = 'Gjafi:'; -$lang['unknown'] = 'óþekkt'; -$lang['updating'] = 'Uppfæri viðbót'; -$lang['updated'] = '%s viðbótin hefur verið uppfærð'; -$lang['updates'] = 'Eftirfarandi viðbætur hafa verið uppfærðar'; -$lang['update_none'] = 'Engar uppfærslur fundust.'; -$lang['deleting'] = 'Eyði viðbót'; -$lang['deleted'] = 'Viðbót %s eytt'; -$lang['downloading'] = 'Hleð viðbót niður ...'; -$lang['downloaded'] = 'Viðbót %s hlóðst inn'; -$lang['downloads'] = 'Eftirfarandi viðbótum hefur verið hlaðið inn:'; -$lang['download_none'] = 'Engin viðbót finnst, hugsanlega hefur komið upp villa við niðurhal eða uppsetningu.'; -$lang['plugin'] = 'Viðbót:'; -$lang['components'] = 'Einingar'; -$lang['noinfo'] = 'Þessi viðbót skilaði ekki upplýsingum og er hugsanlega ónýt.'; -$lang['name'] = 'Nafn:'; -$lang['date'] = 'Dagsetning:'; -$lang['type'] = 'Tegund:'; -$lang['desc'] = 'Lýsing:'; -$lang['author'] = 'Höfundur:'; -$lang['www'] = 'Vefur:'; -$lang['error'] = 'Óskilgreind villa'; -$lang['error_download'] = 'Niðurhal viðbótar %s mistókst'; -$lang['error_decompress'] = 'Viðbótastjórinn gat ekki afþjappað skránna. Þetta gæti verið vegna misheppnaðs niðurhals, ef svo er reyndu niðurhal aftur. Það er einnig mögulegt að skráin sé þjöppuð með aðferð sem að er Dokuwiki óþekkt, í því tilfelli er best að vista viðhengið á tölvunni þinni, afþjappa hana þar og svo hlaða skránum upp handvirkt.'; -$lang['enabled'] = 'Viðbót %s hefur verið ræst.'; -$lang['notenabled'] = 'Ekki var hægt að ræsa %s viðbótina. Athugaðu stillingar á skráaleyfum.'; -$lang['disabled'] = 'Viðbót %s var gerð óvirk'; diff --git a/lib/plugins/plugin/lang/it/admin_plugin.txt b/lib/plugins/plugin/lang/it/admin_plugin.txt deleted file mode 100644 index 5591f08fe..000000000 --- a/lib/plugins/plugin/lang/it/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Gestione Plugin ====== - -In questa pagina puoi gestire tutto ciò che riguarda i [[doku>plugins|plugin]] di DokuWiki. Per poter scaricare e installare un plugin, il webserver deve avere accesso in scrittura alla directory dei plugin.
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/it/lang.php b/lib/plugins/plugin/lang/it/lang.php deleted file mode 100644 index 186bf976e..000000000 --- a/lib/plugins/plugin/lang/it/lang.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Christopher Smith <chris@jalakai.co.uk> - * @author Silvia Sargentoni <polinnia@tin.it> - * @author Pietro Battiston toobaz@email.it - * @author Diego Pierotto ita.translations@tiscali.it - * @author ita.translations@tiscali.it - * @author Lorenzo Breda <lbreda@gmail.com> - * @author snarchio@alice.it - * @author robocap <robocap1@gmail.com> - * @author Osman Tekin osman.tekin93@hotmail.it - * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> - * @author Matteo Pasotti <matteo@xquiet.eu> - * @author snarchio@gmail.com - */ -$lang['menu'] = 'Gestione Plugin'; -$lang['download'] = 'Scarica e installa un nuovo plugin'; -$lang['manage'] = 'Plugin installati'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'aggiorna'; -$lang['btn_delete'] = 'elimina'; -$lang['btn_settings'] = 'configurazione'; -$lang['btn_download'] = 'Scarica'; -$lang['btn_enable'] = 'Salva'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installato:'; -$lang['lastupdate'] = 'Ultimo aggiornamento:'; -$lang['source'] = 'Origine:'; -$lang['unknown'] = 'sconosciuto'; -$lang['updating'] = 'Aggiornamento in corso ...'; -$lang['updated'] = 'Aggiornamento plugin %s riuscito'; -$lang['updates'] = 'Aggiornamento dei seguenti plugin riuscito:'; -$lang['update_none'] = 'Nessun aggiornamento trovato.'; -$lang['deleting'] = 'Eliminazione in corso ...'; -$lang['deleted'] = 'Plugin %s eliminato.'; -$lang['downloading'] = 'Scaricamento in corso ...'; -$lang['downloaded'] = 'Installazione plugin %s riuscita'; -$lang['downloads'] = 'Installazione dei seguenti plugin riuscita:'; -$lang['download_none'] = 'Nessun plugin trovato, oppure si è verificato un problema sconosciuto durante il download e l\'installazione.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Componenti'; -$lang['noinfo'] = 'Questo plugin non ha fornito alcuna informazione, potrebbe non essere valido.'; -$lang['name'] = 'Nome:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipo:'; -$lang['desc'] = 'Descrizione:'; -$lang['author'] = 'Autore:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Si è verificato un errore sconosciuto.'; -$lang['error_download'] = 'Impossibile scaricare il plugin: %s'; -$lang['error_badurl'] = 'Possibile URL non corretta - impossibile determinare il nome del file dalla URL fornita'; -$lang['error_dircreate'] = 'Impossibile creare la directory temporanea dove scaricare il file'; -$lang['error_decompress'] = 'Impossibile decomprimere il file scaricato. Questo potrebbe essere il risultato di un download incompleto, in tal caso dovresti provare di nuovo; oppure il formato di compressione potrebbe essere sconosciuto, in questo caso è necessario scaricare e installare il plugin manualmente.'; -$lang['error_copy'] = 'Si è verificato un errore nella copia di un file durante l\'installazione del plugin <em>%s</em>: il disco potrebbe essere pieno oppure i permessi di accesso al file potrebbero non essere corretti. Il plugin potrebbe essere stato installato solo parzialmente, questo potrebbe causare instabilità al sistema.'; -$lang['error_delete'] = 'Si è verificato un errore durante l\'eliminazione del plugin <em>%s</em>. Molto probabilmente i permessi di acesso ai file o alla directory non sono sufficienti'; -$lang['enabled'] = 'Plugin %s abilitato.'; -$lang['notenabled'] = 'Impossibile abilitare il plugin %s, verifica i permessi dei file.'; -$lang['disabled'] = 'Plugin %s disabilitato.'; -$lang['notdisabled'] = 'Impossibile disabilitare il plugin %s, verifica i permessi dei file.'; -$lang['packageinstalled'] = 'Pacchetto plugin (%d plugin(s): %s) installato con successo.'; diff --git a/lib/plugins/plugin/lang/ja/admin_plugin.txt b/lib/plugins/plugin/lang/ja/admin_plugin.txt deleted file mode 100644 index c3b85351a..000000000 --- a/lib/plugins/plugin/lang/ja/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== プラグイン管理 ====== - -この画面で、DokuWikiで使用するプラグイン [[doku>plugins|plugins]] の管理を行うことが出来ます。 プラグインをダウンロード・インストールするためには、サーバー内のプラグイン用フォルダーを 書き込み可にしておく必要があります。 - - diff --git a/lib/plugins/plugin/lang/ja/lang.php b/lib/plugins/plugin/lang/ja/lang.php deleted file mode 100644 index d66e109ce..000000000 --- a/lib/plugins/plugin/lang/ja/lang.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Yuji Takenaka <webmaster@davilin.com> - * @author Christopher Smith <chris@jalakai.co.uk> - * @author Ikuo Obataya <i.obataya@gmail.com> - * @author Daniel Dupriest <kououken@gmail.com> - * @author Kazutaka Miyasaka <kazmiya@gmail.com> - * @author Taisuke Shimamoto <dentostar@gmail.com> - * @author Satoshi Sahara <sahara.satoshi@gmail.com> - */ -$lang['menu'] = 'プラグイン管理'; -$lang['download'] = 'プラグインのダウンロードとインストール'; -$lang['manage'] = 'インストール済みプラグイン'; -$lang['btn_info'] = '情報'; -$lang['btn_update'] = '更新'; -$lang['btn_delete'] = '削除'; -$lang['btn_settings'] = '設定'; -$lang['btn_download'] = 'ダウンロード'; -$lang['btn_enable'] = '保存'; -$lang['url'] = 'URL'; -$lang['installed'] = 'インストール:'; -$lang['lastupdate'] = '最終更新日:'; -$lang['source'] = 'ソース:'; -$lang['unknown'] = '不明'; -$lang['updating'] = '更新中...'; -$lang['updated'] = 'プラグイン %s は更新されました'; -$lang['updates'] = '次のプラグインが更新されました:'; -$lang['update_none'] = 'プラグインの更新データはありません。'; -$lang['deleting'] = '削除中...'; -$lang['deleted'] = 'プラグイン %s は削除されました。'; -$lang['downloading'] = 'ダウンロード中...'; -$lang['downloaded'] = 'プラグイン %s がインストールされました'; -$lang['downloads'] = '次のプラグインがインストールされました:'; -$lang['download_none'] = 'プラグインが見つかりませんでした。もしくはダウンロードかインストールの最中に予期せぬエラーが発生しました。'; -$lang['plugin'] = 'プラグイン:'; -$lang['components'] = 'コンポーネント'; -$lang['noinfo'] = 'このプラグインに関する情報がありません。有効なプラグインではないかも知れません。'; -$lang['name'] = '名前:'; -$lang['date'] = '日付:'; -$lang['type'] = 'タイプ:'; -$lang['desc'] = '説明:'; -$lang['author'] = '作者:'; -$lang['www'] = 'ウェブサイト:'; -$lang['error'] = '予期せぬエラーが発生しました。'; -$lang['error_download'] = 'プラグインファイルをダウンロードできません:%s'; -$lang['error_badurl'] = 'URLが正しくないようです - ファイル名が特定できません'; -$lang['error_dircreate'] = 'ダウンロードしたファイルを一時的に保管しておくフォルダが作成できません'; -$lang['error_decompress'] = 'ダウンロードしたファイルを解凍できませんでした。ダウンロードに失敗した可能性があります(もう一度、実行してください);もしくは、不明な圧縮形式であるかもしれません(手動でインストールする必要があります)'; -$lang['error_copy'] = 'プラグインをインストール中にファイルのコピーに失敗しました。<em>%s</em>:ディスク容量や書き込みの権限を確認してください。このエラーによりプラグインのインストールが完全に行われず、Wikiが不安定な状態です。'; -$lang['error_delete'] = 'プラグインの削除中にエラーが発生しました <em>%s</em>。プラグインが不完全なファイルであったか、ディレクトリの権限が正しくないことが原因であると考えられます。'; -$lang['enabled'] = 'プラグイン %s が有効です。'; -$lang['notenabled'] = 'プラグイン %s を有効にすることができません。権限を確認してください。'; -$lang['disabled'] = 'プラグイン %s が無効です。'; -$lang['notdisabled'] = 'プラグイン %s を無効にすることができません。権限を確認してください。'; -$lang['packageinstalled'] = 'プラグインパッケージ(%d plugin(s): %s)は正しくインストールされました。'; diff --git a/lib/plugins/plugin/lang/kk/lang.php b/lib/plugins/plugin/lang/kk/lang.php deleted file mode 100644 index dde5b9577..000000000 --- a/lib/plugins/plugin/lang/kk/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * kazakh language file - * - * @author Nurgozha Kaliaskarov astana08@gmail.com - */ diff --git a/lib/plugins/plugin/lang/ko/admin_plugin.txt b/lib/plugins/plugin/lang/ko/admin_plugin.txt deleted file mode 100644 index 9390712dd..000000000 --- a/lib/plugins/plugin/lang/ko/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== 플러그인 관리 ====== - -이 페이지에서 도쿠위키 [[doku>ko:plugins|플러그인]]에 관련된 모든 관리를 할 수 있습니다. 플러그인을 다운로드하고 설치하기 위해서는 웹 서버가 플러그인 폴더에 대해 쓰기 권한이 있어야 합니다.
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/ko/lang.php b/lib/plugins/plugin/lang/ko/lang.php deleted file mode 100644 index 6ef9cd69a..000000000 --- a/lib/plugins/plugin/lang/ko/lang.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author jk Lee - * @author dongnak@gmail.com - * @author Song Younghwan <purluno@gmail.com> - * @author Seung-Chul Yoo <dryoo@live.com> - * @author erial2@gmail.com - * @author Myeongjin <aranet100@gmail.com> - */ -$lang['menu'] = '플러그인 관리'; -$lang['download'] = '새 플러그인을 다운로드하고 설치'; -$lang['manage'] = '설치된 플러그인'; -$lang['btn_info'] = '정보'; -$lang['btn_update'] = '업데이트'; -$lang['btn_delete'] = '삭제'; -$lang['btn_settings'] = '설정'; -$lang['btn_download'] = '다운로드'; -$lang['btn_enable'] = '저장'; -$lang['url'] = 'URL'; -$lang['installed'] = '설치됨:'; -$lang['lastupdate'] = '마지막으로 업데이트됨:'; -$lang['source'] = '원본:'; -$lang['unknown'] = '알 수 없음'; -$lang['updating'] = '업데이트 중 ...'; -$lang['updated'] = '%s 플러그인을 성공적으로 업데이트했습니다'; -$lang['updates'] = '다음 플러그인을 성공적으로 업데이트했습니다'; -$lang['update_none'] = '업데이트를 찾을 수 없습니다.'; -$lang['deleting'] = '삭제 중 ...'; -$lang['deleted'] = '%s 플러그인이 삭제되었습니다.'; -$lang['downloading'] = '다운로드 중 ...'; -$lang['downloaded'] = '%s 플러그인이 성공적으로 설치되었습니다'; -$lang['downloads'] = '다음 플러그인이 성공적으로 설치되었습니다:'; -$lang['download_none'] = '플러그인이 없거나 다운로드 또는 설치 중에 알 수 없는 문제가 발생했습니다.'; -$lang['plugin'] = '플러그인:'; -$lang['components'] = '구성 요소'; -$lang['noinfo'] = '이 플러그인은 어떤 정보도 없습니다. 잘못된 플러그인일 수 있습니다.'; -$lang['name'] = '이름:'; -$lang['date'] = '날짜:'; -$lang['type'] = '종류:'; -$lang['desc'] = '설명:'; -$lang['author'] = '저자:'; -$lang['www'] = '웹:'; -$lang['error'] = '알 수 없는 문제가 발생했습니다.'; -$lang['error_download'] = '플러그인 파일을 다운로드 할 수 없습니다: %s'; -$lang['error_badurl'] = '잘못된 URL 같습니다 - URL에서 파일 이름을 알 수 없습니다'; -$lang['error_dircreate'] = '다운로드를 받기 위한 임시 디렉터리를 만들 수 없습니다'; -$lang['error_decompress'] = '플러그인 관리자가 다운로드 받은 파일을 압축을 풀 수 없습니다. 잘못 다운로드 받았을 수도 있으니 다시 한 번 시도하거나 압축 포맷을 알 수 없는 경우에는 다운로드한 후 수동으로 직접 설치하세요.'; -$lang['error_copy'] = '플러그인을 설치하는 동안 파일 복사하는 데 오류가 발생했습니다. <em>%s</em>: 디스크가 꽉 찼거나 파일 접근 권한이 잘못된 경우입니다. 플러그인 설치가 부분적으로만 이루어졌을 것입니다. 설치가 불완전합니다.'; -$lang['error_delete'] = '<em>%s</em> 플러그인을 삭제하는 동안 오류가 발생했습니다. 대부분의 경우 불완전한 파일이거나 디렉터리 접근 권한이 잘못된 경우입니다'; -$lang['enabled'] = '%s 플러그인을 활성화했습니다.'; -$lang['notenabled'] = '%s 플러그인을 활성화할 수 없습니다. 파일 권한을 확인하세요.'; -$lang['disabled'] = '%s 플러그인을 비활성화했습니다.'; -$lang['notdisabled'] = '%s 플러그인을 비활성화할 수 없습니다. 파일 권한을 확인하하세요.'; -$lang['packageinstalled'] = '플러그인 패키지(플러그인 %d개: %s)가 성공적으로 설치되었습니다.'; diff --git a/lib/plugins/plugin/lang/la/admin_plugin.txt b/lib/plugins/plugin/lang/la/admin_plugin.txt deleted file mode 100644 index 2a41977fc..000000000 --- a/lib/plugins/plugin/lang/la/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Addendorum Administratio ====== - -In hac pagina omnia uicis [[doku>plugins|plugins]] mutare et administrare potes. Vt addenda capere et his uti, in scrinio addendorum scribere et legere potest.
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/la/lang.php b/lib/plugins/plugin/lang/la/lang.php deleted file mode 100644 index cd2d81cbd..000000000 --- a/lib/plugins/plugin/lang/la/lang.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php -/** - * Latin language file - * - * @author Massimiliano Vassalli <vassalli.max@gmail.com> - */ -$lang['menu'] = 'Addendorum administratio'; -$lang['download'] = 'Noua addenda cape'; -$lang['manage'] = 'Addenta in usu'; -$lang['btn_info'] = 'Notae'; -$lang['btn_update'] = 'Nouare'; -$lang['btn_delete'] = 'Delere'; -$lang['btn_settings'] = 'Optiones'; -$lang['btn_download'] = 'Capere'; -$lang['btn_enable'] = 'Seruare'; -$lang['url'] = 'VRL'; -$lang['installed'] = 'In usu:'; -$lang['lastupdate'] = 'Extrema renouatio:'; -$lang['source'] = 'Fons:'; -$lang['unknown'] = 'Ignotum'; -$lang['updating'] = 'Nouans...'; -$lang['updated'] = 'Addenda %s nouata feliciter'; -$lang['updates'] = 'Hae addenda nouata feliciter sunt'; -$lang['update_none'] = 'Nulla renouatio inuenta'; -$lang['deleting'] = 'Delens...'; -$lang['deleted'] = 'Addenda %s deleta.'; -$lang['downloading'] = 'Capens ...'; -$lang['downloaded'] = 'Addenda %s recte in usu'; -$lang['downloads'] = 'Hae addenda feliciter in usu:'; -$lang['download_none'] = 'Nulla addenda reperta aut errores in capiendo sunt.'; -$lang['plugin'] = 'Addenda:'; -$lang['components'] = 'Partes'; -$lang['noinfo'] = 'Addenda alias notas non habent.'; -$lang['name'] = 'Nomen:'; -$lang['date'] = 'Dies:'; -$lang['type'] = 'Genus:'; -$lang['desc'] = 'Descriptio:'; -$lang['author'] = 'Auctor:'; -$lang['www'] = 'Situs interretialis:'; -$lang['error'] = 'Error ignotus.'; -$lang['error_download'] = 'Addenda quae non renouantur: %s'; -$lang['error_badurl'] = 'VRL malum'; -$lang['error_dircreate'] = 'Scrinium temporaneum non creatur, sic nihil capi potest'; -$lang['error_decompress'] = 'Addendorum administrator nouare non potest. Rursum capere nouationes temptat aut manu addenda noua.'; -$lang['error_copy'] = 'Exemplar malum in scrinio addendorum <em>%s</em> est: facultates documenti scrinique fortasse illegitimae sunt. Hic accidit cum addenda partim nouata sunt.'; -$lang['error_delete'] = 'Addenda <em>%s</em> non delentur.'; -$lang['enabled'] = 'Addenda %s apta facta.'; -$lang['notenabled'] = 'Addenda %s quae apta fieri non possunt.'; -$lang['disabled'] = 'Addenda %s non in usu.'; -$lang['notdisabled'] = 'Addenda %s quae inepta fieri non possunt.'; diff --git a/lib/plugins/plugin/lang/lb/admin_plugin.txt b/lib/plugins/plugin/lang/lb/admin_plugin.txt deleted file mode 100644 index 223de10e8..000000000 --- a/lib/plugins/plugin/lang/lb/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Plugin Management ====== - -Op dëser Säit kanns de alles verwalte wat mat Dokuwiki [[doku>plugins|Pluginen]] ze dinn huet. Fir e Plugin kënnen z'installéieren, muss däi Pluginverzeechnës vum Webserver schreiwbar sinn. - diff --git a/lib/plugins/plugin/lang/lb/lang.php b/lib/plugins/plugin/lang/lb/lang.php deleted file mode 100644 index 59acdf7a8..000000000 --- a/lib/plugins/plugin/lang/lb/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * lb language file - * - * @author joel@schintgen.net - */ diff --git a/lib/plugins/plugin/lang/lt/admin_plugin.txt b/lib/plugins/plugin/lang/lt/admin_plugin.txt deleted file mode 100644 index 1254b776c..000000000 --- a/lib/plugins/plugin/lang/lt/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Priedų Administravimas ====== - -Šiame puslapyje galite administruoti, darbui su Dokuwiki, reikalingu įrankius [[doku>plugins|plugins]]. Tam kad parsiųsti ir įdiegti kokį nors priedą jūsų web serveris privalo turėti įrašymo teises priedų kataloge. diff --git a/lib/plugins/plugin/lang/lt/lang.php b/lib/plugins/plugin/lang/lt/lang.php deleted file mode 100644 index c5b2fa11e..000000000 --- a/lib/plugins/plugin/lang/lt/lang.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/** - * Lithuanian language file - * - * @author audrius.klevas@gmail.com - * @author Arunas Vaitekunas <aras@fan.lt> - */ -$lang['name'] = 'Vardas:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipas:'; -$lang['desc'] = 'Aprašas:'; -$lang['author'] = 'Autorius:'; -$lang['www'] = 'Tinklapis:'; diff --git a/lib/plugins/plugin/lang/lv/admin_plugin.txt b/lib/plugins/plugin/lang/lv/admin_plugin.txt deleted file mode 100644 index 80335062f..000000000 --- a/lib/plugins/plugin/lang/lv/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Moduļu pārvaldīšana ====== - -Šajā lapā varat pārvaldīt visu, kas saistīts ar Dokuwiki [[doku>plugins|moduļiem]]. Lai varētu lejupielādēt un uzstādīt moduļus, to direktorijai serverī vajag rakstīšanas tiesības. diff --git a/lib/plugins/plugin/lang/lv/lang.php b/lib/plugins/plugin/lang/lv/lang.php deleted file mode 100644 index 9a8727875..000000000 --- a/lib/plugins/plugin/lang/lv/lang.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** - * Latvian, Lettish language file - * - * @author Aivars Miška <allefm@gmail.com> - */ -$lang['menu'] = 'Moduļu pārvaldība'; -$lang['download'] = 'Lejupielādēt un instalēt jaunu moduli.'; -$lang['manage'] = 'Instalētie moduļi'; -$lang['btn_info'] = 'uzziņa'; -$lang['btn_update'] = 'atjaunināt'; -$lang['btn_delete'] = 'dzēst'; -$lang['btn_settings'] = 'parametri'; -$lang['btn_download'] = 'Lejupielādēt'; -$lang['btn_enable'] = 'Saglabāt'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalēts:'; -$lang['lastupdate'] = 'Atjaunināts:'; -$lang['source'] = 'Avots:'; -$lang['unknown'] = 'nav zināms'; -$lang['updating'] = 'Atjauninu...'; -$lang['updated'] = 'Modulis %s veiksmīgi atjaunināts'; -$lang['updates'] = 'Veiksmīgi atjaunināti moduļi:'; -$lang['update_none'] = 'Jauninājums nav atrasts'; -$lang['deleting'] = 'Dzēšu...'; -$lang['deleted'] = 'Modulis %s dzēsts'; -$lang['downloading'] = 'Lejupielādēju...'; -$lang['downloaded'] = 'Modulis %s veiksmīgi instalēts'; -$lang['downloads'] = 'Veiksmīgi instalēti moduļi: '; -$lang['download_none'] = 'Neviens modulis nav atrasts vai arī gadījusies nezinām kļūme lejupielādes un instalācijas gaitā.'; -$lang['plugin'] = 'Modulis:'; -$lang['components'] = 'Sastāvdaļas'; -$lang['noinfo'] = 'Modulis nesniedz informāciju, tas varbūt ir bojāts.'; -$lang['name'] = 'Nosaukums:'; -$lang['date'] = 'Datums:'; -$lang['type'] = 'Tips:'; -$lang['desc'] = 'Apraksts:'; -$lang['author'] = 'Autors:'; -$lang['www'] = 'Mājaslapa:'; -$lang['error'] = 'Gadījās nezināma kļūme.'; -$lang['error_download'] = 'Nevar lejupielādēt moduļa failu %s'; -$lang['error_badurl'] = 'Aizdomas par aplamu URL - jo no tā nevar noteikt faila vārdu.'; -$lang['error_dircreate'] = 'Nevar izveidot pagaidu direktoriju, kur saglabāt lejupielādēto. '; -$lang['error_decompress'] = 'Moduļu pārvaldnieks nevar atspiest lejupielādēto failu. Vai nu neizdevusi es lejupielāde, mēģiniet atkārtot, vai arī nezinām arhīva formāts un tad modulis jāielādē un jāinstalē tev pašam.'; -$lang['error_copy'] = 'Faila kopēšanas kļūda instalējot moduli<em>%s</em>: disks pārpildīts vai aplamas piekļuves tiesības. Rezultātā var iegūt daļēji instalētu moduli un nestabilu Wiki sistēmu.'; -$lang['error_delete'] = 'Kļūme dzēšot moduli <em>%s</em>. Ticamākais iemesls ir direktorijas pieejas tiesību trūkums. '; -$lang['enabled'] = 'Modulis %s pieslēgts.'; -$lang['notenabled'] = 'Moduli %s nevar pieslēgt, pārbaudi failu tiesības.'; -$lang['disabled'] = 'Modulis %s atslēgts.'; -$lang['notdisabled'] = 'Moduli %s nevar atslēgt, pārbaudi failu tiesības.'; -$lang['packageinstalled'] = 'Moduļu paka (pavisam kopā %d: %s) veiksmīgi uzstādīti.'; diff --git a/lib/plugins/plugin/lang/mk/lang.php b/lib/plugins/plugin/lang/mk/lang.php deleted file mode 100644 index 747d61638..000000000 --- a/lib/plugins/plugin/lang/mk/lang.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php -/** - * Macedonian language file - * - * @author Dimitar Talevski <dimi3.14@gmail.com> - */ -$lang['menu'] = 'Уреди ги приклучоците'; -$lang['download'] = 'Симни и инсталирај нов приклучок'; -$lang['manage'] = 'Инсталирани приклучоци'; -$lang['btn_info'] = 'информации'; -$lang['btn_update'] = 'ажурирај'; -$lang['btn_delete'] = 'избриши'; -$lang['btn_settings'] = 'поставувања'; -$lang['btn_download'] = 'Симни'; -$lang['btn_enable'] = 'Зачувај'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Инсталирани:'; -$lang['lastupdate'] = 'Последно ажурирани:'; -$lang['source'] = 'Извор:'; -$lang['unknown'] = 'непознат'; -$lang['updating'] = 'Ажурирам...'; -$lang['updated'] = 'Приклучокот %s е успешно ажуриран'; -$lang['updates'] = 'Следниве приклучоци се успешно ажурирани'; -$lang['update_none'] = 'Нема потребни ажурирања.'; -$lang['deleting'] = 'Бришам...'; -$lang['deleted'] = 'Приклучокот %s е избришан.'; -$lang['downloading'] = 'Симнувам...'; -$lang['downloaded'] = 'Приклучокот %s е успешно инсталиран'; -$lang['downloads'] = 'Следниве приклучоци се успешно инсталирани'; -$lang['download_none'] = 'Нема пронајдени приклучоци, или имаше непознат проблем при симнување и инсталирање.'; -$lang['plugin'] = 'Приклучок:'; -$lang['components'] = 'Компоненти'; -$lang['noinfo'] = 'Овој приклучок не врати информации, може да не е валиден.'; -$lang['name'] = 'Име:'; -$lang['date'] = 'Датум:'; -$lang['type'] = 'Тип:'; -$lang['desc'] = 'Опис:'; -$lang['author'] = 'Автор:'; -$lang['www'] = 'Веб:'; -$lang['error'] = 'Се појави непозната грешка.'; -$lang['error_download'] = 'Не сум во можност да ја симнам датотеката за приклучокот: %s'; -$lang['enabled'] = 'Приклучокот %s е овозможен.'; -$lang['disabled'] = 'Приклучокот %s е оневозможен.'; diff --git a/lib/plugins/plugin/lang/mr/admin_plugin.txt b/lib/plugins/plugin/lang/mr/admin_plugin.txt deleted file mode 100644 index a925a560f..000000000 --- a/lib/plugins/plugin/lang/mr/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== प्लगिन व्यवस्थापन ====== - -या पानावर तुम्ही डॉक्युविकि [[doku>plugins|प्लगिन]] च्या सर्व बाबींची व्यवस्था लावू शकता. -प्लगिन डाउनलोड व इन्स्टॉल करण्यासाठी तुमच्या प्लगिन फोल्डरवर तुमच्या वेबसर्वरला लेखनाची परवानगी असली पाहिजे.
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/mr/lang.php b/lib/plugins/plugin/lang/mr/lang.php deleted file mode 100644 index 3f81739fa..000000000 --- a/lib/plugins/plugin/lang/mr/lang.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * Marathi language file - * - * @author ghatothkach@hotmail.com - * @author Padmanabh Kulkarni <kulkarnipadmanabh@gmail.com> - * @author Padmanabh Kulkarni<kulkarnipadmanabh@gmail.com> - * @author shantanoo@gmail.com - */ -$lang['menu'] = 'प्लगिनची व्यवस्था लावा'; -$lang['download'] = 'नवीन प्लगिन डाउनलोड करून इन्स्टॉल करा'; -$lang['manage'] = 'इन्स्टॉल केलेले प्लगिन'; -$lang['btn_info'] = 'माहिती'; -$lang['btn_update'] = 'अद्ययावत'; -$lang['btn_delete'] = 'डिलीट'; -$lang['btn_settings'] = 'सेटिंग'; -$lang['btn_download'] = 'डाउनलोड'; -$lang['btn_enable'] = 'सुरक्षित'; -$lang['url'] = 'URL'; -$lang['installed'] = 'इन्स्टॉलची वेळ :'; -$lang['lastupdate'] = 'शेवटच्या बदलाची वेळ :'; -$lang['source'] = 'स्त्रोत :'; -$lang['unknown'] = 'अगम्य'; -$lang['updating'] = 'अद्ययावत करतोय ...'; -$lang['updated'] = 'प्लगिन %s यशास्विरित्य अद्ययावत केला.'; -$lang['updates'] = 'खालील प्लगिन यशस्वीरीत्या अद्ययावत झाले'; -$lang['update_none'] = 'काही बदल मिळाले नाहीत.'; -$lang['deleting'] = 'डिलीट करतोय ...'; -$lang['deleted'] = '%s प्लगिन डिलीट केला.'; -$lang['downloading'] = 'डाउनलोड करतोय ...'; -$lang['downloaded'] = '%s प्लगिन यशस्वीरीत्या इन्स्टॉल झाला.'; -$lang['downloads'] = 'खालील प्लगिन यशस्वीरीत्या इन्स्टॉल झाले : '; -$lang['download_none'] = 'एकही प्लगिन मिळाला नाही, किंवा डाउनलोड आणि इन्स्टॉल मधे काही अज्ञात अडचण आली असावी.'; -$lang['plugin'] = 'प्लगिन : '; -$lang['components'] = 'भाग : '; -$lang['noinfo'] = 'या प्लगिनने काही माहिती दिली नाही. बहुधा हा अवैध असावा.'; -$lang['name'] = 'नाव :'; -$lang['date'] = 'दिनांक :'; -$lang['type'] = 'टाइप : '; -$lang['desc'] = 'वर्णन : '; -$lang['author'] = 'लेखक : '; -$lang['www'] = 'वेब : '; -$lang['error'] = 'अज्ञात अडचण आली.'; -$lang['error_download'] = 'डाउनलोड न झालेली प्लगिन फाइल : %s'; -$lang['error_badurl'] = 'बहुधा चुकीचे URL - URL वरून फाइलचे नाव ठरवता आले नाही.'; -$lang['error_dircreate'] = 'डाउनलोड साठवण्यासाठी तात्पुरता फोल्डर तयार करू शकलो नाही'; -$lang['error_decompress'] = 'प्लगिन व्यवस्थापक डाउनलोड केलेली फाइल विस्तारित करू शकला नाही. हे कदाचित डाउनलोड नीट न झाल्यामुळे असावं; असे असल्यास तुमची परत डाउनलोड करण्याचा प्रयत्न करू शकता; किंवा प्लगिन संक्षिप्त करण्यास वापरलेली पद्धत अनाकलनीय आहे; तसे असल्यास तुम्हाला स्वतः प्लगिन डाउनलोड व इन्स्टॉल करावा लागेल.'; -$lang['error_copy'] = '<em>%s</em> प्लगिनसाठी फाइल इन्स्टॉल करताना फाइल कॉपी करू शकलो नाही : डिस्क भरली असेल किंवा फाइल वरील परवानग्या बरोबर नसतील. यामुळे प्लगिन अर्धवट इन्स्टॉल जाला असण्याची व त्यामुळे तुमची विकी ख़राब होण्याची शक्यता आहे.'; -$lang['error_delete'] = '<em>%s</em> प्लगिन डिलीट करताना काही चूक झाली आहे. फाइल किंवा डिरेक्टरी वरील परवानग्या बरोबर नसणे हे याचं मुख्य कारण असू शकतं.'; -$lang['enabled'] = '%s प्लगइन चालू केला.'; -$lang['notenabled'] = '%s प्लगइन चालू करू शकलो नाही, फाइलच्या परवानग्या तपासा.'; -$lang['disabled'] = '%s प्लगइन बंद केला.'; -$lang['notdisabled'] = '%s प्लगइन बंद करू शकलो नाही, फाइलच्या परवानग्या तपासा.'; diff --git a/lib/plugins/plugin/lang/ms/lang.php b/lib/plugins/plugin/lang/ms/lang.php deleted file mode 100644 index 77ad2a1c1..000000000 --- a/lib/plugins/plugin/lang/ms/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Malay language file - * - * @author Markos - */ diff --git a/lib/plugins/plugin/lang/ne/lang.php b/lib/plugins/plugin/lang/ne/lang.php deleted file mode 100644 index 94e7b8089..000000000 --- a/lib/plugins/plugin/lang/ne/lang.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Saroj Kumar Dhakal <lotusnagarkot@gmail.com> - * @author SarojKumar Dhakal <lotusnagarkot@yahoo.com> - * @author Saroj Dhakal<lotusnagarkot@yahoo.com> - */ -$lang['menu'] = 'प्लगिन व्यवस्थापन गर्नुहोस।'; -$lang['download'] = 'नयाँ प्लगिन डाउनलोड गरी स्थापना गर्नुहोस्'; -$lang['manage'] = 'स्थापित प्लगिनहरु'; -$lang['btn_info'] = 'जानकारी'; -$lang['btn_update'] = 'अध्यावधिक गर्नुहोस'; -$lang['btn_delete'] = 'मेटाउनुहोस्'; -$lang['btn_settings'] = 'व्यवस्थापन'; -$lang['btn_download'] = 'डाउनलोड गर्नुहोस्'; -$lang['btn_enable'] = 'वचत गर्नुहोस्'; -$lang['url'] = 'URL'; -$lang['installed'] = 'स्थापित'; -$lang['lastupdate'] = 'अन्तिम अध्यावधिक :'; -$lang['source'] = 'स्रोत:'; -$lang['unknown'] = 'थाह नभएको'; -$lang['updating'] = 'अध्यावधिक गर्दै......'; -$lang['updated'] = 'प्लगिन %s सफलतापूर्वक अध्यावधिक भयो '; -$lang['updates'] = 'निम्न प्लगिनहरु सफलतापूर्वक अध्यावधिक भए।'; -$lang['update_none'] = 'कुनै पनि अध्यावधिकम भेटिएन ।'; -$lang['deleting'] = 'हटाउदै ......'; -$lang['deleted'] = 'प्लगिन %s हटाइयो ।'; -$lang['downloading'] = 'डाउनलोड गर्दै ........'; -$lang['downloaded'] = 'प्लगिन %s सफलतापूर्वक स्थापित भयो '; -$lang['downloads'] = 'निम्न प्लगिनहरु सफलतापूर्वक स्थापित भए'; -$lang['download_none'] = 'कुनै पनि प्लगइन भेटिएन, या डाउनलोड गर्दा र स्थापना गर्दा त्रुटि भयो ।'; -$lang['plugin'] = 'प्लगिन:'; -$lang['components'] = 'पुर्जाहरु '; -$lang['noinfo'] = 'यो प्लगइनले कुनै पनि जनाकारी दिएन , यो अमान्य हुनसक्छ ।'; -$lang['name'] = 'नाम:'; -$lang['date'] = 'मिति:'; -$lang['type'] = 'प्रकार :'; -$lang['desc'] = 'जानकारी:'; -$lang['author'] = 'जारीकर्ता:'; -$lang['www'] = 'वेब:'; -$lang['error'] = 'अज्ञात त्रुटि फेला पर्यो ।'; -$lang['error_download'] = 'प्लहइन फाइल: %s डाउनलोड गर्न असमर्थ ।'; -$lang['error_badurl'] = 'शंकास्पद खराब url - Url बाट फाइल नाम निश्चित गर्न असमर्थ ।'; -$lang['error_dircreate'] = 'डाउनलोड प्राप्त गर्नको निमि्त्त अस्थाइ फोल्डर निर्माण गर्न असमर्थ ।'; diff --git a/lib/plugins/plugin/lang/nl/admin_plugin.txt b/lib/plugins/plugin/lang/nl/admin_plugin.txt deleted file mode 100644 index 36731b0b0..000000000 --- a/lib/plugins/plugin/lang/nl/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -===== Pluginmanager ===== - -Op deze pagina kunt u alle DokuWiki [[doku>plugins|plugins]] beheren. Om plugins te kunnen downloaden en installeren, moet de plugin-directory schrijfbaar zijn voor de webserver.
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/nl/lang.php b/lib/plugins/plugin/lang/nl/lang.php deleted file mode 100644 index 1317e44f2..000000000 --- a/lib/plugins/plugin/lang/nl/lang.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Wouter Schoot <wouter@schoot.org> - * @author John de Graaff <john@de-graaff.net> - * @author Niels Schoot <niels.schoot@quintiq.com> - * @author Dion Nicolaas <dion@nicolaas.net> - * @author Danny Rotsaert <danny.rotsaert@edpnet.be> - * @author Marijn Hofstra hofstra.m@gmail.com - * @author Matthias Carchon webmaster@c-mattic.be - * @author Marijn Hofstra <hofstra.m@gmail.com> - * @author Timon Van Overveldt <timonvo@gmail.com> - * @author Jeroen - * @author Ricardo Guijt <ricardoguijt@gmail.com> - * @author Gerrit <klapinklapin@gmail.com> - */ -$lang['menu'] = 'Plugins beheren'; -$lang['download'] = 'Download en installeer een nieuwe plugin'; -$lang['manage'] = 'Geïnstalleerde plugins'; -$lang['btn_info'] = 'informatie'; -$lang['btn_update'] = 'bijwerken'; -$lang['btn_delete'] = 'verwijderen'; -$lang['btn_settings'] = 'instellingen'; -$lang['btn_download'] = 'Download'; -$lang['btn_enable'] = 'Opslaan'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Geïnstalleerd:'; -$lang['lastupdate'] = 'Laatst bijgewerkt:'; -$lang['source'] = 'Bron:'; -$lang['unknown'] = 'onbekend'; -$lang['updating'] = 'Bijwerken ...'; -$lang['updated'] = 'Plugin %s succesvol bijgewerkt'; -$lang['updates'] = 'De volgende plugins zijn succesvol bijgewerkt'; -$lang['update_none'] = 'Geen updates gevonden.'; -$lang['deleting'] = 'Verwijderen ...'; -$lang['deleted'] = 'Plugin %s verwijderd.'; -$lang['downloading'] = 'Downloaden ...'; -$lang['downloaded'] = 'Plugin %s succesvol geïnstalleerd'; -$lang['downloads'] = 'De volgende plugins zijn succesvol geïnstalleerd:'; -$lang['download_none'] = 'Geen plugins gevonden, of er is een onbekende fout opgetreden tijdens het downloaden en installeren.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Onderdelen'; -$lang['noinfo'] = 'Deze plugin gaf geen informatie terug, misschien is hij defect.'; -$lang['name'] = 'Naam:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Type:'; -$lang['desc'] = 'Omschrijving:'; -$lang['author'] = 'Auteur:'; -$lang['www'] = 'Weblocatie:'; -$lang['error'] = 'Er is een onbekende fout opgetreden.'; -$lang['error_download'] = 'Kan het volgende plugin bestand niet downloaden: %s'; -$lang['error_badurl'] = 'Vermoedelijk onjuiste url - kan de filename niet uit de url afleiden'; -$lang['error_dircreate'] = 'Kan geen tijdelijke directory aanmaken voor de download'; -$lang['error_decompress'] = 'De pluginmanager kan het gedownloade bestand niet uitpakken. Dit kan het resultaat zijn van een mislukte download: probeer het opnieuw; of het compressieformaat is onbekend: in dat geval moet je de plugin handmatig downloaden en installeren.'; -$lang['error_copy'] = 'Er was een probleem met het kopiëren van een bestand tijdens de installatie van plugin <em>%s</em>: de schijf kan vol zijn of onjuiste toegangsrechten hebben. Dit kan tot gevolg hebben dat de plugin slechts gedeeltelijk geïnstalleerd is en kan uw wiki onstabiel maken.'; -$lang['error_delete'] = 'Er is een probleem opgetreden tijdens het verwijderen van plugin <em>%s</em>. De meest voorkomende oorzaak is onjuiste toegangsrechten op bestanden of directory\'s.'; -$lang['enabled'] = 'Plugin %s ingeschakeld.'; -$lang['notenabled'] = 'Plugin %s kon niet worden ingeschakeld, controleer bestandsrechten.'; -$lang['disabled'] = 'Plugin %s uitgeschakeld.'; -$lang['notdisabled'] = 'Plugin %s kon niet worden uitgeschakeld, controleer bestandsrechten.'; -$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) succesvol geïnstalleerd.'; diff --git a/lib/plugins/plugin/lang/no/admin_plugin.txt b/lib/plugins/plugin/lang/no/admin_plugin.txt deleted file mode 100644 index 1765b671d..000000000 --- a/lib/plugins/plugin/lang/no/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Behandle programtillegg ====== - -På denne siden kan du behandle alt som har å gjøre med DokuWikis [[doku>plugins|tillegg]]. For å kunne laste ned og installere et tillegg må webserveren ha skrivetilgang til mappen for tillegg. diff --git a/lib/plugins/plugin/lang/no/lang.php b/lib/plugins/plugin/lang/no/lang.php deleted file mode 100644 index 829d29387..000000000 --- a/lib/plugins/plugin/lang/no/lang.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php -/** - * Norwegianlanguage file - * - * @author Thomas Nygreen <nygreen@gmail.com> - * @author Arild Burud <arildb@met.no> - * @author Torkill Bruland <torkar-b@online.no> - * @author Rune M. Andersen <rune.andersen@gmail.com> - * @author Jakob Vad Nielsen (me@jakobnielsen.net) - * @author Kjell Tore Næsgaard <kjell.t.nasgaard@ntnu.no> - * @author Knut Staring <knutst@gmail.com> - * @author Lisa Ditlefsen <lisa@vervesearch.com> - * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author Rune Rasmussen syntaxerror.no@gmail.com - * @author Jon Bøe <jonmagneboe@hotmail.com> - * @author Egil Hansen <egil@rosetta.no> - */ -$lang['menu'] = 'Behandle programtillegg'; -$lang['download'] = 'Last ned og installer et programtillegg'; -$lang['manage'] = 'Installerte programtillegg'; -$lang['btn_info'] = 'informasjon'; -$lang['btn_update'] = 'oppdater'; -$lang['btn_delete'] = 'slett'; -$lang['btn_settings'] = 'innstillinger'; -$lang['btn_download'] = 'Last ned'; -$lang['btn_enable'] = 'Lagre'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Installert:'; -$lang['lastupdate'] = 'Sist oppdatert:'; -$lang['source'] = 'Kilde:'; -$lang['unknown'] = 'ukjent'; -$lang['updating'] = 'Oppdaterer ...'; -$lang['updated'] = 'Tillegget %s er oppdatert'; -$lang['updates'] = 'Følgende programtillegg har blitt oppdatert'; -$lang['update_none'] = 'Ingen oppdateringer funnet.'; -$lang['deleting'] = 'Sletter ...'; -$lang['deleted'] = 'Tillegget %s ble slettet.'; -$lang['downloading'] = 'Laster ned ...'; -$lang['downloaded'] = 'Tillegget %s ble installert'; -$lang['downloads'] = 'De følgende tilleggene ble installert'; -$lang['download_none'] = 'Ingen tillegg funnet, eller det har vært et ukjent problem under nedlasting og installering.'; -$lang['plugin'] = 'Tillegg:'; -$lang['components'] = 'Komponenter'; -$lang['noinfo'] = 'Tillegget ga ikke noe informasjon. Det kan være ugyldig.'; -$lang['name'] = 'Navn:'; -$lang['date'] = 'Dato:'; -$lang['type'] = 'Type:'; -$lang['desc'] = 'Beskrivelse:'; -$lang['author'] = 'Forfatter:'; -$lang['www'] = 'Nett:'; -$lang['error'] = 'En ukjent feil oppstod.'; -$lang['error_download'] = 'Klarte ikke å laste ned tillegget i filen: %s'; -$lang['error_badurl'] = 'Mistenker feil URL - klarte ikke å finne filnavnet i URLen'; -$lang['error_dircreate'] = 'Klarte ikke å lage en midlertidig mappe for å laste ned'; -$lang['error_decompress'] = 'Tilleggsbehandleren klarte ikke å dekomprimere den nedlastede filen. Dette kan være på grunn av en feilet nedlasting, i så fall bør du prøve igjen, eller kompresjonsformatet kan være ukjent, i så fall må du laste ned og installere tillegget manuelt.'; -$lang['error_copy'] = 'Det skjedde en feil ved kopiering av en fil under installasjonen av <em>%s</em>: disken kan være full eller rettighetene satt feil. Dette kan ha ført til et delvist installert tillegg og gjort wikien ubrukelig.'; -$lang['error_delete'] = 'Det skjedde en feil under forsøket på å slette tillegget <em>%s</em>. Den mest sannsynlige grunnen er utilstrekkelige rettigheter for filene eller mappene.'; -$lang['enabled'] = 'Tillegget %s aktivert'; -$lang['notenabled'] = 'Plugin %s kunne ikke aktiveres, sjekk filrettighetene.'; -$lang['disabled'] = 'Plugin %s deaktivert'; -$lang['notdisabled'] = 'Plugin %s kunne ikke deaktiveres, sjekk filrettighetene.'; -$lang['packageinstalled'] = 'Installasjonen av tilleggspakka (%d tillegg: %s) var vellykka'; diff --git a/lib/plugins/plugin/lang/pl/admin_plugin.txt b/lib/plugins/plugin/lang/pl/admin_plugin.txt deleted file mode 100644 index f01048198..000000000 --- a/lib/plugins/plugin/lang/pl/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Menadżer wtyczek ====== - -Na tej stronie możesz zarządzać wszystkim co jest związane z [[doku>plugins|wtyczkami]] Dokuwiki. Aby móc ściągnąć i zainstalować wtyczkę, serwer WWW musi mieć prawo do zapisu w katalogu ''plugins''. - - diff --git a/lib/plugins/plugin/lang/pl/lang.php b/lib/plugins/plugin/lang/pl/lang.php deleted file mode 100644 index faaa69630..000000000 --- a/lib/plugins/plugin/lang/pl/lang.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php -/** - * polish language file - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Michał Tkacz <mehow@autocom.pl> - * @author Grzegorz Żur <grzegorz.zur@gmail.com> - * @author Mariusz Kujawski <marinespl@gmail.com> - * @author Maciej Kurczewski <pipijajko@gmail.com> - * @author Sławomir Boczek <slawkens@gmail.com> - * @author sleshek@wp.pl - * @author Leszek Stachowski <shazarre@gmail.com> - * @author maros <dobrimaros@yahoo.pl> - * @author Grzegorz Widła <dzesdzes@gmail.com> - * @author Łukasz Chmaj <teachmeter@gmail.com> - * @author Begina Felicysym <begina.felicysym@wp.eu> - * @author Aoi Karasu <aoikarasu@gmail.com> - */ -$lang['menu'] = 'Menadżer wtyczek'; -$lang['download'] = 'Ściągnij i zainstaluj nową wtyczkę'; -$lang['manage'] = 'Zainstalowane Wtyczki'; -$lang['btn_info'] = 'Informacje'; -$lang['btn_update'] = 'Aktualizuj'; -$lang['btn_delete'] = 'Usuń'; -$lang['btn_settings'] = 'Ustawienia'; -$lang['btn_download'] = 'Pobierz'; -$lang['btn_enable'] = 'Zapisz'; -$lang['url'] = 'Adres URL'; -$lang['installed'] = 'Instalacja:'; -$lang['lastupdate'] = 'Ostatnio zaktualizowana:'; -$lang['source'] = 'Źródło:'; -$lang['unknown'] = 'nieznane'; -$lang['updating'] = 'Aktualizuję...'; -$lang['updated'] = 'Aktualizacja wtyczki %s pomyślnie ściągnięta'; -$lang['updates'] = 'Aktualizacje następujących wtyczek zostały pomyślnie ściągnięte'; -$lang['update_none'] = 'Nie znaleziono aktualizacji.'; -$lang['deleting'] = 'Usuwam...'; -$lang['deleted'] = 'Wtyczka %s usunięta.'; -$lang['downloading'] = 'Pobieram...'; -$lang['downloaded'] = 'Wtyczka %s pomyślnie zainstalowana'; -$lang['downloads'] = 'Następujące wtyczki zostały pomyślnie zainstalowane:'; -$lang['download_none'] = 'Nie znaleziono wtyczek lub wystąpił nieznany problem podczas ściągania i instalacji.'; -$lang['plugin'] = 'Wtyczka:'; -$lang['components'] = 'Składniki'; -$lang['noinfo'] = 'Ta wtyczka nie zwróciła żadnych informacji, może być niepoprawna.'; -$lang['name'] = 'Nazwa:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Opis:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'WWW:'; -$lang['error'] = 'Wystąpił nieznany błąd.'; -$lang['error_download'] = 'Nie powiodło się ściągnięcie pliku wtyczki: %s'; -$lang['error_badurl'] = 'Prawdopodobnie zły url - nie da się ustalić nazwy pliku na podstawie urla'; -$lang['error_dircreate'] = 'Nie powiodło się stworzenie tymczasowego katalogu na pobrane pliki'; -$lang['error_decompress'] = 'Menadżer wtyczek nie był w stanie rozpakować ściągniętego pliku. Może to być spowodowane przez nieudany transfer (w takim przypadku powinieneś spróbować ponownie) lub nieznany format kompresji (w takim przypadku będziesz musiał ściągnąć i zainstalować wtyczkę ręcznie).'; -$lang['error_copy'] = 'Wystąpił błąd podczas kopiowania pliku w trakcie instalacji wtyczki %s: być może dysk jest pełny lub prawa dostępu są niepoprawne. Efektem może być częściowo zainstalowana wtyczka co może spowodować niestabilność Twojej instalacji wiki.'; -$lang['error_delete'] = 'Wystąpił błąd przy próbie usunięcia wtyczki <em>%s</em>. Prawdopodobną przyczyną są niewystarczające uprawnienia do katalogu.'; -$lang['enabled'] = 'Wtyczka %s włączona.'; -$lang['notenabled'] = 'Nie udało się uruchomić wtyczki %s, sprawdź uprawnienia dostępu do plików.'; -$lang['disabled'] = 'Wtyczka %s wyłączona.'; -$lang['notdisabled'] = 'Nie udało się wyłączyć wtyczki %s, sprawdź uprawnienia dostępu do plików.'; -$lang['packageinstalled'] = 'Pakiet wtyczek (%d wtyczki: %s) zainstalowany pomyślnie.'; diff --git a/lib/plugins/plugin/lang/pt-br/admin_plugin.txt b/lib/plugins/plugin/lang/pt-br/admin_plugin.txt deleted file mode 100644 index 9e49f5136..000000000 --- a/lib/plugins/plugin/lang/pt-br/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Gerenciamento de Plug-ins ====== - -Nesta página você pode gerenciar tudo relacionado aos [[doku>plugins|plug-ins]] do DokuWiki. Para você baixar e instalar um plug-in o servidor web deve ter permissão de escrita na pasta onde ficam os plug-ins. diff --git a/lib/plugins/plugin/lang/pt-br/lang.php b/lib/plugins/plugin/lang/pt-br/lang.php deleted file mode 100644 index c025188f3..000000000 --- a/lib/plugins/plugin/lang/pt-br/lang.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Frederico Gonçalves Guimarães <frederico@teia.bio.br> - * @author Felipe Castro <fefcas@gmail.com> - * @author Lucien Raven <lucienraven@yahoo.com.br> - * @author Enrico Nicoletto <liverig@gmail.com> - * @author Flávio Veras <flaviove@gmail.com> - * @author Jeferson Propheta <jeferson.propheta@gmail.com> - * @author jair.henrique@gmail.com - * @author Luis Dantas <luis@dantas.com> - * @author Frederico Guimarães <frederico@teia.bio.br> - * @author Jair Henrique <jair.henrique@gmail.com> - * @author Luis Dantas <luisdantas@gmail.com> - * @author Sergio Motta sergio@cisne.com.br - * @author Isaias Masiero Filho <masiero@masiero.org> - * @author Balaco Baco <balacobaco@imap.cc> - * @author Victor Westmann <victor.westmann@gmail.com> - */ -$lang['menu'] = 'Gerenciar Plug-ins'; -$lang['download'] = 'Baixar e instalar um novo plug-in'; -$lang['manage'] = 'Plug-ins instalados'; -$lang['btn_info'] = 'informações'; -$lang['btn_update'] = 'atualizar'; -$lang['btn_delete'] = 'excluir'; -$lang['btn_settings'] = 'configurações'; -$lang['btn_download'] = 'Baixar'; -$lang['btn_enable'] = 'Salvar'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalação:'; -$lang['lastupdate'] = 'Última atualização:'; -$lang['source'] = 'Fonte:'; -$lang['unknown'] = 'desconhecida'; -$lang['updating'] = 'Atualizando...'; -$lang['updated'] = 'O plug-in %s foi atualizado com sucesso'; -$lang['updates'] = 'Os seguintes plug-ins foram atualizados com sucesso'; -$lang['update_none'] = 'Não foi encontrada nenhuma atualização.'; -$lang['deleting'] = 'Excluindo...'; -$lang['deleted'] = 'O plug-in %s foi excluído.'; -$lang['downloading'] = 'Baixando...'; -$lang['downloaded'] = 'O plug-in %s foi instalado com sucesso'; -$lang['downloads'] = 'Os seguintes plug-ins foram instalados com sucesso:'; -$lang['download_none'] = 'O plug-in não foi encontrado ou então ocorreu um problema desconhecido durante a transferência e instalação.'; -$lang['plugin'] = 'Plug-in:'; -$lang['components'] = 'Componentes'; -$lang['noinfo'] = 'Esse plug-in não retornou nenhuma informação. Ele pode ser inválido.'; -$lang['name'] = 'Nome:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipo:'; -$lang['desc'] = 'Descrição:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Ocorreu um erro desconhecido.'; -$lang['error_download'] = 'Não foi possível baixar o arquivo de plug-in: %s'; -$lang['error_badurl'] = 'Suspeita de URL mal formatada - não foi possível determinar o nome do arquivo a partir da URL'; -$lang['error_dircreate'] = 'Não foi possível criar a pasta temporária para receber a transferência'; -$lang['error_decompress'] = 'O gerenciador de plug-ins não conseguiu descompactar o arquivo transferido. Isso pode ser resultado de: uma corrupção do arquivo durante a transferência, nesse caso, você deve tentar novamente; ou o formato da compactação pode ser desconhecido, nesse caso você deve transferir e instalar o plug-in manualmente.'; -$lang['error_copy'] = 'Ocorreu um erro de cópia de arquivo na tentativa de instalar o plug-in <em>%s</em>: o disco pode estar cheio ou as permissões de acesso ao arquivo podem estar erradas. Isso pode resultar em um plug-in parcialmente instalado e tornar o seu wiki instável.'; -$lang['error_delete'] = 'Ocorreu um erro na tentativa de excluir o plug-in <em>%s</em>. A causa mais provável é a permissão de acesso insuficiente ao diretório ou ao arquivo.'; -$lang['enabled'] = 'O plug-in %s foi habilitado.'; -$lang['notenabled'] = 'Não foi possível habilitar o plug-in %s. Verifique as permissões de acesso.'; -$lang['disabled'] = 'O plug-in %s foi desabilitado.'; -$lang['notdisabled'] = 'Não foi possível desabilitar o plug-in %s. Verifique as permissões de acesso.'; -$lang['packageinstalled'] = 'O pacote do plugin (%d plugin(s): %s) foi instalado com sucesso.'; diff --git a/lib/plugins/plugin/lang/pt/admin_plugin.txt b/lib/plugins/plugin/lang/pt/admin_plugin.txt deleted file mode 100644 index 2cc470193..000000000 --- a/lib/plugins/plugin/lang/pt/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Gestor de Plugins ====== - -Nesta página pode gerir tudo o que tenha a haver com [[doku>plugins|plugins]] DokuWiki. Atenção que a pasta que contém os plugins precisa de ter permissões de escrita para se poder efectuar o download.
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/pt/lang.php b/lib/plugins/plugin/lang/pt/lang.php deleted file mode 100644 index aa6b2e2ec..000000000 --- a/lib/plugins/plugin/lang/pt/lang.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author José Monteiro <Jose.Monteiro@DoWeDo-IT.com> - * @author Enrico Nicoletto <liverig@gmail.com> - * @author Fil <fil@meteopt.com> - * @author André Neves <drakferion@gmail.com> - * @author José Campos zecarlosdecampos@gmail.com - */ -$lang['menu'] = 'Gerir Plugins'; -$lang['download'] = 'Descarregar e instalar um novo plugin'; -$lang['manage'] = 'Plugins Instalados'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'actualizar'; -$lang['btn_delete'] = 'remover'; -$lang['btn_settings'] = 'configurações'; -$lang['btn_download'] = 'Descarregar'; -$lang['btn_enable'] = 'Guardar'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalado em:'; -$lang['lastupdate'] = 'Actualizado em:'; -$lang['source'] = 'Fonte:'; -$lang['unknown'] = 'desconhecida'; -$lang['updating'] = 'Actualizando ...'; -$lang['updated'] = 'Plugin %s actualizado com sucesso.'; -$lang['updates'] = 'Os seguintes plguins foram actualizados com sucesso:'; -$lang['update_none'] = 'Não foram encontradas actualizações.'; -$lang['deleting'] = 'Removendo ...'; -$lang['deleted'] = 'Plugin %s removido.'; -$lang['downloading'] = 'Descarregando ...'; -$lang['downloaded'] = 'Plugin %s instalado com sucesso.'; -$lang['downloads'] = 'Os seguintes plguins foram instalados com sucesso:'; -$lang['download_none'] = 'Nenhum plugin encontrado ou ocorreu um problema ao descarregar ou instalar.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Componentes'; -$lang['noinfo'] = 'Este plugin não retornou qualquer informação, pode estar inválido.'; -$lang['name'] = 'Nome:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipo:'; -$lang['desc'] = 'Descrição:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Sítio:'; -$lang['error'] = 'Ocorreu um erro desconhecido.'; -$lang['error_download'] = 'Impossível descarregar o ficheiro do plugin: %s'; -$lang['error_badurl'] = 'URL suspeito ou errado - impossível determinar o ficheiro a partir do URL'; -$lang['error_dircreate'] = 'Impossível criar pasta temporária para receber os ficheiros a descarregar'; -$lang['error_decompress'] = 'O gestor de plugins foi incapaz de descomprimir o ficheiro transferido. Isto pode ter sido causado por uma má transferência, caso no qual você deverá tentar de novo, ou por um formato de compressão desconhecido, caso no qual você deve instalar o plugin manualmente.'; -$lang['error_copy'] = 'Ocorreu um erro na cópia do ficheiro na tentativa de instalar o plugin <em>%s</em>: o disco pode estar cheio ou as permissões de acesso do ficheiro podem estar erradas. Isto pode resultar em um plugin parcialmente instalado e deixar a instalação do seu wiki instável.'; -$lang['error_delete'] = 'Ocorreu um erro na tentativa de remover o plug-in <em>%s</em>. A causa mais provável é a permissão de acesso à directoria ou ao ficheiro insuficiente.'; -$lang['enabled'] = 'Plugin %s habilitado.'; -$lang['notenabled'] = 'Plugin %s não pôde ser habilitado, verifique as permissões.'; -$lang['disabled'] = 'Plugin %s desabilitado.'; -$lang['notdisabled'] = 'Plugin %s não pôde ser desabilitado, verifique as permissões.'; -$lang['packageinstalled'] = 'Pacote de Plugins (%d plugin(s): %s) instalado com sucesso.'; diff --git a/lib/plugins/plugin/lang/ro/admin_plugin.txt b/lib/plugins/plugin/lang/ro/admin_plugin.txt deleted file mode 100644 index a2956e45d..000000000 --- a/lib/plugins/plugin/lang/ro/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Managementul Plugin-urilor ====== - -In această pagină puteţi administra orice [[doku>plugins|plugin]] Dokuwiki. Pentru a descărca şi instala un plugin, directorul acestora trebuie să ofere webserver-ului acces la scriere. diff --git a/lib/plugins/plugin/lang/ro/lang.php b/lib/plugins/plugin/lang/ro/lang.php deleted file mode 100644 index c57647e0b..000000000 --- a/lib/plugins/plugin/lang/ro/lang.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php -/** - * Romanian language file - * - * @author Sergiu Baltariu <s_baltariu@yahoo.com> - * @author s_baltariu@yahoo.com - * @author Emanuel-Emeric Andrasi <n30@mandrivausers.ro> - * @author Emanuel-Emeric Andrași <n30@mandrivausers.ro> - * @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro> - * @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro> - * @author Marius OLAR <olarmariusalex@gmail.com> - * @author Marius Olar <olarmariusalex@yahoo.com> - * @author Emanuel-Emeric Andrași <em.andrasi@mandrivausers.ro> - */ -$lang['menu'] = 'Administrează plugin-uri'; -$lang['download'] = 'Descarcă şi instalează un nou plugin'; -$lang['manage'] = 'Plugin-uri instalate'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'actualizare'; -$lang['btn_delete'] = 'ştergere'; -$lang['btn_settings'] = 'setări'; -$lang['btn_download'] = 'Descarcă'; -$lang['btn_enable'] = 'Salvează'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Instalat:'; -$lang['lastupdate'] = 'Ultima actualizare:'; -$lang['source'] = 'Sursa:'; -$lang['unknown'] = 'necunoscut'; -$lang['updating'] = 'Se actualizează ...'; -$lang['updated'] = 'Plugin-ul %s a fost actualizat cu succes'; -$lang['updates'] = 'Următoarele plugin-uri au fost actualizate cu succes'; -$lang['update_none'] = 'Nu a fost găsită nici o actualizare.'; -$lang['deleting'] = 'Se şterge ...'; -$lang['deleted'] = 'Plugin-ul %s a fost şters.'; -$lang['downloading'] = 'Se descarcă ...'; -$lang['downloaded'] = 'Plugin-ul %s a fost instalat cu succes'; -$lang['downloads'] = 'Următoarele plugin-uri au fost instalate cu succes'; -$lang['download_none'] = 'Nici un plugin nu a fost găsit, sau o problemă necunoscută a apărut în timpul descărcării şi instalării.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Componente'; -$lang['noinfo'] = 'Acest plugin nu a furnizat nici o informaţie; ar putea fi invalid.'; -$lang['name'] = 'Nume:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tip:'; -$lang['desc'] = 'Descriere:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'A intervenit o eroare necunoscută.'; -$lang['error_download'] = 'Nu a fost posibilă descărcarea plugin-ului: %s'; -$lang['error_badurl'] = 'url suspectat ca fiind eronat - nu a putut fi determinat numele fişierului din url'; -$lang['error_dircreate'] = 'Nu a putut fi creat directorul temporar pentru descărcarea fişierului'; -$lang['error_decompress'] = 'Administratorul de plugin-uri nu a putut dezarhiva fişierul descărcat. Aceasta se poate datora unei erori la descărcare, caz în care trebuie să încercaţi din nou; sau formatul de arhivare este necunoscut, caz în care va trebui să descărcaţi şi să instalaţi plugin-ul manual.'; -$lang['error_copy'] = 'O eroare la copiere a apărut la instalarea fişierelor plugin-ului <em>%s</em>: discul poate fi plin sau drepturile de acces ale fişierelor sunt incorecte. Aceasta poate avea ca rezultat o instalare parţială a plugin-ului şi o instabilitate a instalării wiki.'; -$lang['error_delete'] = 'O eroare a apărut la ştergerea plugin-ului <em>%s</em>. Cea mai probabilă cauză sunt drepturile de acces insuficiente ale fişierului sau directorului.'; -$lang['enabled'] = 'Plugin %s activat.'; -$lang['notenabled'] = 'Plugin-ul %s nu poate fi activat, verificaţi permisiunile fişierului.'; -$lang['disabled'] = 'Plugin %s dezactivat.'; -$lang['notdisabled'] = 'Plugin-ul %s nu poate fi dezactivat, verificaţi permisiunile fişierului.'; -$lang['packageinstalled'] = 'Pachet modul (%d modul(e): %s) instalat cu succes.'; diff --git a/lib/plugins/plugin/lang/ru/admin_plugin.txt b/lib/plugins/plugin/lang/ru/admin_plugin.txt deleted file mode 100644 index 3e00e4150..000000000 --- a/lib/plugins/plugin/lang/ru/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Управление плагинами ====== - -Здесь вы можете делать всё, что связано с [[doku>plugins|плагинами]] «ДокуВики». Для того, чтобы скачивать и устанавливать плагины, директория плагинов должна быть доступна для записи веб-сервером. - - diff --git a/lib/plugins/plugin/lang/ru/lang.php b/lib/plugins/plugin/lang/ru/lang.php deleted file mode 100644 index b933f7754..000000000 --- a/lib/plugins/plugin/lang/ru/lang.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Denis Simakov <akinoame1@gmail.com> - * @author Andrew Pleshakov <beotiger@mail.ru> - * @author Змей Этерийский evil_snake@eternion.ru - * @author Hikaru Nakajima <jisatsu@mail.ru> - * @author Alexei Tereschenko <alexeitlex@yahoo.com> - * @author Irina Ponomareva irinaponomareva@webperfectionist.com - * @author Alexander Sorkin <kibizoid@gmail.com> - * @author Kirill Krasnov <krasnovforum@gmail.com> - * @author Vlad Tsybenko <vlad.development@gmail.com> - * @author Aleksey Osadchiy <rfc@nm.ru> - * @author Aleksandr Selivanov <alexgearbox@gmail.com> - * @author Ladyko Andrey <fylh@succexy.spb.ru> - * @author Eugene <windy.wanderer@gmail.com> - * @author Johnny Utah <pcpa@cyberpunk.su> - * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) - */ -$lang['menu'] = 'Управление плагинами'; -$lang['download'] = 'Скачать и установить новый плагин'; -$lang['manage'] = 'Установленные плагины'; -$lang['btn_info'] = 'данные'; -$lang['btn_update'] = 'обновить'; -$lang['btn_delete'] = 'удалить'; -$lang['btn_settings'] = 'настройки'; -$lang['btn_download'] = 'Скачать'; -$lang['btn_enable'] = 'Сохранить'; -$lang['url'] = 'Адрес'; -$lang['installed'] = 'Установлен:'; -$lang['lastupdate'] = 'Последнее обновление:'; -$lang['source'] = 'Источник:'; -$lang['unknown'] = 'неизвестно'; -$lang['updating'] = 'Обновление...'; -$lang['updated'] = 'Плагин %s успешно обновлён'; -$lang['updates'] = 'Следующие плагины были успешно обновлены'; -$lang['update_none'] = 'Обновления не найдены.'; -$lang['deleting'] = 'Удаление...'; -$lang['deleted'] = 'Плагин %s удалён.'; -$lang['downloading'] = 'Скачивание...'; -$lang['downloaded'] = 'Плагин %s успешно установлен'; -$lang['downloads'] = 'Следующие плагины были успешно установлены:'; -$lang['download_none'] = 'Плагины не найдены или возникла неизвестная проблема в процессе скачивания и установки.'; -$lang['plugin'] = 'Плагин:'; -$lang['components'] = 'Компоненты'; -$lang['noinfo'] = 'Этот плагин не сообщил никаких данных, он может быть нерабочим.'; -$lang['name'] = 'Название:'; -$lang['date'] = 'Дата:'; -$lang['type'] = 'Тип:'; -$lang['desc'] = 'Описание:'; -$lang['author'] = 'Автор:'; -$lang['www'] = 'Страница:'; -$lang['error'] = 'Произошла неизвестная ошибка.'; -$lang['error_download'] = 'Не могу скачать файл плагина: %s'; -$lang['error_badurl'] = 'Возможно неправильный адрес — не могу определить имя файла из адреса'; -$lang['error_dircreate'] = 'Не могу создать временную директорию для скачивания'; -$lang['error_decompress'] = 'Менеджеру плагинов не удалось распаковать скачанный файл. Это может быть результатом ошибки при скачивании, в этом случае вы можете попробовать снова, или же плагин упакован неизвестным архиватором, тогда вам необходимо скачать и установить плагин вручную.'; -$lang['error_copy'] = 'Произошла ошибка копирования при попытке установки файлов для плагина <em>%s</em>: переполнение диска или неправильные права доступа. Это могло привести к частичной установке плагина и неустойчивости работы вашей вики.'; -$lang['error_delete'] = 'Произошла ошибка при попытке удалить плагин <em>%s</em>. Наиболее вероятно, что нет необходимых прав доступа к файлам или директориям'; -$lang['enabled'] = 'Плагин %s включен.'; -$lang['notenabled'] = 'Не удалось включить плагин %s. Проверьте системные права доступа к файлам.'; -$lang['disabled'] = 'Плагин %s отключен.'; -$lang['notdisabled'] = 'Не удалось отключить плагин %s. Проверьте системные права доступа к файлам.'; -$lang['packageinstalled'] = 'Пакет (%d плагин(а): %s) успешно установлен.'; diff --git a/lib/plugins/plugin/lang/sk/admin_plugin.txt b/lib/plugins/plugin/lang/sk/admin_plugin.txt deleted file mode 100644 index ad3ae7f58..000000000 --- a/lib/plugins/plugin/lang/sk/admin_plugin.txt +++ /dev/null @@ -1,4 +0,0 @@ -====== Správa pluginov ====== - -Na tejto stránke je možné spravovať [[doku>plugins|pluginy]] Dokuwiki. Aby bolo možné sťahovať a inštalovať pluginy, musí mať webový server prístup pre zápis do adresára //plugin//. - diff --git a/lib/plugins/plugin/lang/sk/lang.php b/lib/plugins/plugin/lang/sk/lang.php deleted file mode 100644 index 35c07cf80..000000000 --- a/lib/plugins/plugin/lang/sk/lang.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -/** - * @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 - * @author Martin Michalek <michalek.dev@gmail.com> - */ -$lang['menu'] = 'Správa pluginov'; -$lang['download'] = 'Stiahnuť a nainštalovať plugin'; -$lang['manage'] = 'Nainštalované pluginy'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'aktualizovať'; -$lang['btn_delete'] = 'zmazať'; -$lang['btn_settings'] = 'nastavenia'; -$lang['btn_download'] = 'Stiahnuť'; -$lang['btn_enable'] = 'Uložiť'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Nainštalovaný:'; -$lang['lastupdate'] = 'Aktualizovaný:'; -$lang['source'] = 'Zdroj:'; -$lang['unknown'] = 'neznámy'; -$lang['updating'] = 'Aktualizuje sa ...'; -$lang['updated'] = 'Plugin %s bol úspešne aktualizovaný'; -$lang['updates'] = 'Nasledujúce pluginy bol úspešne aktualizované:'; -$lang['update_none'] = 'Neboli nájdené žiadne aktualizácie.'; -$lang['deleting'] = 'Vymazáva sa ...'; -$lang['deleted'] = 'Plugin %s bol zmazaný.'; -$lang['downloading'] = 'Sťahuje sa ...'; -$lang['downloaded'] = 'Plugin %s bol úspešne stiahnutý'; -$lang['downloads'] = 'Nasledujúce pluginy bol úspešne stiahnuté:'; -$lang['download_none'] = 'Neboli nájdené žiadne pluginy alebo nastal neznámy problém počas sťahovania a inštalácie pluginov.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Súčasti'; -$lang['noinfo'] = 'Tento plugin neobsahuje žiadne informácie, je možné, že je chybný.'; -$lang['name'] = 'názov:'; -$lang['date'] = 'Dátum:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Popis:'; -$lang['author'] = 'Autor:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Nastala neznáma chyba.'; -$lang['error_download'] = 'Nie je možné stiahnuť súbor pluginu: %s'; -$lang['error_badurl'] = 'Pravdepodobne zlá url adresa - nie je možné z nej určiť meno súboru'; -$lang['error_dircreate'] = 'Nie je možné vytvoriť dočasný adresár pre uloženie sťahovaného súboru'; -$lang['error_decompress'] = 'Správca pluginov nedokáže dekomprimovať stiahnutý súbor. Môže to byť dôsledok zlého stiahnutia, v tom prípade to skúste znovu, alebo môže ísť o neznámy formát súboru, v tom prípade musíte stiahnuť a nainštalovať plugin manuálne.'; -$lang['error_copy'] = 'Nastala chyba kopírovania súboru počas pokusu inštalovať súbory pluginu<em>%s</em>: disk môže byť plný alebo prístupové práva k súboru môžu byť nesprávne. Toto môže mať za následok čiastočne nainštalovanie pluginu a nestabilitu vašej DokuWiki.'; -$lang['error_delete'] = 'Nastala chyba počas pokusu o zmazanie pluginu <em>%s</em>. Najpravdepodobnejším dôvodom môžu byť nedostatočné prístupové práva pre súbor alebo adresár'; -$lang['enabled'] = 'Plugin %s aktivovaný.'; -$lang['notenabled'] = 'Plugin %s nemôže byť aktivovaný, skontrolujte prístupové práva.'; -$lang['disabled'] = 'Plugin %s deaktivovaný.'; -$lang['notdisabled'] = 'Plugin %s nemôže byť deaktivovaný, skontrolujte prístupové práva.'; -$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) úspešne inštalovaný.'; diff --git a/lib/plugins/plugin/lang/sl/admin_plugin.txt b/lib/plugins/plugin/lang/sl/admin_plugin.txt deleted file mode 100644 index 5fd02e1ba..000000000 --- a/lib/plugins/plugin/lang/sl/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Upravljanje vstavkov ====== - -Na tej strani je mogoče spreminjati in prilagajati nastavitve DokuWiki [[doku>plugins|vstavkov]]. Za prejemanje in nameščanje vstavkov v ustrezne mape, morajo imeti te določena ustrezna dovoljenja za pisanje spletnega strežnika. diff --git a/lib/plugins/plugin/lang/sl/lang.php b/lib/plugins/plugin/lang/sl/lang.php deleted file mode 100644 index e205c57f5..000000000 --- a/lib/plugins/plugin/lang/sl/lang.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Dejan Levec <webphp@gmail.com> - * @author Boštjan Seničar <senicar@gmail.com> - * @author Gregor Skumavc (grega.skumavc@gmail.com) - * @author Matej Urbančič (mateju@svn.gnome.org) - */ -$lang['menu'] = 'Upravljanje vstavkov'; -$lang['download'] = 'Prejmi in namesti nov vstavek'; -$lang['manage'] = 'Nameščeni vstavki'; -$lang['btn_info'] = 'Podrobnosti'; -$lang['btn_update'] = 'Posodobi'; -$lang['btn_delete'] = 'Izbriši'; -$lang['btn_settings'] = 'Nastavitve'; -$lang['btn_download'] = 'Prejmi'; -$lang['btn_enable'] = 'Shrani'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Nameščeno:'; -$lang['lastupdate'] = 'Nazadnje posodobljeno:'; -$lang['source'] = 'Vir:'; -$lang['unknown'] = 'neznano'; -$lang['updating'] = 'Posodabljanje ...'; -$lang['updated'] = 'Vstavek %s je uspešno posodobljen'; -$lang['updates'] = 'Navedeni vstavki so uspešno posodobljeni'; -$lang['update_none'] = 'Posodobitev ni mogoče najti.'; -$lang['deleting'] = 'Brisanje ...'; -$lang['deleted'] = 'Vstavek %s je izbrisan.'; -$lang['downloading'] = 'Prejemanje ...'; -$lang['downloaded'] = 'Vstavek %s je uspešno nameščen'; -$lang['downloads'] = 'Navedeni vstavki so uspešno nameščeni:'; -$lang['download_none'] = 'Vstavkov ni mogoče najti ali pa je prišlo do napake med prejemanjem in nameščanjem.'; -$lang['plugin'] = 'Vstavek:'; -$lang['components'] = 'Sestavni deli'; -$lang['noinfo'] = 'Vstavek nima vpisanih podrobnih podatkov, kar pomeni, da je morda neveljaven.'; -$lang['name'] = 'Ime:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Vrsta:'; -$lang['desc'] = 'Opis:'; -$lang['author'] = 'Avtor:'; -$lang['www'] = 'Spletna stran:'; -$lang['error'] = 'Prišlo je do neznane napake.'; -$lang['error_download'] = 'Ni mogoče prejeti datoteke vstavka: %s'; -$lang['error_badurl'] = 'Napaka naslova URL - ni mogoče določiti imena datoteke iz naslova URL'; -$lang['error_dircreate'] = 'Ni mogoče ustvariti začasne mape za prejemanje'; -$lang['error_decompress'] = 'Z upravljalnikom vstavkov ni mogoče razširiti prejetega arhiva vstavka. Najverjetneje je prišlo do napake med prejemanjem datoteke ali pa zapis arhiva ni znan. Poskusite znova ali pa napako odpravite z ročnim nameščanjem vstavka.'; -$lang['error_copy'] = 'Prišlo je do napake med nameščanjem datotek vstavka <em>%s</em>: najverjetneje so težave s prostorom za namestitev ali pa ni ustreznih dovoljenj za nameščanje. Zaradi nepopolne namestitve lahko nastopijo težave v delovanju sistema Wiki.'; -$lang['error_delete'] = 'Prišlo je do napake med brisanjem vstavka <em>%s</em>: najverjetneje ni ustreznih dovoljenj za dostop do datoteke ali mape'; -$lang['enabled'] = 'Vstavek %s je omogočen.'; -$lang['notenabled'] = 'Vstavka %s ni mogoče omogočiti zaradi neustreznih dovoljen.'; -$lang['disabled'] = 'Vstavek %s je onemogočen.'; -$lang['notdisabled'] = 'Vstavka %s ni mogoče onemogočiti zaradi neustreznih dovoljen.'; -$lang['packageinstalled'] = 'Paket vstavka (%d vstavkov: %s) je uspešno nameščen.'; diff --git a/lib/plugins/plugin/lang/sq/admin_plugin.txt b/lib/plugins/plugin/lang/sq/admin_plugin.txt deleted file mode 100644 index 2e1f19234..000000000 --- a/lib/plugins/plugin/lang/sq/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Menaxhimi i Plugin-eve ====== - -Në këtë faqe mund të menaxhoni çdo gjë që ka të bëjë me [[doku>plugins|plugin-et]] Dokuwiki. Që të jetë në gjendje për të shkarkuar dhe instaluar një plugin, dosja e plugin-it duhet të jetë e shkrueshme nga webserver-i.
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/sq/lang.php b/lib/plugins/plugin/lang/sq/lang.php deleted file mode 100644 index 9ddcf527f..000000000 --- a/lib/plugins/plugin/lang/sq/lang.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php -/** - * Albanian language file - * - * @author Leonard Elezi leonard.elezi@depinfo.info - */ -$lang['menu'] = 'Menaxho Plugin-et'; -$lang['download'] = 'Shkarko dhe instalo një plugin të ri'; -$lang['manage'] = 'Plugin-et e Instaluar'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'përditëso'; -$lang['btn_delete'] = 'fshi'; -$lang['btn_settings'] = 'settings'; -$lang['btn_download'] = 'Shkarko'; -$lang['btn_enable'] = 'Ruaj'; -$lang['url'] = 'URL'; -$lang['installed'] = 'Të instaluar:'; -$lang['lastupdate'] = 'Përditësuar së fundmi:'; -$lang['source'] = 'Kodi Burim:'; -$lang['unknown'] = 'e panjohur'; -$lang['updating'] = 'Duke u përditësuar...'; -$lang['updated'] = 'Plugini %s u përditësua me sukses'; -$lang['updates'] = 'Plugin-et e mëposhtme u përditësuan me sukses'; -$lang['update_none'] = 'Nuk u gjetën përditësime.'; -$lang['deleting'] = 'Duke fshirë...'; -$lang['deleted'] = 'Plugini %s u fshi.'; -$lang['downloading'] = 'Duke shkarkuar...'; -$lang['downloaded'] = 'Plugini %s u instalua me sukses'; -$lang['downloads'] = 'Plugin-et e mëposhtëm u instaluan me sukses:'; -$lang['download_none'] = 'Asnjë plugin nuk u gjend, ose ka ndodhur një gabim i panjohur gjatë shkarkimit dhe instalimit.'; -$lang['plugin'] = 'Plugin:'; -$lang['components'] = 'Përbërësit:'; -$lang['noinfo'] = 'Ky plugin nuk ktheu asnjë informacion, mund të jetë i pavlefshëm.'; -$lang['name'] = 'Emri:'; -$lang['date'] = 'Data:'; -$lang['type'] = 'Tipi:'; -$lang['desc'] = 'Përshkrimi:'; -$lang['author'] = 'Autori:'; -$lang['www'] = 'Web:'; -$lang['error'] = 'Ndodhi një gabim i panjohur.'; -$lang['error_download'] = 'Nuk mundi të shkarkohej skedari i plugin-it: %s'; -$lang['error_badurl'] = 'Dyshohet url e prishur - nuk mund të gjendet emri i skedarit nga url-ja'; -$lang['error_dircreate'] = 'Nuk mundi të krijohej dosja e përkohshme për të marë shkarkimin.'; -$lang['error_decompress'] = 'Menaxhuesi i plugin-eve nuk ishte në gjendje të dekompresonte skedarin e shkarkuar. Kjo mund të jetë si rezultat i një shkarkimi të keq, në këtë rast duhet të provoni përsëri; ose formati i kompresimit mund të jetë i panjohur, në këtë rast do t\'ju duhet ta shkarkoni dhe instaloni plugin-in manualisht.'; -$lang['error_copy'] = 'Ndodhi gabim kopjim-skedari gjatë përpjekjes për të instaluar skedarët për plugin-in <em>%s</em>: disku mund të jetë plotë ose të drejtat për aksesim skedari mund të jenë të gabuara. Kjo mund të ketë shkaktuar një instalim të pjesshëm të plugin-it dhe ta lërë instalimin e wiki-t tënd të paqëndrueshëm.'; -$lang['error_delete'] = 'Ndodhi një gabim gjatë përpjekjes për të fshirë plugin-in <em>%s</em>. Shkaku më i mundshëm është të drejta të pamjaftueshme për aksesim skedari ose dosjeje.'; -$lang['enabled'] = 'Plugini %s u aktivizua.'; -$lang['notenabled'] = 'Plugini %s nuk mundi të aktivizohej, kontrollo të drejtat e aksesit për skedarin.'; -$lang['disabled'] = 'Plugin %s është i paaktivizuar.'; -$lang['notdisabled'] = 'Plugini %s nuk mundi të çaktivizohej, kontrollo të drejtat e aksesit për skedarin.'; diff --git a/lib/plugins/plugin/lang/sr/admin_plugin.txt b/lib/plugins/plugin/lang/sr/admin_plugin.txt deleted file mode 100644 index 6262ece40..000000000 --- a/lib/plugins/plugin/lang/sr/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Управљач додацима ====== - -На овој страни можете управљати са свим у вези DokuWiki [[doku>plugins|додацима]]. Да бисте имали могућност преузимања и инсталирања додатака, фасцикла за додатке мора имати дозволу за писање.
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/sr/lang.php b/lib/plugins/plugin/lang/sr/lang.php deleted file mode 100644 index bc22770a1..000000000 --- a/lib/plugins/plugin/lang/sr/lang.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * Serbian language file - * - * @author Иван Петровић petrovicivan@ubuntusrbija.org - * @author Ivan Petrovic <petrovicivan@ubuntusrbija.org> - * @author Miroslav Šolti <solti.miroslav@gmail.com> - */ -$lang['menu'] = 'Управљач додацима'; -$lang['download'] = 'Преузми и инсталирај нови додатак'; -$lang['manage'] = 'Инсталирани додаци'; -$lang['btn_info'] = 'инфо'; -$lang['btn_update'] = 'ажурирај'; -$lang['btn_delete'] = 'обриши'; -$lang['btn_settings'] = 'поставке'; -$lang['btn_download'] = 'Преузми'; -$lang['btn_enable'] = 'Сачувај'; -$lang['url'] = 'УРЛ'; -$lang['installed'] = 'Инсталирани:'; -$lang['lastupdate'] = 'Последњи пут ажурирани:'; -$lang['source'] = 'Извор:'; -$lang['unknown'] = 'непознат'; -$lang['updating'] = 'Ажурирање:'; -$lang['updated'] = 'Додатак %s је успешно ажуриран'; -$lang['updates'] = 'Следећи додаци су успешно ажурирани'; -$lang['update_none'] = 'Нема доступних ажурирања.'; -$lang['deleting'] = 'Брисање...'; -$lang['deleted'] = 'Додатак %s је обрисан.'; -$lang['downloading'] = 'Преузимање...'; -$lang['downloaded'] = 'Додатак %s је успешно инсталиран'; -$lang['downloads'] = 'Следећи додаци су успешно инсталирани:'; -$lang['download_none'] = 'Нема додатака, или се јавио непознат проблем током преузимања или инсталирања.'; -$lang['plugin'] = 'Додатак:'; -$lang['components'] = 'Компоненте'; -$lang['noinfo'] = 'Овај додатак не враћа никакве информације, можда је неисправан.'; -$lang['name'] = 'Име:'; -$lang['date'] = 'Датум:'; -$lang['type'] = 'Врста:'; -$lang['desc'] = 'Опис:'; -$lang['author'] = 'Аутор:'; -$lang['www'] = 'Веб:'; -$lang['error'] = 'Десила се непозната грешка.'; -$lang['error_download'] = 'Немогуће је преузети додатак: %s'; -$lang['error_badurl'] = 'Сумњам на лош УРЛ - немогу да одредим назив датотеке '; -$lang['error_dircreate'] = 'Немогућност прављења привремене фасцикле за преузимање'; -$lang['error_decompress'] = 'Управљач додацима није у могућности да распакује преузету датотеку. Разлог може да буде лошег преузимања, у том случају пробајте још једном; или је непознат облик компресије, у том случају ручно преузмите и инсталирајте додатак.'; -$lang['error_copy'] = 'Појавила се грешка у копирању у току иснталације додатка <em>%s</em>: складиште је можда пуно или дозволе за уписивање нису постављене како треба. Резултат може бити делимично инсталиран додатак и вики у нестабилном стању.'; -$lang['error_delete'] = 'Појавила се грешка у покушају брисања додатка <em>%s</em>. Нејчешћи узрок је недостатак потребних дозвола за операције са датотекама или фасциклама'; -$lang['enabled'] = 'Додатај %s је укључен.'; -$lang['notenabled'] = 'Додатак %s није могуће укључити, проверите дозволе приступа.'; -$lang['disabled'] = 'Додатај %s је исукључен.'; -$lang['notdisabled'] = 'Додатак %s није могуће исукључити, проверите дозволе приступа.'; diff --git a/lib/plugins/plugin/lang/sv/admin_plugin.txt b/lib/plugins/plugin/lang/sv/admin_plugin.txt deleted file mode 100644 index e490e5e60..000000000 --- a/lib/plugins/plugin/lang/sv/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== Hantera insticksmoduler ====== - -På den här sidan kan man hantera allting som har att göra med Dokuwikis [[doku>plugins|insticksmoduler]]. För att man ska kunna ladda ned och installera en modul måste katalogen för insticksmoduler vara skrivbar av webbservern. - - diff --git a/lib/plugins/plugin/lang/sv/lang.php b/lib/plugins/plugin/lang/sv/lang.php deleted file mode 100644 index b7c23743b..000000000 --- a/lib/plugins/plugin/lang/sv/lang.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Per Foreby <per@foreby.se> - * @author Nicklas Henriksson <nicklas[at]nihe.se> - * @author Håkan Sandell <hakan.sandell@home.se> - * @author Dennis Karlsson - * @author Tormod Otter Johansson <tormod@latast.se> - * @author emil@sys.nu - * @author Pontus Bergendahl <pontus.bergendahl@gmail.com> - * @author Tormod Johansson tormod.otter.johansson@gmail.com - * @author Emil Lind <emil@sys.nu> - * @author Bogge Bogge <bogge@bogge.com> - * @author Peter Åström <eaustreum@gmail.com> - * @author mikael@mallander.net - * @author Smorkster Andersson smorkster@gmail.com - */ -$lang['menu'] = 'Hantera insticksmoduler'; -$lang['download'] = 'Ladda ned och installera en ny insticksmodul'; -$lang['manage'] = 'Installerade insticksmoduler'; -$lang['btn_info'] = 'info'; -$lang['btn_update'] = 'uppdatera'; -$lang['btn_delete'] = 'radera'; -$lang['btn_settings'] = 'inställningar'; -$lang['btn_download'] = 'Ladda ned'; -$lang['btn_enable'] = 'Spara'; -$lang['url'] = 'Webbadress'; -$lang['installed'] = 'Installerad:'; -$lang['lastupdate'] = 'Senast uppdaterad:'; -$lang['source'] = 'Källa:'; -$lang['unknown'] = 'okänd'; -$lang['updating'] = 'Uppdaterar ...'; -$lang['updated'] = 'Insticksmodulen %s uppdaterades'; -$lang['updates'] = 'Följande Insticksmoduler har uppdaterats'; -$lang['update_none'] = 'Inga uppdateringar hittades.'; -$lang['deleting'] = 'Raderar ...'; -$lang['deleted'] = 'Insticksmodulen %s raderad.'; -$lang['downloading'] = 'Laddar ned ...'; -$lang['downloaded'] = 'Insticksmodulen %s installerades'; -$lang['downloads'] = 'Följande insticksmoduler har installerats:'; -$lang['download_none'] = 'Inga insticksmoduler hittades, eller så har det uppstått ett okänt fel under nedladdning och installation.'; -$lang['plugin'] = 'Insticksmodul:'; -$lang['components'] = 'Komponenter'; -$lang['noinfo'] = 'Den här insticksmodulen returnerade ingen information, den kan vara ogiltig.'; -$lang['name'] = 'Namn:'; -$lang['date'] = 'Datum:'; -$lang['type'] = 'Typ:'; -$lang['desc'] = 'Beskrivning:'; -$lang['author'] = 'Författare:'; -$lang['www'] = 'Webb:'; -$lang['error'] = 'Ett okänt fel har inträffat.'; -$lang['error_download'] = 'Kan inte ladda ned fil till insticksmodul: %s'; -$lang['error_badurl'] = 'Misstänkt felaktig webbadress - kan inte bestämma filnamnet från webbadressen'; -$lang['error_dircreate'] = 'Kan inte skapa tillfällig katalog för nedladdade filer'; -$lang['error_decompress'] = 'Hanteraren för insticksmoduler kunde inte dekomprimera den nedladdade filen. Detta kan vara resultatet av en misslyckad nedladdning, och i så fall bör du försöka igen; eller så kan det komprimerade formatet vara okänt, och då måste du ladda ned och installera insticksmodulen manuellt.'; -$lang['error_copy'] = 'Ett filkopieringsfel uppstod under försöket att installera filerna till insticksmodulen <em>%s</em>: disken kan vara full eller så kan filskyddet vara felaktigt. Detta kan ha lett till en delvis installerad insticksmodul, och gjort din wiki-installation instabil.'; -$lang['error_delete'] = 'Ett fel uppstod vid försöket att radera insticksmodulen <em>%s</em>. Den troligaste orsaken är otillräcklig behörighet till filer eller kataloger'; -$lang['enabled'] = 'Tilläggsmodulen %s är aktiverad.'; -$lang['notenabled'] = 'Tilläggsmodulen %s kunde inte aktiveras, kontrollera filrättigheterna.'; -$lang['disabled'] = 'Tiläggsmodulen %s är avaktiverad.'; -$lang['notdisabled'] = 'Tilläggsmodulen %s kunde inte avaktiveras, kontrollera filrättigheterna.'; -$lang['packageinstalled'] = 'Tilläggs paket (%d tillägg: %s) har installerats.'; diff --git a/lib/plugins/plugin/lang/th/admin_plugin.txt b/lib/plugins/plugin/lang/th/admin_plugin.txt deleted file mode 100644 index 8611654be..000000000 --- a/lib/plugins/plugin/lang/th/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== ตัวจัดการโปรแกรมเสริม ====== - -ในหน้านี้คุณสามารถจัดการทุกๆอย่างที่จะต้องทำงานกับ [[doku>plugins|plugins]]โดกุวิกิ เพื่อที่จะสามารถดาวน์โหลดและติดตั้งโปรแกรมเสริม ตัวโฟลเดอร์โปรแกรมเสริม(plugin) จะต้องสามารถเขียนได้โดยเว็บเซิร์ฟเวอร์
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/th/lang.php b/lib/plugins/plugin/lang/th/lang.php deleted file mode 100644 index dab094bcd..000000000 --- a/lib/plugins/plugin/lang/th/lang.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php -/** - * Thai language file - * - * @author Komgrit Niyomrath <n.komgrit@gmail.com> - * @author Kittithat Arnontavilas mrtomyum@gmail.com - * @author Arthit Suriyawongkul <arthit@gmail.com> - * @author Kittithat Arnontavilas <mrtomyum@gmail.com> - * @author Thanasak Sompaisansin <jombthep@gmail.com> - */ -$lang['menu'] = 'จัดการปลั๊กอิน'; -$lang['download'] = 'ดาวน์โหลดและติดตั้งปลั๊กอินใหม่'; -$lang['manage'] = 'ปลั๊กอินที่ติดตั้งไว้แล้ว'; -$lang['btn_info'] = 'ข้อมูล'; -$lang['btn_update'] = 'ปรับปรุง'; -$lang['btn_delete'] = 'ลบ'; -$lang['btn_settings'] = 'ตั้งค่า'; -$lang['btn_download'] = 'ดาวน์โหลด'; -$lang['btn_enable'] = 'บันทึก'; -$lang['url'] = 'ที่อยู่เว็บ'; -$lang['installed'] = 'ติดตั้งแล้ว:'; -$lang['lastupdate'] = 'ปรับปรุงล่าสุด:'; -$lang['source'] = 'ต้นกำเนิด'; -$lang['unknown'] = 'ไม่มีข้อมูล'; -$lang['updating'] = 'กำลังปรับปรุง ...'; -$lang['updated'] = 'โปรแกรมเสริม %s ได้รับการปรับปรุงสำเร็จแล้ว'; -$lang['updates'] = 'โปรแกรมเสริมต่อไปนี้ได้รับการปรับปรุงสำเร็จแล้ว'; -$lang['update_none'] = 'ไม่พบการปรับปรุงใดๆ'; -$lang['deleting'] = 'กำลังลบ ...'; -$lang['deleted'] = 'โปรแกรมเสริม %s ถูกลบแล้ว'; -$lang['downloading'] = 'กำลังดาวโหลด ...'; -$lang['downloaded'] = 'โปรแกรมเสริม %s ถูกติดตั้งสำเร็จแล้ว'; -$lang['downloads'] = 'โปรแกรมเสริมต่อไปนี้ได้รับการปรับปรุงสำเร็จแล้ว:'; -$lang['download_none'] = 'ไม่พบโปรแกรมเสริม, หรือมีปัญหาบางประการเกิดขึ้นระหว่างการดาวน์โหลด และติดตั้ง'; -$lang['plugin'] = 'โปรแกรมเสริม:'; -$lang['components'] = '่สวนประกอบ'; -$lang['noinfo'] = 'โปรแกรมเสริมนี้ไม่บอกข้อมูล, มันอาจไม่ใช่โปรแกรมเสริมจริง'; -$lang['name'] = 'ชื่อ:'; -$lang['date'] = 'วันที่:'; -$lang['type'] = 'ชนิด:'; -$lang['desc'] = 'รายละเอียด:'; -$lang['author'] = 'ผู้แต่ง:'; -$lang['www'] = 'เว็บ:'; -$lang['error'] = 'เกิดความผิดพลาดที่ระบุไม่ได้'; -$lang['error_download'] = 'ไม่สามารถดาวน์โหลดไฟล์โปรแกรมเสริม: %s'; -$lang['error_dircreate'] = 'ไม่สามารถสร้างโฟลเดอร์ชั่วคราวเพื่อที่จะรองรับการดาวน์โหลด'; -$lang['enabled'] = 'เปิดใช้งานโปรแกรมเสริม %s แล้ว'; -$lang['notenabled'] = 'โปรแกรมเสริม %s ไม่สามารถเปิดใช้งาน, กรุณาตรวจสอบสิทธิ์ของไฟล์'; -$lang['disabled'] = 'ปิดการใช้งานโปรแกรมเสริม %s แล้ว'; -$lang['notdisabled'] = 'โปรแกรมเสริม %s ไม่สามารถปิดการใช้งานได้, กรุณาตรวจสอบสิทธิ์ของไฟล์'; diff --git a/lib/plugins/plugin/lang/tr/admin_plugin.txt b/lib/plugins/plugin/lang/tr/admin_plugin.txt deleted file mode 100644 index 956d701f6..000000000 --- a/lib/plugins/plugin/lang/tr/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== Eklenti Yönetimi ====== - -Bu sayfada DokuWiki [[doku>plugins|eklentileri]] ile ilgili herşeyi düzenleyebilirsiniz. Eklenti kurup indirmek için, eklenti dizininin yazılabilir olması gerekmektedir. diff --git a/lib/plugins/plugin/lang/tr/lang.php b/lib/plugins/plugin/lang/tr/lang.php deleted file mode 100644 index 9598ade7d..000000000 --- a/lib/plugins/plugin/lang/tr/lang.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * Turkish language file - * - * @author Aydın Coşkuner <aydinweb@gmail.com> - * @author Cihan Kahveci <kahvecicihan@gmail.com> - * @author Yavuz Selim <yavuzselim@gmail.com> - * @author Caleb Maclennan <caleb@alerque.com> - * @author farukerdemoncel@gmail.com - */ -$lang['menu'] = 'Eklenti Yönetimi'; -$lang['download'] = 'Yeni bir eklenti indirip kur'; -$lang['manage'] = 'Kurulmuş Eklentiler'; -$lang['btn_info'] = 'bilgi'; -$lang['btn_update'] = 'güncelle'; -$lang['btn_delete'] = 'sil'; -$lang['btn_settings'] = 'Ayarlar'; -$lang['btn_download'] = 'İndir'; -$lang['btn_enable'] = 'Kaydet'; -$lang['url'] = 'Web Adresi'; -$lang['installed'] = 'Kuruldu:'; -$lang['lastupdate'] = 'Son güncelleştirme:'; -$lang['source'] = 'Kaynak:'; -$lang['unknown'] = 'bilinmiyor'; -$lang['updating'] = 'Güncelleştiriyor ...'; -$lang['updated'] = '%s eklentisi başarıyla güncellendi'; -$lang['updates'] = 'Şu eklentiler başarıyla güncellendi'; -$lang['update_none'] = 'Yeni bir güncelleme bulunamadı.'; -$lang['deleting'] = 'Siliniyor ...'; -$lang['deleted'] = '%s eklentisi silindi.'; -$lang['downloading'] = 'İndiriyor ...'; -$lang['downloaded'] = '%s eklentisi başarıyla kuruldu'; -$lang['downloads'] = 'Şu eklentiler başarıyla kuruldu:'; -$lang['download_none'] = 'Eklenti bulunamadı veya indirirken/kurarken bilinmeyen bir hata oluştu.'; -$lang['plugin'] = 'Eklenti:'; -$lang['components'] = 'Parçalar'; -$lang['noinfo'] = 'Bu eklentinin bilgileri alınamadı, geçerli bir eklenti olmayabilir.'; -$lang['name'] = 'Ad:'; -$lang['date'] = 'Tarih:'; -$lang['type'] = 'Tür:'; -$lang['desc'] = 'Açıklama:'; -$lang['author'] = 'Yazar:'; -$lang['www'] = 'Web Adresi:'; -$lang['error'] = 'Bilinmeyen bir hata oluştu.'; -$lang['error_download'] = 'Şu eklenti indirilemedi: %s'; -$lang['error_badurl'] = 'Yanlış adres olabilir - verilen adresten dosya adı alınamadı'; -$lang['error_dircreate'] = 'İndirmek için geçici klasör oluşturulamadı'; -$lang['error_decompress'] = 'Eklenti yöneticisi indirilen sıkıştırılmış dosyayı açamadı. Bu yanlış indirmeden kaynaklanabilir (bu durumda tekrar denemelisiniz). Ya da indirilen dosyanın sıkıştırma biçimi bilinmemektedir (bu durumda eklentiyi indirerek kendiniz kurmalısınız).'; -$lang['error_copy'] = '<em>%s</em> eklentisi dosyalarını kurmaya çalışırken kopyalama hatası ortaya çıktı. Sürücü dolu olabilir veya yazma yetkisi bulunmuyor olabilir. Bunun sebebi tam kurulmamış bir eklentinin wiki kurulumunu bozması olabilir.'; -$lang['error_delete'] = '<em>%s</em> eklentisini silerken bir hata oluştu. Bu hata yetersiz dosya/klasör erişim yetkisinden kaynaklanabilir.'; -$lang['enabled'] = '%s eklentisi etkinleştirildi.'; -$lang['notenabled'] = '%s eklentisi etkinleştirilemedi, dosya yetkilerini kontrol edin.'; -$lang['disabled'] = '%s eklentisi devre dışı bırakıldı.'; -$lang['notdisabled'] = '%s eklentisi devre dışı bırakılamadı, dosya yetkilerini kontrol edin.'; diff --git a/lib/plugins/plugin/lang/uk/admin_plugin.txt b/lib/plugins/plugin/lang/uk/admin_plugin.txt deleted file mode 100644 index 7bdf8e5e5..000000000 --- a/lib/plugins/plugin/lang/uk/admin_plugin.txt +++ /dev/null @@ -1,7 +0,0 @@ -====== Керування доданками ====== - -Тут ви можете керувати [[doku>plugins|доданками]] ДокуВікі. Для того, щоб завантажувати та встановлювати доданки, папка доданків повинна бути доступна для запису веб-сервером. - - - - diff --git a/lib/plugins/plugin/lang/uk/lang.php b/lib/plugins/plugin/lang/uk/lang.php deleted file mode 100644 index c6d5990fc..000000000 --- a/lib/plugins/plugin/lang/uk/lang.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Oleksiy Voronin (ovoronin@gmail.com) - * @author serg_stetsuk@ukr.net - * @author okunia@gmail.com - * @author Oleksandr Kunytsia <okunia@gmail.com> - * @author Uko uko@uar.net - * @author Ulrikhe Lukoie <lukoie@gmail>.com - * @author Kate Arzamastseva pshns@ukr.net - */ -$lang['menu'] = 'Керування доданками'; -$lang['download'] = 'Завантажити та встановити новий доданок'; -$lang['manage'] = 'Встановлені доданки'; -$lang['btn_info'] = 'дані'; -$lang['btn_update'] = 'оновити'; -$lang['btn_delete'] = 'видалити'; -$lang['btn_settings'] = 'параметри'; -$lang['btn_download'] = 'Завантажити'; -$lang['btn_enable'] = 'Зберегти'; -$lang['url'] = 'Адреса'; -$lang['installed'] = 'Встановлено:'; -$lang['lastupdate'] = 'Останнє оновлення:'; -$lang['source'] = 'Джерело:'; -$lang['unknown'] = 'невідомо'; -$lang['updating'] = 'Оновлення ...'; -$lang['updated'] = 'Доданок %s успішно оновлено'; -$lang['updates'] = 'Наступні доданки були успішно оновлені'; -$lang['update_none'] = 'Оновлення не знайдено.'; -$lang['deleting'] = 'Видалення ...'; -$lang['deleted'] = 'Доданок %s видалено.'; -$lang['downloading'] = 'Завантаження ...'; -$lang['downloaded'] = 'Доданок %s успішно встановлено'; -$lang['downloads'] = 'Наступні доданки були успішно встановлені:'; -$lang['download_none'] = 'Доданки не знайдено або виникла невідома проблема в процессі завантаження та установки.'; -$lang['plugin'] = 'Доданок:'; -$lang['components'] = 'Компоненти'; -$lang['noinfo'] = 'Цей доданок не повідомив ніяких даних, він може бути не працюючим.'; -$lang['name'] = 'Назва:'; -$lang['date'] = 'Дата:'; -$lang['type'] = 'Тип:'; -$lang['desc'] = 'Опис:'; -$lang['author'] = 'Автор:'; -$lang['www'] = 'Сторінка:'; -$lang['error'] = 'Виникла невідома помилка.'; -$lang['error_download'] = 'Не можу завантажити файл доданка: %s'; -$lang['error_badurl'] = 'Можливо, невірна адреса - не можливо визначити ім\'я файлу з адреси'; -$lang['error_dircreate'] = 'Не можливо створити тимчасову папку для завантаження'; -$lang['error_decompress'] = 'Менеджеру доданків не вдалося розпакувати завантажений файл. Це може бути результатом помилки при завантаженні, в цьому разі ви можете спробувати знову; або ж доданок упакований невідомим архіватором, тоді вам необхідно завантажити та встановити доданок вручну.'; -$lang['error_copy'] = 'Виникла помилка копіювання при спробі установки файлів для доданка <em>%s</em>: переповнення диску або невірні права доступу. Це могло привести до часткової установки доданка и нестійкості вашої Вікі.'; -$lang['error_delete'] = 'При спробі вилучення доданка <em>%s</em> виникла помилка. Найбільш вірогідно, що немає необхідних прав доступу до файлів або директорії'; -$lang['enabled'] = 'Доданок %s увімкнено.'; -$lang['notenabled'] = 'Не вдається увімкнути доданок %s. Перевірте права доступу до файлу.'; -$lang['disabled'] = 'Доданок %s вимкнено.'; -$lang['notdisabled'] = 'Не вдається вимкнути доданок %s. Перевірте права доступу до файлу.'; -$lang['packageinstalled'] = 'Пакет плагінів (%d plugin(s): %s) успішно встановлений.'; diff --git a/lib/plugins/plugin/lang/vi/lang.php b/lib/plugins/plugin/lang/vi/lang.php deleted file mode 100644 index 2933d8875..000000000 --- a/lib/plugins/plugin/lang/vi/lang.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php -/** - * Vietnamese language file - * - */ diff --git a/lib/plugins/plugin/lang/zh-tw/admin_plugin.txt b/lib/plugins/plugin/lang/zh-tw/admin_plugin.txt deleted file mode 100644 index 54fe7a59e..000000000 --- a/lib/plugins/plugin/lang/zh-tw/admin_plugin.txt +++ /dev/null @@ -1,3 +0,0 @@ -====== 附加元件管理器 ====== - -您可以用本頁管理與 Dokuwiki [[doku>plugins|附加元件]] 相關的選項。若要正常下載及安裝附加元件,附加元件所在的資料夾必須允許網頁伺服器寫入。
\ No newline at end of file diff --git a/lib/plugins/plugin/lang/zh-tw/lang.php b/lib/plugins/plugin/lang/zh-tw/lang.php deleted file mode 100644 index bc84059fd..000000000 --- a/lib/plugins/plugin/lang/zh-tw/lang.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Li-Jiun Huang <ljhuang.tw@gmail.com> - * @author http://www.chinese-tools.com/tools/converter-simptrad.html - * @author Wayne San <waynesan@zerozone.tw> - * @author Li-Jiun Huang <ljhuang.tw@gmai.com> - * @author Cheng-Wei Chien <e.cwchien@gmail.com> - * @author Danny Lin - * @author Shuo-Ting Jian <shoting@gmail.com> - * @author syaoranhinata@gmail.com - * @author Ichirou Uchiki <syaoranhinata@gmail.com> - */ -$lang['menu'] = '管理附加元件'; -$lang['download'] = '下載與安裝附加元件'; -$lang['manage'] = '已安裝的附加元件'; -$lang['btn_info'] = '資訊'; -$lang['btn_update'] = '更新'; -$lang['btn_delete'] = '刪除'; -$lang['btn_settings'] = '設定'; -$lang['btn_download'] = '下載'; -$lang['btn_enable'] = '儲存'; -$lang['url'] = 'URL'; -$lang['installed'] = '安裝:'; -$lang['lastupdate'] = '上次更新:'; -$lang['source'] = '來源:'; -$lang['unknown'] = '未知'; -$lang['updating'] = '更新中……'; -$lang['updated'] = '已更新附加元件 %s '; -$lang['updates'] = '已更新下列附加元件'; -$lang['update_none'] = '找不到更新。'; -$lang['deleting'] = '刪除中……'; -$lang['deleted'] = '已刪除附加元件 %s 。'; -$lang['downloading'] = '下載中……'; -$lang['downloaded'] = '已安裝附加元件 %s '; -$lang['downloads'] = '已安裝下列附加元件:'; -$lang['download_none'] = '找不到附加元件,或者在下載與安裝時發生了未知的問題。'; -$lang['plugin'] = '附加元件:'; -$lang['components'] = '元件'; -$lang['noinfo'] = '此附加元件沒有回傳任何資訊,它可能已失效。'; -$lang['name'] = '名稱:'; -$lang['date'] = '日期:'; -$lang['type'] = '類型:'; -$lang['desc'] = '描述:'; -$lang['author'] = '作者:'; -$lang['www'] = '網頁:'; -$lang['error'] = '發生了未知的錯誤。'; -$lang['error_download'] = '無法下載附加元件檔案: %s'; -$lang['error_badurl'] = 'URL 可能有問題 —— 從 URL 中無法得知文件名'; -$lang['error_dircreate'] = '無法建立暫存目錄來接收下載的內容'; -$lang['error_decompress'] = '附加元件管理器無法把下載的文件解壓,這可能是由於下載出現錯誤。遇到這種情況,請您再次嘗試。此外,無法識別壓縮格式也可能導致無法解壓。若是如此,您需要手動下載並安裝該附加元件。'; -$lang['error_copy'] = '嘗試安裝附加元件 <em>%s</em> 的相關文件時,發生複製錯誤。這可能是磁碟空間不足,或檔案存取權限錯誤。未安裝好的附加元件,也許會令wiki系統不穩定。'; -$lang['error_delete'] = '嘗試刪除附加元件 <em>%s</em> 時發生錯誤。最有可能原因是檔案或目錄存取權限不足'; -$lang['enabled'] = '附加元件 %s 已啟用。'; -$lang['notenabled'] = '附加元件 %s 無法啟用,請檢查檔案權限。'; -$lang['disabled'] = '附加元件 %s 已停用。'; -$lang['notdisabled'] = '附加元件 %s 無法停用,請檢查檔案權限。'; -$lang['packageinstalled'] = '附加元件 (%d 附加元件: %s) 已安裝好。'; diff --git a/lib/plugins/plugin/lang/zh/admin_plugin.txt b/lib/plugins/plugin/lang/zh/admin_plugin.txt deleted file mode 100644 index 1618071a4..000000000 --- a/lib/plugins/plugin/lang/zh/admin_plugin.txt +++ /dev/null @@ -1,5 +0,0 @@ -====== 插件管理器 ====== - -本页中您可以管理与 Dokuwiki [[doku>plugins|插件]] 相关的选项。 要通过插件管理器正常下载并安装插件,插件所在的文件夹必须可写。 - - diff --git a/lib/plugins/plugin/lang/zh/lang.php b/lib/plugins/plugin/lang/zh/lang.php deleted file mode 100644 index f69410503..000000000 --- a/lib/plugins/plugin/lang/zh/lang.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author ZDYX <zhangduyixiong@gmail.com> - * @author http://www.chinese-tools.com/tools/converter-tradsimp.html - * @author George Sheraton guxd@163.com - * @author Simon zhan <simonzhan@21cn.com> - * @author mr.jinyi@gmail.com - * @author ben <ben@livetom.com> - * @author lainme <lainme993@gmail.com> - * @author caii <zhoucaiqi@gmail.com> - * @author Hiphen Lee <jacob.b.leung@gmail.com> - * @author caii, patent agent in China <zhoucaiqi@gmail.com> - * @author lainme993@gmail.com - * @author Shuo-Ting Jian <shoting@gmail.com> - */ -$lang['menu'] = '插件管理器'; -$lang['download'] = '下载并安装新的插件'; -$lang['manage'] = '已安装的插件'; -$lang['btn_info'] = '信息'; -$lang['btn_update'] = '升级'; -$lang['btn_delete'] = '删除'; -$lang['btn_settings'] = '设置'; -$lang['btn_download'] = '下载'; -$lang['btn_enable'] = '保存'; -$lang['url'] = 'URL'; -$lang['installed'] = '已安装:'; -$lang['lastupdate'] = '最后更新于:'; -$lang['source'] = '来源:'; -$lang['unknown'] = '未知'; -$lang['updating'] = '正在升级...'; -$lang['updated'] = '插件 %s 升级成功'; -$lang['updates'] = '下列插件升级成功:'; -$lang['update_none'] = '未找到更新。'; -$lang['deleting'] = '正在删除...'; -$lang['deleted'] = '插件 %s 已删除'; -$lang['downloading'] = '正在下载...'; -$lang['downloaded'] = '插件 %s 安装成功'; -$lang['downloads'] = '下列插件安装成功:'; -$lang['download_none'] = '未找到插件,或下载和安装过程中出现了未知错误。'; -$lang['plugin'] = '插件:'; -$lang['components'] = '组件'; -$lang['noinfo'] = '该插件没有任何信息,有可能是无效插件。'; -$lang['name'] = '名称:'; -$lang['date'] = '日期:'; -$lang['type'] = '类别:'; -$lang['desc'] = '描述:'; -$lang['author'] = '作者:'; -$lang['www'] = '网址:'; -$lang['error'] = '产生了未知错误。'; -$lang['error_download'] = '无法下载插件:%s'; -$lang['error_badurl'] = 'URL 可能有问题 - 从 URL 中无法得知文件名'; -$lang['error_dircreate'] = '无法创建用于接收下载文件的'; -$lang['error_decompress'] = '插件管理器无法解压下载的文件。这可能是由于下载出现错误,遇到这种情况,请您再次尝试;或者是压缩格式无法识别,遇到这种情况,您需要手动下载并安装该插件。'; -$lang['error_copy'] = '尝试安装插件 <em>%s</em> 的相关文件时产生一个复制错误:磁盘空间已满或文件访问权限错误。这可能是由于一个安装了一部分的插件,并使得您的维基系统不稳定。'; -$lang['error_delete'] = '尝试删除插件 <em>%s</em> 时产生一个错误。最有可能的情况是文件或路径的访问权限不够'; -$lang['enabled'] = '%s 插件启用'; -$lang['notenabled'] = '%s插件启用失败,请检查文件权限。'; -$lang['disabled'] = '%s 插件禁用'; -$lang['notdisabled'] = '%s插件禁用失败,请检查文件权限。'; -$lang['packageinstalled'] = '插件 (%d 插件: %s) 已成功安装。'; diff --git a/lib/plugins/plugin/plugin.info.txt b/lib/plugins/plugin/plugin.info.txt deleted file mode 100644 index cdf866842..000000000 --- a/lib/plugins/plugin/plugin.info.txt +++ /dev/null @@ -1,7 +0,0 @@ -base plugin -author Christopher Smith -email chris@jalakai.co.uk -date 2013-02-20 -name Plugin Manager plugin -desc Manage and install plugins -url http://www.dokuwiki.org/plugin:plugin diff --git a/lib/plugins/plugin/style.css b/lib/plugins/plugin/style.css deleted file mode 100644 index 9433e6001..000000000 --- a/lib/plugins/plugin/style.css +++ /dev/null @@ -1,195 +0,0 @@ -/* - * admin plugin extension - style additions - * - * @author Christopher Smith chris@jalakai.co.uk - * @link http://wiki.jalakai.co.uk/dokuwiki/doku.php/tutorials/adminplugin - */ - -#plugin__manager h2 { - margin-left: 0; -} - -#plugin__manager form { - display: block; - margin: 0; - padding: 0; -} - -#plugin__manager legend { - display: none; -} - -#plugin__manager fieldset { - width: auto; -} - -#plugin__manager .button { - margin: 0; -} - -#plugin__manager p, -#plugin__manager label { - text-align: left; -} - -#plugin__manager .hidden { - display: none; -} - -#plugin__manager .new { - background: #dee7ec; -} - -/* IE won't understand but doesn't require it */ -#plugin__manager input[disabled] { - color: #ccc; - border-color: #ccc; -} - -#plugin__manager .pm_menu, -#plugin__manager .pm_info { - margin-left: 0; - text-align: left; -} - -[dir=rtl] #plugin__manager .pm_menu, -[dir=rtl] #plugin__manager .pm_info, -[dir=rtl] #plugin__manager p, -[dir=rtl] #plugin__manager label { - text-align: right; -} - -#plugin__manager .pm_menu { - float: left; - width: 48%; -} -[dir=rtl] #plugin__manager .pm_menu { - float: right; -} - -#plugin__manager .pm_info { - float: right; - width: 50%; -} -[dir=rtl] #plugin__manager .pm_info { - float: left; -} - -#plugin__manager .common fieldset { - margin: 0; - padding: 0 0 1.0em 0; - text-align: left; - border: none; -} -[dir=rtl] #plugin__manager .common fieldset { - text-align: right; -} - -#plugin__manager .common label { - padding: 0 0 0.5em 0; -} - -#plugin__manager .common input.edit { - width: 24em; - margin: 0.5em; -} - -#plugin__manager .plugins fieldset { - color: #000; - background: #fff; - text-align: right; - border-top: none; - border-right: none; - border-left: none; -} - -#plugin__manager .plugins fieldset.protected { - background: #fdd; - color: #000; -} - -#plugin__manager .plugins fieldset.disabled { - background: #e0e0e0; - color: #a8a8a8; -} - -#plugin__manager .plugins .legend { - color: #000; - background: inherit; - display: block; - margin: 0; - padding: 0; - font-size: 1em; - line-height: 1.4em; - font-weight: normal; - text-align: left; - float: left; - padding: 0; - clear: none; -} -[dir=rtl] #plugin__manager .plugins .legend { - text-align: right; - float: right; -} - -#plugin__manager .plugins .button { - font-size: 95%; -} - -#plugin__manager .plugins fieldset.buttons { - border: none; -} - -#plugin__manager .plugins fieldset.buttons .button { - float: left; -} -[dir=rtl] #plugin__manager .plugins .button { - float: left; - margin-right: 0.5em; -} -[dir=rtl] #plugin__manager .plugins fieldset.buttons .button { - float: right; -} - -#plugin__manager .pm_info h3 { - margin-left: 0; -} - -#plugin__manager .pm_info dl { - margin: 1em 0; - padding: 0; -} - -#plugin__manager .pm_info dt { - width: 6em; - float: left; - clear: left; - margin: 0; - padding: 0; -} -[dir=rtl] #plugin__manager .pm_info dt { - float: right; - clear: right; -} - -#plugin__manager .pm_info dd { - margin: 0 0 0 7em; - padding: 0; - background: none; -} -[dir=rtl] #plugin__manager .pm_info dd { - margin: 0 7em 0 0; -} - -#plugin__manager .plugins .enable { - float: left; - width: auto; - margin-right: 0.5em; -} -[dir=rtl] #plugin__manager .plugins .enable { - float: right; - margin-right: 0; - margin-left: 0.5em; -} - -/* end admin plugin styles */ diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php index deb8048f4..bd2d090e1 100644 --- a/lib/plugins/popularity/admin.php +++ b/lib/plugins/popularity/admin.php @@ -13,7 +13,6 @@ if(!defined('DOKU_INC')) die(); * need to inherit from this class */ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { - var $version; /** * @var helper_plugin_popularity @@ -23,9 +22,6 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { function admin_plugin_popularity(){ $this->helper = $this->loadHelper('popularity', false); - - $pluginInfo = $this->getInfo(); - $this->version = $pluginInfo['date']; } /** diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index 0e38bcb88..eacde06d0 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -29,8 +29,6 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { */ var $popularityLastSubmitFile; - var $version; - function helper_plugin_popularity(){ global $conf; @@ -39,6 +37,11 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { $this->popularityLastSubmitFile = $conf['cachedir'].'/lastSubmitTime.txt'; } + /** + * Return methods of this helper + * + * @return array with methods description + */ function getMethods(){ $result = array(); $result[] = array( @@ -125,15 +128,17 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { */ function _gather(){ global $conf; + /** @var $auth DokuWiki_Auth_Plugin */ global $auth; $data = array(); $phptime = ini_get('max_execution_time'); @set_time_limit(0); + $pluginInfo = $this->getInfo(); // version $data['anon_id'] = md5(auth_cookiesalt()); $data['version'] = getVersion(); - $data['popversion'] = $this->version; + $data['popversion'] = $pluginInfo['date']; $data['language'] = $conf['lang']; $data['now'] = time(); $data['popauto'] = (int) $this->isAutoSubmitEnabled(); @@ -245,6 +250,17 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { return $data; } + /** + * Callback to search and count the content of directories in DokuWiki + * + * @param array &$data Reference to the result data structure + * @param string $base Base usually $conf['datadir'] + * @param string $file current file or directory relative to $base + * @param string $type Type either 'd' for directory or 'f' for file + * @param int $lvl Current recursion depht + * @param array $opts option array as given to search() + * @return bool + */ function _search_count(&$data,$base,$file,$type,$lvl,$opts){ // traverse if($type == 'd'){ diff --git a/lib/plugins/popularity/lang/ar/lang.php b/lib/plugins/popularity/lang/ar/lang.php index 481668505..c3e21868f 100644 --- a/lib/plugins/popularity/lang/ar/lang.php +++ b/lib/plugins/popularity/lang/ar/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Arabic language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Yaman Hokan <always.smile.yh@hotmail.com> * @author Usama Akkad <uahello@gmail.com> * @author uahello@gmail.com diff --git a/lib/plugins/popularity/lang/bg/lang.php b/lib/plugins/popularity/lang/bg/lang.php index ba731c0fc..963b50e84 100644 --- a/lib/plugins/popularity/lang/bg/lang.php +++ b/lib/plugins/popularity/lang/bg/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Bulgarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Viktor Usunov <usun0v@mail.bg> * @author Kiril <neohidra@gmail.com> */ diff --git a/lib/plugins/popularity/lang/da/lang.php b/lib/plugins/popularity/lang/da/lang.php index bbf2a1ab4..78c447197 100644 --- a/lib/plugins/popularity/lang/da/lang.php +++ b/lib/plugins/popularity/lang/da/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Danish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Kalle Sommer Nielsen <kalle@php.net> * @author Esben Laursen <hyber@hyber.dk> * @author Harith <haj@berlingske.dk> diff --git a/lib/plugins/popularity/lang/da/submitted.txt b/lib/plugins/popularity/lang/da/submitted.txt index 7d7d5429c..88e9ba060 100644 --- a/lib/plugins/popularity/lang/da/submitted.txt +++ b/lib/plugins/popularity/lang/da/submitted.txt @@ -1,3 +1,3 @@ -====== Popularitetsfeeback ====== +====== Popularitetsfeedback ====== Dataene er blevet sendt.
\ No newline at end of file diff --git a/lib/plugins/popularity/lang/et/lang.php b/lib/plugins/popularity/lang/et/lang.php deleted file mode 100644 index ca1410ab0..000000000 --- a/lib/plugins/popularity/lang/et/lang.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * Estonian language file - * - * @author kristian.kankainen@kuu.la - * @author Rivo Zängov <eraser@eraser.ee> - */ diff --git a/lib/plugins/popularity/lang/fi/lang.php b/lib/plugins/popularity/lang/fi/lang.php index d7c230742..ec0fc4071 100644 --- a/lib/plugins/popularity/lang/fi/lang.php +++ b/lib/plugins/popularity/lang/fi/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Finnish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Otto Vainio <otto@valjakko.net> * @author Teemu Mattila <ghcsystems@gmail.com> * @author Sami Olmari <sami@olmari.fi> diff --git a/lib/plugins/popularity/lang/he/lang.php b/lib/plugins/popularity/lang/he/lang.php index f619127cd..54341636b 100644 --- a/lib/plugins/popularity/lang/he/lang.php +++ b/lib/plugins/popularity/lang/he/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Hebrew language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Dotan Kamber <kamberd@yahoo.com> * @author Moshe Kaplan <mokplan@gmail.com> * @author Yaron Yogev <yaronyogev@gmail.com> diff --git a/lib/plugins/popularity/lang/hr/lang.php b/lib/plugins/popularity/lang/hr/lang.php deleted file mode 100644 index 96f1d6afe..000000000 --- a/lib/plugins/popularity/lang/hr/lang.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -/** - * Croatian language file - * - * @author Branko Rihtman <theney@gmail.com> - * @author Dražen Odobašić <dodobasic@gmail.com> - * @author Dejan Igrec dejan.igrec@gmail.com - */ diff --git a/lib/plugins/popularity/lang/id/lang.php b/lib/plugins/popularity/lang/id/lang.php deleted file mode 100644 index 1867f0f69..000000000 --- a/lib/plugins/popularity/lang/id/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Indonesian language file - * - * @author Yustinus Waruwu <juswaruwu@gmail.com> - */ diff --git a/lib/plugins/popularity/lang/kk/lang.php b/lib/plugins/popularity/lang/kk/lang.php deleted file mode 100644 index dde5b9577..000000000 --- a/lib/plugins/popularity/lang/kk/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * kazakh language file - * - * @author Nurgozha Kaliaskarov astana08@gmail.com - */ diff --git a/lib/plugins/popularity/lang/ko/lang.php b/lib/plugins/popularity/lang/ko/lang.php index f52e0007a..f8cf4525d 100644 --- a/lib/plugins/popularity/lang/ko/lang.php +++ b/lib/plugins/popularity/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 Garam <rowain8@gmail.com> */ $lang['name'] = '인기도 조사 (불러오는 데 시간이 걸릴 수 있습니다)'; $lang['submit'] = '자료 보내기'; diff --git a/lib/plugins/popularity/lang/lb/lang.php b/lib/plugins/popularity/lang/lb/lang.php deleted file mode 100644 index 59acdf7a8..000000000 --- a/lib/plugins/popularity/lang/lb/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * lb language file - * - * @author joel@schintgen.net - */ diff --git a/lib/plugins/popularity/lang/mk/lang.php b/lib/plugins/popularity/lang/mk/lang.php deleted file mode 100644 index 6d4530f79..000000000 --- a/lib/plugins/popularity/lang/mk/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Macedonian language file - * - * @author Dimitar Talevski <dimi3.14@gmail.com> - */ diff --git a/lib/plugins/popularity/lang/ms/lang.php b/lib/plugins/popularity/lang/ms/lang.php deleted file mode 100644 index 77ad2a1c1..000000000 --- a/lib/plugins/popularity/lang/ms/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Malay language file - * - * @author Markos - */ diff --git a/lib/plugins/popularity/lang/nl/lang.php b/lib/plugins/popularity/lang/nl/lang.php index dda4a1d7f..6ffa71e82 100644 --- a/lib/plugins/popularity/lang/nl/lang.php +++ b/lib/plugins/popularity/lang/nl/lang.php @@ -14,11 +14,12 @@ * @author Jeroen * @author Ricardo Guijt <ricardoguijt@gmail.com> * @author Gerrit <klapinklapin@gmail.com> + * @author Remon <no@email.local> */ $lang['name'] = 'Populariteitsfeedback (kan even duren om in te laden)'; -$lang['submit'] = 'Verstuur'; +$lang['submit'] = 'Verstuur gegevens'; $lang['autosubmit'] = 'Gegevens automatisch maandelijks verzenden'; -$lang['submissionFailed'] = 'De gegevens konden niet verstuurd worden vanwege de volgende fouten:'; +$lang['submissionFailed'] = 'De gegevens konden niet verstuurd worden vanwege de volgende fout:'; $lang['submitDirectly'] = 'Je kan de gegevens handmatig sturen door het onderstaande formulier te verzenden.'; $lang['autosubmitError'] = 'De laatste automatische verzending is mislukt vanwege de volgende fout:'; $lang['lastSent'] = 'De gegevens zijn verstuurd.'; diff --git a/lib/plugins/popularity/lang/no/lang.php b/lib/plugins/popularity/lang/no/lang.php index df38f6e0e..dfa99d824 100644 --- a/lib/plugins/popularity/lang/no/lang.php +++ b/lib/plugins/popularity/lang/no/lang.php @@ -1,10 +1,11 @@ <?php + /** - * Norwegian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Rune M. Andersen <rune.andersen@gmail.com> * @author Jakob Vad Nielsen (me@jakobnielsen.net) - * @author Kjell Tore Næsgaard <kjell.t.nasgaard@ntnu.no> + * @author Kjell Tore Næsgaard <kjell.t.nasgaard@ntnu.no> * @author Knut Staring <knutst@gmail.com> * @author Lisa Ditlefsen <lisa@vervesearch.com> * @author Erik Pedersen <erik.pedersen@shaw.ca> diff --git a/lib/plugins/popularity/lang/pl/lang.php b/lib/plugins/popularity/lang/pl/lang.php index 76a9464bd..045574a69 100644 --- a/lib/plugins/popularity/lang/pl/lang.php +++ b/lib/plugins/popularity/lang/pl/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Polish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Grzegorz Żur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> diff --git a/lib/plugins/popularity/lang/ru/intro.txt b/lib/plugins/popularity/lang/ru/intro.txt index 52f5a0ae2..dbf0cc688 100644 --- a/lib/plugins/popularity/lang/ru/intro.txt +++ b/lib/plugins/popularity/lang/ru/intro.txt @@ -1,10 +1,10 @@ ====== Сбор информации о популярности ====== -Этот [[doku>popularity|инструмент]] собирает анонимные данные о вашей вики и позволяет вам отправить их разработчикам «ДокуВики». Эти данные помогут им понять, как именно используется «ДокуВики», и удостовериться, что принимаемые проектные решения соответствуют жизненным реалиям. +Этот [[doku>popularity|инструмент]] собирает анонимные данные о вашей вики и позволяет вам отправить их разработчикам «Докувики». Эти данные помогут им понять, как именно используется «Докувики», и удостовериться, что принимаемые проектные решения соответствуют жизненным реалиям. Отправляйте данные время от времени для того, чтобы сообщать разработчикам о том, что ваша вики «подросла». Отправленные вами данные будут идентифицированы по анонимному ID. -Собранные данные содержат такую информацию, как: версия «ДокуВики», количество и размер ваших страниц и файлов, установленные плагины, информацию об установленном PHP. +Собранные данные содержат такую информацию, как: версия «Докувики», количество и размер ваших страниц и файлов, установленные плагины, информацию об установленном PHP. Данные, которые будут отосланы, представлены ниже. Пожалуйста, используйте кнопку «Отправить данные», чтобы передать информацию. diff --git a/lib/plugins/popularity/lang/tr/lang.php b/lib/plugins/popularity/lang/tr/lang.php index 5339176bc..696ee38dc 100644 --- a/lib/plugins/popularity/lang/tr/lang.php +++ b/lib/plugins/popularity/lang/tr/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Turkish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Aydın Coşkuner <aydinweb@gmail.com> * @author Cihan Kahveci <kahvecicihan@gmail.com> * @author Yavuz Selim <yavuzselim@gmail.com> diff --git a/lib/plugins/popularity/lang/vi/lang.php b/lib/plugins/popularity/lang/vi/lang.php deleted file mode 100644 index 2933d8875..000000000 --- a/lib/plugins/popularity/lang/vi/lang.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php -/** - * Vietnamese language file - * - */ diff --git a/lib/plugins/revert/lang/af/lang.php b/lib/plugins/revert/lang/af/lang.php deleted file mode 100644 index 1fff08db3..000000000 --- a/lib/plugins/revert/lang/af/lang.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php -/** - * Afrikaans language file - * - */ diff --git a/lib/plugins/revert/lang/ar/lang.php b/lib/plugins/revert/lang/ar/lang.php index a073c336d..71f411c52 100644 --- a/lib/plugins/revert/lang/ar/lang.php +++ b/lib/plugins/revert/lang/ar/lang.php @@ -1,10 +1,13 @@ <?php + /** - * Arabic language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Yaman Hokan <always.smile.yh@hotmail.com> * @author Usama Akkad <uahello@gmail.com> * @author uahello@gmail.com + * @author Ahmad Abd-Elghany <tolpa1@gmail.com> + * @author alhajr <alhajr300@gmail.com> */ $lang['menu'] = 'مدير الاسترجاع'; $lang['filter'] = 'ابحث في الصفحات المتأذاة'; diff --git a/lib/plugins/revert/lang/bg/lang.php b/lib/plugins/revert/lang/bg/lang.php index 0819de01a..5062a12ad 100644 --- a/lib/plugins/revert/lang/bg/lang.php +++ b/lib/plugins/revert/lang/bg/lang.php @@ -1,6 +1,8 @@ <?php + /** - * bulgarian language file + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Nikolay Vladimirov <nikolay@vladimiroff.com> * @author Viktor Usunov <usun0v@mail.bg> * @author Kiril <neohidra@gmail.com> diff --git a/lib/plugins/revert/lang/cs/lang.php b/lib/plugins/revert/lang/cs/lang.php index b9e7284d4..69abaaade 100644 --- a/lib/plugins/revert/lang/cs/lang.php +++ b/lib/plugins/revert/lang/cs/lang.php @@ -15,6 +15,7 @@ * @author mkucera66@seznam.cz * @author Zbyněk Křivka <krivka@fit.vutbr.cz> * @author Gerrit Uitslag <klapinklapin@gmail.com> + * @author Petr Klíma <qaxi@seznam.cz> */ $lang['menu'] = 'Obnova zaspamovaných stránek'; $lang['filter'] = 'Hledat zaspamované stránky'; diff --git a/lib/plugins/revert/lang/da/lang.php b/lib/plugins/revert/lang/da/lang.php index a76541a78..bb311f18f 100644 --- a/lib/plugins/revert/lang/da/lang.php +++ b/lib/plugins/revert/lang/da/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Danish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Kalle Sommer Nielsen <kalle@php.net> * @author Esben Laursen <hyber@hyber.dk> * @author Harith <haj@berlingske.dk> diff --git a/lib/plugins/revert/lang/et/lang.php b/lib/plugins/revert/lang/et/lang.php deleted file mode 100644 index ca1410ab0..000000000 --- a/lib/plugins/revert/lang/et/lang.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * Estonian language file - * - * @author kristian.kankainen@kuu.la - * @author Rivo Zängov <eraser@eraser.ee> - */ diff --git a/lib/plugins/revert/lang/fi/lang.php b/lib/plugins/revert/lang/fi/lang.php index fdf9bb81c..d14f527f9 100644 --- a/lib/plugins/revert/lang/fi/lang.php +++ b/lib/plugins/revert/lang/fi/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Finnish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author otto@valjakko.net * @author Otto Vainio <otto@valjakko.net> * @author Teemu Mattila <ghcsystems@gmail.com> diff --git a/lib/plugins/revert/lang/he/lang.php b/lib/plugins/revert/lang/he/lang.php index ac3c3412e..2f49856f5 100644 --- a/lib/plugins/revert/lang/he/lang.php +++ b/lib/plugins/revert/lang/he/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Hebrew language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Dotan Kamber <kamberd@yahoo.com> * @author Moshe Kaplan <mokplan@gmail.com> * @author Yaron Yogev <yaronyogev@gmail.com> diff --git a/lib/plugins/revert/lang/hi/lang.php b/lib/plugins/revert/lang/hi/lang.php deleted file mode 100644 index d6f78ffd6..000000000 --- a/lib/plugins/revert/lang/hi/lang.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * Hindi language file - * - * @author Abhinav Tyagi <abhinavtyagi11@gmail.com> - * @author yndesai@gmail.com - */ diff --git a/lib/plugins/revert/lang/hr/lang.php b/lib/plugins/revert/lang/hr/lang.php deleted file mode 100644 index 96f1d6afe..000000000 --- a/lib/plugins/revert/lang/hr/lang.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -/** - * Croatian language file - * - * @author Branko Rihtman <theney@gmail.com> - * @author Dražen Odobašić <dodobasic@gmail.com> - * @author Dejan Igrec dejan.igrec@gmail.com - */ diff --git a/lib/plugins/revert/lang/hu/lang.php b/lib/plugins/revert/lang/hu/lang.php index d16764a35..278af1864 100644 --- a/lib/plugins/revert/lang/hu/lang.php +++ b/lib/plugins/revert/lang/hu/lang.php @@ -10,9 +10,10 @@ * @author Sándor TIHANYI <stihanyi+dw@gmail.com> * @author David Szabo <szabo.david@gyumolcstarhely.hu> * @author Marton Sebok <sebokmarton@gmail.com> + * @author Marina Vladi <deldadam@gmail.com> */ -$lang['menu'] = 'Visszaállítás kezelő (anti-SPAM)'; -$lang['filter'] = 'SPAM tartalmú oldalak keresése'; +$lang['menu'] = 'Visszaállítás-kezelő (anti-SPAM)'; +$lang['filter'] = 'SPAM-tartalmú oldalak keresése'; $lang['revert'] = 'Kiválasztott oldalak visszaállítása'; $lang['reverted'] = '%s a következő változatra lett visszaállítva: %s'; $lang['removed'] = '%s törölve'; diff --git a/lib/plugins/revert/lang/id-ni/lang.php b/lib/plugins/revert/lang/id-ni/lang.php deleted file mode 100644 index d367340b7..000000000 --- a/lib/plugins/revert/lang/id-ni/lang.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * idni language file - * - * @author Harefa <fidelis@harefa.com> - * @author Yustinus Waruwu <juswaruwu@gmail.com> - */ diff --git a/lib/plugins/revert/lang/id/lang.php b/lib/plugins/revert/lang/id/lang.php deleted file mode 100644 index c3d485930..000000000 --- a/lib/plugins/revert/lang/id/lang.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * Indonesian language file - * - * @author Irwan Butar Butar <irwansah.putra@gmail.com> - * @author Yustinus Waruwu <juswaruwu@gmail.com> - */ diff --git a/lib/plugins/revert/lang/kk/lang.php b/lib/plugins/revert/lang/kk/lang.php deleted file mode 100644 index dde5b9577..000000000 --- a/lib/plugins/revert/lang/kk/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * kazakh language file - * - * @author Nurgozha Kaliaskarov astana08@gmail.com - */ diff --git a/lib/plugins/revert/lang/ko/intro.txt b/lib/plugins/revert/lang/ko/intro.txt index 7aa618ba6..565aa4bbe 100644 --- a/lib/plugins/revert/lang/ko/intro.txt +++ b/lib/plugins/revert/lang/ko/intro.txt @@ -1,3 +1,3 @@ ====== 되돌리기 관리자 ====== -스팸 공격으로부터 자동으로 되돌리는데 이 페이지가 도움이 될 수 있습니다. 스팸 공격받은 문서 목록을 찾으려면 문자열을 입력하고(예를 들어 스팸 URL) 나서 찾은 문서가 스팸 공격을 받았는지 확인하고 되돌리세요.
\ No newline at end of file +스팸 공격으로부터 자동으로 되돌리는데 이 페이지가 도움이 될 수 있습니다. 스팸에 공격 받은 문서 목록을 찾으려면 검색어를 입력하고(예를 들어 스팸 URL) 나서 찾은 문서가 스팸 공격을 받았는지 확인하고 되돌리세요.
\ No newline at end of file diff --git a/lib/plugins/revert/lang/ko/lang.php b/lib/plugins/revert/lang/ko/lang.php index e63706960..5666100e9 100644 --- a/lib/plugins/revert/lang/ko/lang.php +++ b/lib/plugins/revert/lang/ko/lang.php @@ -11,7 +11,7 @@ * @author Myeongjin <aranet100@gmail.com> */ $lang['menu'] = '되돌리기 관리자'; -$lang['filter'] = '스팸 문서 찾기'; +$lang['filter'] = '스팸 문서 검색'; $lang['revert'] = '선택한 문서 되돌리기'; $lang['reverted'] = '%s 판을 %s 판으로 되돌림'; $lang['removed'] = '%s 제거됨'; diff --git a/lib/plugins/revert/lang/lb/lang.php b/lib/plugins/revert/lang/lb/lang.php deleted file mode 100644 index 59acdf7a8..000000000 --- a/lib/plugins/revert/lang/lb/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * lb language file - * - * @author joel@schintgen.net - */ diff --git a/lib/plugins/revert/lang/lt/lang.php b/lib/plugins/revert/lang/lt/lang.php deleted file mode 100644 index 103485864..000000000 --- a/lib/plugins/revert/lang/lt/lang.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * Lithuanian language file - * - * @author audrius.klevas@gmail.com - * @author Arunas Vaitekunas <aras@fan.lt> - */ diff --git a/lib/plugins/revert/lang/mk/lang.php b/lib/plugins/revert/lang/mk/lang.php deleted file mode 100644 index 6d4530f79..000000000 --- a/lib/plugins/revert/lang/mk/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Macedonian language file - * - * @author Dimitar Talevski <dimi3.14@gmail.com> - */ diff --git a/lib/plugins/revert/lang/ms/lang.php b/lib/plugins/revert/lang/ms/lang.php deleted file mode 100644 index 77ad2a1c1..000000000 --- a/lib/plugins/revert/lang/ms/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Malay language file - * - * @author Markos - */ diff --git a/lib/plugins/revert/lang/nl/lang.php b/lib/plugins/revert/lang/nl/lang.php index 882675b81..ee8678e63 100644 --- a/lib/plugins/revert/lang/nl/lang.php +++ b/lib/plugins/revert/lang/nl/lang.php @@ -15,13 +15,14 @@ * @author Jeroen * @author Ricardo Guijt <ricardoguijt@gmail.com> * @author Gerrit <klapinklapin@gmail.com> + * @author Remon <no@email.local> */ $lang['menu'] = 'Herstelmanager'; $lang['filter'] = 'Zoek naar bekladde pagina\'s'; $lang['revert'] = 'Herstel geselecteerde pagina\'s'; $lang['reverted'] = '%s hersteld naar revisie %s'; $lang['removed'] = '%s verwijderd'; -$lang['revstart'] = 'Herstelproces begonnen. Dit kan een lange tijd duren. Als het script een timeout genereerd voor het klaar is, moet je in kleinere selecties herstellen.'; +$lang['revstart'] = 'Herstelproces is begonnen. Dit kan een lange tijd duren. Als het script een timeout genereert voor het klaar is, moet je in kleinere delen herstellen.'; $lang['revstop'] = 'Herstelproces succesvol afgerond.'; $lang['note1'] = 'NB: deze zoekopdracht is hoofdlettergevoelig'; $lang['note2'] = 'NB: de pagina zal hersteld worden naar de laatste versie waar de opgegeven spam-term <i>%s</i> niet op voorkomt.'; diff --git a/lib/plugins/revert/lang/no/lang.php b/lib/plugins/revert/lang/no/lang.php index 299b12ea7..c58300dc0 100644 --- a/lib/plugins/revert/lang/no/lang.php +++ b/lib/plugins/revert/lang/no/lang.php @@ -1,13 +1,14 @@ <?php + /** - * Norwegianlanguage file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Thomas Nygreen <nygreen@gmail.com> * @author Arild Burud <arildb@met.no> * @author Torkill Bruland <torkar-b@online.no> * @author Rune M. Andersen <rune.andersen@gmail.com> * @author Jakob Vad Nielsen (me@jakobnielsen.net) - * @author Kjell Tore Næsgaard <kjell.t.nasgaard@ntnu.no> + * @author Kjell Tore Næsgaard <kjell.t.nasgaard@ntnu.no> * @author Knut Staring <knutst@gmail.com> * @author Lisa Ditlefsen <lisa@vervesearch.com> * @author Erik Pedersen <erik.pedersen@shaw.ca> @@ -15,6 +16,8 @@ * @author Rune Rasmussen syntaxerror.no@gmail.com * @author Jon Bøe <jonmagneboe@hotmail.com> * @author Egil Hansen <egil@rosetta.no> + * @author Thomas Juberg <Thomas.Juberg@Gmail.com> + * @author Boris <boris@newton-media.no> */ $lang['menu'] = 'Tilbakestillingsbehandler'; $lang['filter'] = 'Søk etter søppelmeldinger'; diff --git a/lib/plugins/revert/lang/pl/lang.php b/lib/plugins/revert/lang/pl/lang.php index 462841292..d2d53b87e 100644 --- a/lib/plugins/revert/lang/pl/lang.php +++ b/lib/plugins/revert/lang/pl/lang.php @@ -1,6 +1,8 @@ <?php + /** - * polish language file + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Grzegorz Żur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> diff --git a/lib/plugins/revert/lang/sv/lang.php b/lib/plugins/revert/lang/sv/lang.php index c30f82d93..e605a17d4 100644 --- a/lib/plugins/revert/lang/sv/lang.php +++ b/lib/plugins/revert/lang/sv/lang.php @@ -18,6 +18,7 @@ * @author Smorkster Andersson smorkster@gmail.com * @author Henrik <henrik@idealis.se> * @author Tor Härnqvist <tor.harnqvist@gmail.com> + * @author Hans Iwan Bratt <hibratt@gmail.com> */ $lang['menu'] = 'Hantera återställningar'; $lang['filter'] = 'Sök efter spamsidor'; diff --git a/lib/plugins/revert/lang/tr/lang.php b/lib/plugins/revert/lang/tr/lang.php index 9030c31e3..52d28c6fa 100644 --- a/lib/plugins/revert/lang/tr/lang.php +++ b/lib/plugins/revert/lang/tr/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Turkish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Aydın Coşkuner <aydinweb@gmail.com> * @author Cihan Kahveci <kahvecicihan@gmail.com> * @author Yavuz Selim <yavuzselim@gmail.com> diff --git a/lib/plugins/revert/lang/vi/lang.php b/lib/plugins/revert/lang/vi/lang.php deleted file mode 100644 index 2933d8875..000000000 --- a/lib/plugins/revert/lang/vi/lang.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php -/** - * Vietnamese language file - * - */ diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index 8df5abb08..42a4903ec 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -12,33 +12,9 @@ if(!defined('DOKU_INC')) die(); * All DokuWiki plugins to extend the parser/rendering mechanism * need to inherit from this class */ -class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { +class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin { var $allowedModesSetup = false; - var $localised = false; // set to true by setupLocale() after loading language dependent strings - var $lang = array(); // array to hold language dependent strings, best accessed via ->getLang() - var $configloaded = false; // set to true by loadConfig() after loading plugin configuration variables - var $conf = array(); // array to hold plugin settings, best accessed via ->getConf() - - /** - * General Info - * - * Needs to return a associative array with the following values: - * - * author - Author of the plugin - * email - Email address to contact the author - * date - Last modified date of the plugin in YYYY-MM-DD format - * name - Name of the plugin - * desc - Short description of the plugin (Text only) - * url - Website with more information on the plugin (eg. syntax description) - */ - function getInfo(){ - $parts = explode('_',get_class($this)); - $info = DOKU_PLUGIN.'/'.$parts[2].'/plugin.info.txt'; - if(@file_exists($info)) return confToHash($info); - trigger_error('getInfo() not implemented in '.get_class($this).' and '.$info.' not found', E_USER_WARNING); - return array(); - } /** * Syntax Type @@ -87,10 +63,10 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { * @param string $match The text matched by the patterns * @param int $state The lexer state for the match * @param int $pos The character position of the matched text - * @param Doku_Handler $handler Reference to the Doku_Handler object + * @param Doku_Handler $handler The Doku_Handler object * @return array Return an array with all data you want to use in render */ - function handle($match, $state, $pos, Doku_Handler &$handler){ + function handle($match, $state, $pos, Doku_Handler $handler){ trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING); } @@ -113,11 +89,11 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { * created * * @param $format string output format being rendered - * @param $renderer Doku_Renderer reference to the current renderer object + * @param $renderer Doku_Renderer the current renderer object * @param $data array data created by handler() * @return boolean rendered correctly? */ - function render($format, Doku_Renderer &$renderer, $data) { + function render($format, Doku_Renderer $renderer, $data) { trigger_error('render() not implemented in '.get_class($this), E_USER_WARNING); } @@ -144,167 +120,5 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { return parent::accepts($mode); } - - // plugin introspection methods - // extract from class name, format = <plugin type>_plugin_<name>[_<component name>] - function getPluginType() { list($t) = explode('_', get_class($this), 2); return $t; } - function getPluginName() { list($t, $p, $n) = explode('_', get_class($this), 4); return $n; } - - /** - * Get the name of the component of the current class - * - * @return string component name - */ - function getPluginComponent() { list($t, $p, $n, $c) = explode('_', get_class($this), 4); return (isset($c)?$c:''); } - - // localisation methods - /** - * getLang($id) - * - * use this function to access plugin language strings - * to try to minimise unnecessary loading of the strings when the plugin doesn't require them - * e.g. when info plugin is querying plugins for information about themselves. - * - * @param string $id id of the string to be retrieved - * @return string string in appropriate language or english if not available - */ - function getLang($id) { - if (!$this->localised) $this->setupLocale(); - - return (isset($this->lang[$id]) ? $this->lang[$id] : ''); - } - - /** - * locale_xhtml($id) - * - * retrieve a language dependent wiki page and pass to xhtml renderer for display - * plugin equivalent of p_locale_xhtml() - * - * @param string $id id of language dependent wiki page - * @return string parsed contents of the wiki page in xhtml format - */ - function locale_xhtml($id) { - return p_cached_output($this->localFN($id)); - } - - /** - * localFN($id) - * prepends appropriate path for a language dependent filename - * plugin equivalent of localFN() - */ - function localFN($id) { - global $conf; - $plugin = $this->getPluginName(); - $file = DOKU_CONF.'/plugin_lang/'.$plugin.'/'.$conf['lang'].'/'.$id.'.txt'; - if (!@file_exists($file)){ - $file = DOKU_PLUGIN.$plugin.'/lang/'.$conf['lang'].'/'.$id.'.txt'; - if(!@file_exists($file)){ - //fall back to english - $file = DOKU_PLUGIN.$plugin.'/lang/en/'.$id.'.txt'; - } - } - return $file; - } - - /** - * setupLocale() - * reads all the plugins language dependent strings into $this->lang - * this function is automatically called by getLang() - */ - function setupLocale() { - if ($this->localised) return; - - 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; - } - - // configuration methods - /** - * getConf($setting) - * - * use this function to access plugin configuration variables - */ - function getConf($setting) { - - if(!$this->configloaded) { $this->loadConfig(); } - - return $this->conf[$setting]; - } - - /** - * loadConfig() - * merges the plugin's default settings with any local settings - * this function is automatically called through getConf() - */ - function loadConfig() { - global $conf; - - $defaults = $this->readDefaultSettings(); - $plugin = $this->getPluginName(); - - foreach($defaults as $key => $value) { - if(isset($conf['plugin'][$plugin][$key])) continue; - $conf['plugin'][$plugin][$key] = $value; - } - - $this->configloaded = true; - $this->conf =& $conf['plugin'][$plugin]; - } - - /** - * read the plugin's default configuration settings from conf/default.php - * this function is automatically called through getConf() - * - * @return array setting => value - */ - function readDefaultSettings() { - - $path = DOKU_PLUGIN.$this->getPluginName().'/conf/'; - $conf = array(); - - if(@file_exists($path.'default.php')) { - include($path.'default.php'); - } - - return $conf; - } - - /** - * Loads a given helper plugin (if enabled) - * - * @author Esther Brunner <wikidesign@gmail.com> - * - * @param string $name name of plugin to load - * @param bool $msg if a message should be displayed in case the plugin is not available - * - * @return object helper plugin object - */ - function loadHelper($name, $msg = true) { - if(!plugin_isdisabled($name)) { - $obj = plugin_load('helper', $name); - } else { - $obj = null; - } - if(is_null($obj) && $msg) msg("Helper plugin $name is not available or invalid.", -1); - return $obj; - } - - /** - * Allow the plugin to prevent DokuWiki from reusing an instance - * - * @return bool false if the plugin has to be instantiated - */ - function isSingleton() { - return true; - } - } //Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/usermanager/_test/csv_export.test.php b/lib/plugins/usermanager/_test/csv_export.test.php new file mode 100644 index 000000000..667fc71dc --- /dev/null +++ b/lib/plugins/usermanager/_test/csv_export.test.php @@ -0,0 +1,59 @@ +<?php + +/** + * @group plugin_usermanager + * @group admin_plugins + * @group plugins + * @group bundled_plugins + */ +require_once(dirname(__FILE__).'/mocks.class.php'); + +class plugin_usermanager_csv_export_test extends DokuWikiTest { + + protected $usermanager; + + function setUp() { + $this->usermanager = new admin_mock_usermanager(); + parent::setUp(); + } + + /** + * based on standard test user/conf setup + * + * users per _test/conf/users.auth.php + * expected to be: testuser:179ad45c6ce2cb97cf1029e212046e81:Arthur Dent:arthur@example.com + */ + function test_export() { + $expected = 'User,"Real Name",Email,Groups +testuser,"Arthur Dent",arthur@example.com, +'; + $this->assertEquals($expected, $this->usermanager->tryExport()); + } + + /** + * when configured to use a different locale, the column headings in the first line of the + * exported csv data should reflect the langauge strings of that locale + */ + function test_export_withlocale(){ + global $conf; + $old_conf = $conf; + $conf['lang'] = 'de'; + + $this->usermanager->localised = false; + $this->usermanager->setupLocale(); + + $conf = $old_conf; + + $expected = 'Benutzername,"Voller Name",E-Mail,Gruppen +testuser,"Arthur Dent",arthur@example.com, +'; + $this->assertEquals($expected, $this->usermanager->tryExport()); + } +/* + function test_export_withfilter(){ + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } +*/ +} diff --git a/lib/plugins/usermanager/_test/csv_import.test.php b/lib/plugins/usermanager/_test/csv_import.test.php new file mode 100644 index 000000000..3968356bc --- /dev/null +++ b/lib/plugins/usermanager/_test/csv_import.test.php @@ -0,0 +1,185 @@ +<?php + +/** + * @group plugin_usermanager + * @group admin_plugins + * @group plugins + * @group bundled_plugins + */ + +require_once(dirname(__FILE__).'/mocks.class.php'); + +/** + * !!!!! NOTE !!!!! + * + * At present, users imported in individual tests remain in the user list for subsequent tests + */ +class plugin_usermanager_csv_import_test extends DokuWikiTest { + + private $old_files; + protected $usermanager; + protected $importfile; + + function setUp() { + $this->importfile = tempnam(TMP_DIR, 'csv'); + + $this->old_files = $_FILES; + $_FILES = array( + 'import' => array( + 'name' => 'import.csv', + 'tmp_name' => $this->importfile, + 'type' => 'text/plain', + 'size' => 1, + 'error' => 0, + ), + ); + + $this->usermanager = new admin_mock_usermanager(); + parent::setUp(); + } + + function tearDown() { + $_FILES = $this->old_files; + parent::tearDown(); + } + + function doImportTest($importCsv, $expectedResult, $expectedNewUsers, $expectedFailures) { + global $auth; + $before_users = $auth->retrieveUsers(); + + io_savefile($this->importfile, $importCsv); + $result = $this->usermanager->tryImport(); + + $after_users = $auth->retrieveUsers(); + $import_count = count($after_users) - count($before_users); + $new_users = array_diff_key($after_users, $before_users); + $diff_users = array_diff_assoc($after_users, $before_users); + + $expectedCount = count($expectedNewUsers); + + $this->assertEquals($expectedResult, $result); // import result as expected + $this->assertEquals($expectedCount, $import_count); // number of new users matches expected number imported + $this->assertEquals($expectedNewUsers, $this->stripPasswords($new_users)); // new user data matches imported user data + $this->assertEquals($expectedCount, $this->countPasswords($new_users)); // new users have a password + $this->assertEquals($expectedCount, $this->usermanager->mock_email_notifications_sent); // new users notified of their passwords + $this->assertEquals($new_users, $diff_users); // no other users were harmed in the testing of this import + $this->assertEquals($expectedFailures, $this->usermanager->getImportFailures()); // failures as expected + } + + function test_cantImport(){ + global $auth; + $oldauth = $auth; + + $auth = new auth_mock_authplain(); + $auth->setCanDo('addUser', false); + + $csv = 'User,"Real Name",Email,Groups +importuser,"Ford Prefect",ford@example.com,user +'; + + $this->doImportTest($csv, false, array(), array()); + + $auth = $oldauth; + } + + function test_import() { + $csv = 'User,"Real Name",Email,Groups +importuser,"Ford Prefect",ford@example.com,user +'; + $expected = array( + 'importuser' => array( + 'name' => 'Ford Prefect', + 'mail' => 'ford@example.com', + 'grps' => array('user'), + ), + ); + + $this->doImportTest($csv, true, $expected, array()); + } + + function test_importExisting() { + $csv = 'User,"Real Name",Email,Groups +importuser,"Ford Prefect",ford@example.com,user +'; + $failures = array( + '2' => array( + 'error' => $this->usermanager->lang['import_error_create'], + 'user' => array( + 'importuser', + 'Ford Prefect', + 'ford@example.com', + 'user', + ), + 'orig' => 'importuser,"Ford Prefect",ford@example.com,user'.NL, + ), + ); + + $this->doImportTest($csv, true, array(), $failures); + } + + function test_importUtf8() { + $csv = 'User,"Real Name",Email,Groups +importutf8,"Førd Prefect",ford@example.com,user +'; + $expected = array( + 'importutf8' => array( + 'name' => 'Førd Prefect', + 'mail' => 'ford@example.com', + 'grps' => array('user'), + ), + ); + + $this->doImportTest($csv, true, $expected, array()); + } + + /** + * utf8: u+00F8 (ø) <=> 0xF8 :iso-8859-1 + */ + function test_importIso8859() { + $csv = 'User,"Real Name",Email,Groups +importiso8859,"F'.chr(0xF8).'rd Prefect",ford@example.com,user +'; + $expected = array( + 'importiso8859' => array( + 'name' => 'Førd Prefect', + 'mail' => 'ford@example.com', + 'grps' => array('user'), + ), + ); + + $this->doImportTest($csv, true, $expected, array()); + } + + /** + * Verify usermanager::str_getcsv() behaves identically to php 5.3's str_getcsv() + * within the context/parameters required by _import() + * + * @requires PHP 5.3 + * @deprecated remove when dokuwiki requires 5.3+ + * also associated usermanager & mock usermanager access methods + */ + function test_getcsvcompatibility() { + $line = 'importuser,"Ford Prefect",ford@example.com,user'.NL; + + $this->assertEquals(str_getcsv($line), $this->usermanager->access_str_getcsv($line)); + } + + private function stripPasswords($array){ + foreach ($array as $user => $data) { + unset($array[$user]['pass']); + } + return $array; + } + + private function countPasswords($array){ + $count = 0; + foreach ($array as $user => $data) { + if (!empty($data['pass'])) { + $count++; + } + } + return $count; + } + +} + diff --git a/lib/plugins/usermanager/_test/mocks.class.php b/lib/plugins/usermanager/_test/mocks.class.php new file mode 100644 index 000000000..91c74768c --- /dev/null +++ b/lib/plugins/usermanager/_test/mocks.class.php @@ -0,0 +1,58 @@ +<?php + +/** + * test wrapper to allow access to private/protected functions/properties + * + * NB: for plugin introspection methods, getPluginType() & getPluginName() to work + * this class name needs to start "admin_" and end "_usermanager". Internally + * these methods are used in setting up the class, e.g. for language strings + */ +class admin_mock_usermanager extends admin_plugin_usermanager { + + public $mock_email_notifications = true; + public $mock_email_notifications_sent = 0; + + public function getImportFailures() { + return $this->_import_failures; + } + + public function tryExport() { + ob_start(); + $this->_export(); + return ob_get_clean(); + } + + public function tryImport() { + return $this->_import(); + } + + /** + * @deprecated remove when dokuwiki requires php 5.3+ + * also associated unit test & usermanager methods + */ + public function access_str_getcsv($line){ + return $this->str_getcsv($line); + } + + // no need to send email notifications (mostly) + protected function _notifyUser($user, $password, $status_alert=true) { + if ($this->mock_email_notifications) { + $this->mock_email_notifications_sent++; + return true; + } else { + return parent::_notifyUser($user, $password, $status_alert); + } + } + + protected function _isUploadedFile($file) { + return file_exists($file); + } +} + +class auth_mock_authplain extends auth_plugin_authplain { + + public function setCanDo($op, $canDo) { + $this->cando[$op] = $canDo; + } + +} diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index c4d71cb22..b67d91b36 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -53,7 +53,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } // attempt to retrieve any import failures from the session - if ($_SESSION['import_failures']){ + if (!empty($_SESSION['import_failures'])){ $this->_import_failures = $_SESSION['import_failures']; } } @@ -277,6 +277,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { protected function _htmlUserForm($cmd,$user='',$userdata=array(),$indent=0) { global $conf; global $ID; + global $lang; $name = $mail = $groups = ''; $notes = array(); @@ -299,6 +300,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $this->_htmlInputField($cmd."_userid", "userid", $this->lang["user_id"], $user, $this->_auth->canDo("modLogin"), $indent+6); $this->_htmlInputField($cmd."_userpass", "userpass", $this->lang["user_pass"], "", $this->_auth->canDo("modPass"), $indent+6); + $this->_htmlInputField($cmd."_userpass2", "userpass2", $lang["passchk"], "", $this->_auth->canDo("modPass"), $indent+6); $this->_htmlInputField($cmd."_username", "username", $this->lang["user_name"], $name, $this->_auth->canDo("modName"), $indent+6); $this->_htmlInputField($cmd."_usermail", "usermail", $this->lang["user_mail"], $mail, $this->_auth->canDo("modMail"), $indent+6); $this->_htmlInputField($cmd."_usergroups","usergroups",$this->lang["user_groups"],$groups,$this->_auth->canDo("modGroups"),$indent+6); @@ -358,7 +360,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $class = $cando ? '' : ' class="disabled"'; echo str_pad('',$indent); - if($name == 'userpass'){ + if($name == 'userpass' || $name == 'userpass2'){ $fieldtype = 'password'; $autocomp = 'autocomplete="off"'; }elseif($name == 'usermail'){ @@ -475,7 +477,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if (!checkSecurityToken()) return false; if (!$this->_auth->canDo('addUser')) return false; - list($user,$pass,$name,$mail,$grps) = $this->_retrieveUser(); + list($user,$pass,$name,$mail,$grps,$passconfirm) = $this->_retrieveUser(); if (empty($user)) return false; if ($this->_auth->canDo('modPass')){ @@ -486,6 +488,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { msg($this->lang['add_fail'], -1); return false; } + } else { + if (!$this->_verifyPassword($pass,$passconfirm)) { + return false; + } } } else { if (!empty($pass)){ @@ -606,7 +612,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $oldinfo = $this->_auth->getUserData($olduser); // get new user data subject to change - list($newuser,$newpass,$newname,$newmail,$newgrps) = $this->_retrieveUser(); + list($newuser,$newpass,$newname,$newmail,$newgrps,$passconfirm) = $this->_retrieveUser(); if (empty($newuser)) return false; $changes = array(); @@ -625,27 +631,37 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $changes['user'] = $newuser; } } - - // generate password if left empty and notification is on - if($INPUT->has('usernotify') && empty($newpass)){ - $newpass = auth_pwgen($olduser); + if ($this->_auth->canDo('modPass')) { + if ($newpass || $passconfirm) { + if ($this->_verifyPassword($newpass,$passconfirm)) { + $changes['pass'] = $newpass; + } else { + return false; + } + } else { + // no new password supplied, check if we need to generate one (or it stays unchanged) + if ($INPUT->has('usernotify')) { + $changes['pass'] = auth_pwgen($olduser); + } + } } - if (!empty($newpass) && $this->_auth->canDo('modPass')) - $changes['pass'] = $newpass; - if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name']) - $changes['name'] = $newname; - if (!empty($newmail) && $this->_auth->canDo('modMail') && $newmail != $oldinfo['mail']) - $changes['mail'] = $newmail; - if (!empty($newgrps) && $this->_auth->canDo('modGroups') && $newgrps != $oldinfo['grps']) - $changes['grps'] = $newgrps; + if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name']) { + $changes['name'] = $newname; + } + if (!empty($newmail) && $this->_auth->canDo('modMail') && $newmail != $oldinfo['mail']) { + $changes['mail'] = $newmail; + } + if (!empty($newgrps) && $this->_auth->canDo('modGroups') && $newgrps != $oldinfo['grps']) { + $changes['grps'] = $newgrps; + } if ($ok = $this->_auth->triggerUserMod('modify', array($olduser, $changes))) { msg($this->lang['update_ok'],1); - if ($INPUT->has('usernotify') && $newpass) { + if ($INPUT->has('usernotify') && !empty($changes['pass'])) { $notify = empty($changes['user']) ? $olduser : $newuser; - $this->_notifyUser($notify,$newpass); + $this->_notifyUser($notify,$changes['pass']); } // invalidate all sessions @@ -686,6 +702,32 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } /** + * Verify password meets minimum requirements + * :TODO: extend to support password strength + * + * @param string $password candidate string for new password + * @param string $confirm repeated password for confirmation + * @return bool true if meets requirements, false otherwise + */ + protected function _verifyPassword($password, $confirm) { + global $lang; + + if (empty($password) && empty($confirm)) { + return false; + } + + if ($password !== $confirm) { + msg($lang['regbadpass'], -1); + return false; + } + + // :TODO: test password for required strength + + // if we make it this far the password is good + return true; + } + + /** * Retrieve & clean user data from the form * * @param bool $clean whether the cleanUser method of the authentication backend is applied @@ -701,6 +743,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $user[2] = $INPUT->str('username'); $user[3] = $INPUT->str('usermail'); $user[4] = explode(',',$INPUT->str('usergroups')); + $user[5] = $INPUT->str('userpass2'); // repeated password for confirmation $user[4] = array_map('trim',$user[4]); if($clean) $user[4] = array_map(array($auth,'cleanGroup'),$user[4]); @@ -814,6 +857,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { fputcsv($fd, $line); } fclose($fd); + if (defined('DOKU_UNITTEST')){ return; } + die; } @@ -822,7 +867,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * csv file should have 4 columns, user_id, full name, email, groups (comma separated) * - * @return bool whether succesful + * @return bool whether successful */ protected function _import() { // check we are allowed to add users @@ -830,7 +875,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if (!$this->_auth->canDo('addUser')) return false; // check file uploaded ok. - if (empty($_FILES['import']['size']) || !empty($FILES['import']['error']) && is_uploaded_file($FILES['import']['tmp_name'])) { + if (empty($_FILES['import']['size']) || !empty($_FILES['import']['error']) && $this->_isUploadedFile($_FILES['import']['tmp_name'])) { msg($this->lang['import_error_upload'],-1); return false; } @@ -845,7 +890,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if (!utf8_check($csv)) { $csv = utf8_encode($csv); } - $raw = str_getcsv($csv); + $raw = $this->_getcsv($csv); $error = ''; // clean out any errors from the previous line // data checks... if (1 == ++$line) { @@ -867,6 +912,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $import_success_count++; } else { $import_fail_count++; + array_splice($raw, 1, 1); // remove the spliced in password $this->_import_failures[$line] = array('error' => $error, 'user' => $raw, 'orig' => $csv); } } @@ -940,7 +986,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @param array $user data of user * @param string &$error reference catched error message - * @return bool whether succesful + * @return bool whether successful */ protected function _addImportUser($user, & $error){ if (!$this->_auth->triggerUserMod('create', $user)) { @@ -973,4 +1019,37 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { die; } + /** + * wrapper for is_uploaded_file to facilitate overriding by test suite + */ + protected function _isUploadedFile($file) { + return is_uploaded_file($file); + } + + /** + * wrapper for str_getcsv() to simplify maintaining compatibility with php 5.2 + * + * @deprecated remove when dokuwiki php requirement increases to 5.3+ + * also associated unit test & mock access method + */ + protected function _getcsv($csv) { + return function_exists('str_getcsv') ? str_getcsv($csv) : $this->str_getcsv($csv); + } + + /** + * replacement str_getcsv() function for php < 5.3 + * loosely based on www.php.net/str_getcsv#88311 + * + * @deprecated remove when dokuwiki php requirement increases to 5.3+ + */ + protected function str_getcsv($str) { + $fp = fopen("php://temp/maxmemory:1048576", 'r+'); // 1MiB + fputs($fp, $str); + rewind($fp); + + $data = fgetcsv($fp); + + fclose($fp); + return $data; + } } diff --git a/lib/plugins/usermanager/lang/ar/lang.php b/lib/plugins/usermanager/lang/ar/lang.php index d4b891320..0a751e7fb 100644 --- a/lib/plugins/usermanager/lang/ar/lang.php +++ b/lib/plugins/usermanager/lang/ar/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Arabic language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Yaman Hokan <always.smile.yh@hotmail.com> * @author Usama Akkad <uahello@gmail.com> * @author uahello@gmail.com diff --git a/lib/plugins/usermanager/lang/bg/lang.php b/lib/plugins/usermanager/lang/bg/lang.php index 9ed27f42a..9700385f8 100644 --- a/lib/plugins/usermanager/lang/bg/lang.php +++ b/lib/plugins/usermanager/lang/bg/lang.php @@ -1,7 +1,8 @@ <?php + /** - * bulgarian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Nikolay Vladimirov <nikolay@vladimiroff.com> * @author Viktor Usunov <usun0v@mail.bg> * @author Kiril <neohidra@gmail.com> diff --git a/lib/plugins/usermanager/lang/cs/lang.php b/lib/plugins/usermanager/lang/cs/lang.php index b2c736e09..bbb560679 100644 --- a/lib/plugins/usermanager/lang/cs/lang.php +++ b/lib/plugins/usermanager/lang/cs/lang.php @@ -62,7 +62,7 @@ $lang['add_ok'] = 'Uživatel úspěšně vytvořen'; $lang['add_fail'] = 'Vytvoření uživatele selhalo'; $lang['notify_ok'] = 'Odeslán mail s upozorněním'; $lang['notify_fail'] = 'Mail s upozorněním nebylo možno odeslat'; -$lang['import_success_count'] = 'Import uživatelů: nalezeno %s uživatelů, %d úspěšně importováno.'; +$lang['import_success_count'] = 'Import uživatelů: nalezeno %d uživatelů, %d úspěšně importováno.'; $lang['import_failure_count'] = 'Import uživatelů: %d selhalo. Seznam chybných je níže.'; $lang['import_error_fields'] = 'Nedostatek položek, nalezena/y %d, požadovány 4.'; $lang['import_error_baduserid'] = 'Chybí User-id'; diff --git a/lib/plugins/usermanager/lang/da/lang.php b/lib/plugins/usermanager/lang/da/lang.php index 845457f7e..47d7efea2 100644 --- a/lib/plugins/usermanager/lang/da/lang.php +++ b/lib/plugins/usermanager/lang/da/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Danish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Lars Næsbye Christensen <larsnaesbye@stud.ku.dk> * @author Kalle Sommer Nielsen <kalle@php.net> * @author Esben Laursen <hyber@hyber.dk> @@ -11,6 +12,7 @@ * @author rasmus@kinnerup.com * @author Michael Pedersen subben@gmail.com * @author Mikael Lyngvig <mikael@lyngvig.org> + * @author soer9648 <soer9648@eucl.dk> */ $lang['menu'] = 'Brugerstyring'; $lang['noauth'] = '(Brugervalidering er ikke tilgængelig)'; @@ -33,6 +35,11 @@ $lang['search'] = 'Søg'; $lang['search_prompt'] = 'Udfør søgning'; $lang['clear'] = 'Nulstil søgefilter'; $lang['filter'] = 'Filter'; +$lang['export_all'] = 'Eksportér Alle Brugere (CSV)'; +$lang['export_filtered'] = 'Eksportér Filtrerede Brugerliste (CSV)'; +$lang['import'] = 'Importér Nye Brugere'; +$lang['line'] = 'Linje nr.'; +$lang['error'] = 'Fejlmeddelelse'; $lang['summary'] = 'Viser brugerne %1$d-%2$d ud af %3$d fundne. %4$d brugere totalt.'; $lang['nonefound'] = 'Ingen brugere fundet. %d brugere totalt.'; $lang['delete_ok'] = '%d brugere slettet'; @@ -53,3 +60,15 @@ $lang['add_ok'] = 'Bruger tilføjet uden fejl.'; $lang['add_fail'] = 'Tilføjelse af bruger mislykkedes'; $lang['notify_ok'] = 'Meddelelse sendt'; $lang['notify_fail'] = 'Meddelelse kunne ikke sendes'; +$lang['import_userlistcsv'] = 'Brugerlistefil (CSV):'; +$lang['import_header'] = 'Nyeste Import - Fejl'; +$lang['import_success_count'] = 'Bruger-Import: %d brugere fundet, %d importeret med succes.'; +$lang['import_failure_count'] = 'Bruger-Import: %d fejlet. Fejl er listet nedenfor.'; +$lang['import_error_fields'] = 'Utilstrækkelige felter, fandt %d, påkrævet 4.'; +$lang['import_error_baduserid'] = 'Bruger-id mangler'; +$lang['import_error_badname'] = 'Ugyldigt navn'; +$lang['import_error_badmail'] = 'Ugyldig email-adresse'; +$lang['import_error_upload'] = 'Import Fejlet. CSV-filen kunne ikke uploades eller er tom.'; +$lang['import_error_readfail'] = 'Import Fejlet. Ikke muligt at læse uploadede fil.'; +$lang['import_error_create'] = 'Ikke muligt at oprette brugeren'; +$lang['import_notify_fail'] = 'Notifikationsmeddelelse kunne ikke sendes for importerede bruger %s, med emailen %s.'; diff --git a/lib/plugins/usermanager/lang/de/lang.php b/lib/plugins/usermanager/lang/de/lang.php index 21be74f71..4b297b0dc 100644 --- a/lib/plugins/usermanager/lang/de/lang.php +++ b/lib/plugins/usermanager/lang/de/lang.php @@ -20,6 +20,8 @@ * @author Matthias Schulte <dokuwiki@lupo49.de> * @author Sven <Svenluecke48@gmx.d> * @author christian studer <cstuder@existenz.ch> + * @author Ben Fey <benedikt.fey@beck-heun.de> + * @author Jonas Gröger <jonas.groeger@gmail.com> */ $lang['menu'] = 'Benutzerverwaltung'; $lang['noauth'] = '(Authentifizierungssystem nicht verfügbar)'; @@ -67,6 +69,8 @@ $lang['add_ok'] = 'Nutzer erfolgreich angelegt'; $lang['add_fail'] = 'Nutzer konnte nicht angelegt werden'; $lang['notify_ok'] = 'Benachrichtigungsmail wurde versandt'; $lang['notify_fail'] = 'Benachrichtigungsmail konnte nicht versandt werden'; +$lang['import_userlistcsv'] = 'Benutzerliste (CSV-Datei):'; +$lang['import_header'] = 'Letzte Fehler bei Import'; $lang['import_success_count'] = 'User-Import: %d User gefunden, %d erfolgreich importiert.'; $lang['import_failure_count'] = 'User-Import: %d fehlgeschlagen. Fehlgeschlagene User sind nachfolgend aufgelistet.'; $lang['import_error_fields'] = 'Unzureichende Anzahl an Feldern: %d gefunden, benötigt sind 4.'; @@ -77,3 +81,4 @@ $lang['import_error_upload'] = 'Import fehlgeschlagen. Die CSV-Datei konnte ni $lang['import_error_readfail'] = 'Import fehlgeschlagen. Die hochgeladene Datei konnte nicht gelesen werden.'; $lang['import_error_create'] = 'User konnte nicht angelegt werden'; $lang['import_notify_fail'] = 'Notifikation konnte nicht an den importierten Benutzer %s (E-Mail: %s) gesendet werden.'; +$lang['import_downloadfailures'] = 'Fehler als CSV-Datei zur Korrektur herunterladen'; diff --git a/lib/plugins/usermanager/lang/en/lang.php b/lib/plugins/usermanager/lang/en/lang.php index f87c77afb..b55ecc998 100644 --- a/lib/plugins/usermanager/lang/en/lang.php +++ b/lib/plugins/usermanager/lang/en/lang.php @@ -76,4 +76,3 @@ $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/eo/lang.php b/lib/plugins/usermanager/lang/eo/lang.php index 4c4174339..ff7818e05 100644 --- a/lib/plugins/usermanager/lang/eo/lang.php +++ b/lib/plugins/usermanager/lang/eo/lang.php @@ -59,6 +59,8 @@ $lang['add_ok'] = 'La uzanto sukcese aldoniĝis'; $lang['add_fail'] = 'Ne eblis aldoni uzanton'; $lang['notify_ok'] = 'Avizanta mesaĝo sendiĝis'; $lang['notify_fail'] = 'La avizanta mesaĝo ne povis esti sendita'; +$lang['import_userlistcsv'] = 'Dosiero kun listo de uzantoj (CSV):'; +$lang['import_header'] = 'Plej lastaj Import-eraroj'; $lang['import_success_count'] = 'Uzant-importo: %d uzantoj trovataj, %d sukcese importitaj.'; $lang['import_failure_count'] = 'Uzant-importo: %d fiaskis. Fiaskoj estas sube listitaj.'; $lang['import_error_fields'] = 'Nesufiĉe da kampoj, ni trovis %d, necesas 4.'; @@ -69,3 +71,4 @@ $lang['import_error_upload'] = 'Importo fiaskis. La csv-dosiero ne povis esti $lang['import_error_readfail'] = 'Importo fiaskis. Ne eblas legi alŝutitan dosieron.'; $lang['import_error_create'] = 'Ne eblas krei la uzanton'; $lang['import_notify_fail'] = 'Averta mesaĝo ne povis esti sendata al la importita uzanto %s, kun retdreso %s.'; +$lang['import_downloadfailures'] = 'Elŝut-eraroj por korektado (CSV)'; diff --git a/lib/plugins/usermanager/lang/et/lang.php b/lib/plugins/usermanager/lang/et/lang.php index 2161df918..93b28a6b8 100644 --- a/lib/plugins/usermanager/lang/et/lang.php +++ b/lib/plugins/usermanager/lang/et/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Estonian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author kristian.kankainen@kuu.la * @author Rivo Zängov <eraser@eraser.ee> */ diff --git a/lib/plugins/usermanager/lang/fi/lang.php b/lib/plugins/usermanager/lang/fi/lang.php index 1db4bd7fb..de243133a 100644 --- a/lib/plugins/usermanager/lang/fi/lang.php +++ b/lib/plugins/usermanager/lang/fi/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Finnish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author otto@valjakko.net * @author Otto Vainio <otto@valjakko.net> * @author Teemu Mattila <ghcsystems@gmail.com> diff --git a/lib/plugins/usermanager/lang/fr/lang.php b/lib/plugins/usermanager/lang/fr/lang.php index 7c24ef900..dd0e64fc4 100644 --- a/lib/plugins/usermanager/lang/fr/lang.php +++ b/lib/plugins/usermanager/lang/fr/lang.php @@ -23,6 +23,7 @@ * @author Bruno Veilleux <bruno.vey@gmail.com> * @author Antoine Turmel <geekshadow@gmail.com> * @author schplurtz <Schplurtz@laposte.net> + * @author Jérôme Brandt <jeromebrandt@gmail.com> */ $lang['menu'] = 'Gestion des utilisateurs'; $lang['noauth'] = '(authentification de l\'utilisateur non disponible)'; @@ -70,6 +71,8 @@ $lang['add_ok'] = 'Utilisateur ajouté avec succès'; $lang['add_fail'] = 'Échec de l\'ajout de l\'utilisateur'; $lang['notify_ok'] = 'Courriel de notification expédié'; $lang['notify_fail'] = 'Échec de l\'expédition du courriel de notification'; +$lang['import_userlistcsv'] = 'Liste utilisateur (fichier CSV)'; +$lang['import_header'] = 'Erreurs d\'import les plus récentes'; $lang['import_success_count'] = 'Import d’utilisateurs : %d utilisateurs trouvés, %d utilisateurs importés avec succès.'; $lang['import_failure_count'] = 'Import d\'utilisateurs : %d ont échoué. Les erreurs sont listées ci-dessous.'; $lang['import_error_fields'] = 'Nombre de champs insuffisant, %d trouvé, 4 requis.'; @@ -80,3 +83,4 @@ $lang['import_error_upload'] = 'L\'import a échoué. Le fichier csv n\'a pas $lang['import_error_readfail'] = 'L\'import a échoué. Impossible de lire le fichier téléchargé.'; $lang['import_error_create'] = 'Impossible de créer l\'utilisateur'; $lang['import_notify_fail'] = 'Impossible d\'expédier une notification à l\'utilisateur importé %s, adresse %s.'; +$lang['import_downloadfailures'] = 'Télécharger les erreurs au format CSV pour correction'; diff --git a/lib/plugins/usermanager/lang/he/lang.php b/lib/plugins/usermanager/lang/he/lang.php index 601163013..18202584e 100644 --- a/lib/plugins/usermanager/lang/he/lang.php +++ b/lib/plugins/usermanager/lang/he/lang.php @@ -1,7 +1,8 @@ <?php + /** - * hebrew language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author DoK <kamberd@yahoo.com> * @author Dotan Kamber <kamberd@yahoo.com> * @author Moshe Kaplan <mokplan@gmail.com> diff --git a/lib/plugins/usermanager/lang/hi/lang.php b/lib/plugins/usermanager/lang/hi/lang.php deleted file mode 100644 index d6f78ffd6..000000000 --- a/lib/plugins/usermanager/lang/hi/lang.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * Hindi language file - * - * @author Abhinav Tyagi <abhinavtyagi11@gmail.com> - * @author yndesai@gmail.com - */ diff --git a/lib/plugins/usermanager/lang/hr/lang.php b/lib/plugins/usermanager/lang/hr/lang.php deleted file mode 100644 index 96f1d6afe..000000000 --- a/lib/plugins/usermanager/lang/hr/lang.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -/** - * Croatian language file - * - * @author Branko Rihtman <theney@gmail.com> - * @author Dražen Odobašić <dodobasic@gmail.com> - * @author Dejan Igrec dejan.igrec@gmail.com - */ diff --git a/lib/plugins/usermanager/lang/hu/import.txt b/lib/plugins/usermanager/lang/hu/import.txt index 5a4bc8b1c..f204f6a1e 100644 --- a/lib/plugins/usermanager/lang/hu/import.txt +++ b/lib/plugins/usermanager/lang/hu/import.txt @@ -1,9 +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. +Szükséges egy legalább 4 oszlopot tartalmazó, felhasználókat tartalmazó fájl. +Az oszlopok kötelező tartalma, sorrendben: felhasználói azonosító, teljes név, e-mailcím és csoport. +A CSV-mezőket vesszővel (,) kell elválasztani, a szövegeket idézőjelek ("") közé kell tenni. A fordított törtvonal (\) használható feloldójelnek. +Megfelelő mintafájl megtekintéséhez próbáld ki a "Felhasználók exportálása" funkciót fentebb. +A duplán szereplő felhasználói azonosítók kihagyásra kerülnek. -Minden sikeresen importált felhasználó kap egy e-mailt, amiben megtalálja a generált jelszavát.
\ No newline at end of file +Minden sikeresen importált felhasználó számára jelszó készül, amelyet e-mailben kézhez kap.
\ 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 dd76bfd50..963fcd1fc 100644 --- a/lib/plugins/usermanager/lang/hu/lang.php +++ b/lib/plugins/usermanager/lang/hu/lang.php @@ -11,6 +11,7 @@ * @author David Szabo <szabo.david@gyumolcstarhely.hu> * @author Marton Sebok <sebokmarton@gmail.com> * @author Serenity87HUN <anikototh87@gmail.com> + * @author Marina Vladi <deldadam@gmail.com> */ $lang['menu'] = 'Felhasználók kezelése'; $lang['noauth'] = '(A felhasználói azonosítás nem működik.)'; @@ -58,14 +59,14 @@ $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_userlistcsv'] = 'Felhasználók listájának fájlja (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_badname'] = 'Helytelen név'; +$lang['import_error_badmail'] = 'Helytelen 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'; diff --git a/lib/plugins/usermanager/lang/id-ni/lang.php b/lib/plugins/usermanager/lang/id-ni/lang.php deleted file mode 100644 index d367340b7..000000000 --- a/lib/plugins/usermanager/lang/id-ni/lang.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/** - * idni language file - * - * @author Harefa <fidelis@harefa.com> - * @author Yustinus Waruwu <juswaruwu@gmail.com> - */ diff --git a/lib/plugins/usermanager/lang/id/lang.php b/lib/plugins/usermanager/lang/id/lang.php index 457ad4963..425b2ff59 100644 --- a/lib/plugins/usermanager/lang/id/lang.php +++ b/lib/plugins/usermanager/lang/id/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Indonesian language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Irwan Butar Butar <irwansah.putra@gmail.com> * @author Yustinus Waruwu <juswaruwu@gmail.com> */ diff --git a/lib/plugins/usermanager/lang/it/lang.php b/lib/plugins/usermanager/lang/it/lang.php index dfacc6545..6c6789442 100644 --- a/lib/plugins/usermanager/lang/it/lang.php +++ b/lib/plugins/usermanager/lang/it/lang.php @@ -15,6 +15,7 @@ * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> * @author Matteo Pasotti <matteo@xquiet.eu> * @author snarchio@gmail.com + * @author Claudio Lanconelli <lancos@libero.it> */ $lang['menu'] = 'Gestione Utenti'; $lang['noauth'] = '(autenticazione non disponibile)'; @@ -37,6 +38,8 @@ $lang['search'] = 'Cerca'; $lang['search_prompt'] = 'Esegui ricerca'; $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['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'; diff --git a/lib/plugins/usermanager/lang/ja/import.txt b/lib/plugins/usermanager/lang/ja/import.txt index d4f7d08bf..751e515ac 100644 --- a/lib/plugins/usermanager/lang/ja/import.txt +++ b/lib/plugins/usermanager/lang/ja/import.txt @@ -4,7 +4,7 @@ 列の順序:ユーザー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 0830416f3..23109f2a2 100644 --- a/lib/plugins/usermanager/lang/ja/lang.php +++ b/lib/plugins/usermanager/lang/ja/lang.php @@ -54,7 +54,7 @@ $lang['edit_usermissing'] = '選択したユーザーは見つかりませ $lang['user_notify'] = 'ユーザーに通知する'; $lang['note_notify'] = '通知メールは、ユーザーに新たなパスワードが設定された場合のみ送信されます。'; $lang['note_group'] = 'グループを指定しない場合は、既定のグループ(%s)に配属されます。'; -$lang['note_pass'] = 'パスワードを空欄とした場合は、(”ユーザーに通知する”がチェックされていなくとも)自動生成したパスワードの通知がユーザー宛てに送信されます。'; +$lang['note_pass'] = '”ユーザーに通知する”をチェックしてパスワードを空欄にすると、パスワードは自動生成されます。'; $lang['add_ok'] = 'ユーザーを登録しました'; $lang['add_fail'] = 'ユーザーの登録に失敗しました'; $lang['notify_ok'] = '通知メールを送信しました'; diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index 1905fadc2..ac129c95e 100644 --- a/lib/plugins/usermanager/lang/ko/lang.php +++ b/lib/plugins/usermanager/lang/ko/lang.php @@ -10,6 +10,7 @@ * @author erial2@gmail.com * @author Myeongjin <aranet100@gmail.com> * @author Gerrit Uitslag <klapinklapin@gmail.com> + * @author Garam <rowain8@gmail.com> */ $lang['menu'] = '사용자 관리자'; $lang['noauth'] = '(사용자 인증이 불가능합니다)'; @@ -28,9 +29,9 @@ $lang['delete_selected'] = '선택 삭제'; $lang['edit'] = '편집'; $lang['edit_prompt'] = '이 사용자 편집'; $lang['modify'] = '바뀜 저장'; -$lang['search'] = '찾기'; -$lang['search_prompt'] = '찾기 실행'; -$lang['clear'] = '찾기 필터 재설정'; +$lang['search'] = '검색'; +$lang['search_prompt'] = '검색 수행'; +$lang['clear'] = '검색 필터 재설정'; $lang['filter'] = '필터'; $lang['export_all'] = '모든 사용자 목록 내보내기 (CSV)'; $lang['export_filtered'] = '필터된 사용자 목록 내보내기 (CSV)'; @@ -52,7 +53,7 @@ $lang['edit_usermissing'] = '선택된 사용자를 찾을 수 없습니다 $lang['user_notify'] = '사용자에게 알림'; $lang['note_notify'] = '사용자에게 새로운 비밀번호를 준 경우에만 알림 이메일이 보내집니다.'; $lang['note_group'] = '새로운 사용자는 어떤 그룹도 설정하지 않은 경우에 기본 그룹(%s)에 추가됩니다.'; -$lang['note_pass'] = '사용자 통지가 지정되어 있을 때 필드에 아무 값도 입력하지 않으면 비밀번호가 자동으로 만들어집니다.'; +$lang['note_pass'] = '사용자 알림이 지정되어 있을 때 필드에 아무 값도 입력하지 않으면 비밀번호가 자동으로 만들어집니다.'; $lang['add_ok'] = '사용자를 성공적으로 추가했습니다'; $lang['add_fail'] = '사용자 추가를 실패했습니다'; $lang['notify_ok'] = '알림 이메일을 성공적으로 보냈습니다'; @@ -68,5 +69,5 @@ $lang['import_error_badmail'] = '잘못된 이메일 주소'; $lang['import_error_upload'] = '가져오기를 실패했습니다. csv 파일을 올릴 수 없거나 비어 있습니다.'; $lang['import_error_readfail'] = '가져오기를 실패했습니다. 올린 파일을 읽을 수 없습니다.'; $lang['import_error_create'] = '사용자를 만들 수 없습니다.'; -$lang['import_notify_fail'] = '알림 메시지를 가져온 %2$s (이메일: %1$s ) 사용자에게 보낼 수 없습니다.'; +$lang['import_notify_fail'] = '알림 메시지를 가져온 %s (이메일: %s) 사용자에게 보낼 수 없습니다.'; $lang['import_downloadfailures'] = '교정을 위한 CSV로 다운로드 실패'; diff --git a/lib/plugins/usermanager/lang/lb/lang.php b/lib/plugins/usermanager/lang/lb/lang.php deleted file mode 100644 index 59acdf7a8..000000000 --- a/lib/plugins/usermanager/lang/lb/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * lb language file - * - * @author joel@schintgen.net - */ diff --git a/lib/plugins/usermanager/lang/ms/lang.php b/lib/plugins/usermanager/lang/ms/lang.php deleted file mode 100644 index 77ad2a1c1..000000000 --- a/lib/plugins/usermanager/lang/ms/lang.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * Malay language file - * - * @author Markos - */ diff --git a/lib/plugins/usermanager/lang/nl/import.txt b/lib/plugins/usermanager/lang/nl/import.txt index 69d2c2306..267891098 100644 --- a/lib/plugins/usermanager/lang/nl/import.txt +++ b/lib/plugins/usermanager/lang/nl/import.txt @@ -1,7 +1,7 @@ ===== Massa-import van gebruikers ===== Hiervoor is een CSV-bestand nodig van de gebruikers met minstens vier kolommen. De kolommen moeten bevatten, in deze volgorde: gebruikers-id, complete naam, e-mailadres en groepen. -Het CSV-velden moeten worden gescheiden met komma's (,) en de teksten moeten worden omringt met dubbele aanhalingstekens (""). Backslash (\) kan worden gebruikt om te escapen. +Het CSV-velden moeten worden gescheiden met komma's (,) en de teksten moeten worden omringd met dubbele aanhalingstekens (""). Backslash (\) kan worden gebruikt om te escapen. Voor een voorbeeld van een werkend bestand, probeer de "Exporteer Gebruikers" functie hierboven. Dubbele gebruikers-id's zullen worden genegeerd. diff --git a/lib/plugins/usermanager/lang/no/lang.php b/lib/plugins/usermanager/lang/no/lang.php index 7124e4811..83823b2b8 100644 --- a/lib/plugins/usermanager/lang/no/lang.php +++ b/lib/plugins/usermanager/lang/no/lang.php @@ -1,13 +1,14 @@ <?php + /** - * Norwegianlanguage file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Thomas Nygreen <nygreen@gmail.com> * @author Arild Burud <arildb@met.no> * @author Torkill Bruland <torkar-b@online.no> * @author Rune M. Andersen <rune.andersen@gmail.com> * @author Jakob Vad Nielsen (me@jakobnielsen.net) - * @author Kjell Tore Næsgaard <kjell.t.nasgaard@ntnu.no> + * @author Kjell Tore Næsgaard <kjell.t.nasgaard@ntnu.no> * @author Knut Staring <knutst@gmail.com> * @author Lisa Ditlefsen <lisa@vervesearch.com> * @author Erik Pedersen <erik.pedersen@shaw.ca> diff --git a/lib/plugins/usermanager/lang/pl/lang.php b/lib/plugins/usermanager/lang/pl/lang.php index cfc0ba327..2e063d2bb 100644 --- a/lib/plugins/usermanager/lang/pl/lang.php +++ b/lib/plugins/usermanager/lang/pl/lang.php @@ -1,7 +1,8 @@ <?php + /** - * polish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Grzegorz Żur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> diff --git a/lib/plugins/usermanager/lang/pt-br/lang.php b/lib/plugins/usermanager/lang/pt-br/lang.php index 9bb37742a..356d139eb 100644 --- a/lib/plugins/usermanager/lang/pt-br/lang.php +++ b/lib/plugins/usermanager/lang/pt-br/lang.php @@ -20,6 +20,7 @@ * @author Victor Westmann <victor.westmann@gmail.com> * @author Leone Lisboa Magevski <leone1983@gmail.com> * @author Dário Estevão <darioems@gmail.com> + * @author Juliano Marconi Lanigra <juliano.marconi@gmail.com> */ $lang['menu'] = 'Gerenciamento de Usuários'; $lang['noauth'] = '(o gerenciamento de usuários não está disponível)'; @@ -43,6 +44,7 @@ $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['export_filtered'] = 'Exportar lista de Usuários Filtrados (CSV)'; $lang['import'] = 'Importar Novos Usuários'; $lang['line'] = 'Linha Nº.'; $lang['error'] = 'Mensagem de Erro'; @@ -66,6 +68,8 @@ $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_userlistcsv'] = 'Arquivo de lista de usuários (CSV):'; +$lang['import_header'] = 'Importações Mais Recentes - Falhas'; $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.'; @@ -75,3 +79,5 @@ $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.'; +$lang['import_notify_fail'] = 'Mensagem de notificação não pode ser enviada para o usuário importado, %s com email %s.'; +$lang['import_downloadfailures'] = 'Falhas no Download como CSV para correção'; diff --git a/lib/plugins/usermanager/lang/ru/import.txt b/lib/plugins/usermanager/lang/ru/import.txt index 3a25f34ce..dd2b797bc 100644 --- a/lib/plugins/usermanager/lang/ru/import.txt +++ b/lib/plugins/usermanager/lang/ru/import.txt @@ -1,9 +1,9 @@ ===== Импорт нескольких пользователей ===== Потребуется список пользователей в файле формата CSV, состоящий из 4 столбцов. -Столбцы должны быть заполнены следующим образом: user-id, полное имя, эл. почта, группы. -Поля CSV должны быть отделены запятой (,), а строки должны быть заключены в кавычки (""). Обратный слэш используется как прерывание. -В качестве примера можете взять список пользователей, экспортированный через «Экспорт пользователей». +Столбцы должны быть заполнены следующим образом: user-id, полное имя, эл. почта, группы. +Поля CSV должны быть отделены запятой (,), а строки должны быть заключены в кавычки (""). Обратный слэш используется как прерывание. +В качестве примера можете взять список пользователей, экспортированный через «Экспорт пользователей». Повторяющиеся идентификаторы user-id будут игнорироваться. -Пароль доступа будет сгенерирован и отправлен по почте удачно импортированному пользователю.
\ No newline at end of file +Пароль доступа будет сгенерирован и отправлен по почте удачно импортированному пользователю.
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/ru/lang.php b/lib/plugins/usermanager/lang/ru/lang.php index 3102ac32a..83158df31 100644 --- a/lib/plugins/usermanager/lang/ru/lang.php +++ b/lib/plugins/usermanager/lang/ru/lang.php @@ -19,6 +19,7 @@ * @author Johnny Utah <pcpa@cyberpunk.su> * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Pavel <ivanovtsk@mail.ru> + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> */ $lang['menu'] = 'Управление пользователями'; $lang['noauth'] = '(авторизация пользователей недоступна)'; @@ -72,7 +73,7 @@ $lang['import_error_fields'] = 'Не все поля заполнены. На $lang['import_error_baduserid'] = 'Отсутствует идентификатор пользователя'; $lang['import_error_badname'] = 'Имя не годится'; $lang['import_error_badmail'] = 'Адрес электронной почты не годится'; -$lang['import_error_upload'] = 'Импорт не удался. CSV файл не загружен или пуст.'; +$lang['import_error_upload'] = 'Импорт не удался. CSV-файл не загружен или пуст.'; $lang['import_error_readfail'] = 'Импорт не удался. Невозможно прочесть загруженный файл.'; $lang['import_error_create'] = 'Невозможно создать пользователя'; $lang['import_notify_fail'] = 'Оповещение не может быть отправлено импортированному пользователю %s по электронной почте %s.'; diff --git a/lib/plugins/usermanager/lang/sk/lang.php b/lib/plugins/usermanager/lang/sk/lang.php index 9aadbb53a..535f77972 100644 --- a/lib/plugins/usermanager/lang/sk/lang.php +++ b/lib/plugins/usermanager/lang/sk/lang.php @@ -51,7 +51,7 @@ $lang['note_notify'] = 'Notifikačné e-maily iba vtedy, ak dostane u $lang['note_group'] = 'Noví užívatelia budú pridaní do východzej skupiny (%s), ak nie je pre nich špecifikovaná iná skupina.'; $lang['note_pass'] = 'Heslo bude vygenerované automaticky, ak bude pole prázdne a je zapnutá notifikácia používateľa.'; $lang['add_ok'] = 'Používateľ úspešne pridaný'; -$lang['add_fail'] = 'Pridávanie užívateľa nebolo úspešné'; +$lang['add_fail'] = 'Pridanie používateľa bolo neú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):'; diff --git a/lib/plugins/usermanager/lang/sl/lang.php b/lib/plugins/usermanager/lang/sl/lang.php index dc2de375e..a10488e75 100644 --- a/lib/plugins/usermanager/lang/sl/lang.php +++ b/lib/plugins/usermanager/lang/sl/lang.php @@ -8,6 +8,7 @@ * @author Gregor Skumavc (grega.skumavc@gmail.com) * @author Matej Urbančič (mateju@svn.gnome.org) * @author Matej Urbančič <mateju@svn.gnome.org> + * @author matej <mateju@svn.gnome.org> */ $lang['menu'] = 'Upravljanje uporabnikov'; $lang['noauth'] = '(overjanje istovetnosti uporabnikov ni na voljo)'; @@ -30,6 +31,8 @@ $lang['search'] = 'Iskanje'; $lang['search_prompt'] = 'Poišči'; $lang['clear'] = 'Počisti filter iskanja'; $lang['filter'] = 'Filter'; +$lang['export_all'] = 'Izvozi seznam vseh uporabnikov (CSV)'; +$lang['export_filtered'] = 'Izvozi filtriran seznam uporabnikov (CSV)'; $lang['import'] = 'Uvozi nove uporabnike'; $lang['line'] = 'Številka vrstice'; $lang['error'] = 'Sporočilo napake'; @@ -53,6 +56,10 @@ $lang['add_ok'] = 'Uporabnik je uspešno dodan'; $lang['add_fail'] = 'Dodajanje uporabnika je spodletelo'; $lang['notify_ok'] = 'Obvestilno sporočilo je poslano.'; $lang['notify_fail'] = 'Obvestilnega sporočila ni mogoče poslati.'; +$lang['import_userlistcsv'] = 'Datoteka seznama uporabnikov (CSV)'; +$lang['import_header'] = 'Zadnji uvoz podatkov – napake'; +$lang['import_success_count'] = 'Uvoz uporabnikov: %d najdenih, %d uspešno uvoženih.'; +$lang['import_failure_count'] = 'Uvoz uporabnikov: %d spodletelih. Napake so izpisane spodaj.'; $lang['import_error_fields'] = 'Neustrezno število polj; najdenih je %d, zahtevana pa so 4.'; $lang['import_error_baduserid'] = 'Manjka ID uporabnika'; $lang['import_error_badname'] = 'Napačno navedeno ime'; @@ -61,3 +68,4 @@ $lang['import_error_upload'] = 'Uvoz je spodletel. Datoteke CSV ni mogoče nal $lang['import_error_readfail'] = 'Uvoz je spodletel. Ni mogoče prebrati vsebine datoteke.'; $lang['import_error_create'] = 'Ni mogoče ustvariti računa uporabnika'; $lang['import_notify_fail'] = 'Obvestilnega sporočila za uvoženega uporabnika %s z elektronskim naslovom %s ni mogoče poslati.'; +$lang['import_downloadfailures'] = 'Prejmi podatke o napakah v datoteki CSV'; diff --git a/lib/plugins/usermanager/lang/tr/lang.php b/lib/plugins/usermanager/lang/tr/lang.php index 7ddb7dd5d..6329803a8 100644 --- a/lib/plugins/usermanager/lang/tr/lang.php +++ b/lib/plugins/usermanager/lang/tr/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Turkish language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Aydın Coşkuner <aydinweb@gmail.com> * @author Cihan Kahveci <kahvecicihan@gmail.com> * @author Yavuz Selim <yavuzselim@gmail.com> diff --git a/lib/plugins/usermanager/lang/vi/lang.php b/lib/plugins/usermanager/lang/vi/lang.php deleted file mode 100644 index 2933d8875..000000000 --- a/lib/plugins/usermanager/lang/vi/lang.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php -/** - * Vietnamese language file - * - */ diff --git a/lib/plugins/usermanager/lang/zh-tw/import.txt b/lib/plugins/usermanager/lang/zh-tw/import.txt new file mode 100644 index 000000000..a6bb5f6ef --- /dev/null +++ b/lib/plugins/usermanager/lang/zh-tw/import.txt @@ -0,0 +1,9 @@ +===== 批次匯入使用者 ===== + +需提供 CSV 格式的使用者列表檔案(UTF-8 編碼)。 +每列至少 4 欄,依序為:帳號、姓名、電郵、群組。 +各欄以半形逗號 (,) 分隔,有半形逗號的字串可用半形雙引號 ("") 分開,引號可用反斜線 (\) 跳脫。 +重複的使用者帳號會自動忽略。 +如需要範例檔案,可用上面的「匯出使用者」取得。 + +系統會為成功匯入的使用者產生密碼並寄信通知。 diff --git a/lib/plugins/usermanager/lang/zh-tw/lang.php b/lib/plugins/usermanager/lang/zh-tw/lang.php index c7126bd1a..3fb6b6712 100644 --- a/lib/plugins/usermanager/lang/zh-tw/lang.php +++ b/lib/plugins/usermanager/lang/zh-tw/lang.php @@ -9,21 +9,26 @@ * @author Wayne San <waynesan@zerozone.tw> * @author Li-Jiun Huang <ljhuang.tw@gmai.com> * @author Cheng-Wei Chien <e.cwchien@gmail.com> - * @author Danny Lin <danny0838@pchome.com.tw> * @author Shuo-Ting Jian <shoting@gmail.com> * @author syaoranhinata@gmail.com * @author Ichirou Uchiki <syaoranhinata@gmail.com> * @author tsangho <ou4222@gmail.com> + * @author Danny Lin <danny0838@gmail.com> */ $lang['menu'] = '帳號管理器'; + +// custom language strings for the plugin $lang['noauth'] = '(帳號認證尚未開放)'; $lang['nosupport'] = '(尚不支援帳號管理)'; + $lang['badauth'] = '錯誤的認證機制'; + $lang['user_id'] = '帳號'; $lang['user_pass'] = '密碼'; $lang['user_name'] = '名稱'; $lang['user_mail'] = '電郵'; $lang['user_groups'] = '群組'; + $lang['field'] = '欄位'; $lang['value'] = '設定值'; $lang['add'] = '增加'; @@ -36,8 +41,12 @@ $lang['search'] = '搜尋'; $lang['search_prompt'] = '開始搜尋'; $lang['clear'] = '重設篩選條件'; $lang['filter'] = '篩選條件 (Filter)'; -$lang['import'] = '匯入新的用戶'; +$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 個帳號'; @@ -45,10 +54,13 @@ $lang['delete_fail'] = '%d 個帳號無法刪除。'; $lang['update_ok'] = '已更新該帳號'; $lang['update_fail'] = '無法更新該帳號'; $lang['update_exists'] = '無法變更帳號名稱 (%s) ,因為有同名帳號存在。其他修改則已套用。'; + $lang['start'] = '開始'; $lang['prev'] = '上一頁'; $lang['next'] = '下一頁'; $lang['last'] = '最後一頁'; + +// added after 2006-03-09 release $lang['edit_usermissing'] = '找不到選取的帳號,可能已被刪除或改為其他名稱。'; $lang['user_notify'] = '通知使用者'; $lang['note_notify'] = '通知信只會在指定使用者新密碼時寄送。'; @@ -58,4 +70,18 @@ $lang['add_ok'] = '已新增使用者'; $lang['add_fail'] = '無法新增使用者'; $lang['notify_ok'] = '通知信已寄出'; $lang['notify_fail'] = '通知信無法寄出'; -$lang['import_error_readfail'] = '會入錯誤,無法讀取已經上傳的檔案'; + +// import & errors +$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'] = '使用者帳號遺失'; +$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/zh/import.txt b/lib/plugins/usermanager/lang/zh/import.txt new file mode 100644 index 000000000..eacce5a77 --- /dev/null +++ b/lib/plugins/usermanager/lang/zh/import.txt @@ -0,0 +1,7 @@ +===== 批量导入用户 ===== + +需要至少有 4 列的 CSV 格式用户列表文件。列必须按顺序包括:用户ID、全名、电子邮件地址和组。 +CSV 域需要用逗号 (,) 分隔,字符串用英文双引号 ("") 分开。反斜杠可以用来转义。 +可以尝试上面的“导入用户”功能来查看示例文件。重复的用户ID将被忽略。 + +密码生成后会通过电子邮件发送给每个成功导入的用户。
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/zh/lang.php b/lib/plugins/usermanager/lang/zh/lang.php index 2674983b2..b833c6ce4 100644 --- a/lib/plugins/usermanager/lang/zh/lang.php +++ b/lib/plugins/usermanager/lang/zh/lang.php @@ -16,6 +16,8 @@ * @author lainme993@gmail.com * @author Shuo-Ting Jian <shoting@gmail.com> * @author Rachel <rzhang0802@gmail.com> + * @author Yangyu Huang <yangyu.huang@gmail.com> + * @author oott123 <ip.192.168.1.1@qq.com> */ $lang['menu'] = '用户管理器'; $lang['noauth'] = '(用户认证不可用)'; @@ -38,6 +40,8 @@ $lang['search'] = '搜索'; $lang['search_prompt'] = '进行搜索'; $lang['clear'] = '重置搜索过滤器'; $lang['filter'] = '过滤器'; +$lang['export_all'] = '导出所有用户(CSV)'; +$lang['export_filtered'] = '导出已筛选的用户列表(CSV)'; $lang['import'] = '请输入新用户名'; $lang['line'] = '行号'; $lang['error'] = '信息错误'; @@ -61,7 +65,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'] = '域的数目不足,发现 %d 个,需要 4 个。'; $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的错误信息以修正。'; |