From e0c26282a603881e8d2f839d94c28dbbfc57d71b Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 29 Sep 2014 03:34:17 +0200 Subject: scrutinizer documentations issues --- lib/plugins/authldap/auth.php | 16 +++++++--------- lib/plugins/authmysql/auth.php | 5 ++--- lib/plugins/authpgsql/auth.php | 2 +- lib/plugins/info/syntax.php | 2 +- 4 files changed, 11 insertions(+), 14 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index b22b82ecc..a94c7a357 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -564,15 +564,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * Wraps around ldap_search, ldap_list or ldap_read depending on $scope * * @author Andreas Gohr - * @param resource $link_identifier - * @param string $base_dn - * @param string $filter - * @param string $scope can be 'base', 'one' or 'sub' - * @param null $attributes - * @param int $attrsonly - * @param int $sizelimit - * @param int $timelimit - * @param int $deref + * @param resource $link_identifier + * @param string $base_dn + * @param string $filter + * @param string $scope can be 'base', 'one' or 'sub' + * @param null|array $attributes + * @param int $attrsonly + * @param int $sizelimit * @return resource */ protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null, diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 95c62f636..176eac679 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -284,7 +284,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $grpdel = array_diff($groups, $changes['grps']); foreach($grpadd as $group) { - if(($this->_addUserToGroup($user, $group, 1)) == false) { + if(($this->_addUserToGroup($user, $group, true)) == false) { $rc = false; } } @@ -612,7 +612,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { if($uid) { foreach($grps as $group) { - $gid = $this->_addUserToGroup($user, $group, 1); + $gid = $this->_addUserToGroup($user, $group, true); if($gid === false) break; } @@ -777,7 +777,6 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * * @param string $user user's nick being updated * @param array $changes array of items to change as pairs of item and value - * @param mixed $uid user id of dataset to change, must be unique in DB * @return bool true on success or false on error * * @author Matthias Grimm diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php index 99f3ed443..4f5e3346f 100644 --- a/lib/plugins/authpgsql/auth.php +++ b/lib/plugins/authpgsql/auth.php @@ -265,7 +265,7 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { if($uid) { foreach($grps as $group) { - $gid = $this->_addUserToGroup($user, $group, 1); + $gid = $this->_addUserToGroup($user, $group, true); if($gid === false) break; } diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php index 9265f44d5..3e3f6b733 100644 --- a/lib/plugins/info/syntax.php +++ b/lib/plugins/info/syntax.php @@ -255,7 +255,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { if (($level >= $conf['toptoclevel']) && ($level <= $conf['maxtoclevel'])){ /** @var $renderer Doku_Renderer_xhtml */ - $hid = $renderer->_headerToLink($text, 'true'); + $hid = $renderer->_headerToLink($text, true); $renderer->toc[] = array( 'hid' => $hid, 'title' => $text, -- cgit v1.2.3 From 59bc3b48fdffb76ee65a4b630be3ffa1f6c20c80 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 29 Sep 2014 21:45:27 +0200 Subject: more scrutinizer issue improvements --- lib/plugins/acl/admin.php | 6 +++--- lib/plugins/acl/remote.php | 2 ++ lib/plugins/auth.php | 5 ++++- lib/plugins/authad/adLDAP/adLDAP.php | 2 -- lib/plugins/authad/auth.php | 1 + lib/plugins/authldap/auth.php | 1 + lib/plugins/authmysql/auth.php | 2 +- lib/plugins/config/settings/config.class.php | 4 +++- lib/plugins/config/settings/extra.class.php | 7 ++++--- lib/plugins/info/syntax.php | 13 +++++++++---- lib/plugins/usermanager/admin.php | 6 ++++-- 11 files changed, 32 insertions(+), 17 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index ebb097a04..814bbfe9c 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -762,6 +762,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { */ function _html_select(){ $inlist = false; + $usel = ''; + $gsel = ''; if($this->who && !in_array($this->who,$this->usersgroups) && @@ -770,11 +772,9 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { if($this->who{0} == '@'){ $gsel = ' selected="selected"'; }else{ - $usel = ' selected="selected"'; + $usel = ' selected="selected"'; } }else{ - $usel = ''; - $gsel = ''; $inlist = true; } diff --git a/lib/plugins/acl/remote.php b/lib/plugins/acl/remote.php index 6d5201cf6..2fdc697db 100644 --- a/lib/plugins/acl/remote.php +++ b/lib/plugins/acl/remote.php @@ -18,11 +18,13 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin { } function addAcl($scope, $user, $level){ + /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); return $apa->_acl_add($scope, $user, $level); } function delAcl($scope, $user){ + /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); return $apa->_acl_del($scope, $user); } diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index b38b591a3..0d6ea2fa3 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -124,8 +124,11 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { 'modify' => 'modifyUser', 'delete' => 'deleteUsers' ); - if(empty($validTypes[$type])) + if(empty($validTypes[$type])) { return false; + } + + $result = false; $eventdata = array('type' => $type, 'params' => $params, 'modification_result' => null); $evt = new Doku_Event('AUTH_USER_CHANGE', $eventdata); if($evt->advise_before(true)) { diff --git a/lib/plugins/authad/adLDAP/adLDAP.php b/lib/plugins/authad/adLDAP/adLDAP.php index c1f92abe2..5563e4fe9 100644 --- a/lib/plugins/authad/adLDAP/adLDAP.php +++ b/lib/plugins/authad/adLDAP/adLDAP.php @@ -947,5 +947,3 @@ class adLDAP { * } */ class adLDAPException extends Exception {} - -?> \ No newline at end of file diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index a3119dda6..65f0b1647 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -203,6 +203,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { } //general user info + $info = array(); $info['name'] = $result[0]['displayname'][0]; $info['mail'] = $result[0]['mail'][0]; $info['uid'] = $result[0]['samaccountname'][0]; diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index a94c7a357..fd4729331 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -181,6 +181,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } } + $info = array(); $info['user'] = $user; $info['server'] = $this->getConf('server'); diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 176eac679..0605a3bf1 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -366,7 +366,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * * @param int $first index of first user to be returned * @param int $limit max number of users to be returned - * @param array|string $filter array of field/pattern pairs + * @param array $filter array of field/pattern pairs * @return array userinfo (refer getUserData for internal userinfo details) */ public function retrieveUsers($first = 0, $limit = 0, $filter = array()) { diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 8dae23110..30e7a2133 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -775,6 +775,7 @@ if (!class_exists('setting_email')) { * update setting with user provided value $input * if value fails error check, save it * + * @param mixed $input * @return boolean true if changed, false otherwise (incl. on error) */ function update($input) { @@ -925,6 +926,7 @@ if (!class_exists('setting_onoff')) { if (!class_exists('setting_multichoice')) { class setting_multichoice extends setting_string { var $_choices = array(); + var $lang; //some custom language strings are stored in setting function html(&$plugin, $echo = false) { $value = ''; @@ -1125,7 +1127,7 @@ if (!class_exists('setting_multicheckbox')) { // handle any remaining values $other = join(',',$value); - $class = (count($default == count($value)) && (count($value) == count(array_intersect($value,$default)))) ? + $class = ((count($default) == count($value)) && (count($value) == count(array_intersect($value,$default)))) ? " selectiondefault" : ""; $input .= '
'."\n"; diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index 83de802a3..02171fb77 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -122,7 +122,7 @@ if (!class_exists('setting_disableactions')) { // make some language adjustments (there must be a better way) // transfer some DokuWiki language strings to the plugin - if (!$plugin->localised) $this->setupLocale(); + if (!$plugin->localised) $plugin->setupLocale(); $plugin->lang[$this->_key.'_revisions'] = $lang['btn_revs']; foreach ($this->_choices as $choice) @@ -159,7 +159,7 @@ if (!class_exists('setting_license')) { foreach($license as $key => $data){ $this->_choices[] = $key; - $this->lang[$this->_key.'_o_'.$key] = $data['name']; + $this->lang[$this->_key.'_o_'.$key] = $data['name']; // stored in setting } parent::initialize($default,$local,$protected); @@ -171,6 +171,7 @@ if (!class_exists('setting_license')) { if (!class_exists('setting_renderer')) { class setting_renderer extends setting_multichoice { var $_prompts = array(); + var $_format = null; function initialize($default,$local,$protected) { $format = $this->_format; @@ -192,7 +193,7 @@ if (!class_exists('setting_renderer')) { // make some language adjustments (there must be a better way) // transfer some plugin names to the config plugin - if (!$plugin->localised) $this->setupLocale(); + if (!$plugin->localised) $plugin->setupLocale(); foreach ($this->_choices as $choice) { if (!isset($plugin->lang[$this->_key.'_o_'.$choice])) { diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php index 3e3f6b733..fc0e1af9d 100644 --- a/lib/plugins/info/syntax.php +++ b/lib/plugins/info/syntax.php @@ -104,7 +104,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * * uses some of the original renderer methods */ - function _plugins_xhtml($type, Doku_Renderer &$renderer){ + function _plugins_xhtml($type, Doku_Renderer_xhtml $renderer){ global $lang; $renderer->doc .= '
    '; @@ -142,7 +142,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * * uses some of the original renderer methods */ - function _helpermethods_xhtml(Doku_Renderer &$renderer){ + function _helpermethods_xhtml(Doku_Renderer_xhtml $renderer){ $plugins = plugin_list('helper'); foreach($plugins as $p){ if (!$po = plugin_load('helper',$p)) continue; @@ -249,12 +249,17 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * Adds a TOC item + * + * @param string $text + * @param int $level + * @param Doku_Renderer_xhtml $renderer + * @return string */ - function _addToTOC($text, $level, Doku_Renderer &$renderer){ + protected function _addToTOC($text, $level, Doku_Renderer_xhtml $renderer){ global $conf; + $hid = ''; 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/usermanager/admin.php b/lib/plugins/usermanager/admin.php index b67d91b36..c568469a7 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -738,6 +738,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { global $auth; global $INPUT; + $user = array(); $user[0] = ($clean) ? $auth->cleanUser($INPUT->str('userid')) : $INPUT->str('userid'); $user[1] = $INPUT->str('userpass'); $user[2] = $INPUT->str('username'); @@ -764,7 +765,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $this->_filter = array(); if ($op == 'new') { - list($user,$pass,$name,$mail,$grps) = $this->_retrieveUser(false); + list($user,/* $pass */,$name,$mail,$grps) = $this->_retrieveUser(false); if (!empty($user)) $this->_filter['user'] = $user; if (!empty($name)) $this->_filter['name'] = $name; @@ -816,6 +817,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $disabled = 'disabled="disabled"'; + $buttons = array(); $buttons['start'] = $buttons['prev'] = ($this->_start == 0) ? $disabled : ''; if ($this->_user_total == -1) { @@ -951,7 +953,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $INPUT->set('usergroups', $candidate[4]); $cleaned = $this->_retrieveUser(); - list($user,$pass,$name,$mail,$grps) = $cleaned; + list($user,/* $pass */,$name,$mail,/* $grps */) = $cleaned; if (empty($user)) { $error = $this->lang['import_error_baduserid']; return false; -- cgit v1.2.3 From 9d7d72dc83bc9b2cb23ec14fdc83c0c665e8039d Mon Sep 17 00:00:00 2001 From: Davor Turkalj Date: Tue, 30 Sep 2014 22:26:03 +0200 Subject: translation update --- lib/plugins/extension/lang/hr/lang.php | 20 ++++++++++---------- lib/plugins/usermanager/lang/hr/lang.php | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/hr/lang.php b/lib/plugins/extension/lang/hr/lang.php index 4905fe864..f43defcb1 100644 --- a/lib/plugins/extension/lang/hr/lang.php +++ b/lib/plugins/extension/lang/hr/lang.php @@ -6,24 +6,24 @@ * @author Davor Turkalj */ $lang['menu'] = 'Upravitelj dodataka'; -$lang['tab_plugins'] = 'Instalirani dodatci'; -$lang['tab_templates'] = 'Instalirani predlošci'; -$lang['tab_search'] = 'Potraži i instaliraj'; -$lang['tab_install'] = 'Ručno instaliranje'; +$lang['tab_plugins'] = 'Ugrađeni dodatci'; +$lang['tab_templates'] = 'Ugrađeni predlošci'; +$lang['tab_search'] = 'Potraži i ugradi'; +$lang['tab_install'] = 'Ručna ugradnja'; $lang['notimplemented'] = 'Ova mogućnost još nije napravljena'; -$lang['notinstalled'] = 'Dodatak nije instaliran'; +$lang['notinstalled'] = 'Dodatak nije ugrađen'; $lang['alreadyenabled'] = 'Ovaj dodatak je već omogućen'; $lang['alreadydisabled'] = 'Ovaj dodatak je već onemogućen'; $lang['pluginlistsaveerror'] = 'Dogodila se greška pri snimanju liste dodataka'; $lang['unknownauthor'] = 'Nepoznat autor'; $lang['unknownversion'] = 'Nepoznata inačica'; $lang['btn_info'] = 'Prikaži više informacija'; -$lang['btn_update'] = 'Dopuni'; +$lang['btn_update'] = 'Dogradi'; $lang['btn_uninstall'] = 'Ukloni'; $lang['btn_enable'] = 'Omogući'; $lang['btn_disable'] = 'Onemogući'; -$lang['btn_install'] = 'Postavi'; -$lang['btn_reinstall'] = 'Ponovno postavi'; +$lang['btn_install'] = 'Ugradi'; +$lang['btn_reinstall'] = 'Ponovno ugradi'; $lang['js']['reallydel'] = 'Zaista ukloniti ovo proširenje?'; $lang['search_for'] = 'Pretraži proširenja'; $lang['search'] = 'Pretraži'; @@ -34,11 +34,11 @@ $lang['homepage_link'] = 'Upute'; $lang['bugs_features'] = 'Greške'; $lang['tags'] = 'Oznake:'; $lang['author_hint'] = 'Potraži dodatke od ovog autora'; -$lang['installed'] = 'Postavljeno:'; +$lang['installed'] = 'Ugrađeno:'; $lang['downloadurl'] = 'URL adresa preuzimanja:'; $lang['repository'] = 'Repozitorij:'; $lang['unknown'] = 'nepoznat'; -$lang['installed_version'] = 'Postavljena inačica:'; +$lang['installed_version'] = 'Ugrađena inačica:'; $lang['install_date'] = 'Vaše zadnje osvježavanje:'; $lang['available_version'] = 'Dostupna inačica'; $lang['compatible'] = 'Kompatibilan s:'; diff --git a/lib/plugins/usermanager/lang/hr/lang.php b/lib/plugins/usermanager/lang/hr/lang.php index 80613ed6f..a71afb60a 100644 --- a/lib/plugins/usermanager/lang/hr/lang.php +++ b/lib/plugins/usermanager/lang/hr/lang.php @@ -33,7 +33,7 @@ $lang['line'] = 'Linija br.'; $lang['error'] = 'Poruka o grešci'; $lang['summary'] = 'Prikaz korisnika %1$d-%2$d od %3$d nađenih. Ukupno %4$d korisnika.'; $lang['nonefound'] = 'Nema korisnika koji odgovaraju filtru.Ukupno %d korisnika.'; -$lang['delete_ok'] = '%d korisnik obrisano'; +$lang['delete_ok'] = '%d korisnika obrisano'; $lang['delete_fail'] = '%d neuspjelih brisanja.'; $lang['update_ok'] = 'Korisnik uspješno izmijenjen'; $lang['update_fail'] = 'Neuspjela izmjena korisnika'; @@ -49,7 +49,7 @@ $lang['note_group'] = 'Novi korisnik biti će dodijeljen u podrazumij $lang['note_pass'] = 'Lozinka će biti generirana ako se polje ostavi prazno i obavješćivanje korisnika je omogućeno.'; $lang['add_ok'] = 'Korisnik uspješno dodan'; $lang['add_fail'] = 'Neuspješno dodavanje korisnika'; -$lang['notify_ok'] = 'Obavijest korisniku poslana'; +$lang['notify_ok'] = 'Poslana obavijest korisniku'; $lang['notify_fail'] = 'Obavijest korisniku ne može biti poslana'; $lang['import_userlistcsv'] = 'Datoteka s popisom korisnika (CSV):'; $lang['import_header'] = 'Zadnje greške pri uvozu'; -- cgit v1.2.3 From 42ea7f447f39fbc2f79eaaec31f8c10ede59c5d0 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 1 Oct 2014 11:30:27 +0200 Subject: Many PHPDocs, some unused and dyn declared vars many PHPDocs some unused variables some dynamically declared variables declared --- lib/plugins/acl/remote.php | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/remote.php b/lib/plugins/acl/remote.php index 2fdc697db..b10c544ee 100644 --- a/lib/plugins/acl/remote.php +++ b/lib/plugins/acl/remote.php @@ -1,7 +1,16 @@ array( 'args' => array('string','string','int'), @@ -17,13 +26,28 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin { ); } - function addAcl($scope, $user, $level){ + /** + * Add a new entry to ACL config + * + * @param string $scope + * @param string $user + * @param int $level see also inc/auth.php + * @return bool + */ + public function addAcl($scope, $user, $level){ /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); return $apa->_acl_add($scope, $user, $level); } - function delAcl($scope, $user){ + /** + * Remove an entry from ACL config + * + * @param string $scope + * @param string $user + * @return bool + */ + public function delAcl($scope, $user){ /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); return $apa->_acl_del($scope, $user); -- cgit v1.2.3 From aecab027b93163e5323c66056fa5da665beef091 Mon Sep 17 00:00:00 2001 From: Rainbow Spike Date: Wed, 1 Oct 2014 21:06:29 +1100 Subject: Update lang.php Microfix --- lib/plugins/extension/lang/ru/lang.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php index fa1625f28..7fb39b3e9 100644 --- a/lib/plugins/extension/lang/ru/lang.php +++ b/lib/plugins/extension/lang/ru/lang.php @@ -25,7 +25,7 @@ $lang['js']['reallydel'] = 'Действительно удалить эт $lang['search_for'] = 'Поиск дополнения:'; $lang['search'] = 'Найти'; $lang['extensionby'] = '%s — %s'; -$lang['popularity'] = 'Попоулярность: %s%%'; +$lang['popularity'] = 'Популярность: %s%%'; $lang['bugs_features'] = 'Ошибки'; $lang['tags'] = 'Метки:'; $lang['author_hint'] = 'Найти дополнения этого автора'; @@ -46,23 +46,23 @@ $lang['repo_retry'] = 'Повторить'; $lang['status_installed'] = 'установлено'; $lang['status_not_installed'] = 'не установлено'; $lang['status_protected'] = 'защищено'; -$lang['status_enabled'] = 'включен'; +$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_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['noperms'] = 'Папка для расширений не доступна на запись'; -$lang['notplperms'] = 'Папка для шаблонов не доступна на запись'; -$lang['nopluginperms'] = 'Папка плагинов не доступна на запись'; +$lang['noperms'] = 'Папка для расширений не доступна для записи'; +$lang['notplperms'] = 'Папка для шаблонов не доступна для записи'; +$lang['nopluginperms'] = 'Папка плагинов не доступна для записи'; $lang['git'] = 'Это расширение было установлено через git, Вы не можете обновить его тут.'; $lang['install_url'] = 'Установить с адреса URL:'; $lang['install_upload'] = 'Скачать расширение:'; -$lang['repo_error'] = 'Сайт с плагинами недоступен. Убедитесь, что у сайта есть доступ на www.dokuwiki.org и также проверьте настройки соединения прокси.'; +$lang['repo_error'] = 'Сайт с плагинами недоступен. Убедитесь, что у сайта есть доступ на www.dokuwiki.org, а также проверьте настройки соединения с Интернет.'; -- cgit v1.2.3 From 253d4b48ec708eb42033862dc15c8576f44a48ed Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 1 Oct 2014 15:32:05 +0200 Subject: more PHPDocs, unused var, small bit code reformatting --- lib/plugins/auth.php | 4 +- lib/plugins/authad/auth.php | 7 +- lib/plugins/authmysql/auth.php | 12 +- lib/plugins/authpgsql/auth.php | 9 +- lib/plugins/authplain/auth.php | 2 +- lib/plugins/config/admin.php | 45 +++++- lib/plugins/config/settings/config.class.php | 208 ++++++++++++++++++++++++--- lib/plugins/config/settings/extra.class.php | 96 +++++++++++++ lib/plugins/extension/helper/extension.php | 8 +- lib/plugins/extension/helper/list.php | 1 - lib/plugins/info/syntax.php | 23 ++- lib/plugins/popularity/helper.php | 13 ++ lib/plugins/syntax.php | 7 +- lib/plugins/usermanager/admin.php | 28 +++- 14 files changed, 416 insertions(+), 47 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index 0d6ea2fa3..021bc5d4b 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -116,7 +116,7 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * @author Gabriel Birke * @param string $type Modification type ('create', 'modify', 'delete') * @param array $params Parameters for the createUser, modifyUser or deleteUsers method. The content of this array depends on the modification type - * @return mixed Result from the modification function or false if an event handler has canceled the action + * @return bool|null|int Result from the modification function or false if an event handler has canceled the action */ public function triggerUserMod($type, $params) { $validTypes = array( @@ -238,7 +238,7 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * @author Andreas Gohr * @param string $user the user name * @param bool $requireGroups whether or not the returned data must include groups - * @return array containing user data or false + * @return false|array containing user data or false */ public function getUserData($user, $requireGroups=true) { if(!$this->cando['external']) msg("no valid authorisation system in use", -1); diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 65f0b1647..88b56046c 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -329,6 +329,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * Bulk retrieval of user data * * @author Dominik Eckelmann + * * @param int $start index of first user to be returned * @param int $limit max number of users to be returned * @param array $filter array of field/pattern pairs, null for no filter @@ -447,7 +448,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { /** * Get the domain part from a user * - * @param $user + * @param string $user * @return string */ public function _userDomain($user) { @@ -458,7 +459,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { /** * Get the user part from a user * - * @param $user + * @param string $user * @return string */ public function _userName($user) { @@ -544,6 +545,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * The patterns are set up with $this->_constructPattern() * * @author Chris Smith + * * @param string $user * @param array $info * @return bool @@ -565,6 +567,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * Create a pattern for $this->_filter() * * @author Chris Smith + * * @param array $filter */ protected function _constructPattern($filter) { diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 0605a3bf1..0d423b6c9 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -115,7 +115,8 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * Check if the given config strings are set * * @author Matthias Grimm - * @param array $keys + * + * @param string[] $keys * @param bool $wop is this a check for a write operation? * @return bool */ @@ -668,7 +669,6 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * * @param string $user username of the user whose data is to be removed from the cache * if null, empty the whole cache - * @return none */ protected function _flushUserInfoCache($user=null) { if (is_null($user)) { @@ -750,7 +750,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @author Matthias Grimm * * @param string $user user's nick to get data for - * @return bool|array false on error, user info on success + * @return false|array false on error, user info on success */ protected function _retrieveUserInfo($user) { $sql = str_replace('%{user}', $this->_escape($user), $this->getConf('getUserInfo')); @@ -837,7 +837,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @author Matthias Grimm * * @param string $group group name which id is desired - * @return mixed group id + * @return false|string group id */ protected function _getGroupID($group) { if($this->dbcon) { @@ -910,7 +910,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @author Matthias Grimm * * @param string $query SQL string that contains the query - * @return array with the result table + * @return array|false with the result table */ protected function _queryDB($query) { if($this->getConf('debug') >= 2) { @@ -1001,6 +1001,8 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * abrogated. * * @author Matthias Grimm + * + * @return bool */ protected function _unlockTables() { if($this->dbcon) { diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php index 4f5e3346f..06590fedd 100644 --- a/lib/plugins/authpgsql/auth.php +++ b/lib/plugins/authpgsql/auth.php @@ -104,7 +104,7 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { * * @author Matthias Grimm * - * @param array $keys + * @param string[] $keys * @param bool $wop * @return bool */ @@ -340,7 +340,7 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { * @author Matthias Grimm * * @param string $query SQL string that contains the query - * @return array the result table + * @return array|false the result table */ protected function _queryDB($query) { $resultarray = array(); @@ -363,6 +363,9 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { * MySQL one because it does NOT return the last insertID * * @author Andreas Gohr + * + * @param string $query + * @return bool */ protected function _modifyDB($query) { if($this->dbcon) { @@ -396,6 +399,8 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { * Commit a transaction * * @author Matthias Grimm + * + * @return bool */ protected function _unlockTables() { if($this->dbcon) { diff --git a/lib/plugins/authplain/auth.php b/lib/plugins/authplain/auth.php index b3ca988b9..1ea75b100 100644 --- a/lib/plugins/authplain/auth.php +++ b/lib/plugins/authplain/auth.php @@ -77,7 +77,7 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @author Andreas Gohr * @param string $user * @param bool $requireGroups (optional) ignored by this plugin, grps info always supplied - * @return array|bool + * @return array|false */ public function getUserData($user, $requireGroups=true) { if($this->users === null) $this->_loadUserData(); diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index 835d27775..9202a221b 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -32,6 +32,9 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { var $_session_started = false; var $_localised_prompts = false; + /** + * @return int + */ function getMenuSort() { return 100; } /** @@ -40,14 +43,20 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { function handle() { global $ID, $INPUT; - if (!$this->_restore_session()) return $this->_close_session(); - if ($INPUT->int('save') != 1) return $this->_close_session(); - if (!checkSecurityToken()) return $this->_close_session(); + if(!$this->_restore_session() || $INPUT->int('save') != 1 || !checkSecurityToken()) { + $this->_close_session(); + return; + } - if (is_null($this->_config)) { $this->_config = new configuration($this->_file); } + if(is_null($this->_config)) { + $this->_config = new configuration($this->_file); + } // don't go any further if the configuration is locked - if ($this->_config->_locked) return $this->_close_session(); + if($this->_config->locked) { + $this->_close_session(); + return; + } $this->_input = $INPUT->arr('config'); @@ -104,6 +113,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { formSecurityToken(); $this->_print_h1('dokuwiki_settings', $this->getLang('_header_dokuwiki')); + /** @var setting[] $undefined_settings */ $undefined_settings = array(); $in_fieldset = false; $first_plugin_fieldset = true; @@ -162,7 +172,17 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { // show undefined settings list if ($allow_debug && !empty($undefined_settings)) { - function _setting_natural_comparison($a, $b) { return strnatcmp($a->_key, $b->_key); } + /** + * Callback for sorting settings + * + * @param setting $a + * @param setting $b + * @return int if $a is lower/equal/higher than $b + */ + function _setting_natural_comparison($a, $b) { + return strnatcmp($a->_key, $b->_key); + } + usort($undefined_settings, '_setting_natural_comparison'); $this->_print_h1('undefined_settings', $this->getLang('_header_undefined')); ptln('
    '); @@ -235,6 +255,9 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { if ($this->_session_started) session_write_close(); } + /** + * @param bool $prompts + */ function setupLocale($prompts=false) { parent::setupLocale(); @@ -245,6 +268,9 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { } + /** + * @return bool + */ function _setup_localised_plugin_prompts() { global $conf; @@ -299,6 +325,8 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { * Generates a two-level table of contents for the config plugin. * * @author Ben Coburn + * + * @return array */ function getTOC() { if (is_null($this->_config)) { $this->_config = new configuration($this->_file); } @@ -328,6 +356,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { $t[] = html_mktocitem('configuration_manager', $this->getLang('_configuration_manager'), 1); $t[] = html_mktocitem('dokuwiki_settings', $this->getLang('_header_dokuwiki'), 1); + /** @var setting $setting */ foreach($toc['conf'] as $setting) { $name = $setting->prompt($this); $t[] = html_mktocitem($setting->_key, $name, 2); @@ -352,6 +381,10 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { return $t; } + /** + * @param string $id + * @param string $text + */ function _print_h1($id, $text) { ptln('

    '.$text.'

    '); } diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 30e7a2133..cbf6ea452 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -10,7 +10,9 @@ if(!defined('CM_KEYMARKER')) define('CM_KEYMARKER','____'); if (!class_exists('configuration')) { - + /** + * Class configuration + */ class configuration { var $_name = 'conf'; // name of the config variable found in the files (overridden by $config['varname']) @@ -151,6 +153,8 @@ if (!class_exists('configuration')) { /** * Update last modified time stamp of the config file + * + * @return bool */ public function touch_settings(){ if ($this->locked) return false; @@ -285,6 +289,10 @@ if (!class_exists('configuration')) { /** * not used ... conf's contents are an array! * reduce any multidimensional settings to one dimension using CM_KEYMARKER + * + * @param $conf + * @param string $prefix + * @return array */ protected function _flatten($conf,$prefix='') { @@ -403,6 +411,9 @@ if (!class_exists('configuration')) { } if (!class_exists('setting')) { + /** + * Class setting + */ class setting { var $_key = ''; @@ -452,7 +463,7 @@ if (!class_exists('setting')) { * - if changed value passes error check, set $this->_local to the new value * * @param mixed $input the new value - * @return boolean true if changed, false otherwise (incl. on error) + * @return boolean true if changed, false otherwise (also on error) */ public function update($input) { if (is_null($input)) return false; @@ -476,10 +487,9 @@ if (!class_exists('setting')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array(string $label_html, string $input_html) + * @return array with content array(string $label_html, string $input_html) */ public function html(&$plugin, $echo=false) { - $value = ''; $disable = ''; if ($this->is_protected()) { @@ -503,6 +513,10 @@ if (!class_exists('setting')) { /** * Generate string to save setting value to file according to $fmt + * + * @param string $var name of variable + * @param string $fmt save format + * @return string */ public function out($var, $fmt='php') { @@ -603,12 +617,15 @@ if (!class_exists('setting')) { if (!class_exists('setting_array')) { + /** + * Class setting_array + */ class setting_array extends setting { /** * Create an array from a string * - * @param $string + * @param string $string * @return array */ protected function _from_string($string){ @@ -622,7 +639,7 @@ if (!class_exists('setting_array')) { /** * Create a string from an array * - * @param $array + * @param array $array * @return string */ protected function _from_array($array){ @@ -657,13 +674,23 @@ if (!class_exists('setting_array')) { return true; } + /** + * Escaping + * + * @param string $string + * @return string + */ protected function _escape($string) { $tr = array("\\" => '\\\\', "'" => '\\\''); return "'".strtr( cleanText($string), $tr)."'"; } /** - * generate string to save setting value to file according to $fmt + * Generate string to save setting value to file according to $fmt + * + * @param string $var name of variable + * @param string $fmt save format + * @return string */ function out($var, $fmt='php') { @@ -680,8 +707,14 @@ if (!class_exists('setting_array')) { return $out; } + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo=false) { - $value = ''; $disable = ''; if ($this->is_protected()) { @@ -706,9 +739,18 @@ if (!class_exists('setting_array')) { } if (!class_exists('setting_string')) { + /** + * Class setting_string + */ class setting_string extends setting { + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo=false) { - $value = ''; $disable = ''; if ($this->is_protected()) { @@ -733,10 +775,21 @@ if (!class_exists('setting_string')) { } if (!class_exists('setting_password')) { + /** + * Class setting_password + */ class setting_password extends setting_string { var $_code = 'plain'; // mechanism to be used to obscure passwords + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { if ($this->is_protected()) return false; if (!$input) return false; @@ -751,9 +804,15 @@ if (!class_exists('setting_password')) { return true; } + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo=false) { - $value = ''; $disable = $this->is_protected() ? 'disabled="disabled"' : ''; $key = htmlspecialchars($this->_key); @@ -766,7 +825,9 @@ if (!class_exists('setting_password')) { } if (!class_exists('setting_email')) { - + /** + * Class setting_email + */ class setting_email extends setting_string { var $_multiple = false; var $_placeholders = false; @@ -830,7 +891,17 @@ if (!class_exists('setting_email')) { * @deprecated 2013-02-16 */ if (!class_exists('setting_richemail')) { + /** + * Class setting_richemail + */ class setting_richemail extends setting_email { + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { $this->_placeholders = true; return parent::update($input); @@ -840,6 +911,9 @@ if (!class_exists('setting_richemail')) { if (!class_exists('setting_numeric')) { + /** + * Class setting_numeric + */ class setting_numeric extends setting_string { // This allows for many PHP syntax errors... // var $_pattern = '/^[-+\/*0-9 ]*$/'; @@ -848,6 +922,14 @@ if (!class_exists('setting_numeric')) { var $_min = null; var $_max = null; + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { $local = $this->_local; $valid = parent::update($input); @@ -864,6 +946,13 @@ if (!class_exists('setting_numeric')) { return $valid; } + /** + * Generate string to save setting value to file according to $fmt + * + * @param string $var name of variable + * @param string $fmt save format + * @return string + */ function out($var, $fmt='php') { if ($this->is_protected()) return ''; @@ -882,6 +971,9 @@ if (!class_exists('setting_numeric')) { } if (!class_exists('setting_numericopt')) { + /** + * Class setting_numericopt + */ class setting_numericopt extends setting_numeric { // just allow an empty config var $_pattern = '/^(|[-]?[0-9]+(?:[-+*][0-9]+)*)$/'; @@ -889,10 +981,18 @@ if (!class_exists('setting_numericopt')) { } if (!class_exists('setting_onoff')) { + /** + * Class setting_onoff + */ class setting_onoff extends setting_numeric { - + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo = false) { - $value = ''; $disable = ''; if ($this->is_protected()) { @@ -910,6 +1010,14 @@ if (!class_exists('setting_onoff')) { return array($label,$input); } + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { if ($this->is_protected()) return false; @@ -924,12 +1032,21 @@ if (!class_exists('setting_onoff')) { } if (!class_exists('setting_multichoice')) { + /** + * Class setting_multichoice + */ class setting_multichoice extends setting_string { var $_choices = array(); var $lang; //some custom language strings are stored in setting + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo = false) { - $value = ''; $disable = ''; $nochoice = ''; @@ -972,6 +1089,14 @@ if (!class_exists('setting_multichoice')) { return array($label,$input); } + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { if (is_null($input)) return false; if ($this->is_protected()) return false; @@ -989,10 +1114,20 @@ if (!class_exists('setting_multichoice')) { if (!class_exists('setting_dirchoice')) { + /** + * Class setting_dirchoice + */ class setting_dirchoice extends setting_multichoice { var $_dir = ''; + /** + * Receives current values for the setting $key + * + * @param mixed $default default setting value + * @param mixed $local local setting value + * @param mixed $protected protected setting value + */ function initialize($default,$local,$protected) { // populate $this->_choices with a list of directories @@ -1018,12 +1153,18 @@ if (!class_exists('setting_dirchoice')) { if (!class_exists('setting_hidden')) { + /** + * Class setting_hidden + */ class setting_hidden extends setting { // Used to explicitly ignore a setting in the configuration manager. } } if (!class_exists('setting_fieldset')) { + /** + * Class setting_fieldset + */ class setting_fieldset extends setting { // A do-nothing class used to detect the 'fieldset' type. // Used to start a new settings "display-group". @@ -1031,6 +1172,9 @@ if (!class_exists('setting_fieldset')) { } if (!class_exists('setting_undefined')) { + /** + * Class setting_undefined + */ class setting_undefined extends setting_hidden { // A do-nothing class used to detect settings with no metadata entry. // Used internaly to hide undefined settings, and generate the undefined settings list. @@ -1038,6 +1182,9 @@ if (!class_exists('setting_undefined')) { } if (!class_exists('setting_no_class')) { + /** + * Class setting_no_class + */ class setting_no_class extends setting_undefined { // A do-nothing class used to detect settings with a missing setting class. // Used internaly to hide undefined settings, and generate the undefined settings list. @@ -1045,6 +1192,9 @@ if (!class_exists('setting_no_class')) { } if (!class_exists('setting_no_default')) { + /** + * Class setting_no_default + */ class setting_no_default extends setting_undefined { // A do-nothing class used to detect settings with no default value. // Used internaly to hide undefined settings, and generate the undefined settings list. @@ -1052,11 +1202,22 @@ if (!class_exists('setting_no_default')) { } if (!class_exists('setting_multicheckbox')) { + /** + * Class setting_multicheckbox + */ class setting_multicheckbox extends setting_string { var $_choices = array(); var $_combine = array(); + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { if ($this->is_protected()) return false; @@ -1077,9 +1238,15 @@ if (!class_exists('setting_multicheckbox')) { return true; } + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo=false) { - $value = ''; $disable = ''; if ($this->is_protected()) { @@ -1141,6 +1308,9 @@ if (!class_exists('setting_multicheckbox')) { /** * convert comma separated list to an array and combine any complimentary values + * + * @param string $str + * @return array */ function _str2array($str) { $array = explode(',',$str); @@ -1164,6 +1334,9 @@ if (!class_exists('setting_multicheckbox')) { /** * convert array of values + other back to a comma separated list, incl. splitting any combined values + * + * @param array $input + * @return string */ function _array2str($input) { @@ -1192,6 +1365,9 @@ if (!class_exists('setting_multicheckbox')) { } if (!class_exists('setting_regex')){ + /** + * Class setting_regex + */ class setting_regex extends setting_string { var $_delimiter = '/'; // regex delimiter to be used in testing input @@ -1215,7 +1391,7 @@ if (!class_exists('setting_regex')){ // see if the regex compiles and runs (we don't check for effectiveness) $regex = $this->_delimiter . $input . $this->_delimiter . $this->_pregflags; $lastError = error_get_last(); - $ok = @preg_match($regex,'testdata'); + @preg_match($regex,'testdata'); if (preg_last_error() != PREG_NO_ERROR || error_get_last() != $lastError) { $this->_input = $input; $this->_error = true; diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index 02171fb77..232a8177f 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -6,8 +6,15 @@ */ if (!class_exists('setting_sepchar')) { + /** + * Class setting_sepchar + */ class setting_sepchar extends setting_multichoice { + /** + * @param string $key + * @param array|null $param array with metadata of setting + */ function setting_sepchar($key,$param=null) { $str = '_-.'; for ($i=0;$i_choices[] = $str{$i}; @@ -19,8 +26,19 @@ if (!class_exists('setting_sepchar')) { } if (!class_exists('setting_savedir')) { + /** + * Class setting_savedir + */ class setting_savedir extends setting_string { + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { if ($this->is_protected()) return false; @@ -40,9 +58,20 @@ if (!class_exists('setting_savedir')) { } if (!class_exists('setting_authtype')) { + /** + * Class setting_authtype + */ class setting_authtype extends setting_multichoice { + /** + * Receives current values for the setting $key + * + * @param mixed $default default setting value + * @param mixed $local local setting value + * @param mixed $protected protected setting value + */ function initialize($default,$local,$protected) { + /** @var $plugin_controller Doku_Plugin_Controller */ global $plugin_controller; // retrieve auth types provided by plugins @@ -53,7 +82,16 @@ if (!class_exists('setting_authtype')) { parent::initialize($default,$local,$protected); } + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { + /** @var $plugin_controller Doku_Plugin_Controller */ global $plugin_controller; // is an update possible/requested? @@ -92,8 +130,19 @@ if (!class_exists('setting_authtype')) { } if (!class_exists('setting_im_convert')) { + /** + * Class setting_im_convert + */ class setting_im_convert extends setting_string { + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { if ($this->is_protected()) return false; @@ -115,8 +164,18 @@ if (!class_exists('setting_im_convert')) { } if (!class_exists('setting_disableactions')) { + /** + * Class setting_disableactions + */ class setting_disableactions extends setting_multicheckbox { + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo=false) { global $lang; @@ -134,10 +193,20 @@ if (!class_exists('setting_disableactions')) { } if (!class_exists('setting_compression')) { + /** + * Class setting_compression + */ class setting_compression extends setting_multichoice { var $_choices = array('0'); // 0 = no compression, always supported + /** + * Receives current values for the setting $key + * + * @param mixed $default default setting value + * @param mixed $local local setting value + * @param mixed $protected protected setting value + */ function initialize($default,$local,$protected) { // populate _choices with the compression methods supported by this php installation @@ -150,10 +219,20 @@ if (!class_exists('setting_compression')) { } if (!class_exists('setting_license')) { + /** + * Class setting_license + */ class setting_license extends setting_multichoice { var $_choices = array(''); // none choosen + /** + * Receives current values for the setting $key + * + * @param mixed $default default setting value + * @param mixed $local local setting value + * @param mixed $protected protected setting value + */ function initialize($default,$local,$protected) { global $license; @@ -169,10 +248,20 @@ if (!class_exists('setting_license')) { if (!class_exists('setting_renderer')) { + /** + * Class setting_renderer + */ class setting_renderer extends setting_multichoice { var $_prompts = array(); var $_format = null; + /** + * Receives current values for the setting $key + * + * @param mixed $default default setting value + * @param mixed $local local setting value + * @param mixed $protected protected setting value + */ function initialize($default,$local,$protected) { $format = $this->_format; @@ -189,6 +278,13 @@ if (!class_exists('setting_renderer')) { parent::initialize($default,$local,$protected); } + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo=false) { // make some language adjustments (there must be a better way) diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 2aca0e218..dfa624907 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -799,7 +799,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * The directory is registered for cleanup when the class is destroyed * - * @return bool|string + * @return false|string */ protected function mkTmpDir(){ $dir = io_mktmpdir(); @@ -1079,7 +1079,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @author Andreas Gohr * @param string $file The file to analyze - * @return string|bool false if the file can't be read, otherwise an "extension" + * @return string|false false if the file can't be read, otherwise an "extension" */ private function guess_archive($file) { $fh = fopen($file, 'rb'); @@ -1095,6 +1095,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** * Copy with recursive sub-directory support + * + * @param string $src filename path to file + * @param string $dst filename path to file + * @return bool|int|string */ private function dircopy($src, $dst) { global $conf; diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 9b1988d84..6fc8c63b1 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -333,7 +333,6 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * Shortens the URL for display * * @param string $url - * * @return string HTML link */ function shortlink($url){ diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php index fc0e1af9d..773256faf 100644 --- a/lib/plugins/info/syntax.php +++ b/lib/plugins/info/syntax.php @@ -44,9 +44,14 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { $this->Lexer->addSpecialPattern('~~INFO:\w+~~',$mode,'plugin_info'); } - /** * Handle the match + * + * @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 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){ $match = substr($match,7,-2); //strip ~~INFO: from start and ~~ from end @@ -55,6 +60,11 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * Create output + * + * @param string $format string output format being rendered + * @param Doku_Renderer $renderer the current renderer object + * @param array $data data created by handler() + * @return boolean rendered correctly? */ function render($format, Doku_Renderer $renderer, $data) { if($format == 'xhtml'){ @@ -103,6 +113,9 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * list all installed plugins * * uses some of the original renderer methods + * + * @param string $type + * @param Doku_Renderer_xhtml $renderer */ function _plugins_xhtml($type, Doku_Renderer_xhtml $renderer){ global $lang; @@ -114,7 +127,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { // remove subparts foreach($plugins as $p){ if (!$po = plugin_load($type,$p)) continue; - list($name,$part) = explode('_',$p,2); + list($name,/* $part */) = explode('_',$p,2); $plginfo[$name] = $po->getInfo(); } @@ -141,6 +154,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * list all installed plugins * * uses some of the original renderer methods + * + * @param Doku_Renderer_xhtml $renderer */ function _helpermethods_xhtml(Doku_Renderer_xhtml $renderer){ $plugins = plugin_list('helper'); @@ -189,6 +204,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * lists all known syntax types and their registered modes + * + * @return string */ function _syntaxtypes_xhtml(){ global $PARSER_MODES; @@ -211,6 +228,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * lists all known syntax modes and their sorting value + * + * @return string */ function _syntaxmodes_xhtml(){ $modes = p_get_parsermodes(); diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index eacde06d0..b4fb33b90 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -74,6 +74,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Check if autosubmit is enabled + * * @return boolean TRUE if we should send data once a month, FALSE otherwise */ function isAutoSubmitEnabled(){ @@ -82,6 +83,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Send the data, to the submit url + * * @param string $data The popularity data * @return string An empty string if everything worked fine, a string describing the error otherwise */ @@ -97,6 +99,8 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Compute the last time the data was sent. If it has never been sent, we return 0. + * + * @return int */ function lastSentTime(){ $manualSubmission = @filemtime($this->popularityLastSubmitFile); @@ -107,6 +111,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Gather all information + * * @return string The popularity data as a string */ function gatherAsString(){ @@ -124,6 +129,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Gather all information + * * @return array The popularity data as an array */ function _gather(){ @@ -288,17 +294,24 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { * * @author * @link http://de3.php.net/manual/en/ini.core.php#79564 + * + * @param string $v + * @return int|string */ function _to_byte($v){ $l = substr($v, -1); $ret = substr($v, 0, -1); switch(strtoupper($l)){ + /** @noinspection PhpMissingBreakStatementInspection */ case 'P': $ret *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'T': $ret *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'G': $ret *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'M': $ret *= 1024; case 'K': diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index 4a301f927..7acf681e4 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -52,6 +52,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin { * 'stack' - Special case. Plugin wraps other paragraphs. * * @see Doku_Handler_Block + * * @return string */ function getPType(){ @@ -94,9 +95,9 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin { * The contents of the $data array depends on what the handler() function above * created * - * @param $format string output format being rendered - * @param $renderer Doku_Renderer the current renderer object - * @param $data array data created by handler() + * @param string $format output format being rendered + * @param Doku_Renderer $renderer the current renderer object + * @param array $data data created by handler() * @return boolean rendered correctly? */ function render($format, Doku_Renderer $renderer, $data) { diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index c568469a7..86562f1dd 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -58,9 +58,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } } - /** - * Return prompt for admin menu - */ + /** + * Return prompt for admin menu + * + * @param string $language + * @return string + */ public function getMenuText($language) { if (!is_null($this->_auth)) @@ -71,6 +74,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * return sort order for position in admin menu + * + * @return int */ public function getMenuSort() { return 2; @@ -78,6 +83,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * Handle user request + * + * @return bool */ public function handle() { global $INPUT; @@ -128,6 +135,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * Output appropriate html + * + * @return bool */ public function html() { global $ID; @@ -939,8 +948,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * Returns cleaned user data * * @param array $candidate raw values of line from input file - * @param $error - * @return array|bool cleaned data or false + * @param string $error + * @return array|false cleaned data or false */ protected function _cleanImportUser($candidate, & $error){ global $INPUT; @@ -1023,6 +1032,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * wrapper for is_uploaded_file to facilitate overriding by test suite + * + * @param string $file filename + * @return bool */ protected function _isUploadedFile($file) { return is_uploaded_file($file); @@ -1033,6 +1045,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @deprecated remove when dokuwiki php requirement increases to 5.3+ * also associated unit test & mock access method + * + * @param string $csv string to parse + * @return array */ protected function _getcsv($csv) { return function_exists('str_getcsv') ? str_getcsv($csv) : $this->str_getcsv($csv); @@ -1043,6 +1058,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * loosely based on www.php.net/str_getcsv#88311 * * @deprecated remove when dokuwiki php requirement increases to 5.3+ + * + * @param string $str string to parse + * @return array */ protected function str_getcsv($str) { $fp = fopen("php://temp/maxmemory:1048576", 'r+'); // 1MiB -- cgit v1.2.3 From 7e8500eea1e53b1de0e0f70400664afa442cd08d Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 2 Oct 2014 14:55:24 +0200 Subject: PHPDocs and some improvements --- lib/plugins/admin.php | 14 ++++++++++++++ lib/plugins/authplain/_test/escaping.test.php | 5 +++-- lib/plugins/config/settings/config.class.php | 2 +- lib/plugins/extension/admin.php | 6 +++--- lib/plugins/extension/helper/repository.php | 6 +++--- lib/plugins/extension/lang/en/lang.php | 3 ++- lib/plugins/extension/lang/nl/lang.php | 2 +- 7 files changed, 27 insertions(+), 11 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/admin.php b/lib/plugins/admin.php index 9a1fb9fdc..d063af612 100644 --- a/lib/plugins/admin.php +++ b/lib/plugins/admin.php @@ -14,6 +14,10 @@ if(!defined('DOKU_INC')) die(); */ class DokuWiki_Admin_Plugin extends DokuWiki_Plugin { + /** + * @param string $language language code + * @return string + */ function getMenuText($language) { $menutext = $this->getLang('menu'); if (!$menutext) { @@ -23,10 +27,14 @@ class DokuWiki_Admin_Plugin extends DokuWiki_Plugin { return $menutext; } + /** + * @return int + */ function getMenuSort() { return 1000; } + function handle() { trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING); } @@ -35,10 +43,16 @@ class DokuWiki_Admin_Plugin extends DokuWiki_Plugin { trigger_error('html() not implemented in '.get_class($this), E_USER_WARNING); } + /** + * @return bool + */ function forAdminOnly() { return true; } + /** + * @return array + */ function getTOC(){ return array(); } diff --git a/lib/plugins/authplain/_test/escaping.test.php b/lib/plugins/authplain/_test/escaping.test.php index cd5294157..5cf631508 100644 --- a/lib/plugins/authplain/_test/escaping.test.php +++ b/lib/plugins/authplain/_test/escaping.test.php @@ -12,10 +12,11 @@ * @group plugins */ class helper_plugin_authplain_escaping_test extends DokuWikiTest { - + protected $pluginsEnabled = array('authplain'); + /** @var auth_plugin_authplain */ protected $auth; - + protected function reloadUsers() { /* auth caches data loaded from file, but recreated object forces reload */ $this->auth = new auth_plugin_authplain(); diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index cbf6ea452..590631dae 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -570,7 +570,7 @@ if (!class_exists('setting')) { /** * Returns caution * - * @return bool|string caution string, otherwise false for invalid caution + * @return false|string caution string, otherwise false for invalid caution */ public function caution() { if (!empty($this->_caution)) { diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 99c74848b..de4992937 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -75,10 +75,10 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { case 'uninstall': $extension->setExtension($extname); $status = $extension->uninstall(); - if($status !== true) { - msg($status, -1); - } else { + if($status) { msg(sprintf($this->getLang('msg_delete_success'), hsc($extension->getDisplayName())), 1); + } else { + msg(sprintf($this->getLang('msg_delete_failed'), hsc($extension->getDisplayName())), -1); } break; case 'enable'; diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php index 6ffe89eb7..5dc2707cf 100644 --- a/lib/plugins/extension/helper/repository.php +++ b/lib/plugins/extension/helper/repository.php @@ -32,7 +32,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { $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; @@ -64,7 +64,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { 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; @@ -91,7 +91,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { */ 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(); diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 72c9b9e2d..4da41a2fd 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -69,7 +69,8 @@ $lang['status_bundled'] = 'bundled'; $lang['msg_enabled'] = 'Plugin %s enabled'; $lang['msg_disabled'] = 'Plugin %s disabled'; -$lang['msg_delete_success'] = 'Extension uninstalled'; +$lang['msg_delete_success'] = 'Extension %s uninstalled'; +$lang['msg_delete_failed'] = 'Uninstalling Extension %s failed'; $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'; diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php index a54924e93..f75f78121 100644 --- a/lib/plugins/extension/lang/nl/lang.php +++ b/lib/plugins/extension/lang/nl/lang.php @@ -63,7 +63,7 @@ $lang['status_template'] = 'template'; $lang['status_bundled'] = 'Gebundeld'; $lang['msg_enabled'] = 'Plugin %s ingeschakeld'; $lang['msg_disabled'] = 'Plugin %s uitgeschakeld'; -$lang['msg_delete_success'] = 'Uitbreiding gedeinstalleerd'; +$lang['msg_delete_success'] = 'Uitbreiding %s gedeinstalleerd'; $lang['msg_template_install_success'] = 'Template %s werd succesvol geïnstalleerd'; $lang['msg_template_update_success'] = 'Template %s werd succesvol geüpdatet'; $lang['msg_plugin_install_success'] = 'Plugin %s werd succesvol geïnstalleerd'; -- cgit v1.2.3 From 9c03f73b0f57a7e1bf6a3108813a4004bf66d307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutn=C3=BD?= Date: Mon, 13 Oct 2014 02:12:55 +0200 Subject: AUTH_USER_CHANGE handler can modify passed data Originally AUTH_USER_CHANGE handler could modify the user data, however, auth plugin consequently worked with different copy of the array thus effectively preventing any changes by the AUTH_USER_CHANGE implementer. --- lib/plugins/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index b38b591a3..02e0613dd 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -129,7 +129,7 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { $eventdata = array('type' => $type, 'params' => $params, 'modification_result' => null); $evt = new Doku_Event('AUTH_USER_CHANGE', $eventdata); if($evt->advise_before(true)) { - $result = call_user_func_array(array($this, $validTypes[$type]), $params); + $result = call_user_func_array(array($this, $validTypes[$type]), $evt->data['params']); $evt->data['modification_result'] = $result; } $evt->advise_after(); -- cgit v1.2.3 From dfc5e46cbee86f9c2f44b5bc5f72505dd8847352 Mon Sep 17 00:00:00 2001 From: Yadav Gowda Date: Wed, 15 Oct 2014 21:35:58 +0200 Subject: translation update --- lib/plugins/acl/lang/eu/lang.php | 5 +++-- lib/plugins/popularity/lang/eu/lang.php | 5 +++-- lib/plugins/revert/lang/eu/lang.php | 6 ++++-- lib/plugins/usermanager/lang/eu/lang.php | 5 +++-- 4 files changed, 13 insertions(+), 8 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/lang/eu/lang.php b/lib/plugins/acl/lang/eu/lang.php index f051523d9..bb6ab964a 100644 --- a/lib/plugins/acl/lang/eu/lang.php +++ b/lib/plugins/acl/lang/eu/lang.php @@ -1,7 +1,8 @@ * @author Zigor Astarbe */ diff --git a/lib/plugins/popularity/lang/eu/lang.php b/lib/plugins/popularity/lang/eu/lang.php index b52ccaee1..b5b80357c 100644 --- a/lib/plugins/popularity/lang/eu/lang.php +++ b/lib/plugins/popularity/lang/eu/lang.php @@ -1,7 +1,8 @@ * @author Zigor Astarbe */ diff --git a/lib/plugins/revert/lang/eu/lang.php b/lib/plugins/revert/lang/eu/lang.php index d3532c070..40be3e382 100644 --- a/lib/plugins/revert/lang/eu/lang.php +++ b/lib/plugins/revert/lang/eu/lang.php @@ -1,9 +1,11 @@ * @author Zigor Astarbe + * @author Yadav Gowda */ $lang['menu'] = 'Berrezartze Kudeatzailea'; $lang['filter'] = 'Bilatu spam duten orriak'; diff --git a/lib/plugins/usermanager/lang/eu/lang.php b/lib/plugins/usermanager/lang/eu/lang.php index 5d3a01fc7..1fbe13739 100644 --- a/lib/plugins/usermanager/lang/eu/lang.php +++ b/lib/plugins/usermanager/lang/eu/lang.php @@ -1,7 +1,8 @@ * @author Zigor Astarbe */ -- cgit v1.2.3 From a1298aeaa8cf1dc3bba3fb7ecadb0d989afc42cf Mon Sep 17 00:00:00 2001 From: Aleksandr Selivanov Date: Sat, 18 Oct 2014 18:25:58 +0200 Subject: translation update --- lib/plugins/authad/lang/ru/settings.php | 3 ++- lib/plugins/authpgsql/lang/ru/settings.php | 2 +- lib/plugins/extension/lang/ru/lang.php | 17 +++++++++++------ lib/plugins/usermanager/lang/ru/import.txt | 3 +-- lib/plugins/usermanager/lang/ru/lang.php | 3 ++- 5 files changed, 17 insertions(+), 11 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/ru/settings.php b/lib/plugins/authad/lang/ru/settings.php index c9c6d9f88..0212589d7 100644 --- a/lib/plugins/authad/lang/ru/settings.php +++ b/lib/plugins/authad/lang/ru/settings.php @@ -8,8 +8,9 @@ * @author Artur * @author Erli Moen * @author Владимир + * @author Aleksandr Selivanov */ -$lang['account_suffix'] = 'Суффикс вашего аккаунта типа @my.domain.org'; +$lang['account_suffix'] = 'Суффикс вашего аккаунта. Например, @my.domain.org'; $lang['domain_controllers'] = 'Список DNS-серверов, разделенных запятой. Например:srv1.domain.org,srv2.domain.org'; $lang['admin_password'] = 'Пароль для указанного пользователя.'; $lang['sso'] = 'Использовать SSO (Single-Sign-On) через Kerberos или NTLM?'; diff --git a/lib/plugins/authpgsql/lang/ru/settings.php b/lib/plugins/authpgsql/lang/ru/settings.php index 65cbce8df..668ba4ef6 100644 --- a/lib/plugins/authpgsql/lang/ru/settings.php +++ b/lib/plugins/authpgsql/lang/ru/settings.php @@ -10,7 +10,7 @@ $lang['server'] = 'Ваш PostgreSQL-сервер'; $lang['port'] = 'Порт вашего PostgreSQL-сервера'; $lang['user'] = 'Имя пользователя PostgreSQL'; -$lang['password'] = 'Пароль для указанного пользователя.'; +$lang['password'] = 'Пароль для указанного пользователя'; $lang['database'] = 'Имя базы данных'; $lang['debug'] = 'Отображать дополнительную отладочную информацию'; $lang['checkPass'] = 'Выражение SQL, осуществляющее проверку пароля'; diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php index 7fb39b3e9..24e6fe224 100644 --- a/lib/plugins/extension/lang/ru/lang.php +++ b/lib/plugins/extension/lang/ru/lang.php @@ -26,7 +26,8 @@ $lang['search_for'] = 'Поиск дополнения:'; $lang['search'] = 'Найти'; $lang['extensionby'] = '%s — %s'; $lang['popularity'] = 'Популярность: %s%%'; -$lang['bugs_features'] = 'Ошибки'; +$lang['homepage_link'] = 'Описание'; +$lang['bugs_features'] = 'Баг-трекер'; $lang['tags'] = 'Метки:'; $lang['author_hint'] = 'Найти дополнения этого автора'; $lang['installed'] = 'Установлено:'; @@ -43,6 +44,8 @@ $lang['conflicts'] = 'Конфликтует с:'; $lang['donate'] = 'Нравится?'; $lang['donate_action'] = 'Купить автору кофе!'; $lang['repo_retry'] = 'Повторить'; +$lang['provides'] = 'Предоставляет:'; +$lang['status'] = 'Статус:'; $lang['status_installed'] = 'установлено'; $lang['status_not_installed'] = 'не установлено'; $lang['status_protected'] = 'защищено'; @@ -59,10 +62,12 @@ $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['noperms'] = 'Папка для расширений не доступна для записи'; -$lang['notplperms'] = 'Папка для шаблонов не доступна для записи'; -$lang['nopluginperms'] = 'Папка плагинов не доступна для записи'; -$lang['git'] = 'Это расширение было установлено через git, Вы не можете обновить его тут.'; +$lang['update_available'] = 'Обновление: доступна новая версия %s.'; +$lang['error_badurl'] = 'Ссылки должны начинаться с http или https'; +$lang['noperms'] = 'Папка для расширений недоступна для записи'; +$lang['notplperms'] = 'Папка для шаблонов недоступна для записи'; +$lang['nopluginperms'] = 'Папка плагинов недоступна для записи'; +$lang['git'] = 'Это расширение было установлено через git. Вы не можете обновить его тут.'; $lang['install_url'] = 'Установить с адреса URL:'; $lang['install_upload'] = 'Скачать расширение:'; -$lang['repo_error'] = 'Сайт с плагинами недоступен. Убедитесь, что у сайта есть доступ на www.dokuwiki.org, а также проверьте настройки соединения с Интернет.'; +$lang['repo_error'] = 'Сайт с плагинами недоступен. Убедитесь, что у сайта есть доступ на www.dokuwiki.org, а также проверьте настройки соединения с Интернетом.'; diff --git a/lib/plugins/usermanager/lang/ru/import.txt b/lib/plugins/usermanager/lang/ru/import.txt index f2049dd0c..c92e47b4c 100644 --- a/lib/plugins/usermanager/lang/ru/import.txt +++ b/lib/plugins/usermanager/lang/ru/import.txt @@ -3,7 +3,6 @@ Потребуется список пользователей в файле формата CSV, состоящий из 4 столбцов. Столбцы должны быть заполнены следующим образом: user-id, полное имя, эл. почта, группы. Поля CSV должны быть отделены запятой (,), а строки должны быть заключены в кавычки (%%""%%). Обратный слэш используется как прерывание. -В качестве примера можете взять список пользователей, экспортированный через «Экспорт пользователей». -Повторяющиеся идентификаторы user-id будут игнорироваться. +В качестве примера можете взять список пользователей, экспортированный через «Экспорт пользователей». Повторяющиеся идентификаторы user-id будут игнорироваться. Пароль доступа будет сгенерирован и отправлен по почте удачно импортированному пользователю. \ 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 8bbfa639c..515de5186 100644 --- a/lib/plugins/usermanager/lang/ru/lang.php +++ b/lib/plugins/usermanager/lang/ru/lang.php @@ -68,6 +68,7 @@ $lang['add_ok'] = 'Пользователь успешно доб $lang['add_fail'] = 'Не удалось добавить пользователя'; $lang['notify_ok'] = 'Письмо с уведомлением отправлено'; $lang['notify_fail'] = 'Не удалось отправить письмо с уведомлением'; +$lang['import_userlistcsv'] = 'Файл со списком пользователей (CSV):'; $lang['import_success_count'] = 'Импорт пользователей: %d пользователей найдено, %d импортировано успешно.'; $lang['import_failure_count'] = 'Импорт пользователей: %d не удалось. Список ошибок прочтите ниже.'; $lang['import_error_fields'] = 'Не все поля заполнены. Найдено %d, а нужно 4.'; @@ -78,4 +79,4 @@ $lang['import_error_upload'] = 'Импорт не удался. CSV-файл $lang['import_error_readfail'] = 'Импорт не удался. Невозможно прочесть загруженный файл.'; $lang['import_error_create'] = 'Невозможно создать пользователя'; $lang['import_notify_fail'] = 'Оповещение не может быть отправлено импортированному пользователю %s по электронной почте %s.'; -$lang['import_downloadfailures'] = 'Скачать Ошибки в формате CSV для исправления'; +$lang['import_downloadfailures'] = 'Скачать ошибки в формате CSV для исправления'; -- cgit v1.2.3 From 17bc1e4f530dbbc74ad4ba9067782f248d003045 Mon Sep 17 00:00:00 2001 From: Jaroslav Lichtblau Date: Wed, 22 Oct 2014 13:01:09 +0200 Subject: translation update --- lib/plugins/extension/lang/cs/lang.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/cs/lang.php b/lib/plugins/extension/lang/cs/lang.php index 27b3a94a3..783b488ea 100644 --- a/lib/plugins/extension/lang/cs/lang.php +++ b/lib/plugins/extension/lang/cs/lang.php @@ -55,3 +55,5 @@ $lang['status_unmodifiable'] = 'neměnný'; $lang['status_plugin'] = 'zásuvný modul'; $lang['status_template'] = 'šablona'; $lang['msg_delete_success'] = 'Rozšíření odinstalováno'; +$lang['msg_plugin_install_success'] = 'Zásuvný modul %s úspěšně nainstalován.'; +$lang['msg_plugin_update_success'] = 'Zásuvný modul %s úspěšně aktualizován.'; -- cgit v1.2.3 From ae6f2c31087f39c5c677957200a306b1911c990c Mon Sep 17 00:00:00 2001 From: lioujheyu Date: Mon, 27 Oct 2014 04:16:14 +0100 Subject: translation update --- lib/plugins/extension/lang/zh-tw/intro_plugins.txt | 1 + lib/plugins/extension/lang/zh-tw/lang.php | 30 ++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 lib/plugins/extension/lang/zh-tw/intro_plugins.txt (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/zh-tw/intro_plugins.txt b/lib/plugins/extension/lang/zh-tw/intro_plugins.txt new file mode 100644 index 000000000..b5b77a267 --- /dev/null +++ b/lib/plugins/extension/lang/zh-tw/intro_plugins.txt @@ -0,0 +1 @@ +已經有一些外掛套件被安裝在你的DokuWiki之中。你可以在這裡啟用、禁用,甚至是完全移除它們。如外掛可更新也同時會顯示在這裡,請確保在更新前先閱讀過該套件之文件。 \ No newline at end of file diff --git a/lib/plugins/extension/lang/zh-tw/lang.php b/lib/plugins/extension/lang/zh-tw/lang.php index a86364d7a..79657ffeb 100644 --- a/lib/plugins/extension/lang/zh-tw/lang.php +++ b/lib/plugins/extension/lang/zh-tw/lang.php @@ -5,6 +5,7 @@ * * @author Stan * @author June-Hao Hou + * @author lioujheyu */ $lang['menu'] = '延伸功能管理'; $lang['tab_plugins'] = '已安裝外掛'; @@ -28,20 +29,49 @@ $lang['btn_reinstall'] = '重新安裝'; $lang['js']['reallydel'] = '確定要移除此延伸功能?'; $lang['search_for'] = '搜尋延伸功能:'; $lang['search'] = '搜尋'; +$lang['homepage_link'] = '文件'; $lang['tags'] = '標籤:'; $lang['author_hint'] = '搜尋相同作者的延伸功能'; $lang['installed'] = '已安裝:'; $lang['downloadurl'] = '下載網址:'; +$lang['unknown'] = '未知'; $lang['installed_version'] = '已安裝版本:'; +$lang['install_date'] = '你最後一次更新: '; $lang['available_version'] = '可用版本:'; $lang['compatible'] = '相容於:'; +$lang['depends'] = '依賴於: '; +$lang['similar'] = '類似於: '; +$lang['conflicts'] = '相衝突於: '; +$lang['donate'] = '像這樣?'; +$lang['donate_action'] = '請作者一杯咖啡!'; $lang['repo_retry'] = '再試一次'; $lang['status'] = '狀態:'; $lang['status_installed'] = '已安裝'; $lang['status_not_installed'] = '未安裝'; +$lang['status_protected'] = '已保護'; $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'] = '附加元件已移除'; +$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['missing_dependency'] = '遺失或禁用相依性套件: %s'; +$lang['security_issue'] = '安全性問題: %s'; +$lang['security_warning'] = '安全問題警告: %s'; +$lang['update_available'] = '更新: 已可取得 %s 的新版本'; +$lang['wrong_folder'] = '外掛安裝不正確: 將外掛資料夾從 "%s" 更名至 "%s"。'; +$lang['url_change'] = '網址已變更: 自從上次下載後下載網址已變更。在更新延伸功能前請先檢查新網址是否可用。
    新: %s
    舊: %s'; +$lang['error_download'] = '無法下載檔案:%s'; +$lang['error_decompress'] = '無法解壓縮檔案。這可能是下載品質不佳所致,在這個情況下你應該再試一次;也有可能是因為無法辨識的壓縮格式,在這個情況下你應該自行下載並手動安裝'; +$lang['error_findfolder'] = '無法辨認延伸功能資料夾,你必須自行下載並手動安裝'; $lang['noperms'] = '延伸功能資料夾無法寫入'; $lang['notplperms'] = '版型資料夾無法寫入'; $lang['nopluginperms'] = '外掛資料夾無法寫入'; -- cgit v1.2.3 From 2ec6a92c13ed276111bbe099aadab33a885397cb Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 19 Nov 2014 19:20:55 +0100 Subject: translation update --- lib/plugins/authad/lang/no/lang.php | 8 ++++++++ lib/plugins/authad/lang/no/settings.php | 2 ++ lib/plugins/authldap/lang/no/settings.php | 2 ++ lib/plugins/authmysql/lang/no/settings.php | 14 ++++++++++++++ lib/plugins/revert/lang/no/lang.php | 1 + 5 files changed, 27 insertions(+) create mode 100644 lib/plugins/authad/lang/no/lang.php create mode 100644 lib/plugins/authmysql/lang/no/settings.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/no/lang.php b/lib/plugins/authad/lang/no/lang.php new file mode 100644 index 000000000..a1c9c7e8a --- /dev/null +++ b/lib/plugins/authad/lang/no/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['domain'] = 'Loggpå-domene'; diff --git a/lib/plugins/authad/lang/no/settings.php b/lib/plugins/authad/lang/no/settings.php index bab5ce67d..f309ead50 100644 --- a/lib/plugins/authad/lang/no/settings.php +++ b/lib/plugins/authad/lang/no/settings.php @@ -4,6 +4,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Christopher Schive + * @author Patrick */ +$lang['account_suffix'] = 'Ditt konto-suffiks F. Eks. @my.domain.org'; $lang['admin_password'] = 'Passordet til brukeren over.'; $lang['expirywarn'] = 'Antall dager på forhånd brukeren varsles om at passordet utgår. 0 for å deaktivere.'; diff --git a/lib/plugins/authldap/lang/no/settings.php b/lib/plugins/authldap/lang/no/settings.php index 6bedb2991..61671ed46 100644 --- a/lib/plugins/authldap/lang/no/settings.php +++ b/lib/plugins/authldap/lang/no/settings.php @@ -4,6 +4,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Christopher Schive + * @author Patrick */ $lang['port'] = 'LDAP serverport dersom ingen full URL var gitt over.'; $lang['starttls'] = 'Bruke TLS-forbindelser?'; +$lang['bindpw'] = 'Passord til brukeren over'; diff --git a/lib/plugins/authmysql/lang/no/settings.php b/lib/plugins/authmysql/lang/no/settings.php new file mode 100644 index 000000000..45ab09819 --- /dev/null +++ b/lib/plugins/authmysql/lang/no/settings.php @@ -0,0 +1,14 @@ + + */ +$lang['server'] = 'Din MySQL-server'; +$lang['user'] = 'Ditt MySQL-brukernavn'; +$lang['password'] = 'Passord til brukeren'; +$lang['database'] = 'Database som skal brukes'; +$lang['debug_o_0'] = 'ingen'; +$lang['debug_o_1'] = 'bare ved feil'; +$lang['debug_o_2'] = 'alle SQL-forespørsler'; diff --git a/lib/plugins/revert/lang/no/lang.php b/lib/plugins/revert/lang/no/lang.php index 6806dcd93..76da8ca9c 100644 --- a/lib/plugins/revert/lang/no/lang.php +++ b/lib/plugins/revert/lang/no/lang.php @@ -19,6 +19,7 @@ * @author Thomas Juberg * @author Boris * @author Christopher Schive + * @author Patrick */ $lang['menu'] = 'Tilbakestillingsbehandler'; $lang['filter'] = 'Søk etter søppelmeldinger'; -- cgit v1.2.3 From 52f0afd3e452404cf4792276479346237787e636 Mon Sep 17 00:00:00 2001 From: Jaroslav Lichtblau Date: Fri, 21 Nov 2014 21:56:39 +0100 Subject: translation update --- lib/plugins/extension/lang/cs/intro_templates.txt | 1 + lib/plugins/extension/lang/cs/lang.php | 24 +++++++++++++++++++++++ lib/plugins/usermanager/lang/cs/lang.php | 3 +++ 3 files changed, 28 insertions(+) create mode 100644 lib/plugins/extension/lang/cs/intro_templates.txt (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/cs/intro_templates.txt b/lib/plugins/extension/lang/cs/intro_templates.txt new file mode 100644 index 000000000..45abe952c --- /dev/null +++ b/lib/plugins/extension/lang/cs/intro_templates.txt @@ -0,0 +1 @@ +Toto jsou šablony, které jsou momentálně nainstalovány v této DokuWiki. Aktuálně používanu šablonu lze vybrat ve [[?do=admin&page=config|Správci rozšíření]]. \ No newline at end of file diff --git a/lib/plugins/extension/lang/cs/lang.php b/lib/plugins/extension/lang/cs/lang.php index 783b488ea..f6db2b153 100644 --- a/lib/plugins/extension/lang/cs/lang.php +++ b/lib/plugins/extension/lang/cs/lang.php @@ -15,6 +15,7 @@ $lang['notimplemented'] = 'Tato vychytávka není dosud implementována'; $lang['notinstalled'] = 'Toto rozšíření není instalováno'; $lang['alreadyenabled'] = 'Toto rozšíření je již povoleno'; $lang['alreadydisabled'] = 'Toto rozšíření je již vypnuto'; +$lang['pluginlistsaveerror'] = 'Došlo k chybě při ukládání seznamu zásuvných modulů'; $lang['unknownauthor'] = 'Neznámý autor'; $lang['unknownversion'] = 'Neznámá verze'; $lang['btn_info'] = 'Zobrazit více informací'; @@ -27,12 +28,15 @@ $lang['btn_reinstall'] = 'Přeinstalovat'; $lang['js']['reallydel'] = 'Opravdu odinstalovat toto rozšíření?'; $lang['search_for'] = 'Hledat rozšíření:'; $lang['search'] = 'Hledat'; +$lang['extensionby'] = '%s od %s'; +$lang['screenshot'] = 'Screenshot %s'; $lang['popularity'] = 'Popularita: %s%%'; $lang['homepage_link'] = 'Dokumenty'; $lang['bugs_features'] = 'Chyby'; $lang['tags'] = 'Štítky:'; $lang['author_hint'] = 'Vyhledat rozšíření podle tohoto autora'; $lang['installed'] = 'Nainstalováno:'; +$lang['downloadurl'] = 'URL stahování:'; $lang['repository'] = 'Repozitář:'; $lang['unknown'] = 'neznámý'; $lang['installed_version'] = 'Nainstalovaná verze:'; @@ -41,6 +45,7 @@ $lang['available_version'] = 'Dostupná verze:'; $lang['compatible'] = 'Kompatibilní s:'; $lang['depends'] = 'Závisí na:'; $lang['similar'] = 'Podobný jako:'; +$lang['conflicts'] = 'Koliduje s:'; $lang['donate'] = 'Líbí se ti to?'; $lang['donate_action'] = 'Kup autorovi kávu!'; $lang['repo_retry'] = 'Opakovat'; @@ -54,6 +59,25 @@ $lang['status_disabled'] = 'zakázaný'; $lang['status_unmodifiable'] = 'neměnný'; $lang['status_plugin'] = 'zásuvný modul'; $lang['status_template'] = 'šablona'; +$lang['status_bundled'] = 'svázaný'; +$lang['msg_enabled'] = 'Zásuvný modul %s povolen'; +$lang['msg_disabled'] = 'Zásuvný modul %s zakázán'; $lang['msg_delete_success'] = 'Rozšíření odinstalováno'; +$lang['msg_template_install_success'] = 'Šablona %s úspěšně nainstalována'; +$lang['msg_template_update_success'] = 'Šablona %s úspěšně aktualizována'; $lang['msg_plugin_install_success'] = 'Zásuvný modul %s úspěšně nainstalován.'; $lang['msg_plugin_update_success'] = 'Zásuvný modul %s úspěšně aktualizován.'; +$lang['msg_upload_failed'] = 'Nahrávání souboru selhalo'; +$lang['missing_dependency'] = 'Chybějící nebo zakázaná závislost: %s'; +$lang['security_issue'] = 'Bezpečnostní problém: %s'; +$lang['security_warning'] = 'Bezpečnostní varování: %s'; +$lang['update_available'] = 'Aktualizace: Je dostupná nová verze %s.'; +$lang['wrong_folder'] = 'Zásuvný modul nesprávně nainstalován: Přejmenujte adresár modulu "%s" na "%s".'; +$lang['error_badurl'] = 'Adresy URL by měly začínat s http nebo https'; +$lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář pro přijetí stahování'; +$lang['error_download'] = 'Nelze stáhnout soubor: %s'; +$lang['error_findfolder'] = 'Nelze rozpoznat adresář pro rozšíření, je třeba stáhnout a instalovat ručně'; +$lang['noperms'] = 'Nelze zapisovat do adresáře pro rozšíření'; +$lang['notplperms'] = 'Nelze zapisovat do odkládacího adresáře'; +$lang['nopluginperms'] = 'Nelze zapisovat do adresáře se zásuvnými moduly'; +$lang['git'] = 'Toto rozšíření bylo nainstalováno přes git, nejspíš ho tady aktualizovat nechcete.'; diff --git a/lib/plugins/usermanager/lang/cs/lang.php b/lib/plugins/usermanager/lang/cs/lang.php index bbb560679..6fbfe8535 100644 --- a/lib/plugins/usermanager/lang/cs/lang.php +++ b/lib/plugins/usermanager/lang/cs/lang.php @@ -15,6 +15,7 @@ * @author Jakub A. Těšínský (j@kub.cz) * @author mkucera66@seznam.cz * @author Zbyněk Křivka + * @author Jaroslav Lichtblau */ $lang['menu'] = 'Správa uživatelů'; $lang['noauth'] = '(autentizace uživatelů není k dispozici)'; @@ -62,6 +63,8 @@ $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_userlistcsv'] = 'Seznam uživatelů (CSV):'; +$lang['import_header'] = 'Poslední selhání importu'; $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.'; -- cgit v1.2.3 From 044a73b5792a48ef181c0bcdfcef5317d78798b4 Mon Sep 17 00:00:00 2001 From: Mohammad Sadegh Date: Thu, 27 Nov 2014 12:06:03 +0100 Subject: translation update --- lib/plugins/authldap/lang/fa/settings.php | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 lib/plugins/authldap/lang/fa/settings.php (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/fa/settings.php b/lib/plugins/authldap/lang/fa/settings.php new file mode 100644 index 000000000..1b48da7f5 --- /dev/null +++ b/lib/plugins/authldap/lang/fa/settings.php @@ -0,0 +1,8 @@ + + */ +$lang['bindpw'] = 'رمزعبور کاربر بالا'; -- cgit v1.2.3 From cded11250d495f6039a20f1036c64ea7b230ceb2 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 3 Dec 2014 00:09:45 +0100 Subject: phpdocs syntax plugin base class --- lib/plugins/syntax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index 4a301f927..7d2daa70d 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -70,7 +70,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin { * @param int $state The lexer state for the match * @param int $pos The character position of the matched text * @param Doku_Handler $handler The Doku_Handler object - * @return array Return an array with all data you want to use in render + * @return bool|array Return an array with all data you want to use in render, false don't add an instruction */ function handle($match, $state, $pos, Doku_Handler $handler){ trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING); @@ -97,7 +97,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin { * @param $format string output format being rendered * @param $renderer Doku_Renderer the current renderer object * @param $data array data created by handler() - * @return boolean rendered correctly? + * @return boolean rendered correctly? (however, returned value is not used at the moment) */ function render($format, Doku_Renderer $renderer, $data) { trigger_error('render() not implemented in '.get_class($this), E_USER_WARNING); -- cgit v1.2.3 From 48b5d5e92851161ee3b3ebc7bf5b6ae6d1f0914d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 3 Dec 2014 16:50:16 +0100 Subject: warn about enabled, but not used auth plugins --- lib/plugins/extension/helper/list.php | 5 +++++ lib/plugins/extension/lang/en/lang.php | 1 + 2 files changed, 6 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 9b1988d84..f7e6eb2ca 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -461,6 +461,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @return string The HTML code */ function make_actions(helper_plugin_extension_extension $extension) { + global $conf; $return = ''; $errors = ''; @@ -492,6 +493,10 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $errors .= '

    '.$this->getLang('git').'

    '; } + if ($extension->isEnabled() && in_array('Auth', $extension->getTypes()) && $conf['auth'] != $extension->getID()) { + $errors .= '

    '.$this->getLang('auth').'

    '; + } + }else{ if (($canmod = $extension->canModify()) === true) { if ($extension->getDownloadURL()) { diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 72c9b9e2d..fc8860c5d 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -94,6 +94,7 @@ $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['auth'] = 'This auth plugin is not enabled in configuration, consider disabling it.'; $lang['install_url'] = 'Install from URL:'; $lang['install_upload'] = 'Upload Extension:'; -- cgit v1.2.3 From 29eba4294ec095d7a6fe677fb8b8e64e98655bcc Mon Sep 17 00:00:00 2001 From: Omid Hezaveh Date: Mon, 8 Dec 2014 17:21:12 +0100 Subject: translation update --- lib/plugins/authad/lang/fa/settings.php | 10 ++++++++++ lib/plugins/authldap/lang/fa/settings.php | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 lib/plugins/authad/lang/fa/settings.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/fa/settings.php b/lib/plugins/authad/lang/fa/settings.php new file mode 100644 index 000000000..161479afb --- /dev/null +++ b/lib/plugins/authad/lang/fa/settings.php @@ -0,0 +1,10 @@ + + */ +$lang['admin_password'] = 'رمز کاربر بالایی '; +$lang['use_ssl'] = 'از اس‌اس‌ال استفاده می‌کنید؟ در این صورت تی‌ال‌اس را در پایین فعال نکنید. '; +$lang['use_tls'] = 'از تی‌ال‌اس استفاده می‌کنید؟ در این صورت اس‌اس‌ال را در بالا فعال نکنید. '; diff --git a/lib/plugins/authldap/lang/fa/settings.php b/lib/plugins/authldap/lang/fa/settings.php index 1b48da7f5..49d485afd 100644 --- a/lib/plugins/authldap/lang/fa/settings.php +++ b/lib/plugins/authldap/lang/fa/settings.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Mohammad Sadegh + * @author Omid Hezaveh */ +$lang['starttls'] = 'از تی‌ال‌اس (TLS) استفاده می‌کنید؟'; $lang['bindpw'] = 'رمزعبور کاربر بالا'; -- cgit v1.2.3 From 4b5834378cc09b182f926aa21a58b50842719f77 Mon Sep 17 00:00:00 2001 From: Torpedo Date: Tue, 9 Dec 2014 23:16:25 +0100 Subject: translation update --- lib/plugins/authpgsql/lang/it/settings.php | 2 ++ lib/plugins/extension/lang/it/lang.php | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authpgsql/lang/it/settings.php b/lib/plugins/authpgsql/lang/it/settings.php index baf40a468..e8a40dcb2 100644 --- a/lib/plugins/authpgsql/lang/it/settings.php +++ b/lib/plugins/authpgsql/lang/it/settings.php @@ -4,8 +4,10 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Francesco + * @author Torpedo */ $lang['server'] = 'Il tuo server PostgreSQL '; $lang['port'] = 'La porta del tuo server PostgreSQL '; $lang['user'] = 'Lo username PostgreSQL'; $lang['database'] = 'Database da usare'; +$lang['getUsers'] = 'Dichiarazione SQL per elencare tutti gli utenti'; diff --git a/lib/plugins/extension/lang/it/lang.php b/lib/plugins/extension/lang/it/lang.php index 7dff6c5b2..1aa658e0f 100644 --- a/lib/plugins/extension/lang/it/lang.php +++ b/lib/plugins/extension/lang/it/lang.php @@ -5,11 +5,18 @@ * * @author Francesco * @author Fabio + * @author Torpedo */ +$lang['unknownauthor'] = 'Autore sconosciuto'; +$lang['unknownversion'] = 'Revisione sconosciuta'; +$lang['btn_info'] = 'Mostra maggiori informazioni'; +$lang['btn_update'] = 'Aggiorna'; +$lang['btn_uninstall'] = 'Disinstalla'; $lang['btn_enable'] = 'Abilita'; $lang['btn_disable'] = 'Disabilita'; $lang['btn_install'] = 'Installa'; $lang['btn_reinstall'] = 'Reinstalla'; +$lang['js']['reallydel'] = 'Sicuro di disinstallare questa estensione?'; $lang['search'] = 'Cerca'; $lang['homepage_link'] = 'Documenti'; $lang['bugs_features'] = 'Bug'; @@ -18,13 +25,18 @@ $lang['author_hint'] = 'Cerca estensioni per questo autore'; $lang['installed'] = 'Installato:'; $lang['downloadurl'] = 'URL download:'; $lang['repository'] = 'Repository'; +$lang['unknown'] = 'sconosciuto'; $lang['installed_version'] = 'Versione installata'; $lang['install_date'] = 'Il tuo ultimo aggiornamento:'; $lang['available_version'] = 'Versione disponibile:'; $lang['compatible'] = 'Compatibile con:'; +$lang['depends'] = 'Dipende da:'; $lang['similar'] = 'Simile a:'; +$lang['conflicts'] = 'Conflitto con:'; $lang['donate'] = 'Simile a questo?'; +$lang['donate_action'] = 'Paga un caffè all\'autore!'; $lang['repo_retry'] = 'Riprova'; +$lang['provides'] = 'Fornisce:'; $lang['status'] = 'Status:'; $lang['status_installed'] = 'installato'; $lang['status_not_installed'] = 'non installato'; @@ -34,6 +46,15 @@ $lang['status_disabled'] = 'disabilitato'; $lang['status_unmodifiable'] = 'inmodificabile'; $lang['status_plugin'] = 'plugin'; $lang['status_template'] = 'modello'; +$lang['msg_enabled'] = 'Plugin %s abilitato'; +$lang['msg_disabled'] = 'Plugin %s disabilitato'; +$lang['msg_delete_success'] = 'Estensione %s disinstallata'; +$lang['msg_plugin_install_success'] = 'Plugin %s installato con successo'; +$lang['msg_plugin_update_success'] = 'Plugin %s aggiornato con successo'; +$lang['msg_upload_failed'] = 'Caricamento del file fallito'; +$lang['missing_dependency'] = 'Dipendenza mancante o disabilitata: %s'; +$lang['update_available'] = 'Aggiornamento: Nuova versione %s disponibile.'; +$lang['wrong_folder'] = 'Plugin non installato correttamente: rinomina la directory del plugin "%s" in "%s".'; $lang['error_badurl'] = 'URLs deve iniziare con http o https'; $lang['error_dircreate'] = 'Impossibile creare una cartella temporanea per ricevere il download'; $lang['error_download'] = 'Impossibile scaricare il file: %s'; -- cgit v1.2.3 From 7c3df9b4f9d2f084b649907bf1f6c3a71454cf9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Birk?= Date: Wed, 10 Dec 2014 09:31:28 +0100 Subject: translation update --- lib/plugins/authmysql/lang/da/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authmysql/lang/da/settings.php b/lib/plugins/authmysql/lang/da/settings.php index 1e38cb6b4..ed21201fb 100644 --- a/lib/plugins/authmysql/lang/da/settings.php +++ b/lib/plugins/authmysql/lang/da/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Jens Hyllegaard * @author soer9648 */ @@ -11,6 +11,7 @@ $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['debug'] = 'Vis yderligere debug output'; $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'; @@ -21,7 +22,6 @@ $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'; -- cgit v1.2.3 From 52a281e8549d1a9269ce7ced1336a567086962c5 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 10 Dec 2014 12:49:43 +0100 Subject: Some PHPDocs media and admin plugin --- lib/plugins/admin.php | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/admin.php b/lib/plugins/admin.php index d063af612..39dece453 100644 --- a/lib/plugins/admin.php +++ b/lib/plugins/admin.php @@ -15,10 +15,13 @@ if(!defined('DOKU_INC')) die(); class DokuWiki_Admin_Plugin extends DokuWiki_Plugin { /** + * Return the text that is displayed at the main admin menu + * (Default localized language string 'menu' is returned, override this function for setting another name) + * * @param string $language language code - * @return string + * @return string menu string */ - function getMenuText($language) { + public function getMenuText($language) { $menutext = $this->getLang('menu'); if (!$menutext) { $info = $this->getInfo(); @@ -28,32 +31,47 @@ class DokuWiki_Admin_Plugin extends DokuWiki_Plugin { } /** + * Determine position in list in admin window + * Lower values are sorted up + * * @return int */ - function getMenuSort() { + public function getMenuSort() { return 1000; } - - function handle() { + /** + * Carry out required processing + */ + public function handle() { trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING); } - function html() { + /** + * Output html of the admin page + */ + public function html() { trigger_error('html() not implemented in '.get_class($this), E_USER_WARNING); } /** + * Return true for access only by admins (config:superuser) or false if managers are allowed as well + * * @return bool */ - function forAdminOnly() { + public function forAdminOnly() { return true; } /** + * Return array with ToC items. Items can be created with the html_mktocitem() + * + * @see html_mktocitem() + * @see tpl_toc() + * * @return array */ - function getTOC(){ + public function getTOC(){ return array(); } } -- cgit v1.2.3 From 85c59bdbad852d23519e5f77c0e2d7f7ec60121f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Birk?= Date: Thu, 11 Dec 2014 11:15:57 +0100 Subject: translation update --- lib/plugins/extension/lang/da/lang.php | 24 ++++++++++++++++++++++++ lib/plugins/usermanager/lang/da/import.txt | 9 +++++++++ lib/plugins/usermanager/lang/da/lang.php | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 lib/plugins/extension/lang/da/lang.php create mode 100644 lib/plugins/usermanager/lang/da/import.txt (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/da/lang.php b/lib/plugins/extension/lang/da/lang.php new file mode 100644 index 000000000..c341bc5f9 --- /dev/null +++ b/lib/plugins/extension/lang/da/lang.php @@ -0,0 +1,24 @@ + + */ +$lang['update_available'] = 'Opdatering: Ny version %s er tilgængelig.'; +$lang['wrong_folder'] = 'Plugin ikke installeret korrekt: Omdøb plugin-mappe "%s" til "%s".'; +$lang['url_change'] = 'URL ændret: Download-URL er blevet ændret siden sidste download. Kontrollér om den nye URL er valid, inden udvidelsen opdateres.
    Ny: %s
    Gammel: %s'; +$lang['error_badurl'] = 'URL\'er skal starte med http eller https'; +$lang['error_dircreate'] = 'Ikke i stand til at oprette midlertidig mappe til modtagelse af download'; +$lang['error_download'] = 'Ikke i stand til at downloade filen: %s'; +$lang['error_decompress'] = 'Ikke i stand til at dekomprimere den downloadede fil. Dette kan være et resultat af en dårlig download, hvor du i så fald bør du prøve igen; eller komprimeringsformatet kan være ukendt, hvor du i så fald bliver nød til at downloade og installere manuelt.'; +$lang['error_findfolder'] = 'Ikke i stand til at identificere udvidelsesmappe - du bliver nød til at downloade og installere manuelt.'; +$lang['error_copy'] = 'Der opstod en kopieringsfejl under installation af filer til mappen %s: disken kan være fuld, eller mangel på fil-tilladelser. Dette kan have resulteret i et delvist installeret plugin, og efterladt din wiki-installation ustabil.'; +$lang['noperms'] = 'Udvidelsesmappe er ikke skrivbar'; +$lang['notplperms'] = 'Skabelonmappe er ikke skrivbar'; +$lang['nopluginperms'] = 'Pluginmappe er ikke skrivbar'; +$lang['git'] = 'Udvidelsen blev installeret via git - du vil muligvis ikke opdatere herfra.'; +$lang['auth'] = 'Auth-plugin er ikke aktiveret i konfigurationen - overvej at deaktivere den.'; +$lang['install_url'] = 'Installér fra URL:'; +$lang['install_upload'] = 'Upload Udvidelse:'; +$lang['repo_error'] = 'Plugin-arkivet kunne ikke kontaktes. Kontrollér at din server kan kontakte www.dokuwiki.org kontrollér dine proxy-indstillinger.'; diff --git a/lib/plugins/usermanager/lang/da/import.txt b/lib/plugins/usermanager/lang/da/import.txt new file mode 100644 index 000000000..8ff1946b8 --- /dev/null +++ b/lib/plugins/usermanager/lang/da/import.txt @@ -0,0 +1,9 @@ +===== Samling af Brugere Import ===== + +Kræver en CSV-fil med brugere på mindst fire kolonner. +Kolonnerne skal indeholde, i denne orden: bruger-id, fulde navn, email-adresse og grupper. +CSV-felterne skal separeres af kommaer (,) og strengafgrænser med anførelsestegn (%%""%%). Backslash (\) kan benyttes som "escape character". +For et eksempel på en brugbar fil, kan du prøve "Eksportér Brugere"-funktionen her over. +Overlappende bruger-id'er bliver ignoreret. + +En adgangskode vil blive genereret og sendt til hver succesfuldt importeret bruger. \ No newline at end of file diff --git a/lib/plugins/usermanager/lang/da/lang.php b/lib/plugins/usermanager/lang/da/lang.php index 47d7efea2..795024f89 100644 --- a/lib/plugins/usermanager/lang/da/lang.php +++ b/lib/plugins/usermanager/lang/da/lang.php @@ -13,6 +13,7 @@ * @author Michael Pedersen subben@gmail.com * @author Mikael Lyngvig * @author soer9648 + * @author Søren Birk */ $lang['menu'] = 'Brugerstyring'; $lang['noauth'] = '(Brugervalidering er ikke tilgængelig)'; @@ -72,3 +73,4 @@ $lang['import_error_upload'] = 'Import Fejlet. CSV-filen kunne ikke uploades e $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.'; +$lang['import_downloadfailures'] = 'Download Fejl som CSV til rettelser'; -- cgit v1.2.3 From 1ec86040f8d873bffe71d0acacf7e9750804f0f4 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 11 Dec 2014 21:19:10 +0100 Subject: check for SSL support in the extension manager --- lib/plugins/extension/admin.php | 4 ++++ lib/plugins/extension/lang/en/lang.php | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index de4992937..71257cf43 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -54,6 +54,10 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { msg($this->getLang('repo_error').' ['.$this->getLang('repo_retry').']', -1); } + if(!in_array('ssl', stream_get_transports())) { + msg($this->getLang('nossl'), -1); + } + /* @var helper_plugin_extension_extension $extension */ $extension = $this->loadHelper('extension_extension'); diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index d7541b422..f545b6da3 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -100,4 +100,5 @@ $lang['auth'] = 'This auth plugin is not enabled in conf $lang['install_url'] = 'Install from URL:'; $lang['install_upload'] = 'Upload Extension:'; -$lang['repo_error'] = 'The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy settings.'; \ No newline at end of file +$lang['repo_error'] = 'The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy settings.'; +$lang['nossl'] = 'Your PHP seems to miss SSL support. Downloading will not work for many DokuWiki extensions.'; \ No newline at end of file -- cgit v1.2.3 From 903f0494e8d0b7fbbda7072ee9fa8aef2ea72cb1 Mon Sep 17 00:00:00 2001 From: Satoshi Sahara Date: Fri, 12 Dec 2014 11:41:28 +0100 Subject: translation update --- lib/plugins/extension/lang/ja/lang.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php index dec46d629..5264bfb09 100644 --- a/lib/plugins/extension/lang/ja/lang.php +++ b/lib/plugins/extension/lang/ja/lang.php @@ -5,6 +5,7 @@ * * @author Hideaki SAWADA * @author PzF_X + * @author Satoshi Sahara */ $lang['menu'] = '拡張機能管理'; $lang['tab_plugins'] = 'インストール済プラグイン'; @@ -63,6 +64,7 @@ $lang['status_bundled'] = '同梱'; $lang['msg_enabled'] = '%s プラグインを有効化しました。'; $lang['msg_disabled'] = '%s プラグインを無効化しました。'; $lang['msg_delete_success'] = '拡張機能をアンインストールしました。'; +$lang['msg_delete_failed'] = '拡張機能 %s のアンインストールに失敗しました。'; $lang['msg_template_install_success'] = '%s テンプレートをインストールできました。'; $lang['msg_template_update_success'] = '%s テンプレートを更新できました。'; $lang['msg_plugin_install_success'] = '%s プラグインをインストールできました。'; @@ -84,6 +86,8 @@ $lang['noperms'] = '拡張機能ディレクトリが書き込み $lang['notplperms'] = 'テンプレートディレクトリが書き込み不可です。'; $lang['nopluginperms'] = 'プラグインディレクトリが書き込み不可です。'; $lang['git'] = 'この拡張機能は Git 経由でインストールされており、ここで更新すべきでないかもしれません。'; +$lang['auth'] = 'この認証プラグインは設定管理画面で無効化されています。'; $lang['install_url'] = 'URL からインストール:'; $lang['install_upload'] = '拡張機能をアップロード:'; $lang['repo_error'] = 'プラグインのリポジトリに接続できません。サーバーが www.dokuwiki.org に接続できることやプロキシの設定を確認して下さい。'; +$lang['nossl'] = 'PHP機能がSSLをサポートしていないため、拡張機能のダウンロードが正常に動作しません。'; -- cgit v1.2.3 From ab6ac843b05c4030087d58182c1bcea3dcc4e0af Mon Sep 17 00:00:00 2001 From: Jussi Takala Date: Fri, 12 Dec 2014 12:15:55 +0100 Subject: translation update --- lib/plugins/authmysql/lang/fi/settings.php | 11 +++++++++ lib/plugins/extension/lang/fi/lang.php | 37 ++++++++++++++++++++++++++++++ lib/plugins/usermanager/lang/fi/lang.php | 10 ++++++++ 3 files changed, 58 insertions(+) create mode 100644 lib/plugins/authmysql/lang/fi/settings.php create mode 100644 lib/plugins/extension/lang/fi/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authmysql/lang/fi/settings.php b/lib/plugins/authmysql/lang/fi/settings.php new file mode 100644 index 000000000..32517957b --- /dev/null +++ b/lib/plugins/authmysql/lang/fi/settings.php @@ -0,0 +1,11 @@ + + */ +$lang['server'] = 'Sinun MySQL-serveri'; +$lang['user'] = 'MySQL-käyttäjänimi'; +$lang['password'] = 'Salasana yläolevalle käyttäjälle'; +$lang['charset'] = 'Käytetty merkistö tietokannassa'; diff --git a/lib/plugins/extension/lang/fi/lang.php b/lib/plugins/extension/lang/fi/lang.php new file mode 100644 index 000000000..a154f2563 --- /dev/null +++ b/lib/plugins/extension/lang/fi/lang.php @@ -0,0 +1,37 @@ + + */ +$lang['tab_plugins'] = 'Asennetut liitännäiset'; +$lang['tab_search'] = 'Etsi ja asenna'; +$lang['tab_install'] = 'Manuaalinen asennus'; +$lang['notimplemented'] = 'Tätä ominaisuutta ei ole vielä toteutettu'; +$lang['notinstalled'] = 'Tätä laajennusta ei ole asennettu'; +$lang['alreadyenabled'] = 'Tämä laajennus on jo käytössä'; +$lang['alreadydisabled'] = 'Tämä laajennus on jo otettu pois käytöstä'; +$lang['pluginlistsaveerror'] = 'Tapahtui virhe tallentaessa liitännäislistaa'; +$lang['unknownauthor'] = 'Tuntematon tekijä'; +$lang['unknownversion'] = 'Tuntematon versio'; +$lang['btn_info'] = 'Näytä lisää tietoa'; +$lang['btn_update'] = 'Päivitä'; +$lang['btn_enable'] = 'Ota käyttöön'; +$lang['btn_disable'] = 'Poista käytöstä'; +$lang['btn_install'] = 'Asenna'; +$lang['btn_reinstall'] = 'Uudelleenasenna'; +$lang['js']['reallydel'] = 'Haluatko varmasti poistaa tämän laajennuksen?'; +$lang['search_for'] = 'Etsi laajennusta:'; +$lang['search'] = 'Etsi'; +$lang['downloadurl'] = 'Lataa URL-osoite'; +$lang['installed_version'] = 'Asennettu versio'; +$lang['install_date'] = 'Sinun viimeinen päivitys:'; +$lang['available_version'] = 'Saatavissa oleva versio:'; +$lang['status_installed'] = 'asennettu'; +$lang['status_protected'] = 'suojattu'; +$lang['status_enabled'] = 'otettu käyttöön'; +$lang['status_disabled'] = 'otettu pois käytöstä'; +$lang['status_plugin'] = 'liitännäinen'; +$lang['install_url'] = 'Asenna URL-osoitteesta:'; +$lang['install_upload'] = 'Ladattu laajennus:'; diff --git a/lib/plugins/usermanager/lang/fi/lang.php b/lib/plugins/usermanager/lang/fi/lang.php index de243133a..dba67fb61 100644 --- a/lib/plugins/usermanager/lang/fi/lang.php +++ b/lib/plugins/usermanager/lang/fi/lang.php @@ -7,6 +7,7 @@ * @author Otto Vainio * @author Teemu Mattila * @author Sami Olmari + * @author Jussi Takala */ $lang['menu'] = 'Käyttäjähallinta'; $lang['noauth'] = '(autentikointi ei ole käytössä)'; @@ -29,6 +30,9 @@ $lang['search'] = 'Hae'; $lang['search_prompt'] = 'Tee haku'; $lang['clear'] = 'Tyhjennä hakusuodatin'; $lang['filter'] = 'Suodatin'; +$lang['import'] = 'Tuo uusia käyttäjiä'; +$lang['line'] = 'Rivi nro.'; +$lang['error'] = 'Vikailmoitus'; $lang['summary'] = 'Näytetään käyttäjät %1$d-%2$d / %3$d löytynyttä. %4$d käyttäjää yhteensä.'; $lang['nonefound'] = 'Ei löytynyt käyttäjiä. %d käyttäjää yhteensä.'; $lang['delete_ok'] = '%d käyttäjää poistettu'; @@ -49,3 +53,9 @@ $lang['add_ok'] = 'Käyttäjä lisätty onnistuneesti'; $lang['add_fail'] = 'Käyttäjän lisäys epäonnistui'; $lang['notify_ok'] = 'Ilmoitus sähköpostilla lähetetty'; $lang['notify_fail'] = 'Ilmoitusta sähköpostilla ei voitu lähettää'; +$lang['import_error_baduserid'] = 'Käyttäjätunnus puuttuu'; +$lang['import_error_badname'] = 'Epäkelpo nimi'; +$lang['import_error_badmail'] = 'Epäkelpo sähköpostiosoite'; +$lang['import_error_upload'] = 'Tuonti epäonnistui. CSV-tiedostoa ei voitu ladata tai se on tyhjä.'; +$lang['import_error_readfail'] = 'Tuonti epäonnistui. Ladattua tiedostoa ei voida lukea.'; +$lang['import_error_create'] = 'Käyttäjää ei voida luoda.'; -- cgit v1.2.3 From 4645078a2700c1e5e5fe989d5e45ca4d79bc5279 Mon Sep 17 00:00:00 2001 From: Jaroslav Lichtblau Date: Fri, 12 Dec 2014 13:16:14 +0100 Subject: translation update --- lib/plugins/extension/lang/cs/lang.php | 7 +++++++ lib/plugins/usermanager/lang/cs/lang.php | 1 + 2 files changed, 8 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/cs/lang.php b/lib/plugins/extension/lang/cs/lang.php index f6db2b153..c8fd583c4 100644 --- a/lib/plugins/extension/lang/cs/lang.php +++ b/lib/plugins/extension/lang/cs/lang.php @@ -63,6 +63,7 @@ $lang['status_bundled'] = 'svázaný'; $lang['msg_enabled'] = 'Zásuvný modul %s povolen'; $lang['msg_disabled'] = 'Zásuvný modul %s zakázán'; $lang['msg_delete_success'] = 'Rozšíření odinstalováno'; +$lang['msg_delete_failed'] = 'Odinstalování rozšíření %s selhalo'; $lang['msg_template_install_success'] = 'Šablona %s úspěšně nainstalována'; $lang['msg_template_update_success'] = 'Šablona %s úspěšně aktualizována'; $lang['msg_plugin_install_success'] = 'Zásuvný modul %s úspěšně nainstalován.'; @@ -73,6 +74,7 @@ $lang['security_issue'] = 'Bezpečnostní problém: %s'; $lang['security_warning'] = 'Bezpečnostní varování: %s'; $lang['update_available'] = 'Aktualizace: Je dostupná nová verze %s.'; $lang['wrong_folder'] = 'Zásuvný modul nesprávně nainstalován: Přejmenujte adresár modulu "%s" na "%s".'; +$lang['url_change'] = 'URL se změnila: URL pro stahování se změnila od poslední aktualizace. Před další aktualizací tohoto rozšíření ověřte správnost nové URL.
    Nová: %s
    Stará: %s'; $lang['error_badurl'] = 'Adresy URL by měly začínat s http nebo https'; $lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář pro přijetí stahování'; $lang['error_download'] = 'Nelze stáhnout soubor: %s'; @@ -81,3 +83,8 @@ $lang['noperms'] = 'Nelze zapisovat do adresáře pro rozšířen $lang['notplperms'] = 'Nelze zapisovat do odkládacího adresáře'; $lang['nopluginperms'] = 'Nelze zapisovat do adresáře se zásuvnými moduly'; $lang['git'] = 'Toto rozšíření bylo nainstalováno přes git, nejspíš ho tady aktualizovat nechcete.'; +$lang['auth'] = 'Tento ověřovací zásuvný modul není povolen v nastavení, zvažte jeho deaktivaci.'; +$lang['install_url'] = 'Nainstalovat z URL:'; +$lang['install_upload'] = 'Nahrát rozšíření:'; +$lang['repo_error'] = 'Nelze kontaktovat repozitář se zásuvnými moduly. Ujistěte se, že váš server může kontaktovat www.dokuwiki.org a zkontrolujte nastavení proxy.'; +$lang['nossl'] = 'Použité PHP pravděpodobně nepodporuje SSL. Stažení mnoha DokuWiki rozšíření nebude fungovat.'; diff --git a/lib/plugins/usermanager/lang/cs/lang.php b/lib/plugins/usermanager/lang/cs/lang.php index 6fbfe8535..d715d1dfb 100644 --- a/lib/plugins/usermanager/lang/cs/lang.php +++ b/lib/plugins/usermanager/lang/cs/lang.php @@ -75,3 +75,4 @@ $lang['import_error_upload'] = 'Import selhal. CSV soubor nemohl být nahrán $lang['import_error_readfail'] = 'Import selhal. Nelze číst nahraný soubor.'; $lang['import_error_create'] = 'Nelze vytvořit uživatele'; $lang['import_notify_fail'] = 'Importovanému uživateli %s s emailem %s nemohlo být zasláno upozornění.'; +$lang['import_downloadfailures'] = 'Stáhnout chyby pro nápravu jako CVS'; -- cgit v1.2.3 From 4ac117924853a8fb3d2826fa814eec444df97323 Mon Sep 17 00:00:00 2001 From: Type-kun Date: Fri, 12 Dec 2014 20:06:31 +0100 Subject: translation update --- lib/plugins/authad/lang/ru/settings.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/ru/settings.php b/lib/plugins/authad/lang/ru/settings.php index 0212589d7..6d92bb163 100644 --- a/lib/plugins/authad/lang/ru/settings.php +++ b/lib/plugins/authad/lang/ru/settings.php @@ -9,11 +9,13 @@ * @author Erli Moen * @author Владимир * @author Aleksandr Selivanov + * @author Type-kun */ $lang['account_suffix'] = 'Суффикс вашего аккаунта. Например, @my.domain.org'; $lang['domain_controllers'] = 'Список DNS-серверов, разделенных запятой. Например:srv1.domain.org,srv2.domain.org'; $lang['admin_password'] = 'Пароль для указанного пользователя.'; $lang['sso'] = 'Использовать SSO (Single-Sign-On) через Kerberos или NTLM?'; +$lang['sso_charset'] = 'Кодировка, в которой веб-сервер передаёт имя пользователя Kerberos или NTLM. Для UTF-8 или latin-1 остаётся пустым. Требует расширение iconv.'; $lang['use_ssl'] = 'Использовать SSL? Если да, то не включайте TLS.'; $lang['use_tls'] = 'Использовать TLS? Если да, то не включайте SSL.'; $lang['debug'] = 'Выводить дополнительную информацию при ошибках?'; -- cgit v1.2.3 From d52dfa3a1a992c5cbc5517cc2fc9e947d3a54ee4 Mon Sep 17 00:00:00 2001 From: Jaroslav Lichtblau Date: Sat, 13 Dec 2014 12:56:08 +0100 Subject: translation update --- lib/plugins/acl/lang/cs/help.txt | 13 +++++-------- lib/plugins/authmysql/lang/cs/settings.php | 5 +++-- lib/plugins/authpgsql/lang/cs/settings.php | 5 +++-- lib/plugins/extension/lang/cs/lang.php | 6 ++++-- lib/plugins/usermanager/lang/cs/lang.php | 10 +++++----- 5 files changed, 20 insertions(+), 19 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/lang/cs/help.txt b/lib/plugins/acl/lang/cs/help.txt index 1dbc88ad0..1b6fa1eac 100644 --- a/lib/plugins/acl/lang/cs/help.txt +++ b/lib/plugins/acl/lang/cs/help.txt @@ -1,11 +1,8 @@ === Nápověda: === -Na této stránce můžete přidávat a odebírat oprávnění na jmenné prostory a stránky Vaší wiki. +Na této stránce můžete přidávat a odebírat oprávnění pro jmenné prostory a stránky svojí wiki. +* Levý panel zobrazuje všechny dostupné jmenné prostory a stránky. +* Formulář výše umožňuje vidět a modifikovat oprávnění vybraného uživatele nebo skupiny. +* V tabulce uvedené níže jsou zobrazeny všechna aktuální pravidla pro řízení přístupu (oprávnění). Zde můžete rychle odebírat a měnit více položek (oprávnění) najednou. -Levý panel zobrazuje všechny dostupné jmenné prostory a stránky. - -Formulář výše umožňuje vidět a modifikovat oprávnění vybraného uživatele nebo skupiny. - -V tabulce uvedené níže jsou zobrazeny všechny aktuální pravidla pro řízení přístupu (oprávnění). Zde můžete rychle odebírat a měnit více položek (oprávnění) najednou. - -Pro detailnější nápovědu si přečtěte stránku [[doku>acl|oficiální dokumentaci ACL]], která Vám může pomoci plně pochopit princip, jak řízení přístupu na DokuWiki funguje. +Pro detailnější nápovědu si přečtěte stránku [[doku>acl|oficiální dokumentace ACL]], která Vám může pomoci plně pochopit princip, na kterém řízení přístupu na DokuWiki funguje. diff --git a/lib/plugins/authmysql/lang/cs/settings.php b/lib/plugins/authmysql/lang/cs/settings.php index 350c3236b..09146a451 100644 --- a/lib/plugins/authmysql/lang/cs/settings.php +++ b/lib/plugins/authmysql/lang/cs/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author mkucera66@seznam.cz + * @author Jaroslav Lichtblau */ $lang['server'] = 'Váš server MySQL'; $lang['user'] = 'Uživatelské jméno pro MySQL'; @@ -19,7 +20,7 @@ $lang['getGroups'] = 'Příkaz SQL pro získání uživatelovy skupi $lang['getUsers'] = 'Příkaz SQL pro seznam všech uživatelů'; $lang['FilterLogin'] = 'Příkaz SQL pro filtrování uživatelů podle přihlašovacího jména'; $lang['FilterName'] = 'Příkaz SQL pro filtrování uživatelů podle celého jména'; -$lang['FilterEmail'] = 'Příkaz SQL pro filtrování uživatelů podle adres emailů'; +$lang['FilterEmail'] = 'Příkaz SQL pro filtrování uživatelů podle adres e-mailů'; $lang['FilterGroup'] = 'Příkaz SQL pro filtrování uživatelů podle členství ve skupinách'; $lang['SortOrder'] = 'Příkaz SQL pro řazení uživatelů'; $lang['addUser'] = 'Příkaz SQL pro přidání nového uživatele'; @@ -32,7 +33,7 @@ $lang['delUserRefs'] = 'Příkaz SQL pro odstranění členství uživ $lang['updateUser'] = 'Příkaz SQL pro aktualizaci uživatelského profilu'; $lang['UpdateLogin'] = 'Klauzule pro aktualizaci přihlačovacího jména uživatele'; $lang['UpdatePass'] = 'Klauzule pro aktualizaci hesla uživatele'; -$lang['UpdateEmail'] = 'Klauzule pro aktualizaci emailové adresy uživatele'; +$lang['UpdateEmail'] = 'Klauzule pro aktualizaci e-mailové adresy uživatele'; $lang['UpdateName'] = 'Klauzule pro aktualizaci celého jména uživatele'; $lang['UpdateTarget'] = 'Omezující klauzule pro identifikaci uživatele při aktualizaci'; $lang['delUserGroup'] = 'Příkaz SQL pro zrušení členství uživatele v dané skupině'; diff --git a/lib/plugins/authpgsql/lang/cs/settings.php b/lib/plugins/authpgsql/lang/cs/settings.php index aec7eecf1..ad135e241 100644 --- a/lib/plugins/authpgsql/lang/cs/settings.php +++ b/lib/plugins/authpgsql/lang/cs/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author mkucera66@seznam.cz + * @author Jaroslav Lichtblau */ $lang['server'] = 'Váš server PostgreSQL'; $lang['port'] = 'Port vašeho serveru PostgreSQL'; @@ -18,7 +19,7 @@ $lang['getGroups'] = 'Příkaz SQL pro získání členství uživat $lang['getUsers'] = 'Příkaz SQL pro seznam všech uživatelů'; $lang['FilterLogin'] = 'Příkaz SQL pro filtrování uživatelů podle přihlašovacího jména'; $lang['FilterName'] = 'Příkaz SQL pro filtrování uživatelů podle celého jména'; -$lang['FilterEmail'] = 'Příkaz SQL pro filtrování uživatelů podle adres emailů'; +$lang['FilterEmail'] = 'Příkaz SQL pro filtrování uživatelů podle adres e-mailů'; $lang['FilterGroup'] = 'Příkaz SQL pro filtrování uživatelů podle členství ve skupinách'; $lang['SortOrder'] = 'Příkaz SQL pro řazení uživatelů'; $lang['addUser'] = 'Příkaz SQL pro řazení uživatelů'; @@ -31,7 +32,7 @@ $lang['delUserRefs'] = 'Příkaz SQL pro odstranění členství uživ $lang['updateUser'] = 'Příkaz SQL pro aktualizaci uživatelského profilu'; $lang['UpdateLogin'] = 'Klauzule pro aktualizaci přihlačovacího jména uživatele'; $lang['UpdatePass'] = 'Klauzule pro aktualizaci hesla uživatele'; -$lang['UpdateEmail'] = 'Klauzule pro aktualizaci emailové adresy uživatele'; +$lang['UpdateEmail'] = 'Klauzule pro aktualizaci e-mailové adresy uživatele'; $lang['UpdateName'] = 'Klauzule pro aktualizaci celého jména uživatele'; $lang['UpdateTarget'] = 'Omezující klauzule pro identifikaci uživatele při aktualizaci'; $lang['delUserGroup'] = 'Příkaz SQL pro zrušení členství uživatele v dané skupině'; diff --git a/lib/plugins/extension/lang/cs/lang.php b/lib/plugins/extension/lang/cs/lang.php index c8fd583c4..dc38afd52 100644 --- a/lib/plugins/extension/lang/cs/lang.php +++ b/lib/plugins/extension/lang/cs/lang.php @@ -73,16 +73,18 @@ $lang['missing_dependency'] = 'Chybějící nebo zakázaná závislos $lang['security_issue'] = 'Bezpečnostní problém: %s'; $lang['security_warning'] = 'Bezpečnostní varování: %s'; $lang['update_available'] = 'Aktualizace: Je dostupná nová verze %s.'; -$lang['wrong_folder'] = 'Zásuvný modul nesprávně nainstalován: Přejmenujte adresár modulu "%s" na "%s".'; +$lang['wrong_folder'] = 'Zásuvný modul nesprávně nainstalován: Přejmenujte adresář modulu "%s" na "%s".'; $lang['url_change'] = 'URL se změnila: URL pro stahování se změnila od poslední aktualizace. Před další aktualizací tohoto rozšíření ověřte správnost nové URL.
    Nová: %s
    Stará: %s'; $lang['error_badurl'] = 'Adresy URL by měly začínat s http nebo https'; $lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář pro přijetí stahování'; $lang['error_download'] = 'Nelze stáhnout soubor: %s'; +$lang['error_decompress'] = 'Selhalo rozbalení staženého souboru. Toto je nejspíš důsledek poškození souboru při přenosu, zkuste soubor stáhnout znovu; případně nemusel být rozpoznán formát sbaleného souboru a bude třeba přistoupit k ruční instalaci. '; $lang['error_findfolder'] = 'Nelze rozpoznat adresář pro rozšíření, je třeba stáhnout a instalovat ručně'; +$lang['error_copy'] = 'Došlo k chybě kopírování souborů při pokusu nainstalovat soubory do adresáře %s: může být plný disk nebo špatně nastavena přístupová práva. Tato chyba mohla zapříčinit pouze částečnou instalaci zásuvného modulu a uvést wiki do nestabilního stavu.'; $lang['noperms'] = 'Nelze zapisovat do adresáře pro rozšíření'; $lang['notplperms'] = 'Nelze zapisovat do odkládacího adresáře'; $lang['nopluginperms'] = 'Nelze zapisovat do adresáře se zásuvnými moduly'; -$lang['git'] = 'Toto rozšíření bylo nainstalováno přes git, nejspíš ho tady aktualizovat nechcete.'; +$lang['git'] = 'Toto rozšíření bylo nainstalováno přes git. Touto cestou ho nejspíš tady aktualizovat nechcete.'; $lang['auth'] = 'Tento ověřovací zásuvný modul není povolen v nastavení, zvažte jeho deaktivaci.'; $lang['install_url'] = 'Nainstalovat z URL:'; $lang['install_upload'] = 'Nahrát rozšíření:'; diff --git a/lib/plugins/usermanager/lang/cs/lang.php b/lib/plugins/usermanager/lang/cs/lang.php index d715d1dfb..6130fccd8 100644 --- a/lib/plugins/usermanager/lang/cs/lang.php +++ b/lib/plugins/usermanager/lang/cs/lang.php @@ -56,13 +56,13 @@ $lang['next'] = 'další'; $lang['last'] = 'poslední'; $lang['edit_usermissing'] = 'Vybraný uživatel nebyl nalezen, zadané uživatelského mohlo být smazáno nebo změněno.'; $lang['user_notify'] = 'Upozornit uživatele'; -$lang['note_notify'] = 'Maily s upozorněním se budou posílat pouze, když uživatel dostává nové heslo.'; +$lang['note_notify'] = 'E-maily s upozorněním se budou posílat pouze, když uživatel dostává nové heslo.'; $lang['note_group'] = 'Noví uživatelé budou přidáváni do této výchozí skupiny (%s), pokud pro ně není uvedena žádná skupina.'; $lang['note_pass'] = 'Heslo bude automaticky vygenerováno, pokud je pole ponecháno prázdné a je zapnuto upozornění uživatele.'; $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['notify_ok'] = 'Odeslán e-mail s upozorněním'; +$lang['notify_fail'] = 'E-mail s upozorněním nebylo možno odeslat'; $lang['import_userlistcsv'] = 'Seznam uživatelů (CSV):'; $lang['import_header'] = 'Poslední selhání importu'; $lang['import_success_count'] = 'Import uživatelů: nalezeno %d uživatelů, %d úspěšně importováno.'; @@ -70,9 +70,9 @@ $lang['import_failure_count'] = 'Import uživatelů: %d selhalo. Seznam chybný $lang['import_error_fields'] = 'Nedostatek položek, nalezena/y %d, požadovány 4.'; $lang['import_error_baduserid'] = 'Chybí User-id'; $lang['import_error_badname'] = 'Špatné jméno'; -$lang['import_error_badmail'] = 'Špatná emailová adresa'; +$lang['import_error_badmail'] = 'Špatná e-mailová adresa'; $lang['import_error_upload'] = 'Import selhal. CSV soubor nemohl být nahrán nebo je prázdný.'; $lang['import_error_readfail'] = 'Import selhal. Nelze číst nahraný soubor.'; $lang['import_error_create'] = 'Nelze vytvořit uživatele'; -$lang['import_notify_fail'] = 'Importovanému uživateli %s s emailem %s nemohlo být zasláno upozornění.'; +$lang['import_notify_fail'] = 'Importovanému uživateli %s s e-mailem %s nemohlo být zasláno upozornění.'; $lang['import_downloadfailures'] = 'Stáhnout chyby pro nápravu jako CVS'; -- cgit v1.2.3 From e9e4d4669dcc75b110847c78bdf6b80a0f47628b Mon Sep 17 00:00:00 2001 From: Type-kun Date: Sat, 13 Dec 2014 17:20:59 +0100 Subject: translation update --- lib/plugins/authad/lang/ru/settings.php | 1 + lib/plugins/extension/lang/ru/lang.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/ru/settings.php b/lib/plugins/authad/lang/ru/settings.php index 6d92bb163..bb8197765 100644 --- a/lib/plugins/authad/lang/ru/settings.php +++ b/lib/plugins/authad/lang/ru/settings.php @@ -19,3 +19,4 @@ $lang['sso_charset'] = 'Кодировка, в которой веб- $lang['use_ssl'] = 'Использовать SSL? Если да, то не включайте TLS.'; $lang['use_tls'] = 'Использовать TLS? Если да, то не включайте SSL.'; $lang['debug'] = 'Выводить дополнительную информацию при ошибках?'; +$lang['expirywarn'] = 'За сколько дней нужно предупреждать пользователя о необходимости изменить пароль. 0 - отключить.'; diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php index 24e6fe224..8e9e10b95 100644 --- a/lib/plugins/extension/lang/ru/lang.php +++ b/lib/plugins/extension/lang/ru/lang.php @@ -5,6 +5,7 @@ * * @author Aleksandr Selivanov * @author Igor Degraf + * @author Type-kun */ $lang['menu'] = 'Управление дополнениями'; $lang['tab_plugins'] = 'Установленные плагины'; @@ -12,6 +13,9 @@ $lang['tab_templates'] = 'Установленные шаблоны'; $lang['tab_search'] = 'Поиск и установка'; $lang['tab_install'] = 'Ручная установка'; $lang['notinstalled'] = 'Это дополнение не установлено'; +$lang['alreadyenabled'] = 'Это расширение уже включено'; +$lang['alreadydisabled'] = 'Это расширение уже выключено'; +$lang['pluginlistsaveerror'] = 'Ошибка при сохранении списка плагинов'; $lang['unknownauthor'] = 'Автор неизвестен'; $lang['unknownversion'] = 'Версия неизвестна'; $lang['btn_info'] = 'Отобразить доп. информацию'; @@ -25,6 +29,7 @@ $lang['js']['reallydel'] = 'Действительно удалить эт $lang['search_for'] = 'Поиск дополнения:'; $lang['search'] = 'Найти'; $lang['extensionby'] = '%s — %s'; +$lang['screenshot'] = 'Скриншот: %s'; $lang['popularity'] = 'Популярность: %s%%'; $lang['homepage_link'] = 'Описание'; $lang['bugs_features'] = 'Баг-трекер'; @@ -58,12 +63,21 @@ $lang['status_bundled'] = 'в комплекте'; $lang['msg_enabled'] = 'Плагин %s включён'; $lang['msg_disabled'] = 'Плагин %s отключён'; $lang['msg_delete_success'] = 'Дополнение удалено'; +$lang['msg_delete_failed'] = 'Не удалось удалить расширение %s'; $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['update_available'] = 'Обновление: доступна новая версия %s.'; +$lang['wrong_folder'] = 'Плагин установлен неправильно: Переименуйте директорию "%s" в "%s".'; +$lang['url_change'] = 'Ссылка изменилась: Ссылка для загрузки изменилась с прошлого раза. Проверьте новую ссылку прежде чем обновлять расширение.
    Новая: %s
    Старая: %s'; $lang['error_badurl'] = 'Ссылки должны начинаться с http или https'; +$lang['error_dircreate'] = 'Не удалось создать временную директорию для загрузки'; +$lang['error_download'] = 'Не удалось загрузить файл: %s'; +$lang['error_decompress'] = 'Не удалось распаковать загруженный файл. Возможно, файл был повреждён при загрузке - тогда нужно попробовать ещё раз. Либо неизвестен формат архива - тогда загрузку и установку надо произвести вручную.'; +$lang['error_findfolder'] = 'Не удалось определить директорию для расширения, загрузку и установку надо произвести вручную.'; +$lang['error_copy'] = 'Возникла ошибка копирования файлов в директорию %s: возможно, диск переполнен, или неверно выставлены права доступа. Это могло привести к неполной установке плагина и нарушить работу вашей вики.'; $lang['noperms'] = 'Папка для расширений недоступна для записи'; $lang['notplperms'] = 'Папка для шаблонов недоступна для записи'; $lang['nopluginperms'] = 'Папка плагинов недоступна для записи'; -- cgit v1.2.3 From d3b0952c873788602821d953e654ba66008117f2 Mon Sep 17 00:00:00 2001 From: Myeongjin Date: Sun, 14 Dec 2014 14:21:03 +0100 Subject: translation update --- lib/plugins/extension/lang/ko/lang.php | 9 ++++++--- lib/plugins/revert/lang/ko/lang.php | 2 +- lib/plugins/usermanager/lang/ko/lang.php | 8 ++++---- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/ko/lang.php b/lib/plugins/extension/lang/ko/lang.php index 53c9b4481..5dc5d8269 100644 --- a/lib/plugins/extension/lang/ko/lang.php +++ b/lib/plugins/extension/lang/ko/lang.php @@ -62,7 +62,8 @@ $lang['status_template'] = '템플릿'; $lang['status_bundled'] = '포함'; $lang['msg_enabled'] = '%s 플러그인이 활성화되었습니다'; $lang['msg_disabled'] = '%s 플러그인이 비활성화되었습니다'; -$lang['msg_delete_success'] = '확장 기능이 제거되었습니다'; +$lang['msg_delete_success'] = '%s 확장 기능이 제거되었습니다'; +$lang['msg_delete_failed'] = '%s 확장 기능 제거에 실패했습니다'; $lang['msg_template_install_success'] = '%s 템플릿을 성공적으로 설치했습니다'; $lang['msg_template_update_success'] = '%s 템플릿을 성공적으로 업데이트했습니다'; $lang['msg_plugin_install_success'] = '%s 플러그인을 성공적으로 설치했습니다'; @@ -79,11 +80,13 @@ $lang['error_dircreate'] = '다운로드를 받을 임시 폴더를 만들 $lang['error_download'] = '파일을 다운로드할 수 없습니다: %s'; $lang['error_decompress'] = '다운로드한 파일의 압축을 풀 수 없습니다. 이는 아마도 잘못된 다운로드의 결과로, 이럴 경우 다시 시도해야 합니다; 또는 압축 형식을 알 수 없으며, 이럴 경우 수동으로 다운로드하고 설치해야 합니다.'; $lang['error_findfolder'] = '확장 기능 디렉터리를 식별할 수 없습니다, 수동으로 다운로드하고 설치해야 합니다'; -$lang['error_copy'] = '%s 디렉터리에 파일을 설치하는 동안 파일 복사 오류가 발생했습니다: 디스크가 꽉 찼거나 파일 접근 권한이 잘못되었을 수도 있습니다. 플러그인 설치가 부분적으로 되었거나 불안정하게 위키 설치가 되었을 수 있습니다.'; +$lang['error_copy'] = '%s 디렉터리에 파일을 설치하는 동안 파일 복사 오류가 발생했습니다: 디스크가 꽉 찼거나 파일 접근 권한이 잘못되었을 수도 있습니다. 플러그인이 부분적으로 설치되어 위키가 불안정할지도 모릅니다'; $lang['noperms'] = '확장 기능 디렉터리에 쓸 수 없습니다'; $lang['notplperms'] = '임시 디렉터리에 쓸 수 없습니다'; $lang['nopluginperms'] = '플러그인 디렉터리에 쓸 수 없습니다'; -$lang['git'] = '이 확장 기능은 git을 통해 설치되었으며, 여기에서 업데이트할 수 없을 수 있습니다.'; +$lang['git'] = '이 확장 기능은 git를 통해 설치되었으며, 여기에서 업데이트할 수 없을 수 있습니다.'; +$lang['auth'] = '이 인증 플러그인은 환경 설정에서 활성화할 수 없습니다, 그것을 비활성화하는 것을 고려하세요.'; $lang['install_url'] = 'URL에서 설치:'; $lang['install_upload'] = '확장 기능 올리기:'; $lang['repo_error'] = '플러그인 저장소에 연결할 수 없습니다. 서버가 www.dokuwiki.org에 연결할 수 있는지 확인하고 프록시 설정을 확인하세요.'; +$lang['nossl'] = 'PHP가 SSL 지원을 하지 않는 것으로 보입니다. 많은 도쿠위키 확장 기능의 다운로드가 작동하지 않을 것입니다.'; diff --git a/lib/plugins/revert/lang/ko/lang.php b/lib/plugins/revert/lang/ko/lang.php index 5666100e9..df4b271b1 100644 --- a/lib/plugins/revert/lang/ko/lang.php +++ b/lib/plugins/revert/lang/ko/lang.php @@ -18,4 +18,4 @@ $lang['removed'] = '%s 제거됨'; $lang['revstart'] = '되돌리기 작업을 시작합니다. 오랜 시간이 걸릴 수 있습니다. 완료되기 전에 스크립트 시간 초과가 발생한다면 더 작은 작업으로 나누어서 되돌리시기 바랍니다.'; $lang['revstop'] = '되돌리기 작업이 성공적으로 끝났습니다.'; $lang['note1'] = '참고: 대소문자를 구별해 찾습니다'; -$lang['note2'] = '참고: 문서는 %s 스팸 단어를 포함하지 않은 최신 판으로 되돌립니다. '; +$lang['note2'] = '참고: 문서는 %s 스팸 단어를 포함하지 않은 최신 판으로 되돌립니다.'; diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index 70e3d94f0..bc76470e8 100644 --- a/lib/plugins/usermanager/lang/ko/lang.php +++ b/lib/plugins/usermanager/lang/ko/lang.php @@ -13,7 +13,7 @@ * @author Garam */ $lang['menu'] = '사용자 관리자'; -$lang['noauth'] = '(사용자 인증이 불가능합니다)'; +$lang['noauth'] = '(사용자 인증을 사용할 수 없습니다)'; $lang['nosupport'] = '(사용자 관리가 지원되지 않습니다)'; $lang['badauth'] = '인증 메커니즘이 잘못되었습니다'; $lang['user_id'] = '사용자'; @@ -35,10 +35,10 @@ $lang['clear'] = '검색 필터 재설정'; $lang['filter'] = '필터'; $lang['export_all'] = '모든 사용자 목록 내보내기 (CSV)'; $lang['export_filtered'] = '필터된 사용자 목록 내보내기 (CSV)'; -$lang['import'] = '새 사용자 목록 가져오기'; +$lang['import'] = '새 사용자 가져오기'; $lang['line'] = '줄 번호'; $lang['error'] = '오류 메시지'; -$lang['summary'] = '찾은 사용자 %3$d 중 %1$d-%2$d을(를) 봅니다. 전체 사용자는 %4$d명입니다.'; +$lang['summary'] = '찾은 사용자 %3$d명 중 %1$d-%2$d을(를) 봅니다. 전체 사용자는 %4$d명입니다.'; $lang['nonefound'] = '찾은 사용자가 없습니다. 전체 사용자는 %d명입니다.'; $lang['delete_ok'] = '사용자 %d명이 삭제되었습니다'; $lang['delete_fail'] = '사용자 %d명을 삭제하는 데 실패했습니다.'; @@ -68,6 +68,6 @@ $lang['import_error_badname'] = '잘못된 이름'; $lang['import_error_badmail'] = '잘못된 이메일 주소'; $lang['import_error_upload'] = '가져오기를 실패했습니다. csv 파일을 올릴 수 없거나 비어 있습니다.'; $lang['import_error_readfail'] = '가져오기를 실패했습니다. 올린 파일을 읽을 수 없습니다.'; -$lang['import_error_create'] = '사용자를 만들 수 없습니다.'; +$lang['import_error_create'] = '사용자를 만들 수 없습니다'; $lang['import_notify_fail'] = '알림 메시지를 가져온 %s (이메일: %s) 사용자에게 보낼 수 없습니다.'; $lang['import_downloadfailures'] = '교정을 위한 CSV로 다운로드 실패'; -- cgit v1.2.3 From e88b0b78dca1024132a36f217b59c9e73a9cc338 Mon Sep 17 00:00:00 2001 From: Vitaly Filatenko Date: Mon, 15 Dec 2014 22:36:37 +0100 Subject: translation update --- lib/plugins/authad/lang/ru/settings.php | 5 +++++ lib/plugins/authldap/lang/ru/settings.php | 10 ++++++++++ lib/plugins/authpgsql/lang/ru/settings.php | 4 ++++ lib/plugins/extension/lang/ru/intro_install.txt | 1 + lib/plugins/extension/lang/ru/intro_plugins.txt | 1 + lib/plugins/extension/lang/ru/intro_search.txt | 1 + lib/plugins/extension/lang/ru/intro_templates.txt | 1 + lib/plugins/extension/lang/ru/lang.php | 5 +++++ lib/plugins/usermanager/lang/ru/lang.php | 2 ++ 9 files changed, 30 insertions(+) create mode 100644 lib/plugins/extension/lang/ru/intro_install.txt create mode 100644 lib/plugins/extension/lang/ru/intro_plugins.txt create mode 100644 lib/plugins/extension/lang/ru/intro_search.txt create mode 100644 lib/plugins/extension/lang/ru/intro_templates.txt (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/ru/settings.php b/lib/plugins/authad/lang/ru/settings.php index bb8197765..99c916b44 100644 --- a/lib/plugins/authad/lang/ru/settings.php +++ b/lib/plugins/authad/lang/ru/settings.php @@ -10,13 +10,18 @@ * @author Владимир * @author Aleksandr Selivanov * @author Type-kun + * @author Vitaly Filatenko */ $lang['account_suffix'] = 'Суффикс вашего аккаунта. Например, @my.domain.org'; +$lang['base_dn'] = 'Ваш базовый DN. Например: DC=my,DC=domain,DC=org'; $lang['domain_controllers'] = 'Список DNS-серверов, разделенных запятой. Например:srv1.domain.org,srv2.domain.org'; +$lang['admin_username'] = 'Привилегированный пользователь Active Directory с доступом ко всем остальным пользовательским данным. Необязательно, однако необходимо для определённых действий вроде отправки почтовой подписки.'; $lang['admin_password'] = 'Пароль для указанного пользователя.'; $lang['sso'] = 'Использовать SSO (Single-Sign-On) через Kerberos или NTLM?'; $lang['sso_charset'] = 'Кодировка, в которой веб-сервер передаёт имя пользователя Kerberos или NTLM. Для UTF-8 или latin-1 остаётся пустым. Требует расширение iconv.'; +$lang['real_primarygroup'] = 'Должна ли использоваться настоящая первичная группа вместо "Domain Users" (медленнее)'; $lang['use_ssl'] = 'Использовать SSL? Если да, то не включайте TLS.'; $lang['use_tls'] = 'Использовать TLS? Если да, то не включайте SSL.'; $lang['debug'] = 'Выводить дополнительную информацию при ошибках?'; $lang['expirywarn'] = 'За сколько дней нужно предупреждать пользователя о необходимости изменить пароль. 0 - отключить.'; +$lang['additional'] = 'Дополнительные AD атрибуты, разделённые запятой, для выборки из данных пользователя. Используется некоторыми плагинами.'; diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php index 5677e06a3..534990648 100644 --- a/lib/plugins/authldap/lang/ru/settings.php +++ b/lib/plugins/authldap/lang/ru/settings.php @@ -8,10 +8,20 @@ * @author Erli Moen * @author Aleksandr Selivanov * @author Владимир + * @author Vitaly Filatenko */ +$lang['server'] = 'Ваш LDAP сервер. Либо имя хоста (localhost), либо полный URL (ldap://server.tld:389)'; +$lang['port'] = 'Порт LDAP сервера, если выше не был указан полный URL'; +$lang['usertree'] = 'Где искать аккаунты пользователей. Например: ou=People, dc=server, dc=tld'; +$lang['grouptree'] = 'Где искать группы пользователей. Например: ou=Group, dc=server, dc=tld'; +$lang['userfilter'] = 'LDAP фильтр для поиска аккаунтов пользователей. Например: (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'LDAP фильтр для поиска групп. Например: (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = 'Версия протокола. Возможно вам нужно указать 3'; $lang['starttls'] = 'Использовать TLS подключения?'; $lang['deref'] = 'Как расшифровывать псевдонимы?'; $lang['bindpw'] = 'Пароль для указанного пользователя.'; +$lang['userscope'] = 'Ограничить область поиска при поиске пользователей'; +$lang['groupscope'] = 'Ограничить область поиска при поиске групп'; $lang['debug'] = 'Показывать дополнительную отладочную информацию при ошибках'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; diff --git a/lib/plugins/authpgsql/lang/ru/settings.php b/lib/plugins/authpgsql/lang/ru/settings.php index 668ba4ef6..416ea0ec9 100644 --- a/lib/plugins/authpgsql/lang/ru/settings.php +++ b/lib/plugins/authpgsql/lang/ru/settings.php @@ -6,6 +6,7 @@ * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Aleksandr Selivanov * @author Aleksandr Selivanov + * @author Vitaly Filatenko */ $lang['server'] = 'Ваш PostgreSQL-сервер'; $lang['port'] = 'Порт вашего PostgreSQL-сервера'; @@ -30,5 +31,8 @@ $lang['getUserID'] = 'Выражение SQL, обеспечиваю $lang['delUser'] = 'Выражение SQL, осуществляющее удаление пользователя'; $lang['delUserRefs'] = 'Выражение SQL, осуществляющее удаление пользователя из всех группы'; $lang['updateUser'] = 'Выражение SQL, осуществляющее обновление профиля пользователя'; +$lang['UpdateLogin'] = 'Измените условие для обновления логина'; +$lang['UpdatePass'] = 'Измените условие для обновления пароля'; +$lang['UpdateEmail'] = 'Измените условие для обновления email'; $lang['delUserGroup'] = 'Выражение SQL, осуществляющее удаление пользователя из указанной группы'; $lang['getGroupID'] = 'Выражение SQL, обеспечивающее получение первичного ключа указанной группы'; diff --git a/lib/plugins/extension/lang/ru/intro_install.txt b/lib/plugins/extension/lang/ru/intro_install.txt new file mode 100644 index 000000000..7b8ac661b --- /dev/null +++ b/lib/plugins/extension/lang/ru/intro_install.txt @@ -0,0 +1 @@ +Здесь вы можете самостоятельно установить плагины и шаблоны, загрузив их или предоставив прямой URL для скачивания. \ No newline at end of file diff --git a/lib/plugins/extension/lang/ru/intro_plugins.txt b/lib/plugins/extension/lang/ru/intro_plugins.txt new file mode 100644 index 000000000..7262516db --- /dev/null +++ b/lib/plugins/extension/lang/ru/intro_plugins.txt @@ -0,0 +1 @@ +Плагины, установленные в вашей DokuWiki. Здесь вы можете их включить или выключить, или даже полностью удалить. Также здесь показываются обновления плагинов, обязательно прочтите документацию плагина перед обновлением. \ No newline at end of file diff --git a/lib/plugins/extension/lang/ru/intro_search.txt b/lib/plugins/extension/lang/ru/intro_search.txt new file mode 100644 index 000000000..a8486eab6 --- /dev/null +++ b/lib/plugins/extension/lang/ru/intro_search.txt @@ -0,0 +1 @@ +Эта вкладка дает вам доступ ко всем имеющимся сторонним плагинам и шаблонам для DokuWiki. Имейте в виду, что установка стороннего кода может представлять **угрозу безопасности**, возможно вам нужно сперва прочитать о [[doku>security#plugin_security|безопасности плагинов]]. \ No newline at end of file diff --git a/lib/plugins/extension/lang/ru/intro_templates.txt b/lib/plugins/extension/lang/ru/intro_templates.txt new file mode 100644 index 000000000..2d0b74256 --- /dev/null +++ b/lib/plugins/extension/lang/ru/intro_templates.txt @@ -0,0 +1 @@ +Это шаблоны, установленные в вашей DokuWiki. Вы можете выбрать шаблон, который нужно использовать в [[?do=admin&page=config|Менеджере Конфигурации]] \ No newline at end of file diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php index 8e9e10b95..64db39b78 100644 --- a/lib/plugins/extension/lang/ru/lang.php +++ b/lib/plugins/extension/lang/ru/lang.php @@ -6,12 +6,14 @@ * @author Aleksandr Selivanov * @author Igor Degraf * @author Type-kun + * @author Vitaly Filatenko */ $lang['menu'] = 'Управление дополнениями'; $lang['tab_plugins'] = 'Установленные плагины'; $lang['tab_templates'] = 'Установленные шаблоны'; $lang['tab_search'] = 'Поиск и установка'; $lang['tab_install'] = 'Ручная установка'; +$lang['notimplemented'] = 'Эта возможность ещё не реализована'; $lang['notinstalled'] = 'Это дополнение не установлено'; $lang['alreadyenabled'] = 'Это расширение уже включено'; $lang['alreadydisabled'] = 'Это расширение уже выключено'; @@ -69,6 +71,9 @@ $lang['msg_template_update_success'] = 'Шаблон %s успешно обно $lang['msg_plugin_install_success'] = 'Плагин %s успешно установлен'; $lang['msg_plugin_update_success'] = 'Плагин %s успешно обновлён'; $lang['msg_upload_failed'] = 'Не удалось загрузить файл'; +$lang['missing_dependency'] = 'Отсутствует или отключена зависимость: %s'; +$lang['security_issue'] = 'Проблема безопасности: %s'; +$lang['security_warning'] = 'Предупреждение безопасности: %s'; $lang['update_available'] = 'Обновление: доступна новая версия %s.'; $lang['wrong_folder'] = 'Плагин установлен неправильно: Переименуйте директорию "%s" в "%s".'; $lang['url_change'] = 'Ссылка изменилась: Ссылка для загрузки изменилась с прошлого раза. Проверьте новую ссылку прежде чем обновлять расширение.
    Новая: %s
    Старая: %s'; diff --git a/lib/plugins/usermanager/lang/ru/lang.php b/lib/plugins/usermanager/lang/ru/lang.php index 515de5186..0914d7b49 100644 --- a/lib/plugins/usermanager/lang/ru/lang.php +++ b/lib/plugins/usermanager/lang/ru/lang.php @@ -21,6 +21,7 @@ * @author Pavel * @author Aleksandr Selivanov * @author Igor Degraf + * @author Vitaly Filatenko */ $lang['menu'] = 'Управление пользователями'; $lang['noauth'] = '(авторизация пользователей недоступна)'; @@ -69,6 +70,7 @@ $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.'; -- cgit v1.2.3 From b13d4fce1d858898efc88147b9a2da344119128f Mon Sep 17 00:00:00 2001 From: Satoshi Sahara Date: Wed, 17 Dec 2014 14:36:28 +0100 Subject: translation update --- lib/plugins/extension/lang/ja/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php index 5264bfb09..ce6ed2b97 100644 --- a/lib/plugins/extension/lang/ja/lang.php +++ b/lib/plugins/extension/lang/ja/lang.php @@ -63,7 +63,7 @@ $lang['status_template'] = 'テンプレート'; $lang['status_bundled'] = '同梱'; $lang['msg_enabled'] = '%s プラグインを有効化しました。'; $lang['msg_disabled'] = '%s プラグインを無効化しました。'; -$lang['msg_delete_success'] = '拡張機能をアンインストールしました。'; +$lang['msg_delete_success'] = '拡張機能 %s をアンインストールしました。'; $lang['msg_delete_failed'] = '拡張機能 %s のアンインストールに失敗しました。'; $lang['msg_template_install_success'] = '%s テンプレートをインストールできました。'; $lang['msg_template_update_success'] = '%s テンプレートを更新できました。'; -- cgit v1.2.3 From 2fd1f790dae5f89a60537f9b80b9c5a10312f595 Mon Sep 17 00:00:00 2001 From: Guido Salatino Date: Thu, 18 Dec 2014 21:26:34 +0100 Subject: translation update --- lib/plugins/authad/lang/pt/settings.php | 6 + lib/plugins/authldap/lang/pt/settings.php | 10 ++ lib/plugins/authmysql/lang/pt/settings.php | 20 ++++ lib/plugins/authpgsql/lang/pt/settings.php | 17 +++ lib/plugins/extension/lang/pt/intro_install.txt | 1 + lib/plugins/extension/lang/pt/intro_plugins.txt | 1 + lib/plugins/extension/lang/pt/intro_search.txt | 1 + lib/plugins/extension/lang/pt/intro_templates.txt | 1 + lib/plugins/extension/lang/pt/lang.php | 132 ++++++++++++++++++++++ lib/plugins/usermanager/lang/pt/lang.php | 9 ++ 10 files changed, 198 insertions(+) create mode 100644 lib/plugins/extension/lang/pt/intro_install.txt create mode 100644 lib/plugins/extension/lang/pt/intro_plugins.txt create mode 100644 lib/plugins/extension/lang/pt/intro_search.txt create mode 100644 lib/plugins/extension/lang/pt/intro_templates.txt create mode 100644 lib/plugins/extension/lang/pt/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/pt/settings.php b/lib/plugins/authad/lang/pt/settings.php index dc60d7259..6256eb597 100644 --- a/lib/plugins/authad/lang/pt/settings.php +++ b/lib/plugins/authad/lang/pt/settings.php @@ -6,12 +6,18 @@ * @author André Neves * @author Murilo * @author Paulo Silva + * @author Guido Salatino */ $lang['account_suffix'] = 'O sufixo da sua conta. Por exemplo, @my.domain.org'; +$lang['base_dn'] = 'Sua base DN. Eg. DC=meu, DC=dominio, DC=org '; $lang['domain_controllers'] = 'Uma lista separada por vírgulas de Controladores de Domínio (AD DC). Ex.: srv1.domain.org,srv2.domain.org'; $lang['admin_username'] = 'Um utilizador com privilégios na Active Directory que tenha acesso aos dados de todos os outros utilizadores. Opcional, mas necessário para certas ações como enviar emails de subscrição.'; $lang['admin_password'] = 'A senha para o utilizador acima.'; $lang['sso'] = 'Deve ser usado o Single-Sign-On via Kerberos ou NTLM?'; +$lang['sso_charset'] = 'O charset do seu servidor web vai passar o nome de usuário Kerberos ou NTLM vazio para UTF-8 ou latin-1. Requer a extensão iconv.'; +$lang['real_primarygroup'] = 'Deveria ser resolvido, de fato, o grupo primário ao invés de assumir "Usuários de Domínio" (mais lento).'; $lang['use_ssl'] = 'Usar ligação SSL? Se usada, não ative TLS abaixo.'; $lang['use_tls'] = 'Usar ligação TLS? Se usada, não ative SSL abaixo.'; +$lang['debug'] = 'Deve-se mostrar saída adicional de depuração de erros?'; $lang['expirywarn'] = 'Número de dias de avanço para avisar o utilizador da expiração da senha. 0 para desativar.'; +$lang['additional'] = 'Uma lista separada por vírgula de atributos adicionais de AD para buscar a partir de dados do usuário. Usado por alguns plugins.'; diff --git a/lib/plugins/authldap/lang/pt/settings.php b/lib/plugins/authldap/lang/pt/settings.php index a2ccf87ad..b54f2a1bc 100644 --- a/lib/plugins/authldap/lang/pt/settings.php +++ b/lib/plugins/authldap/lang/pt/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author André Neves + * @author Guido Salatino */ $lang['server'] = 'O seu servidor de LDAP. Ou hostname (localhost) ou URL qualificado completo (ldap://servidor.tld:389)'; $lang['port'] = 'Porta de servidor de LDAP se o URL completo não foi fornecido acima'; @@ -14,5 +15,14 @@ $lang['groupfilter'] = 'Filtro LDAP para procurar por grupos. Por exem $lang['version'] = 'A versão do protocolo a utilizar. Pode precisar de alterar isto para 3'; $lang['starttls'] = 'Usar ligações TLS?'; $lang['referrals'] = 'Referrals devem ser seguidos?'; +$lang['deref'] = 'Como desreferenciar aliases?'; +$lang['binddn'] = 'DN de um usuário de ligação opcional, quando a ligação é anônima não é suficiente. Eg. cn = admin, dc = my, dc = home '; $lang['bindpw'] = 'Senha do utilizador acima'; +$lang['userscope'] = 'Escopo de pesquisa Limite para pesquisa de usuário'; +$lang['groupscope'] = 'Escopo de pesquisa Limite para pesquisa de grupo'; +$lang['groupkey'] = 'A participação no grupo a partir de qualquer atributo de usuário (em vez de AD padrão de grupos) exemplo: grupo de departamento ou número de telefone'; $lang['debug'] = 'Mostrar informação adicional de debug aquando de erros'; +$lang['deref_o_0'] = 'LDAP_DEREF_NUNCA'; +$lang['deref_o_1'] = 'LDAP_DEREF_PESQUISANDO'; +$lang['deref_o_2'] = 'LDAP_DEREF_BUSCANDO'; +$lang['deref_o_3'] = 'LDAP_DEREF_SEMPRE'; diff --git a/lib/plugins/authmysql/lang/pt/settings.php b/lib/plugins/authmysql/lang/pt/settings.php index 0c7f303e7..821dcf802 100644 --- a/lib/plugins/authmysql/lang/pt/settings.php +++ b/lib/plugins/authmysql/lang/pt/settings.php @@ -4,20 +4,40 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author André Neves + * @author Guido Salatino */ $lang['server'] = 'O seu servidor de MySQL'; $lang['user'] = 'Utilizador MySQL'; $lang['password'] = 'Senha para o utilizador acima'; $lang['database'] = 'Base de dados a usar'; +$lang['charset'] = 'Conjunto de caracteres usado na base de dados'; $lang['debug'] = 'Mostrar informação adicional de debug'; +$lang['forwardClearPass'] = 'Passe as senhas do usuário como texto puro para as instruções SQL abaixo, em vez de usar a opção passcrypt'; +$lang['TablesToLock'] = 'Lista de tabelas, separadas por virgula, que devem ser bloqueadas em operações de escrita'; +$lang['checkPass'] = 'Instrução SQL para verificar senhas'; +$lang['getUserInfo'] = 'Instrução SQL para recuperar informações do usuário'; +$lang['getGroups'] = 'Instrução SQL para recuperar os usuários participantes de um grupo'; +$lang['getUsers'] = 'Instrução SQL para listar todos usuários'; $lang['FilterLogin'] = 'Cláusula SQL para filtrar utilizadores por tipo de login'; $lang['FilterName'] = 'Cláusula SQL para filtrar utilizadores por nome completo'; $lang['FilterEmail'] = 'Cláusula SQL para filtrar utilizadores por endereço de email'; $lang['FilterGroup'] = 'Cláusula SQL para filtrar utilizadores por pertença a grupo'; $lang['SortOrder'] = 'Cláusula SQL para ordenar utilizadores'; +$lang['addUser'] = 'Instrução SQL para adicionar novo usuário'; +$lang['addGroup'] = 'Instrução SQL para adicionar um novo grupo'; +$lang['addUserGroup'] = 'Instrução SQL para adicionar um usuário a um grupo existente'; +$lang['delGroup'] = 'Instrução SQL para remover um grupo'; +$lang['getUserID'] = 'Instrução SQL para obter a chave principal de um usuário'; +$lang['delUser'] = 'Instrução SQL para excluir um usuário'; +$lang['delUserRefs'] = 'Instrução SQL para excluir um usuário de todos os grupos'; +$lang['updateUser'] = 'Instrução SQL para atualizar um perfil de usuário'; $lang['UpdateLogin'] = 'Cláusula de atualização para atualizar o nome de login do utilizador'; $lang['UpdatePass'] = 'Cláusula de atualização para atualizar a senha do utilizador'; $lang['UpdateEmail'] = 'Cláusula de atualização para atualizar o endereço de email do utilizador'; $lang['UpdateName'] = 'Cláusula de atualização para atualizar o nome completo do utilizador'; +$lang['UpdateTarget'] = 'Cláusula limite para identificar o usuário ao atualizar'; +$lang['delUserGroup'] = 'Instrução SQL para remover um usuário de um determinado grupo'; +$lang['getGroupID'] = 'Instrução SQL para obter a chave principal de um determinado grupo'; $lang['debug_o_0'] = 'nenhum'; $lang['debug_o_1'] = 'só aquando de erros'; +$lang['debug_o_2'] = 'todas as consultas SQL'; diff --git a/lib/plugins/authpgsql/lang/pt/settings.php b/lib/plugins/authpgsql/lang/pt/settings.php index b33b81141..f81ec22dc 100644 --- a/lib/plugins/authpgsql/lang/pt/settings.php +++ b/lib/plugins/authpgsql/lang/pt/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author André Neves + * @author Guido Salatino */ $lang['server'] = 'O seu servidor PostgreSQL'; $lang['port'] = 'A porta do seu servidor PostgreSQL'; @@ -11,12 +12,28 @@ $lang['user'] = 'Nome de utilizador PostgreSQL'; $lang['password'] = 'Senha do utilizador acima'; $lang['database'] = 'Base de dados a usar'; $lang['debug'] = 'Mostrar informação adicional de debug'; +$lang['forwardClearPass'] = 'Passe as senhas do usuário como texto puro para as instruções SQL abaixo, em vez de usar a opção passcrypt'; +$lang['checkPass'] = 'Instrução SQL para verificar senhas'; +$lang['getUserInfo'] = 'Instrução SQL para recuperar informações de um usuário'; +$lang['getGroups'] = 'Instrução SQL para recuperar os usuários participantes de um grupo'; +$lang['getUsers'] = 'Instrução SQL para listar todos usuários'; $lang['FilterLogin'] = 'Cláusula SQL para filtrar utilizadores por nome de login'; $lang['FilterName'] = 'Cláusula SQL para filtrar utilizadores por nome completo'; $lang['FilterEmail'] = 'Cláusula SQL para filtrar utilizadores por endereço de email'; $lang['FilterGroup'] = 'Cláusula SQL para filtrar utilizadores por pertença a grupo'; $lang['SortOrder'] = 'Cláusula SQL para ordenar utilizadores'; +$lang['addUser'] = 'Instrução SQL para adicionar um novo usuário'; +$lang['addGroup'] = 'Instrução SQL para adicionar um novo grupo'; +$lang['addUserGroup'] = 'Instrução SQL para adicionar um usuário a um grupo existente'; +$lang['delGroup'] = 'Instrução SQL para remover um grupo'; +$lang['getUserID'] = 'Instrução SQL para obter a chave principal de um usuário'; +$lang['delUser'] = 'Instrução SQL para remover um usuário'; +$lang['delUserRefs'] = 'Instrução SQL para remover um usuário de todos os grupos'; +$lang['updateUser'] = 'Instrução SQL para atualizar um perfil de usuário'; $lang['UpdateLogin'] = 'Cláusula de atualização para atualizar o nome de login do utilizador'; $lang['UpdatePass'] = 'Cláusula de atualização para atualizar a senha do utilizador'; $lang['UpdateEmail'] = 'Cláusula de atualização para atualizar o endereço de email do utilizador'; $lang['UpdateName'] = 'Cláusula de atualização para atualizar o nome completo do utilizador'; +$lang['UpdateTarget'] = 'Cláusula limite para identificar o usuário ao atualizar'; +$lang['delUserGroup'] = 'Instrução SQL para remover um usuário de um determinado grupo'; +$lang['getGroupID'] = 'Instrução SQL para obter a chave principal de um determinado grupo'; diff --git a/lib/plugins/extension/lang/pt/intro_install.txt b/lib/plugins/extension/lang/pt/intro_install.txt new file mode 100644 index 000000000..5e5871391 --- /dev/null +++ b/lib/plugins/extension/lang/pt/intro_install.txt @@ -0,0 +1 @@ +Aqui você pode instalar manualmente plugins e modelos ou enviando-os (upload) ou fornecendo uma URL de download direto. \ No newline at end of file diff --git a/lib/plugins/extension/lang/pt/intro_plugins.txt b/lib/plugins/extension/lang/pt/intro_plugins.txt new file mode 100644 index 000000000..fcfaa5cea --- /dev/null +++ b/lib/plugins/extension/lang/pt/intro_plugins.txt @@ -0,0 +1 @@ +Estes são os plugins instalados atualmente em seu DokuWiki. Você pode ativar ou desativar ou desinstala-los completamente aqui. Atualizações de plugins também são mostradas aqui, não se esqueça de ler a documentação do plug-in antes de atualizar. \ No newline at end of file diff --git a/lib/plugins/extension/lang/pt/intro_search.txt b/lib/plugins/extension/lang/pt/intro_search.txt new file mode 100644 index 000000000..be39a9860 --- /dev/null +++ b/lib/plugins/extension/lang/pt/intro_search.txt @@ -0,0 +1 @@ +Esta guia lhe dá acesso a todos os plugins e modelos de terceiros disponíveis DokuWiki. Por favor, esteja ciente de que a instalação de componentes de terceiros pode representar um risco de segurança ** **, você pode querer ler sobre [[doku> segurança # plugin_security | segurança plug-in]] antes de realizar a instalação de módulos de terceiros. \ No newline at end of file diff --git a/lib/plugins/extension/lang/pt/intro_templates.txt b/lib/plugins/extension/lang/pt/intro_templates.txt new file mode 100644 index 000000000..ecdf99f17 --- /dev/null +++ b/lib/plugins/extension/lang/pt/intro_templates.txt @@ -0,0 +1 @@ +Estes são os modelos atualmente instalados em seu DokuWiki. Você pode selecionar o modelo a ser usado no [[Do = admin & page = configuração |? Configuration Manager]]. \ No newline at end of file diff --git a/lib/plugins/extension/lang/pt/lang.php b/lib/plugins/extension/lang/pt/lang.php new file mode 100644 index 000000000..c7b4f29c2 --- /dev/null +++ b/lib/plugins/extension/lang/pt/lang.php @@ -0,0 +1,132 @@ + + */ +$lang['menu'] = 'Gerenciador de Extensões'; +$lang['tab_plugins'] = 'Plugins Instalados'; +$lang['tab_templates'] = 'Modelos Instalados'; +$lang['tab_search'] = 'Pesquisar e Instalar'; +$lang['tab_install'] = 'Instalação Manual'; +$lang['notimplemented'] = 'Este recurso não foi implementado ainda'; +$lang['notinstalled'] = 'Esta extensão não está instalada'; +$lang['alreadyenabled'] = 'Esta extensão já foi ativada'; +$lang['alreadydisabled'] = 'Esta extensão já foi desativada'; +$lang['pluginlistsaveerror'] = 'Houve um erro ao salvar a lista de plugins'; +$lang['unknownauthor'] = 'Autor desconhecido'; +$lang['unknownversion'] = 'Versão desconhecida'; +$lang['btn_info'] = 'Mostrar mais informações'; +$lang['btn_update'] = 'Atualizar'; +$lang['btn_uninstall'] = 'Desinstalar'; +$lang['btn_enable'] = 'Habilitar'; +$lang['btn_disable'] = 'Desabilitar'; +$lang['btn_install'] = 'Instalar'; +$lang['btn_reinstall'] = 'Reinstalar'; +$lang['js']['reallydel'] = 'Confirma a desinstalação desta extensão?'; +$lang['search_for'] = 'Pesquisar Extensão:'; +$lang['search'] = 'Pesquisar'; +$lang['extensionby'] = '%s by %s'; +$lang['screenshot'] = 'Screenshot of %s'; +$lang['popularity'] = 'Popularidade: %s%%'; +$lang['homepage_link'] = 'Documentos'; +$lang['bugs_features'] = 'Erros'; +$lang['tags'] = 'Tags:'; +$lang['author_hint'] = 'Pesquisar extensões deste autor'; +$lang['installed'] = 'Instalado: +'; +$lang['downloadurl'] = 'Baixar URL: +'; +$lang['repository'] = 'Repositório: +'; +$lang['unknown'] = ' desconhecido +'; +$lang['installed_version'] = 'Versão instalada:'; +$lang['install_date'] = 'Sua última atualização:'; +$lang['available_version'] = 'Versão disponível: +'; +$lang['compatible'] = 'Compatível com:'; +$lang['depends'] = 'Depende de: +'; +$lang['similar'] = 'Semelhante a: +'; +$lang['conflicts'] = 'Conflitos com: +'; +$lang['donate'] = 'Assim? +'; +$lang['donate_action'] = 'Pague um café para o autor!'; +$lang['repo_retry'] = 'Tentar novamente +'; +$lang['provides'] = 'Fornece: +'; +$lang['status'] = 'Status: +'; +$lang['status_installed'] = 'instalado +'; +$lang['status_not_installed'] = 'não instalado +'; +$lang['status_protected'] = 'protegido +'; +$lang['status_enabled'] = 'habilitado'; +$lang['status_disabled'] = 'desabilitado'; +$lang['status_unmodifiable'] = 'imodificável +'; +$lang['status_plugin'] = 'plugin +'; +$lang['status_template'] = 'modelo +'; +$lang['status_bundled'] = 'empacotado +'; +$lang['msg_enabled'] = 'Plugin %s habilitado +'; +$lang['msg_disabled'] = 'Plugin %s desabilitado'; +$lang['msg_delete_success'] = 'Extensão %s desinstalada'; +$lang['msg_delete_failed'] = 'Desinstalar Extensão %s falhou +'; +$lang['msg_template_install_success'] = 'Modelo %s instalado com sucesso'; +$lang['msg_template_update_success'] = 'Modelo %s atualizado com sucesso +'; +$lang['msg_plugin_install_success'] = 'Plugin %s instalado com sucesso +'; +$lang['msg_plugin_update_success'] = 'Plugin %s atualizado com sucesso +'; +$lang['msg_upload_failed'] = 'Enviando o arquivo falhou +'; +$lang['missing_dependency'] = 'dependência ausente ou desabilitada: %s +'; +$lang['security_issue'] = ' Questão de segurança: %s +'; +$lang['security_warning'] = ' Aviso de segurança: %s'; +$lang['update_available'] = 'Atualização: Nova versão %s está disponível. +'; +$lang['wrong_folder'] = 'Plugin instalado incorretamente: Renomear pasta de plugins de "%s" para "%s". +'; +$lang['url_change'] = 'URL mudou: URL para download mudou desde o último download. Verifique se a nova URL é válida antes de atualizar a extensão
    Nova:%s
    Antiga:%s +'; +$lang['error_badurl'] = 'URLs deve começar com http ou https +'; +$lang['error_dircreate'] = 'Não é possível criar pasta temporária para receber o download +'; +$lang['error_download'] = 'Não é possível baixar o arquivo:%s +'; +$lang['error_decompress'] = 'Não é possível descompactar o arquivo baixado. Talvez seja resultado de um download ruim, nesse caso, você deve tentar novamente; ou o formato de compressão pode ser desconhecido, nesse caso, você precisará baixar e instalar manualmente.'; +$lang['error_findfolder'] = 'Não foi possível identificar diretório de extensão, você precisa baixar e instalar manualmente +'; +$lang['error_copy'] = 'Houve um erro na cópia do arquivo durante a tentativa de instalar os arquivos para o diretório %s : o disco pode estar cheio ou as permissões de acesso ao arquivo podem estar incorretas. Isso pode ter resultado em um plugin parcialmente instalado e tornar instável a sua instalação wiki +'; +$lang['noperms'] = 'Diretório da extensão não é gravável +'; +$lang['notplperms'] = 'Diretório do modelo não é gravável +'; +$lang['nopluginperms'] = 'Diretório do plugin não é gravável +'; +$lang['git'] = 'Esta extensão foi instalada via git, você não pode querer atualizá-la aqui. +'; +$lang['auth'] = 'Este plugin não está habilitado na configuração, considere desabilita-lo.'; +$lang['install_url'] = 'Instalar a partir da URL:'; +$lang['install_upload'] = 'Publique a Extensão:'; +$lang['repo_error'] = 'O repositório do plugin não pôde ser conectado. Verifique se o seu servidor está autorizado a conectar com www.dokuwiki.org e verifique as configurações de proxy do servidor. +'; +$lang['nossl'] = 'Seu PHP parece que perdeu o suporte a SSL. O download não vai funcionar para muitas extensões DokuWiki. +'; diff --git a/lib/plugins/usermanager/lang/pt/lang.php b/lib/plugins/usermanager/lang/pt/lang.php index b59649aa1..43ea69e53 100644 --- a/lib/plugins/usermanager/lang/pt/lang.php +++ b/lib/plugins/usermanager/lang/pt/lang.php @@ -8,6 +8,7 @@ * @author Fil * @author André Neves * @author José Campos zecarlosdecampos@gmail.com + * @author Guido Salatino */ $lang['menu'] = 'Gestor de Perfis'; $lang['noauth'] = '(autenticação indisponível)'; @@ -33,6 +34,8 @@ $lang['filter'] = 'Filtro'; $lang['export_all'] = 'Exportar Todos os Utilizadores (CSV)'; $lang['export_filtered'] = 'Exportar a lista de utilizadores filtrada (CSV)'; $lang['import'] = 'Importar Novos Utilizadores'; +$lang['line'] = 'Linha nº +'; $lang['error'] = 'Mensagem de erro'; $lang['summary'] = 'Apresentar utilizadores %1$d-%2$d de %3$d encontrados. %4$d inscritos.'; $lang['nonefound'] = 'Nenhum utilizador encontrado. %d inscritos.'; @@ -54,11 +57,17 @@ $lang['add_ok'] = 'Utilizador adicionado.'; $lang['add_fail'] = 'Utilizador não adicionado.'; $lang['notify_ok'] = 'Mensagem de notificação enviada.'; $lang['notify_fail'] = 'Não foi possível enviar mensagem de notificação'; +$lang['import_userlistcsv'] = 'Arquivo de lista do usuário (CSV): +'; +$lang['import_header'] = 'Mais Recentes Importações - Falhas'; $lang['import_success_count'] = 'Importar Utilizadores: %d utiliyadores encontrados, %d importados com sucesso.'; $lang['import_failure_count'] = 'Importar Utilizadores: %d falharam. As falhas estão listadas abaixo.'; $lang['import_error_fields'] = 'Campos insuficientes, encontrados %d mas requeridos 4.'; $lang['import_error_baduserid'] = 'Falta id de utilizador'; +$lang['import_error_badname'] = 'Nome inválido'; +$lang['import_error_badmail'] = 'E-Mail inválido'; $lang['import_error_upload'] = 'Falhou a importação. O ficheiro csv não pôde ser importado ou está vazio.'; $lang['import_error_readfail'] = 'Falhou a importação. Não foi possível ler o ficheiro submetido.'; $lang['import_error_create'] = 'Não foi possível criar o utilizador.'; $lang['import_notify_fail'] = 'A mensagem de notificação não pôde ser enviada para o utilizador importado, %s com email %s.'; +$lang['import_downloadfailures'] = 'Baixe Falhas como CSV para a correção'; -- cgit v1.2.3 From 443fd3ed95c4f3dedaf26d2d2ce8583f13b6e808 Mon Sep 17 00:00:00 2001 From: Yves Grandvalet Date: Sat, 20 Dec 2014 15:47:16 +0100 Subject: translation update --- lib/plugins/extension/lang/fr/lang.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/fr/lang.php b/lib/plugins/extension/lang/fr/lang.php index 88234efd0..6955155e9 100644 --- a/lib/plugins/extension/lang/fr/lang.php +++ b/lib/plugins/extension/lang/fr/lang.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Schplurtz le Déboulonné + * @author Yves Grandvalet */ $lang['menu'] = 'Gestionnaire d\'extension'; $lang['tab_plugins'] = 'Greffons installés'; @@ -62,6 +63,7 @@ $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_delete_failed'] = 'Echec de la désinstallation de l\'extension %s'; $lang['msg_template_install_success'] = 'Thème %s installée avec succès'; $lang['msg_template_update_success'] = 'Thème %s mis à jour avec succès'; $lang['msg_plugin_install_success'] = 'Greffon %s installé avec succès'; -- cgit v1.2.3 From f398f541a2823c1e99e5cc8683be760e9aea0c18 Mon Sep 17 00:00:00 2001 From: Type-kun Date: Sun, 21 Dec 2014 14:51:02 +0100 Subject: translation update --- lib/plugins/authmysql/lang/ru/settings.php | 3 ++- lib/plugins/authpgsql/lang/ru/settings.php | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authmysql/lang/ru/settings.php b/lib/plugins/authmysql/lang/ru/settings.php index 2d8f4788e..eefec065b 100644 --- a/lib/plugins/authmysql/lang/ru/settings.php +++ b/lib/plugins/authmysql/lang/ru/settings.php @@ -5,6 +5,7 @@ * * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Aleksandr Selivanov + * @author Type-kun */ $lang['server'] = 'Ваш MySQL-сервер'; $lang['user'] = 'Имя пользователя MySQL'; @@ -35,7 +36,7 @@ $lang['UpdateLogin'] = 'Условие для обновления и $lang['UpdatePass'] = 'Условие для обновления пароля пользователя'; $lang['UpdateEmail'] = 'Условие для обновления адреса электронной почты пользователя'; $lang['UpdateName'] = 'Условие для обновления полного имени пользователя'; -$lang['UpdateTarget'] = 'Условие для идентификации пользователя при обновлении'; +$lang['UpdateTarget'] = 'Выражение \'LIMIT\' для идентификации пользователя при обновлении'; $lang['delUserGroup'] = 'Выражение SQL, осуществляющее удаление пользователя из указанной группы'; $lang['getGroupID'] = 'Выражение SQL, обеспечивающее получение первичного ключа указанной группы'; $lang['debug_o_0'] = 'ни один из вариантов'; diff --git a/lib/plugins/authpgsql/lang/ru/settings.php b/lib/plugins/authpgsql/lang/ru/settings.php index 416ea0ec9..2af299172 100644 --- a/lib/plugins/authpgsql/lang/ru/settings.php +++ b/lib/plugins/authpgsql/lang/ru/settings.php @@ -7,6 +7,7 @@ * @author Aleksandr Selivanov * @author Aleksandr Selivanov * @author Vitaly Filatenko + * @author Type-kun */ $lang['server'] = 'Ваш PostgreSQL-сервер'; $lang['port'] = 'Порт вашего PostgreSQL-сервера'; @@ -34,5 +35,7 @@ $lang['updateUser'] = 'Выражение SQL, осуществляю $lang['UpdateLogin'] = 'Измените условие для обновления логина'; $lang['UpdatePass'] = 'Измените условие для обновления пароля'; $lang['UpdateEmail'] = 'Измените условие для обновления email'; +$lang['UpdateName'] = 'Условие для обновления полного имени пользователя'; +$lang['UpdateTarget'] = 'Выражение \'LIMIT\' для идентификации пользователя при обновлении'; $lang['delUserGroup'] = 'Выражение SQL, осуществляющее удаление пользователя из указанной группы'; $lang['getGroupID'] = 'Выражение SQL, обеспечивающее получение первичного ключа указанной группы'; -- cgit v1.2.3 From ead851a84b96ca8b022e8980362b248ec2712dfa Mon Sep 17 00:00:00 2001 From: Marian Banica Date: Tue, 30 Dec 2014 06:31:38 +0100 Subject: translation update --- lib/plugins/acl/lang/ro/lang.php | 5 +++-- lib/plugins/popularity/lang/ro/lang.php | 5 +++-- lib/plugins/revert/lang/ro/lang.php | 5 +++-- lib/plugins/usermanager/lang/ro/lang.php | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/lang/ro/lang.php b/lib/plugins/acl/lang/ro/lang.php index 0d281f049..418e63ab3 100644 --- a/lib/plugins/acl/lang/ro/lang.php +++ b/lib/plugins/acl/lang/ro/lang.php @@ -1,7 +1,8 @@ * @author s_baltariu@yahoo.com * @author Emanuel-Emeric Andrasi diff --git a/lib/plugins/popularity/lang/ro/lang.php b/lib/plugins/popularity/lang/ro/lang.php index 8ba119dcb..5be528bac 100644 --- a/lib/plugins/popularity/lang/ro/lang.php +++ b/lib/plugins/popularity/lang/ro/lang.php @@ -1,7 +1,8 @@ * @author Emanuel-Emeric Andrași * @author Emanuel-Emeric Andraşi diff --git a/lib/plugins/revert/lang/ro/lang.php b/lib/plugins/revert/lang/ro/lang.php index 5ea802575..3d0ca7957 100644 --- a/lib/plugins/revert/lang/ro/lang.php +++ b/lib/plugins/revert/lang/ro/lang.php @@ -1,7 +1,8 @@ * @author s_baltariu@yahoo.com * @author Emanuel-Emeric Andrasi diff --git a/lib/plugins/usermanager/lang/ro/lang.php b/lib/plugins/usermanager/lang/ro/lang.php index 1b33cc4f8..55cbbed04 100644 --- a/lib/plugins/usermanager/lang/ro/lang.php +++ b/lib/plugins/usermanager/lang/ro/lang.php @@ -1,7 +1,8 @@ * @author s_baltariu@yahoo.com * @author Emanuel-Emeric Andrasi -- cgit v1.2.3 From a71e810b700800fc0b7a599971dc05354df40a81 Mon Sep 17 00:00:00 2001 From: Jaroslav Lichtblau Date: Wed, 31 Dec 2014 15:21:02 +0100 Subject: translation update --- lib/plugins/authad/lang/cs/settings.php | 2 ++ lib/plugins/authldap/lang/cs/settings.php | 6 ++++++ lib/plugins/extension/lang/cs/intro_plugins.txt | 1 + lib/plugins/extension/lang/cs/intro_search.txt | 1 + 4 files changed, 10 insertions(+) create mode 100644 lib/plugins/extension/lang/cs/intro_plugins.txt create mode 100644 lib/plugins/extension/lang/cs/intro_search.txt (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/cs/settings.php b/lib/plugins/authad/lang/cs/settings.php index 28222d332..92b2d0f13 100644 --- a/lib/plugins/authad/lang/cs/settings.php +++ b/lib/plugins/authad/lang/cs/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author mkucera66@seznam.cz + * @author Jaroslav Lichtblau */ $lang['account_suffix'] = 'Přípona vašeho účtu, tj. @moje.domena.org'; $lang['base_dn'] = 'Vaše doménové jméno DN. tj. DC=moje,DC=domena,DC=org'; @@ -11,6 +12,7 @@ $lang['domain_controllers'] = 'Čárkou oddělenových kontrol=rů, tj. */ $lang['server'] = 'Váš server LDAP. Buď jméno hosta (localhost) nebo plně kvalifikovaný popis URL (ldap://server.tld:389)'; $lang['port'] = 'Port serveru LDAP. Pokud není, bude využito URL výše'; @@ -14,9 +15,14 @@ $lang['groupfilter'] = 'Filter LDAPu pro vyhledávání uživatelskýc $lang['version'] = 'Verze použitého protokolu. Můžete potřebovat jej nastavit na 3'; $lang['starttls'] = 'Využít spojení TLS?'; $lang['referrals'] = 'Přeposílat odkazy?'; +$lang['deref'] = 'Jak rozlišovat aliasy?'; $lang['binddn'] = 'Doménový název DN volitelně připojeného uživatele, pokus anonymní připojení není vyhovující, tj. cn=admin, dc=muj, dc=domov'; $lang['bindpw'] = 'Heslo uživatele výše'; $lang['userscope'] = 'Omezení rozsahu vyhledávání uživatele'; $lang['groupscope'] = 'Omezení rozsahu vyhledávání skupiny'; $lang['groupkey'] = 'Atribut šlenství uživatele ve skupinách (namísto standardních AD skupin), tj. skupina z oddělení nebo telefonní číslo'; $lang['debug'] = 'Zobrazit dodatečné debugovací informace'; +$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/extension/lang/cs/intro_plugins.txt b/lib/plugins/extension/lang/cs/intro_plugins.txt new file mode 100644 index 000000000..a6f62746a --- /dev/null +++ b/lib/plugins/extension/lang/cs/intro_plugins.txt @@ -0,0 +1 @@ +Toto je seznam momentálně nainstalovaných zásuvných modulů vaší DokuWiki. V tomto seznamu je lze zapínat, vypínat nebo kompletně odinstalovat. Jsou zde také vidět dostupné aktualizace pro moduly, ale před jejich případným aktualizováním si vždy přečtěte jejich dokumentaci. \ No newline at end of file diff --git a/lib/plugins/extension/lang/cs/intro_search.txt b/lib/plugins/extension/lang/cs/intro_search.txt new file mode 100644 index 000000000..4258ac4f2 --- /dev/null +++ b/lib/plugins/extension/lang/cs/intro_search.txt @@ -0,0 +1 @@ +Tato záložka poskytuje náhled na všechny dostupné moduly a šablony třetích stran pro DokuWiki. Jejich instalací se múžete vystavit **bezpečnostním rizikům** o kterých se můžete více dočíst v oddíle [[doku>security#plugin_security|plugin security]]. \ No newline at end of file -- cgit v1.2.3 From 6f864f4299df0435149a889891bf686b4b17249a Mon Sep 17 00:00:00 2001 From: Maciej Helt Date: Mon, 5 Jan 2015 13:36:18 +0100 Subject: translation update --- lib/plugins/authad/lang/pl/settings.php | 1 + lib/plugins/authldap/lang/pl/settings.php | 6 ++++++ lib/plugins/authmysql/lang/pl/settings.php | 10 ++++++++++ 3 files changed, 17 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/pl/settings.php b/lib/plugins/authad/lang/pl/settings.php index 91cadca6f..537bae7ea 100644 --- a/lib/plugins/authad/lang/pl/settings.php +++ b/lib/plugins/authad/lang/pl/settings.php @@ -6,6 +6,7 @@ * @author Tomasz Bosak * @author Paweł Jan Czochański * @author Mati + * @author Maciej Helt */ $lang['account_suffix'] = 'Przyrostek twojej nazwy konta np. @my.domain.org'; $lang['base_dn'] = 'Twoje bazowe DN. Na przykład: DC=my,DC=domain,DC=org'; diff --git a/lib/plugins/authldap/lang/pl/settings.php b/lib/plugins/authldap/lang/pl/settings.php index 7010988e6..0f5281b13 100644 --- a/lib/plugins/authldap/lang/pl/settings.php +++ b/lib/plugins/authldap/lang/pl/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Paweł Jan Czochański + * @author Maciej Helt */ $lang['server'] = 'Twój serwer LDAP. Podaj nazwę hosta (localhost) albo pełen adres URL (ldap://server.tld:389).'; $lang['port'] = 'Port serwera LDAP jeżeli nie podano pełnego adresu URL wyżej.'; @@ -14,3 +15,8 @@ $lang['groupfilter'] = 'Filtr LDAP wykorzystany przy szukaniu grup uż $lang['version'] = 'Wykorzystywana wersja protokołu. Być może konieczne jest ustawienie tego na 3.'; $lang['starttls'] = 'Użyć połączeń TLS?'; $lang['bindpw'] = 'Hasło powyższego użytkownika'; +$lang['debug'] = 'Przy błędach wyświetl dodatkowe informacje debugujące.'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; diff --git a/lib/plugins/authmysql/lang/pl/settings.php b/lib/plugins/authmysql/lang/pl/settings.php index 9dc798ee0..68b5c6c22 100644 --- a/lib/plugins/authmysql/lang/pl/settings.php +++ b/lib/plugins/authmysql/lang/pl/settings.php @@ -5,6 +5,7 @@ * * @author Paweł Jan Czochański * @author Mati + * @author Maciej Helt */ $lang['server'] = 'Twój server MySQL'; $lang['user'] = 'Nazwa użytkownika MySQL'; @@ -13,4 +14,13 @@ $lang['database'] = 'Używana baza danych'; $lang['charset'] = 'Zestaw znaków uzyty w bazie danych'; $lang['debug'] = 'Wyświetlaj dodatkowe informacje do debugowania.'; $lang['checkPass'] = 'Zapytanie SQL wykorzystywane do sprawdzania haseł.'; +$lang['getUserInfo'] = 'Zapytanie SQL zwracające informacje o użytkowniku'; +$lang['getGroups'] = 'Zapytanie SQL przynależność do grup danego użytkownika'; +$lang['getUsers'] = 'Zapytanie SQL zwracające listę wszystkich użytkowników'; +$lang['FilterLogin'] = 'Klauzula SQL używana do filtrowania użytkowników na podstawie ich loginu'; +$lang['FilterName'] = 'Klauzula SQL używana do filtrowania użytkowników na podstawie ich pełnej nazwy'; +$lang['FilterEmail'] = 'Klauzula SQL używana do filtrowania użytkowników na podstawie ich adresu email'; +$lang['FilterGroup'] = 'Klauzula SQL używana do filtrowania użytkowników na podstawie ich przynależności do grup'; +$lang['SortOrder'] = 'Klauzula SQL używana do sortowania użytkowników'; +$lang['addUser'] = 'Zapytanie SQL dodające nowego użytkownika'; $lang['debug_o_2'] = 'wszystkie zapytania SQL'; -- cgit v1.2.3 From 3d03c3499919b3ef39eb7e162d53a52dcb3abeae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schplurtz=20le=20D=C3=A9boulonn=C3=A9?= Date: Mon, 5 Jan 2015 23:31:11 +0100 Subject: translation update --- lib/plugins/extension/lang/fr/lang.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/fr/lang.php b/lib/plugins/extension/lang/fr/lang.php index 6955155e9..44d403847 100644 --- a/lib/plugins/extension/lang/fr/lang.php +++ b/lib/plugins/extension/lang/fr/lang.php @@ -6,7 +6,7 @@ * @author Schplurtz le Déboulonné * @author Yves Grandvalet */ -$lang['menu'] = 'Gestionnaire d\'extension'; +$lang['menu'] = 'Gestionnaire d\'extensions'; $lang['tab_plugins'] = 'Greffons installés'; $lang['tab_templates'] = 'Thèmes installés'; $lang['tab_search'] = 'Rechercher et installer'; @@ -62,7 +62,7 @@ $lang['status_template'] = 'thème'; $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_delete_success'] = 'Extension %s désinstallée.'; $lang['msg_delete_failed'] = 'Echec de la désinstallation de l\'extension %s'; $lang['msg_template_install_success'] = 'Thème %s installée avec succès'; $lang['msg_template_update_success'] = 'Thème %s mis à jour avec succès'; @@ -85,6 +85,8 @@ $lang['noperms'] = 'Impossible d\'écrire dans le dossier des exte $lang['notplperms'] = 'Impossible d\'écrire dans le dossier des thèmes.'; $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['auth'] = 'Votre configuration n\'utilise pas ce greffon d\'authentification. Vous devriez songer à le désactiver.'; $lang['install_url'] = 'Installez depuis l\'URL :'; $lang['install_upload'] = 'Téléversez l\'extension :'; $lang['repo_error'] = 'L\'entrepôt d\'extensions est injoignable. Veuillez vous assurer que le server web est autorisé à contacter www.dokuwiki.org et vérifier les réglages de proxy.'; +$lang['nossl'] = 'Votre version de PHP semble ne pas prendre en charge SSL. Le téléchargement de nombreuses extensions va échouer.'; -- cgit v1.2.3 From 79e79377626799a77c11aa7849cb9c64305590c8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 7 Jan 2015 10:47:45 +0100 Subject: Remove error supression for file_exists() In an older version of PHP a file_exists() call would issue a warning when the file did not exist. This was fixed in later PHP releases. Since we require PHP 5.3 now, there's no need to supress any error here anymore. This might even give a minor performance boost. --- lib/plugins/authplain/auth.php | 2 +- lib/plugins/config/admin.php | 4 ++-- lib/plugins/config/settings/config.class.php | 16 ++++++++-------- lib/plugins/config/settings/extra.class.php | 2 +- lib/plugins/extension/helper/extension.php | 8 ++++---- lib/plugins/popularity/admin.php | 2 +- lib/plugins/popularity/helper.php | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authplain/auth.php b/lib/plugins/authplain/auth.php index fd2d0b249..b31c02fc8 100644 --- a/lib/plugins/authplain/auth.php +++ b/lib/plugins/authplain/auth.php @@ -325,7 +325,7 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { $this->users = array(); - if(!@file_exists($config_cascade['plainauth.users']['default'])) return; + if(!file_exists($config_cascade['plainauth.users']['default'])) return; $lines = file($config_cascade['plainauth.users']['default']); foreach($lines as $line) { diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index 9202a221b..2ef570b68 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -282,7 +282,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { if ($plugin == '.' || $plugin == '..' || $plugin == 'tmp' || $plugin == 'config') continue; if (is_file(DOKU_PLUGIN.$plugin)) continue; - if (@file_exists(DOKU_PLUGIN.$plugin.$enlangfile)){ + if (file_exists(DOKU_PLUGIN.$plugin.$enlangfile)){ $lang = array(); @include(DOKU_PLUGIN.$plugin.$enlangfile); if ($conf['lang'] != 'en') @include(DOKU_PLUGIN.$plugin.$langfile); @@ -303,7 +303,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { // the same for the active template $tpl = $conf['template']; - if (@file_exists(tpl_incdir().$enlangfile)){ + if (file_exists(tpl_incdir().$enlangfile)){ $lang = array(); @include(tpl_incdir().$enlangfile); if ($conf['lang'] != 'en') @include(tpl_incdir().$langfile); diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 590631dae..56b9a918d 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -40,7 +40,7 @@ if (!class_exists('configuration')) { public function configuration($datafile) { global $conf, $config_cascade; - if (!@file_exists($datafile)) { + if (!file_exists($datafile)) { msg('No configuration metadata found at - '.htmlspecialchars($datafile),-1); return; } @@ -125,8 +125,8 @@ if (!class_exists('configuration')) { $file = end($this->_local_files); // backup current file (remove any existing backup) - if (@file_exists($file) && $backup) { - if (@file_exists($file.'.bak')) @unlink($file.'.bak'); + if (@file_exists$file) && $backup) { + if (@ffile_existsfile.'.bak')) @unlink($file.'.bak'); if (!io_rename($file, $file.'.bak')) return false; } @@ -191,7 +191,7 @@ if (!class_exists('configuration')) { if ($this->_format == 'php') { - if(@file_exists($file)){ + if(@fifile_existsile)){ $contents = @php_strip_whitespace($file); }else{ $contents = ''; @@ -281,7 +281,7 @@ if (!class_exists('configuration')) { $local = $this->_local_files[0]; if (!is_writable(dirname($local))) return true; - if (@file_exists($local) && !is_writable($local)) return true; + if (@filfile_existscal) && !is_writable($local)) return true; return false; } @@ -345,7 +345,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)){ + if (@filefile_exists_PLUGIN.$plugin_dir.$file)){ $meta = array(); @include(DOKU_PLUGIN.$plugin_dir.$file); @include(DOKU_PLUGIN.$plugin_dir.$class); @@ -360,7 +360,7 @@ if (!class_exists('configuration')) { } // the same for the active template - if (@file_exists(tpl_incdir().$file)){ + if (@file_file_existsncdir().$file)){ $meta = array(); @include(tpl_incdir().$file); @include(tpl_incdir().$class); @@ -388,7 +388,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)){ + if (@file_efile_existsLUGIN.$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; diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index 232a8177f..fd3a90e28 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -151,7 +151,7 @@ if (!class_exists('setting_im_convert')) { $value = is_null($this->_local) ? $this->_default : $this->_local; if ($value == $input) return false; - if ($input && !@file_exists($input)) { + if ($input && !file_exists($input)) { $this->_error = true; $this->_input = $input; return false; diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index dfa624907..6c0946b09 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -707,7 +707,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $plugin = null; foreach($plugin_types as $type) { - if(@file_exists($path.$type.'.php')) { + if(file_exists($path.$type.'.php')) { $plugin = plugin_load($type, $this->base); if ($plugin) break; } @@ -907,12 +907,12 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { // check to make sure we aren't overwriting anything $target = $target_base_dir.$item['base']; - if(!$overwrite && @file_exists($target)) { + if(!$overwrite && file_exists($target)) { // TODO remember our settings, ask the user to confirm overwrite continue; } - $action = @file_exists($target) ? 'update' : 'install'; + $action = file_exists($target) ? 'update' : 'install'; // copy action if($this->dircopy($item['tmp'], $target)) { @@ -1117,7 +1117,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return $ok; } else { - $exists = @file_exists($dst); + $exists = file_exists($dst); if(!@copy($src, $dst)) return false; if(!$exists && !empty($conf['fperm'])) chmod($dst, $conf['fperm']); diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php index bd2d090e1..ab569b8b4 100644 --- a/lib/plugins/popularity/admin.php +++ b/lib/plugins/popularity/admin.php @@ -87,7 +87,7 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { //If there was an error the last time we tried to autosubmit, warn the user if ( $this->helper->isAutoSubmitEnabled() ){ - if ( @file_exists($this->helper->autosubmitErrorFile) ){ + if ( file_exists($this->helper->autosubmitErrorFile) ){ echo $this->getLang('autosubmitError'); echo io_readFile( $this->helper->autosubmitErrorFile ); } diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index b4fb33b90..8673fb5af 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -78,7 +78,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { * @return boolean TRUE if we should send data once a month, FALSE otherwise */ function isAutoSubmitEnabled(){ - return @file_exists($this->autosubmitFile); + return file_exists($this->autosubmitFile); } /** -- cgit v1.2.3 From 51b257b6019e01c05118fc3c93cb3ca60152076d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 7 Jan 2015 11:53:40 +0100 Subject: fixed search'and'replace fuckup in config plugin --- lib/plugins/config/settings/config.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 56b9a918d..378b93880 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -125,8 +125,8 @@ if (!class_exists('configuration')) { $file = end($this->_local_files); // backup current file (remove any existing backup) - if (@file_exists$file) && $backup) { - if (@ffile_existsfile.'.bak')) @unlink($file.'.bak'); + if (file_exists($file) && $backup) { + if (file_exists($file.'.bak')) @unlink($file.'.bak'); if (!io_rename($file, $file.'.bak')) return false; } @@ -191,7 +191,7 @@ if (!class_exists('configuration')) { if ($this->_format == 'php') { - if(@fifile_existsile)){ + if(file_exists($file)){ $contents = @php_strip_whitespace($file); }else{ $contents = ''; @@ -281,7 +281,7 @@ if (!class_exists('configuration')) { $local = $this->_local_files[0]; if (!is_writable(dirname($local))) return true; - if (@filfile_existscal) && !is_writable($local)) return true; + if (file_exists($local) && !is_writable($local)) return true; return false; } @@ -345,7 +345,7 @@ if (!class_exists('configuration')) { foreach ($this->get_plugin_list() as $plugin) { $plugin_dir = plugin_directory($plugin); - if (@filefile_exists_PLUGIN.$plugin_dir.$file)){ + if (file_exists(DOKU_PLUGIN.$plugin_dir.$file)){ $meta = array(); @include(DOKU_PLUGIN.$plugin_dir.$file); @include(DOKU_PLUGIN.$plugin_dir.$class); @@ -360,7 +360,7 @@ if (!class_exists('configuration')) { } // the same for the active template - if (@file_file_existsncdir().$file)){ + if (file_exists(tpl_incdir().$file)){ $meta = array(); @include(tpl_incdir().$file); @include(tpl_incdir().$class); @@ -388,7 +388,7 @@ if (!class_exists('configuration')) { foreach ($this->get_plugin_list() as $plugin) { $plugin_dir = plugin_directory($plugin); - if (@file_efile_existsLUGIN.$plugin_dir.$file)){ + if (file_exists(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; @@ -397,7 +397,7 @@ if (!class_exists('configuration')) { } // the same for the active template - if (@file_exists(tpl_incdir().$file)){ + if (file_exists(tpl_incdir().$file)){ $conf = $this->_read_config(tpl_incdir().$file); foreach ($conf as $key => $value){ $default['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value; -- cgit v1.2.3 From 48c11be06e2cde2557957efc5571c9754ebf188f Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Wed, 7 Jan 2015 11:18:12 +0000 Subject: Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- lib/plugins/config/settings/config.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 378b93880..316cc2c59 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -487,7 +487,7 @@ if (!class_exists('setting')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ public function html(&$plugin, $echo=false) { $disable = ''; @@ -712,7 +712,7 @@ if (!class_exists('setting_array')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ function html(&$plugin, $echo=false) { $disable = ''; @@ -748,7 +748,7 @@ if (!class_exists('setting_string')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ function html(&$plugin, $echo=false) { $disable = ''; @@ -809,7 +809,7 @@ if (!class_exists('setting_password')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ function html(&$plugin, $echo=false) { @@ -990,7 +990,7 @@ if (!class_exists('setting_onoff')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ function html(&$plugin, $echo = false) { $disable = ''; @@ -1044,7 +1044,7 @@ if (!class_exists('setting_multichoice')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ function html(&$plugin, $echo = false) { $disable = ''; @@ -1243,7 +1243,7 @@ if (!class_exists('setting_multicheckbox')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ function html(&$plugin, $echo=false) { -- cgit v1.2.3 From c85bb997ff7d1af302b93348c38ad4b2b2914290 Mon Sep 17 00:00:00 2001 From: Mijndert Date: Thu, 8 Jan 2015 16:11:16 +0100 Subject: translation update --- lib/plugins/extension/lang/nl/lang.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php index f75f78121..194b4b3e1 100644 --- a/lib/plugins/extension/lang/nl/lang.php +++ b/lib/plugins/extension/lang/nl/lang.php @@ -6,6 +6,7 @@ * @author Rene * @author Gerrit Uitslag * @author Johan Vervloet + * @author Mijndert */ $lang['menu'] = 'Uitbreidingen'; $lang['tab_plugins'] = 'Geïnstalleerde Plugins'; @@ -64,6 +65,7 @@ $lang['status_bundled'] = 'Gebundeld'; $lang['msg_enabled'] = 'Plugin %s ingeschakeld'; $lang['msg_disabled'] = 'Plugin %s uitgeschakeld'; $lang['msg_delete_success'] = 'Uitbreiding %s gedeinstalleerd'; +$lang['msg_delete_failed'] = 'Het deïnstalleren van de extensie %s is mislukt.'; $lang['msg_template_install_success'] = 'Template %s werd succesvol geïnstalleerd'; $lang['msg_template_update_success'] = 'Template %s werd succesvol geüpdatet'; $lang['msg_plugin_install_success'] = 'Plugin %s werd succesvol geïnstalleerd'; -- cgit v1.2.3 From 276820f70d7e96ee375735c1a15bdc0a8331a5a7 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Sat, 10 Jan 2015 14:47:51 +0000 Subject: Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- lib/plugins/authplain/_test/escaping.test.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authplain/_test/escaping.test.php b/lib/plugins/authplain/_test/escaping.test.php index 9df96389a..e1eade8d4 100644 --- a/lib/plugins/authplain/_test/escaping.test.php +++ b/lib/plugins/authplain/_test/escaping.test.php @@ -106,6 +106,9 @@ class helper_plugin_authplain_escaping_test extends DokuWikiTest { class auth_plugin_authplainharness extends auth_plugin_authplain { + /** + * @param boolean $bool + */ public function setPregsplit_safe($bool) { $this->_pregsplit_safe = $bool; } @@ -114,6 +117,9 @@ class auth_plugin_authplainharness extends auth_plugin_authplain { return $this->_pregsplit_safe; } + /** + * @param string $line + */ public function splitUserData($line){ return $this->_splitUserData($line); } -- cgit v1.2.3 From 5af3d1cd434f85882bb29253a3757cacc5c5338a Mon Sep 17 00:00:00 2001 From: KeenRivals Date: Wed, 14 Jan 2015 16:14:41 -0500 Subject: Losslessly reduced PNG images with optipng -o7 -strip all, advdef -z4 -i60, and advpng -z4 -i60. --- lib/plugins/acl/pix/group.png | Bin 700 -> 699 bytes lib/plugins/acl/pix/ns.png | Bin 800 -> 799 bytes lib/plugins/acl/pix/user.png | Bin 653 -> 650 bytes lib/plugins/config/images/danger.png | Bin 648 -> 637 bytes lib/plugins/config/images/security.png | Bin 706 -> 682 bytes lib/plugins/config/images/warning.png | Bin 613 -> 606 bytes lib/plugins/extension/images/disabled.png | Bin 1396 -> 1163 bytes lib/plugins/extension/images/donate.png | Bin 724 -> 677 bytes lib/plugins/extension/images/down.png | Bin 280 -> 197 bytes lib/plugins/extension/images/enabled.png | Bin 1398 -> 1172 bytes lib/plugins/extension/images/overlay.png | Bin 109 -> 68 bytes lib/plugins/extension/images/plugin.png | Bin 6824 -> 4054 bytes lib/plugins/extension/images/tag.png | Bin 753 -> 341 bytes lib/plugins/extension/images/template.png | Bin 7547 -> 5206 bytes lib/plugins/extension/images/up.png | Bin 281 -> 197 bytes lib/plugins/extension/images/warning.png | Bin 613 -> 606 bytes lib/plugins/usermanager/images/search.png | Bin 550 -> 549 bytes 17 files changed, 0 insertions(+), 0 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/pix/group.png b/lib/plugins/acl/pix/group.png index d80eb2606..348d4e55c 100644 Binary files a/lib/plugins/acl/pix/group.png and b/lib/plugins/acl/pix/group.png differ diff --git a/lib/plugins/acl/pix/ns.png b/lib/plugins/acl/pix/ns.png index c35e832da..77e03b19e 100644 Binary files a/lib/plugins/acl/pix/ns.png and b/lib/plugins/acl/pix/ns.png differ diff --git a/lib/plugins/acl/pix/user.png b/lib/plugins/acl/pix/user.png index 7b4a507a0..8d5d1c2e9 100644 Binary files a/lib/plugins/acl/pix/user.png and b/lib/plugins/acl/pix/user.png differ diff --git a/lib/plugins/config/images/danger.png b/lib/plugins/config/images/danger.png index 7bd84f7a3..da0692429 100644 Binary files a/lib/plugins/config/images/danger.png and b/lib/plugins/config/images/danger.png differ diff --git a/lib/plugins/config/images/security.png b/lib/plugins/config/images/security.png index 1800f8e56..3ee8476ac 100644 Binary files a/lib/plugins/config/images/security.png and b/lib/plugins/config/images/security.png differ diff --git a/lib/plugins/config/images/warning.png b/lib/plugins/config/images/warning.png index c5e482f84..c1af79f0f 100644 Binary files a/lib/plugins/config/images/warning.png and b/lib/plugins/config/images/warning.png differ diff --git a/lib/plugins/extension/images/disabled.png b/lib/plugins/extension/images/disabled.png index 93a813642..9c18b0452 100644 Binary files a/lib/plugins/extension/images/disabled.png and b/lib/plugins/extension/images/disabled.png differ diff --git a/lib/plugins/extension/images/donate.png b/lib/plugins/extension/images/donate.png index 9e234da1c..a76dfaaec 100644 Binary files a/lib/plugins/extension/images/donate.png and b/lib/plugins/extension/images/donate.png differ diff --git a/lib/plugins/extension/images/down.png b/lib/plugins/extension/images/down.png index df7beda4e..8e399a97d 100644 Binary files a/lib/plugins/extension/images/down.png and b/lib/plugins/extension/images/down.png differ diff --git a/lib/plugins/extension/images/enabled.png b/lib/plugins/extension/images/enabled.png index 92d958802..edbbb5b3c 100644 Binary files a/lib/plugins/extension/images/enabled.png and b/lib/plugins/extension/images/enabled.png differ diff --git a/lib/plugins/extension/images/overlay.png b/lib/plugins/extension/images/overlay.png index 8f92c2fe7..5414206c5 100644 Binary files a/lib/plugins/extension/images/overlay.png and b/lib/plugins/extension/images/overlay.png differ diff --git a/lib/plugins/extension/images/plugin.png b/lib/plugins/extension/images/plugin.png index e4a2d3be6..62424b2c7 100644 Binary files a/lib/plugins/extension/images/plugin.png and b/lib/plugins/extension/images/plugin.png differ diff --git a/lib/plugins/extension/images/tag.png b/lib/plugins/extension/images/tag.png index 155dbb3dd..1b1dd750c 100644 Binary files a/lib/plugins/extension/images/tag.png and b/lib/plugins/extension/images/tag.png differ diff --git a/lib/plugins/extension/images/template.png b/lib/plugins/extension/images/template.png index ee74bc1d5..67240d1eb 100644 Binary files a/lib/plugins/extension/images/template.png and b/lib/plugins/extension/images/template.png differ diff --git a/lib/plugins/extension/images/up.png b/lib/plugins/extension/images/up.png index ec9337715..531b2dd7b 100644 Binary files a/lib/plugins/extension/images/up.png and b/lib/plugins/extension/images/up.png differ diff --git a/lib/plugins/extension/images/warning.png b/lib/plugins/extension/images/warning.png index c5e482f84..c1af79f0f 100644 Binary files a/lib/plugins/extension/images/warning.png and b/lib/plugins/extension/images/warning.png differ diff --git a/lib/plugins/usermanager/images/search.png b/lib/plugins/usermanager/images/search.png index e9dabc11e..3f2a0b53b 100644 Binary files a/lib/plugins/usermanager/images/search.png and b/lib/plugins/usermanager/images/search.png differ -- cgit v1.2.3 From 208f4580295554c94e23377a4e02288bd5251908 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 15 Jan 2015 12:06:09 +0100 Subject: fixed wrong config check in extension manager #1006 --- lib/plugins/extension/helper/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 872cccc8c..8bcd00ec6 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -492,7 +492,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $errors .= '

    '.$this->getLang('git').'

    '; } - if ($extension->isEnabled() && in_array('Auth', $extension->getTypes()) && $conf['auth'] != $extension->getID()) { + if ($extension->isEnabled() && in_array('Auth', $extension->getTypes()) && $conf['authtype'] != $extension->getID()) { $errors .= '

    '.$this->getLang('auth').'

    '; } -- cgit v1.2.3 From 9b505d59adc0f5dd5a481c7a9a2e9d1f4f6780f3 Mon Sep 17 00:00:00 2001 From: Aleksandr Selivanov Date: Sun, 25 Jan 2015 20:56:05 +0100 Subject: translation update --- lib/plugins/authad/lang/ru/settings.php | 6 ++--- lib/plugins/authldap/lang/ru/settings.php | 18 +++++++-------- lib/plugins/authmysql/lang/ru/settings.php | 3 ++- lib/plugins/extension/lang/ru/intro_plugins.txt | 2 +- lib/plugins/extension/lang/ru/intro_search.txt | 2 +- lib/plugins/extension/lang/ru/intro_templates.txt | 2 +- lib/plugins/extension/lang/ru/lang.php | 28 +++++++++++------------ lib/plugins/usermanager/lang/ru/import.txt | 5 ++-- lib/plugins/usermanager/lang/ru/lang.php | 4 ++-- 9 files changed, 36 insertions(+), 34 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/ru/settings.php b/lib/plugins/authad/lang/ru/settings.php index 99c916b44..c791bd791 100644 --- a/lib/plugins/authad/lang/ru/settings.php +++ b/lib/plugins/authad/lang/ru/settings.php @@ -19,9 +19,9 @@ $lang['admin_username'] = 'Привилегированный польз $lang['admin_password'] = 'Пароль для указанного пользователя.'; $lang['sso'] = 'Использовать SSO (Single-Sign-On) через Kerberos или NTLM?'; $lang['sso_charset'] = 'Кодировка, в которой веб-сервер передаёт имя пользователя Kerberos или NTLM. Для UTF-8 или latin-1 остаётся пустым. Требует расширение iconv.'; -$lang['real_primarygroup'] = 'Должна ли использоваться настоящая первичная группа вместо "Domain Users" (медленнее)'; +$lang['real_primarygroup'] = 'Должна ли использоваться настоящая первичная группа вместо “Domain Users” (медленнее)'; $lang['use_ssl'] = 'Использовать SSL? Если да, то не включайте TLS.'; $lang['use_tls'] = 'Использовать TLS? Если да, то не включайте SSL.'; $lang['debug'] = 'Выводить дополнительную информацию при ошибках?'; -$lang['expirywarn'] = 'За сколько дней нужно предупреждать пользователя о необходимости изменить пароль. 0 - отключить.'; -$lang['additional'] = 'Дополнительные AD атрибуты, разделённые запятой, для выборки из данных пользователя. Используется некоторыми плагинами.'; +$lang['expirywarn'] = 'За сколько дней нужно предупреждать пользователя о необходимости изменить пароль? Для отключения укажите 0 (ноль).'; +$lang['additional'] = 'Дополнительные AD-атрибуты, разделённые запятой, для выборки из данных пользователя. Используется некоторыми плагинами.'; diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php index 534990648..1e5391644 100644 --- a/lib/plugins/authldap/lang/ru/settings.php +++ b/lib/plugins/authldap/lang/ru/settings.php @@ -10,16 +10,16 @@ * @author Владимир * @author Vitaly Filatenko */ -$lang['server'] = 'Ваш LDAP сервер. Либо имя хоста (localhost), либо полный URL (ldap://server.tld:389)'; -$lang['port'] = 'Порт LDAP сервера, если выше не был указан полный URL'; -$lang['usertree'] = 'Где искать аккаунты пользователей. Например: ou=People, dc=server, dc=tld'; -$lang['grouptree'] = 'Где искать группы пользователей. Например: ou=Group, dc=server, dc=tld'; -$lang['userfilter'] = 'LDAP фильтр для поиска аккаунтов пользователей. Например: (&(uid=%{user})(objectClass=posixAccount))'; -$lang['groupfilter'] = 'LDAP фильтр для поиска групп. Например: (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; -$lang['version'] = 'Версия протокола. Возможно вам нужно указать 3'; -$lang['starttls'] = 'Использовать TLS подключения?'; +$lang['server'] = 'Ваш LDAP-сервер. Либо имя хоста (localhost), либо полный URL (ldap://server.tld:389)'; +$lang['port'] = 'Порт LDAP-сервера, если выше не был указан полный URL'; +$lang['usertree'] = 'Где искать аккаунты пользователей? Например: ou=People, dc=server, dc=tld'; +$lang['grouptree'] = 'Где искать группы пользователей? Например: ou=Group, dc=server, dc=tld'; +$lang['userfilter'] = 'LDAP-фильтр для поиска аккаунтов пользователей. Например: (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'LDAP-фильтр для поиска групп. Например: (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = 'Версия протокола. Возможно, вам нужно указать 3'; +$lang['starttls'] = 'Использовать TLS-подключения?'; $lang['deref'] = 'Как расшифровывать псевдонимы?'; -$lang['bindpw'] = 'Пароль для указанного пользователя.'; +$lang['bindpw'] = 'Пароль для указанного пользователя'; $lang['userscope'] = 'Ограничить область поиска при поиске пользователей'; $lang['groupscope'] = 'Ограничить область поиска при поиске групп'; $lang['debug'] = 'Показывать дополнительную отладочную информацию при ошибках'; diff --git a/lib/plugins/authmysql/lang/ru/settings.php b/lib/plugins/authmysql/lang/ru/settings.php index eefec065b..d9afa14e6 100644 --- a/lib/plugins/authmysql/lang/ru/settings.php +++ b/lib/plugins/authmysql/lang/ru/settings.php @@ -6,6 +6,7 @@ * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Aleksandr Selivanov * @author Type-kun + * @author Aleksandr Selivanov */ $lang['server'] = 'Ваш MySQL-сервер'; $lang['user'] = 'Имя пользователя MySQL'; @@ -14,7 +15,7 @@ $lang['database'] = 'Имя базы данных'; $lang['charset'] = 'Используемый набор символов в базе данных'; $lang['debug'] = 'Отображение дополнительной отладочной информации'; $lang['forwardClearPass'] = 'Передача пароля пользователя открытым текстом, вместо зашифрованной формы в используемом выражении SQL'; -$lang['TablesToLock'] = 'Имена таблиц (через запятую), которые необходимо ограничение для записи'; +$lang['TablesToLock'] = 'Имена таблиц (через запятую), которым необходимо ограничение для записи'; $lang['checkPass'] = 'Выражение SQL, осуществляющее проверку пароля'; $lang['getUserInfo'] = 'Выражение SQL, осуществляющее извлечение информации о пользователе'; $lang['getGroups'] = 'Выражение SQL, осуществляющее извлечение информации о членстве пользователе в группах'; diff --git a/lib/plugins/extension/lang/ru/intro_plugins.txt b/lib/plugins/extension/lang/ru/intro_plugins.txt index 7262516db..c5ea9e0ec 100644 --- a/lib/plugins/extension/lang/ru/intro_plugins.txt +++ b/lib/plugins/extension/lang/ru/intro_plugins.txt @@ -1 +1 @@ -Плагины, установленные в вашей DokuWiki. Здесь вы можете их включить или выключить, или даже полностью удалить. Также здесь показываются обновления плагинов, обязательно прочтите документацию плагина перед обновлением. \ No newline at end of file +Плагины, установленные в вашей «Докувики». Здесь вы можете их включить или выключить, или даже полностью удалить. Также здесь показываются обновления плагинов; обязательно прочтите документацию плагина перед обновлением. \ No newline at end of file diff --git a/lib/plugins/extension/lang/ru/intro_search.txt b/lib/plugins/extension/lang/ru/intro_search.txt index a8486eab6..3c16748ba 100644 --- a/lib/plugins/extension/lang/ru/intro_search.txt +++ b/lib/plugins/extension/lang/ru/intro_search.txt @@ -1 +1 @@ -Эта вкладка дает вам доступ ко всем имеющимся сторонним плагинам и шаблонам для DokuWiki. Имейте в виду, что установка стороннего кода может представлять **угрозу безопасности**, возможно вам нужно сперва прочитать о [[doku>security#plugin_security|безопасности плагинов]]. \ No newline at end of file +Вкладка даёт вам доступ ко всем имеющимся сторонним плагинам и шаблонам для «Докувики». Имейте ввиду, что установка стороннего кода может представлять **угрозу безопасности,** возможно вам нужно сперва прочитать о [[doku>security#plugin_security|безопасности плагинов]]. \ No newline at end of file diff --git a/lib/plugins/extension/lang/ru/intro_templates.txt b/lib/plugins/extension/lang/ru/intro_templates.txt index 2d0b74256..787b32fa3 100644 --- a/lib/plugins/extension/lang/ru/intro_templates.txt +++ b/lib/plugins/extension/lang/ru/intro_templates.txt @@ -1 +1 @@ -Это шаблоны, установленные в вашей DokuWiki. Вы можете выбрать шаблон, который нужно использовать в [[?do=admin&page=config|Менеджере Конфигурации]] \ No newline at end of file +Шаблоны (темы оформления), установленные в вашей «Докувики». Шаблон, который нужно использовать, выбирается в [[?do=admin&page=config|настройках вики]] \ No newline at end of file diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php index 64db39b78..381d84500 100644 --- a/lib/plugins/extension/lang/ru/lang.php +++ b/lib/plugins/extension/lang/ru/lang.php @@ -36,18 +36,18 @@ $lang['popularity'] = 'Популярность: %s%%'; $lang['homepage_link'] = 'Описание'; $lang['bugs_features'] = 'Баг-трекер'; $lang['tags'] = 'Метки:'; -$lang['author_hint'] = 'Найти дополнения этого автора'; +$lang['author_hint'] = 'Найти дополнения автора'; $lang['installed'] = 'Установлено:'; -$lang['downloadurl'] = 'Ссылка для скачивания:'; +$lang['downloadurl'] = 'Скачать:'; $lang['repository'] = 'Репозиторий:'; $lang['unknown'] = 'неизвестно'; -$lang['installed_version'] = 'Установленная версия:'; -$lang['install_date'] = 'Последнее обновление:'; +$lang['installed_version'] = 'Уст. версия:'; +$lang['install_date'] = 'Посл. обновление:'; $lang['available_version'] = 'Доступная версия:'; -$lang['compatible'] = 'Совместим с:'; -$lang['depends'] = 'Зависит от:'; -$lang['similar'] = 'Похож на:'; -$lang['conflicts'] = 'Конфликтует с:'; +$lang['compatible'] = 'Совместим с'; +$lang['depends'] = 'Зависит от'; +$lang['similar'] = 'Похож на'; +$lang['conflicts'] = 'Конфликтует с'; $lang['donate'] = 'Нравится?'; $lang['donate_action'] = 'Купить автору кофе!'; $lang['repo_retry'] = 'Повторить'; @@ -64,7 +64,7 @@ $lang['status_template'] = 'шаблон'; $lang['status_bundled'] = 'в комплекте'; $lang['msg_enabled'] = 'Плагин %s включён'; $lang['msg_disabled'] = 'Плагин %s отключён'; -$lang['msg_delete_success'] = 'Дополнение удалено'; +$lang['msg_delete_success'] = 'Дополнение %s удалено'; $lang['msg_delete_failed'] = 'Не удалось удалить расширение %s'; $lang['msg_template_install_success'] = 'Шаблон %s успешно установлен'; $lang['msg_template_update_success'] = 'Шаблон %s успешно обновлён'; @@ -75,18 +75,18 @@ $lang['missing_dependency'] = 'Отсутствует или откл $lang['security_issue'] = 'Проблема безопасности: %s'; $lang['security_warning'] = 'Предупреждение безопасности: %s'; $lang['update_available'] = 'Обновление: доступна новая версия %s.'; -$lang['wrong_folder'] = 'Плагин установлен неправильно: Переименуйте директорию "%s" в "%s".'; -$lang['url_change'] = 'Ссылка изменилась: Ссылка для загрузки изменилась с прошлого раза. Проверьте новую ссылку прежде чем обновлять расширение.
    Новая: %s
    Старая: %s'; +$lang['wrong_folder'] = 'Плагин установлен неправильно: переименуйте папку плагина из %s в %s.'; +$lang['url_change'] = 'Ссылка изменилась: ссылка для загрузки изменилась с прошлого раза. Проверьте новую ссылку прежде, чем обновлять расширение.
    Новая: %s
    Старая: %s'; $lang['error_badurl'] = 'Ссылки должны начинаться с http или https'; $lang['error_dircreate'] = 'Не удалось создать временную директорию для загрузки'; $lang['error_download'] = 'Не удалось загрузить файл: %s'; -$lang['error_decompress'] = 'Не удалось распаковать загруженный файл. Возможно, файл был повреждён при загрузке - тогда нужно попробовать ещё раз. Либо неизвестен формат архива - тогда загрузку и установку надо произвести вручную.'; +$lang['error_decompress'] = 'Не удалось распаковать загруженный файл. Возможно, файл был повреждён при загрузке — тогда нужно попробовать ещё раз. Либо неизвестен формат архива — тогда загрузку и установку надо произвести вручную.'; $lang['error_findfolder'] = 'Не удалось определить директорию для расширения, загрузку и установку надо произвести вручную.'; $lang['error_copy'] = 'Возникла ошибка копирования файлов в директорию %s: возможно, диск переполнен, или неверно выставлены права доступа. Это могло привести к неполной установке плагина и нарушить работу вашей вики.'; $lang['noperms'] = 'Папка для расширений недоступна для записи'; $lang['notplperms'] = 'Папка для шаблонов недоступна для записи'; $lang['nopluginperms'] = 'Папка плагинов недоступна для записи'; $lang['git'] = 'Это расширение было установлено через git. Вы не можете обновить его тут.'; -$lang['install_url'] = 'Установить с адреса URL:'; -$lang['install_upload'] = 'Скачать расширение:'; +$lang['install_url'] = 'Установить с адреса URL'; +$lang['install_upload'] = 'Скачать расширение'; $lang['repo_error'] = 'Сайт с плагинами недоступен. Убедитесь, что у сайта есть доступ на www.dokuwiki.org, а также проверьте настройки соединения с Интернетом.'; diff --git a/lib/plugins/usermanager/lang/ru/import.txt b/lib/plugins/usermanager/lang/ru/import.txt index c92e47b4c..22372c254 100644 --- a/lib/plugins/usermanager/lang/ru/import.txt +++ b/lib/plugins/usermanager/lang/ru/import.txt @@ -2,7 +2,8 @@ Потребуется список пользователей в файле формата CSV, состоящий из 4 столбцов. Столбцы должны быть заполнены следующим образом: user-id, полное имя, эл. почта, группы. -Поля CSV должны быть отделены запятой (,), а строки должны быть заключены в кавычки (%%""%%). Обратный слэш используется как прерывание. -В качестве примера можете взять список пользователей, экспортированный через «Экспорт пользователей». Повторяющиеся идентификаторы user-id будут игнорироваться. +Поля CSV должны быть отделены запятой (,), а строки должны быть заключены в кавычки (%%""%%). Обратный слэш (\) используется как прерывание. +В качестве примера можете взять список пользователей, экспортированный через «Экспорт пользователей». +Повторяющиеся идентификаторы user-id будут игнорироваться. Пароль доступа будет сгенерирован и отправлен по почте удачно импортированному пользователю. \ 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 0914d7b49..de650d681 100644 --- a/lib/plugins/usermanager/lang/ru/lang.php +++ b/lib/plugins/usermanager/lang/ru/lang.php @@ -70,10 +70,10 @@ $lang['add_fail'] = 'Не удалось добавить поль $lang['notify_ok'] = 'Письмо с уведомлением отправлено'; $lang['notify_fail'] = 'Не удалось отправить письмо с уведомлением'; $lang['import_userlistcsv'] = 'Файл со списком пользователей (CSV):'; -$lang['import_header'] = 'Последний импорт - список ошибок'; +$lang['import_header'] = 'Последний импорт — список ошибок'; $lang['import_success_count'] = 'Импорт пользователей: %d пользователей найдено, %d импортировано успешно.'; $lang['import_failure_count'] = 'Импорт пользователей: %d не удалось. Список ошибок прочтите ниже.'; -$lang['import_error_fields'] = 'Не все поля заполнены. Найдено %d, а нужно 4.'; +$lang['import_error_fields'] = 'Не все поля заполнены. Найдено %d, а нужно: 4.'; $lang['import_error_baduserid'] = 'Отсутствует идентификатор пользователя'; $lang['import_error_badname'] = 'Имя не годится'; $lang['import_error_badmail'] = 'Адрес электронной почты не годится'; -- cgit v1.2.3 From c85cbe690d7a58d7835f92aa71252cf2d25d40a2 Mon Sep 17 00:00:00 2001 From: Davor Turkalj Date: Wed, 28 Jan 2015 09:26:11 +0100 Subject: translation update --- lib/plugins/extension/lang/hr/lang.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/hr/lang.php b/lib/plugins/extension/lang/hr/lang.php index f43defcb1..e51d8cba3 100644 --- a/lib/plugins/extension/lang/hr/lang.php +++ b/lib/plugins/extension/lang/hr/lang.php @@ -5,20 +5,20 @@ * * @author Davor Turkalj */ -$lang['menu'] = 'Upravitelj dodataka'; +$lang['menu'] = 'Upravitelj proširenja'; $lang['tab_plugins'] = 'Ugrađeni dodatci'; $lang['tab_templates'] = 'Ugrađeni predlošci'; $lang['tab_search'] = 'Potraži i ugradi'; $lang['tab_install'] = 'Ručna ugradnja'; $lang['notimplemented'] = 'Ova mogućnost još nije napravljena'; -$lang['notinstalled'] = 'Dodatak nije ugrađen'; -$lang['alreadyenabled'] = 'Ovaj dodatak je već omogućen'; -$lang['alreadydisabled'] = 'Ovaj dodatak je već onemogućen'; +$lang['notinstalled'] = 'Proširenje nije ugrađeno'; +$lang['alreadyenabled'] = 'Ovo proširenje je već omogućeno'; +$lang['alreadydisabled'] = 'Ovo proširenje je već onemogućeno'; $lang['pluginlistsaveerror'] = 'Dogodila se greška pri snimanju liste dodataka'; $lang['unknownauthor'] = 'Nepoznat autor'; $lang['unknownversion'] = 'Nepoznata inačica'; $lang['btn_info'] = 'Prikaži više informacija'; -$lang['btn_update'] = 'Dogradi'; +$lang['btn_update'] = 'Ažuriraj'; $lang['btn_uninstall'] = 'Ukloni'; $lang['btn_enable'] = 'Omogući'; $lang['btn_disable'] = 'Onemogući'; @@ -33,7 +33,7 @@ $lang['popularity'] = 'Popularnost: %s%%'; $lang['homepage_link'] = 'Upute'; $lang['bugs_features'] = 'Greške'; $lang['tags'] = 'Oznake:'; -$lang['author_hint'] = 'Potraži dodatke od ovog autora'; +$lang['author_hint'] = 'Potraži proširenja od ovog autora'; $lang['installed'] = 'Ugrađeno:'; $lang['downloadurl'] = 'URL adresa preuzimanja:'; $lang['repository'] = 'Repozitorij:'; @@ -61,7 +61,8 @@ $lang['status_template'] = 'predložak'; $lang['status_bundled'] = 'ugrađen'; $lang['msg_enabled'] = 'Dodatak %s omogućen'; $lang['msg_disabled'] = 'Dodatak %s onemogućen'; -$lang['msg_delete_success'] = 'Proširenje uklonjeno'; +$lang['msg_delete_success'] = 'Proširenje %s uklonjeno'; +$lang['msg_delete_failed'] = 'Uklanjanje proširenja %s nije uspjelo'; $lang['msg_template_install_success'] = 'Predložak %s uspješno ugrađen'; $lang['msg_template_update_success'] = 'Predložak %s uspješno nadograđen'; $lang['msg_plugin_install_success'] = 'Dodatak %s uspješno ugrađen'; @@ -83,6 +84,8 @@ $lang['noperms'] = 'Nije moguće pisati u mapu proširanja'; $lang['notplperms'] = 'Nije moguće pisati u mapu predloška'; $lang['nopluginperms'] = 'Nije moguće pisati u mapu dodatka'; $lang['git'] = 'Proširenje je ugrađeno preko Git-a, možda ga ne želite nadograđivati ovdje.'; +$lang['auth'] = 'Autorizacijski dodatak nije podešen, razmotrite njegovo onemogućavanje kao dodatka.'; $lang['install_url'] = 'Ugradi s URL-a:'; $lang['install_upload'] = 'Učitaj proširenje:'; $lang['repo_error'] = 'Repozitorij dodataka nije dostupan. Budite sigurni da server može pristupiti www.dokuwiki.org i provjerite proxy postavke.'; +$lang['nossl'] = 'Izgleda da korišteni PHP ne podržava SSL. Učitavanje neće raditi na mnogim DokuWiki dodatcima.'; -- cgit v1.2.3 From 4c32d8dc4120e5a2667564b4108b3708986ea47e Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 9 Feb 2015 09:17:32 +0100 Subject: fixed method signature #1024 --- lib/plugins/authad/action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/action.php b/lib/plugins/authad/action.php index 97be9897e..bc0f90c7e 100644 --- a/lib/plugins/authad/action.php +++ b/lib/plugins/authad/action.php @@ -17,7 +17,7 @@ class action_plugin_authad extends DokuWiki_Action_Plugin { /** * Registers a callback function for a given event */ - public function register(Doku_Event_Handler &$controller) { + 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'); -- cgit v1.2.3 From d75d76b237162cf89dcc8f56703ec0607ed27fdb Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 9 Feb 2015 09:40:24 +0100 Subject: fix referral settings in AuthLDAP. closes #1023 --- lib/plugins/authldap/auth.php | 4 ++-- lib/plugins/authldap/conf/default.php | 2 +- lib/plugins/authldap/conf/metadata.php | 2 +- lib/plugins/authldap/lang/en/settings.php | 4 ++++ 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index fd4729331..50735882f 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -516,13 +516,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } } // needs version 3 - if($this->getConf('referrals')) { + if($this->getConf('referrals') > -1) { if(!@ldap_set_option( $this->con, LDAP_OPT_REFERRALS, $this->getConf('referrals') ) ) { - msg('Setting LDAP referrals to off failed', -1); + msg('Setting LDAP referrals failed', -1); $this->_debug('LDAP referal set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); } } diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php index 2c295eeeb..c2e462c5c 100644 --- a/lib/plugins/authldap/conf/default.php +++ b/lib/plugins/authldap/conf/default.php @@ -8,7 +8,7 @@ $conf['userfilter'] = ''; $conf['groupfilter'] = ''; $conf['version'] = 2; $conf['starttls'] = 0; -$conf['referrals'] = 0; +$conf['referrals'] = -1; $conf['deref'] = 0; $conf['binddn'] = ''; $conf['bindpw'] = ''; diff --git a/lib/plugins/authldap/conf/metadata.php b/lib/plugins/authldap/conf/metadata.php index 6aa53c40d..4649ba5bf 100644 --- a/lib/plugins/authldap/conf/metadata.php +++ b/lib/plugins/authldap/conf/metadata.php @@ -7,7 +7,7 @@ $meta['userfilter'] = array('string','_caution' => 'danger'); $meta['groupfilter'] = array('string','_caution' => 'danger'); $meta['version'] = array('numeric','_caution' => 'danger'); $meta['starttls'] = array('onoff','_caution' => 'danger'); -$meta['referrals'] = array('onoff','_caution' => 'danger'); +$meta['referrals'] = array('multichoice','_choices' => array(-1,0,1),'_caution' => 'danger'); $meta['deref'] = array('multichoice','_choices' => array(0,1,2,3),'_caution' => 'danger'); $meta['binddn'] = array('string','_caution' => 'danger'); $meta['bindpw'] = array('password','_caution' => 'danger'); diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index b73166ab2..951901ccc 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -21,3 +21,7 @@ $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'; + +$lang['referrals_o_-1'] = 'use default'; +$lang['referrals_o_0'] = 'don\'t follow referrals'; +$lang['referrals_o_1'] = 'follow referrals'; \ No newline at end of file -- cgit v1.2.3 From cbb4a6817d10faf5d8376e07a26e2030a2335d78 Mon Sep 17 00:00:00 2001 From: lainme Date: Thu, 12 Feb 2015 08:51:36 +0100 Subject: translation update --- lib/plugins/authldap/lang/zh/settings.php | 3 +++ lib/plugins/extension/lang/zh/lang.php | 3 +++ 2 files changed, 6 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/zh/settings.php b/lib/plugins/authldap/lang/zh/settings.php index cdaf3dc64..d4ea5c615 100644 --- a/lib/plugins/authldap/lang/zh/settings.php +++ b/lib/plugins/authldap/lang/zh/settings.php @@ -26,3 +26,6 @@ $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'; +$lang['referrals_o_-1'] = '默认'; +$lang['referrals_o_0'] = '不要跟随参照(referral)'; +$lang['referrals_o_1'] = '跟随参照(referral)'; diff --git a/lib/plugins/extension/lang/zh/lang.php b/lib/plugins/extension/lang/zh/lang.php index 0264f3e9c..5ab3d77ba 100644 --- a/lib/plugins/extension/lang/zh/lang.php +++ b/lib/plugins/extension/lang/zh/lang.php @@ -65,6 +65,7 @@ $lang['status_bundled'] = '内建'; $lang['msg_enabled'] = '插件 %s 已启用'; $lang['msg_disabled'] = '插件 %s 已禁用'; $lang['msg_delete_success'] = '插件已经卸载'; +$lang['msg_delete_failed'] = '卸载扩展 %s 失败'; $lang['msg_template_install_success'] = '模板 %s 安装成功'; $lang['msg_template_update_success'] = '模板 %s 更新成功'; $lang['msg_plugin_install_success'] = '插件 %s 安装成功'; @@ -86,6 +87,8 @@ $lang['noperms'] = '扩展目录不可写'; $lang['notplperms'] = '模板目录不可写'; $lang['nopluginperms'] = '插件目录不可写'; $lang['git'] = '这个扩展是通过 git 安装的,您可能不想在这里升级它'; +$lang['auth'] = '这个认证插件没有在配置中启用,请考虑禁用它。'; $lang['install_url'] = '从 URL 安装:'; $lang['install_upload'] = '上传扩展:'; $lang['repo_error'] = '无法连接到插件仓库。请确定您的服务器可以连接 www.dokuwiki.org 并检查您的代理设置。'; +$lang['nossl'] = '您的 PHP 似乎没有 SSL 支持。很多 Dokuwiki 扩展将无法下载。'; -- cgit v1.2.3 From c2a2396e45a7ec8a14d573c89719463e765b1074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Iradier?= Date: Fri, 13 Feb 2015 16:01:39 +0100 Subject: translation update --- lib/plugins/extension/lang/es/lang.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/es/lang.php b/lib/plugins/extension/lang/es/lang.php index 63742c3b3..a835cb630 100644 --- a/lib/plugins/extension/lang/es/lang.php +++ b/lib/plugins/extension/lang/es/lang.php @@ -6,6 +6,7 @@ * @author Antonio Bueno * @author Antonio Castilla * @author Jonathan Hernández + * @author Álvaro Iradier */ $lang['menu'] = 'Administrador de Extensiones '; $lang['tab_plugins'] = 'Plugins instalados'; @@ -64,6 +65,7 @@ $lang['status_bundled'] = 'agrupado'; $lang['msg_enabled'] = 'Plugin %s activado'; $lang['msg_disabled'] = 'Plugin %s desactivado'; $lang['msg_delete_success'] = 'Extensión desinstalada'; +$lang['msg_delete_failed'] = 'La desinstalación de la extensión %s ha fallado'; $lang['msg_template_install_success'] = 'Plantilla %s instalada con éxito'; $lang['msg_template_update_success'] = 'Plantilla %s actualizada con éxito'; $lang['msg_plugin_install_success'] = 'Plugin %s instalado con éxito'; @@ -78,6 +80,9 @@ $lang['url_change'] = 'URL actualizada: El Download $lang['error_badurl'] = 'URLs deberían empezar con http o https'; $lang['error_dircreate'] = 'No es posible de crear un directorio temporero para poder recibir el download'; $lang['error_download'] = 'No es posible descargar el documento: %s'; +$lang['error_decompress'] = 'No se pudo descomprimir el fichero descargado. Puede ser a causa de una descarga incorrecta, en cuyo caso puedes intentarlo de nuevo; o puede que el formato de compresión sea desconocido, en cuyo caso necesitarás descargar e instalar manualmente.'; +$lang['noperms'] = 'El directorio de extensiones no tiene permiso de escritura.'; +$lang['notplperms'] = 'El directorio de plantillas no tiene permiso de escritura.'; $lang['git'] = 'Esta extensión fue instalada a través de git, quizás usted no quiera actualizarla aquí mismo.'; $lang['install_url'] = 'Instalar desde URL:'; $lang['install_upload'] = 'Subir Extensión:'; -- cgit v1.2.3 From 9cbf80e627322dee19852b953ef242b4e0ad514a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 24 Feb 2015 19:45:03 +0100 Subject: check permissions in ACL plugin's RPC API component. #1056 Security Fix Severity: Medium Type: Remote Priviledge Escalation Remote: yes Vulnerability Details: This fixes a security hole in the ACL plugins remote API component. The plugin failed to check for superuser permissions before executing ACL addition or deletion. This means everybody with permissions to call the XMLRPC API also had permissions to set up their own ACL rules and thus circumventing any existing rules. Risk Assessment: The XMLRPC API in DokuWiki is marked experimental and off by default. It also implements an additional safeguard by giving access to a configured circle of users and groups only. So only a minor number of DokuWiki installations will be affected at all. For affected installations the risk is high if users with access to the API are not to be trusted. Thus the overall severity of medium. Resolution: Installations applying this commit are safe. A hotfix is about to be released. Meanwhile users are advised to disable the XMLRPC API in the config manager. --- lib/plugins/acl/remote.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/remote.php b/lib/plugins/acl/remote.php index b10c544ee..42449428f 100644 --- a/lib/plugins/acl/remote.php +++ b/lib/plugins/acl/remote.php @@ -32,9 +32,14 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin { * @param string $scope * @param string $user * @param int $level see also inc/auth.php + * @throws RemoteAccessDeniedException * @return bool */ public function addAcl($scope, $user, $level){ + if(!auth_isadmin()) { + throw new RemoteAccessDeniedException('You are not allowed to access ACLs, superuser permission is required', 114); + } + /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); return $apa->_acl_add($scope, $user, $level); @@ -45,9 +50,14 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin { * * @param string $scope * @param string $user + * @throws RemoteAccessDeniedException * @return bool */ public function delAcl($scope, $user){ + if(!auth_isadmin()) { + throw new RemoteAccessDeniedException('You are not allowed to access ACLs, superuser permission is required', 114); + } + /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); return $apa->_acl_del($scope, $user); -- cgit v1.2.3 From 6401de3d8cba9f2c76724a2c2c68c7d3fc97d2e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schplurtz=20le=20D=C3=A9boulonn=C3=A9?= Date: Tue, 24 Feb 2015 22:16:02 +0100 Subject: translation update --- lib/plugins/authldap/lang/fr/settings.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/fr/settings.php b/lib/plugins/authldap/lang/fr/settings.php index dc475071e..aa75105cf 100644 --- a/lib/plugins/authldap/lang/fr/settings.php +++ b/lib/plugins/authldap/lang/fr/settings.php @@ -5,6 +5,7 @@ * * @author Bruno Veilleux * @author schplurtz + * @author Schplurtz le Déboulonné */ $lang['server'] = 'Votre serveur LDAP. Soit le nom d\'hôte (localhost) ou l\'URL complète (ldap://serveur.dom:389)'; $lang['port'] = 'Port du serveur LDAP si l\'URL complète n\'a pas été indiquée ci-dessus'; @@ -26,3 +27,6 @@ $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'; +$lang['referrals_o_-1'] = 'comportement par défaut'; +$lang['referrals_o_0'] = 'ne pas suivre les références'; +$lang['referrals_o_1'] = 'suivre les références'; -- cgit v1.2.3 From 6619ddf4b04390e1d1273dd79bd16bfb9eb6cf89 Mon Sep 17 00:00:00 2001 From: Sascha Klopp Date: Tue, 3 Mar 2015 11:09:21 +0100 Subject: Two new authldap config options: 'userkey' denotes the LDAP attribute holding the username, 'modPass' allows to disable password changing by the user. --- lib/plugins/authldap/auth.php | 5 +++-- lib/plugins/authldap/conf/default.php | 4 +++- lib/plugins/authldap/conf/metadata.php | 4 +++- lib/plugins/authldap/lang/de/settings.php | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 50735882f..9d031c049 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -37,7 +37,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } // Add the capabilities to change the password - $this->cando['modPass'] = true; + $this->cando['modPass'] = $this->getConf('modPass'); } /** @@ -360,8 +360,9 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { $sr = ldap_search($this->con, $this->getConf('usertree'), $all_filter); $entries = ldap_get_entries($this->con, $sr); $users_array = array(); + $userkey = $this->getConf('userkey'); for($i = 0; $i < $entries["count"]; $i++) { - array_push($users_array, $entries[$i]["uid"][0]); + array_push($users_array, $entries[$i][$userkey][0]); } asort($users_array); $result = $users_array; diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php index c2e462c5c..116cb9d3f 100644 --- a/lib/plugins/authldap/conf/default.php +++ b/lib/plugins/authldap/conf/default.php @@ -16,5 +16,7 @@ $conf['bindpw'] = ''; //$conf['mapping']['grps'] unsupported in config manager $conf['userscope'] = 'sub'; $conf['groupscope'] = 'sub'; +$conf['userkey'] = 'uid'; $conf['groupkey'] = 'cn'; -$conf['debug'] = 0; \ No newline at end of file +$conf['debug'] = 0; +$conf['modPass'] = 1; diff --git a/lib/plugins/authldap/conf/metadata.php b/lib/plugins/authldap/conf/metadata.php index 4649ba5bf..a67b11ca6 100644 --- a/lib/plugins/authldap/conf/metadata.php +++ b/lib/plugins/authldap/conf/metadata.php @@ -15,5 +15,7 @@ $meta['bindpw'] = array('password','_caution' => 'danger'); //$meta['mapping']['grps'] unsupported in config manager $meta['userscope'] = array('multichoice','_choices' => array('sub','one','base'),'_caution' => 'danger'); $meta['groupscope'] = array('multichoice','_choices' => array('sub','one','base'),'_caution' => 'danger'); +$meta['userkey'] = array('string','_caution' => 'danger'); $meta['groupkey'] = array('string','_caution' => 'danger'); -$meta['debug'] = array('onoff','_caution' => 'security'); \ No newline at end of file +$meta['debug'] = array('onoff','_caution' => 'security'); +$meta['modPass'] = array('onoff'); diff --git a/lib/plugins/authldap/lang/de/settings.php b/lib/plugins/authldap/lang/de/settings.php index d788da876..ecb407820 100644 --- a/lib/plugins/authldap/lang/de/settings.php +++ b/lib/plugins/authldap/lang/de/settings.php @@ -20,6 +20,7 @@ $lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonym $lang['bindpw'] = 'Passwort des angegebenen Benutzers.'; $lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.'; $lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.'; +$lang['userkey'] = 'Attribut, das den Benutzernamen enthält; muss konsistent zum userfilter sein.'; $lang['groupkey'] = 'Gruppieren der Benutzeraccounts anhand eines beliebigen Benutzerattributes z. B. Telefonnummer oder Abteilung, anstelle der Standard-Gruppen).'; $lang['debug'] = 'Debug-Informationen beim Auftreten von Fehlern anzeigen?'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; -- cgit v1.2.3 From 25f80763dd71190679289de2b8d29f28021aedb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Wed, 11 Mar 2015 19:49:14 +0100 Subject: Get total number of users in ad, needed for paging --- lib/plugins/authad/auth.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 88b56046c..a0a1143db 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -116,6 +116,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { // other can do's are changed in $this->_loadServerConfig() base on domain setup $this->cando['modName'] = true; $this->cando['modMail'] = true; + $this->cando['getUserCount'] = true; } /** @@ -325,6 +326,26 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { return false; } + /** + * @param array $filter + * @return int + */ + public function getUserCount($filter = array()) { + + $adldap = $this->_adldap(null); + if(!$adldap) { + dbglog("authad/auth.php: _adldap not set."); + return -1; + } + + $result = $adldap->user()->all(); + if (!$result) { + dbglog("authad/auth.php: getting all users failed."); + return -1; + } + return count($result); + } + /** * Bulk retrieval of user data * -- cgit v1.2.3 From 67a31a83dd6c8a3ff9e87da0c2070a2783aec44e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 12 Mar 2015 13:09:08 +0100 Subject: Create and use ad search for user, name and email --- lib/plugins/authad/auth.php | 68 ++++++++++++++++++++++++++++++++------- lib/plugins/usermanager/admin.php | 14 ++++++++ 2 files changed, 71 insertions(+), 11 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index a0a1143db..f1f34245e 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -326,19 +326,63 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { return false; } + protected function _constructSearchString($filter){ + if (!$filter){ + return '*'; + } + $result = '*'; + if (isset($filter['name'])) { + $result .= ')(displayname=*' . $filter['name'] . '*'; + unset($filter['name']); + } + if (isset($filter['user'])) { + $result .= ')(samAccountName=*' . $filter['user'] . '*'; + unset($filter['user']); + } + + if (isset($filter['mail'])) { + $result .= ')(mail=*' . $filter['mail'] . '*'; + unset($filter['mail']); + } + dbglog($result); + return $result; + } + /** * @param array $filter * @return int */ public function getUserCount($filter = array()) { + if ($filter == array()) { + $adldap = $this->_adldap(null); + if(!$adldap) { + dbglog("authad/auth.php getUserCount(): _adldap not set."); + return -1; + } + $result = $adldap->user()->all(); + $start = 0; + } else {/* + dbglog('_startcache: ' . $this->_startcache); + $usermanager = plugin_load("admin", "usermanager", false); + if ($this->_startcache < $usermanager->getStart()) { + $start = $usermanager->getStart(); + $this->_startcache = $start; + } else { + $start = $this->_startcache; + } + $pagesize = $usermanager->getPagesize(); + $result = $this->retrieveUsers($start, 3*$pagesize,$filter,false);*/ + $adldap = $this->_adldap(null); + if(!$adldap) { + dbglog("authad/auth.php getUserCount(): _adldap not set."); + return -1; + } + dbglog($filter); + $searchString = $this->_constructSearchString($filter); + $result = $adldap->user()->all(false, $searchString); - $adldap = $this->_adldap(null); - if(!$adldap) { - dbglog("authad/auth.php: _adldap not set."); - return -1; } - $result = $adldap->user()->all(); if (!$result) { dbglog("authad/auth.php: getting all users failed."); return -1; @@ -351,18 +395,20 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * * @author Dominik Eckelmann * - * @param int $start index of first user to be returned - * @param int $limit max number of users to be returned - * @param array $filter array of field/pattern pairs, null for no filter - * @return array userinfo (refer getUserData for internal userinfo details) + * @param int $start index of first user to be returned + * @param int $limit max number of users to be returned + * @param array $filter array of field/pattern pairs, null for no filter + * @param bool $setStart + * @return array userinfo (refer getUserData for internal userinfo details) */ - public function retrieveUsers($start = 0, $limit = 0, $filter = array()) { + public function retrieveUsers($start = 0, $limit = 0, $filter = array(), $setStart = true) { + dbglog("start: " . $start . "; limit: " . $limit); $adldap = $this->_adldap(null); if(!$adldap) return false; if(!$this->users) { //get info for given user - $result = $adldap->user()->all(); + $result = $adldap->user()->all(false, $this->_constructSearchString($filter)); if (!$result) return array(); $this->users = array_fill_keys($result, false); } diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 86562f1dd..b1f5c4023 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -81,6 +81,20 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { return 2; } + /** + * @return int current start value for pageination + */ + public function getStart() { + return $this->_start; + } + + /** + * @return int number of users per page + */ + public function getPagesize() { + return $this->_pagesize; + } + /** * Handle user request * -- cgit v1.2.3 From c52f6cd2bf68bccfbc665f376f68c93861a99837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 12 Mar 2015 14:50:23 +0100 Subject: When filtering for group implement prefetching --- lib/plugins/authad/auth.php | 82 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 74 insertions(+), 8 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index f1f34245e..2710d6a17 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -67,6 +67,10 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { */ protected $_pattern = array(); + protected $_actualstart = 0; + + protected $_grpsusers = array(); + /** * Constructor */ @@ -380,6 +384,16 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { dbglog($filter); $searchString = $this->_constructSearchString($filter); $result = $adldap->user()->all(false, $searchString); + if (isset($filter['grps'])) { + $this->users = array_fill_keys($result, false); + $usermanager = plugin_load("admin", "usermanager", false); + if (!isset($this->_grpsusers[$this->_filterToString($filter)])){ + $this->_fillGroupUserArray($filter,$usermanager->getStart() + 3*$usermanager->getPagesize()); + } elseif (count($this->_grpsusers[$this->_filterToString($filter)]) < getStart() + 3*$usermanager->getPagesize()) { + $this->_fillGroupUserArray($filter,$usermanager->getStart() + 3*$usermanager->getPagesize() - count($this->_grpsusers[$this->_filterToString($filter)])); + } + $result = $this->_grpsusers[$this->_filterToString($filter)]; + } } @@ -390,6 +404,44 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { return count($result); } + protected function _filterToString ($filter) { + $result = ''; + if (isset($filter['user'])) { + $result .= 'user-' . $filter['user']; + } + if (isset($filter['name'])) { + $result .= 'name-' . $filter['name']; + } + if (isset($filter['mail'])) { + $result .= 'mail-' . $filter['mail']; + } + if (isset($filter['grps'])) { + $result .= 'grps-' . $filter['grps']; + } + return $result; + } + + protected function _fillGroupUserArray($filter, $numberOfAdds){ + $this->_grpsusers[$this->_filterToString($filter)]; + $i = 0; + $count = 0; + $this->_constructPattern($filter); + foreach ($this->users as $user => &$info) { + if($i++ < $this->_actualstart) { + continue; + } + if($info === false) { + $info = $this->getUserData($user); + } + if($this->_filter($user, $info)) { + $this->_grpsusers[$this->_filterToString($filter)][$user] = $info; + if(($numberOfAdds > 0) && (++$count >= $numberOfAdds)) break; + } + } + $this->_actualstart = $i; + return $count; + } + /** * Bulk retrieval of user data * @@ -398,10 +450,9 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param int $start index of first user to be returned * @param int $limit max number of users to be returned * @param array $filter array of field/pattern pairs, null for no filter - * @param bool $setStart * @return array userinfo (refer getUserData for internal userinfo details) */ - public function retrieveUsers($start = 0, $limit = 0, $filter = array(), $setStart = true) { + public function retrieveUsers($start = 0, $limit = 0, $filter = array()) { dbglog("start: " . $start . "; limit: " . $limit); $adldap = $this->_adldap(null); if(!$adldap) return false; @@ -418,17 +469,32 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { $this->_constructPattern($filter); $result = array(); - foreach($this->users as $user => &$info) { - if($i++ < $start) { - continue; + if (!isset($filter['grps'])) { + foreach($this->users as $user => &$info) { + if($i++ < $start) { + continue; + } + if($info === false) { + $info = $this->getUserData($user); + } + if($this->_filter($user, $info)) { + $result[$user] = $info; + if(($limit > 0) && (++$count >= $limit)) break; + } } - if($info === false) { - $info = $this->getUserData($user); + } else { + if (!isset($this->_grpsusers[$this->_filterToString($filter)]) || count($this->_grpsusers[$this->_filterToString($filter)]) < ($start+$limit)) { + $this->_fillGroupUserArray($filter,$start+$limit - count($this->_grpsusers[$this->_filterToString($filter)]) +1); } - if($this->_filter($user, $info)) { + foreach($this->_grpsusers[$this->_filterToString($filter)] as $user => &$info) { + dbglog($this->_grpsusers[$this->_filterToString($filter)]); + if($i++ < $start) { + continue; + } $result[$user] = $info; if(($limit > 0) && (++$count >= $limit)) break; } + } return $result; } -- cgit v1.2.3 From 462e9e37f38d6de9ec19ad1476b64bac3b851fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 12 Mar 2015 15:06:26 +0100 Subject: Disable the ``last`` button when filtering groups Since we cannot effectively filter for groups and have to work with incremental prefetching, the ``last`` button is mostly broken/buggy. Hence it is disabled in this usecase. --- lib/plugins/authad/auth.php | 8 ++++++++ lib/plugins/usermanager/admin.php | 12 ++++++++++++ 2 files changed, 20 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 2710d6a17..4022cd68f 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -387,12 +387,16 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { if (isset($filter['grps'])) { $this->users = array_fill_keys($result, false); $usermanager = plugin_load("admin", "usermanager", false); + $usermanager->setLastdisabled(true); if (!isset($this->_grpsusers[$this->_filterToString($filter)])){ $this->_fillGroupUserArray($filter,$usermanager->getStart() + 3*$usermanager->getPagesize()); } elseif (count($this->_grpsusers[$this->_filterToString($filter)]) < getStart() + 3*$usermanager->getPagesize()) { $this->_fillGroupUserArray($filter,$usermanager->getStart() + 3*$usermanager->getPagesize() - count($this->_grpsusers[$this->_filterToString($filter)])); } $result = $this->_grpsusers[$this->_filterToString($filter)]; + } else { + $usermanager = plugin_load("admin", "usermanager", false); + $usermanager->setLastdisabled(false); } } @@ -470,6 +474,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { $result = array(); if (!isset($filter['grps'])) { + $usermanager = plugin_load("admin", "usermanager", false); + $usermanager->setLastdisabled(false); foreach($this->users as $user => &$info) { if($i++ < $start) { continue; @@ -483,6 +489,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { } } } else { + $usermanager = plugin_load("admin", "usermanager", false); + $usermanager->setLastdisabled(true); if (!isset($this->_grpsusers[$this->_filterToString($filter)]) || count($this->_grpsusers[$this->_filterToString($filter)]) < ($start+$limit)) { $this->_fillGroupUserArray($filter,$start+$limit - count($this->_grpsusers[$this->_filterToString($filter)]) +1); } diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index b1f5c4023..cc4c4ae47 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -31,6 +31,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { protected $_edit_userdata = array(); protected $_disabled = ''; // if disabled set to explanatory string protected $_import_failures = array(); + protected $_lastdisabled = false; // set to true if last user is unknown and last button is hence buggy /** * Constructor @@ -95,6 +96,13 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { return $this->_pagesize; } + /** + * @param boolean $lastdisabled + */ + public function setLastdisabled($lastdisabled) { + $this->_lastdisabled = $lastdisabled; + } + /** * Handle user request * @@ -850,6 +858,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $buttons['last'] = $buttons['next'] = (($this->_start + $this->_pagesize) >= $this->_user_total) ? $disabled : ''; } + if ($this->_lastdisabled) { + $buttons['last'] = $disabled; + } + return $buttons; } -- cgit v1.2.3 From 6fcf992c3420a8904add8169cfd672407a7c38d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 12 Mar 2015 16:00:26 +0100 Subject: Clean up code, add phpdoc comments, some refactoring, etc. --- lib/plugins/authad/auth.php | 62 ++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 34 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 4022cd68f..bcf01ff21 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -330,6 +330,10 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { return false; } + /** + * @param array $filter + * @return string + */ protected function _constructSearchString($filter){ if (!$filter){ return '*'; @@ -348,7 +352,6 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { $result .= ')(mail=*' . $filter['mail'] . '*'; unset($filter['mail']); } - dbglog($result); return $result; } @@ -357,31 +360,14 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @return int */ public function getUserCount($filter = array()) { + $adldap = $this->_adldap(null); + if(!$adldap) { + dbglog("authad/auth.php getUserCount(): _adldap not set."); + return -1; + } if ($filter == array()) { - $adldap = $this->_adldap(null); - if(!$adldap) { - dbglog("authad/auth.php getUserCount(): _adldap not set."); - return -1; - } $result = $adldap->user()->all(); - $start = 0; - } else {/* - dbglog('_startcache: ' . $this->_startcache); - $usermanager = plugin_load("admin", "usermanager", false); - if ($this->_startcache < $usermanager->getStart()) { - $start = $usermanager->getStart(); - $this->_startcache = $start; - } else { - $start = $this->_startcache; - } - $pagesize = $usermanager->getPagesize(); - $result = $this->retrieveUsers($start, 3*$pagesize,$filter,false);*/ - $adldap = $this->_adldap(null); - if(!$adldap) { - dbglog("authad/auth.php getUserCount(): _adldap not set."); - return -1; - } - dbglog($filter); + } else { $searchString = $this->_constructSearchString($filter); $result = $adldap->user()->all(false, $searchString); if (isset($filter['grps'])) { @@ -390,7 +376,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { $usermanager->setLastdisabled(true); if (!isset($this->_grpsusers[$this->_filterToString($filter)])){ $this->_fillGroupUserArray($filter,$usermanager->getStart() + 3*$usermanager->getPagesize()); - } elseif (count($this->_grpsusers[$this->_filterToString($filter)]) < getStart() + 3*$usermanager->getPagesize()) { + } elseif (count($this->_grpsusers[$this->_filterToString($filter)]) < $usermanager->getStart() + 3*$usermanager->getPagesize()) { $this->_fillGroupUserArray($filter,$usermanager->getStart() + 3*$usermanager->getPagesize() - count($this->_grpsusers[$this->_filterToString($filter)])); } $result = $this->_grpsusers[$this->_filterToString($filter)]; @@ -402,12 +388,18 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { } if (!$result) { - dbglog("authad/auth.php: getting all users failed."); - return -1; + return 0; } return count($result); } + /** + * + * create a unique string for each filter used with a group + * + * @param array $filter + * @return string + */ protected function _filterToString ($filter) { $result = ''; if (isset($filter['user'])) { @@ -425,6 +417,11 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { return $result; } + /** + * @param array $filter + * @param int $numberOfAdds additional number of users requested + * @return int number of Users actually add to Array + */ protected function _fillGroupUserArray($filter, $numberOfAdds){ $this->_grpsusers[$this->_filterToString($filter)]; $i = 0; @@ -457,7 +454,6 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @return array userinfo (refer getUserData for internal userinfo details) */ public function retrieveUsers($start = 0, $limit = 0, $filter = array()) { - dbglog("start: " . $start . "; limit: " . $limit); $adldap = $this->_adldap(null); if(!$adldap) return false; @@ -470,12 +466,12 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { $i = 0; $count = 0; - $this->_constructPattern($filter); $result = array(); if (!isset($filter['grps'])) { $usermanager = plugin_load("admin", "usermanager", false); $usermanager->setLastdisabled(false); + $this->_constructPattern($filter); foreach($this->users as $user => &$info) { if($i++ < $start) { continue; @@ -483,10 +479,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { if($info === false) { $info = $this->getUserData($user); } - if($this->_filter($user, $info)) { - $result[$user] = $info; - if(($limit > 0) && (++$count >= $limit)) break; - } + $result[$user] = $info; + if(($limit > 0) && (++$count >= $limit)) break; } } else { $usermanager = plugin_load("admin", "usermanager", false); @@ -494,8 +488,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { if (!isset($this->_grpsusers[$this->_filterToString($filter)]) || count($this->_grpsusers[$this->_filterToString($filter)]) < ($start+$limit)) { $this->_fillGroupUserArray($filter,$start+$limit - count($this->_grpsusers[$this->_filterToString($filter)]) +1); } + if (!$this->_grpsusers[$this->_filterToString($filter)]) return false; foreach($this->_grpsusers[$this->_filterToString($filter)] as $user => &$info) { - dbglog($this->_grpsusers[$this->_filterToString($filter)]); if($i++ < $start) { continue; } -- cgit v1.2.3 From 7910cbbbce7fd803f3ee4f458d5426eac51bfd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 12 Mar 2015 16:34:45 +0100 Subject: Explain functions in docstrings --- lib/plugins/authad/auth.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index bcf01ff21..321a60f24 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -331,6 +331,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { } /** + * Create a Search-String useable by adLDAPUsers::all($includeDescription = false, $search = "*", $sorted = true) + * * @param array $filter * @return string */ @@ -343,6 +345,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { $result .= ')(displayname=*' . $filter['name'] . '*'; unset($filter['name']); } + if (isset($filter['user'])) { $result .= ')(samAccountName=*' . $filter['user'] . '*'; unset($filter['user']); @@ -356,8 +359,10 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { } /** - * @param array $filter - * @return int + * Return a count of the number of user which meet $filter criteria + * + * @param array $filter $filter array of field/pattern pairs, empty array for no filter + * @return int number of users */ public function getUserCount($filter = array()) { $adldap = $this->_adldap(null); @@ -418,6 +423,10 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { } /** + * Create an array of $numberOfAdds users passing a certain $filter, including belonging + * to a certain group and save them to a object-wide array. If the array + * already exists try to add $numberOfAdds further users to it. + * * @param array $filter * @param int $numberOfAdds additional number of users requested * @return int number of Users actually add to Array -- cgit v1.2.3 From 07aec0297354ce1a2bb273def8173ff0a524f852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 12 Mar 2015 16:57:13 +0100 Subject: Escape user strings given to adLDAP --- lib/plugins/authad/auth.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 321a60f24..400a5efee 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -3,6 +3,7 @@ if(!defined('DOKU_INC')) die(); require_once(DOKU_PLUGIN.'authad/adLDAP/adLDAP.php'); +require_once(DOKU_PLUGIN.'authad/adLDAP/classes/adLDAPUtils.php'); /** * Active Directory authentication backend for DokuWiki @@ -340,19 +341,20 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { if (!$filter){ return '*'; } + $adldapUtils = new adLDAPUtils($this->_adldap(null)); $result = '*'; if (isset($filter['name'])) { - $result .= ')(displayname=*' . $filter['name'] . '*'; + $result .= ')(displayname=*' . $adldapUtils->ldapSlashes($filter['name']) . '*'; unset($filter['name']); } if (isset($filter['user'])) { - $result .= ')(samAccountName=*' . $filter['user'] . '*'; + $result .= ')(samAccountName=*' . $adldapUtils->ldapSlashes($filter['user']) . '*'; unset($filter['user']); } if (isset($filter['mail'])) { - $result .= ')(mail=*' . $filter['mail'] . '*'; + $result .= ')(mail=*' . $adldapUtils->ldapSlashes($filter['mail']) . '*'; unset($filter['mail']); } return $result; -- cgit v1.2.3 From 1014a348a1826737c9df8a9edaed3f756d0058f2 Mon Sep 17 00:00:00 2001 From: Sascha Klopp Date: Fri, 13 Mar 2015 12:01:51 +0100 Subject: Add description for modPass-Option --- lib/plugins/authldap/lang/de/settings.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/de/settings.php b/lib/plugins/authldap/lang/de/settings.php index ecb407820..933189c40 100644 --- a/lib/plugins/authldap/lang/de/settings.php +++ b/lib/plugins/authldap/lang/de/settings.php @@ -22,6 +22,7 @@ $lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.'; $lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.'; $lang['userkey'] = 'Attribut, das den Benutzernamen enthält; muss konsistent zum userfilter sein.'; $lang['groupkey'] = 'Gruppieren der Benutzeraccounts anhand eines beliebigen Benutzerattributes z. B. Telefonnummer oder Abteilung, anstelle der Standard-Gruppen).'; +$lang['modPass'] = 'Darf über Dokuwiki das LDAP-Passwort geändert werden?'; $lang['debug'] = 'Debug-Informationen beim Auftreten von Fehlern anzeigen?'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; -- cgit v1.2.3 From 84f66e9f97ebf4d78ffaaad7a0b44f5c0180bfc9 Mon Sep 17 00:00:00 2001 From: Sascha Klopp Date: Mon, 16 Mar 2015 16:50:38 +0100 Subject: Add english description for new authldap options --- lib/plugins/authldap/lang/en/settings.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index 951901ccc..a4194b00a 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -13,7 +13,9 @@ $lang['binddn'] = 'DN of an optional bind user if anonymous bind is not suf $lang['bindpw'] = 'Password of above user'; $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; +$lang['userkey'] = 'Attribute denoting the username; must be consistent to userfilter.'; $lang['groupkey'] = 'Group membership from any user attribute (instead of standard AD groups) e.g. group from department or telephone number'; +$lang['modPass'] = 'Can the LDAP password be changed via dokuwiki?'; $lang['debug'] = 'Display additional debug information on errors'; -- cgit v1.2.3 From abb2621b95a47515d8223fcc52b5d62ca61b3e07 Mon Sep 17 00:00:00 2001 From: Jacob Palm Date: Tue, 17 Mar 2015 15:01:44 +0100 Subject: translation update --- lib/plugins/authad/lang/da/lang.php | 8 ++++ lib/plugins/authldap/lang/da/settings.php | 5 ++ lib/plugins/authmysql/lang/da/settings.php | 4 ++ lib/plugins/extension/lang/da/intro_install.txt | 1 + lib/plugins/extension/lang/da/intro_plugins.txt | 1 + lib/plugins/extension/lang/da/intro_templates.txt | 1 + lib/plugins/extension/lang/da/lang.php | 56 +++++++++++++++++++++++ 7 files changed, 76 insertions(+) create mode 100644 lib/plugins/authad/lang/da/lang.php create mode 100644 lib/plugins/extension/lang/da/intro_install.txt create mode 100644 lib/plugins/extension/lang/da/intro_plugins.txt create mode 100644 lib/plugins/extension/lang/da/intro_templates.txt (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/da/lang.php b/lib/plugins/authad/lang/da/lang.php new file mode 100644 index 000000000..8fc7db775 --- /dev/null +++ b/lib/plugins/authad/lang/da/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['domain'] = 'Logondomæne'; diff --git a/lib/plugins/authldap/lang/da/settings.php b/lib/plugins/authldap/lang/da/settings.php index b736504a5..a9fce3a8c 100644 --- a/lib/plugins/authldap/lang/da/settings.php +++ b/lib/plugins/authldap/lang/da/settings.php @@ -5,11 +5,16 @@ * * @author Jens Hyllegaard * @author soer9648 + * @author Jacob Palm */ $lang['server'] = 'Din LDAP server. Enten værtsnavn (localhost) eller fuld kvalificeret URL (ldap://server.tld:389)'; $lang['port'] = 'LDAP server port, hvis der ikke er angivet en komplet URL ovenfor.'; $lang['usertree'] = 'Hvor findes brugerkonti. F.eks. ou=Personer, dc=server, dc=tld'; $lang['grouptree'] = 'Hvor findes brugergrupper. F.eks. ou=Grupper, dc=server, dc=tld'; +$lang['userfilter'] = 'LDAP filter der benyttes til at søge efter brugerkonti. F.eks. (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'LDAP filter tder benyttes til at søge efter grupper. F.eks. (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = 'Protokol version der skal benyttes. Det er muligvis nødvendigt at sætte denne til 3'; $lang['starttls'] = 'Benyt TLS forbindelser?'; $lang['bindpw'] = 'Kodeord til ovenstående bruger'; +$lang['modPass'] = 'Kan LDAP adgangskoden skiftes via DokuWiki?'; $lang['debug'] = 'Vis yderligere debug output ved fejl'; diff --git a/lib/plugins/authmysql/lang/da/settings.php b/lib/plugins/authmysql/lang/da/settings.php index ed21201fb..5fd66dbad 100644 --- a/lib/plugins/authmysql/lang/da/settings.php +++ b/lib/plugins/authmysql/lang/da/settings.php @@ -5,6 +5,7 @@ * * @author Jens Hyllegaard * @author soer9648 + * @author Jacob Palm */ $lang['server'] = 'Din MySQL server'; $lang['user'] = 'MySQL brugernavn'; @@ -12,8 +13,11 @@ $lang['password'] = 'Kodeord til ovenstående bruger'; $lang['database'] = 'Database der skal benyttes'; $lang['charset'] = 'Tegnsæt benyttet i database'; $lang['debug'] = 'Vis yderligere debug output'; +$lang['forwardClearPass'] = 'Videregiv bruger adgangskoder i klar tekst til nedenstående SQL statement, i stedet for at benytte passcrypt'; +$lang['TablesToLock'] = 'Kommasepareret liste over tabeller der skal låses under skrivning'; $lang['checkPass'] = 'SQL-sætning til at kontrollere kodeord'; $lang['getUserInfo'] = 'SQL-sætning til at hente brugerinformation'; +$lang['getGroups'] = 'SQL statement til at bestemme en brugers medlemskab af grupper'; $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'; diff --git a/lib/plugins/extension/lang/da/intro_install.txt b/lib/plugins/extension/lang/da/intro_install.txt new file mode 100644 index 000000000..e5657f218 --- /dev/null +++ b/lib/plugins/extension/lang/da/intro_install.txt @@ -0,0 +1 @@ +Her kan du installerer plugins eller templates manuelt, ved enten at uploade dem eller angive en direkte URL til download. \ No newline at end of file diff --git a/lib/plugins/extension/lang/da/intro_plugins.txt b/lib/plugins/extension/lang/da/intro_plugins.txt new file mode 100644 index 000000000..5d9deaf1e --- /dev/null +++ b/lib/plugins/extension/lang/da/intro_plugins.txt @@ -0,0 +1 @@ +Dette er de plugins du aktuelt har installeret i din DokuWiki. Du kan aktivere, deaktiver eller fjerne plugins fra denne side. Opdateringer til plugins vises også her - husk at læse dokumentationen til et plugin inden du opdaterer det. \ No newline at end of file diff --git a/lib/plugins/extension/lang/da/intro_templates.txt b/lib/plugins/extension/lang/da/intro_templates.txt new file mode 100644 index 000000000..1914500b1 --- /dev/null +++ b/lib/plugins/extension/lang/da/intro_templates.txt @@ -0,0 +1 @@ +Dette er de templates du aktuelt har installeret i din DokuWiki. Du kan vælge det template du vil benytte under [[?do=admin&page=config|Opsætningsstyring]]. \ No newline at end of file diff --git a/lib/plugins/extension/lang/da/lang.php b/lib/plugins/extension/lang/da/lang.php index c341bc5f9..17cb3b57c 100644 --- a/lib/plugins/extension/lang/da/lang.php +++ b/lib/plugins/extension/lang/da/lang.php @@ -4,7 +4,62 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Søren Birk + * @author Jacob Palm */ +$lang['tab_plugins'] = 'Installerede plugins'; +$lang['tab_templates'] = 'Installerede templates'; +$lang['tab_search'] = 'Søg og installer'; +$lang['tab_install'] = 'Manuel installation'; +$lang['notimplemented'] = 'Denne funktion er ikke implementeret endnu'; +$lang['unknownauthor'] = 'Ukendt udgiver'; +$lang['unknownversion'] = 'Ukendt version'; +$lang['btn_info'] = 'Vis mere information'; +$lang['btn_update'] = 'Opdater'; +$lang['btn_uninstall'] = 'Afinstaller'; +$lang['btn_enable'] = 'Aktiver'; +$lang['btn_disable'] = 'Deaktiver'; +$lang['btn_install'] = 'Installer'; +$lang['btn_reinstall'] = 'Geninstaller'; +$lang['js']['reallydel'] = 'Er du sikker på at du vil afinstallere denne udvidelse?'; +$lang['search_for'] = 'Søg efter udvidelse:'; +$lang['search'] = 'Søg'; +$lang['extensionby'] = '%s af %s'; +$lang['screenshot'] = 'Skærmbillede af %s'; +$lang['popularity'] = 'Popularitet: %s%%'; +$lang['homepage_link'] = 'Dokumenter'; +$lang['bugs_features'] = 'Fejl'; +$lang['tags'] = 'Tags:'; +$lang['author_hint'] = 'Søg efter udvidelse af denne udgiver'; +$lang['installed'] = 'Installeret:'; +$lang['downloadurl'] = 'Download URL:'; +$lang['unknown'] = 'ukendt'; +$lang['installed_version'] = 'Installeret version:'; +$lang['install_date'] = 'Din sidste opdatering:'; +$lang['available_version'] = 'Tilgængelig version:'; +$lang['compatible'] = 'Kompatibel med:'; +$lang['depends'] = 'Afhængig af:'; +$lang['similar'] = 'Ligner:'; +$lang['donate'] = 'Synes du om denne?'; +$lang['donate_action'] = 'Køb en kop kaffe til udvikleren!'; +$lang['repo_retry'] = 'Førsøg igen'; +$lang['status'] = 'Status:'; +$lang['status_installed'] = 'installeret'; +$lang['status_not_installed'] = 'ikke installeret'; +$lang['status_protected'] = 'beskyttet'; +$lang['status_enabled'] = 'aktiveret'; +$lang['status_disabled'] = 'deaktiveret'; +$lang['status_unmodifiable'] = 'låst for ændringer'; +$lang['status_plugin'] = 'plugin'; +$lang['status_template'] = 'template'; +$lang['msg_enabled'] = 'Plugin %s aktiveret'; +$lang['msg_disabled'] = 'Plugin %s deaktiveret'; +$lang['msg_delete_success'] = 'Udvidelse %s afinstalleret'; +$lang['msg_delete_failed'] = 'Kunne ikke afinstallere udvidelsen %s'; +$lang['msg_template_install_success'] = 'Template %s blev installeret'; +$lang['msg_template_update_success'] = 'Template %s blev opdateret'; +$lang['msg_plugin_install_success'] = 'Plugin %s blev installeret'; +$lang['msg_plugin_update_success'] = 'Plugin %s blev opdateret'; +$lang['msg_upload_failed'] = 'Kunne ikke uploade filen'; $lang['update_available'] = 'Opdatering: Ny version %s er tilgængelig.'; $lang['wrong_folder'] = 'Plugin ikke installeret korrekt: Omdøb plugin-mappe "%s" til "%s".'; $lang['url_change'] = 'URL ændret: Download-URL er blevet ændret siden sidste download. Kontrollér om den nye URL er valid, inden udvidelsen opdateres.
    Ny: %s
    Gammel: %s'; @@ -22,3 +77,4 @@ $lang['auth'] = 'Auth-plugin er ikke aktiveret i konfiguratione $lang['install_url'] = 'Installér fra URL:'; $lang['install_upload'] = 'Upload Udvidelse:'; $lang['repo_error'] = 'Plugin-arkivet kunne ikke kontaktes. Kontrollér at din server kan kontakte www.dokuwiki.org kontrollér dine proxy-indstillinger.'; +$lang['nossl'] = 'Din PHP lader til at mangle understøttelse for SSL. Mange DokuWiki udvidelser vil ikke kunne downloades.'; -- cgit v1.2.3 From f23f95941a400702f525923973f3612df6da82cb Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 18 Mar 2015 22:16:34 +0100 Subject: SECURITY escape user properties in user manager #1081 The user properties (login, real name, etc) where not properly escaped in the user manager's edit form. This allowed a XSS attack on the superuser by registered users. Thanks to Filippo Cavallarin from www.segment.technology for discovering this bug. --- lib/plugins/usermanager/admin.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index cc4c4ae47..9cb9b0c40 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -222,9 +222,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { */ $groups = join(', ',$grps); ptln(" "); - ptln(" "); + ptln(" "); if ($editable) { - ptln(" 1, + ptln(" 1, 'do' => 'admin', 'page' => 'usermanager', 'sectok' => getSecurityToken())). @@ -356,7 +356,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { // save current $user, we need this to access details if the name is changed if ($user) - ptln(" ",$indent); + ptln(" ",$indent); $this->_htmlFilterSettings($indent+10); @@ -401,6 +401,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $fieldtype = 'text'; $autocomp = ''; } + $value = hsc($value); echo ""; echo ""; -- cgit v1.2.3 From b07866dc2ca50e9cfd667c38641e1b93c0f88cd9 Mon Sep 17 00:00:00 2001 From: Myeongjin Date: Sat, 28 Mar 2015 02:16:11 +0100 Subject: translation update --- lib/plugins/authldap/lang/ko/settings.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/ko/settings.php b/lib/plugins/authldap/lang/ko/settings.php index e663ba063..d3e93ff51 100644 --- a/lib/plugins/authldap/lang/ko/settings.php +++ b/lib/plugins/authldap/lang/ko/settings.php @@ -19,9 +19,14 @@ $lang['binddn'] = '익명 바인드가 충분하지 않으면 선 $lang['bindpw'] = '위 사용자의 비밀번호'; $lang['userscope'] = '사용자 검색에 대한 검색 범위 제한'; $lang['groupscope'] = '그룹 검색에 대한 검색 범위 제한'; +$lang['userkey'] = '사용자 이름을 나타내는 특성; 사용자 필터에 일관성이 있어야 합니다.'; $lang['groupkey'] = '(표준 AD 그룹 대신) 사용자 속성에서 그룹 구성원. 예를 들어 부서나 전화에서 그룹'; +$lang['modPass'] = 'LDAP 비밀번호를 도쿠위키를 통해 바꿀 수 있습니까?'; $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'; +$lang['referrals_o_-1'] = '기본값 사용'; +$lang['referrals_o_0'] = '참조 (referral)를 따르지 않음'; +$lang['referrals_o_1'] = '참조 (referral)를 따름'; -- cgit v1.2.3 From 605af2f6069a04742a008b2a08a601fdd2a7505e Mon Sep 17 00:00:00 2001 From: Jaroslav Lichtblau Date: Sat, 28 Mar 2015 07:36:33 +0100 Subject: translation update --- lib/plugins/authldap/lang/cs/settings.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/cs/settings.php b/lib/plugins/authldap/lang/cs/settings.php index a5aad5981..08c5c6a16 100644 --- a/lib/plugins/authldap/lang/cs/settings.php +++ b/lib/plugins/authldap/lang/cs/settings.php @@ -21,8 +21,12 @@ $lang['bindpw'] = 'Heslo uživatele výše'; $lang['userscope'] = 'Omezení rozsahu vyhledávání uživatele'; $lang['groupscope'] = 'Omezení rozsahu vyhledávání skupiny'; $lang['groupkey'] = 'Atribut šlenství uživatele ve skupinách (namísto standardních AD skupin), tj. skupina z oddělení nebo telefonní číslo'; +$lang['modPass'] = 'Může být LDAP heslo změněno přes dokuwiki?'; $lang['debug'] = 'Zobrazit dodatečné debugovací informace'; $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'; +$lang['referrals_o_-1'] = 'použít výchozí'; +$lang['referrals_o_0'] = 'nenásledovat odkazy'; +$lang['referrals_o_1'] = 'následovat odkazy'; -- cgit v1.2.3 From ecd3aee0583064e4805c3df7a94cf80495af12e9 Mon Sep 17 00:00:00 2001 From: Alejandro Nunez Date: Tue, 31 Mar 2015 03:51:09 +0200 Subject: translation update --- lib/plugins/authldap/lang/es/settings.php | 5 +++++ lib/plugins/authmysql/lang/es/settings.php | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/es/settings.php b/lib/plugins/authldap/lang/es/settings.php index 6991546d3..8e1d0b4e1 100644 --- a/lib/plugins/authldap/lang/es/settings.php +++ b/lib/plugins/authldap/lang/es/settings.php @@ -5,6 +5,7 @@ * * @author Antonio Bueno * @author Eloy + * @author Alejandro Nunez */ $lang['server'] = 'Tu servidor LDAP. Puede ser el nombre del host (localhost) o una URL completa (ldap://server.tld:389)'; $lang['port'] = 'Servidor LDAP en caso de que no se diera la URL completa anteriormente.'; @@ -20,8 +21,12 @@ $lang['bindpw'] = 'Contraseña del usuario de arriba.'; $lang['userscope'] = 'Limitar ámbito de búsqueda para búsqueda de usuarios'; $lang['groupscope'] = 'Limitar ámbito de búsqueda para búsqueda de grupos'; $lang['groupkey'] = 'Pertenencia al grupo desde cualquier atributo de usuario (en lugar de grupos AD estándar) p.e., grupo a partir departamento o número de teléfono'; +$lang['modPass'] = 'Puede ser cambiara via dokuwiki la password LDAP?'; $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'; +$lang['referrals_o_-1'] = 'usar default'; +$lang['referrals_o_0'] = 'no seguir referencias'; +$lang['referrals_o_1'] = 'seguir referencias'; diff --git a/lib/plugins/authmysql/lang/es/settings.php b/lib/plugins/authmysql/lang/es/settings.php index b82620fc6..cda3c23f8 100644 --- a/lib/plugins/authmysql/lang/es/settings.php +++ b/lib/plugins/authmysql/lang/es/settings.php @@ -6,6 +6,7 @@ * @author Antonio Bueno * @author Eloy * @author Antonio Castilla + * @author Alejandro Nunez */ $lang['server'] = 'Tu servidor MySQL'; $lang['user'] = 'Nombre de usuario MySQL'; @@ -32,6 +33,10 @@ $lang['getUserID'] = 'Sentencia SQL para obtener la clave primaria d $lang['delUser'] = 'Sentencia SQL para eliminar un usuario'; $lang['delUserRefs'] = 'Sentencia SQL para eliminar un usuario de todos los grupos'; $lang['updateUser'] = 'Sentencia SQL para actualizar un perfil de usuario'; +$lang['UpdateLogin'] = 'Cláusula de actualización para actualizar el login del usuario'; +$lang['UpdatePass'] = 'Cláusula de actualización para actualizar la contraseña del usuario'; +$lang['UpdateEmail'] = 'Cláusula de actualización para actualizar la dirección de correo del usuario'; +$lang['UpdateName'] = 'Cláusula de actualización para actualizar el nomblre completo del usuario'; $lang['delUserGroup'] = 'Sentencia SQL para eliminar un usuario de un grupo dado'; $lang['getGroupID'] = 'Sentencia SQL para obtener la clave principal de un grupo dado'; $lang['debug_o_0'] = 'ninguno'; -- cgit v1.2.3 From fa4038c7f40f348e1335253ce6fb5600106b0233 Mon Sep 17 00:00:00 2001 From: Romulo Pereira Date: Tue, 31 Mar 2015 21:52:22 +0200 Subject: translation update --- lib/plugins/authldap/lang/pt/settings.php | 4 ++++ lib/plugins/extension/lang/pt/lang.php | 1 + lib/plugins/usermanager/lang/pt/lang.php | 1 + 3 files changed, 6 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/pt/settings.php b/lib/plugins/authldap/lang/pt/settings.php index b54f2a1bc..d9d1b7f11 100644 --- a/lib/plugins/authldap/lang/pt/settings.php +++ b/lib/plugins/authldap/lang/pt/settings.php @@ -5,6 +5,7 @@ * * @author André Neves * @author Guido Salatino + * @author Romulo Pereira */ $lang['server'] = 'O seu servidor de LDAP. Ou hostname (localhost) ou URL qualificado completo (ldap://servidor.tld:389)'; $lang['port'] = 'Porta de servidor de LDAP se o URL completo não foi fornecido acima'; @@ -26,3 +27,6 @@ $lang['deref_o_0'] = 'LDAP_DEREF_NUNCA'; $lang['deref_o_1'] = 'LDAP_DEREF_PESQUISANDO'; $lang['deref_o_2'] = 'LDAP_DEREF_BUSCANDO'; $lang['deref_o_3'] = 'LDAP_DEREF_SEMPRE'; +$lang['referrals_o_-1'] = 'usar padrão'; +$lang['referrals_o_0'] = 'não seguir as referências'; +$lang['referrals_o_1'] = 'seguir as referências'; diff --git a/lib/plugins/extension/lang/pt/lang.php b/lib/plugins/extension/lang/pt/lang.php index c7b4f29c2..c9ca8d976 100644 --- a/lib/plugins/extension/lang/pt/lang.php +++ b/lib/plugins/extension/lang/pt/lang.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Guido Salatino + * @author Romulo Pereira */ $lang['menu'] = 'Gerenciador de Extensões'; $lang['tab_plugins'] = 'Plugins Instalados'; diff --git a/lib/plugins/usermanager/lang/pt/lang.php b/lib/plugins/usermanager/lang/pt/lang.php index 43ea69e53..ee6eaf4f5 100644 --- a/lib/plugins/usermanager/lang/pt/lang.php +++ b/lib/plugins/usermanager/lang/pt/lang.php @@ -9,6 +9,7 @@ * @author André Neves * @author José Campos zecarlosdecampos@gmail.com * @author Guido Salatino + * @author Romulo Pereira */ $lang['menu'] = 'Gestor de Perfis'; $lang['noauth'] = '(autenticação indisponível)'; -- cgit v1.2.3 From 5b795a651d514c6889ad05abc4e58de67c7af92e Mon Sep 17 00:00:00 2001 From: Patrick Brown Date: Tue, 31 Mar 2015 21:53:01 -0400 Subject: Move language string to authad plugin --- lib/plugins/authad/auth.php | 2 +- lib/plugins/authad/lang/ar/lang.php | 2 ++ lib/plugins/authad/lang/bg/lang.php | 8 ++++++++ lib/plugins/authad/lang/ca/lang.php | 8 ++++++++ lib/plugins/authad/lang/cs/lang.php | 2 ++ lib/plugins/authad/lang/da/lang.php | 2 ++ lib/plugins/authad/lang/de-informal/lang.php | 8 ++++++++ lib/plugins/authad/lang/de/lang.php | 1 + lib/plugins/authad/lang/el/lang.php | 8 ++++++++ lib/plugins/authad/lang/en/lang.php | 2 ++ lib/plugins/authad/lang/eo/lang.php | 1 + lib/plugins/authad/lang/es/lang.php | 2 ++ lib/plugins/authad/lang/et/lang.php | 8 ++++++++ lib/plugins/authad/lang/eu/lang.php | 8 ++++++++ lib/plugins/authad/lang/fa/lang.php | 2 ++ lib/plugins/authad/lang/fi/lang.php | 8 ++++++++ lib/plugins/authad/lang/fr/lang.php | 2 ++ lib/plugins/authad/lang/gl/lang.php | 8 ++++++++ lib/plugins/authad/lang/he/lang.php | 8 ++++++++ lib/plugins/authad/lang/hr/lang.php | 1 + lib/plugins/authad/lang/hu/lang.php | 1 + lib/plugins/authad/lang/it/lang.php | 8 ++++++++ lib/plugins/authad/lang/ja/lang.php | 2 ++ lib/plugins/authad/lang/ka/lang.php | 8 ++++++++ lib/plugins/authad/lang/ko/lang.php | 1 + lib/plugins/authad/lang/lv/lang.php | 1 + lib/plugins/authad/lang/nl/lang.php | 2 ++ lib/plugins/authad/lang/no/lang.php | 2 ++ lib/plugins/authad/lang/pl/lang.php | 8 ++++++++ lib/plugins/authad/lang/pt-br/lang.php | 2 ++ lib/plugins/authad/lang/pt/lang.php | 2 ++ lib/plugins/authad/lang/ro/lang.php | 8 ++++++++ lib/plugins/authad/lang/ru/lang.php | 1 + lib/plugins/authad/lang/sk/lang.php | 8 ++++++++ lib/plugins/authad/lang/sl/lang.php | 8 ++++++++ lib/plugins/authad/lang/sv/lang.php | 8 ++++++++ lib/plugins/authad/lang/tr/lang.php | 8 ++++++++ lib/plugins/authad/lang/zh-tw/lang.php | 2 ++ lib/plugins/authad/lang/zh/lang.php | 1 + 39 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 lib/plugins/authad/lang/bg/lang.php create mode 100644 lib/plugins/authad/lang/ca/lang.php create mode 100644 lib/plugins/authad/lang/de-informal/lang.php create mode 100644 lib/plugins/authad/lang/el/lang.php create mode 100644 lib/plugins/authad/lang/et/lang.php create mode 100644 lib/plugins/authad/lang/eu/lang.php create mode 100644 lib/plugins/authad/lang/fi/lang.php create mode 100644 lib/plugins/authad/lang/gl/lang.php create mode 100644 lib/plugins/authad/lang/he/lang.php create mode 100644 lib/plugins/authad/lang/it/lang.php create mode 100644 lib/plugins/authad/lang/ka/lang.php create mode 100644 lib/plugins/authad/lang/pl/lang.php create mode 100644 lib/plugins/authad/lang/ro/lang.php create mode 100644 lib/plugins/authad/lang/sk/lang.php create mode 100644 lib/plugins/authad/lang/sl/lang.php create mode 100644 lib/plugins/authad/lang/sv/lang.php create mode 100644 lib/plugins/authad/lang/tr/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 400a5efee..40c56ef09 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -258,7 +258,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { ($info['expiresin'] <= $this->conf['expirywarn']) && !$this->msgshown ) { - $msg = sprintf($lang['authpwdexpire'], $info['expiresin']); + $msg = sprintf($this->getLang('authpwdexpire'), $info['expiresin']); if($this->canDo('modPass')) { $url = wl($ID, array('do'=> 'profile')); $msg .= ' '.$lang['btn_profile'].''; diff --git a/lib/plugins/authad/lang/ar/lang.php b/lib/plugins/authad/lang/ar/lang.php index e0ba7681a..173c80f0c 100644 --- a/lib/plugins/authad/lang/ar/lang.php +++ b/lib/plugins/authad/lang/ar/lang.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Mohamed Belhsine + * @author Usama Akkad */ $lang['domain'] = 'مجال تسجيل الدخول'; +$lang['authpwdexpire'] = 'ستنتهي صلاحية كلمة السر في %d . عليك بتغييرها سريعا.'; diff --git a/lib/plugins/authad/lang/bg/lang.php b/lib/plugins/authad/lang/bg/lang.php new file mode 100644 index 000000000..3de5df65f --- /dev/null +++ b/lib/plugins/authad/lang/bg/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'Срока на паролата ви ще изтече след %d дни. Препоръчително е да я смените по-скоро.'; diff --git a/lib/plugins/authad/lang/ca/lang.php b/lib/plugins/authad/lang/ca/lang.php new file mode 100644 index 000000000..abe25a5f2 --- /dev/null +++ b/lib/plugins/authad/lang/ca/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'La vostra contrasenya caducarà en %d dies, l\'hauríeu de canviar aviat.'; diff --git a/lib/plugins/authad/lang/cs/lang.php b/lib/plugins/authad/lang/cs/lang.php index 8119d208a..ad141153f 100644 --- a/lib/plugins/authad/lang/cs/lang.php +++ b/lib/plugins/authad/lang/cs/lang.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Jaroslav Lichtblau + * @author Miroslav Svoboda */ $lang['domain'] = 'Přihlašovací doména'; +$lang['authpwdexpire'] = 'Platnost vašeho hesla vyprší za %d dní, měli byste ho změnit co nejdříve.'; diff --git a/lib/plugins/authad/lang/da/lang.php b/lib/plugins/authad/lang/da/lang.php index 8fc7db775..3d0730216 100644 --- a/lib/plugins/authad/lang/da/lang.php +++ b/lib/plugins/authad/lang/da/lang.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Jacob Palm + * @author Mikael Lyngvig */ $lang['domain'] = 'Logondomæne'; +$lang['authpwdexpire'] = 'Din adgangskode vil udløbe om %d dage, du bør ændre det snart.'; diff --git a/lib/plugins/authad/lang/de-informal/lang.php b/lib/plugins/authad/lang/de-informal/lang.php new file mode 100644 index 000000000..e9361d5fe --- /dev/null +++ b/lib/plugins/authad/lang/de-informal/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'Dein Passwort läuft in %d Tag(en) ab. Du solltest es es frühzeitig ändern.'; diff --git a/lib/plugins/authad/lang/de/lang.php b/lib/plugins/authad/lang/de/lang.php index eea511d1b..11f52a414 100644 --- a/lib/plugins/authad/lang/de/lang.php +++ b/lib/plugins/authad/lang/de/lang.php @@ -6,3 +6,4 @@ * @author Andreas Gohr */ $lang['domain'] = 'Anmelde-Domäne'; +$lang['authpwdexpire'] = 'Ihr Passwort läuft in %d Tag(en) ab. Sie sollten es frühzeitig ändern.'; diff --git a/lib/plugins/authad/lang/el/lang.php b/lib/plugins/authad/lang/el/lang.php new file mode 100644 index 000000000..39e3283cc --- /dev/null +++ b/lib/plugins/authad/lang/el/lang.php @@ -0,0 +1,8 @@ + */ $lang['domain'] = 'Logon Domain'; +$lang['authpwdexpire'] = 'Your password will expire in %d days, you should change it soon.'; //Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/authad/lang/eo/lang.php b/lib/plugins/authad/lang/eo/lang.php index be4abc123..e738323da 100644 --- a/lib/plugins/authad/lang/eo/lang.php +++ b/lib/plugins/authad/lang/eo/lang.php @@ -6,3 +6,4 @@ * @author Robert Bogenschneider */ $lang['domain'] = 'Ensaluta domajno'; +$lang['authpwdexpire'] = 'Via pasvorto malvalidos post %d tagoj, prefere ŝanĝu ĝin baldaũ.'; diff --git a/lib/plugins/authad/lang/es/lang.php b/lib/plugins/authad/lang/es/lang.php index c5b242cba..ffbff49a1 100644 --- a/lib/plugins/authad/lang/es/lang.php +++ b/lib/plugins/authad/lang/es/lang.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Juan De La Cruz + * @author Gerardo Zamudio */ $lang['domain'] = 'Dominio de inicio'; +$lang['authpwdexpire'] = 'Su contraseña caducara en %d días, debería cambiarla lo antes posible'; diff --git a/lib/plugins/authad/lang/et/lang.php b/lib/plugins/authad/lang/et/lang.php new file mode 100644 index 000000000..6dda19360 --- /dev/null +++ b/lib/plugins/authad/lang/et/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'Sinu salasõna aegub %päeva pärast, võiksid seda peatselt muuta.'; diff --git a/lib/plugins/authad/lang/eu/lang.php b/lib/plugins/authad/lang/eu/lang.php new file mode 100644 index 000000000..454e3be34 --- /dev/null +++ b/lib/plugins/authad/lang/eu/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'Zure pasahitza %d egun barru iraungiko da, laster aldatu beharko zenuke.'; diff --git a/lib/plugins/authad/lang/fa/lang.php b/lib/plugins/authad/lang/fa/lang.php index 1ea73cfdb..646142331 100644 --- a/lib/plugins/authad/lang/fa/lang.php +++ b/lib/plugins/authad/lang/fa/lang.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Hamid + * @author Milad DZand */ $lang['domain'] = 'دامنه‌ی ورود'; +$lang['authpwdexpire'] = 'کلمه عبور شما در %d روز منقضی خواهد شد ، شما باید آن را زود تغییر دهید'; diff --git a/lib/plugins/authad/lang/fi/lang.php b/lib/plugins/authad/lang/fi/lang.php new file mode 100644 index 000000000..650d44f7a --- /dev/null +++ b/lib/plugins/authad/lang/fi/lang.php @@ -0,0 +1,8 @@ + + */ + +$lang['authpwdexpire'] = 'Salasanasi vanhenee %d pv:n päästä, vaihda salasanasi pikaisesti.'; diff --git a/lib/plugins/authad/lang/fr/lang.php b/lib/plugins/authad/lang/fr/lang.php index 2de362e41..4999967dc 100644 --- a/lib/plugins/authad/lang/fr/lang.php +++ b/lib/plugins/authad/lang/fr/lang.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author ggallon + * @author Yannick Aure */ $lang['domain'] = 'Domaine de connexion'; +$lang['authpwdexpire'] = 'Votre mot de passe expirera dans %d jours, vous devriez le changer bientôt.'; diff --git a/lib/plugins/authad/lang/gl/lang.php b/lib/plugins/authad/lang/gl/lang.php new file mode 100644 index 000000000..b10126a88 --- /dev/null +++ b/lib/plugins/authad/lang/gl/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'A túa contrasinal expirará en %d días, deberías cambiala pronto.'; diff --git a/lib/plugins/authad/lang/he/lang.php b/lib/plugins/authad/lang/he/lang.php new file mode 100644 index 000000000..21fd98aef --- /dev/null +++ b/lib/plugins/authad/lang/he/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'הסיסמה שלך תפוג ב% d ימים, אתה צריך לשנות את זה בקרוב.'; diff --git a/lib/plugins/authad/lang/hr/lang.php b/lib/plugins/authad/lang/hr/lang.php index f750c91b5..8652c69ed 100644 --- a/lib/plugins/authad/lang/hr/lang.php +++ b/lib/plugins/authad/lang/hr/lang.php @@ -6,3 +6,4 @@ * @author Davor Turkalj */ $lang['domain'] = 'Domena za prijavu'; +$lang['authpwdexpire'] = 'Vaša lozinka će isteći za %d dana, trebate ju promijeniti.'; diff --git a/lib/plugins/authad/lang/hu/lang.php b/lib/plugins/authad/lang/hu/lang.php index 7bb6084b0..f5692de04 100644 --- a/lib/plugins/authad/lang/hu/lang.php +++ b/lib/plugins/authad/lang/hu/lang.php @@ -6,3 +6,4 @@ * @author Marton Sebok */ $lang['domain'] = 'Bejelentkezési tartomány'; +$lang['authpwdexpire'] = 'A jelszavad %d nap múlva lejár, hamarosan meg kell változtatnod.'; diff --git a/lib/plugins/authad/lang/it/lang.php b/lib/plugins/authad/lang/it/lang.php new file mode 100644 index 000000000..5f1a03cd4 --- /dev/null +++ b/lib/plugins/authad/lang/it/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'La tua password scadrà in %d giorni, dovresti cambiarla quanto prima.'; diff --git a/lib/plugins/authad/lang/ja/lang.php b/lib/plugins/authad/lang/ja/lang.php index b40aa5da3..91c4f046a 100644 --- a/lib/plugins/authad/lang/ja/lang.php +++ b/lib/plugins/authad/lang/ja/lang.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author PzF_X + * @author Osaka */ $lang['domain'] = 'ログオン時のドメイン'; +$lang['authpwdexpire'] = 'あなたのパスワードは、あと%d日で有効期限が切れます。パスワードを変更してください。'; diff --git a/lib/plugins/authad/lang/ka/lang.php b/lib/plugins/authad/lang/ka/lang.php new file mode 100644 index 000000000..ab0c86902 --- /dev/null +++ b/lib/plugins/authad/lang/ka/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'თქვენს პაროლს ვადა გაუვა %d დღეში, მალე შეცვლა მოგიწევთ.'; diff --git a/lib/plugins/authad/lang/ko/lang.php b/lib/plugins/authad/lang/ko/lang.php index 5a2416b2c..c119fabc5 100644 --- a/lib/plugins/authad/lang/ko/lang.php +++ b/lib/plugins/authad/lang/ko/lang.php @@ -6,3 +6,4 @@ * @author Myeongjin */ $lang['domain'] = '로그온 도메인'; +$lang['authpwdexpire'] = '비밀번호를 바꾼지 %d일이 지났으며, 비밀번호를 곧 바꿔야 합니다.'; diff --git a/lib/plugins/authad/lang/lv/lang.php b/lib/plugins/authad/lang/lv/lang.php index 74becf756..a208ac949 100644 --- a/lib/plugins/authad/lang/lv/lang.php +++ b/lib/plugins/authad/lang/lv/lang.php @@ -6,3 +6,4 @@ * @author Aivars Miška */ $lang['domain'] = 'Iežurnālēšanās domēns'; +$lang['authpwdexpire'] = 'Tavai parolei pēc %d dienām biegsies termiņš, tā drīzumā jānomaina.'; diff --git a/lib/plugins/authad/lang/nl/lang.php b/lib/plugins/authad/lang/nl/lang.php index ea8419069..bd241a0a9 100644 --- a/lib/plugins/authad/lang/nl/lang.php +++ b/lib/plugins/authad/lang/nl/lang.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Rene + * @author Dion Nicolaas */ $lang['domain'] = 'Inlog Domein'; +$lang['authpwdexpire'] = 'Je wachtwoord verloopt in %d dagen, je moet het binnenkort veranderen'; diff --git a/lib/plugins/authad/lang/no/lang.php b/lib/plugins/authad/lang/no/lang.php index a1c9c7e8a..f8dbb0b08 100644 --- a/lib/plugins/authad/lang/no/lang.php +++ b/lib/plugins/authad/lang/no/lang.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Patrick + * @author Thomas Juberg */ $lang['domain'] = 'Loggpå-domene'; +$lang['authpwdexpire'] = 'Ditt passord går ut om %d dager, du bør endre det snarest.'; diff --git a/lib/plugins/authad/lang/pl/lang.php b/lib/plugins/authad/lang/pl/lang.php new file mode 100644 index 000000000..645b46afa --- /dev/null +++ b/lib/plugins/authad/lang/pl/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'Twoje hasło wygaśnie za %d dni. Należy je zmienić w krótkim czasie.'; diff --git a/lib/plugins/authad/lang/pt-br/lang.php b/lib/plugins/authad/lang/pt-br/lang.php index 5fa963d4e..9dc731b05 100644 --- a/lib/plugins/authad/lang/pt-br/lang.php +++ b/lib/plugins/authad/lang/pt-br/lang.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Felipe Castro + * @author Frederico Gonçalves Guimarães */ $lang['domain'] = 'Domínio de "Logon"'; +$lang['authpwdexpire'] = 'Sua senha vai expirar em %d dias. Você deve mudá-la assim que for possível.'; diff --git a/lib/plugins/authad/lang/pt/lang.php b/lib/plugins/authad/lang/pt/lang.php index f307bc901..919534231 100644 --- a/lib/plugins/authad/lang/pt/lang.php +++ b/lib/plugins/authad/lang/pt/lang.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Paulo Silva + * @author André Neves */ $lang['domain'] = 'Domínio de Início de Sessão'; +$lang['authpwdexpire'] = 'A sua senha expirará dentro de %d dias, deve mudá-la em breve.'; diff --git a/lib/plugins/authad/lang/ro/lang.php b/lib/plugins/authad/lang/ro/lang.php new file mode 100644 index 000000000..28a0e1e64 --- /dev/null +++ b/lib/plugins/authad/lang/ro/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'Parola va expira în %d zile, ar trebui să o schimbi în curând.'; diff --git a/lib/plugins/authad/lang/ru/lang.php b/lib/plugins/authad/lang/ru/lang.php index 6f3c03e39..6a3f6e995 100644 --- a/lib/plugins/authad/lang/ru/lang.php +++ b/lib/plugins/authad/lang/ru/lang.php @@ -6,3 +6,4 @@ * @author Aleksandr Selivanov */ $lang['domain'] = 'Домен'; +$lang['authpwdexpire'] = 'Действие вашего пароля истекает через %d дней. Вы должны изменить его как можно скорее'; diff --git a/lib/plugins/authad/lang/sk/lang.php b/lib/plugins/authad/lang/sk/lang.php new file mode 100644 index 000000000..cb0698f46 --- /dev/null +++ b/lib/plugins/authad/lang/sk/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'Platnosť hesla vyprší za %d dní, mali by ste ho zmeniť čo najskôr.'; diff --git a/lib/plugins/authad/lang/sl/lang.php b/lib/plugins/authad/lang/sl/lang.php new file mode 100644 index 000000000..dc7b3567a --- /dev/null +++ b/lib/plugins/authad/lang/sl/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['authpwdexpire'] = 'Geslo bo poteklo v %d dneh. Priporočljivo ga je zamenjati.'; diff --git a/lib/plugins/authad/lang/sv/lang.php b/lib/plugins/authad/lang/sv/lang.php new file mode 100644 index 000000000..f253ae7fe --- /dev/null +++ b/lib/plugins/authad/lang/sv/lang.php @@ -0,0 +1,8 @@ + + * @author syaoranhinata@gmail.com */ $lang['domain'] = '登入網域'; +$lang['authpwdexpire'] = '您的密碼將在 %d 天內到期,請馬上更換新密碼。'; diff --git a/lib/plugins/authad/lang/zh/lang.php b/lib/plugins/authad/lang/zh/lang.php index 2a05aa168..4f3794999 100644 --- a/lib/plugins/authad/lang/zh/lang.php +++ b/lib/plugins/authad/lang/zh/lang.php @@ -6,3 +6,4 @@ * @author lainme */ $lang['domain'] = '登录域'; +$lang['authpwdexpire'] = '您的密码将在 %d 天内过期,请尽快更改'; -- cgit v1.2.3 From f8095446e4d8d2bca535087d6e9dbcd20106d21d Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 1 Apr 2015 19:48:03 +0100 Subject: add more plugin groups to authplain test --- lib/plugins/authplain/_test/escaping.test.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authplain/_test/escaping.test.php b/lib/plugins/authplain/_test/escaping.test.php index e1eade8d4..7139aa99b 100644 --- a/lib/plugins/authplain/_test/escaping.test.php +++ b/lib/plugins/authplain/_test/escaping.test.php @@ -9,7 +9,9 @@ * authplain won't get unexpectedly surprised.) * * @group plugin_authplain + * @group auth_plugins * @group plugins + * @group bundled_plugins */ class helper_plugin_authplain_escaping_test extends DokuWikiTest { -- cgit v1.2.3 From 0bfc5a9124c0a505f64434061076c8da4d89d186 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 1 Apr 2015 19:48:26 +0100 Subject: add plugin groups to config plugin test --- lib/plugins/config/_test/configuration.test.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/config/_test/configuration.test.php b/lib/plugins/config/_test/configuration.test.php index b808ad505..6e9eb0cc6 100644 --- a/lib/plugins/config/_test/configuration.test.php +++ b/lib/plugins/config/_test/configuration.test.php @@ -1,4 +1,10 @@ Date: Tue, 14 Apr 2015 02:36:02 +0200 Subject: translation update --- lib/plugins/authldap/lang/fr/settings.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/fr/settings.php b/lib/plugins/authldap/lang/fr/settings.php index aa75105cf..619aee3d3 100644 --- a/lib/plugins/authldap/lang/fr/settings.php +++ b/lib/plugins/authldap/lang/fr/settings.php @@ -21,7 +21,9 @@ $lang['binddn'] = 'Nom de domaine d\'un utilisateur de connexion $lang['bindpw'] = 'Mot de passe de l\'utilisateur ci-dessus.'; $lang['userscope'] = 'Limiter la portée de recherche d\'utilisateurs'; $lang['groupscope'] = 'Limiter la portée de recherche de groupes'; +$lang['userkey'] = 'Attribut indiquant le nom d\'utilisateur. Doit être en accord avec le filtre d\'utilisateur.'; $lang['groupkey'] = 'Affiliation aux groupes à partir de n\'importe quel attribut utilisateur (au lieu des groupes AD standards), p. ex. groupes par département ou numéro de téléphone'; +$lang['modPass'] = 'Peut-on changer le mot de passe LDAP depuis DokiWiki ?'; $lang['debug'] = 'Afficher des informations de bégogage supplémentaires pour les erreurs'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; -- cgit v1.2.3 From a7ec353091498e86d606c27f5ca7a808c2d096c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerry=20Wei=C3=9Fbach?= Date: Tue, 14 Apr 2015 10:12:02 +0200 Subject: Add display options to extension manger Allows tho show/hide extensions that are: enabled, disabled, updatable --- lib/plugins/extension/helper/gui.php | 9 +++++++++ lib/plugins/extension/helper/list.php | 1 + lib/plugins/extension/lang/en/lang.php | 7 ++++++- lib/plugins/extension/script.js | 8 +++++++- lib/plugins/extension/style.less | 13 +++++++++++++ 5 files changed, 36 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 3a0f0c589..2dbb3d5e5 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -38,6 +38,15 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { echo '
    '; echo $this->locale_xhtml('intro_plugins'); + + $options = new Doku_Form( "viewoptions" ); + $options->addElement( form_makeOpenTag( "p" ) ); + $options->addElement( $this->getLang('display_viewoptions') ); + $options->addElement( form_makeCheckboxField( "enabled", 1, $this->getLang('display_enabled') ) ); + $options->addElement( form_makeCheckboxField( "disabled", 1, $this->getLang('display_disabled') ) ); + $options->addElement( form_makeCheckboxField( "updatable", 1, $this->getLang('display_updatable') ) ); + $options->addElement( form_makeCloseTag( "p" ) ); + $options->printForm(); echo '
    '; $pluginlist = $plugin_controller->getList('', true); diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 8bcd00ec6..11aea1d0e 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -151,6 +151,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { if($extension->isInstalled()) { $class.=' installed'; $class.= ($extension->isEnabled()) ? ' enabled':' disabled'; + if($extension->updateAvailable()) $class .= ' updatable'; } if(!$extension->canModify()) $class.= ' notselect'; if($extension->isProtected()) $class.= ' protected'; diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index f545b6da3..907f91c23 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -101,4 +101,9 @@ $lang['install_url'] = 'Install from URL:'; $lang['install_upload'] = 'Upload Extension:'; $lang['repo_error'] = 'The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy settings.'; -$lang['nossl'] = 'Your PHP seems to miss SSL support. Downloading will not work for many DokuWiki extensions.'; \ No newline at end of file +$lang['nossl'] = 'Your PHP seems to miss SSL support. Downloading will not work for many DokuWiki extensions.'; + +$lang['display_viewoptions'] = 'View Options:'; +$lang['display_enabled'] = 'enabled'; +$lang['display_disabled'] = 'disabled'; +$lang['display_updatable'] = 'updatable'; diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index fab88162d..43af21ee1 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -110,4 +110,10 @@ jQuery(function(){ ); }); -}); \ No newline at end of file + /** + * Enable all plugin types + */ + $extmgr.find( '#viewoptions :checkbox' ).change(function(){ + jQuery('#extension__list').toggleClass( this.name ); + }).click(); +}); diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index d20689099..fe15da16a 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -281,6 +281,15 @@ * Enabled/Disabled overrides */ #extension__list { + + .enabled, .disabled, .updatable { + display: none; + } + + &.enabled .enabled, &.disabled .disabled, &.updatable .updatable { + display: block; + } + .enabled div.screenshot span { background: transparent url(images/enabled.png) no-repeat 2px 2px; } @@ -361,3 +370,7 @@ display: block; width: 60%; } + +#viewoptions label { + margin-left: 1em; +} -- cgit v1.2.3 From d15f7f88b28a5b4daba129f4f5e2dfcfe83ac856 Mon Sep 17 00:00:00 2001 From: Tomas Darius Davainis Date: Fri, 17 Apr 2015 03:25:59 +0200 Subject: translation update --- lib/plugins/acl/lang/lt/lang.php | 4 ++-- lib/plugins/popularity/lang/lt/lang.php | 5 +++-- lib/plugins/usermanager/lang/lt/lang.php | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/lang/lt/lang.php b/lib/plugins/acl/lang/lt/lang.php index ef339177b..2a1748abc 100644 --- a/lib/plugins/acl/lang/lt/lang.php +++ b/lib/plugins/acl/lang/lt/lang.php @@ -1,8 +1,8 @@ * @author audrius.klevas@gmail.com * @author Arunas Vaitekunas diff --git a/lib/plugins/popularity/lang/lt/lang.php b/lib/plugins/popularity/lang/lt/lang.php index 88df29c50..dca350475 100644 --- a/lib/plugins/popularity/lang/lt/lang.php +++ b/lib/plugins/popularity/lang/lt/lang.php @@ -1,7 +1,8 @@ */ diff --git a/lib/plugins/usermanager/lang/lt/lang.php b/lib/plugins/usermanager/lang/lt/lang.php index db3cf2d32..3c0029303 100644 --- a/lib/plugins/usermanager/lang/lt/lang.php +++ b/lib/plugins/usermanager/lang/lt/lang.php @@ -1,7 +1,8 @@ * @author audrius.klevas@gmail.com * @author Arunas Vaitekunas -- cgit v1.2.3 From bf43fe7bbab79116830152b2d2326dc1e7457536 Mon Sep 17 00:00:00 2001 From: Yoven Date: Sun, 19 Apr 2015 19:28:43 +0200 Subject: 2 typo fixes --- lib/plugins/extension/lang/fr/lang.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/fr/lang.php b/lib/plugins/extension/lang/fr/lang.php index 44d403847..1a5e469f8 100644 --- a/lib/plugins/extension/lang/fr/lang.php +++ b/lib/plugins/extension/lang/fr/lang.php @@ -64,7 +64,7 @@ $lang['msg_enabled'] = 'Greffon %s activé'; $lang['msg_disabled'] = 'Greffon %s désactivé'; $lang['msg_delete_success'] = 'Extension %s désinstallée.'; $lang['msg_delete_failed'] = 'Echec de la désinstallation de l\'extension %s'; -$lang['msg_template_install_success'] = 'Thème %s installée avec succès'; +$lang['msg_template_install_success'] = 'Thème %s installé avec succès'; $lang['msg_template_update_success'] = 'Thème %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'; @@ -79,7 +79,7 @@ $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_findfolder'] = 'Impossible d\'identifier 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 %s. 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 thèmes.'; -- cgit v1.2.3 From e40f7042b86e8670dc1dbe18d297eb5c1adb701e Mon Sep 17 00:00:00 2001 From: Alex P Date: Fri, 24 Apr 2015 16:41:16 +0200 Subject: translation update --- lib/plugins/authldap/lang/ru/settings.php | 9 +++++++++ lib/plugins/authpgsql/lang/ru/settings.php | 2 ++ lib/plugins/extension/lang/ru/lang.php | 3 +++ 3 files changed, 14 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php index 1e5391644..067ec9de4 100644 --- a/lib/plugins/authldap/lang/ru/settings.php +++ b/lib/plugins/authldap/lang/ru/settings.php @@ -9,6 +9,7 @@ * @author Aleksandr Selivanov * @author Владимир * @author Vitaly Filatenko + * @author Alex P */ $lang['server'] = 'Ваш LDAP-сервер. Либо имя хоста (localhost), либо полный URL (ldap://server.tld:389)'; $lang['port'] = 'Порт LDAP-сервера, если выше не был указан полный URL'; @@ -18,12 +19,20 @@ $lang['userfilter'] = 'LDAP-фильтр для поиска акка $lang['groupfilter'] = 'LDAP-фильтр для поиска групп. Например: (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; $lang['version'] = 'Версия протокола. Возможно, вам нужно указать 3'; $lang['starttls'] = 'Использовать TLS-подключения?'; +$lang['referrals'] = 'Следовать за referrals ?'; $lang['deref'] = 'Как расшифровывать псевдонимы?'; +$lang['binddn'] = 'DN вторичного bind пользователя, если anonymous bind недостаточно. Например: cn=admin, dc=my, dc=home'; $lang['bindpw'] = 'Пароль для указанного пользователя'; $lang['userscope'] = 'Ограничить область поиска при поиске пользователей'; $lang['groupscope'] = 'Ограничить область поиска при поиске групп'; +$lang['userkey'] = 'Атрибут означающий имя пользователя; должен быть таким же как в userfilter'; +$lang['groupkey'] = 'Использовать любой атрибут пользователя для включения в группу (вместо стандартного AD groups) Например из атрибута department или telephone number'; +$lang['modPass'] = 'Может ли LDAP пароль быть поменян через dokuwiki?'; $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'; +$lang['referrals_o_-1'] = 'исользовать по умолчанию'; +$lang['referrals_o_0'] = 'не следовать за referrals'; +$lang['referrals_o_1'] = 'Следовать за referrals'; diff --git a/lib/plugins/authpgsql/lang/ru/settings.php b/lib/plugins/authpgsql/lang/ru/settings.php index 2af299172..a74296ab8 100644 --- a/lib/plugins/authpgsql/lang/ru/settings.php +++ b/lib/plugins/authpgsql/lang/ru/settings.php @@ -8,6 +8,7 @@ * @author Aleksandr Selivanov * @author Vitaly Filatenko * @author Type-kun + * @author Alex P */ $lang['server'] = 'Ваш PostgreSQL-сервер'; $lang['port'] = 'Порт вашего PostgreSQL-сервера'; @@ -15,6 +16,7 @@ $lang['user'] = 'Имя пользователя PostgreSQL'; $lang['password'] = 'Пароль для указанного пользователя'; $lang['database'] = 'Имя базы данных'; $lang['debug'] = 'Отображать дополнительную отладочную информацию'; +$lang['forwardClearPass'] = 'Передать чистым текстом ползовательские пароли в SQL запросы ниже, вместо использование опции passcrypt'; $lang['checkPass'] = 'Выражение SQL, осуществляющее проверку пароля'; $lang['getUserInfo'] = 'Выражение SQL, осуществляющее извлечение информации о пользователе'; $lang['getGroups'] = 'Выражение SQL, осуществляющее извлечение информации о членстве пользователе в группах'; diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php index 381d84500..4b2542420 100644 --- a/lib/plugins/extension/lang/ru/lang.php +++ b/lib/plugins/extension/lang/ru/lang.php @@ -7,6 +7,7 @@ * @author Igor Degraf * @author Type-kun * @author Vitaly Filatenko + * @author Alex P */ $lang['menu'] = 'Управление дополнениями'; $lang['tab_plugins'] = 'Установленные плагины'; @@ -87,6 +88,8 @@ $lang['noperms'] = 'Папка для расширений нед $lang['notplperms'] = 'Папка для шаблонов недоступна для записи'; $lang['nopluginperms'] = 'Папка плагинов недоступна для записи'; $lang['git'] = 'Это расширение было установлено через git. Вы не можете обновить его тут.'; +$lang['auth'] = 'Этот auth плагин не включен в конфигурации, подумайте о его отключении'; $lang['install_url'] = 'Установить с адреса URL'; $lang['install_upload'] = 'Скачать расширение'; $lang['repo_error'] = 'Сайт с плагинами недоступен. Убедитесь, что у сайта есть доступ на www.dokuwiki.org, а также проверьте настройки соединения с Интернетом.'; +$lang['nossl'] = 'Ваша PHP конфигурация не имеет SSL поддержки. Это поломает скачивание для многих DokuWiki плагинов и расширений.'; -- cgit v1.2.3 From 79a3bed0a23b6bef35eb12c6ccbb1f3301f6c621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerry=20Wei=C3=9Fbach?= Date: Mon, 27 Apr 2015 08:00:12 +0200 Subject: Generate display options via JS Since it is a JS function only, the form will be generated by it too. --- lib/plugins/extension/helper/gui.php | 9 --------- lib/plugins/extension/lang/en/lang.php | 8 ++++---- lib/plugins/extension/script.js | 18 ++++++++++++++---- 3 files changed, 18 insertions(+), 17 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 2dbb3d5e5..3a0f0c589 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -38,15 +38,6 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { echo '
    '; echo $this->locale_xhtml('intro_plugins'); - - $options = new Doku_Form( "viewoptions" ); - $options->addElement( form_makeOpenTag( "p" ) ); - $options->addElement( $this->getLang('display_viewoptions') ); - $options->addElement( form_makeCheckboxField( "enabled", 1, $this->getLang('display_enabled') ) ); - $options->addElement( form_makeCheckboxField( "disabled", 1, $this->getLang('display_disabled') ) ); - $options->addElement( form_makeCheckboxField( "updatable", 1, $this->getLang('display_updatable') ) ); - $options->addElement( form_makeCloseTag( "p" ) ); - $options->printForm(); echo '
    '; $pluginlist = $plugin_controller->getList('', true); diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 907f91c23..79f643629 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -103,7 +103,7 @@ $lang['install_upload'] = 'Upload Extension:'; $lang['repo_error'] = 'The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy settings.'; $lang['nossl'] = 'Your PHP seems to miss SSL support. Downloading will not work for many DokuWiki extensions.'; -$lang['display_viewoptions'] = 'View Options:'; -$lang['display_enabled'] = 'enabled'; -$lang['display_disabled'] = 'disabled'; -$lang['display_updatable'] = 'updatable'; +$lang['js']['display_viewoptions'] = 'View Options:'; +$lang['js']['display_enabled'] = 'enabled'; +$lang['js']['display_disabled'] = 'disabled'; +$lang['js']['display_updatable'] = 'updatable'; diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index 43af21ee1..825bcc928 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -111,9 +111,19 @@ jQuery(function(){ }); /** - * Enable all plugin types - */ - $extmgr.find( '#viewoptions :checkbox' ).change(function(){ + Create section for enabling/disabling viewing options + */ + var $displayOpts = jQuery('

    ', { id: 'viewoptions'} ).appendTo($extmgr.find( '.panelHeader' )); + $displayOpts.append(LANG.plugins.extension.display_viewoptions); + + var displayOptionsHandler = function(){ jQuery('#extension__list').toggleClass( this.name ); - }).click(); + }; + + jQuery(['enabled', 'disabled', 'updatable']).each(function(index, chkName){ + + var $label = jQuery( '' ).appendTo($displayOpts); + jQuery( '', { type: 'checkbox', name: chkName }).change(displayOptionsHandler).appendTo($label).click(); + jQuery( '' ).append(LANG.plugins.extension['display_'+chkName]).appendTo($label); + }); }); -- cgit v1.2.3 From b857f6cb524f22ed48a5a08553b2a370969dda38 Mon Sep 17 00:00:00 2001 From: Hudson FAS Date: Tue, 28 Apr 2015 16:21:21 +0200 Subject: translation update --- lib/plugins/authldap/lang/pt-br/settings.php | 6 ++++++ lib/plugins/extension/lang/pt-br/lang.php | 17 +++++++++++++++++ lib/plugins/usermanager/lang/pt-br/import.txt | 9 +++++++++ 3 files changed, 32 insertions(+) create mode 100644 lib/plugins/usermanager/lang/pt-br/import.txt (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/pt-br/settings.php b/lib/plugins/authldap/lang/pt-br/settings.php index 6ad6b4862..f35ed8eb8 100644 --- a/lib/plugins/authldap/lang/pt-br/settings.php +++ b/lib/plugins/authldap/lang/pt-br/settings.php @@ -5,6 +5,7 @@ * * @author Victor Westmann * @author Frederico Guimarães + * @author Hudson FAS */ $lang['server'] = 'Seu servidor LDAP. Ou hostname (localhost) ou uma URL completa (ldap://server.tld:389)'; $lang['port'] = 'Porta LDAP do servidor se nenhuma URL completa tiver sido fornecida acima'; @@ -20,9 +21,14 @@ $lang['binddn'] = 'DN de um vínculo opcional de usuário se vín $lang['bindpw'] = 'Senha do usuário acima'; $lang['userscope'] = 'Limitar escopo da busca para busca de usuário'; $lang['groupscope'] = 'Limitar escopo da busca para busca de grupo'; +$lang['userkey'] = 'Atributo que indica o nome do usuário; deve ser consistente com userfilter.'; $lang['groupkey'] = 'Membro de grupo vem de qualquer atributo do usuário (ao invés de grupos padrões AD) e.g. departamento de grupo ou número de telefone'; +$lang['modPass'] = 'A senha LDAP pode ser alterada pelo dokuwiki ?'; $lang['debug'] = 'Mostrar informações adicionais de depuração em erros'; $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'; +$lang['referrals_o_-1'] = 'use o padrão'; +$lang['referrals_o_0'] = 'não seguem referências'; +$lang['referrals_o_1'] = 'seguem referências'; diff --git a/lib/plugins/extension/lang/pt-br/lang.php b/lib/plugins/extension/lang/pt-br/lang.php index 0d897616a..47286389f 100644 --- a/lib/plugins/extension/lang/pt-br/lang.php +++ b/lib/plugins/extension/lang/pt-br/lang.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Felipe Castro + * @author Hudson FAS */ $lang['menu'] = 'Gerenciador de extensões'; $lang['tab_plugins'] = 'Extensões instaladas'; @@ -62,6 +63,7 @@ $lang['status_bundled'] = 'agrupado'; $lang['msg_enabled'] = 'Extensão %s habilitada'; $lang['msg_disabled'] = 'Extensão %s desabilitada'; $lang['msg_delete_success'] = 'Extensão desinstalada'; +$lang['msg_delete_failed'] = 'Falha na desinstalação da extensão'; $lang['msg_template_install_success'] = 'Modelo %s instalado com sucesso'; $lang['msg_template_update_success'] = 'Modelo %s atualizado com sucesso'; $lang['msg_plugin_install_success'] = 'Extensão %s instalada com sucesso'; @@ -73,3 +75,18 @@ $lang['security_warning'] = 'Aviso sobre segurança: %s'; $lang['update_available'] = 'Atualização: Nova versão %s está disponível.'; $lang['wrong_folder'] = 'Extensão instalada incorretamente: Renomeie o diretório de extensões "%s" para "%s".'; $lang['url_change'] = 'URL mudou: A URL para baixar mudou desde a última baixada. Verifique se a nova URL é válida antes de atualizar a extensão.
    Novo: %s
    Velho: %s'; +$lang['error_badurl'] = 'O URL deve começar com http ou https'; +$lang['error_dircreate'] = 'Impossível criar pasta temporária para receber o download'; +$lang['error_download'] = 'Impossável baixar o arquivo: %s'; +$lang['error_decompress'] = 'Impossável descompimir o arquivo baixado. Isso pode ser resultado de um download ruim que neste caso pode ser tentado novamente; ou o formato da compressão pode ser desconhecido, neste caso baixe e instale manualmente.'; +$lang['error_findfolder'] = 'Impossíl identificar a extensão do diretório, você deve baixar e instalar manualmente.'; +$lang['error_copy'] = 'Houve um erro de cópia de arquivo durante a tentativa de instalar os arquivos para o diretório %s : o disco pode estar cheio ou as permissões de acesso ao arquivo podem estar incorreta. Isso pode ter resultado em um plugin parcialmente instalado e deixar a sua instalação wiki instável'; +$lang['noperms'] = 'Diretório de extensão não é gravável'; +$lang['notplperms'] = 'Diretório de modelo (Template) não é gravável'; +$lang['nopluginperms'] = 'Diretório de plugin não é gravável'; +$lang['git'] = 'A extensão foi instalada via git, você talvez não queira atualizá-lo aqui.'; +$lang['auth'] = 'O plugin auth não está ativado na configuração, considere desativá-lo.'; +$lang['install_url'] = 'Instale a partir do URL:'; +$lang['install_upload'] = 'Publicar Extensão:'; +$lang['repo_error'] = 'O repositório de plugin não pode ser contactado. Certifique-se de que o servidor pode acessar www.dokuwiki.org e confira suas configurações de proxy.'; +$lang['nossl'] = 'Sua instalação PHP parece que não suporta SSL. Algumas extensões DokuWiki não serão baixadas.'; diff --git a/lib/plugins/usermanager/lang/pt-br/import.txt b/lib/plugins/usermanager/lang/pt-br/import.txt new file mode 100644 index 000000000..d692bb364 --- /dev/null +++ b/lib/plugins/usermanager/lang/pt-br/import.txt @@ -0,0 +1,9 @@ +===== Importação de Usuários em Massa ===== + +Requer um arquivo CSV de usuários com pelo menos quatro colunas. +As colunas devem conter, nesta ordem: id-usuário, nome completo, endereço de e-mail e grupos. +Os campos CSV devem ser separados por vírgulas ( , ) e nomes delimitados por aspas (). Barra invertida (\ ) pode ser usado para escapar nomes. +Para um exemplo de um arquivo adequado , tente a função Exportar usuários acima. +Usuário ids duplicados serão ignorados. + +A senha será gerada e enviada para cada usuário importado com sucesso. \ No newline at end of file -- cgit v1.2.3 From abf17633a7157acf33d1cf76985b9221089d3fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerry=20Wei=C3=9Fbach?= Date: Mon, 4 May 2015 07:57:33 +0200 Subject: Add selection for the Installed Plugins tab The viewing options should only be visible on the first tab - which is the installed Plugins tab. (There seems to be no more direct way to address this tab.) --- lib/plugins/extension/script.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index 825bcc928..db6a95e51 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -113,7 +113,9 @@ jQuery(function(){ /** Create section for enabling/disabling viewing options */ + if ( $extmgr.find('.tabs li:first-child').hasClass('active') ) { var $displayOpts = jQuery('

    ', { id: 'viewoptions'} ).appendTo($extmgr.find( '.panelHeader' )); + $displayOpts.append(LANG.plugins.extension.display_viewoptions); var displayOptionsHandler = function(){ @@ -126,4 +128,5 @@ jQuery(function(){ jQuery( '', { type: 'checkbox', name: chkName }).change(displayOptionsHandler).appendTo($label).click(); jQuery( '' ).append(LANG.plugins.extension['display_'+chkName]).appendTo($label); }); + } }); -- cgit v1.2.3 From c85bc60fd47287238689cca5a2c32b9253cf0b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerry=20Wei=C3=9Fbach?= Date: Mon, 4 May 2015 07:58:47 +0200 Subject: Prettify Code. --- lib/plugins/extension/script.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index db6a95e51..06ad6ff20 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -114,19 +114,19 @@ jQuery(function(){ Create section for enabling/disabling viewing options */ if ( $extmgr.find('.tabs li:first-child').hasClass('active') ) { - var $displayOpts = jQuery('

    ', { id: 'viewoptions'} ).appendTo($extmgr.find( '.panelHeader' )); + var $displayOpts = jQuery('

    ', { id: 'viewoptions'} ).appendTo($extmgr.find( '.panelHeader' )); - $displayOpts.append(LANG.plugins.extension.display_viewoptions); + $displayOpts.append(LANG.plugins.extension.display_viewoptions); - var displayOptionsHandler = function(){ - jQuery('#extension__list').toggleClass( this.name ); - }; + var displayOptionsHandler = function(){ + jQuery('#extension__list').toggleClass( this.name ); + }; - jQuery(['enabled', 'disabled', 'updatable']).each(function(index, chkName){ + jQuery(['enabled', 'disabled', 'updatable']).each(function(index, chkName){ - var $label = jQuery( '' ).appendTo($displayOpts); - jQuery( '', { type: 'checkbox', name: chkName }).change(displayOptionsHandler).appendTo($label).click(); - jQuery( '' ).append(LANG.plugins.extension['display_'+chkName]).appendTo($label); - }); + var $label = jQuery( '' ).appendTo($displayOpts); + jQuery( '', { type: 'checkbox', name: chkName }).change(displayOptionsHandler).appendTo($label).click(); + jQuery( '' ).append(LANG.plugins.extension['display_'+chkName]).appendTo($label); + }); } }); -- cgit v1.2.3 From 957202777a4d14ec2b5601d36010542f38b4740c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerry=20Wei=C3=9Fbach?= Date: Mon, 4 May 2015 08:03:46 +0200 Subject: Allow Viewing Options for templates as well. --- lib/plugins/extension/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index 06ad6ff20..1a0af4e0d 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -113,7 +113,7 @@ jQuery(function(){ /** Create section for enabling/disabling viewing options */ - if ( $extmgr.find('.tabs li:first-child').hasClass('active') ) { + if ( $extmgr.find('.tabs li:first-child, .tabs li:nth-child(2)').hasClass('active') ) { var $displayOpts = jQuery('

    ', { id: 'viewoptions'} ).appendTo($extmgr.find( '.panelHeader' )); $displayOpts.append(LANG.plugins.extension.display_viewoptions); -- cgit v1.2.3 From c93edcafa17e4189ce3be461b6374a62664d2d51 Mon Sep 17 00:00:00 2001 From: Johan Wijnker Date: Tue, 5 May 2015 16:31:25 +0200 Subject: translation update --- lib/plugins/authldap/lang/nl/settings.php | 6 ++++++ lib/plugins/extension/lang/nl/lang.php | 3 +++ 2 files changed, 9 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/nl/settings.php b/lib/plugins/authldap/lang/nl/settings.php index 193d1a386..41fcce2cd 100644 --- a/lib/plugins/authldap/lang/nl/settings.php +++ b/lib/plugins/authldap/lang/nl/settings.php @@ -5,6 +5,7 @@ * * @author Gerrit Uitslag * @author Remon + * @author Johan Wijnker */ $lang['server'] = 'Je LDAP server. Of de servernaam (localhost) of de volledige URL (ldap://server.tld:389)'; $lang['port'] = 'LDAP server poort als bij de entry hierboven geen volledige URL is opgegeven'; @@ -20,9 +21,14 @@ $lang['binddn'] = 'DN van een optionele bind gebruiker als anonie $lang['bindpw'] = 'Wachtwoord van bovenstaande gebruiker'; $lang['userscope'] = 'Beperken scope van zoekfuncties voor gebruikers'; $lang['groupscope'] = 'Beperken scope van zoekfuncties voor groepen'; +$lang['userkey'] = 'Attribuut aanduiding van de gebruikersnaam; moet consistent zijn met userfilter.'; $lang['groupkey'] = 'Groepslidmaatschap van enig gebruikersattribuut (in plaats van standaard AD groepen), bijv. groep van afdeling of telefoonnummer'; +$lang['modPass'] = 'Kan het LDAP wachtwoord worden gewijzigd met DokuWiki?'; $lang['debug'] = 'Tonen van aanvullende debuginformatie bij fouten'; $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'; +$lang['referrals_o_-1'] = 'gebruik standaard'; +$lang['referrals_o_0'] = 'volg verwijzing niet'; +$lang['referrals_o_1'] = 'volg verwijzing'; diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php index 194b4b3e1..3fed9f4a3 100644 --- a/lib/plugins/extension/lang/nl/lang.php +++ b/lib/plugins/extension/lang/nl/lang.php @@ -7,6 +7,7 @@ * @author Gerrit Uitslag * @author Johan Vervloet * @author Mijndert + * @author Johan Wijnker */ $lang['menu'] = 'Uitbreidingen'; $lang['tab_plugins'] = 'Geïnstalleerde Plugins'; @@ -87,6 +88,8 @@ $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['auth'] = 'Deze auth plugin is niet geactiveerd in de configuratie, overweeg het om uit te schakelen.'; $lang['install_url'] = 'Installeer vanaf URL:'; $lang['install_upload'] = 'Upload Uitbreiding:'; $lang['repo_error'] = 'Er kon geen verbinding worden gemaakt met de centrale plugin opslag. Controleer of de server verbinding mag maken met www.dokuwiki.org en controleer de proxy instellingen.'; +$lang['nossl'] = 'Je PHP mist SSL ondersteuning. Downloaden werkt niet met veel DokuWiki extensies.'; -- cgit v1.2.3 From db9faf025cf129d15a086a803e8056e977975d76 Mon Sep 17 00:00:00 2001 From: Patrick Brown Date: Wed, 6 May 2015 01:30:59 -0400 Subject: Report more meaningful errors when an auth backend fails. closes #1093 --- lib/plugins/authplain/auth.php | 33 +++++++++++++++---------- lib/plugins/authplain/lang/af/lang.php | 6 +++++ lib/plugins/authplain/lang/ar/lang.php | 6 +++++ lib/plugins/authplain/lang/az/lang.php | 6 +++++ lib/plugins/authplain/lang/bg/lang.php | 6 +++++ lib/plugins/authplain/lang/bn/lang.php | 6 +++++ lib/plugins/authplain/lang/ca-valencia/lang.php | 6 +++++ lib/plugins/authplain/lang/ca/lang.php | 6 +++++ lib/plugins/authplain/lang/cs/lang.php | 6 +++++ lib/plugins/authplain/lang/da/lang.php | 6 +++++ lib/plugins/authplain/lang/de-informal/lang.php | 6 +++++ lib/plugins/authplain/lang/de/lang.php | 6 +++++ lib/plugins/authplain/lang/el/lang.php | 6 +++++ lib/plugins/authplain/lang/en/lang.php | 8 ++++++ lib/plugins/authplain/lang/eo/lang.php | 6 +++++ lib/plugins/authplain/lang/es/lang.php | 6 +++++ lib/plugins/authplain/lang/et/lang.php | 6 +++++ lib/plugins/authplain/lang/eu/lang.php | 6 +++++ lib/plugins/authplain/lang/fa/lang.php | 6 +++++ lib/plugins/authplain/lang/fi/lang.php | 6 +++++ lib/plugins/authplain/lang/fo/lang.php | 6 +++++ lib/plugins/authplain/lang/fr/lang.php | 6 +++++ lib/plugins/authplain/lang/gl/lang.php | 6 +++++ lib/plugins/authplain/lang/he/lang.php | 6 +++++ lib/plugins/authplain/lang/hr/lang.php | 6 +++++ lib/plugins/authplain/lang/hu/lang.php | 6 +++++ lib/plugins/authplain/lang/ia/lang.php | 6 +++++ lib/plugins/authplain/lang/id-ni/lang.php | 6 +++++ lib/plugins/authplain/lang/id/lang.php | 6 +++++ lib/plugins/authplain/lang/is/lang.php | 6 +++++ lib/plugins/authplain/lang/it/lang.php | 6 +++++ lib/plugins/authplain/lang/ja/lang.php | 6 +++++ lib/plugins/authplain/lang/ka/lang.php | 6 +++++ lib/plugins/authplain/lang/kk/lang.php | 6 +++++ lib/plugins/authplain/lang/km/lang.php | 6 +++++ lib/plugins/authplain/lang/ko/lang.php | 6 +++++ lib/plugins/authplain/lang/ku/lang.php | 6 +++++ lib/plugins/authplain/lang/la/lang.php | 6 +++++ lib/plugins/authplain/lang/lb/lang.php | 6 +++++ lib/plugins/authplain/lang/lt/lang.php | 6 +++++ lib/plugins/authplain/lang/lv/lang.php | 6 +++++ lib/plugins/authplain/lang/mg/lang.php | 6 +++++ lib/plugins/authplain/lang/mk/lang.php | 6 +++++ lib/plugins/authplain/lang/mr/lang.php | 6 +++++ lib/plugins/authplain/lang/ms/lang.php | 6 +++++ lib/plugins/authplain/lang/ne/lang.php | 6 +++++ lib/plugins/authplain/lang/nl/lang.php | 6 +++++ lib/plugins/authplain/lang/no/lang.php | 6 +++++ lib/plugins/authplain/lang/pl/lang.php | 6 +++++ lib/plugins/authplain/lang/pt-br/lang.php | 6 +++++ lib/plugins/authplain/lang/pt/lang.php | 6 +++++ lib/plugins/authplain/lang/ro/lang.php | 6 +++++ lib/plugins/authplain/lang/ru/lang.php | 6 +++++ lib/plugins/authplain/lang/sk/lang.php | 6 +++++ lib/plugins/authplain/lang/sl/lang.php | 6 +++++ lib/plugins/authplain/lang/sq/lang.php | 6 +++++ lib/plugins/authplain/lang/sr/lang.php | 6 +++++ lib/plugins/authplain/lang/sv/lang.php | 6 +++++ lib/plugins/authplain/lang/th/lang.php | 6 +++++ lib/plugins/authplain/lang/tr/lang.php | 6 +++++ lib/plugins/authplain/lang/uk/lang.php | 6 +++++ lib/plugins/authplain/lang/vi/lang.php | 6 +++++ lib/plugins/authplain/lang/zh-tw/lang.php | 6 +++++ lib/plugins/authplain/lang/zh/lang.php | 6 +++++ 64 files changed, 400 insertions(+), 13 deletions(-) create mode 100644 lib/plugins/authplain/lang/af/lang.php create mode 100644 lib/plugins/authplain/lang/ar/lang.php create mode 100644 lib/plugins/authplain/lang/az/lang.php create mode 100644 lib/plugins/authplain/lang/bg/lang.php create mode 100644 lib/plugins/authplain/lang/bn/lang.php create mode 100644 lib/plugins/authplain/lang/ca-valencia/lang.php create mode 100644 lib/plugins/authplain/lang/ca/lang.php create mode 100644 lib/plugins/authplain/lang/cs/lang.php create mode 100644 lib/plugins/authplain/lang/da/lang.php create mode 100644 lib/plugins/authplain/lang/de-informal/lang.php create mode 100644 lib/plugins/authplain/lang/de/lang.php create mode 100644 lib/plugins/authplain/lang/el/lang.php create mode 100644 lib/plugins/authplain/lang/en/lang.php create mode 100644 lib/plugins/authplain/lang/eo/lang.php create mode 100644 lib/plugins/authplain/lang/es/lang.php create mode 100644 lib/plugins/authplain/lang/et/lang.php create mode 100644 lib/plugins/authplain/lang/eu/lang.php create mode 100644 lib/plugins/authplain/lang/fa/lang.php create mode 100644 lib/plugins/authplain/lang/fi/lang.php create mode 100644 lib/plugins/authplain/lang/fo/lang.php create mode 100644 lib/plugins/authplain/lang/fr/lang.php create mode 100644 lib/plugins/authplain/lang/gl/lang.php create mode 100644 lib/plugins/authplain/lang/he/lang.php create mode 100644 lib/plugins/authplain/lang/hr/lang.php create mode 100644 lib/plugins/authplain/lang/hu/lang.php create mode 100644 lib/plugins/authplain/lang/ia/lang.php create mode 100644 lib/plugins/authplain/lang/id-ni/lang.php create mode 100644 lib/plugins/authplain/lang/id/lang.php create mode 100644 lib/plugins/authplain/lang/is/lang.php create mode 100644 lib/plugins/authplain/lang/it/lang.php create mode 100644 lib/plugins/authplain/lang/ja/lang.php create mode 100644 lib/plugins/authplain/lang/ka/lang.php create mode 100644 lib/plugins/authplain/lang/kk/lang.php create mode 100644 lib/plugins/authplain/lang/km/lang.php create mode 100644 lib/plugins/authplain/lang/ko/lang.php create mode 100644 lib/plugins/authplain/lang/ku/lang.php create mode 100644 lib/plugins/authplain/lang/la/lang.php create mode 100644 lib/plugins/authplain/lang/lb/lang.php create mode 100644 lib/plugins/authplain/lang/lt/lang.php create mode 100644 lib/plugins/authplain/lang/lv/lang.php create mode 100644 lib/plugins/authplain/lang/mg/lang.php create mode 100644 lib/plugins/authplain/lang/mk/lang.php create mode 100644 lib/plugins/authplain/lang/mr/lang.php create mode 100644 lib/plugins/authplain/lang/ms/lang.php create mode 100644 lib/plugins/authplain/lang/ne/lang.php create mode 100644 lib/plugins/authplain/lang/nl/lang.php create mode 100644 lib/plugins/authplain/lang/no/lang.php create mode 100644 lib/plugins/authplain/lang/pl/lang.php create mode 100644 lib/plugins/authplain/lang/pt-br/lang.php create mode 100644 lib/plugins/authplain/lang/pt/lang.php create mode 100644 lib/plugins/authplain/lang/ro/lang.php create mode 100644 lib/plugins/authplain/lang/ru/lang.php create mode 100644 lib/plugins/authplain/lang/sk/lang.php create mode 100644 lib/plugins/authplain/lang/sl/lang.php create mode 100644 lib/plugins/authplain/lang/sq/lang.php create mode 100644 lib/plugins/authplain/lang/sr/lang.php create mode 100644 lib/plugins/authplain/lang/sv/lang.php create mode 100644 lib/plugins/authplain/lang/th/lang.php create mode 100644 lib/plugins/authplain/lang/tr/lang.php create mode 100644 lib/plugins/authplain/lang/uk/lang.php create mode 100644 lib/plugins/authplain/lang/vi/lang.php create mode 100644 lib/plugins/authplain/lang/zh-tw/lang.php create mode 100644 lib/plugins/authplain/lang/zh/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authplain/auth.php b/lib/plugins/authplain/auth.php index b31c02fc8..bd46c61a7 100644 --- a/lib/plugins/authplain/auth.php +++ b/lib/plugins/authplain/auth.php @@ -134,7 +134,10 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { global $config_cascade; // user mustn't already exist - if($this->getUserData($user) !== false) return false; + if($this->getUserData($user) !== false) { + msg($this->getLang('userexists'), -1); + return false; + } $pass = auth_cryptPassword($pwd); @@ -144,16 +147,13 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { // prepare user line $userline = $this->_createUserLine($user, $pass, $name, $mail, $grps); - if(io_saveFile($config_cascade['plainauth.users']['default'], $userline, true)) { - $this->users[$user] = compact('pass', 'name', 'mail', 'grps'); - return $pwd; + if(!io_saveFile($config_cascade['plainauth.users']['default'], $userline, true)) { + msg($this->getLang('writefail'), -1); + return null; } - msg( - 'The '.$config_cascade['plainauth.users']['default']. - ' file is not writable. Please inform the Wiki-Admin', -1 - ); - return null; + $this->users[$user] = compact('pass', 'name', 'mail', 'grps'); + return $pwd; } /** @@ -169,7 +169,10 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { global $config_cascade; // sanity checks, user must already exist and there must be something to change - if(($userinfo = $this->getUserData($user)) === false) return false; + if(($userinfo = $this->getUserData($user)) === false) { + msg($this->getLang('usernotexists'), -1); + return false; + } if(!is_array($changes) || !count($changes)) return true; // update userinfo with new data, remembering to encrypt any password @@ -186,13 +189,14 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { $userline = $this->_createUserLine($newuser, $userinfo['pass'], $userinfo['name'], $userinfo['mail'], $userinfo['grps']); if(!$this->deleteUsers(array($user))) { - msg('Unable to modify user data. Please inform the Wiki-Admin', -1); + msg($this->getLang('writefail'), -1); return false; } if(!io_saveFile($config_cascade['plainauth.users']['default'], $userline, true)) { msg('There was an error modifying your user data. You should register again.', -1); // FIXME, user has been deleted but not recreated, should force a logout and redirect to login page + // Should replace the delete/save hybrid modify with an atomic io_replaceInFile $ACT = 'register'; return false; } @@ -223,7 +227,10 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { if(empty($deleted)) return 0; $pattern = '/^('.join('|', $deleted).'):/'; - io_deleteFromFile($config_cascade['plainauth.users']['default'], $pattern, true); + if (!io_deleteFromFile($config_cascade['plainauth.users']['default'], $pattern, true)) { + msg($this->getLang('writefail'), -1); + return 0; + } // reload the user list and count the difference $count = count($this->users); @@ -407,4 +414,4 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { $this->_pattern[$item] = '/'.str_replace('/', '\/', $pattern).'/i'; // allow regex characters } } -} \ No newline at end of file +} diff --git a/lib/plugins/authplain/lang/af/lang.php b/lib/plugins/authplain/lang/af/lang.php new file mode 100644 index 000000000..29742cfd2 --- /dev/null +++ b/lib/plugins/authplain/lang/af/lang.php @@ -0,0 +1,6 @@ + Date: Wed, 6 May 2015 15:31:08 -0400 Subject: Error reporting for database auth plugins --- lib/plugins/authad/auth.php | 8 ++++++-- lib/plugins/authad/lang/en/lang.php | 6 ++++-- lib/plugins/authldap/auth.php | 8 ++++---- lib/plugins/authldap/lang/en/lang.php | 11 +++++++++++ lib/plugins/authmysql/auth.php | 19 +++++++++++++++++-- lib/plugins/authmysql/lang/en/lang.php | 13 +++++++++++++ 6 files changed, 55 insertions(+), 10 deletions(-) create mode 100644 lib/plugins/authldap/lang/en/lang.php create mode 100644 lib/plugins/authmysql/lang/en/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 40c56ef09..60c68efc4 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -522,7 +522,10 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { public function modifyUser($user, $changes) { $return = true; $adldap = $this->_adldap($this->_userDomain($user)); - if(!$adldap) return false; + if(!$adldap) { + msg($this->getLang('connectfail'), -1); + return false; + } // password changing if(isset($changes['pass'])) { @@ -532,7 +535,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { if ($this->conf['debug']) msg('AD Auth: '.$e->getMessage(), -1); $return = false; } - if(!$return) msg('AD Auth: failed to change the password. Maybe the password policy was not met?', -1); + if(!$return) msg($this->getLang('passchangefail'), -1); } // changing user data @@ -554,6 +557,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { if ($this->conf['debug']) msg('AD Auth: '.$e->getMessage(), -1); $return = false; } + if(!$return) msg($this->getLang('userchangefail'), -1); } return $return; diff --git a/lib/plugins/authad/lang/en/lang.php b/lib/plugins/authad/lang/en/lang.php index 4f96a71fd..751aa9f47 100644 --- a/lib/plugins/authad/lang/en/lang.php +++ b/lib/plugins/authad/lang/en/lang.php @@ -6,7 +6,9 @@ * @author Andreas Gohr */ -$lang['domain'] = 'Logon Domain'; -$lang['authpwdexpire'] = 'Your password will expire in %d days, you should change it soon.'; +$lang['domain'] = 'Logon Domain'; +$lang['authpwdexpire'] = 'Your password will expire in %d days, you should change it soon.'; +$lang['passchangefail'] = 'Failed to change the password. Maybe the password policy was not met?'; +$lang['connectfail'] = 'Failed to connect to Active Directory server.'; //Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 9d031c049..247a0fec2 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -281,14 +281,14 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { // open the connection to the ldap if(!$this->_openLDAP()){ - msg('LDAP cannot connect: '. htmlspecialchars(ldap_error($this->con))); + $this->_debug('LDAP cannot connect: '. htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } // find the information about the user, in particular the "dn" $info = $this->getUserData($user,true); if(empty($info['dn'])) { - msg('LDAP cannot find your user dn'); + $this->_debug('LDAP cannot find your user dn', 0, __LINE__, __FILE__); return false; } $dn = $info['dn']; @@ -301,7 +301,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { // bind with the ldap if(!@ldap_bind($this->con, $dn, $pass)){ - msg('LDAP user bind failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + $this->_debug('LDAP user bind failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } } elseif ($this->getConf('binddn') && $this->getConf('bindpw')) { @@ -322,7 +322,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { // change the password if(!@ldap_mod_replace($this->con, $dn,array('userpassword' => $hash))){ - msg('LDAP mod replace failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con))); + $this->_debug('LDAP mod replace failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } diff --git a/lib/plugins/authldap/lang/en/lang.php b/lib/plugins/authldap/lang/en/lang.php new file mode 100644 index 000000000..db06efb4c --- /dev/null +++ b/lib/plugins/authldap/lang/en/lang.php @@ -0,0 +1,11 @@ +_openDB()) { if(($info = $this->_getUserInfo($user)) !== false) { + msg($this->getLang('userexists'), -1); return false; // user already exists } @@ -235,7 +236,13 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $rc = $this->_addUser($user, $pwd, $name, $mail, $grps); $this->_unlockTables(); $this->_closeDB(); - if($rc) return true; + if(!$rc) { + msg($this->getLang('writefail')); + return null; + } + return true; + } else { + msg($this->getLang('connectfail'), -1); } return null; // return error } @@ -279,7 +286,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $rc = $this->_updateUserInfo($user, $changes); - if($rc && isset($changes['grps']) && $this->cando['modGroups']) { + if(!$rc) { + msg($this->getLang('usernotexists'), -1); + } elseif(isset($changes['grps']) && $this->cando['modGroups']) { $groups = $this->_getGroups($user); $grpadd = array_diff($changes['grps'], $groups); $grpdel = array_diff($groups, $changes['grps']); @@ -295,10 +304,14 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $rc = false; } } + + if(!$rc) msg($this->getLang('writefail')); } $this->_unlockTables(); $this->_closeDB(); + } else { + msg($this->getLang('connectfail'), -1); } return $rc; } @@ -328,6 +341,8 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $this->_unlockTables(); } $this->_closeDB(); + } else { + msg($this->getLang('connectfail'), -1); } return $count; } diff --git a/lib/plugins/authmysql/lang/en/lang.php b/lib/plugins/authmysql/lang/en/lang.php new file mode 100644 index 000000000..8313616c6 --- /dev/null +++ b/lib/plugins/authmysql/lang/en/lang.php @@ -0,0 +1,13 @@ + Date: Thu, 7 May 2015 01:43:32 -0400 Subject: Fix scrutinizer issues with auth --- lib/plugins/auth.php | 2 +- lib/plugins/authldap/lang/en/lang.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index 4799b3a38..036cb0d77 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -295,7 +295,7 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { */ public function deleteUsers($users) { msg("authorisation method does not allow deleting of users", -1); - return false; + return 0; } /** diff --git a/lib/plugins/authldap/lang/en/lang.php b/lib/plugins/authldap/lang/en/lang.php index db06efb4c..8185a84fa 100644 --- a/lib/plugins/authldap/lang/en/lang.php +++ b/lib/plugins/authldap/lang/en/lang.php @@ -6,6 +6,6 @@ */ $lang['connectfail'] = 'LDAP cannot connect: %s'; -$lang['domainfail' = 'LDAP cannot find your user dn'; +$lang['domainfail'] = 'LDAP cannot find your user dn'; //Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From 95e3f389247c53b580d3dc59b26d4bf89ef6ae3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerry=20Wei=C3=9Fbach?= Date: Thu, 7 May 2015 11:29:07 +0200 Subject: Change ID name --- lib/plugins/extension/script.js | 1 + lib/plugins/extension/style.less | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index 1a0af4e0d..ddd668a76 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -115,6 +115,7 @@ jQuery(function(){ */ if ( $extmgr.find('.tabs li:first-child, .tabs li:nth-child(2)').hasClass('active') ) { var $displayOpts = jQuery('

    ', { id: 'viewoptions'} ).appendTo($extmgr.find( '.panelHeader' )); + var $displayOpts = jQuery('

    ', { id: 'extension__viewoptions'} ).appendTo($extmgr.find( '.panelHeader' )); $displayOpts.append(LANG.plugins.extension.display_viewoptions); diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index fe15da16a..baeb40db1 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -371,6 +371,6 @@ width: 60%; } -#viewoptions label { +#extension__viewoptions label { margin-left: 1em; } -- cgit v1.2.3 From c594265e447bf705dae05f5e59560ea4c3afea0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerry=20Wei=C3=9Fbach?= Date: Thu, 7 May 2015 11:30:00 +0200 Subject: Add class name using tab name --- lib/plugins/extension/helper/gui.php | 4 ++-- lib/plugins/extension/script.js | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 3a0f0c589..4ec6fec85 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -144,11 +144,11 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { foreach($this->tabs as $tab) { $url = $this->tabURL($tab); if($this->currentTab() == $tab) { - $class = 'class="active"'; + $class = ' active'; } else { $class = ''; } - echo '

  • '.$this->getLang('tab_'.$tab).'
  • '; + echo '
  • '.$this->getLang('tab_'.$tab).'
  • '; } echo '
'; } diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index ddd668a76..bc1bf8b12 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -113,8 +113,7 @@ jQuery(function(){ /** Create section for enabling/disabling viewing options */ - if ( $extmgr.find('.tabs li:first-child, .tabs li:nth-child(2)').hasClass('active') ) { - var $displayOpts = jQuery('

', { id: 'viewoptions'} ).appendTo($extmgr.find( '.panelHeader' )); + if ( $extmgr.find('.plugins, .templates').hasClass('active') ) { var $displayOpts = jQuery('

', { id: 'extension__viewoptions'} ).appendTo($extmgr.find( '.panelHeader' )); $displayOpts.append(LANG.plugins.extension.display_viewoptions); -- cgit v1.2.3 From c9a3a44ccbcf2ff1ed427df5f6911a1028989e43 Mon Sep 17 00:00:00 2001 From: Danny Buckhof Date: Thu, 7 May 2015 14:45:55 +0200 Subject: translation update --- lib/plugins/authad/lang/no/lang.php | 3 +++ lib/plugins/authad/lang/no/settings.php | 3 +++ lib/plugins/revert/lang/no/lang.php | 1 + 3 files changed, 7 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/no/lang.php b/lib/plugins/authad/lang/no/lang.php index f8dbb0b08..b497c4719 100644 --- a/lib/plugins/authad/lang/no/lang.php +++ b/lib/plugins/authad/lang/no/lang.php @@ -5,6 +5,9 @@ * * @author Patrick * @author Thomas Juberg + * @author Danny Buckhof */ $lang['domain'] = 'Loggpå-domene'; $lang['authpwdexpire'] = 'Ditt passord går ut om %d dager, du bør endre det snarest.'; +$lang['passchangefail'] = 'Feil ved endring av passord. Det kan være at passordet ikke er i tråd med passordpolicyen '; +$lang['connectfail'] = 'Feil ved kontakt med Active Directory serveren.'; diff --git a/lib/plugins/authad/lang/no/settings.php b/lib/plugins/authad/lang/no/settings.php index f309ead50..727f6611d 100644 --- a/lib/plugins/authad/lang/no/settings.php +++ b/lib/plugins/authad/lang/no/settings.php @@ -5,7 +5,10 @@ * * @author Christopher Schive * @author Patrick + * @author Danny Buckhof */ $lang['account_suffix'] = 'Ditt konto-suffiks F. Eks. @my.domain.org'; $lang['admin_password'] = 'Passordet til brukeren over.'; +$lang['use_ssl'] = 'Bruk SSL tilknytning? Hvis denne brukes, ikke aktiver TLS nedenfor.'; +$lang['use_tls'] = 'Bruk TLS tilknytning? Hvis denne brukes, ikke aktiver SSL over.'; $lang['expirywarn'] = 'Antall dager på forhånd brukeren varsles om at passordet utgår. 0 for å deaktivere.'; diff --git a/lib/plugins/revert/lang/no/lang.php b/lib/plugins/revert/lang/no/lang.php index 76da8ca9c..d5307c7ca 100644 --- a/lib/plugins/revert/lang/no/lang.php +++ b/lib/plugins/revert/lang/no/lang.php @@ -20,6 +20,7 @@ * @author Boris * @author Christopher Schive * @author Patrick + * @author Danny Buckhof */ $lang['menu'] = 'Tilbakestillingsbehandler'; $lang['filter'] = 'Søk etter søppelmeldinger'; -- cgit v1.2.3 From 699e3c4900f2d6cc860a3587a05798cd23b7944d Mon Sep 17 00:00:00 2001 From: Patrick Brown Date: Thu, 7 May 2015 14:27:00 -0400 Subject: Use io_replaceInFile for updating auth --- lib/plugins/acl/admin.php | 11 ++--------- lib/plugins/authplain/auth.php | 11 +++-------- 2 files changed, 5 insertions(+), 17 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 814bbfe9c..2dfdbbda5 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -682,7 +682,6 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { */ function _acl_add($acl_scope, $acl_user, $acl_level){ global $config_cascade; - $acl_config = file_get_contents($config_cascade['acl']['default']); $acl_user = auth_nameencode($acl_user,true); // max level for pagenames is edit @@ -692,9 +691,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $new_acl = "$acl_scope\t$acl_user\t$acl_level\n"; - $new_config = $acl_config.$new_acl; - - return io_saveFile($config_cascade['acl']['default'], $new_config); + return io_saveFile($config_cascade['acl']['default'], $new_config, true); } /** @@ -704,15 +701,11 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { */ function _acl_del($acl_scope, $acl_user){ global $config_cascade; - $acl_config = file($config_cascade['acl']['default']); $acl_user = auth_nameencode($acl_user,true); $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); - - return io_saveFile($config_cascade['acl']['default'], join('',$new_config)); + return io_deleteFromFile($config_cascade['acl']['default'], "/$acl_pattern/", true); } /** diff --git a/lib/plugins/authplain/auth.php b/lib/plugins/authplain/auth.php index b31c02fc8..35cf7a802 100644 --- a/lib/plugins/authplain/auth.php +++ b/lib/plugins/authplain/auth.php @@ -185,14 +185,9 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { $userline = $this->_createUserLine($newuser, $userinfo['pass'], $userinfo['name'], $userinfo['mail'], $userinfo['grps']); - if(!$this->deleteUsers(array($user))) { - msg('Unable to modify user data. Please inform the Wiki-Admin', -1); - return false; - } - - if(!io_saveFile($config_cascade['plainauth.users']['default'], $userline, true)) { - msg('There was an error modifying your user data. You should register again.', -1); - // FIXME, user has been deleted but not recreated, should force a logout and redirect to login page + if(!io_replaceInFile($config_cascade['plainauth.users']['default'], '/^'.$user.':/', $userline, true)) { + msg('There was an error modifying your user data. You may need to register again.', -1); + // FIXME, io functions should be fail-safe so existing data isn't lost $ACT = 'register'; return false; } -- cgit v1.2.3 From 526e5abda6d7ab051bb2819eaffbe81af04e6c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerry=20Wei=C3=9Fbach?= Date: Fri, 8 May 2015 13:15:31 +0200 Subject: Adhere to CSS style guide --- lib/plugins/extension/style.less | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index baeb40db1..38b2d65d0 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -282,11 +282,14 @@ */ #extension__list { - .enabled, .disabled, .updatable { + .enabled, .disabled, + .updatable { display: none; } - &.enabled .enabled, &.disabled .disabled, &.updatable .updatable { + &.enabled .enabled, + &.disabled .disabled, + &.updatable .updatable { display: block; } -- cgit v1.2.3 From 2b71c2eece46d1e977fa596ed57b74e04a9aaf6b Mon Sep 17 00:00:00 2001 From: Patrick Brown Date: Fri, 8 May 2015 17:57:02 -0400 Subject: Fix variable name typo --- lib/plugins/acl/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 2dfdbbda5..cdd96be56 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -691,7 +691,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $new_acl = "$acl_scope\t$acl_user\t$acl_level\n"; - return io_saveFile($config_cascade['acl']['default'], $new_config, true); + return io_saveFile($config_cascade['acl']['default'], $new_acl, true); } /** -- cgit v1.2.3 From c99a571951a32b7b0499cf969fd5e874ad354ff3 Mon Sep 17 00:00:00 2001 From: Pietroni Date: Wed, 13 May 2015 17:31:08 +0200 Subject: translation update --- lib/plugins/authad/lang/fr/lang.php | 3 +++ lib/plugins/authldap/lang/fr/lang.php | 9 +++++++++ lib/plugins/authmysql/lang/fr/lang.php | 11 +++++++++++ 3 files changed, 23 insertions(+) create mode 100644 lib/plugins/authldap/lang/fr/lang.php create mode 100644 lib/plugins/authmysql/lang/fr/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/fr/lang.php b/lib/plugins/authad/lang/fr/lang.php index 4999967dc..8b3b95b54 100644 --- a/lib/plugins/authad/lang/fr/lang.php +++ b/lib/plugins/authad/lang/fr/lang.php @@ -5,6 +5,9 @@ * * @author ggallon * @author Yannick Aure + * @author Pietroni */ $lang['domain'] = 'Domaine de connexion'; $lang['authpwdexpire'] = 'Votre mot de passe expirera dans %d jours, vous devriez le changer bientôt.'; +$lang['passchangefail'] = 'Impossible de changer le mot de passe. Il est possible que les règles de sécurité des mots de passe n\'aient pas été respectées.'; +$lang['connectfail'] = 'Impossible de se connecter au serveur Active Directory.'; diff --git a/lib/plugins/authldap/lang/fr/lang.php b/lib/plugins/authldap/lang/fr/lang.php new file mode 100644 index 000000000..5797bda42 --- /dev/null +++ b/lib/plugins/authldap/lang/fr/lang.php @@ -0,0 +1,9 @@ + + */ +$lang['connectfail'] = 'LDAP ne peux se connecter : %s'; +$lang['domainfail'] = 'LDAP ne trouve pas l\'utilisateur dn'; diff --git a/lib/plugins/authmysql/lang/fr/lang.php b/lib/plugins/authmysql/lang/fr/lang.php new file mode 100644 index 000000000..d5a1e1209 --- /dev/null +++ b/lib/plugins/authmysql/lang/fr/lang.php @@ -0,0 +1,11 @@ + + */ +$lang['connectfail'] = 'Impossible de se connecter à la base de données.'; +$lang['userexists'] = 'Désolé, un utilisateur avec cet identifiant existe déjà.'; +$lang['usernotexists'] = 'Désolé, cet utilisateur n\'existe pas.'; +$lang['writefail'] = 'Impossible de modifier les données utilisateur. Veuillez en informer l\'administrateur du Wiki.'; -- cgit v1.2.3 From dfd8384e1bf3b38ff9f6f077905b4270aef0b020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20D=C3=ADaz?= Date: Thu, 14 May 2015 14:05:56 +0200 Subject: translation update --- lib/plugins/acl/lang/ca/lang.php | 4 ++-- lib/plugins/popularity/lang/ca/lang.php | 5 +++-- lib/plugins/revert/lang/ca/lang.php | 5 +++-- lib/plugins/usermanager/lang/ca/lang.php | 5 +++-- 4 files changed, 11 insertions(+), 8 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/lang/ca/lang.php b/lib/plugins/acl/lang/ca/lang.php index bead981f0..18a4a3602 100644 --- a/lib/plugins/acl/lang/ca/lang.php +++ b/lib/plugins/acl/lang/ca/lang.php @@ -1,8 +1,8 @@ * @author Carles Bellver * @author carles.bellver@gmail.com diff --git a/lib/plugins/popularity/lang/ca/lang.php b/lib/plugins/popularity/lang/ca/lang.php index b30846118..9eb1655d2 100644 --- a/lib/plugins/popularity/lang/ca/lang.php +++ b/lib/plugins/popularity/lang/ca/lang.php @@ -1,7 +1,8 @@ * @author Carles Bellver * @author carles.bellver@cent.uji.es diff --git a/lib/plugins/revert/lang/ca/lang.php b/lib/plugins/revert/lang/ca/lang.php index 4f4d518ea..e2755f8d3 100644 --- a/lib/plugins/revert/lang/ca/lang.php +++ b/lib/plugins/revert/lang/ca/lang.php @@ -1,7 +1,8 @@ * @author carles.bellver@gmail.com * @author carles.bellver@cent.uji.es diff --git a/lib/plugins/usermanager/lang/ca/lang.php b/lib/plugins/usermanager/lang/ca/lang.php index 6debd73ca..4b07326ab 100644 --- a/lib/plugins/usermanager/lang/ca/lang.php +++ b/lib/plugins/usermanager/lang/ca/lang.php @@ -1,7 +1,8 @@ * @author carles.bellver@gmail.com * @author carles.bellver@cent.uji.es -- cgit v1.2.3 From 1e8a4c188b45c2566c27caaf30e7e952e2337bb6 Mon Sep 17 00:00:00 2001 From: Menashe Tomer Date: Thu, 14 May 2015 14:50:51 +0200 Subject: translation update --- lib/plugins/authldap/lang/he/settings.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/he/settings.php b/lib/plugins/authldap/lang/he/settings.php index 357a58c56..10af7010d 100644 --- a/lib/plugins/authldap/lang/he/settings.php +++ b/lib/plugins/authldap/lang/he/settings.php @@ -4,5 +4,9 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author matt carroll + * @author Menashe Tomer */ $lang['starttls'] = 'השתמש בחיבורי TLS'; +$lang['modPass'] = 'האם dokuwiki יכול ליצור סיסמאות LDAP?'; +$lang['debug'] = 'הצג מידע נוסף על שגיאות'; +$lang['referrals_o_-1'] = 'ברירת מחדל'; -- cgit v1.2.3 From d596b86466164e7110a8a9a318048c8feb16ec7f Mon Sep 17 00:00:00 2001 From: Menashe Tomer Date: Thu, 14 May 2015 14:56:16 +0200 Subject: translation update --- lib/plugins/authad/lang/he/lang.php | 2 ++ lib/plugins/authad/lang/he/settings.php | 8 ++++++++ lib/plugins/authmysql/lang/he/settings.php | 12 ++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 lib/plugins/authad/lang/he/settings.php create mode 100644 lib/plugins/authmysql/lang/he/settings.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/he/lang.php b/lib/plugins/authad/lang/he/lang.php index 21fd98aef..616d1ab4b 100644 --- a/lib/plugins/authad/lang/he/lang.php +++ b/lib/plugins/authad/lang/he/lang.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author tomer + * @author Menashe Tomer */ $lang['authpwdexpire'] = 'הסיסמה שלך תפוג ב% d ימים, אתה צריך לשנות את זה בקרוב.'; +$lang['passchangefail'] = 'שגיאה בשינוי סיסמה. האם הסיסמה תואמת למדיניות המערכת?'; diff --git a/lib/plugins/authad/lang/he/settings.php b/lib/plugins/authad/lang/he/settings.php new file mode 100644 index 000000000..b14368130 --- /dev/null +++ b/lib/plugins/authad/lang/he/settings.php @@ -0,0 +1,8 @@ + + */ +$lang['admin_password'] = 'סיסמת המשתמש המוזכן'; diff --git a/lib/plugins/authmysql/lang/he/settings.php b/lib/plugins/authmysql/lang/he/settings.php new file mode 100644 index 000000000..3671b1bb9 --- /dev/null +++ b/lib/plugins/authmysql/lang/he/settings.php @@ -0,0 +1,12 @@ + + */ +$lang['getUserID'] = 'שאילתת SQL לקבלת מפתח ראשי של המשתמש'; +$lang['UpdateLogin'] = 'שאילתת SQL לעדכון שם המשתמש'; +$lang['UpdatePass'] = 'שאילתת SQL לעדכון סיסמת המשתמש'; +$lang['UpdateEmail'] = 'שאילתת SQL לעדכון כתובת הדוא"ל של המשתמש'; +$lang['UpdateName'] = 'שאילתת SQL לעדכון שם המשתמש'; -- cgit v1.2.3 From 9c9643569e11748094bd63810a3d805df0d3e9bf Mon Sep 17 00:00:00 2001 From: Davor Turkalj Date: Thu, 14 May 2015 15:51:29 +0200 Subject: translation update --- lib/plugins/authad/lang/hr/lang.php | 2 ++ lib/plugins/authldap/lang/hr/lang.php | 9 +++++++++ lib/plugins/authldap/lang/hr/settings.php | 5 +++++ lib/plugins/authmysql/lang/hr/lang.php | 11 +++++++++++ lib/plugins/extension/lang/hr/intro_install.txt | 2 +- lib/plugins/extension/lang/hr/intro_plugins.txt | 2 +- lib/plugins/extension/lang/hr/intro_search.txt | 2 +- lib/plugins/extension/lang/hr/intro_templates.txt | 2 +- 8 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 lib/plugins/authldap/lang/hr/lang.php create mode 100644 lib/plugins/authmysql/lang/hr/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/hr/lang.php b/lib/plugins/authad/lang/hr/lang.php index 8652c69ed..99c5c1623 100644 --- a/lib/plugins/authad/lang/hr/lang.php +++ b/lib/plugins/authad/lang/hr/lang.php @@ -7,3 +7,5 @@ */ $lang['domain'] = 'Domena za prijavu'; $lang['authpwdexpire'] = 'Vaša lozinka će isteći za %d dana, trebate ju promijeniti.'; +$lang['passchangefail'] = 'Ne mogu izmijeniti lozinku. Možda nije zadovoljen set pravila za lozinke?'; +$lang['connectfail'] = 'Ne mogu se povezati s Active Directory poslužiteljem.'; diff --git a/lib/plugins/authldap/lang/hr/lang.php b/lib/plugins/authldap/lang/hr/lang.php new file mode 100644 index 000000000..5e13d1b05 --- /dev/null +++ b/lib/plugins/authldap/lang/hr/lang.php @@ -0,0 +1,9 @@ + + */ +$lang['connectfail'] = 'LDAP se ne može spojiti: %s'; +$lang['domainfail'] = 'LDAP ne može pronaći Vaš korisnički dn'; diff --git a/lib/plugins/authldap/lang/hr/settings.php b/lib/plugins/authldap/lang/hr/settings.php index cb8df7218..5c306d84b 100644 --- a/lib/plugins/authldap/lang/hr/settings.php +++ b/lib/plugins/authldap/lang/hr/settings.php @@ -19,9 +19,14 @@ $lang['binddn'] = 'DN opcionalnog korisnika ako anonimni korisnik $lang['bindpw'] = 'Lozinka gore navedenog korisnika'; $lang['userscope'] = 'Ograniči područje za pretragu korisnika'; $lang['groupscope'] = 'Ograniči područje za pretragu grupa'; +$lang['userkey'] = 'Atribut označava ime; mora biti u skladu s korisničkim filterom.'; $lang['groupkey'] = 'Članstvo grupa iz svih atributa korisnika (umjesto standardnih AD grupa) npr. grupa iz odjela ili telefonskog broja'; +$lang['modPass'] = 'Da li LDAP lozinka može biti izmijenjena kroz dokuwiki?'; $lang['debug'] = 'Prikaži dodatne informacije u slučaju greške'; $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'; +$lang['referrals_o_-1'] = 'koristi podrazumijevano'; +$lang['referrals_o_0'] = 'ne slijedi preporuke'; +$lang['referrals_o_1'] = 'slijedi preporuke'; diff --git a/lib/plugins/authmysql/lang/hr/lang.php b/lib/plugins/authmysql/lang/hr/lang.php new file mode 100644 index 000000000..3f5dc5d60 --- /dev/null +++ b/lib/plugins/authmysql/lang/hr/lang.php @@ -0,0 +1,11 @@ + + */ +$lang['connectfail'] = 'Ne mogu se spojiti na bazu.'; +$lang['userexists'] = 'Oprostite ali korisnik s ovom prijavom već postoji.'; +$lang['usernotexists'] = 'Oprostite ali ovaj korisnik ne postoji.'; +$lang['writefail'] = 'Ne mogu izmijeniti podatke. Molim obavijestite Wiki administratora'; diff --git a/lib/plugins/extension/lang/hr/intro_install.txt b/lib/plugins/extension/lang/hr/intro_install.txt index fc2d22f52..f3274b0f7 100644 --- a/lib/plugins/extension/lang/hr/intro_install.txt +++ b/lib/plugins/extension/lang/hr/intro_install.txt @@ -1 +1 @@ -Ovdje možete ručno instalirati dodatak (plugin) i predložak (template) bilo učitavanjem ili specificiranjem URL-a za direktno učitavanje. \ No newline at end of file +Ovdje možete ručno postaviti dodatak (plugin) i predložak (template) bilo učitavanjem ili navođenjem URL adrese za direktno učitavanje. \ No newline at end of file diff --git a/lib/plugins/extension/lang/hr/intro_plugins.txt b/lib/plugins/extension/lang/hr/intro_plugins.txt index fdc629d62..0c458ee43 100644 --- a/lib/plugins/extension/lang/hr/intro_plugins.txt +++ b/lib/plugins/extension/lang/hr/intro_plugins.txt @@ -1 +1 @@ -Ovo su dodaci (plugin) trenutno instalirani na Vašem DokuWiku-u. Možete ih omogućiti, onemogućiti ili u potpunosti deinstalirati. Nadogradnje dodataka su također prikazane, obavezno pročitajte dokumentaciju dodatka prije nadogradnje. \ No newline at end of file +Ovo su dodaci (plugin) trenutno postavljeni na Vašem DokuWiku-u. Možete ih omogućiti, onemogućiti ili u potpunosti ukloniti. Nadogradnje dodataka su također prikazane, obavezno pročitajte dokumentaciju dodatka prije nadogradnje. \ No newline at end of file diff --git a/lib/plugins/extension/lang/hr/intro_search.txt b/lib/plugins/extension/lang/hr/intro_search.txt index 93bf4b000..405690581 100644 --- a/lib/plugins/extension/lang/hr/intro_search.txt +++ b/lib/plugins/extension/lang/hr/intro_search.txt @@ -1 +1 @@ -Ovaj tab vam pruža pristup dostupnim dodatcima i predlošcima za DokuWiki od treće strane. Molimo budite svjesni da instaliranje koda od treće strane može biti **sigurnosni rizik**, možda želite prvo pročitati o [[doku>security#plugin_security|sigurnosti dodataka]]. \ No newline at end of file +Ovdje možete potražiti i druge dostupne dodatke i predloške za DokuWiki. Molimo budite svjesni da postavljanje koda razvijenog od treće strane može biti **sigurnosni rizik**, možda želite prvo pročitati o [[doku>security#plugin_security|sigurnosti dodataka]]. \ No newline at end of file diff --git a/lib/plugins/extension/lang/hr/intro_templates.txt b/lib/plugins/extension/lang/hr/intro_templates.txt index 968906cf9..76dafe6b7 100644 --- a/lib/plugins/extension/lang/hr/intro_templates.txt +++ b/lib/plugins/extension/lang/hr/intro_templates.txt @@ -1 +1 @@ -Ovo su predlošci trenutno instalirani na Vašem DokuWiki-u. Možete odabrati koji se predložak koristi na [[?do=admin&page=config|Upravitelju postavki]]. \ No newline at end of file +Ovo su predlošci trenutno postavljeni na Vašem DokuWiki-u. Koji se predložak koristi možete odabrati na [[?do=admin&page=config|Upravitelju postavki]]. \ No newline at end of file -- cgit v1.2.3 From 605f8e8d0e501057749c50581087ce05089c1af3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 15 May 2015 15:17:39 +0200 Subject: added composer setup and the first composer package php-archive --- lib/plugins/extension/helper/extension.php | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 6c0946b09..d089245b5 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -1035,33 +1035,24 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $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 = new \splitbrain\PHPArchive\Tar(); + $tar->open($file); $tar->extract($target); - } catch (Exception $e) { + } catch (\splitbrain\PHPArchive\ArchiveIOException $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'); + try { + $zip = new \splitbrain\PHPArchive\Zip(); + $zip->open($file); + $zip->extract($target); + } catch (\splitbrain\PHPArchive\ArchiveIOException $e) { + throw new Exception($this->getLang('error_decompress').' '.$e->getMessage()); } return true; -- cgit v1.2.3 From 26e22ab837dcabe137a0912fcd2f96d0c35f48c8 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Fri, 15 May 2015 19:03:34 +0200 Subject: Changes for PHP 7 Compatibility - replace PHP4 style class constructor function names (based on class name) with php 5 __construct() Also remove some '&' reference operators used with objects And add some object type hints --- lib/plugins/config/settings/config.class.php | 4 ++-- lib/plugins/config/settings/extra.class.php | 2 +- lib/plugins/popularity/action.php | 2 +- lib/plugins/popularity/admin.php | 2 +- lib/plugins/popularity/helper.php | 2 +- lib/plugins/usermanager/admin.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 316cc2c59..f2d43bff6 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -37,7 +37,7 @@ if (!class_exists('configuration')) { * * @param string $datafile path to config metadata file */ - public function configuration($datafile) { + public function __construct($datafile) { global $conf, $config_cascade; if (!file_exists($datafile)) { @@ -434,7 +434,7 @@ if (!class_exists('setting')) { * @param string $key * @param array|null $params array with metadata of setting */ - public function setting($key, $params=null) { + public function __construct($key, $params=null) { $this->_key = $key; if (is_array($params)) { diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index fd3a90e28..c6a3f9dae 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -20,7 +20,7 @@ if (!class_exists('setting_sepchar')) { for ($i=0;$i_choices[] = $str{$i}; // call foundation class constructor - $this->setting($key,$param); + parent::__construct($key,$param); } } } diff --git a/lib/plugins/popularity/action.php b/lib/plugins/popularity/action.php index 9e2e78d11..d5ec0f5c5 100644 --- a/lib/plugins/popularity/action.php +++ b/lib/plugins/popularity/action.php @@ -15,7 +15,7 @@ class action_plugin_popularity extends Dokuwiki_Action_Plugin { */ var $helper; - function action_plugin_popularity(){ + function __construct(){ $this->helper = $this->loadHelper('popularity', false); } diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php index ab569b8b4..a2c3c6c8b 100644 --- a/lib/plugins/popularity/admin.php +++ b/lib/plugins/popularity/admin.php @@ -20,7 +20,7 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { var $helper; var $sentStatus = null; - function admin_plugin_popularity(){ + function __construct(){ $this->helper = $this->loadHelper('popularity', false); } diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index 8673fb5af..e99f6a60c 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -30,7 +30,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { var $popularityLastSubmitFile; - function helper_plugin_popularity(){ + function __construct(){ global $conf; $this->autosubmitFile = $conf['cachedir'].'/autosubmit.txt'; $this->autosubmitErrorFile = $conf['cachedir'].'/autosubmitError.txt'; diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 9cb9b0c40..0d92e5cc1 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -36,7 +36,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * Constructor */ - public function admin_plugin_usermanager(){ + public function __construct(){ /** @var DokuWiki_Auth_Plugin $auth */ global $auth; -- cgit v1.2.3 From 144055c8fa7b544201172cc89abf15f8c443e6e9 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 16 May 2015 15:12:06 +0200 Subject: PHPDocs --- lib/plugins/action.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/action.php b/lib/plugins/action.php index 4b5eef60a..23d94a509 100644 --- a/lib/plugins/action.php +++ b/lib/plugins/action.php @@ -16,6 +16,8 @@ class DokuWiki_Action_Plugin extends DokuWiki_Plugin { /** * Registers a callback function for a given event + * + * @param Doku_Event_Handler $controller */ public function register(Doku_Event_Handler $controller) { trigger_error('register() not implemented in '.get_class($this), E_USER_WARNING); -- cgit v1.2.3 From 6ea007c9f8c6830ea4f21ad880e91279e2f4bf10 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 16 May 2015 18:40:21 +0200 Subject: a first very basic implementation of the preview mechanism --- lib/plugins/styler/.travis.yml | 13 +++++ lib/plugins/styler/README | 27 ++++++++++ lib/plugins/styler/_test/general.test.php | 33 ++++++++++++ lib/plugins/styler/action.php | 84 +++++++++++++++++++++++++++++++ lib/plugins/styler/admin.php | 74 +++++++++++++++++++++++++++ lib/plugins/styler/lang/en/lang.php | 16 ++++++ lib/plugins/styler/plugin.info.txt | 7 +++ lib/plugins/styler/script.js | 40 +++++++++++++++ 8 files changed, 294 insertions(+) create mode 100644 lib/plugins/styler/.travis.yml create mode 100644 lib/plugins/styler/README create mode 100644 lib/plugins/styler/_test/general.test.php create mode 100644 lib/plugins/styler/action.php create mode 100644 lib/plugins/styler/admin.php create mode 100644 lib/plugins/styler/lang/en/lang.php create mode 100644 lib/plugins/styler/plugin.info.txt create mode 100644 lib/plugins/styler/script.js (limited to 'lib/plugins') diff --git a/lib/plugins/styler/.travis.yml b/lib/plugins/styler/.travis.yml new file mode 100644 index 000000000..d80c0691f --- /dev/null +++ b/lib/plugins/styler/.travis.yml @@ -0,0 +1,13 @@ +# Config file for travis-ci.org + +language: php +php: + - "5.5" + - "5.4" + - "5.3" +env: + - DOKUWIKI=master + - DOKUWIKI=stable +before_install: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh +install: sh travis.sh +script: cd _test && phpunit --stderr --group plugin_styler \ No newline at end of file diff --git a/lib/plugins/styler/README b/lib/plugins/styler/README new file mode 100644 index 000000000..37a966352 --- /dev/null +++ b/lib/plugins/styler/README @@ -0,0 +1,27 @@ +styler Plugin for DokuWiki + +Allows to edit style.ini replacements + +All documentation for this plugin can be found at +https://www.dokuwiki.org/plugin:styler + +If you install this plugin manually, make sure it is installed in +lib/plugins/styler/ - if the folder is called different it +will not work! + +Please refer to http://www.dokuwiki.org/plugins for additional info +on how to install plugins in DokuWiki. + +---- +Copyright (C) Andreas Gohr + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License + +This program 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 General Public License for more details. + +See the COPYING file in your DokuWiki folder for details diff --git a/lib/plugins/styler/_test/general.test.php b/lib/plugins/styler/_test/general.test.php new file mode 100644 index 000000000..8b0712a20 --- /dev/null +++ b/lib/plugins/styler/_test/general.test.php @@ -0,0 +1,33 @@ +assertFileExists($file); + + $info = confToHash($file); + + $this->assertArrayHasKey('base', $info); + $this->assertArrayHasKey('author', $info); + $this->assertArrayHasKey('email', $info); + $this->assertArrayHasKey('date', $info); + $this->assertArrayHasKey('name', $info); + $this->assertArrayHasKey('desc', $info); + $this->assertArrayHasKey('url', $info); + + $this->assertEquals('styler', $info['base']); + $this->assertRegExp('/^https?:\/\//', $info['url']); + $this->assertTrue(mail_isvalid($info['email'])); + $this->assertRegExp('/^\d\d\d\d-\d\d-\d\d$/', $info['date']); + $this->assertTrue(false !== strtotime($info['date'])); + } +} diff --git a/lib/plugins/styler/action.php b/lib/plugins/styler/action.php new file mode 100644 index 000000000..648190a2a --- /dev/null +++ b/lib/plugins/styler/action.php @@ -0,0 +1,84 @@ + + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +class action_plugin_styler 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'); + $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_action'); + + } + + /** + * [Custom event handler which performs action] + * + * @param Doku_Event $event event object by reference + * @param mixed $param [the parameters passed as fifth argument to register_hook() when this + * handler was registered] + * @return void + */ + public function handle_action(Doku_Event &$event, $param) { + $event->data = act_clean($event->data); + if($event->data === 'styler_plugin_preview') { + msg('handle') ; + $event->data = 'show'; + $this->preview(); + } elseif ($event->data === 'styler_plugin_save') { + $event->data = 'show'; + } + } + + protected function preview(){ + global $conf; + $ini = $conf['cachedir'].'/preview.ini'; + io_saveFile($ini, $this->makeini()); + } + + protected function makeini() { + global $INPUT; + + $ini = "[replacements]\n"; + foreach($INPUT->arr('tpl') as $key => $val) { + $ini .= $key .' = "'.addslashes($val).'"'."\n"; + } + + return $ini; + } + + /** + * [Custom event handler which performs action] + * + * @param Doku_Event $event event object by reference + * @param mixed $param [the parameters passed as fifth argument to register_hook() when this + * handler was registered] + * @return void + */ + + public function handle_ajax(Doku_Event &$event, $param) { + if($event->data != 'plugin_styler') return; + $event->preventDefault(); + $event->stopPropagation(); + + /** @var admin_plugin_styler $hlp */ + $hlp = plugin_load('admin', 'styler'); + $hlp->html(); + } + +} + +// vim:ts=4:sw=4:et: diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php new file mode 100644 index 000000000..8ecbd22a0 --- /dev/null +++ b/lib/plugins/styler/admin.php @@ -0,0 +1,74 @@ + + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +class admin_plugin_styler extends DokuWiki_Admin_Plugin { + + /** + * @return int sort number in admin menu + */ + public function getMenuSort() { + return 1000; + } + + /** + * @return bool true if only access for superuser, false is for superusers and moderators + */ + public function forAdminOnly() { + return true; + } + + /** + * Should carry out any processing required by the plugin. + */ + public function handle() { + set_doku_pref('styler_plugin', 1); + } + + /** + * Render HTML output, e.g. helpful text and a form + */ + public function html() { + global $conf; + $tpl = $conf['template']; + define('SIMPLE_TEST',1); // hack, ideally certain functions should be moved out of css.php + require_once(DOKU_INC.'lib/exe/css.php'); + $styleini = css_styleini($conf['template'], true); + $replacements = $styleini['replacements']; + + ptln('

'.$this->getLang('menu').'

'); + + if (empty($replacements)) { + echo '

Sorry, this template does not support this functionality.

'; + } else { + echo '

Intro blah... for the currently active template ("'.$tpl.'")... not all variables preview...

'; + + echo '
'; + echo '

Template variables

'; + echo ''; + foreach($replacements as $key => $value){ + echo ''; + echo ''; + echo ''; + } + echo '
'.$key.''; + echo '
'; + echo ''; + echo '
'; + } + + + + } + + +} + +// vim:ts=4:sw=4:et: \ No newline at end of file diff --git a/lib/plugins/styler/lang/en/lang.php b/lib/plugins/styler/lang/en/lang.php new file mode 100644 index 000000000..dfb472f11 --- /dev/null +++ b/lib/plugins/styler/lang/en/lang.php @@ -0,0 +1,16 @@ + + */ + +// menu entry for admin plugins +// $lang['menu'] = 'Your menu entry'; + +// custom language strings for the plugin +// $lang['fixme'] = 'FIXME'; + + + +//Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/styler/plugin.info.txt b/lib/plugins/styler/plugin.info.txt new file mode 100644 index 000000000..51f2f72f6 --- /dev/null +++ b/lib/plugins/styler/plugin.info.txt @@ -0,0 +1,7 @@ +base styler +author Andreas Gohr +email andi@splitbrain.org +date 2015-05-16 +name styler plugin +desc Allows to edit style.ini replacements +url https://www.dokuwiki.org/plugin:styler diff --git a/lib/plugins/styler/script.js b/lib/plugins/styler/script.js new file mode 100644 index 000000000..d09a8b8da --- /dev/null +++ b/lib/plugins/styler/script.js @@ -0,0 +1,40 @@ +jQuery(function () { + + + if (DokuCookie.getValue('styler_plugin') == 1) { + + + + // load dialog + var $dialog = jQuery(document.createElement('div')); + jQuery('body').append($dialog); + $dialog.load( + DOKU_BASE + '/lib/exe/ajax.php', + { + 'call': 'plugin_styler' + }, + function () { + // load the preview template + var now = new Date().getTime(); + var $style = jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); + $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); + + // open the dialog + $dialog.dialog({ + 'title': 'Template Variables', + 'width': 500, + 'top': 50, + 'position': { 'my': 'left top', 'at': 'left top', 'of': window }, + // bring everything back to normal + 'close': function (event, ui) { + // disable the styler plugin again + DokuCookie.setValue('styler_plugin', 0); + // reload + document.location.reload() + } + }); + } + ); + + } +}); \ No newline at end of file -- cgit v1.2.3 From 1f3b9c4577b0d0fa91c26b01caab84ab3f20e1e4 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sat, 16 May 2015 19:25:26 +0200 Subject: php7 compatibility: change revert plugin constructor to __construct --- lib/plugins/revert/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php index 88d8cd93d..b61615d00 100644 --- a/lib/plugins/revert/admin.php +++ b/lib/plugins/revert/admin.php @@ -16,7 +16,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { /** * Constructor */ - function admin_plugin_revert(){ + function __construct(){ $this->setupLocale(); } -- cgit v1.2.3 From 0f5e7090beb4c8b8e99aa87454c89b53ed11cc66 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 16 May 2015 19:27:43 +0200 Subject: we have working save and revert buttons --- lib/plugins/styler/action.php | 73 ++++++++++++++++++++++++++++++++++++++----- lib/plugins/styler/admin.php | 3 ++ 2 files changed, 69 insertions(+), 7 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styler/action.php b/lib/plugins/styler/action.php index 648190a2a..e2385e739 100644 --- a/lib/plugins/styler/action.php +++ b/lib/plugins/styler/action.php @@ -19,8 +19,8 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { */ public function register(Doku_Event_Handler $controller) { - $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle_ajax'); - $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_action'); + $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle_ajax'); + $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_action'); } @@ -35,31 +35,90 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { public function handle_action(Doku_Event &$event, $param) { $event->data = act_clean($event->data); if($event->data === 'styler_plugin_preview') { - msg('handle') ; $event->data = 'show'; $this->preview(); - } elseif ($event->data === 'styler_plugin_save') { + } elseif($event->data === 'styler_plugin_reset') { $event->data = 'show'; + $this->reset(); + } elseif($event->data === 'styler_plugin_revert') { + $event->data = 'show'; + $this->revert(); + } elseif($event->data === 'styler_plugin_save') { + $event->data = 'show'; + $this->save(); } } - protected function preview(){ + /** + * saves the preview.ini + */ + protected function preview() { global $conf; - $ini = $conf['cachedir'].'/preview.ini'; + $ini = $conf['cachedir'].'/preview.ini'; io_saveFile($ini, $this->makeini()); } + /** + * deletes the preview.ini + */ + protected function reset() { + global $conf; + $ini = $conf['cachedir'].'/preview.ini'; + io_saveFile($ini, ''); + } + + /** + * deletes the local style.ini replacements + */ + protected function revert() { + $this->replaceini(''); + $this->reset(); + } + + /** + * save the local style.ini replacements + */ + protected function save() { + $this->replaceini($this->makeini()); + $this->reset(); + } + + /** + * create the replacement part of a style.ini from submitted data + * + * @return string + */ protected function makeini() { global $INPUT; $ini = "[replacements]\n"; foreach($INPUT->arr('tpl') as $key => $val) { - $ini .= $key .' = "'.addslashes($val).'"'."\n"; + $ini .= $key.' = "'.addslashes($val).'"'."\n"; } return $ini; } + /** + * replaces the replacement parts in the local ini + * + * @param string $new the new ini contents + */ + protected function replaceini($new) { + global $conf; + $ini = DOKU_CONF."tpl/".$conf['template']."/style.ini"; + if(file_exists($ini)) { + $old = io_readFile($ini); + $old = preg_replace('/\[replacements\]\n.*?(\n\[.*]|$)/s', '\\1', $old); + $old = trim($old); + } else { + $old = ''; + } + + io_makeFileDir($ini); + io_saveFile($ini, "$old\n\n$new"); + } + /** * [Custom event handler which performs action] * diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php index 8ecbd22a0..323bf61ec 100644 --- a/lib/plugins/styler/admin.php +++ b/lib/plugins/styler/admin.php @@ -61,6 +61,9 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { } echo ''; echo ''; + echo ''; #FIXME only if preview.ini exists + echo ''; #FIXME only if local.ini exists + echo ''; echo ''; } -- cgit v1.2.3 From fb7685fb53589ebe099201297c0e8dbf20d89c59 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 16 May 2015 19:52:26 +0200 Subject: more improvements --- lib/plugins/styler/action.php | 50 ++++++++++++++++++++++++++----------------- lib/plugins/styler/admin.php | 16 ++++++++------ lib/plugins/styler/script.js | 11 +++++----- 3 files changed, 46 insertions(+), 31 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styler/action.php b/lib/plugins/styler/action.php index e2385e739..88e2d0912 100644 --- a/lib/plugins/styler/action.php +++ b/lib/plugins/styler/action.php @@ -9,6 +9,14 @@ // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); +/** + * Class action_plugin_styler + * + * This handles all the save actions and loading the interface + * + * All this usually would be done within an admin plugin, but we want to have this available outside + * the admin interface using our floating dialog. + */ class action_plugin_styler extends DokuWiki_Action_Plugin { /** @@ -18,10 +26,8 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { * @return void */ public function register(Doku_Event_Handler $controller) { - $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle_ajax'); $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_action'); - } /** @@ -33,6 +39,8 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { * @return void */ public function handle_action(Doku_Event &$event, $param) { + if(!auth_isadmin()) return; + $event->data = act_clean($event->data); if($event->data === 'styler_plugin_preview') { $event->data = 'show'; @@ -49,6 +57,26 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { } } + /** + * [Custom event handler which performs action] + * + * @param Doku_Event $event event object by reference + * @param mixed $param [the parameters passed as fifth argument to register_hook() when this + * handler was registered] + * @return void + */ + + public function handle_ajax(Doku_Event &$event, $param) { + if(!auth_isadmin()) return; + if($event->data != 'plugin_styler') return; + $event->preventDefault(); + $event->stopPropagation(); + + /** @var admin_plugin_styler $hlp */ + $hlp = plugin_load('admin', 'styler'); + $hlp->form(); + } + /** * saves the preview.ini */ @@ -119,24 +147,6 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { io_saveFile($ini, "$old\n\n$new"); } - /** - * [Custom event handler which performs action] - * - * @param Doku_Event $event event object by reference - * @param mixed $param [the parameters passed as fifth argument to register_hook() when this - * handler was registered] - * @return void - */ - - public function handle_ajax(Doku_Event &$event, $param) { - if($event->data != 'plugin_styler') return; - $event->preventDefault(); - $event->stopPropagation(); - - /** @var admin_plugin_styler $hlp */ - $hlp = plugin_load('admin', 'styler'); - $hlp->html(); - } } diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php index 323bf61ec..4be2153ab 100644 --- a/lib/plugins/styler/admin.php +++ b/lib/plugins/styler/admin.php @@ -29,13 +29,21 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { * Should carry out any processing required by the plugin. */ public function handle() { - set_doku_pref('styler_plugin', 1); } /** * Render HTML output, e.g. helpful text and a form */ public function html() { + echo '
'; + $this->form(); + echo '
'; + } + + /** + * Create the actual editing form + */ + public function form() { global $conf; $tpl = $conf['template']; define('SIMPLE_TEST',1); // hack, ideally certain functions should be moved out of css.php @@ -50,7 +58,7 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { } else { echo '

Intro blah... for the currently active template ("'.$tpl.'")... not all variables preview...

'; - echo '
'; + echo ''; echo '

Template variables

'; echo ''; foreach($replacements as $key => $value){ @@ -66,12 +74,8 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { echo ''; echo ''; } - - - } - } // vim:ts=4:sw=4:et: \ No newline at end of file diff --git a/lib/plugins/styler/script.js b/lib/plugins/styler/script.js index d09a8b8da..b3cadfd5e 100644 --- a/lib/plugins/styler/script.js +++ b/lib/plugins/styler/script.js @@ -1,10 +1,12 @@ jQuery(function () { + // user openend the admin page, set cookie and redirect + if(jQuery('#plugin__styler').length) { + DokuCookie.setValue('styler_plugin', 1); + document.location.href = DOKU_BASE; + } - + // The Styler Dialog is currently enabled, display it here and apply the preview styles if (DokuCookie.getValue('styler_plugin') == 1) { - - - // load dialog var $dialog = jQuery(document.createElement('div')); jQuery('body').append($dialog); @@ -35,6 +37,5 @@ jQuery(function () { }); } ); - } }); \ No newline at end of file -- cgit v1.2.3 From c175e043e167877c54c7823870ab7a75141b062e Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sat, 16 May 2015 19:57:56 +0200 Subject: __construct --- lib/plugins/config/settings/extra.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index c6a3f9dae..2445577d1 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -15,7 +15,7 @@ if (!class_exists('setting_sepchar')) { * @param string $key * @param array|null $param array with metadata of setting */ - function setting_sepchar($key,$param=null) { + function __construct($key,$param=null) { $str = '_-.'; for ($i=0;$i_choices[] = $str{$i}; -- cgit v1.2.3 From aae321f2598674fe5c509cdd2a07327249358938 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 May 2015 08:15:32 +0200 Subject: make styler plugin work without javascript as well (partly done) --- lib/plugins/styler/action.php | 94 ++++--------------------------------- lib/plugins/styler/admin.php | 106 +++++++++++++++++++++++++++++++++++++----- 2 files changed, 103 insertions(+), 97 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styler/action.php b/lib/plugins/styler/action.php index 88e2d0912..b7dd27cc4 100644 --- a/lib/plugins/styler/action.php +++ b/lib/plugins/styler/action.php @@ -28,6 +28,8 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { public function register(Doku_Event_Handler $controller) { $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle_ajax'); $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_action'); + + // FIXME load preview style when on admin page } /** @@ -40,21 +42,12 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { */ public function handle_action(Doku_Event &$event, $param) { if(!auth_isadmin()) return; + if($event->data != 'styler_plugin') return; + $event->data = 'show'; - $event->data = act_clean($event->data); - if($event->data === 'styler_plugin_preview') { - $event->data = 'show'; - $this->preview(); - } elseif($event->data === 'styler_plugin_reset') { - $event->data = 'show'; - $this->reset(); - } elseif($event->data === 'styler_plugin_revert') { - $event->data = 'show'; - $this->revert(); - } elseif($event->data === 'styler_plugin_save') { - $event->data = 'show'; - $this->save(); - } + /** @var admin_plugin_styler $hlp */ + $hlp = plugin_load('admin', 'styler'); + $hlp->handle(); } /** @@ -74,80 +67,9 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { /** @var admin_plugin_styler $hlp */ $hlp = plugin_load('admin', 'styler'); - $hlp->form(); + $hlp->form(true); } - /** - * saves the preview.ini - */ - protected function preview() { - global $conf; - $ini = $conf['cachedir'].'/preview.ini'; - io_saveFile($ini, $this->makeini()); - } - - /** - * deletes the preview.ini - */ - protected function reset() { - global $conf; - $ini = $conf['cachedir'].'/preview.ini'; - io_saveFile($ini, ''); - } - - /** - * deletes the local style.ini replacements - */ - protected function revert() { - $this->replaceini(''); - $this->reset(); - } - - /** - * save the local style.ini replacements - */ - protected function save() { - $this->replaceini($this->makeini()); - $this->reset(); - } - - /** - * create the replacement part of a style.ini from submitted data - * - * @return string - */ - protected function makeini() { - global $INPUT; - - $ini = "[replacements]\n"; - foreach($INPUT->arr('tpl') as $key => $val) { - $ini .= $key.' = "'.addslashes($val).'"'."\n"; - } - - return $ini; - } - - /** - * replaces the replacement parts in the local ini - * - * @param string $new the new ini contents - */ - protected function replaceini($new) { - global $conf; - $ini = DOKU_CONF."tpl/".$conf['template']."/style.ini"; - if(file_exists($ini)) { - $old = io_readFile($ini); - $old = preg_replace('/\[replacements\]\n.*?(\n\[.*]|$)/s', '\\1', $old); - $old = trim($old); - } else { - $old = ''; - } - - io_makeFileDir($ini); - io_saveFile($ini, "$old\n\n$new"); - } - - } // vim:ts=4:sw=4:et: diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php index 4be2153ab..dfc72373c 100644 --- a/lib/plugins/styler/admin.php +++ b/lib/plugins/styler/admin.php @@ -29,6 +29,11 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { * Should carry out any processing required by the plugin. */ public function handle() { + global $INPUT; + $run = $INPUT->extract('run')->str('run'); + if(!$run) return; + $run = "run_$run"; + $this->$run(); } /** @@ -36,46 +41,125 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { */ public function html() { echo '
'; - $this->form(); + $this->form(false); echo '
'; } /** * Create the actual editing form */ - public function form() { + public function form($isajax) { global $conf; + global $ID; $tpl = $conf['template']; - define('SIMPLE_TEST',1); // hack, ideally certain functions should be moved out of css.php + define('SIMPLE_TEST', 1); // hack, ideally certain functions should be moved out of css.php require_once(DOKU_INC.'lib/exe/css.php'); - $styleini = css_styleini($conf['template'], true); + $styleini = css_styleini($conf['template'], true); $replacements = $styleini['replacements']; + if($isajax) { + $target = wl($ID, array('do' => 'styler_plugin')); + } else { + $target = wl($ID, array('do' => 'admin', 'page' => 'styler')); + } + ptln('

'.$this->getLang('menu').'

'); - if (empty($replacements)) { + if(empty($replacements)) { echo '

Sorry, this template does not support this functionality.

'; } else { echo '

Intro blah... for the currently active template ("'.$tpl.'")... not all variables preview...

'; - echo '
'; + echo ''; echo '

Template variables

'; echo '
'; - foreach($replacements as $key => $value){ + foreach($replacements as $key => $value) { echo ''; echo ''; echo ''; } echo '
'.$key.''; echo '
'; - echo ''; - echo ''; #FIXME only if preview.ini exists - echo ''; #FIXME only if local.ini exists - echo ''; + echo ''; + echo ''; #FIXME only if preview.ini exists + echo ''; #FIXME only if local.ini exists + echo ''; echo ''; } } + /** + * saves the preview.ini + */ + protected function run_preview() { + global $conf; + $ini = $conf['cachedir'].'/preview.ini'; + io_saveFile($ini, $this->makeini()); + } + + /** + * deletes the preview.ini + */ + protected function run_reset() { + global $conf; + $ini = $conf['cachedir'].'/preview.ini'; + io_saveFile($ini, ''); + } + + /** + * deletes the local style.ini replacements + */ + protected function run_revert() { + $this->replaceini(''); + $this->run_reset(); + } + + /** + * save the local style.ini replacements + */ + protected function run_save() { + $this->replaceini($this->makeini()); + $this->run_reset(); + } + + /** + * create the replacement part of a style.ini from submitted data + * + * @return string + */ + protected function makeini() { + global $INPUT; + + $ini = "[replacements]\n"; + $ini .= ";These overwrites have been generated from the Template Styler Admin interface\n"; + $ini .= ";Any values in this section will be overwritten by that tool again\n"; + foreach($INPUT->arr('tpl') as $key => $val) { + $ini .= $key.' = "'.addslashes($val).'"'."\n"; + } + + return $ini; + } + + /** + * replaces the replacement parts in the local ini + * + * @param string $new the new ini contents + */ + protected function replaceini($new) { + global $conf; + $ini = DOKU_CONF."tpl/".$conf['template']."/style.ini"; + if(file_exists($ini)) { + $old = io_readFile($ini); + $old = preg_replace('/\[replacements\]\n.*?(\n\[.*]|$)/s', '\\1', $old); + $old = trim($old); + } else { + $old = ''; + } + + io_makeFileDir($ini); + io_saveFile($ini, "$old\n\n$new"); + } + } // vim:ts=4:sw=4:et: \ No newline at end of file -- cgit v1.2.3 From 831864db51ec2c0cd8b86aaee1f1c160df91087d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 May 2015 10:53:22 +0200 Subject: make styler work without JS as well --- lib/plugins/styler/action.php | 37 +++++++++++++++++++++++++++++++------ lib/plugins/styler/admin.php | 2 +- 2 files changed, 32 insertions(+), 7 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styler/action.php b/lib/plugins/styler/action.php index b7dd27cc4..b63cf3ec1 100644 --- a/lib/plugins/styler/action.php +++ b/lib/plugins/styler/action.php @@ -20,7 +20,7 @@ if(!defined('DOKU_INC')) die(); class action_plugin_styler extends DokuWiki_Action_Plugin { /** - * Registers a callback function for a given event + * Registers a callback functions * * @param Doku_Event_Handler $controller DokuWiki's event controller object * @return void @@ -28,12 +28,37 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { public function register(Doku_Event_Handler $controller) { $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle_ajax'); $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_action'); + $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle_header'); + } + + /** + * Adds the preview parameter to the stylesheet loading in non-js mode + * + * @param Doku_Event $event event object by reference + * @param mixed $param [the parameters passed as fifth argument to register_hook() when this + * handler was registered] + * @return void + */ + public function handle_header(Doku_Event &$event, $param) { + global $ACT; + global $INPUT; + if($ACT != 'admin' || $INPUT->str('page') != 'styler') return; + if(!auth_isadmin()) return; - // FIXME load preview style when on admin page + // set preview + $len = count($event->data['link']); + for($i = 0; $i < $len; $i++) { + if( + $event->data['link'][$i]['rel'] == 'stylesheet' && + strpos($event->data['link'][$i]['href'], 'lib/exe/css.php') !== false + ) { + $event->data['link'][$i]['href'] .= '&preview=1&tseed='.time(); + } + } } /** - * [Custom event handler which performs action] + * Updates the style.ini settings by passing it on to handle() of the admin component * * @param Doku_Event $event event object by reference * @param mixed $param [the parameters passed as fifth argument to register_hook() when this @@ -41,8 +66,8 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { * @return void */ public function handle_action(Doku_Event &$event, $param) { - if(!auth_isadmin()) return; if($event->data != 'styler_plugin') return; + if(!auth_isadmin()) return; $event->data = 'show'; /** @var admin_plugin_styler $hlp */ @@ -51,7 +76,7 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { } /** - * [Custom event handler which performs action] + * Create the style form in the floating Dialog * * @param Doku_Event $event event object by reference * @param mixed $param [the parameters passed as fifth argument to register_hook() when this @@ -60,8 +85,8 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { */ public function handle_ajax(Doku_Event &$event, $param) { - if(!auth_isadmin()) return; if($event->data != 'plugin_styler') return; + if(!auth_isadmin()) return; $event->preventDefault(); $event->stopPropagation(); diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php index dfc72373c..bb9426e12 100644 --- a/lib/plugins/styler/admin.php +++ b/lib/plugins/styler/admin.php @@ -26,7 +26,7 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { } /** - * Should carry out any processing required by the plugin. + * handle the different actions (also called from ajax) */ public function handle() { global $INPUT; -- cgit v1.2.3 From 82f9aff6a65b1acaeec6cfde9a2848cb9cb92e03 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 May 2015 11:16:17 +0200 Subject: started to localize the styler plugin --- lib/plugins/styler/admin.php | 37 +++++++++++++++++++++++++++--------- lib/plugins/styler/lang/en/intro.txt | 2 ++ lib/plugins/styler/lang/en/lang.php | 9 +++++++-- lib/plugins/styler/script.js | 2 +- 4 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 lib/plugins/styler/lang/en/intro.txt (limited to 'lib/plugins') diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php index bb9426e12..bfc6cd32b 100644 --- a/lib/plugins/styler/admin.php +++ b/lib/plugins/styler/admin.php @@ -25,6 +25,15 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { return true; } + /** + * @param string $language + * @return string + */ + public function getMenuText($language) { + $js = $this->getLang('js'); + return $js['menu']; + } + /** * handle the different actions (also called from ajax) */ @@ -41,6 +50,7 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { */ public function html() { echo '
'; + ptln('

'.$this->getMenuText('').'

'); $this->form(false); echo '
'; } @@ -63,15 +73,13 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { $target = wl($ID, array('do' => 'admin', 'page' => 'styler')); } - ptln('

'.$this->getLang('menu').'

'); - if(empty($replacements)) { - echo '

Sorry, this template does not support this functionality.

'; + echo '

'.$this->getLang('error').'

'; } else { - echo '

Intro blah... for the currently active template ("'.$tpl.'")... not all variables preview...

'; + echo $this->locale_xhtml('intro'); echo '
'; - echo '

Template variables

'; + echo ''; foreach($replacements as $key => $value) { echo ''; @@ -80,11 +88,22 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { echo ''; } echo '
'; - echo ''; - echo ''; #FIXME only if preview.ini exists - echo ''; #FIXME only if local.ini exists - echo ''; + + echo '

'; + echo ''; + echo ''; #FIXME only if preview.ini exists + echo '

'; + + echo '

'; + echo ''; + echo '

'; + + echo '

'; + echo ''; #FIXME only if local.ini exists + echo '

'; + echo '
'; + } } diff --git a/lib/plugins/styler/lang/en/intro.txt b/lib/plugins/styler/lang/en/intro.txt new file mode 100644 index 000000000..bb9e3ff33 --- /dev/null +++ b/lib/plugins/styler/lang/en/intro.txt @@ -0,0 +1,2 @@ +This tool allows you to change certain style settings of your currently selected template +all changes are stored in a local configuration file and are upgrade safe. \ No newline at end of file diff --git a/lib/plugins/styler/lang/en/lang.php b/lib/plugins/styler/lang/en/lang.php index dfb472f11..2dd7921b0 100644 --- a/lib/plugins/styler/lang/en/lang.php +++ b/lib/plugins/styler/lang/en/lang.php @@ -6,10 +6,15 @@ */ // menu entry for admin plugins -// $lang['menu'] = 'Your menu entry'; +$lang['js']['menu'] = 'Template Style Settings'; // custom language strings for the plugin -// $lang['fixme'] = 'FIXME'; +$lang['error'] = 'Sorry, this template does not support this functionality.'; + +$lang['btn_preview'] = 'Preview your changes'; +$lang['btn_save'] = 'Save your changes'; +$lang['btn_reset'] = 'Reset your current changes'; +$lang['btn_revert'] = 'Revert all styles back to the template\'s default'; diff --git a/lib/plugins/styler/script.js b/lib/plugins/styler/script.js index b3cadfd5e..d472c4fe7 100644 --- a/lib/plugins/styler/script.js +++ b/lib/plugins/styler/script.js @@ -23,7 +23,7 @@ jQuery(function () { // open the dialog $dialog.dialog({ - 'title': 'Template Variables', + 'title': LANG.plugins.styler.menu, 'width': 500, 'top': 50, 'position': { 'my': 'left top', 'at': 'left top', 'of': window }, -- cgit v1.2.3 From b9e2f0546e334add4084195d07568a352bee5091 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 17 May 2015 13:27:56 +0200 Subject: update test groups for the extension manager test --- lib/plugins/extension/_test/extension.test.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/_test/extension.test.php b/lib/plugins/extension/_test/extension.test.php index 453b95e79..d4f13201d 100644 --- a/lib/plugins/extension/_test/extension.test.php +++ b/lib/plugins/extension/_test/extension.test.php @@ -14,7 +14,9 @@ class mock_helper_plugin_extension_extension extends helper_plugin_extension_ext /** * @group plugin_extension + * @group admin_plugins * @group plugins + * @group bundled_plugins */ class helper_plugin_extension_extension_test extends DokuWikiTest { -- cgit v1.2.3 From e422a60a9672c993b6872e856b9172dbd8135b56 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 May 2015 15:37:50 +0200 Subject: added color picker support I'm not too hapy with it --- lib/plugins/styler/admin.php | 28 +- lib/plugins/styler/iris.js | 1488 ++++++++++++++++++++++++++++++++++++++++++ lib/plugins/styler/script.js | 13 +- 3 files changed, 1525 insertions(+), 4 deletions(-) create mode 100644 lib/plugins/styler/iris.js (limited to 'lib/plugins') diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php index bfc6cd32b..8d44ac6f5 100644 --- a/lib/plugins/styler/admin.php +++ b/lib/plugins/styler/admin.php @@ -84,7 +84,7 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { foreach($replacements as $key => $value) { echo ''; echo ''.$key.''; - echo ''; + echo 'colorClass($key).' />'; echo ''; } echo ''; @@ -107,6 +107,32 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { } } + /** + * set the color class attribute + */ + protected function colorClass($key) { + static $colors = array( + 'text', + 'background', + 'text_alt', + 'background_alt', + 'text_neu', + 'background_neu', + 'border', + 'highlight', + 'background_site', + 'link', + 'existing', + 'missing', + ); + + if(preg_match('/colou?r/', $key) || in_array(trim($key,'_'), $colors)) { + return 'class="color"'; + } else { + return ''; + } + } + /** * saves the preview.ini */ diff --git a/lib/plugins/styler/iris.js b/lib/plugins/styler/iris.js new file mode 100644 index 000000000..4eda5022e --- /dev/null +++ b/lib/plugins/styler/iris.js @@ -0,0 +1,1488 @@ +/*! Iris Color Picker - v1.0.7 - 2014-11-28 +* https://github.com/Automattic/Iris +* Copyright (c) 2014 Matt Wiebe; Licensed GPLv2 */ +(function( $, undef ){ + var _html, nonGradientIE, gradientType, vendorPrefixes, _css, Iris, UA, isIE, IEVersion; + + _html = '
'; + _css = '.iris-picker{display:block;position:relative}.iris-picker,.iris-picker *{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input+.iris-picker{margin-top:4px}.iris-error{background-color:#ffafaf}.iris-border{border-radius:3px;border:1px solid #aaa;width:200px;background-color:#fff}.iris-picker-inner{position:absolute;top:0;right:0;left:0;bottom:0}.iris-border .iris-picker-inner{top:10px;right:10px;left:10px;bottom:10px}.iris-picker .iris-square-inner{position:absolute;left:0;right:0;top:0;bottom:0}.iris-picker .iris-square,.iris-picker .iris-slider,.iris-picker .iris-square-inner,.iris-picker .iris-palette{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,.4);height:100%;width:12.5%;float:left;margin-right:5%}.iris-picker .iris-square{width:76%;margin-right:10%;position:relative}.iris-picker .iris-square-inner{width:auto;margin:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-square-inner,.iris-ie-9 .iris-palette{box-shadow:none;border-radius:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-palette{outline:1px solid rgba(0,0,0,.1)}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iris-ie-lt9 .iris-square-inner,.iris-ie-lt9 .iris-palette{outline:1px solid #aaa}.iris-ie-lt9 .iris-square .ui-slider-handle{outline:1px solid #aaa;background-color:#fff;-ms-filter:"alpha(Opacity=30)"}.iris-ie-lt9 .iris-square .iris-square-handle{background:0;border:3px solid #fff;-ms-filter:"alpha(Opacity=50)"}.iris-picker .iris-strip{margin-right:0;position:relative}.iris-picker .iris-strip .ui-slider-handle{position:absolute;background:0;margin:0;right:-3px;left:-3px;border:4px solid #aaa;border-width:4px 3px;width:auto;height:6px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;z-index:5;cursor:ns-resize}.iris-strip .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.iris-picker .iris-slider-offset{position:absolute;top:11px;left:0;right:0;bottom:-3px;width:auto;height:auto;background:transparent;border:0;border-radius:0}.iris-picker .iris-square-handle{background:transparent;border:5px solid #aaa;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.iris-picker .iris-square-handle:hover{border-color:#999}.iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.iris-picker .iris-square-handle:hover::after{border-color:#fff}.iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.iris-palette-container{position:absolute;bottom:0;left:0;margin:0;padding:0}.iris-border .iris-palette-container{left:10px;bottom:10px}.iris-picker .iris-palette{margin:0;cursor:pointer}.iris-square-handle,.ui-slider-handle{border:0;outline:0}'; + + // Even IE9 dosen't support gradients. Elaborate sigh. + UA = navigator.userAgent.toLowerCase(); + isIE = navigator.appName === 'Microsoft Internet Explorer'; + IEVersion = isIE ? parseFloat( UA.match( /msie ([0-9]{1,}[\.0-9]{0,})/ )[1] ) : 0; + nonGradientIE = ( isIE && IEVersion < 10 ); + gradientType = false; + + // we don't bother with an unprefixed version, as it has a different syntax + vendorPrefixes = [ '-moz-', '-webkit-', '-o-', '-ms-' ]; + + // Bail for IE <= 7 + if ( nonGradientIE && IEVersion <= 7 ) { + $.fn.iris = $.noop; + $.support.iris = false; + return; + } + + $.support.iris = true; + + function testGradientType() { + var el, base, + bgImageString = 'backgroundImage'; + + if ( nonGradientIE ) { + gradientType = 'filter'; + } + else { + el = $( '
' ); + base = 'linear-gradient(top,#fff,#000)'; + $.each( vendorPrefixes, function( i, val ){ + el.css( bgImageString, val + base ); + if ( el.css( bgImageString ).match( 'gradient' ) ) { + gradientType = i; + return false; + } + }); + // check for legacy webkit gradient syntax + if ( gradientType === false ) { + el.css( 'background', '-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))' ); + if ( el.css( bgImageString ).match( 'gradient' ) ) { + gradientType = 'webkit'; + } + } + el.remove(); + } + + } + + /** + * Only for CSS3 gradients. oldIE will use a separate function. + * + * Accepts as many color stops as necessary from 2nd arg on, or 2nd + * arg can be an array of color stops + * + * @param {string} origin Gradient origin - top or left, defaults to left. + * @return {string} Appropriate CSS3 gradient string for use in + */ + function createGradient( origin, stops ) { + origin = ( origin === 'top' ) ? 'top' : 'left'; + stops = $.isArray( stops ) ? stops : Array.prototype.slice.call( arguments, 1 ); + if ( gradientType === 'webkit' ) { + return legacyWebkitGradient( origin, stops ); + } else { + return vendorPrefixes[ gradientType ] + 'linear-gradient(' + origin + ', ' + stops.join(', ') + ')'; + } + } + + /** + * Stupid gradients for a stupid browser. + */ + function stupidIEGradient( origin, stops ) { + var type, self, lastIndex, filter, startPosProp, endPosProp, dimensionProp, template, html; + + origin = ( origin === 'top' ) ? 'top' : 'left'; + stops = $.isArray( stops ) ? stops : Array.prototype.slice.call( arguments, 1 ); + // 8 hex: AARRGGBB + // GradientType: 0 vertical, 1 horizontal + type = ( origin === 'top' ) ? 0 : 1; + self = $( this ); + lastIndex = stops.length - 1; + filter = 'filter'; + startPosProp = ( type === 1 ) ? 'left' : 'top'; + endPosProp = ( type === 1 ) ? 'right' : 'bottom'; + dimensionProp = ( type === 1 ) ? 'height' : 'width'; + template = '
'; + html = ''; + // need a positioning context + if ( self.css('position') === 'static' ) { + self.css( {position: 'relative' } ); + } + + stops = fillColorStops( stops ); + $.each(stops, function( i, startColor ) { + var endColor, endStop, filterVal; + + // we want two at a time. if we're on the last pair, bail. + if ( i === lastIndex ) { + return false; + } + + endColor = stops[ i + 1 ]; + //if our pairs are at the same color stop, moving along. + if ( startColor.stop === endColor.stop ) { + return; + } + + endStop = 100 - parseFloat( endColor.stop ) + '%'; + startColor.octoHex = new Color( startColor.color ).toIEOctoHex(); + endColor.octoHex = new Color( endColor.color ).toIEOctoHex(); + + filterVal = 'progid:DXImageTransform.Microsoft.Gradient(GradientType=' + type + ', StartColorStr=\'' + startColor.octoHex + '\', EndColorStr=\'' + endColor.octoHex + '\')'; + html += template.replace( '%start%', startColor.stop ).replace( '%end%', endStop ).replace( '%filter%', filterVal ); + }); + self.find( '.iris-ie-gradient-shim' ).remove(); + $( html ).prependTo( self ); + } + + function legacyWebkitGradient( origin, colorList ) { + var stops = []; + origin = ( origin === 'top' ) ? '0% 0%,0% 100%,' : '0% 100%,100% 100%,'; + colorList = fillColorStops( colorList ); + $.each( colorList, function( i, val ){ + stops.push( 'color-stop(' + ( parseFloat( val.stop ) / 100 ) + ', ' + val.color + ')' ); + }); + return '-webkit-gradient(linear,' + origin + stops.join(',') + ')'; + } + + function fillColorStops( colorList ) { + var colors = [], + percs = [], + newColorList = [], + lastIndex = colorList.length - 1; + + $.each( colorList, function( index, val ) { + var color = val, + perc = false, + match = val.match( /1?[0-9]{1,2}%$/ ); + + if ( match ) { + color = val.replace( /\s?1?[0-9]{1,2}%$/, '' ); + perc = match.shift(); + } + colors.push( color ); + percs.push( perc ); + }); + + // back fill first and last + if ( percs[0] === false ) { + percs[0] = '0%'; + } + + if ( percs[lastIndex] === false ) { + percs[lastIndex] = '100%'; + } + + percs = backFillColorStops( percs ); + + $.each( percs, function( i ){ + newColorList[i] = { color: colors[i], stop: percs[i] }; + }); + return newColorList; + } + + function backFillColorStops( stops ) { + var first = 0, + last = stops.length - 1, + i = 0, + foundFirst = false, + incr, + steps, + step, + firstVal; + + if ( stops.length <= 2 || $.inArray( false, stops ) < 0 ) { + return stops; + } + while ( i < stops.length - 1 ) { + if ( ! foundFirst && stops[i] === false ) { + first = i - 1; + foundFirst = true; + } else if ( foundFirst && stops[i] !== false ) { + last = i; + i = stops.length; + } + i++; + } + steps = last - first; + firstVal = parseInt( stops[first].replace('%'), 10 ); + incr = ( parseFloat( stops[last].replace('%') ) - firstVal ) / steps; + i = first + 1; + step = 1; + while ( i < last ) { + stops[i] = ( firstVal + ( step * incr ) ) + '%'; + step++; + i++; + } + return backFillColorStops( stops ); + } + + $.fn.gradient = function() { + var args = arguments; + return this.each( function() { + // this'll be oldishIE + if ( nonGradientIE ) { + stupidIEGradient.apply( this, args ); + } else { + // new hotness + $( this ).css( 'backgroundImage', createGradient.apply( this, args ) ); + } + }); + }; + + $.fn.raninbowGradient = function( origin, args ) { + var opts, template, i, steps; + + origin = origin || 'top'; + opts = $.extend( {}, { s: 100, l: 50 }, args ); + template = 'hsl(%h%,' + opts.s + '%,' + opts.l + '%)'; + i = 0; + steps = []; + while ( i <= 360 ) { + steps.push( template.replace('%h%', i) ); + i += 30; + } + return this.each(function() { + $(this).gradient( origin, steps ); + }); + }; + + // the colorpicker widget def. + Iris = { + options: { + color: false, + mode: 'hsl', + controls: { + horiz: 's', // horizontal defaults to saturation + vert: 'l', // vertical defaults to lightness + strip: 'h' // right strip defaults to hue + }, + hide: true, // hide the color picker by default + border: true, // draw a border around the collection of UI elements + target: false, // a DOM element / jQuery selector that the element will be appended within. Only used when called on an input. + width: 200, // the width of the collection of UI elements + palettes: false // show a palette of basic colors beneath the square. + }, + _color: '', + _palettes: [ '#000', '#fff', '#d33', '#d93', '#ee2', '#81d742', '#1e73be', '#8224e3' ], + _inited: false, + _defaultHSLControls: { + horiz: 's', + vert: 'l', + strip: 'h' + }, + _defaultHSVControls: { + horiz: 'h', + vert: 'v', + strip: 's' + }, + _scale: { + h: 360, + s: 100, + l: 100, + v: 100 + }, + _create: function() { + var self = this, + el = self.element, + color = self.options.color || el.val(); + + if ( gradientType === false ) { + testGradientType(); + } + + if ( el.is( 'input' ) ) { + if ( self.options.target ) { + self.picker = $( _html ).appendTo( self.options.target ); + } else { + self.picker = $( _html ).insertAfter( el ); + } + + self._addInputListeners( el ); + } else { + el.append( _html ); + self.picker = el.find( '.iris-picker' ); + } + + // Browsers / Versions + // Feature detection doesn't work for these, and $.browser is deprecated + if ( isIE ) { + if ( IEVersion === 9 ) { + self.picker.addClass( 'iris-ie-9' ); + } else if ( IEVersion <= 8 ) { + self.picker.addClass( 'iris-ie-lt9' ); + } + } else if ( UA.indexOf('compatible') < 0 && UA.indexOf('khtml') < 0 && UA.match( /mozilla/ ) ) { + self.picker.addClass( 'iris-mozilla' ); + } + + if ( self.options.palettes ) { + self._addPalettes(); + } + + self._color = new Color( color ).setHSpace( self.options.mode ); + self.options.color = self._color.toString(); + + // prep 'em for re-use + self.controls = { + square: self.picker.find( '.iris-square' ), + squareDrag: self.picker.find( '.iris-square-value' ), + horiz: self.picker.find( '.iris-square-horiz' ), + vert: self.picker.find( '.iris-square-vert' ), + strip: self.picker.find( '.iris-strip' ), + stripSlider: self.picker.find( '.iris-strip .iris-slider-offset' ) + }; + + // small sanity check - if we chose hsv, change default controls away from hsl + if ( self.options.mode === 'hsv' && self._has('l', self.options.controls) ) { + self.options.controls = self._defaultHSVControls; + } else if ( self.options.mode === 'hsl' && self._has('v', self.options.controls) ) { + self.options.controls = self._defaultHSLControls; + } + + // store it. HSL gets squirrely + self.hue = self._color.h(); + + if ( self.options.hide ) { + self.picker.hide(); + } + + if ( self.options.border ) { + self.picker.addClass( 'iris-border' ); + } + + self._initControls(); + self.active = 'external'; + self._dimensions(); + self._change(); + }, + _has: function(needle, haystack) { + var ret = false; + $.each(haystack, function(i,v){ + if ( needle === v ) { + ret = true; + // exit the loop + return false; + } + }); + return ret; + }, + _addPalettes: function () { + var container = $( '
' ), + palette = $( '' ), + colors = $.isArray( this.options.palettes ) ? this.options.palettes : this._palettes; + + // do we have an existing container? Empty and reuse it. + if ( this.picker.find( '.iris-palette-container' ).length ) { + container = this.picker.find( '.iris-palette-container' ).detach().html( '' ); + } + + $.each(colors, function(index, val) { + palette.clone().data( 'color', val ) + .css( 'backgroundColor', val ).appendTo( container ) + .height( 10 ).width( 10 ); + }); + + this.picker.append(container); + }, + _paint: function() { + var self = this; + self._paintDimension( 'top', 'strip' ); + self._paintDimension( 'top', 'vert' ); + self._paintDimension( 'left', 'horiz' ); + }, + _paintDimension: function( origin, control ) { + var self = this, + c = self._color, + mode = self.options.mode, + color = self._getHSpaceColor(), + target = self.controls[ control ], + controlOpts = self.options.controls, + stops; + + // don't paint the active control + if ( control === self.active || ( self.active === 'square' && control !== 'strip' ) ) { + return; + } + + switch ( controlOpts[ control ] ) { + case 'h': + if ( mode === 'hsv' ) { + color = c.clone(); + switch ( control ) { + case 'horiz': + color[controlOpts.vert](100); + break; + case 'vert': + color[controlOpts.horiz](100); + break; + case 'strip': + color.setHSpace('hsl'); + break; + } + stops = color.toHsl(); + } else { + if ( control === 'strip' ) { + stops = { s: color.s, l: color.l }; + } else { + stops = { s: 100, l: color.l }; + } + } + + target.raninbowGradient( origin, stops ); + break; + case 's': + if ( mode === 'hsv' ) { + if ( control === 'vert' ) { + stops = [ c.clone().a(0).s(0).toCSS('rgba'), c.clone().a(1).s(0).toCSS('rgba') ]; + } else if ( control === 'strip' ) { + stops = [ c.clone().s(100).toCSS('hsl'), c.clone().s(0).toCSS('hsl') ]; + } else if ( control === 'horiz' ) { + stops = [ '#fff', 'hsl(' + color.h + ',100%,50%)' ]; + } + } else { // implicit mode === 'hsl' + if ( control === 'vert' && self.options.controls.horiz === 'h' ) { + stops = ['hsla(0, 0%, ' + color.l + '%, 0)', 'hsla(0, 0%, ' + color.l + '%, 1)']; + } else { + stops = ['hsl('+ color.h +',0%,50%)', 'hsl(' + color.h + ',100%,50%)']; + } + } + + + target.gradient( origin, stops ); + break; + case 'l': + if ( control === 'strip' ) { + stops = ['hsl(' + color.h + ',100%,100%)', 'hsl(' + color.h + ', ' + color.s + '%,50%)', 'hsl('+ color.h +',100%,0%)']; + } else { + stops = ['#fff', 'rgba(255,255,255,0) 50%', 'rgba(0,0,0,0) 50%', 'rgba(0,0,0,1)']; + } + target.gradient( origin, stops ); + break; + case 'v': + if ( control === 'strip' ) { + stops = [ c.clone().v(100).toCSS(), c.clone().v(0).toCSS() ]; + } else { + stops = ['rgba(0,0,0,0)', '#000']; + } + target.gradient( origin, stops ); + break; + default: + break; + } + }, + + _getHSpaceColor: function() { + return ( this.options.mode === 'hsv' ) ? this._color.toHsv() : this._color.toHsl(); + }, + + _dimensions: function( reset ) { + // whatever size + var self = this, + opts = self.options, + controls = self.controls, + square = controls.square, + strip = self.picker.find( '.iris-strip' ), + squareWidth = '77.5%', + stripWidth = '12%', + totalPadding = 20, + innerWidth = opts.border ? opts.width - totalPadding : opts.width, + controlsHeight, + paletteCount = $.isArray( opts.palettes ) ? opts.palettes.length : self._palettes.length, + paletteMargin, paletteWidth, paletteContainerWidth; + + if ( reset ) { + square.css( 'width', '' ); + strip.css( 'width', '' ); + self.picker.css( {width: '', height: ''} ); + } + + squareWidth = innerWidth * ( parseFloat( squareWidth ) / 100 ); + stripWidth = innerWidth * ( parseFloat( stripWidth ) / 100 ); + controlsHeight = opts.border ? squareWidth + totalPadding : squareWidth; + + square.width( squareWidth ).height( squareWidth ); + strip.height( squareWidth ).width( stripWidth ); + self.picker.css( { width: opts.width, height: controlsHeight } ); + + if ( ! opts.palettes ) { + return self.picker.css( 'paddingBottom', '' ); + } + + // single margin at 2% + paletteMargin = squareWidth * 2 / 100; + paletteContainerWidth = squareWidth - ( ( paletteCount - 1 ) * paletteMargin ); + paletteWidth = paletteContainerWidth / paletteCount; + self.picker.find('.iris-palette').each( function( i ) { + var margin = i === 0 ? 0 : paletteMargin; + $( this ).css({ + width: paletteWidth, + height: paletteWidth, + marginLeft: margin + }); + }); + self.picker.css( 'paddingBottom', paletteWidth + paletteMargin ); + strip.height( paletteWidth + paletteMargin + squareWidth ); + }, + + _addInputListeners: function( input ) { + var self = this, + debounceTimeout = 100, + callback = function( event ){ + var color = new Color( input.val() ), + val = input.val().replace( /^#/, '' ); + + input.removeClass( 'iris-error' ); + // we gave a bad color + if ( color.error ) { + // don't error on an empty input - we want those allowed + if ( val !== '' ) { + input.addClass( 'iris-error' ); + } + } else { + if ( color.toString() !== self._color.toString() ) { + // let's not do this on keyup for hex shortcodes + if ( ! ( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) ) { + self._setOption( 'color', color.toString() ); + } + } + } + }; + + input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) ); + + // If we initialized hidden, show on first focus. The rest is up to you. + if ( self.options.hide ) { + input.one( 'focus', function() { + self.show(); + }); + } + }, + + _initControls: function() { + var self = this, + controls = self.controls, + square = controls.square, + controlOpts = self.options.controls, + stripScale = self._scale[controlOpts.strip]; + + controls.stripSlider.slider({ + orientation: 'vertical', + max: stripScale, + slide: function( event, ui ) { + self.active = 'strip'; + // "reverse" for hue. + if ( controlOpts.strip === 'h' ) { + ui.value = stripScale - ui.value; + } + + self._color[controlOpts.strip]( ui.value ); + self._change.apply( self, arguments ); + } + }); + + controls.squareDrag.draggable({ + containment: controls.square.find( '.iris-square-inner' ), + zIndex: 1000, + cursor: 'move', + drag: function( event, ui ) { + self._squareDrag( event, ui ); + }, + start: function() { + square.addClass( 'iris-dragging' ); + $(this).addClass( 'ui-state-focus' ); + }, + stop: function() { + square.removeClass( 'iris-dragging' ); + $(this).removeClass( 'ui-state-focus' ); + } + }).on( 'mousedown mouseup', function( event ) { + var focusClass = 'ui-state-focus'; + event.preventDefault(); + if (event.type === 'mousedown' ) { + self.picker.find( '.' + focusClass ).removeClass( focusClass ).blur(); + $(this).addClass( focusClass ).focus(); + } else { + $(this).removeClass( focusClass ); + } + }).on( 'keydown', function( event ) { + var container = controls.square, + draggable = controls.squareDrag, + position = draggable.position(), + distance = self.options.width / 100; // Distance in pixels the draggable should be moved: 1 "stop" + + // make alt key go "10" + if ( event.altKey ) { + distance *= 10; + } + + // Reposition if one of the directional keys is pressed + switch ( event.keyCode ) { + case 37: position.left -= distance; break; // Left + case 38: position.top -= distance; break; // Up + case 39: position.left += distance; break; // Right + case 40: position.top += distance; break; // Down + default: return true; // Exit and bubble + } + + // Keep draggable within container + position.left = Math.max( 0, Math.min( position.left, container.width() ) ); + position.top = Math.max( 0, Math.min( position.top, container.height() ) ); + + draggable.css(position); + self._squareDrag( event, { position: position }); + event.preventDefault(); + }); + + // allow clicking on the square to move there and keep dragging + square.mousedown( function( event ) { + var squareOffset, pos; + // only left click + if ( event.which !== 1 ) { + return; + } + + // prevent bubbling from the handle: no infinite loops + if ( ! $( event.target ).is( 'div' ) ) { + return; + } + + squareOffset = self.controls.square.offset(); + pos = { + top: event.pageY - squareOffset.top, + left: event.pageX - squareOffset.left + }; + event.preventDefault(); + self._squareDrag( event, { position: pos } ); + event.target = self.controls.squareDrag.get(0); + self.controls.squareDrag.css( pos ).trigger( event ); + }); + + // palettes + if ( self.options.palettes ) { + self._paletteListeners(); + } + }, + + _paletteListeners: function() { + var self = this; + self.picker.find('.iris-palette-container').on('click.palette', '.iris-palette', function() { + self._color.fromCSS( $(this).data('color') ); + self.active = 'external'; + self._change(); + }).on( 'keydown.palette', '.iris-palette', function( event ) { + if ( ! ( event.keyCode === 13 || event.keyCode === 32 ) ) { + return true; + } + event.stopPropagation(); + $( this ).click(); + }); + }, + + _squareDrag: function( event, ui ) { + var self = this, + controlOpts = self.options.controls, + dimensions = self._squareDimensions(), + vertVal = Math.round( ( dimensions.h - ui.position.top ) / dimensions.h * self._scale[controlOpts.vert] ), + horizVal = self._scale[controlOpts.horiz] - Math.round( ( dimensions.w - ui.position.left ) / dimensions.w * self._scale[controlOpts.horiz] ); + + self._color[controlOpts.horiz]( horizVal )[controlOpts.vert]( vertVal ); + + self.active = 'square'; + self._change.apply( self, arguments ); + }, + + _setOption: function( key, value ) { + var self = this, + oldValue = self.options[key], + doDimensions = false, + hexLessColor, + newColor, + method; + + // ensure the new value is set. We can reset to oldValue if some check wasn't met. + self.options[key] = value; + + switch(key) { + case 'color': + // cast to string in case we have a number + value = '' + value; + hexLessColor = value.replace( /^#/, '' ); + newColor = new Color( value ).setHSpace( self.options.mode ); + if ( newColor.error ) { + self.options[key] = oldValue; + } else { + self._color = newColor; + self.options.color = self.options[key] = self._color.toString(); + self.active = 'external'; + self._change(); + } + break; + case 'palettes': + doDimensions = true; + + if ( value ) { + self._addPalettes(); + } else { + self.picker.find('.iris-palette-container').remove(); + } + + // do we need to add events? + if ( ! oldValue ) { + self._paletteListeners(); + } + break; + case 'width': + doDimensions = true; + break; + case 'border': + doDimensions = true; + method = value ? 'addClass' : 'removeClass'; + self.picker[method]('iris-border'); + break; + case 'mode': + case 'controls': + // if nothing's changed, let's bail, since this causes re-rendering the whole widget + if ( oldValue === value ) { + return; + } + + // we're using these poorly named variables because they're already scoped. + // method is the element that Iris was called on. oldValue will be the options + method = self.element; + oldValue = self.options; + oldValue.hide = ! self.picker.is( ':visible' ); + self.destroy(); + self.picker.remove(); + return $(self.element).iris(oldValue); + } + + // Do we need to recalc dimensions? + if ( doDimensions ) { + self._dimensions(true); + } + }, + + _squareDimensions: function( forceRefresh ) { + var square = this.controls.square, + dimensions, + control; + + if ( forceRefresh !== undef && square.data('dimensions') ) { + return square.data('dimensions'); + } + + control = this.controls.squareDrag; + dimensions = { + w: square.width(), + h: square.height() + }; + square.data( 'dimensions', dimensions ); + return dimensions; + }, + + _isNonHueControl: function( active, type ) { + if ( active === 'square' && this.options.controls.strip === 'h' ) { + return true; + } else if ( type === 'external' || ( type === 'h' && active === 'strip' ) ) { + return false; + } + + return true; + }, + + _change: function() { + var self = this, + controls = self.controls, + color = self._getHSpaceColor(), + actions = [ 'square', 'strip' ], + controlOpts = self.options.controls, + type = controlOpts[self.active] || 'external', + oldHue = self.hue; + + if ( self.active === 'strip' ) { + // take no action on any of the square sliders if we adjusted the strip + actions = []; + } else if ( self.active !== 'external' ) { + // for non-strip, non-external, strip should never change + actions.pop(); // conveniently the last item + } + + $.each( actions, function(index, item) { + var value, dimensions, cssObj; + if ( item !== self.active ) { + switch ( item ) { + case 'strip': + // reverse for hue + value = ( controlOpts.strip === 'h' ) ? self._scale[controlOpts.strip] - color[controlOpts.strip] : color[controlOpts.strip]; + controls.stripSlider.slider( 'value', value ); + break; + case 'square': + dimensions = self._squareDimensions(); + cssObj = { + left: color[controlOpts.horiz] / self._scale[controlOpts.horiz] * dimensions.w, + top: dimensions.h - ( color[controlOpts.vert] / self._scale[controlOpts.vert] * dimensions.h ) + }; + + self.controls.squareDrag.css( cssObj ); + break; + } + } + }); + + // Ensure that we don't change hue if we triggered a hue reset + if ( color.h !== oldHue && self._isNonHueControl( self.active, type ) ) { + self._color.h(oldHue); + } + + // store hue for repeating above check next time + self.hue = self._color.h(); + + self.options.color = self._color.toString(); + + // only run after the first time + if ( self._inited ) { + self._trigger( 'change', { type: self.active }, { color: self._color } ); + } + + if ( self.element.is( ':input' ) && ! self._color.error ) { + self.element.removeClass( 'iris-error' ); + if ( self.element.val() !== self._color.toString() ) { + self.element.val( self._color.toString() ); + } + } + + self._paint(); + self._inited = true; + self.active = false; + }, + // taken from underscore.js _.debounce method + _debounce: function( func, wait, immediate ) { + var timeout, result; + return function() { + var context = this, + args = arguments, + later, + callNow; + + later = function() { + timeout = null; + if ( ! immediate) { + result = func.apply( context, args ); + } + }; + + callNow = immediate && !timeout; + clearTimeout( timeout ); + timeout = setTimeout( later, wait ); + if ( callNow ) { + result = func.apply( context, args ); + } + return result; + }; + }, + show: function() { + this.picker.show(); + }, + hide: function() { + this.picker.hide(); + }, + toggle: function() { + this.picker.toggle(); + }, + color: function(newColor) { + if ( newColor === true ) { + return this._color.clone(); + } else if ( newColor === undef ) { + return this._color.toString(); + } + this.option('color', newColor); + } + }; + // initialize the widget + $.widget( 'a8c.iris', Iris ); + // add CSS + $( '' ).appendTo( 'head' ); + +}( jQuery )); +/*! Color.js - v0.9.11 - 2013-08-09 +* https://github.com/Automattic/Color.js +* Copyright (c) 2013 Matt Wiebe; Licensed GPLv2 */ +(function(global, undef) { + + var Color = function( color, type ) { + if ( ! ( this instanceof Color ) ) + return new Color( color, type ); + + return this._init( color, type ); + }; + + Color.fn = Color.prototype = { + _color: 0, + _alpha: 1, + error: false, + // for preserving hue/sat in fromHsl().toHsl() flows + _hsl: { h: 0, s: 0, l: 0 }, + // for preserving hue/sat in fromHsv().toHsv() flows + _hsv: { h: 0, s: 0, v: 0 }, + // for setting hsl or hsv space - needed for .h() & .s() functions to function properly + _hSpace: 'hsl', + _init: function( color ) { + var func = 'noop'; + switch ( typeof color ) { + case 'object': + // alpha? + if ( color.a !== undef ) + this.a( color.a ); + func = ( color.r !== undef ) ? 'fromRgb' : + ( color.l !== undef ) ? 'fromHsl' : + ( color.v !== undef ) ? 'fromHsv' : func; + return this[func]( color ); + case 'string': + return this.fromCSS( color ); + case 'number': + return this.fromInt( parseInt( color, 10 ) ); + } + return this; + }, + + _error: function() { + this.error = true; + return this; + }, + + clone: function() { + var newColor = new Color( this.toInt() ), + copy = ['_alpha', '_hSpace', '_hsl', '_hsv', 'error']; + for ( var i = copy.length - 1; i >= 0; i-- ) { + newColor[ copy[i] ] = this[ copy[i] ]; + } + return newColor; + }, + + setHSpace: function( space ) { + this._hSpace = ( space === 'hsv' ) ? space : 'hsl'; + return this; + }, + + noop: function() { + return this; + }, + + fromCSS: function( color ) { + var list, + leadingRE = /^(rgb|hs(l|v))a?\(/; + this.error = false; + + // whitespace and semicolon trim + color = color.replace(/^\s+/, '').replace(/\s+$/, '').replace(/;$/, ''); + + if ( color.match(leadingRE) && color.match(/\)$/) ) { + list = color.replace(/(\s|%)/g, '').replace(leadingRE, '').replace(/,?\);?$/, '').split(','); + + if ( list.length < 3 ) + return this._error(); + + if ( list.length === 4 ) { + this.a( parseFloat( list.pop() ) ); + // error state has been set to true in .a() if we passed NaN + if ( this.error ) + return this; + } + + for (var i = list.length - 1; i >= 0; i--) { + list[i] = parseInt(list[i], 10); + if ( isNaN( list[i] ) ) + return this._error(); + } + + if ( color.match(/^rgb/) ) { + return this.fromRgb( { + r: list[0], + g: list[1], + b: list[2] + } ); + } else if ( color.match(/^hsv/) ) { + return this.fromHsv( { + h: list[0], + s: list[1], + v: list[2] + } ); + } else { + return this.fromHsl( { + h: list[0], + s: list[1], + l: list[2] + } ); + } + } else { + // must be hex amirite? + return this.fromHex( color ); + } + }, + + fromRgb: function( rgb, preserve ) { + if ( typeof rgb !== 'object' || rgb.r === undef || rgb.g === undef || rgb.b === undef ) + return this._error(); + + this.error = false; + return this.fromInt( parseInt( ( rgb.r << 16 ) + ( rgb.g << 8 ) + rgb.b, 10 ), preserve ); + }, + + fromHex: function( color ) { + color = color.replace(/^#/, '').replace(/^0x/, ''); + if ( color.length === 3 ) { + color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2]; + } + + // rough error checking - this is where things go squirrely the most + this.error = ! /^[0-9A-F]{6}$/i.test( color ); + return this.fromInt( parseInt( color, 16 ) ); + }, + + fromHsl: function( hsl ) { + var r, g, b, q, p, h, s, l; + + if ( typeof hsl !== 'object' || hsl.h === undef || hsl.s === undef || hsl.l === undef ) + return this._error(); + + this._hsl = hsl; // store it + this._hSpace = 'hsl'; // implicit + h = hsl.h / 360; s = hsl.s / 100; l = hsl.l / 100; + if ( s === 0 ) { + r = g = b = l; // achromatic + } + else { + q = l < 0.5 ? l * ( 1 + s ) : l + s - l * s; + p = 2 * l - q; + r = this.hue2rgb( p, q, h + 1/3 ); + g = this.hue2rgb( p, q, h ); + b = this.hue2rgb( p, q, h - 1/3 ); + } + return this.fromRgb( { + r: r * 255, + g: g * 255, + b: b * 255 + }, true ); // true preserves hue/sat + }, + + fromHsv: function( hsv ) { + var h, s, v, r, g, b, i, f, p, q, t; + if ( typeof hsv !== 'object' || hsv.h === undef || hsv.s === undef || hsv.v === undef ) + return this._error(); + + this._hsv = hsv; // store it + this._hSpace = 'hsv'; // implicit + + h = hsv.h / 360; s = hsv.s / 100; v = hsv.v / 100; + i = Math.floor( h * 6 ); + f = h * 6 - i; + p = v * ( 1 - s ); + q = v * ( 1 - f * s ); + t = v * ( 1 - ( 1 - f ) * s ); + + switch( i % 6 ) { + case 0: + r = v; g = t; b = p; + break; + case 1: + r = q; g = v; b = p; + break; + case 2: + r = p; g = v; b = t; + break; + case 3: + r = p; g = q; b = v; + break; + case 4: + r = t; g = p; b = v; + break; + case 5: + r = v; g = p; b = q; + break; + } + + return this.fromRgb( { + r: r * 255, + g: g * 255, + b: b * 255 + }, true ); // true preserves hue/sat + + }, + // everything comes down to fromInt + fromInt: function( color, preserve ) { + this._color = parseInt( color, 10 ); + + if ( isNaN( this._color ) ) + this._color = 0; + + // let's coerce things + if ( this._color > 16777215 ) + this._color = 16777215; + else if ( this._color < 0 ) + this._color = 0; + + // let's not do weird things + if ( preserve === undef ) { + this._hsv.h = this._hsv.s = this._hsl.h = this._hsl.s = 0; + } + // EVENT GOES HERE + return this; + }, + + hue2rgb: function( p, q, t ) { + if ( t < 0 ) { + t += 1; + } + if ( t > 1 ) { + t -= 1; + } + if ( t < 1/6 ) { + return p + ( q - p ) * 6 * t; + } + if ( t < 1/2 ) { + return q; + } + if ( t < 2/3 ) { + return p + ( q - p ) * ( 2/3 - t ) * 6; + } + return p; + }, + + toString: function() { + var hex = parseInt( this._color, 10 ).toString( 16 ); + if ( this.error ) + return ''; + // maybe left pad it + if ( hex.length < 6 ) { + for (var i = 6 - hex.length - 1; i >= 0; i--) { + hex = '0' + hex; + } + } + return '#' + hex; + }, + + toCSS: function( type, alpha ) { + type = type || 'hex'; + alpha = parseFloat( alpha || this._alpha ); + switch ( type ) { + case 'rgb': + case 'rgba': + var rgb = this.toRgb(); + if ( alpha < 1 ) { + return "rgba( " + rgb.r + ", " + rgb.g + ", " + rgb.b + ", " + alpha + " )"; + } + else { + return "rgb( " + rgb.r + ", " + rgb.g + ", " + rgb.b + " )"; + } + break; + case 'hsl': + case 'hsla': + var hsl = this.toHsl(); + if ( alpha < 1 ) { + return "hsla( " + hsl.h + ", " + hsl.s + "%, " + hsl.l + "%, " + alpha + " )"; + } + else { + return "hsl( " + hsl.h + ", " + hsl.s + "%, " + hsl.l + "% )"; + } + break; + default: + return this.toString(); + } + }, + + toRgb: function() { + return { + r: 255 & ( this._color >> 16 ), + g: 255 & ( this._color >> 8 ), + b: 255 & ( this._color ) + }; + }, + + toHsl: function() { + var rgb = this.toRgb(); + var r = rgb.r / 255, g = rgb.g / 255, b = rgb.b / 255; + var max = Math.max( r, g, b ), min = Math.min( r, g, b ); + var h, s, l = ( max + min ) / 2; + + if ( max === min ) { + h = s = 0; // achromatic + } else { + var d = max - min; + s = l > 0.5 ? d / ( 2 - max - min ) : d / ( max + min ); + switch ( max ) { + case r: h = ( g - b ) / d + ( g < b ? 6 : 0 ); + break; + case g: h = ( b - r ) / d + 2; + break; + case b: h = ( r - g ) / d + 4; + break; + } + h /= 6; + } + + // maintain hue & sat if we've been manipulating things in the HSL space. + h = Math.round( h * 360 ); + if ( h === 0 && this._hsl.h !== h ) { + h = this._hsl.h; + } + s = Math.round( s * 100 ); + if ( s === 0 && this._hsl.s ) { + s = this._hsl.s; + } + + return { + h: h, + s: s, + l: Math.round( l * 100 ) + }; + + }, + + toHsv: function() { + var rgb = this.toRgb(); + var r = rgb.r / 255, g = rgb.g / 255, b = rgb.b / 255; + var max = Math.max( r, g, b ), min = Math.min( r, g, b ); + var h, s, v = max; + var d = max - min; + s = max === 0 ? 0 : d / max; + + if ( max === min ) { + h = s = 0; // achromatic + } else { + switch( max ){ + case r: + h = ( g - b ) / d + ( g < b ? 6 : 0 ); + break; + case g: + h = ( b - r ) / d + 2; + break; + case b: + h = ( r - g ) / d + 4; + break; + } + h /= 6; + } + + // maintain hue & sat if we've been manipulating things in the HSV space. + h = Math.round( h * 360 ); + if ( h === 0 && this._hsv.h !== h ) { + h = this._hsv.h; + } + s = Math.round( s * 100 ); + if ( s === 0 && this._hsv.s ) { + s = this._hsv.s; + } + + return { + h: h, + s: s, + v: Math.round( v * 100 ) + }; + }, + + toInt: function() { + return this._color; + }, + + toIEOctoHex: function() { + // AARRBBGG + var hex = this.toString(); + var AA = parseInt( 255 * this._alpha, 10 ).toString(16); + if ( AA.length === 1 ) { + AA = '0' + AA; + } + return '#' + AA + hex.replace(/^#/, '' ); + }, + + toLuminosity: function() { + var rgb = this.toRgb(); + return 0.2126 * Math.pow( rgb.r / 255, 2.2 ) + 0.7152 * Math.pow( rgb.g / 255, 2.2 ) + 0.0722 * Math.pow( rgb.b / 255, 2.2); + }, + + getDistanceLuminosityFrom: function( color ) { + if ( ! ( color instanceof Color ) ) { + throw 'getDistanceLuminosityFrom requires a Color object'; + } + var lum1 = this.toLuminosity(); + var lum2 = color.toLuminosity(); + if ( lum1 > lum2 ) { + return ( lum1 + 0.05 ) / ( lum2 + 0.05 ); + } + else { + return ( lum2 + 0.05 ) / ( lum1 + 0.05 ); + } + }, + + getMaxContrastColor: function() { + var lum = this.toLuminosity(); + var hex = ( lum >= 0.5 ) ? '000000' : 'ffffff'; + return new Color( hex ); + }, + + getReadableContrastingColor: function( bgColor, minContrast ) { + if ( ! bgColor instanceof Color ) { + return this; + } + + // you shouldn't use less than 5, but you might want to. + var targetContrast = ( minContrast === undef ) ? 5 : minContrast; + // working things + var contrast = bgColor.getDistanceLuminosityFrom( this ); + var maxContrastColor = bgColor.getMaxContrastColor(); + var maxContrast = maxContrastColor.getDistanceLuminosityFrom( bgColor ); + + // if current max contrast is less than the target contrast, we had wishful thinking. + // still, go max + if ( maxContrast <= targetContrast ) { + return maxContrastColor; + } + // or, we might already have sufficient contrast + else if ( contrast >= targetContrast ) { + return this; + } + + var incr = ( 0 === maxContrastColor.toInt() ) ? -1 : 1; + while ( contrast < targetContrast ) { + this.l( incr, true ); // 2nd arg turns this into an incrementer + contrast = this.getDistanceLuminosityFrom( bgColor ); + // infininite loop prevention: you never know. + if ( this._color === 0 || this._color === 16777215 ) { + break; + } + } + + return this; + + }, + + a: function( val ) { + if ( val === undef ) + return this._alpha; + + var a = parseFloat( val ); + + if ( isNaN( a ) ) + return this._error(); + + this._alpha = a; + return this; + }, + + // TRANSFORMS + + darken: function( amount ) { + amount = amount || 5; + return this.l( - amount, true ); + }, + + lighten: function( amount ) { + amount = amount || 5; + return this.l( amount, true ); + }, + + saturate: function( amount ) { + amount = amount || 15; + return this.s( amount, true ); + }, + + desaturate: function( amount ) { + amount = amount || 15; + return this.s( - amount, true ); + }, + + toGrayscale: function() { + return this.setHSpace('hsl').s( 0 ); + }, + + getComplement: function() { + return this.h( 180, true ); + }, + + getSplitComplement: function( step ) { + step = step || 1; + var incr = 180 + ( step * 30 ); + return this.h( incr, true ); + }, + + getAnalog: function( step ) { + step = step || 1; + var incr = step * 30; + return this.h( incr, true ); + }, + + getTetrad: function( step ) { + step = step || 1; + var incr = step * 60; + return this.h( incr, true ); + }, + + getTriad: function( step ) { + step = step || 1; + var incr = step * 120; + return this.h( incr, true ); + }, + + _partial: function( key ) { + var prop = shortProps[key]; + return function( val, incr ) { + var color = this._spaceFunc('to', prop.space); + + // GETTER + if ( val === undef ) + return color[key]; + + // INCREMENT + if ( incr === true ) + val = color[key] + val; + + // MOD & RANGE + if ( prop.mod ) + val = val % prop.mod; + if ( prop.range ) + val = ( val < prop.range[0] ) ? prop.range[0] : ( val > prop.range[1] ) ? prop.range[1] : val; + + // NEW VALUE + color[key] = val; + + return this._spaceFunc('from', prop.space, color); + }; + }, + + _spaceFunc: function( dir, s, val ) { + var space = s || this._hSpace, + funcName = dir + space.charAt(0).toUpperCase() + space.substr(1); + return this[funcName](val); + } + }; + + var shortProps = { + h: { + mod: 360 + }, + s: { + range: [0,100] + }, + l: { + space: 'hsl', + range: [0,100] + }, + v: { + space: 'hsv', + range: [0,100] + }, + r: { + space: 'rgb', + range: [0,255] + }, + g: { + space: 'rgb', + range: [0,255] + }, + b: { + space: 'rgb', + range: [0,255] + } + }; + + for ( var key in shortProps ) { + if ( shortProps.hasOwnProperty( key ) ) + Color.fn[key] = Color.fn._partial(key); + } + + // play nicely with Node + browser + if ( typeof exports === 'object' ) + module.exports = Color; + else + global.Color = Color; + +}(this)); diff --git a/lib/plugins/styler/script.js b/lib/plugins/styler/script.js index d472c4fe7..b71e46802 100644 --- a/lib/plugins/styler/script.js +++ b/lib/plugins/styler/script.js @@ -1,6 +1,8 @@ +/* DOKUWIKI:include_once iris.js */ + jQuery(function () { // user openend the admin page, set cookie and redirect - if(jQuery('#plugin__styler').length) { + if (jQuery('#plugin__styler').length) { DokuCookie.setValue('styler_plugin', 1); document.location.href = DOKU_BASE; } @@ -22,11 +24,12 @@ jQuery(function () { $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); // open the dialog - $dialog.dialog({ + var $dlg = $dialog.dialog({ 'title': LANG.plugins.styler.menu, 'width': 500, 'top': 50, - 'position': { 'my': 'left top', 'at': 'left top', 'of': window }, + 'maxHeight': 500, + 'position': { 'my': 'left bottom', 'at': 'left bottom', 'of': window }, // bring everything back to normal 'close': function (event, ui) { // disable the styler plugin again @@ -35,6 +38,10 @@ jQuery(function () { document.location.reload() } }); + + jQuery('.styler .color').iris({ + }); + } ); } -- cgit v1.2.3 From 9fb9909916c8ce7fbca17d536942c0166afe487c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 May 2015 17:58:50 +0200 Subject: added more localization --- lib/plugins/styler/admin.php | 8 +++++++- lib/plugins/styler/lang/en/intro.txt | 4 ++-- lib/plugins/styler/lang/en/lang.php | 11 +++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php index 8d44ac6f5..4269a0ee7 100644 --- a/lib/plugins/styler/admin.php +++ b/lib/plugins/styler/admin.php @@ -82,8 +82,12 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { echo ''; foreach($replacements as $key => $value) { + $name = tpl_getLang($key); + if(empty($name)) $name = $this->getLang($key); + if(empty($name)) $name = $key; + echo ''; - echo ''; + echo ''; echo ''; } @@ -104,6 +108,8 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { echo ''; + echo tpl_locale_xhtml('style'); + } } diff --git a/lib/plugins/styler/lang/en/intro.txt b/lib/plugins/styler/lang/en/intro.txt index bb9e3ff33..4ea55172f 100644 --- a/lib/plugins/styler/lang/en/intro.txt +++ b/lib/plugins/styler/lang/en/intro.txt @@ -1,2 +1,2 @@ -This tool allows you to change certain style settings of your currently selected template -all changes are stored in a local configuration file and are upgrade safe. \ No newline at end of file +This tool allows you to change certain style settings of your currently selected template. +All changes are stored in a local configuration file and are upgrade safe. \ No newline at end of file diff --git a/lib/plugins/styler/lang/en/lang.php b/lib/plugins/styler/lang/en/lang.php index 2dd7921b0..1bf8efa2c 100644 --- a/lib/plugins/styler/lang/en/lang.php +++ b/lib/plugins/styler/lang/en/lang.php @@ -16,6 +16,17 @@ $lang['btn_save'] = 'Save your changes'; $lang['btn_reset'] = 'Reset your current changes'; $lang['btn_revert'] = 'Revert all styles back to the template\'s default'; +// default guaranteed placeholders +$lang['__text__'] = 'Main text color'; +$lang['__background__'] = 'Main text background color'; +$lang['__text_alt__'] = 'Alternative text color'; +$lang['__background_alt__'] = 'Alternative text background color'; +$lang['__text_neu__'] = 'Neutral text color'; +$lang['__background_neu__'] = 'Neutral text background color'; +$lang['__border__'] = 'Border color'; +$lang['__highlight__'] = 'Highlight color (for search results mainly)'; + + //Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From b1a864fe66dcf7f538e4d304cc01ea9ec736b786 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 May 2015 19:45:15 +0200 Subject: fix keeping the current page --- lib/plugins/styler/action.php | 3 +++ lib/plugins/styler/admin.php | 1 - lib/plugins/styler/script.js | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styler/action.php b/lib/plugins/styler/action.php index b63cf3ec1..35e2f8f3c 100644 --- a/lib/plugins/styler/action.php +++ b/lib/plugins/styler/action.php @@ -90,6 +90,9 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { $event->preventDefault(); $event->stopPropagation(); + global $ID; + $ID = getID(); + /** @var admin_plugin_styler $hlp */ $hlp = plugin_load('admin', 'styler'); $hlp->form(true); diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php index 4269a0ee7..432b22279 100644 --- a/lib/plugins/styler/admin.php +++ b/lib/plugins/styler/admin.php @@ -61,7 +61,6 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { public function form($isajax) { global $conf; global $ID; - $tpl = $conf['template']; define('SIMPLE_TEST', 1); // hack, ideally certain functions should be moved out of css.php require_once(DOKU_INC.'lib/exe/css.php'); $styleini = css_styleini($conf['template'], true); diff --git a/lib/plugins/styler/script.js b/lib/plugins/styler/script.js index b71e46802..1c53987a4 100644 --- a/lib/plugins/styler/script.js +++ b/lib/plugins/styler/script.js @@ -4,7 +4,7 @@ jQuery(function () { // user openend the admin page, set cookie and redirect if (jQuery('#plugin__styler').length) { DokuCookie.setValue('styler_plugin', 1); - document.location.href = DOKU_BASE; + document.location.href = document.location.href.replace(/do=admin/, ''); } // The Styler Dialog is currently enabled, display it here and apply the preview styles @@ -15,7 +15,8 @@ jQuery(function () { $dialog.load( DOKU_BASE + '/lib/exe/ajax.php', { - 'call': 'plugin_styler' + 'call': 'plugin_styler', + 'id': JSINFO.id }, function () { // load the preview template -- cgit v1.2.3 From a93f9a7aab0ddcc00415f5b4e0c6876751a4d4c1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 May 2015 19:48:18 +0200 Subject: allow resizing the dialog --- lib/plugins/styler/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styler/script.js b/lib/plugins/styler/script.js index 1c53987a4..79df8a88b 100644 --- a/lib/plugins/styler/script.js +++ b/lib/plugins/styler/script.js @@ -16,7 +16,7 @@ jQuery(function () { DOKU_BASE + '/lib/exe/ajax.php', { 'call': 'plugin_styler', - 'id': JSINFO.id + 'id': JSINFO.id }, function () { // load the preview template @@ -28,8 +28,8 @@ jQuery(function () { var $dlg = $dialog.dialog({ 'title': LANG.plugins.styler.menu, 'width': 500, + 'height': 500, 'top': 50, - 'maxHeight': 500, 'position': { 'my': 'left bottom', 'at': 'left bottom', 'of': window }, // bring everything back to normal 'close': function (event, ui) { -- cgit v1.2.3 From d071b66c820e5b1ecc60efc27a15e113c88832af Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 May 2015 20:40:33 +0200 Subject: autopreview in styler plugin --- lib/plugins/styler/action.php | 7 ++- lib/plugins/styler/admin.php | 8 +-- lib/plugins/styler/script.js | 119 ++++++++++++++++++++++++++++-------------- 3 files changed, 91 insertions(+), 43 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styler/action.php b/lib/plugins/styler/action.php index 35e2f8f3c..1cc712a15 100644 --- a/lib/plugins/styler/action.php +++ b/lib/plugins/styler/action.php @@ -91,11 +91,16 @@ class action_plugin_styler extends DokuWiki_Action_Plugin { $event->stopPropagation(); global $ID; + global $INPUT; $ID = getID(); /** @var admin_plugin_styler $hlp */ $hlp = plugin_load('admin', 'styler'); - $hlp->form(true); + if($INPUT->str('run') == 'preview') { + $hlp->run_preview(); + } else { + $hlp->form(true); + } } } diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php index 432b22279..a66dfbb11 100644 --- a/lib/plugins/styler/admin.php +++ b/lib/plugins/styler/admin.php @@ -87,13 +87,13 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { echo ''; echo ''; - echo ''; } echo '
'.$key.''.$name.'colorClass($key).' />'; echo '
'.$name.'colorClass($key).' />'; + echo 'colorClass($key).' />'; echo '
'; echo '

'; - echo ''; + echo ''; echo ''; #FIXME only if preview.ini exists echo '

'; @@ -139,9 +139,9 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { } /** - * saves the preview.ini + * saves the preview.ini (alos called from ajax directly) */ - protected function run_preview() { + public function run_preview() { global $conf; $ini = $conf['cachedir'].'/preview.ini'; io_saveFile($ini, $this->makeini()); diff --git a/lib/plugins/styler/script.js b/lib/plugins/styler/script.js index 79df8a88b..a4fb601c8 100644 --- a/lib/plugins/styler/script.js +++ b/lib/plugins/styler/script.js @@ -7,43 +7,86 @@ jQuery(function () { document.location.href = document.location.href.replace(/do=admin/, ''); } - // The Styler Dialog is currently enabled, display it here and apply the preview styles - if (DokuCookie.getValue('styler_plugin') == 1) { - // load dialog - var $dialog = jQuery(document.createElement('div')); - jQuery('body').append($dialog); - $dialog.load( - DOKU_BASE + '/lib/exe/ajax.php', - { - 'call': 'plugin_styler', - 'id': JSINFO.id - }, - function () { - // load the preview template - var now = new Date().getTime(); - var $style = jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); - $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); - - // open the dialog - var $dlg = $dialog.dialog({ - 'title': LANG.plugins.styler.menu, - 'width': 500, - 'height': 500, - 'top': 50, - 'position': { 'my': 'left bottom', 'at': 'left bottom', 'of': window }, - // bring everything back to normal - 'close': function (event, ui) { - // disable the styler plugin again - DokuCookie.setValue('styler_plugin', 0); - // reload - document.location.reload() - } - }); - - jQuery('.styler .color').iris({ - }); - - } - ); + // continue only if the Styler Dialog is currently enabled + if (DokuCookie.getValue('styler_plugin') != 1) return; + + var styler_timeout = null; + + // create dialog element + var $dialog = jQuery(document.createElement('div')); + jQuery('body').append($dialog); + + + /** + * updates the current CSS with a new preview one + */ + function styler_updateCSS() { + var now = new Date().getTime(); + var $style = jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); + $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); + } + + /** + * save current values and reload preview (debounced) + */ + function styler_saveAndUpdate() { + if (styler_timeout) window.clearTimeout(styler_timeout); + styler_timeout = window.setTimeout(function () { + styler_timeout = null; + + var params = $dialog.find('input[type=text]').serializeArray(); + params[params.length] = { name: 'call', value: 'plugin_styler'}; + params[params.length] = {name: 'run', value: 'preview'}; + + jQuery.post( + DOKU_BASE + '/lib/exe/ajax.php', + params, + styler_updateCSS + ); + }, 500); } + + // load the dialog content and apply listeners + $dialog.load( + DOKU_BASE + '/lib/exe/ajax.php', + { + 'call': 'plugin_styler', + 'run': 'html', + 'id': JSINFO.id + }, + function () { + // load the preview template + styler_updateCSS(); + + // open the dialog + $dialog.dialog({ + 'title': LANG.plugins.styler.menu, + 'width': 500, + 'height': 500, + 'top': 50, + 'position': { 'my': 'left bottom', 'at': 'left bottom', 'of': window }, + // bring everything back to normal + 'close': function (event, ui) { + // disable the styler plugin again + DokuCookie.setValue('styler_plugin', 0); + // reload + document.location.reload() + } + }); + + // we don't need the manual preview in JS mode + $dialog.find('.btn_preview').hide(); + + // add the color picker FIXME add saveAndUpdate to correct event + $dialog.find('.color').iris({ }); + + // listen to keyup events + $dialog.find('input[type=text]').keyup(function () { + console.log('change'); + styler_saveAndUpdate(); + }); + + } + ); + }); \ No newline at end of file -- cgit v1.2.3 From a2237e348f84c81fd0f16da7aa55d1caeaf62a6b Mon Sep 17 00:00:00 2001 From: Noel Tilliot Date: Mon, 18 May 2015 17:21:45 +0200 Subject: translation update --- lib/plugins/authmysql/lang/de/lang.php | 8 ++++++++ lib/plugins/extension/lang/de/lang.php | 4 ++++ 2 files changed, 12 insertions(+) create mode 100644 lib/plugins/authmysql/lang/de/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authmysql/lang/de/lang.php b/lib/plugins/authmysql/lang/de/lang.php new file mode 100644 index 000000000..6160f60ea --- /dev/null +++ b/lib/plugins/authmysql/lang/de/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['usernotexists'] = 'Sorry, dieser Nutzer existiert nicht.'; diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php index ce5495e24..ef3197513 100644 --- a/lib/plugins/extension/lang/de/lang.php +++ b/lib/plugins/extension/lang/de/lang.php @@ -8,6 +8,7 @@ * @author Simon * @author Hoisl * @author Dominik Mahr + * @author Noel Tilliot */ $lang['menu'] = 'Erweiterungen verwalten'; $lang['tab_plugins'] = 'Installierte Plugins'; @@ -29,6 +30,9 @@ $lang['btn_disable'] = 'Deaktivieren'; $lang['btn_install'] = 'Installieren'; $lang['btn_reinstall'] = 'Neu installieren'; $lang['js']['reallydel'] = 'Wollen Sie diese Erweiterung wirklich löschen?'; +$lang['js']['display_viewoptions'] = 'Optionen anzeigen'; +$lang['js']['display_enabled'] = 'aktiviert'; +$lang['js']['display_disabled'] = 'deaktiviert'; $lang['search_for'] = 'Erweiterung suchen:'; $lang['search'] = 'Suchen'; $lang['extensionby'] = '%s von %s'; -- cgit v1.2.3 From 123bc813fd93ab5d8dab3cc4a66a09e613a10aa2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 23 May 2015 15:29:33 +0200 Subject: renamed plugin from styler to styling styler was already taken --- lib/plugins/styler/.travis.yml | 13 - lib/plugins/styler/README | 27 - lib/plugins/styler/_test/general.test.php | 33 - lib/plugins/styler/action.php | 108 -- lib/plugins/styler/admin.php | 215 ---- lib/plugins/styler/iris.js | 1488 ---------------------------- lib/plugins/styler/lang/en/intro.txt | 2 - lib/plugins/styler/lang/en/lang.php | 32 - lib/plugins/styler/plugin.info.txt | 7 - lib/plugins/styler/script.js | 92 -- lib/plugins/styling/.travis.yml | 13 + lib/plugins/styling/README | 27 + lib/plugins/styling/_test/general.test.php | 33 + lib/plugins/styling/action.php | 108 ++ lib/plugins/styling/admin.php | 215 ++++ lib/plugins/styling/iris.js | 1488 ++++++++++++++++++++++++++++ lib/plugins/styling/lang/en/intro.txt | 2 + lib/plugins/styling/lang/en/lang.php | 32 + lib/plugins/styling/plugin.info.txt | 7 + lib/plugins/styling/script.js | 92 ++ 20 files changed, 2017 insertions(+), 2017 deletions(-) delete mode 100644 lib/plugins/styler/.travis.yml delete mode 100644 lib/plugins/styler/README delete mode 100644 lib/plugins/styler/_test/general.test.php delete mode 100644 lib/plugins/styler/action.php delete mode 100644 lib/plugins/styler/admin.php delete mode 100644 lib/plugins/styler/iris.js delete mode 100644 lib/plugins/styler/lang/en/intro.txt delete mode 100644 lib/plugins/styler/lang/en/lang.php delete mode 100644 lib/plugins/styler/plugin.info.txt delete mode 100644 lib/plugins/styler/script.js create mode 100644 lib/plugins/styling/.travis.yml create mode 100644 lib/plugins/styling/README create mode 100644 lib/plugins/styling/_test/general.test.php create mode 100644 lib/plugins/styling/action.php create mode 100644 lib/plugins/styling/admin.php create mode 100644 lib/plugins/styling/iris.js create mode 100644 lib/plugins/styling/lang/en/intro.txt create mode 100644 lib/plugins/styling/lang/en/lang.php create mode 100644 lib/plugins/styling/plugin.info.txt create mode 100644 lib/plugins/styling/script.js (limited to 'lib/plugins') diff --git a/lib/plugins/styler/.travis.yml b/lib/plugins/styler/.travis.yml deleted file mode 100644 index d80c0691f..000000000 --- a/lib/plugins/styler/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Config file for travis-ci.org - -language: php -php: - - "5.5" - - "5.4" - - "5.3" -env: - - DOKUWIKI=master - - DOKUWIKI=stable -before_install: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh -install: sh travis.sh -script: cd _test && phpunit --stderr --group plugin_styler \ No newline at end of file diff --git a/lib/plugins/styler/README b/lib/plugins/styler/README deleted file mode 100644 index 37a966352..000000000 --- a/lib/plugins/styler/README +++ /dev/null @@ -1,27 +0,0 @@ -styler Plugin for DokuWiki - -Allows to edit style.ini replacements - -All documentation for this plugin can be found at -https://www.dokuwiki.org/plugin:styler - -If you install this plugin manually, make sure it is installed in -lib/plugins/styler/ - if the folder is called different it -will not work! - -Please refer to http://www.dokuwiki.org/plugins for additional info -on how to install plugins in DokuWiki. - ----- -Copyright (C) Andreas Gohr - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; version 2 of the License - -This program 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 General Public License for more details. - -See the COPYING file in your DokuWiki folder for details diff --git a/lib/plugins/styler/_test/general.test.php b/lib/plugins/styler/_test/general.test.php deleted file mode 100644 index 8b0712a20..000000000 --- a/lib/plugins/styler/_test/general.test.php +++ /dev/null @@ -1,33 +0,0 @@ -assertFileExists($file); - - $info = confToHash($file); - - $this->assertArrayHasKey('base', $info); - $this->assertArrayHasKey('author', $info); - $this->assertArrayHasKey('email', $info); - $this->assertArrayHasKey('date', $info); - $this->assertArrayHasKey('name', $info); - $this->assertArrayHasKey('desc', $info); - $this->assertArrayHasKey('url', $info); - - $this->assertEquals('styler', $info['base']); - $this->assertRegExp('/^https?:\/\//', $info['url']); - $this->assertTrue(mail_isvalid($info['email'])); - $this->assertRegExp('/^\d\d\d\d-\d\d-\d\d$/', $info['date']); - $this->assertTrue(false !== strtotime($info['date'])); - } -} diff --git a/lib/plugins/styler/action.php b/lib/plugins/styler/action.php deleted file mode 100644 index 1cc712a15..000000000 --- a/lib/plugins/styler/action.php +++ /dev/null @@ -1,108 +0,0 @@ - - */ - -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -/** - * Class action_plugin_styler - * - * This handles all the save actions and loading the interface - * - * All this usually would be done within an admin plugin, but we want to have this available outside - * the admin interface using our floating dialog. - */ -class action_plugin_styler extends DokuWiki_Action_Plugin { - - /** - * Registers a callback functions - * - * @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'); - $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_action'); - $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle_header'); - } - - /** - * Adds the preview parameter to the stylesheet loading in non-js mode - * - * @param Doku_Event $event event object by reference - * @param mixed $param [the parameters passed as fifth argument to register_hook() when this - * handler was registered] - * @return void - */ - public function handle_header(Doku_Event &$event, $param) { - global $ACT; - global $INPUT; - if($ACT != 'admin' || $INPUT->str('page') != 'styler') return; - if(!auth_isadmin()) return; - - // set preview - $len = count($event->data['link']); - for($i = 0; $i < $len; $i++) { - if( - $event->data['link'][$i]['rel'] == 'stylesheet' && - strpos($event->data['link'][$i]['href'], 'lib/exe/css.php') !== false - ) { - $event->data['link'][$i]['href'] .= '&preview=1&tseed='.time(); - } - } - } - - /** - * Updates the style.ini settings by passing it on to handle() of the admin component - * - * @param Doku_Event $event event object by reference - * @param mixed $param [the parameters passed as fifth argument to register_hook() when this - * handler was registered] - * @return void - */ - public function handle_action(Doku_Event &$event, $param) { - if($event->data != 'styler_plugin') return; - if(!auth_isadmin()) return; - $event->data = 'show'; - - /** @var admin_plugin_styler $hlp */ - $hlp = plugin_load('admin', 'styler'); - $hlp->handle(); - } - - /** - * Create the style form in the floating Dialog - * - * @param Doku_Event $event event object by reference - * @param mixed $param [the parameters passed as fifth argument to register_hook() when this - * handler was registered] - * @return void - */ - - public function handle_ajax(Doku_Event &$event, $param) { - if($event->data != 'plugin_styler') return; - if(!auth_isadmin()) return; - $event->preventDefault(); - $event->stopPropagation(); - - global $ID; - global $INPUT; - $ID = getID(); - - /** @var admin_plugin_styler $hlp */ - $hlp = plugin_load('admin', 'styler'); - if($INPUT->str('run') == 'preview') { - $hlp->run_preview(); - } else { - $hlp->form(true); - } - } - -} - -// vim:ts=4:sw=4:et: diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php deleted file mode 100644 index a66dfbb11..000000000 --- a/lib/plugins/styler/admin.php +++ /dev/null @@ -1,215 +0,0 @@ - - */ - -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -class admin_plugin_styler extends DokuWiki_Admin_Plugin { - - /** - * @return int sort number in admin menu - */ - public function getMenuSort() { - return 1000; - } - - /** - * @return bool true if only access for superuser, false is for superusers and moderators - */ - public function forAdminOnly() { - return true; - } - - /** - * @param string $language - * @return string - */ - public function getMenuText($language) { - $js = $this->getLang('js'); - return $js['menu']; - } - - /** - * handle the different actions (also called from ajax) - */ - public function handle() { - global $INPUT; - $run = $INPUT->extract('run')->str('run'); - if(!$run) return; - $run = "run_$run"; - $this->$run(); - } - - /** - * Render HTML output, e.g. helpful text and a form - */ - public function html() { - echo '
'; - ptln('

'.$this->getMenuText('').'

'); - $this->form(false); - echo '
'; - } - - /** - * Create the actual editing form - */ - public function form($isajax) { - global $conf; - global $ID; - define('SIMPLE_TEST', 1); // hack, ideally certain functions should be moved out of css.php - require_once(DOKU_INC.'lib/exe/css.php'); - $styleini = css_styleini($conf['template'], true); - $replacements = $styleini['replacements']; - - if($isajax) { - $target = wl($ID, array('do' => 'styler_plugin')); - } else { - $target = wl($ID, array('do' => 'admin', 'page' => 'styler')); - } - - if(empty($replacements)) { - echo '

'.$this->getLang('error').'

'; - } else { - echo $this->locale_xhtml('intro'); - - echo '
'; - - echo ''; - foreach($replacements as $key => $value) { - $name = tpl_getLang($key); - if(empty($name)) $name = $this->getLang($key); - if(empty($name)) $name = $key; - - echo ''; - echo ''; - echo ''; - } - echo '
'.$name.'colorClass($key).' />'; - echo '
'; - - echo '

'; - echo ''; - echo ''; #FIXME only if preview.ini exists - echo '

'; - - echo '

'; - echo ''; - echo '

'; - - echo '

'; - echo ''; #FIXME only if local.ini exists - echo '

'; - - echo '
'; - - echo tpl_locale_xhtml('style'); - - } - } - - /** - * set the color class attribute - */ - protected function colorClass($key) { - static $colors = array( - 'text', - 'background', - 'text_alt', - 'background_alt', - 'text_neu', - 'background_neu', - 'border', - 'highlight', - 'background_site', - 'link', - 'existing', - 'missing', - ); - - if(preg_match('/colou?r/', $key) || in_array(trim($key,'_'), $colors)) { - return 'class="color"'; - } else { - return ''; - } - } - - /** - * saves the preview.ini (alos called from ajax directly) - */ - public function run_preview() { - global $conf; - $ini = $conf['cachedir'].'/preview.ini'; - io_saveFile($ini, $this->makeini()); - } - - /** - * deletes the preview.ini - */ - protected function run_reset() { - global $conf; - $ini = $conf['cachedir'].'/preview.ini'; - io_saveFile($ini, ''); - } - - /** - * deletes the local style.ini replacements - */ - protected function run_revert() { - $this->replaceini(''); - $this->run_reset(); - } - - /** - * save the local style.ini replacements - */ - protected function run_save() { - $this->replaceini($this->makeini()); - $this->run_reset(); - } - - /** - * create the replacement part of a style.ini from submitted data - * - * @return string - */ - protected function makeini() { - global $INPUT; - - $ini = "[replacements]\n"; - $ini .= ";These overwrites have been generated from the Template Styler Admin interface\n"; - $ini .= ";Any values in this section will be overwritten by that tool again\n"; - foreach($INPUT->arr('tpl') as $key => $val) { - $ini .= $key.' = "'.addslashes($val).'"'."\n"; - } - - return $ini; - } - - /** - * replaces the replacement parts in the local ini - * - * @param string $new the new ini contents - */ - protected function replaceini($new) { - global $conf; - $ini = DOKU_CONF."tpl/".$conf['template']."/style.ini"; - if(file_exists($ini)) { - $old = io_readFile($ini); - $old = preg_replace('/\[replacements\]\n.*?(\n\[.*]|$)/s', '\\1', $old); - $old = trim($old); - } else { - $old = ''; - } - - io_makeFileDir($ini); - io_saveFile($ini, "$old\n\n$new"); - } - -} - -// vim:ts=4:sw=4:et: \ No newline at end of file diff --git a/lib/plugins/styler/iris.js b/lib/plugins/styler/iris.js deleted file mode 100644 index 4eda5022e..000000000 --- a/lib/plugins/styler/iris.js +++ /dev/null @@ -1,1488 +0,0 @@ -/*! Iris Color Picker - v1.0.7 - 2014-11-28 -* https://github.com/Automattic/Iris -* Copyright (c) 2014 Matt Wiebe; Licensed GPLv2 */ -(function( $, undef ){ - var _html, nonGradientIE, gradientType, vendorPrefixes, _css, Iris, UA, isIE, IEVersion; - - _html = '
'; - _css = '.iris-picker{display:block;position:relative}.iris-picker,.iris-picker *{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input+.iris-picker{margin-top:4px}.iris-error{background-color:#ffafaf}.iris-border{border-radius:3px;border:1px solid #aaa;width:200px;background-color:#fff}.iris-picker-inner{position:absolute;top:0;right:0;left:0;bottom:0}.iris-border .iris-picker-inner{top:10px;right:10px;left:10px;bottom:10px}.iris-picker .iris-square-inner{position:absolute;left:0;right:0;top:0;bottom:0}.iris-picker .iris-square,.iris-picker .iris-slider,.iris-picker .iris-square-inner,.iris-picker .iris-palette{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,.4);height:100%;width:12.5%;float:left;margin-right:5%}.iris-picker .iris-square{width:76%;margin-right:10%;position:relative}.iris-picker .iris-square-inner{width:auto;margin:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-square-inner,.iris-ie-9 .iris-palette{box-shadow:none;border-radius:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-palette{outline:1px solid rgba(0,0,0,.1)}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iris-ie-lt9 .iris-square-inner,.iris-ie-lt9 .iris-palette{outline:1px solid #aaa}.iris-ie-lt9 .iris-square .ui-slider-handle{outline:1px solid #aaa;background-color:#fff;-ms-filter:"alpha(Opacity=30)"}.iris-ie-lt9 .iris-square .iris-square-handle{background:0;border:3px solid #fff;-ms-filter:"alpha(Opacity=50)"}.iris-picker .iris-strip{margin-right:0;position:relative}.iris-picker .iris-strip .ui-slider-handle{position:absolute;background:0;margin:0;right:-3px;left:-3px;border:4px solid #aaa;border-width:4px 3px;width:auto;height:6px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;z-index:5;cursor:ns-resize}.iris-strip .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.iris-picker .iris-slider-offset{position:absolute;top:11px;left:0;right:0;bottom:-3px;width:auto;height:auto;background:transparent;border:0;border-radius:0}.iris-picker .iris-square-handle{background:transparent;border:5px solid #aaa;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.iris-picker .iris-square-handle:hover{border-color:#999}.iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.iris-picker .iris-square-handle:hover::after{border-color:#fff}.iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.iris-palette-container{position:absolute;bottom:0;left:0;margin:0;padding:0}.iris-border .iris-palette-container{left:10px;bottom:10px}.iris-picker .iris-palette{margin:0;cursor:pointer}.iris-square-handle,.ui-slider-handle{border:0;outline:0}'; - - // Even IE9 dosen't support gradients. Elaborate sigh. - UA = navigator.userAgent.toLowerCase(); - isIE = navigator.appName === 'Microsoft Internet Explorer'; - IEVersion = isIE ? parseFloat( UA.match( /msie ([0-9]{1,}[\.0-9]{0,})/ )[1] ) : 0; - nonGradientIE = ( isIE && IEVersion < 10 ); - gradientType = false; - - // we don't bother with an unprefixed version, as it has a different syntax - vendorPrefixes = [ '-moz-', '-webkit-', '-o-', '-ms-' ]; - - // Bail for IE <= 7 - if ( nonGradientIE && IEVersion <= 7 ) { - $.fn.iris = $.noop; - $.support.iris = false; - return; - } - - $.support.iris = true; - - function testGradientType() { - var el, base, - bgImageString = 'backgroundImage'; - - if ( nonGradientIE ) { - gradientType = 'filter'; - } - else { - el = $( '
' ); - base = 'linear-gradient(top,#fff,#000)'; - $.each( vendorPrefixes, function( i, val ){ - el.css( bgImageString, val + base ); - if ( el.css( bgImageString ).match( 'gradient' ) ) { - gradientType = i; - return false; - } - }); - // check for legacy webkit gradient syntax - if ( gradientType === false ) { - el.css( 'background', '-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))' ); - if ( el.css( bgImageString ).match( 'gradient' ) ) { - gradientType = 'webkit'; - } - } - el.remove(); - } - - } - - /** - * Only for CSS3 gradients. oldIE will use a separate function. - * - * Accepts as many color stops as necessary from 2nd arg on, or 2nd - * arg can be an array of color stops - * - * @param {string} origin Gradient origin - top or left, defaults to left. - * @return {string} Appropriate CSS3 gradient string for use in - */ - function createGradient( origin, stops ) { - origin = ( origin === 'top' ) ? 'top' : 'left'; - stops = $.isArray( stops ) ? stops : Array.prototype.slice.call( arguments, 1 ); - if ( gradientType === 'webkit' ) { - return legacyWebkitGradient( origin, stops ); - } else { - return vendorPrefixes[ gradientType ] + 'linear-gradient(' + origin + ', ' + stops.join(', ') + ')'; - } - } - - /** - * Stupid gradients for a stupid browser. - */ - function stupidIEGradient( origin, stops ) { - var type, self, lastIndex, filter, startPosProp, endPosProp, dimensionProp, template, html; - - origin = ( origin === 'top' ) ? 'top' : 'left'; - stops = $.isArray( stops ) ? stops : Array.prototype.slice.call( arguments, 1 ); - // 8 hex: AARRGGBB - // GradientType: 0 vertical, 1 horizontal - type = ( origin === 'top' ) ? 0 : 1; - self = $( this ); - lastIndex = stops.length - 1; - filter = 'filter'; - startPosProp = ( type === 1 ) ? 'left' : 'top'; - endPosProp = ( type === 1 ) ? 'right' : 'bottom'; - dimensionProp = ( type === 1 ) ? 'height' : 'width'; - template = '
'; - html = ''; - // need a positioning context - if ( self.css('position') === 'static' ) { - self.css( {position: 'relative' } ); - } - - stops = fillColorStops( stops ); - $.each(stops, function( i, startColor ) { - var endColor, endStop, filterVal; - - // we want two at a time. if we're on the last pair, bail. - if ( i === lastIndex ) { - return false; - } - - endColor = stops[ i + 1 ]; - //if our pairs are at the same color stop, moving along. - if ( startColor.stop === endColor.stop ) { - return; - } - - endStop = 100 - parseFloat( endColor.stop ) + '%'; - startColor.octoHex = new Color( startColor.color ).toIEOctoHex(); - endColor.octoHex = new Color( endColor.color ).toIEOctoHex(); - - filterVal = 'progid:DXImageTransform.Microsoft.Gradient(GradientType=' + type + ', StartColorStr=\'' + startColor.octoHex + '\', EndColorStr=\'' + endColor.octoHex + '\')'; - html += template.replace( '%start%', startColor.stop ).replace( '%end%', endStop ).replace( '%filter%', filterVal ); - }); - self.find( '.iris-ie-gradient-shim' ).remove(); - $( html ).prependTo( self ); - } - - function legacyWebkitGradient( origin, colorList ) { - var stops = []; - origin = ( origin === 'top' ) ? '0% 0%,0% 100%,' : '0% 100%,100% 100%,'; - colorList = fillColorStops( colorList ); - $.each( colorList, function( i, val ){ - stops.push( 'color-stop(' + ( parseFloat( val.stop ) / 100 ) + ', ' + val.color + ')' ); - }); - return '-webkit-gradient(linear,' + origin + stops.join(',') + ')'; - } - - function fillColorStops( colorList ) { - var colors = [], - percs = [], - newColorList = [], - lastIndex = colorList.length - 1; - - $.each( colorList, function( index, val ) { - var color = val, - perc = false, - match = val.match( /1?[0-9]{1,2}%$/ ); - - if ( match ) { - color = val.replace( /\s?1?[0-9]{1,2}%$/, '' ); - perc = match.shift(); - } - colors.push( color ); - percs.push( perc ); - }); - - // back fill first and last - if ( percs[0] === false ) { - percs[0] = '0%'; - } - - if ( percs[lastIndex] === false ) { - percs[lastIndex] = '100%'; - } - - percs = backFillColorStops( percs ); - - $.each( percs, function( i ){ - newColorList[i] = { color: colors[i], stop: percs[i] }; - }); - return newColorList; - } - - function backFillColorStops( stops ) { - var first = 0, - last = stops.length - 1, - i = 0, - foundFirst = false, - incr, - steps, - step, - firstVal; - - if ( stops.length <= 2 || $.inArray( false, stops ) < 0 ) { - return stops; - } - while ( i < stops.length - 1 ) { - if ( ! foundFirst && stops[i] === false ) { - first = i - 1; - foundFirst = true; - } else if ( foundFirst && stops[i] !== false ) { - last = i; - i = stops.length; - } - i++; - } - steps = last - first; - firstVal = parseInt( stops[first].replace('%'), 10 ); - incr = ( parseFloat( stops[last].replace('%') ) - firstVal ) / steps; - i = first + 1; - step = 1; - while ( i < last ) { - stops[i] = ( firstVal + ( step * incr ) ) + '%'; - step++; - i++; - } - return backFillColorStops( stops ); - } - - $.fn.gradient = function() { - var args = arguments; - return this.each( function() { - // this'll be oldishIE - if ( nonGradientIE ) { - stupidIEGradient.apply( this, args ); - } else { - // new hotness - $( this ).css( 'backgroundImage', createGradient.apply( this, args ) ); - } - }); - }; - - $.fn.raninbowGradient = function( origin, args ) { - var opts, template, i, steps; - - origin = origin || 'top'; - opts = $.extend( {}, { s: 100, l: 50 }, args ); - template = 'hsl(%h%,' + opts.s + '%,' + opts.l + '%)'; - i = 0; - steps = []; - while ( i <= 360 ) { - steps.push( template.replace('%h%', i) ); - i += 30; - } - return this.each(function() { - $(this).gradient( origin, steps ); - }); - }; - - // the colorpicker widget def. - Iris = { - options: { - color: false, - mode: 'hsl', - controls: { - horiz: 's', // horizontal defaults to saturation - vert: 'l', // vertical defaults to lightness - strip: 'h' // right strip defaults to hue - }, - hide: true, // hide the color picker by default - border: true, // draw a border around the collection of UI elements - target: false, // a DOM element / jQuery selector that the element will be appended within. Only used when called on an input. - width: 200, // the width of the collection of UI elements - palettes: false // show a palette of basic colors beneath the square. - }, - _color: '', - _palettes: [ '#000', '#fff', '#d33', '#d93', '#ee2', '#81d742', '#1e73be', '#8224e3' ], - _inited: false, - _defaultHSLControls: { - horiz: 's', - vert: 'l', - strip: 'h' - }, - _defaultHSVControls: { - horiz: 'h', - vert: 'v', - strip: 's' - }, - _scale: { - h: 360, - s: 100, - l: 100, - v: 100 - }, - _create: function() { - var self = this, - el = self.element, - color = self.options.color || el.val(); - - if ( gradientType === false ) { - testGradientType(); - } - - if ( el.is( 'input' ) ) { - if ( self.options.target ) { - self.picker = $( _html ).appendTo( self.options.target ); - } else { - self.picker = $( _html ).insertAfter( el ); - } - - self._addInputListeners( el ); - } else { - el.append( _html ); - self.picker = el.find( '.iris-picker' ); - } - - // Browsers / Versions - // Feature detection doesn't work for these, and $.browser is deprecated - if ( isIE ) { - if ( IEVersion === 9 ) { - self.picker.addClass( 'iris-ie-9' ); - } else if ( IEVersion <= 8 ) { - self.picker.addClass( 'iris-ie-lt9' ); - } - } else if ( UA.indexOf('compatible') < 0 && UA.indexOf('khtml') < 0 && UA.match( /mozilla/ ) ) { - self.picker.addClass( 'iris-mozilla' ); - } - - if ( self.options.palettes ) { - self._addPalettes(); - } - - self._color = new Color( color ).setHSpace( self.options.mode ); - self.options.color = self._color.toString(); - - // prep 'em for re-use - self.controls = { - square: self.picker.find( '.iris-square' ), - squareDrag: self.picker.find( '.iris-square-value' ), - horiz: self.picker.find( '.iris-square-horiz' ), - vert: self.picker.find( '.iris-square-vert' ), - strip: self.picker.find( '.iris-strip' ), - stripSlider: self.picker.find( '.iris-strip .iris-slider-offset' ) - }; - - // small sanity check - if we chose hsv, change default controls away from hsl - if ( self.options.mode === 'hsv' && self._has('l', self.options.controls) ) { - self.options.controls = self._defaultHSVControls; - } else if ( self.options.mode === 'hsl' && self._has('v', self.options.controls) ) { - self.options.controls = self._defaultHSLControls; - } - - // store it. HSL gets squirrely - self.hue = self._color.h(); - - if ( self.options.hide ) { - self.picker.hide(); - } - - if ( self.options.border ) { - self.picker.addClass( 'iris-border' ); - } - - self._initControls(); - self.active = 'external'; - self._dimensions(); - self._change(); - }, - _has: function(needle, haystack) { - var ret = false; - $.each(haystack, function(i,v){ - if ( needle === v ) { - ret = true; - // exit the loop - return false; - } - }); - return ret; - }, - _addPalettes: function () { - var container = $( '
' ), - palette = $( '' ), - colors = $.isArray( this.options.palettes ) ? this.options.palettes : this._palettes; - - // do we have an existing container? Empty and reuse it. - if ( this.picker.find( '.iris-palette-container' ).length ) { - container = this.picker.find( '.iris-palette-container' ).detach().html( '' ); - } - - $.each(colors, function(index, val) { - palette.clone().data( 'color', val ) - .css( 'backgroundColor', val ).appendTo( container ) - .height( 10 ).width( 10 ); - }); - - this.picker.append(container); - }, - _paint: function() { - var self = this; - self._paintDimension( 'top', 'strip' ); - self._paintDimension( 'top', 'vert' ); - self._paintDimension( 'left', 'horiz' ); - }, - _paintDimension: function( origin, control ) { - var self = this, - c = self._color, - mode = self.options.mode, - color = self._getHSpaceColor(), - target = self.controls[ control ], - controlOpts = self.options.controls, - stops; - - // don't paint the active control - if ( control === self.active || ( self.active === 'square' && control !== 'strip' ) ) { - return; - } - - switch ( controlOpts[ control ] ) { - case 'h': - if ( mode === 'hsv' ) { - color = c.clone(); - switch ( control ) { - case 'horiz': - color[controlOpts.vert](100); - break; - case 'vert': - color[controlOpts.horiz](100); - break; - case 'strip': - color.setHSpace('hsl'); - break; - } - stops = color.toHsl(); - } else { - if ( control === 'strip' ) { - stops = { s: color.s, l: color.l }; - } else { - stops = { s: 100, l: color.l }; - } - } - - target.raninbowGradient( origin, stops ); - break; - case 's': - if ( mode === 'hsv' ) { - if ( control === 'vert' ) { - stops = [ c.clone().a(0).s(0).toCSS('rgba'), c.clone().a(1).s(0).toCSS('rgba') ]; - } else if ( control === 'strip' ) { - stops = [ c.clone().s(100).toCSS('hsl'), c.clone().s(0).toCSS('hsl') ]; - } else if ( control === 'horiz' ) { - stops = [ '#fff', 'hsl(' + color.h + ',100%,50%)' ]; - } - } else { // implicit mode === 'hsl' - if ( control === 'vert' && self.options.controls.horiz === 'h' ) { - stops = ['hsla(0, 0%, ' + color.l + '%, 0)', 'hsla(0, 0%, ' + color.l + '%, 1)']; - } else { - stops = ['hsl('+ color.h +',0%,50%)', 'hsl(' + color.h + ',100%,50%)']; - } - } - - - target.gradient( origin, stops ); - break; - case 'l': - if ( control === 'strip' ) { - stops = ['hsl(' + color.h + ',100%,100%)', 'hsl(' + color.h + ', ' + color.s + '%,50%)', 'hsl('+ color.h +',100%,0%)']; - } else { - stops = ['#fff', 'rgba(255,255,255,0) 50%', 'rgba(0,0,0,0) 50%', 'rgba(0,0,0,1)']; - } - target.gradient( origin, stops ); - break; - case 'v': - if ( control === 'strip' ) { - stops = [ c.clone().v(100).toCSS(), c.clone().v(0).toCSS() ]; - } else { - stops = ['rgba(0,0,0,0)', '#000']; - } - target.gradient( origin, stops ); - break; - default: - break; - } - }, - - _getHSpaceColor: function() { - return ( this.options.mode === 'hsv' ) ? this._color.toHsv() : this._color.toHsl(); - }, - - _dimensions: function( reset ) { - // whatever size - var self = this, - opts = self.options, - controls = self.controls, - square = controls.square, - strip = self.picker.find( '.iris-strip' ), - squareWidth = '77.5%', - stripWidth = '12%', - totalPadding = 20, - innerWidth = opts.border ? opts.width - totalPadding : opts.width, - controlsHeight, - paletteCount = $.isArray( opts.palettes ) ? opts.palettes.length : self._palettes.length, - paletteMargin, paletteWidth, paletteContainerWidth; - - if ( reset ) { - square.css( 'width', '' ); - strip.css( 'width', '' ); - self.picker.css( {width: '', height: ''} ); - } - - squareWidth = innerWidth * ( parseFloat( squareWidth ) / 100 ); - stripWidth = innerWidth * ( parseFloat( stripWidth ) / 100 ); - controlsHeight = opts.border ? squareWidth + totalPadding : squareWidth; - - square.width( squareWidth ).height( squareWidth ); - strip.height( squareWidth ).width( stripWidth ); - self.picker.css( { width: opts.width, height: controlsHeight } ); - - if ( ! opts.palettes ) { - return self.picker.css( 'paddingBottom', '' ); - } - - // single margin at 2% - paletteMargin = squareWidth * 2 / 100; - paletteContainerWidth = squareWidth - ( ( paletteCount - 1 ) * paletteMargin ); - paletteWidth = paletteContainerWidth / paletteCount; - self.picker.find('.iris-palette').each( function( i ) { - var margin = i === 0 ? 0 : paletteMargin; - $( this ).css({ - width: paletteWidth, - height: paletteWidth, - marginLeft: margin - }); - }); - self.picker.css( 'paddingBottom', paletteWidth + paletteMargin ); - strip.height( paletteWidth + paletteMargin + squareWidth ); - }, - - _addInputListeners: function( input ) { - var self = this, - debounceTimeout = 100, - callback = function( event ){ - var color = new Color( input.val() ), - val = input.val().replace( /^#/, '' ); - - input.removeClass( 'iris-error' ); - // we gave a bad color - if ( color.error ) { - // don't error on an empty input - we want those allowed - if ( val !== '' ) { - input.addClass( 'iris-error' ); - } - } else { - if ( color.toString() !== self._color.toString() ) { - // let's not do this on keyup for hex shortcodes - if ( ! ( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) ) { - self._setOption( 'color', color.toString() ); - } - } - } - }; - - input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) ); - - // If we initialized hidden, show on first focus. The rest is up to you. - if ( self.options.hide ) { - input.one( 'focus', function() { - self.show(); - }); - } - }, - - _initControls: function() { - var self = this, - controls = self.controls, - square = controls.square, - controlOpts = self.options.controls, - stripScale = self._scale[controlOpts.strip]; - - controls.stripSlider.slider({ - orientation: 'vertical', - max: stripScale, - slide: function( event, ui ) { - self.active = 'strip'; - // "reverse" for hue. - if ( controlOpts.strip === 'h' ) { - ui.value = stripScale - ui.value; - } - - self._color[controlOpts.strip]( ui.value ); - self._change.apply( self, arguments ); - } - }); - - controls.squareDrag.draggable({ - containment: controls.square.find( '.iris-square-inner' ), - zIndex: 1000, - cursor: 'move', - drag: function( event, ui ) { - self._squareDrag( event, ui ); - }, - start: function() { - square.addClass( 'iris-dragging' ); - $(this).addClass( 'ui-state-focus' ); - }, - stop: function() { - square.removeClass( 'iris-dragging' ); - $(this).removeClass( 'ui-state-focus' ); - } - }).on( 'mousedown mouseup', function( event ) { - var focusClass = 'ui-state-focus'; - event.preventDefault(); - if (event.type === 'mousedown' ) { - self.picker.find( '.' + focusClass ).removeClass( focusClass ).blur(); - $(this).addClass( focusClass ).focus(); - } else { - $(this).removeClass( focusClass ); - } - }).on( 'keydown', function( event ) { - var container = controls.square, - draggable = controls.squareDrag, - position = draggable.position(), - distance = self.options.width / 100; // Distance in pixels the draggable should be moved: 1 "stop" - - // make alt key go "10" - if ( event.altKey ) { - distance *= 10; - } - - // Reposition if one of the directional keys is pressed - switch ( event.keyCode ) { - case 37: position.left -= distance; break; // Left - case 38: position.top -= distance; break; // Up - case 39: position.left += distance; break; // Right - case 40: position.top += distance; break; // Down - default: return true; // Exit and bubble - } - - // Keep draggable within container - position.left = Math.max( 0, Math.min( position.left, container.width() ) ); - position.top = Math.max( 0, Math.min( position.top, container.height() ) ); - - draggable.css(position); - self._squareDrag( event, { position: position }); - event.preventDefault(); - }); - - // allow clicking on the square to move there and keep dragging - square.mousedown( function( event ) { - var squareOffset, pos; - // only left click - if ( event.which !== 1 ) { - return; - } - - // prevent bubbling from the handle: no infinite loops - if ( ! $( event.target ).is( 'div' ) ) { - return; - } - - squareOffset = self.controls.square.offset(); - pos = { - top: event.pageY - squareOffset.top, - left: event.pageX - squareOffset.left - }; - event.preventDefault(); - self._squareDrag( event, { position: pos } ); - event.target = self.controls.squareDrag.get(0); - self.controls.squareDrag.css( pos ).trigger( event ); - }); - - // palettes - if ( self.options.palettes ) { - self._paletteListeners(); - } - }, - - _paletteListeners: function() { - var self = this; - self.picker.find('.iris-palette-container').on('click.palette', '.iris-palette', function() { - self._color.fromCSS( $(this).data('color') ); - self.active = 'external'; - self._change(); - }).on( 'keydown.palette', '.iris-palette', function( event ) { - if ( ! ( event.keyCode === 13 || event.keyCode === 32 ) ) { - return true; - } - event.stopPropagation(); - $( this ).click(); - }); - }, - - _squareDrag: function( event, ui ) { - var self = this, - controlOpts = self.options.controls, - dimensions = self._squareDimensions(), - vertVal = Math.round( ( dimensions.h - ui.position.top ) / dimensions.h * self._scale[controlOpts.vert] ), - horizVal = self._scale[controlOpts.horiz] - Math.round( ( dimensions.w - ui.position.left ) / dimensions.w * self._scale[controlOpts.horiz] ); - - self._color[controlOpts.horiz]( horizVal )[controlOpts.vert]( vertVal ); - - self.active = 'square'; - self._change.apply( self, arguments ); - }, - - _setOption: function( key, value ) { - var self = this, - oldValue = self.options[key], - doDimensions = false, - hexLessColor, - newColor, - method; - - // ensure the new value is set. We can reset to oldValue if some check wasn't met. - self.options[key] = value; - - switch(key) { - case 'color': - // cast to string in case we have a number - value = '' + value; - hexLessColor = value.replace( /^#/, '' ); - newColor = new Color( value ).setHSpace( self.options.mode ); - if ( newColor.error ) { - self.options[key] = oldValue; - } else { - self._color = newColor; - self.options.color = self.options[key] = self._color.toString(); - self.active = 'external'; - self._change(); - } - break; - case 'palettes': - doDimensions = true; - - if ( value ) { - self._addPalettes(); - } else { - self.picker.find('.iris-palette-container').remove(); - } - - // do we need to add events? - if ( ! oldValue ) { - self._paletteListeners(); - } - break; - case 'width': - doDimensions = true; - break; - case 'border': - doDimensions = true; - method = value ? 'addClass' : 'removeClass'; - self.picker[method]('iris-border'); - break; - case 'mode': - case 'controls': - // if nothing's changed, let's bail, since this causes re-rendering the whole widget - if ( oldValue === value ) { - return; - } - - // we're using these poorly named variables because they're already scoped. - // method is the element that Iris was called on. oldValue will be the options - method = self.element; - oldValue = self.options; - oldValue.hide = ! self.picker.is( ':visible' ); - self.destroy(); - self.picker.remove(); - return $(self.element).iris(oldValue); - } - - // Do we need to recalc dimensions? - if ( doDimensions ) { - self._dimensions(true); - } - }, - - _squareDimensions: function( forceRefresh ) { - var square = this.controls.square, - dimensions, - control; - - if ( forceRefresh !== undef && square.data('dimensions') ) { - return square.data('dimensions'); - } - - control = this.controls.squareDrag; - dimensions = { - w: square.width(), - h: square.height() - }; - square.data( 'dimensions', dimensions ); - return dimensions; - }, - - _isNonHueControl: function( active, type ) { - if ( active === 'square' && this.options.controls.strip === 'h' ) { - return true; - } else if ( type === 'external' || ( type === 'h' && active === 'strip' ) ) { - return false; - } - - return true; - }, - - _change: function() { - var self = this, - controls = self.controls, - color = self._getHSpaceColor(), - actions = [ 'square', 'strip' ], - controlOpts = self.options.controls, - type = controlOpts[self.active] || 'external', - oldHue = self.hue; - - if ( self.active === 'strip' ) { - // take no action on any of the square sliders if we adjusted the strip - actions = []; - } else if ( self.active !== 'external' ) { - // for non-strip, non-external, strip should never change - actions.pop(); // conveniently the last item - } - - $.each( actions, function(index, item) { - var value, dimensions, cssObj; - if ( item !== self.active ) { - switch ( item ) { - case 'strip': - // reverse for hue - value = ( controlOpts.strip === 'h' ) ? self._scale[controlOpts.strip] - color[controlOpts.strip] : color[controlOpts.strip]; - controls.stripSlider.slider( 'value', value ); - break; - case 'square': - dimensions = self._squareDimensions(); - cssObj = { - left: color[controlOpts.horiz] / self._scale[controlOpts.horiz] * dimensions.w, - top: dimensions.h - ( color[controlOpts.vert] / self._scale[controlOpts.vert] * dimensions.h ) - }; - - self.controls.squareDrag.css( cssObj ); - break; - } - } - }); - - // Ensure that we don't change hue if we triggered a hue reset - if ( color.h !== oldHue && self._isNonHueControl( self.active, type ) ) { - self._color.h(oldHue); - } - - // store hue for repeating above check next time - self.hue = self._color.h(); - - self.options.color = self._color.toString(); - - // only run after the first time - if ( self._inited ) { - self._trigger( 'change', { type: self.active }, { color: self._color } ); - } - - if ( self.element.is( ':input' ) && ! self._color.error ) { - self.element.removeClass( 'iris-error' ); - if ( self.element.val() !== self._color.toString() ) { - self.element.val( self._color.toString() ); - } - } - - self._paint(); - self._inited = true; - self.active = false; - }, - // taken from underscore.js _.debounce method - _debounce: function( func, wait, immediate ) { - var timeout, result; - return function() { - var context = this, - args = arguments, - later, - callNow; - - later = function() { - timeout = null; - if ( ! immediate) { - result = func.apply( context, args ); - } - }; - - callNow = immediate && !timeout; - clearTimeout( timeout ); - timeout = setTimeout( later, wait ); - if ( callNow ) { - result = func.apply( context, args ); - } - return result; - }; - }, - show: function() { - this.picker.show(); - }, - hide: function() { - this.picker.hide(); - }, - toggle: function() { - this.picker.toggle(); - }, - color: function(newColor) { - if ( newColor === true ) { - return this._color.clone(); - } else if ( newColor === undef ) { - return this._color.toString(); - } - this.option('color', newColor); - } - }; - // initialize the widget - $.widget( 'a8c.iris', Iris ); - // add CSS - $( '' ).appendTo( 'head' ); - -}( jQuery )); -/*! Color.js - v0.9.11 - 2013-08-09 -* https://github.com/Automattic/Color.js -* Copyright (c) 2013 Matt Wiebe; Licensed GPLv2 */ -(function(global, undef) { - - var Color = function( color, type ) { - if ( ! ( this instanceof Color ) ) - return new Color( color, type ); - - return this._init( color, type ); - }; - - Color.fn = Color.prototype = { - _color: 0, - _alpha: 1, - error: false, - // for preserving hue/sat in fromHsl().toHsl() flows - _hsl: { h: 0, s: 0, l: 0 }, - // for preserving hue/sat in fromHsv().toHsv() flows - _hsv: { h: 0, s: 0, v: 0 }, - // for setting hsl or hsv space - needed for .h() & .s() functions to function properly - _hSpace: 'hsl', - _init: function( color ) { - var func = 'noop'; - switch ( typeof color ) { - case 'object': - // alpha? - if ( color.a !== undef ) - this.a( color.a ); - func = ( color.r !== undef ) ? 'fromRgb' : - ( color.l !== undef ) ? 'fromHsl' : - ( color.v !== undef ) ? 'fromHsv' : func; - return this[func]( color ); - case 'string': - return this.fromCSS( color ); - case 'number': - return this.fromInt( parseInt( color, 10 ) ); - } - return this; - }, - - _error: function() { - this.error = true; - return this; - }, - - clone: function() { - var newColor = new Color( this.toInt() ), - copy = ['_alpha', '_hSpace', '_hsl', '_hsv', 'error']; - for ( var i = copy.length - 1; i >= 0; i-- ) { - newColor[ copy[i] ] = this[ copy[i] ]; - } - return newColor; - }, - - setHSpace: function( space ) { - this._hSpace = ( space === 'hsv' ) ? space : 'hsl'; - return this; - }, - - noop: function() { - return this; - }, - - fromCSS: function( color ) { - var list, - leadingRE = /^(rgb|hs(l|v))a?\(/; - this.error = false; - - // whitespace and semicolon trim - color = color.replace(/^\s+/, '').replace(/\s+$/, '').replace(/;$/, ''); - - if ( color.match(leadingRE) && color.match(/\)$/) ) { - list = color.replace(/(\s|%)/g, '').replace(leadingRE, '').replace(/,?\);?$/, '').split(','); - - if ( list.length < 3 ) - return this._error(); - - if ( list.length === 4 ) { - this.a( parseFloat( list.pop() ) ); - // error state has been set to true in .a() if we passed NaN - if ( this.error ) - return this; - } - - for (var i = list.length - 1; i >= 0; i--) { - list[i] = parseInt(list[i], 10); - if ( isNaN( list[i] ) ) - return this._error(); - } - - if ( color.match(/^rgb/) ) { - return this.fromRgb( { - r: list[0], - g: list[1], - b: list[2] - } ); - } else if ( color.match(/^hsv/) ) { - return this.fromHsv( { - h: list[0], - s: list[1], - v: list[2] - } ); - } else { - return this.fromHsl( { - h: list[0], - s: list[1], - l: list[2] - } ); - } - } else { - // must be hex amirite? - return this.fromHex( color ); - } - }, - - fromRgb: function( rgb, preserve ) { - if ( typeof rgb !== 'object' || rgb.r === undef || rgb.g === undef || rgb.b === undef ) - return this._error(); - - this.error = false; - return this.fromInt( parseInt( ( rgb.r << 16 ) + ( rgb.g << 8 ) + rgb.b, 10 ), preserve ); - }, - - fromHex: function( color ) { - color = color.replace(/^#/, '').replace(/^0x/, ''); - if ( color.length === 3 ) { - color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2]; - } - - // rough error checking - this is where things go squirrely the most - this.error = ! /^[0-9A-F]{6}$/i.test( color ); - return this.fromInt( parseInt( color, 16 ) ); - }, - - fromHsl: function( hsl ) { - var r, g, b, q, p, h, s, l; - - if ( typeof hsl !== 'object' || hsl.h === undef || hsl.s === undef || hsl.l === undef ) - return this._error(); - - this._hsl = hsl; // store it - this._hSpace = 'hsl'; // implicit - h = hsl.h / 360; s = hsl.s / 100; l = hsl.l / 100; - if ( s === 0 ) { - r = g = b = l; // achromatic - } - else { - q = l < 0.5 ? l * ( 1 + s ) : l + s - l * s; - p = 2 * l - q; - r = this.hue2rgb( p, q, h + 1/3 ); - g = this.hue2rgb( p, q, h ); - b = this.hue2rgb( p, q, h - 1/3 ); - } - return this.fromRgb( { - r: r * 255, - g: g * 255, - b: b * 255 - }, true ); // true preserves hue/sat - }, - - fromHsv: function( hsv ) { - var h, s, v, r, g, b, i, f, p, q, t; - if ( typeof hsv !== 'object' || hsv.h === undef || hsv.s === undef || hsv.v === undef ) - return this._error(); - - this._hsv = hsv; // store it - this._hSpace = 'hsv'; // implicit - - h = hsv.h / 360; s = hsv.s / 100; v = hsv.v / 100; - i = Math.floor( h * 6 ); - f = h * 6 - i; - p = v * ( 1 - s ); - q = v * ( 1 - f * s ); - t = v * ( 1 - ( 1 - f ) * s ); - - switch( i % 6 ) { - case 0: - r = v; g = t; b = p; - break; - case 1: - r = q; g = v; b = p; - break; - case 2: - r = p; g = v; b = t; - break; - case 3: - r = p; g = q; b = v; - break; - case 4: - r = t; g = p; b = v; - break; - case 5: - r = v; g = p; b = q; - break; - } - - return this.fromRgb( { - r: r * 255, - g: g * 255, - b: b * 255 - }, true ); // true preserves hue/sat - - }, - // everything comes down to fromInt - fromInt: function( color, preserve ) { - this._color = parseInt( color, 10 ); - - if ( isNaN( this._color ) ) - this._color = 0; - - // let's coerce things - if ( this._color > 16777215 ) - this._color = 16777215; - else if ( this._color < 0 ) - this._color = 0; - - // let's not do weird things - if ( preserve === undef ) { - this._hsv.h = this._hsv.s = this._hsl.h = this._hsl.s = 0; - } - // EVENT GOES HERE - return this; - }, - - hue2rgb: function( p, q, t ) { - if ( t < 0 ) { - t += 1; - } - if ( t > 1 ) { - t -= 1; - } - if ( t < 1/6 ) { - return p + ( q - p ) * 6 * t; - } - if ( t < 1/2 ) { - return q; - } - if ( t < 2/3 ) { - return p + ( q - p ) * ( 2/3 - t ) * 6; - } - return p; - }, - - toString: function() { - var hex = parseInt( this._color, 10 ).toString( 16 ); - if ( this.error ) - return ''; - // maybe left pad it - if ( hex.length < 6 ) { - for (var i = 6 - hex.length - 1; i >= 0; i--) { - hex = '0' + hex; - } - } - return '#' + hex; - }, - - toCSS: function( type, alpha ) { - type = type || 'hex'; - alpha = parseFloat( alpha || this._alpha ); - switch ( type ) { - case 'rgb': - case 'rgba': - var rgb = this.toRgb(); - if ( alpha < 1 ) { - return "rgba( " + rgb.r + ", " + rgb.g + ", " + rgb.b + ", " + alpha + " )"; - } - else { - return "rgb( " + rgb.r + ", " + rgb.g + ", " + rgb.b + " )"; - } - break; - case 'hsl': - case 'hsla': - var hsl = this.toHsl(); - if ( alpha < 1 ) { - return "hsla( " + hsl.h + ", " + hsl.s + "%, " + hsl.l + "%, " + alpha + " )"; - } - else { - return "hsl( " + hsl.h + ", " + hsl.s + "%, " + hsl.l + "% )"; - } - break; - default: - return this.toString(); - } - }, - - toRgb: function() { - return { - r: 255 & ( this._color >> 16 ), - g: 255 & ( this._color >> 8 ), - b: 255 & ( this._color ) - }; - }, - - toHsl: function() { - var rgb = this.toRgb(); - var r = rgb.r / 255, g = rgb.g / 255, b = rgb.b / 255; - var max = Math.max( r, g, b ), min = Math.min( r, g, b ); - var h, s, l = ( max + min ) / 2; - - if ( max === min ) { - h = s = 0; // achromatic - } else { - var d = max - min; - s = l > 0.5 ? d / ( 2 - max - min ) : d / ( max + min ); - switch ( max ) { - case r: h = ( g - b ) / d + ( g < b ? 6 : 0 ); - break; - case g: h = ( b - r ) / d + 2; - break; - case b: h = ( r - g ) / d + 4; - break; - } - h /= 6; - } - - // maintain hue & sat if we've been manipulating things in the HSL space. - h = Math.round( h * 360 ); - if ( h === 0 && this._hsl.h !== h ) { - h = this._hsl.h; - } - s = Math.round( s * 100 ); - if ( s === 0 && this._hsl.s ) { - s = this._hsl.s; - } - - return { - h: h, - s: s, - l: Math.round( l * 100 ) - }; - - }, - - toHsv: function() { - var rgb = this.toRgb(); - var r = rgb.r / 255, g = rgb.g / 255, b = rgb.b / 255; - var max = Math.max( r, g, b ), min = Math.min( r, g, b ); - var h, s, v = max; - var d = max - min; - s = max === 0 ? 0 : d / max; - - if ( max === min ) { - h = s = 0; // achromatic - } else { - switch( max ){ - case r: - h = ( g - b ) / d + ( g < b ? 6 : 0 ); - break; - case g: - h = ( b - r ) / d + 2; - break; - case b: - h = ( r - g ) / d + 4; - break; - } - h /= 6; - } - - // maintain hue & sat if we've been manipulating things in the HSV space. - h = Math.round( h * 360 ); - if ( h === 0 && this._hsv.h !== h ) { - h = this._hsv.h; - } - s = Math.round( s * 100 ); - if ( s === 0 && this._hsv.s ) { - s = this._hsv.s; - } - - return { - h: h, - s: s, - v: Math.round( v * 100 ) - }; - }, - - toInt: function() { - return this._color; - }, - - toIEOctoHex: function() { - // AARRBBGG - var hex = this.toString(); - var AA = parseInt( 255 * this._alpha, 10 ).toString(16); - if ( AA.length === 1 ) { - AA = '0' + AA; - } - return '#' + AA + hex.replace(/^#/, '' ); - }, - - toLuminosity: function() { - var rgb = this.toRgb(); - return 0.2126 * Math.pow( rgb.r / 255, 2.2 ) + 0.7152 * Math.pow( rgb.g / 255, 2.2 ) + 0.0722 * Math.pow( rgb.b / 255, 2.2); - }, - - getDistanceLuminosityFrom: function( color ) { - if ( ! ( color instanceof Color ) ) { - throw 'getDistanceLuminosityFrom requires a Color object'; - } - var lum1 = this.toLuminosity(); - var lum2 = color.toLuminosity(); - if ( lum1 > lum2 ) { - return ( lum1 + 0.05 ) / ( lum2 + 0.05 ); - } - else { - return ( lum2 + 0.05 ) / ( lum1 + 0.05 ); - } - }, - - getMaxContrastColor: function() { - var lum = this.toLuminosity(); - var hex = ( lum >= 0.5 ) ? '000000' : 'ffffff'; - return new Color( hex ); - }, - - getReadableContrastingColor: function( bgColor, minContrast ) { - if ( ! bgColor instanceof Color ) { - return this; - } - - // you shouldn't use less than 5, but you might want to. - var targetContrast = ( minContrast === undef ) ? 5 : minContrast; - // working things - var contrast = bgColor.getDistanceLuminosityFrom( this ); - var maxContrastColor = bgColor.getMaxContrastColor(); - var maxContrast = maxContrastColor.getDistanceLuminosityFrom( bgColor ); - - // if current max contrast is less than the target contrast, we had wishful thinking. - // still, go max - if ( maxContrast <= targetContrast ) { - return maxContrastColor; - } - // or, we might already have sufficient contrast - else if ( contrast >= targetContrast ) { - return this; - } - - var incr = ( 0 === maxContrastColor.toInt() ) ? -1 : 1; - while ( contrast < targetContrast ) { - this.l( incr, true ); // 2nd arg turns this into an incrementer - contrast = this.getDistanceLuminosityFrom( bgColor ); - // infininite loop prevention: you never know. - if ( this._color === 0 || this._color === 16777215 ) { - break; - } - } - - return this; - - }, - - a: function( val ) { - if ( val === undef ) - return this._alpha; - - var a = parseFloat( val ); - - if ( isNaN( a ) ) - return this._error(); - - this._alpha = a; - return this; - }, - - // TRANSFORMS - - darken: function( amount ) { - amount = amount || 5; - return this.l( - amount, true ); - }, - - lighten: function( amount ) { - amount = amount || 5; - return this.l( amount, true ); - }, - - saturate: function( amount ) { - amount = amount || 15; - return this.s( amount, true ); - }, - - desaturate: function( amount ) { - amount = amount || 15; - return this.s( - amount, true ); - }, - - toGrayscale: function() { - return this.setHSpace('hsl').s( 0 ); - }, - - getComplement: function() { - return this.h( 180, true ); - }, - - getSplitComplement: function( step ) { - step = step || 1; - var incr = 180 + ( step * 30 ); - return this.h( incr, true ); - }, - - getAnalog: function( step ) { - step = step || 1; - var incr = step * 30; - return this.h( incr, true ); - }, - - getTetrad: function( step ) { - step = step || 1; - var incr = step * 60; - return this.h( incr, true ); - }, - - getTriad: function( step ) { - step = step || 1; - var incr = step * 120; - return this.h( incr, true ); - }, - - _partial: function( key ) { - var prop = shortProps[key]; - return function( val, incr ) { - var color = this._spaceFunc('to', prop.space); - - // GETTER - if ( val === undef ) - return color[key]; - - // INCREMENT - if ( incr === true ) - val = color[key] + val; - - // MOD & RANGE - if ( prop.mod ) - val = val % prop.mod; - if ( prop.range ) - val = ( val < prop.range[0] ) ? prop.range[0] : ( val > prop.range[1] ) ? prop.range[1] : val; - - // NEW VALUE - color[key] = val; - - return this._spaceFunc('from', prop.space, color); - }; - }, - - _spaceFunc: function( dir, s, val ) { - var space = s || this._hSpace, - funcName = dir + space.charAt(0).toUpperCase() + space.substr(1); - return this[funcName](val); - } - }; - - var shortProps = { - h: { - mod: 360 - }, - s: { - range: [0,100] - }, - l: { - space: 'hsl', - range: [0,100] - }, - v: { - space: 'hsv', - range: [0,100] - }, - r: { - space: 'rgb', - range: [0,255] - }, - g: { - space: 'rgb', - range: [0,255] - }, - b: { - space: 'rgb', - range: [0,255] - } - }; - - for ( var key in shortProps ) { - if ( shortProps.hasOwnProperty( key ) ) - Color.fn[key] = Color.fn._partial(key); - } - - // play nicely with Node + browser - if ( typeof exports === 'object' ) - module.exports = Color; - else - global.Color = Color; - -}(this)); diff --git a/lib/plugins/styler/lang/en/intro.txt b/lib/plugins/styler/lang/en/intro.txt deleted file mode 100644 index 4ea55172f..000000000 --- a/lib/plugins/styler/lang/en/intro.txt +++ /dev/null @@ -1,2 +0,0 @@ -This tool allows you to change certain style settings of your currently selected template. -All changes are stored in a local configuration file and are upgrade safe. \ No newline at end of file diff --git a/lib/plugins/styler/lang/en/lang.php b/lib/plugins/styler/lang/en/lang.php deleted file mode 100644 index 1bf8efa2c..000000000 --- a/lib/plugins/styler/lang/en/lang.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ - -// menu entry for admin plugins -$lang['js']['menu'] = 'Template Style Settings'; - -// custom language strings for the plugin -$lang['error'] = 'Sorry, this template does not support this functionality.'; - -$lang['btn_preview'] = 'Preview your changes'; -$lang['btn_save'] = 'Save your changes'; -$lang['btn_reset'] = 'Reset your current changes'; -$lang['btn_revert'] = 'Revert all styles back to the template\'s default'; - -// default guaranteed placeholders -$lang['__text__'] = 'Main text color'; -$lang['__background__'] = 'Main text background color'; -$lang['__text_alt__'] = 'Alternative text color'; -$lang['__background_alt__'] = 'Alternative text background color'; -$lang['__text_neu__'] = 'Neutral text color'; -$lang['__background_neu__'] = 'Neutral text background color'; -$lang['__border__'] = 'Border color'; -$lang['__highlight__'] = 'Highlight color (for search results mainly)'; - - - - -//Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/styler/plugin.info.txt b/lib/plugins/styler/plugin.info.txt deleted file mode 100644 index 51f2f72f6..000000000 --- a/lib/plugins/styler/plugin.info.txt +++ /dev/null @@ -1,7 +0,0 @@ -base styler -author Andreas Gohr -email andi@splitbrain.org -date 2015-05-16 -name styler plugin -desc Allows to edit style.ini replacements -url https://www.dokuwiki.org/plugin:styler diff --git a/lib/plugins/styler/script.js b/lib/plugins/styler/script.js deleted file mode 100644 index a4fb601c8..000000000 --- a/lib/plugins/styler/script.js +++ /dev/null @@ -1,92 +0,0 @@ -/* DOKUWIKI:include_once iris.js */ - -jQuery(function () { - // user openend the admin page, set cookie and redirect - if (jQuery('#plugin__styler').length) { - DokuCookie.setValue('styler_plugin', 1); - document.location.href = document.location.href.replace(/do=admin/, ''); - } - - // continue only if the Styler Dialog is currently enabled - if (DokuCookie.getValue('styler_plugin') != 1) return; - - var styler_timeout = null; - - // create dialog element - var $dialog = jQuery(document.createElement('div')); - jQuery('body').append($dialog); - - - /** - * updates the current CSS with a new preview one - */ - function styler_updateCSS() { - var now = new Date().getTime(); - var $style = jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); - $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); - } - - /** - * save current values and reload preview (debounced) - */ - function styler_saveAndUpdate() { - if (styler_timeout) window.clearTimeout(styler_timeout); - styler_timeout = window.setTimeout(function () { - styler_timeout = null; - - var params = $dialog.find('input[type=text]').serializeArray(); - params[params.length] = { name: 'call', value: 'plugin_styler'}; - params[params.length] = {name: 'run', value: 'preview'}; - - jQuery.post( - DOKU_BASE + '/lib/exe/ajax.php', - params, - styler_updateCSS - ); - }, 500); - } - - // load the dialog content and apply listeners - $dialog.load( - DOKU_BASE + '/lib/exe/ajax.php', - { - 'call': 'plugin_styler', - 'run': 'html', - 'id': JSINFO.id - }, - function () { - // load the preview template - styler_updateCSS(); - - // open the dialog - $dialog.dialog({ - 'title': LANG.plugins.styler.menu, - 'width': 500, - 'height': 500, - 'top': 50, - 'position': { 'my': 'left bottom', 'at': 'left bottom', 'of': window }, - // bring everything back to normal - 'close': function (event, ui) { - // disable the styler plugin again - DokuCookie.setValue('styler_plugin', 0); - // reload - document.location.reload() - } - }); - - // we don't need the manual preview in JS mode - $dialog.find('.btn_preview').hide(); - - // add the color picker FIXME add saveAndUpdate to correct event - $dialog.find('.color').iris({ }); - - // listen to keyup events - $dialog.find('input[type=text]').keyup(function () { - console.log('change'); - styler_saveAndUpdate(); - }); - - } - ); - -}); \ No newline at end of file diff --git a/lib/plugins/styling/.travis.yml b/lib/plugins/styling/.travis.yml new file mode 100644 index 000000000..75ee0b152 --- /dev/null +++ b/lib/plugins/styling/.travis.yml @@ -0,0 +1,13 @@ +# Config file for travis-ci.org + +language: php +php: + - "5.5" + - "5.4" + - "5.3" +env: + - DOKUWIKI=master + - DOKUWIKI=stable +before_install: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh +install: sh travis.sh +script: cd _test && phpunit --stderr --group plugin_styling diff --git a/lib/plugins/styling/README b/lib/plugins/styling/README new file mode 100644 index 000000000..a1a5e890c --- /dev/null +++ b/lib/plugins/styling/README @@ -0,0 +1,27 @@ +styling Plugin for DokuWiki + +Allows to edit style.ini replacements + +All documentation for this plugin can be found at +https://www.dokuwiki.org/plugin:styling + +If you install this plugin manually, make sure it is installed in +lib/plugins/styling/ - if the folder is called different it +will not work! + +Please refer to http://www.dokuwiki.org/plugins for additional info +on how to install plugins in DokuWiki. + +---- +Copyright (C) Andreas Gohr + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License + +This program 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 General Public License for more details. + +See the COPYING file in your DokuWiki folder for details diff --git a/lib/plugins/styling/_test/general.test.php b/lib/plugins/styling/_test/general.test.php new file mode 100644 index 000000000..1337f6f75 --- /dev/null +++ b/lib/plugins/styling/_test/general.test.php @@ -0,0 +1,33 @@ +assertFileExists($file); + + $info = confToHash($file); + + $this->assertArrayHasKey('base', $info); + $this->assertArrayHasKey('author', $info); + $this->assertArrayHasKey('email', $info); + $this->assertArrayHasKey('date', $info); + $this->assertArrayHasKey('name', $info); + $this->assertArrayHasKey('desc', $info); + $this->assertArrayHasKey('url', $info); + + $this->assertEquals('styling', $info['base']); + $this->assertRegExp('/^https?:\/\//', $info['url']); + $this->assertTrue(mail_isvalid($info['email'])); + $this->assertRegExp('/^\d\d\d\d-\d\d-\d\d$/', $info['date']); + $this->assertTrue(false !== strtotime($info['date'])); + } +} diff --git a/lib/plugins/styling/action.php b/lib/plugins/styling/action.php new file mode 100644 index 000000000..622c634d6 --- /dev/null +++ b/lib/plugins/styling/action.php @@ -0,0 +1,108 @@ + + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * Class action_plugin_styling + * + * This handles all the save actions and loading the interface + * + * All this usually would be done within an admin plugin, but we want to have this available outside + * the admin interface using our floating dialog. + */ +class action_plugin_styling extends DokuWiki_Action_Plugin { + + /** + * Registers a callback functions + * + * @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'); + $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_action'); + $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle_header'); + } + + /** + * Adds the preview parameter to the stylesheet loading in non-js mode + * + * @param Doku_Event $event event object by reference + * @param mixed $param [the parameters passed as fifth argument to register_hook() when this + * handler was registered] + * @return void + */ + public function handle_header(Doku_Event &$event, $param) { + global $ACT; + global $INPUT; + if($ACT != 'admin' || $INPUT->str('page') != 'styling') return; + if(!auth_isadmin()) return; + + // set preview + $len = count($event->data['link']); + for($i = 0; $i < $len; $i++) { + if( + $event->data['link'][$i]['rel'] == 'stylesheet' && + strpos($event->data['link'][$i]['href'], 'lib/exe/css.php') !== false + ) { + $event->data['link'][$i]['href'] .= '&preview=1&tseed='.time(); + } + } + } + + /** + * Updates the style.ini settings by passing it on to handle() of the admin component + * + * @param Doku_Event $event event object by reference + * @param mixed $param [the parameters passed as fifth argument to register_hook() when this + * handler was registered] + * @return void + */ + public function handle_action(Doku_Event &$event, $param) { + if($event->data != 'styling_plugin') return; + if(!auth_isadmin()) return; + $event->data = 'show'; + + /** @var admin_plugin_styling $hlp */ + $hlp = plugin_load('admin', 'styling'); + $hlp->handle(); + } + + /** + * Create the style form in the floating Dialog + * + * @param Doku_Event $event event object by reference + * @param mixed $param [the parameters passed as fifth argument to register_hook() when this + * handler was registered] + * @return void + */ + + public function handle_ajax(Doku_Event &$event, $param) { + if($event->data != 'plugin_styling') return; + if(!auth_isadmin()) return; + $event->preventDefault(); + $event->stopPropagation(); + + global $ID; + global $INPUT; + $ID = getID(); + + /** @var admin_plugin_styling $hlp */ + $hlp = plugin_load('admin', 'styling'); + if($INPUT->str('run') == 'preview') { + $hlp->run_preview(); + } else { + $hlp->form(true); + } + } + +} + +// vim:ts=4:sw=4:et: diff --git a/lib/plugins/styling/admin.php b/lib/plugins/styling/admin.php new file mode 100644 index 000000000..85d87dd71 --- /dev/null +++ b/lib/plugins/styling/admin.php @@ -0,0 +1,215 @@ + + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +class admin_plugin_styling extends DokuWiki_Admin_Plugin { + + /** + * @return int sort number in admin menu + */ + public function getMenuSort() { + return 1000; + } + + /** + * @return bool true if only access for superuser, false is for superusers and moderators + */ + public function forAdminOnly() { + return true; + } + + /** + * @param string $language + * @return string + */ + public function getMenuText($language) { + $js = $this->getLang('js'); + return $js['menu']; + } + + /** + * handle the different actions (also called from ajax) + */ + public function handle() { + global $INPUT; + $run = $INPUT->extract('run')->str('run'); + if(!$run) return; + $run = "run_$run"; + $this->$run(); + } + + /** + * Render HTML output, e.g. helpful text and a form + */ + public function html() { + echo '
'; + ptln('

'.$this->getMenuText('').'

'); + $this->form(false); + echo '
'; + } + + /** + * Create the actual editing form + */ + public function form($isajax) { + global $conf; + global $ID; + define('SIMPLE_TEST', 1); // hack, ideally certain functions should be moved out of css.php + require_once(DOKU_INC.'lib/exe/css.php'); + $styleini = css_styleini($conf['template'], true); + $replacements = $styleini['replacements']; + + if($isajax) { + $target = wl($ID, array('do' => 'styling_plugin')); + } else { + $target = wl($ID, array('do' => 'admin', 'page' => 'styling')); + } + + if(empty($replacements)) { + echo '

'.$this->getLang('error').'

'; + } else { + echo $this->locale_xhtml('intro'); + + echo '
'; + + echo ''; + foreach($replacements as $key => $value) { + $name = tpl_getLang($key); + if(empty($name)) $name = $this->getLang($key); + if(empty($name)) $name = $key; + + echo ''; + echo ''; + echo ''; + } + echo '
'.$name.'colorClass($key).' />'; + echo '
'; + + echo '

'; + echo ''; + echo ''; #FIXME only if preview.ini exists + echo '

'; + + echo '

'; + echo ''; + echo '

'; + + echo '

'; + echo ''; #FIXME only if local.ini exists + echo '

'; + + echo '
'; + + echo tpl_locale_xhtml('style'); + + } + } + + /** + * set the color class attribute + */ + protected function colorClass($key) { + static $colors = array( + 'text', + 'background', + 'text_alt', + 'background_alt', + 'text_neu', + 'background_neu', + 'border', + 'highlight', + 'background_site', + 'link', + 'existing', + 'missing', + ); + + if(preg_match('/colou?r/', $key) || in_array(trim($key,'_'), $colors)) { + return 'class="color"'; + } else { + return ''; + } + } + + /** + * saves the preview.ini (alos called from ajax directly) + */ + public function run_preview() { + global $conf; + $ini = $conf['cachedir'].'/preview.ini'; + io_saveFile($ini, $this->makeini()); + } + + /** + * deletes the preview.ini + */ + protected function run_reset() { + global $conf; + $ini = $conf['cachedir'].'/preview.ini'; + io_saveFile($ini, ''); + } + + /** + * deletes the local style.ini replacements + */ + protected function run_revert() { + $this->replaceini(''); + $this->run_reset(); + } + + /** + * save the local style.ini replacements + */ + protected function run_save() { + $this->replaceini($this->makeini()); + $this->run_reset(); + } + + /** + * create the replacement part of a style.ini from submitted data + * + * @return string + */ + protected function makeini() { + global $INPUT; + + $ini = "[replacements]\n"; + $ini .= ";These overwrites have been generated from the Template styling Admin interface\n"; + $ini .= ";Any values in this section will be overwritten by that tool again\n"; + foreach($INPUT->arr('tpl') as $key => $val) { + $ini .= $key.' = "'.addslashes($val).'"'."\n"; + } + + return $ini; + } + + /** + * replaces the replacement parts in the local ini + * + * @param string $new the new ini contents + */ + protected function replaceini($new) { + global $conf; + $ini = DOKU_CONF."tpl/".$conf['template']."/style.ini"; + if(file_exists($ini)) { + $old = io_readFile($ini); + $old = preg_replace('/\[replacements\]\n.*?(\n\[.*]|$)/s', '\\1', $old); + $old = trim($old); + } else { + $old = ''; + } + + io_makeFileDir($ini); + io_saveFile($ini, "$old\n\n$new"); + } + +} + +// vim:ts=4:sw=4:et: diff --git a/lib/plugins/styling/iris.js b/lib/plugins/styling/iris.js new file mode 100644 index 000000000..4eda5022e --- /dev/null +++ b/lib/plugins/styling/iris.js @@ -0,0 +1,1488 @@ +/*! Iris Color Picker - v1.0.7 - 2014-11-28 +* https://github.com/Automattic/Iris +* Copyright (c) 2014 Matt Wiebe; Licensed GPLv2 */ +(function( $, undef ){ + var _html, nonGradientIE, gradientType, vendorPrefixes, _css, Iris, UA, isIE, IEVersion; + + _html = '
'; + _css = '.iris-picker{display:block;position:relative}.iris-picker,.iris-picker *{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input+.iris-picker{margin-top:4px}.iris-error{background-color:#ffafaf}.iris-border{border-radius:3px;border:1px solid #aaa;width:200px;background-color:#fff}.iris-picker-inner{position:absolute;top:0;right:0;left:0;bottom:0}.iris-border .iris-picker-inner{top:10px;right:10px;left:10px;bottom:10px}.iris-picker .iris-square-inner{position:absolute;left:0;right:0;top:0;bottom:0}.iris-picker .iris-square,.iris-picker .iris-slider,.iris-picker .iris-square-inner,.iris-picker .iris-palette{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,.4);height:100%;width:12.5%;float:left;margin-right:5%}.iris-picker .iris-square{width:76%;margin-right:10%;position:relative}.iris-picker .iris-square-inner{width:auto;margin:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-square-inner,.iris-ie-9 .iris-palette{box-shadow:none;border-radius:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-palette{outline:1px solid rgba(0,0,0,.1)}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iris-ie-lt9 .iris-square-inner,.iris-ie-lt9 .iris-palette{outline:1px solid #aaa}.iris-ie-lt9 .iris-square .ui-slider-handle{outline:1px solid #aaa;background-color:#fff;-ms-filter:"alpha(Opacity=30)"}.iris-ie-lt9 .iris-square .iris-square-handle{background:0;border:3px solid #fff;-ms-filter:"alpha(Opacity=50)"}.iris-picker .iris-strip{margin-right:0;position:relative}.iris-picker .iris-strip .ui-slider-handle{position:absolute;background:0;margin:0;right:-3px;left:-3px;border:4px solid #aaa;border-width:4px 3px;width:auto;height:6px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;z-index:5;cursor:ns-resize}.iris-strip .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.iris-picker .iris-slider-offset{position:absolute;top:11px;left:0;right:0;bottom:-3px;width:auto;height:auto;background:transparent;border:0;border-radius:0}.iris-picker .iris-square-handle{background:transparent;border:5px solid #aaa;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.iris-picker .iris-square-handle:hover{border-color:#999}.iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.iris-picker .iris-square-handle:hover::after{border-color:#fff}.iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.iris-palette-container{position:absolute;bottom:0;left:0;margin:0;padding:0}.iris-border .iris-palette-container{left:10px;bottom:10px}.iris-picker .iris-palette{margin:0;cursor:pointer}.iris-square-handle,.ui-slider-handle{border:0;outline:0}'; + + // Even IE9 dosen't support gradients. Elaborate sigh. + UA = navigator.userAgent.toLowerCase(); + isIE = navigator.appName === 'Microsoft Internet Explorer'; + IEVersion = isIE ? parseFloat( UA.match( /msie ([0-9]{1,}[\.0-9]{0,})/ )[1] ) : 0; + nonGradientIE = ( isIE && IEVersion < 10 ); + gradientType = false; + + // we don't bother with an unprefixed version, as it has a different syntax + vendorPrefixes = [ '-moz-', '-webkit-', '-o-', '-ms-' ]; + + // Bail for IE <= 7 + if ( nonGradientIE && IEVersion <= 7 ) { + $.fn.iris = $.noop; + $.support.iris = false; + return; + } + + $.support.iris = true; + + function testGradientType() { + var el, base, + bgImageString = 'backgroundImage'; + + if ( nonGradientIE ) { + gradientType = 'filter'; + } + else { + el = $( '
' ); + base = 'linear-gradient(top,#fff,#000)'; + $.each( vendorPrefixes, function( i, val ){ + el.css( bgImageString, val + base ); + if ( el.css( bgImageString ).match( 'gradient' ) ) { + gradientType = i; + return false; + } + }); + // check for legacy webkit gradient syntax + if ( gradientType === false ) { + el.css( 'background', '-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))' ); + if ( el.css( bgImageString ).match( 'gradient' ) ) { + gradientType = 'webkit'; + } + } + el.remove(); + } + + } + + /** + * Only for CSS3 gradients. oldIE will use a separate function. + * + * Accepts as many color stops as necessary from 2nd arg on, or 2nd + * arg can be an array of color stops + * + * @param {string} origin Gradient origin - top or left, defaults to left. + * @return {string} Appropriate CSS3 gradient string for use in + */ + function createGradient( origin, stops ) { + origin = ( origin === 'top' ) ? 'top' : 'left'; + stops = $.isArray( stops ) ? stops : Array.prototype.slice.call( arguments, 1 ); + if ( gradientType === 'webkit' ) { + return legacyWebkitGradient( origin, stops ); + } else { + return vendorPrefixes[ gradientType ] + 'linear-gradient(' + origin + ', ' + stops.join(', ') + ')'; + } + } + + /** + * Stupid gradients for a stupid browser. + */ + function stupidIEGradient( origin, stops ) { + var type, self, lastIndex, filter, startPosProp, endPosProp, dimensionProp, template, html; + + origin = ( origin === 'top' ) ? 'top' : 'left'; + stops = $.isArray( stops ) ? stops : Array.prototype.slice.call( arguments, 1 ); + // 8 hex: AARRGGBB + // GradientType: 0 vertical, 1 horizontal + type = ( origin === 'top' ) ? 0 : 1; + self = $( this ); + lastIndex = stops.length - 1; + filter = 'filter'; + startPosProp = ( type === 1 ) ? 'left' : 'top'; + endPosProp = ( type === 1 ) ? 'right' : 'bottom'; + dimensionProp = ( type === 1 ) ? 'height' : 'width'; + template = '
'; + html = ''; + // need a positioning context + if ( self.css('position') === 'static' ) { + self.css( {position: 'relative' } ); + } + + stops = fillColorStops( stops ); + $.each(stops, function( i, startColor ) { + var endColor, endStop, filterVal; + + // we want two at a time. if we're on the last pair, bail. + if ( i === lastIndex ) { + return false; + } + + endColor = stops[ i + 1 ]; + //if our pairs are at the same color stop, moving along. + if ( startColor.stop === endColor.stop ) { + return; + } + + endStop = 100 - parseFloat( endColor.stop ) + '%'; + startColor.octoHex = new Color( startColor.color ).toIEOctoHex(); + endColor.octoHex = new Color( endColor.color ).toIEOctoHex(); + + filterVal = 'progid:DXImageTransform.Microsoft.Gradient(GradientType=' + type + ', StartColorStr=\'' + startColor.octoHex + '\', EndColorStr=\'' + endColor.octoHex + '\')'; + html += template.replace( '%start%', startColor.stop ).replace( '%end%', endStop ).replace( '%filter%', filterVal ); + }); + self.find( '.iris-ie-gradient-shim' ).remove(); + $( html ).prependTo( self ); + } + + function legacyWebkitGradient( origin, colorList ) { + var stops = []; + origin = ( origin === 'top' ) ? '0% 0%,0% 100%,' : '0% 100%,100% 100%,'; + colorList = fillColorStops( colorList ); + $.each( colorList, function( i, val ){ + stops.push( 'color-stop(' + ( parseFloat( val.stop ) / 100 ) + ', ' + val.color + ')' ); + }); + return '-webkit-gradient(linear,' + origin + stops.join(',') + ')'; + } + + function fillColorStops( colorList ) { + var colors = [], + percs = [], + newColorList = [], + lastIndex = colorList.length - 1; + + $.each( colorList, function( index, val ) { + var color = val, + perc = false, + match = val.match( /1?[0-9]{1,2}%$/ ); + + if ( match ) { + color = val.replace( /\s?1?[0-9]{1,2}%$/, '' ); + perc = match.shift(); + } + colors.push( color ); + percs.push( perc ); + }); + + // back fill first and last + if ( percs[0] === false ) { + percs[0] = '0%'; + } + + if ( percs[lastIndex] === false ) { + percs[lastIndex] = '100%'; + } + + percs = backFillColorStops( percs ); + + $.each( percs, function( i ){ + newColorList[i] = { color: colors[i], stop: percs[i] }; + }); + return newColorList; + } + + function backFillColorStops( stops ) { + var first = 0, + last = stops.length - 1, + i = 0, + foundFirst = false, + incr, + steps, + step, + firstVal; + + if ( stops.length <= 2 || $.inArray( false, stops ) < 0 ) { + return stops; + } + while ( i < stops.length - 1 ) { + if ( ! foundFirst && stops[i] === false ) { + first = i - 1; + foundFirst = true; + } else if ( foundFirst && stops[i] !== false ) { + last = i; + i = stops.length; + } + i++; + } + steps = last - first; + firstVal = parseInt( stops[first].replace('%'), 10 ); + incr = ( parseFloat( stops[last].replace('%') ) - firstVal ) / steps; + i = first + 1; + step = 1; + while ( i < last ) { + stops[i] = ( firstVal + ( step * incr ) ) + '%'; + step++; + i++; + } + return backFillColorStops( stops ); + } + + $.fn.gradient = function() { + var args = arguments; + return this.each( function() { + // this'll be oldishIE + if ( nonGradientIE ) { + stupidIEGradient.apply( this, args ); + } else { + // new hotness + $( this ).css( 'backgroundImage', createGradient.apply( this, args ) ); + } + }); + }; + + $.fn.raninbowGradient = function( origin, args ) { + var opts, template, i, steps; + + origin = origin || 'top'; + opts = $.extend( {}, { s: 100, l: 50 }, args ); + template = 'hsl(%h%,' + opts.s + '%,' + opts.l + '%)'; + i = 0; + steps = []; + while ( i <= 360 ) { + steps.push( template.replace('%h%', i) ); + i += 30; + } + return this.each(function() { + $(this).gradient( origin, steps ); + }); + }; + + // the colorpicker widget def. + Iris = { + options: { + color: false, + mode: 'hsl', + controls: { + horiz: 's', // horizontal defaults to saturation + vert: 'l', // vertical defaults to lightness + strip: 'h' // right strip defaults to hue + }, + hide: true, // hide the color picker by default + border: true, // draw a border around the collection of UI elements + target: false, // a DOM element / jQuery selector that the element will be appended within. Only used when called on an input. + width: 200, // the width of the collection of UI elements + palettes: false // show a palette of basic colors beneath the square. + }, + _color: '', + _palettes: [ '#000', '#fff', '#d33', '#d93', '#ee2', '#81d742', '#1e73be', '#8224e3' ], + _inited: false, + _defaultHSLControls: { + horiz: 's', + vert: 'l', + strip: 'h' + }, + _defaultHSVControls: { + horiz: 'h', + vert: 'v', + strip: 's' + }, + _scale: { + h: 360, + s: 100, + l: 100, + v: 100 + }, + _create: function() { + var self = this, + el = self.element, + color = self.options.color || el.val(); + + if ( gradientType === false ) { + testGradientType(); + } + + if ( el.is( 'input' ) ) { + if ( self.options.target ) { + self.picker = $( _html ).appendTo( self.options.target ); + } else { + self.picker = $( _html ).insertAfter( el ); + } + + self._addInputListeners( el ); + } else { + el.append( _html ); + self.picker = el.find( '.iris-picker' ); + } + + // Browsers / Versions + // Feature detection doesn't work for these, and $.browser is deprecated + if ( isIE ) { + if ( IEVersion === 9 ) { + self.picker.addClass( 'iris-ie-9' ); + } else if ( IEVersion <= 8 ) { + self.picker.addClass( 'iris-ie-lt9' ); + } + } else if ( UA.indexOf('compatible') < 0 && UA.indexOf('khtml') < 0 && UA.match( /mozilla/ ) ) { + self.picker.addClass( 'iris-mozilla' ); + } + + if ( self.options.palettes ) { + self._addPalettes(); + } + + self._color = new Color( color ).setHSpace( self.options.mode ); + self.options.color = self._color.toString(); + + // prep 'em for re-use + self.controls = { + square: self.picker.find( '.iris-square' ), + squareDrag: self.picker.find( '.iris-square-value' ), + horiz: self.picker.find( '.iris-square-horiz' ), + vert: self.picker.find( '.iris-square-vert' ), + strip: self.picker.find( '.iris-strip' ), + stripSlider: self.picker.find( '.iris-strip .iris-slider-offset' ) + }; + + // small sanity check - if we chose hsv, change default controls away from hsl + if ( self.options.mode === 'hsv' && self._has('l', self.options.controls) ) { + self.options.controls = self._defaultHSVControls; + } else if ( self.options.mode === 'hsl' && self._has('v', self.options.controls) ) { + self.options.controls = self._defaultHSLControls; + } + + // store it. HSL gets squirrely + self.hue = self._color.h(); + + if ( self.options.hide ) { + self.picker.hide(); + } + + if ( self.options.border ) { + self.picker.addClass( 'iris-border' ); + } + + self._initControls(); + self.active = 'external'; + self._dimensions(); + self._change(); + }, + _has: function(needle, haystack) { + var ret = false; + $.each(haystack, function(i,v){ + if ( needle === v ) { + ret = true; + // exit the loop + return false; + } + }); + return ret; + }, + _addPalettes: function () { + var container = $( '
' ), + palette = $( '' ), + colors = $.isArray( this.options.palettes ) ? this.options.palettes : this._palettes; + + // do we have an existing container? Empty and reuse it. + if ( this.picker.find( '.iris-palette-container' ).length ) { + container = this.picker.find( '.iris-palette-container' ).detach().html( '' ); + } + + $.each(colors, function(index, val) { + palette.clone().data( 'color', val ) + .css( 'backgroundColor', val ).appendTo( container ) + .height( 10 ).width( 10 ); + }); + + this.picker.append(container); + }, + _paint: function() { + var self = this; + self._paintDimension( 'top', 'strip' ); + self._paintDimension( 'top', 'vert' ); + self._paintDimension( 'left', 'horiz' ); + }, + _paintDimension: function( origin, control ) { + var self = this, + c = self._color, + mode = self.options.mode, + color = self._getHSpaceColor(), + target = self.controls[ control ], + controlOpts = self.options.controls, + stops; + + // don't paint the active control + if ( control === self.active || ( self.active === 'square' && control !== 'strip' ) ) { + return; + } + + switch ( controlOpts[ control ] ) { + case 'h': + if ( mode === 'hsv' ) { + color = c.clone(); + switch ( control ) { + case 'horiz': + color[controlOpts.vert](100); + break; + case 'vert': + color[controlOpts.horiz](100); + break; + case 'strip': + color.setHSpace('hsl'); + break; + } + stops = color.toHsl(); + } else { + if ( control === 'strip' ) { + stops = { s: color.s, l: color.l }; + } else { + stops = { s: 100, l: color.l }; + } + } + + target.raninbowGradient( origin, stops ); + break; + case 's': + if ( mode === 'hsv' ) { + if ( control === 'vert' ) { + stops = [ c.clone().a(0).s(0).toCSS('rgba'), c.clone().a(1).s(0).toCSS('rgba') ]; + } else if ( control === 'strip' ) { + stops = [ c.clone().s(100).toCSS('hsl'), c.clone().s(0).toCSS('hsl') ]; + } else if ( control === 'horiz' ) { + stops = [ '#fff', 'hsl(' + color.h + ',100%,50%)' ]; + } + } else { // implicit mode === 'hsl' + if ( control === 'vert' && self.options.controls.horiz === 'h' ) { + stops = ['hsla(0, 0%, ' + color.l + '%, 0)', 'hsla(0, 0%, ' + color.l + '%, 1)']; + } else { + stops = ['hsl('+ color.h +',0%,50%)', 'hsl(' + color.h + ',100%,50%)']; + } + } + + + target.gradient( origin, stops ); + break; + case 'l': + if ( control === 'strip' ) { + stops = ['hsl(' + color.h + ',100%,100%)', 'hsl(' + color.h + ', ' + color.s + '%,50%)', 'hsl('+ color.h +',100%,0%)']; + } else { + stops = ['#fff', 'rgba(255,255,255,0) 50%', 'rgba(0,0,0,0) 50%', 'rgba(0,0,0,1)']; + } + target.gradient( origin, stops ); + break; + case 'v': + if ( control === 'strip' ) { + stops = [ c.clone().v(100).toCSS(), c.clone().v(0).toCSS() ]; + } else { + stops = ['rgba(0,0,0,0)', '#000']; + } + target.gradient( origin, stops ); + break; + default: + break; + } + }, + + _getHSpaceColor: function() { + return ( this.options.mode === 'hsv' ) ? this._color.toHsv() : this._color.toHsl(); + }, + + _dimensions: function( reset ) { + // whatever size + var self = this, + opts = self.options, + controls = self.controls, + square = controls.square, + strip = self.picker.find( '.iris-strip' ), + squareWidth = '77.5%', + stripWidth = '12%', + totalPadding = 20, + innerWidth = opts.border ? opts.width - totalPadding : opts.width, + controlsHeight, + paletteCount = $.isArray( opts.palettes ) ? opts.palettes.length : self._palettes.length, + paletteMargin, paletteWidth, paletteContainerWidth; + + if ( reset ) { + square.css( 'width', '' ); + strip.css( 'width', '' ); + self.picker.css( {width: '', height: ''} ); + } + + squareWidth = innerWidth * ( parseFloat( squareWidth ) / 100 ); + stripWidth = innerWidth * ( parseFloat( stripWidth ) / 100 ); + controlsHeight = opts.border ? squareWidth + totalPadding : squareWidth; + + square.width( squareWidth ).height( squareWidth ); + strip.height( squareWidth ).width( stripWidth ); + self.picker.css( { width: opts.width, height: controlsHeight } ); + + if ( ! opts.palettes ) { + return self.picker.css( 'paddingBottom', '' ); + } + + // single margin at 2% + paletteMargin = squareWidth * 2 / 100; + paletteContainerWidth = squareWidth - ( ( paletteCount - 1 ) * paletteMargin ); + paletteWidth = paletteContainerWidth / paletteCount; + self.picker.find('.iris-palette').each( function( i ) { + var margin = i === 0 ? 0 : paletteMargin; + $( this ).css({ + width: paletteWidth, + height: paletteWidth, + marginLeft: margin + }); + }); + self.picker.css( 'paddingBottom', paletteWidth + paletteMargin ); + strip.height( paletteWidth + paletteMargin + squareWidth ); + }, + + _addInputListeners: function( input ) { + var self = this, + debounceTimeout = 100, + callback = function( event ){ + var color = new Color( input.val() ), + val = input.val().replace( /^#/, '' ); + + input.removeClass( 'iris-error' ); + // we gave a bad color + if ( color.error ) { + // don't error on an empty input - we want those allowed + if ( val !== '' ) { + input.addClass( 'iris-error' ); + } + } else { + if ( color.toString() !== self._color.toString() ) { + // let's not do this on keyup for hex shortcodes + if ( ! ( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) ) { + self._setOption( 'color', color.toString() ); + } + } + } + }; + + input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) ); + + // If we initialized hidden, show on first focus. The rest is up to you. + if ( self.options.hide ) { + input.one( 'focus', function() { + self.show(); + }); + } + }, + + _initControls: function() { + var self = this, + controls = self.controls, + square = controls.square, + controlOpts = self.options.controls, + stripScale = self._scale[controlOpts.strip]; + + controls.stripSlider.slider({ + orientation: 'vertical', + max: stripScale, + slide: function( event, ui ) { + self.active = 'strip'; + // "reverse" for hue. + if ( controlOpts.strip === 'h' ) { + ui.value = stripScale - ui.value; + } + + self._color[controlOpts.strip]( ui.value ); + self._change.apply( self, arguments ); + } + }); + + controls.squareDrag.draggable({ + containment: controls.square.find( '.iris-square-inner' ), + zIndex: 1000, + cursor: 'move', + drag: function( event, ui ) { + self._squareDrag( event, ui ); + }, + start: function() { + square.addClass( 'iris-dragging' ); + $(this).addClass( 'ui-state-focus' ); + }, + stop: function() { + square.removeClass( 'iris-dragging' ); + $(this).removeClass( 'ui-state-focus' ); + } + }).on( 'mousedown mouseup', function( event ) { + var focusClass = 'ui-state-focus'; + event.preventDefault(); + if (event.type === 'mousedown' ) { + self.picker.find( '.' + focusClass ).removeClass( focusClass ).blur(); + $(this).addClass( focusClass ).focus(); + } else { + $(this).removeClass( focusClass ); + } + }).on( 'keydown', function( event ) { + var container = controls.square, + draggable = controls.squareDrag, + position = draggable.position(), + distance = self.options.width / 100; // Distance in pixels the draggable should be moved: 1 "stop" + + // make alt key go "10" + if ( event.altKey ) { + distance *= 10; + } + + // Reposition if one of the directional keys is pressed + switch ( event.keyCode ) { + case 37: position.left -= distance; break; // Left + case 38: position.top -= distance; break; // Up + case 39: position.left += distance; break; // Right + case 40: position.top += distance; break; // Down + default: return true; // Exit and bubble + } + + // Keep draggable within container + position.left = Math.max( 0, Math.min( position.left, container.width() ) ); + position.top = Math.max( 0, Math.min( position.top, container.height() ) ); + + draggable.css(position); + self._squareDrag( event, { position: position }); + event.preventDefault(); + }); + + // allow clicking on the square to move there and keep dragging + square.mousedown( function( event ) { + var squareOffset, pos; + // only left click + if ( event.which !== 1 ) { + return; + } + + // prevent bubbling from the handle: no infinite loops + if ( ! $( event.target ).is( 'div' ) ) { + return; + } + + squareOffset = self.controls.square.offset(); + pos = { + top: event.pageY - squareOffset.top, + left: event.pageX - squareOffset.left + }; + event.preventDefault(); + self._squareDrag( event, { position: pos } ); + event.target = self.controls.squareDrag.get(0); + self.controls.squareDrag.css( pos ).trigger( event ); + }); + + // palettes + if ( self.options.palettes ) { + self._paletteListeners(); + } + }, + + _paletteListeners: function() { + var self = this; + self.picker.find('.iris-palette-container').on('click.palette', '.iris-palette', function() { + self._color.fromCSS( $(this).data('color') ); + self.active = 'external'; + self._change(); + }).on( 'keydown.palette', '.iris-palette', function( event ) { + if ( ! ( event.keyCode === 13 || event.keyCode === 32 ) ) { + return true; + } + event.stopPropagation(); + $( this ).click(); + }); + }, + + _squareDrag: function( event, ui ) { + var self = this, + controlOpts = self.options.controls, + dimensions = self._squareDimensions(), + vertVal = Math.round( ( dimensions.h - ui.position.top ) / dimensions.h * self._scale[controlOpts.vert] ), + horizVal = self._scale[controlOpts.horiz] - Math.round( ( dimensions.w - ui.position.left ) / dimensions.w * self._scale[controlOpts.horiz] ); + + self._color[controlOpts.horiz]( horizVal )[controlOpts.vert]( vertVal ); + + self.active = 'square'; + self._change.apply( self, arguments ); + }, + + _setOption: function( key, value ) { + var self = this, + oldValue = self.options[key], + doDimensions = false, + hexLessColor, + newColor, + method; + + // ensure the new value is set. We can reset to oldValue if some check wasn't met. + self.options[key] = value; + + switch(key) { + case 'color': + // cast to string in case we have a number + value = '' + value; + hexLessColor = value.replace( /^#/, '' ); + newColor = new Color( value ).setHSpace( self.options.mode ); + if ( newColor.error ) { + self.options[key] = oldValue; + } else { + self._color = newColor; + self.options.color = self.options[key] = self._color.toString(); + self.active = 'external'; + self._change(); + } + break; + case 'palettes': + doDimensions = true; + + if ( value ) { + self._addPalettes(); + } else { + self.picker.find('.iris-palette-container').remove(); + } + + // do we need to add events? + if ( ! oldValue ) { + self._paletteListeners(); + } + break; + case 'width': + doDimensions = true; + break; + case 'border': + doDimensions = true; + method = value ? 'addClass' : 'removeClass'; + self.picker[method]('iris-border'); + break; + case 'mode': + case 'controls': + // if nothing's changed, let's bail, since this causes re-rendering the whole widget + if ( oldValue === value ) { + return; + } + + // we're using these poorly named variables because they're already scoped. + // method is the element that Iris was called on. oldValue will be the options + method = self.element; + oldValue = self.options; + oldValue.hide = ! self.picker.is( ':visible' ); + self.destroy(); + self.picker.remove(); + return $(self.element).iris(oldValue); + } + + // Do we need to recalc dimensions? + if ( doDimensions ) { + self._dimensions(true); + } + }, + + _squareDimensions: function( forceRefresh ) { + var square = this.controls.square, + dimensions, + control; + + if ( forceRefresh !== undef && square.data('dimensions') ) { + return square.data('dimensions'); + } + + control = this.controls.squareDrag; + dimensions = { + w: square.width(), + h: square.height() + }; + square.data( 'dimensions', dimensions ); + return dimensions; + }, + + _isNonHueControl: function( active, type ) { + if ( active === 'square' && this.options.controls.strip === 'h' ) { + return true; + } else if ( type === 'external' || ( type === 'h' && active === 'strip' ) ) { + return false; + } + + return true; + }, + + _change: function() { + var self = this, + controls = self.controls, + color = self._getHSpaceColor(), + actions = [ 'square', 'strip' ], + controlOpts = self.options.controls, + type = controlOpts[self.active] || 'external', + oldHue = self.hue; + + if ( self.active === 'strip' ) { + // take no action on any of the square sliders if we adjusted the strip + actions = []; + } else if ( self.active !== 'external' ) { + // for non-strip, non-external, strip should never change + actions.pop(); // conveniently the last item + } + + $.each( actions, function(index, item) { + var value, dimensions, cssObj; + if ( item !== self.active ) { + switch ( item ) { + case 'strip': + // reverse for hue + value = ( controlOpts.strip === 'h' ) ? self._scale[controlOpts.strip] - color[controlOpts.strip] : color[controlOpts.strip]; + controls.stripSlider.slider( 'value', value ); + break; + case 'square': + dimensions = self._squareDimensions(); + cssObj = { + left: color[controlOpts.horiz] / self._scale[controlOpts.horiz] * dimensions.w, + top: dimensions.h - ( color[controlOpts.vert] / self._scale[controlOpts.vert] * dimensions.h ) + }; + + self.controls.squareDrag.css( cssObj ); + break; + } + } + }); + + // Ensure that we don't change hue if we triggered a hue reset + if ( color.h !== oldHue && self._isNonHueControl( self.active, type ) ) { + self._color.h(oldHue); + } + + // store hue for repeating above check next time + self.hue = self._color.h(); + + self.options.color = self._color.toString(); + + // only run after the first time + if ( self._inited ) { + self._trigger( 'change', { type: self.active }, { color: self._color } ); + } + + if ( self.element.is( ':input' ) && ! self._color.error ) { + self.element.removeClass( 'iris-error' ); + if ( self.element.val() !== self._color.toString() ) { + self.element.val( self._color.toString() ); + } + } + + self._paint(); + self._inited = true; + self.active = false; + }, + // taken from underscore.js _.debounce method + _debounce: function( func, wait, immediate ) { + var timeout, result; + return function() { + var context = this, + args = arguments, + later, + callNow; + + later = function() { + timeout = null; + if ( ! immediate) { + result = func.apply( context, args ); + } + }; + + callNow = immediate && !timeout; + clearTimeout( timeout ); + timeout = setTimeout( later, wait ); + if ( callNow ) { + result = func.apply( context, args ); + } + return result; + }; + }, + show: function() { + this.picker.show(); + }, + hide: function() { + this.picker.hide(); + }, + toggle: function() { + this.picker.toggle(); + }, + color: function(newColor) { + if ( newColor === true ) { + return this._color.clone(); + } else if ( newColor === undef ) { + return this._color.toString(); + } + this.option('color', newColor); + } + }; + // initialize the widget + $.widget( 'a8c.iris', Iris ); + // add CSS + $( '' ).appendTo( 'head' ); + +}( jQuery )); +/*! Color.js - v0.9.11 - 2013-08-09 +* https://github.com/Automattic/Color.js +* Copyright (c) 2013 Matt Wiebe; Licensed GPLv2 */ +(function(global, undef) { + + var Color = function( color, type ) { + if ( ! ( this instanceof Color ) ) + return new Color( color, type ); + + return this._init( color, type ); + }; + + Color.fn = Color.prototype = { + _color: 0, + _alpha: 1, + error: false, + // for preserving hue/sat in fromHsl().toHsl() flows + _hsl: { h: 0, s: 0, l: 0 }, + // for preserving hue/sat in fromHsv().toHsv() flows + _hsv: { h: 0, s: 0, v: 0 }, + // for setting hsl or hsv space - needed for .h() & .s() functions to function properly + _hSpace: 'hsl', + _init: function( color ) { + var func = 'noop'; + switch ( typeof color ) { + case 'object': + // alpha? + if ( color.a !== undef ) + this.a( color.a ); + func = ( color.r !== undef ) ? 'fromRgb' : + ( color.l !== undef ) ? 'fromHsl' : + ( color.v !== undef ) ? 'fromHsv' : func; + return this[func]( color ); + case 'string': + return this.fromCSS( color ); + case 'number': + return this.fromInt( parseInt( color, 10 ) ); + } + return this; + }, + + _error: function() { + this.error = true; + return this; + }, + + clone: function() { + var newColor = new Color( this.toInt() ), + copy = ['_alpha', '_hSpace', '_hsl', '_hsv', 'error']; + for ( var i = copy.length - 1; i >= 0; i-- ) { + newColor[ copy[i] ] = this[ copy[i] ]; + } + return newColor; + }, + + setHSpace: function( space ) { + this._hSpace = ( space === 'hsv' ) ? space : 'hsl'; + return this; + }, + + noop: function() { + return this; + }, + + fromCSS: function( color ) { + var list, + leadingRE = /^(rgb|hs(l|v))a?\(/; + this.error = false; + + // whitespace and semicolon trim + color = color.replace(/^\s+/, '').replace(/\s+$/, '').replace(/;$/, ''); + + if ( color.match(leadingRE) && color.match(/\)$/) ) { + list = color.replace(/(\s|%)/g, '').replace(leadingRE, '').replace(/,?\);?$/, '').split(','); + + if ( list.length < 3 ) + return this._error(); + + if ( list.length === 4 ) { + this.a( parseFloat( list.pop() ) ); + // error state has been set to true in .a() if we passed NaN + if ( this.error ) + return this; + } + + for (var i = list.length - 1; i >= 0; i--) { + list[i] = parseInt(list[i], 10); + if ( isNaN( list[i] ) ) + return this._error(); + } + + if ( color.match(/^rgb/) ) { + return this.fromRgb( { + r: list[0], + g: list[1], + b: list[2] + } ); + } else if ( color.match(/^hsv/) ) { + return this.fromHsv( { + h: list[0], + s: list[1], + v: list[2] + } ); + } else { + return this.fromHsl( { + h: list[0], + s: list[1], + l: list[2] + } ); + } + } else { + // must be hex amirite? + return this.fromHex( color ); + } + }, + + fromRgb: function( rgb, preserve ) { + if ( typeof rgb !== 'object' || rgb.r === undef || rgb.g === undef || rgb.b === undef ) + return this._error(); + + this.error = false; + return this.fromInt( parseInt( ( rgb.r << 16 ) + ( rgb.g << 8 ) + rgb.b, 10 ), preserve ); + }, + + fromHex: function( color ) { + color = color.replace(/^#/, '').replace(/^0x/, ''); + if ( color.length === 3 ) { + color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2]; + } + + // rough error checking - this is where things go squirrely the most + this.error = ! /^[0-9A-F]{6}$/i.test( color ); + return this.fromInt( parseInt( color, 16 ) ); + }, + + fromHsl: function( hsl ) { + var r, g, b, q, p, h, s, l; + + if ( typeof hsl !== 'object' || hsl.h === undef || hsl.s === undef || hsl.l === undef ) + return this._error(); + + this._hsl = hsl; // store it + this._hSpace = 'hsl'; // implicit + h = hsl.h / 360; s = hsl.s / 100; l = hsl.l / 100; + if ( s === 0 ) { + r = g = b = l; // achromatic + } + else { + q = l < 0.5 ? l * ( 1 + s ) : l + s - l * s; + p = 2 * l - q; + r = this.hue2rgb( p, q, h + 1/3 ); + g = this.hue2rgb( p, q, h ); + b = this.hue2rgb( p, q, h - 1/3 ); + } + return this.fromRgb( { + r: r * 255, + g: g * 255, + b: b * 255 + }, true ); // true preserves hue/sat + }, + + fromHsv: function( hsv ) { + var h, s, v, r, g, b, i, f, p, q, t; + if ( typeof hsv !== 'object' || hsv.h === undef || hsv.s === undef || hsv.v === undef ) + return this._error(); + + this._hsv = hsv; // store it + this._hSpace = 'hsv'; // implicit + + h = hsv.h / 360; s = hsv.s / 100; v = hsv.v / 100; + i = Math.floor( h * 6 ); + f = h * 6 - i; + p = v * ( 1 - s ); + q = v * ( 1 - f * s ); + t = v * ( 1 - ( 1 - f ) * s ); + + switch( i % 6 ) { + case 0: + r = v; g = t; b = p; + break; + case 1: + r = q; g = v; b = p; + break; + case 2: + r = p; g = v; b = t; + break; + case 3: + r = p; g = q; b = v; + break; + case 4: + r = t; g = p; b = v; + break; + case 5: + r = v; g = p; b = q; + break; + } + + return this.fromRgb( { + r: r * 255, + g: g * 255, + b: b * 255 + }, true ); // true preserves hue/sat + + }, + // everything comes down to fromInt + fromInt: function( color, preserve ) { + this._color = parseInt( color, 10 ); + + if ( isNaN( this._color ) ) + this._color = 0; + + // let's coerce things + if ( this._color > 16777215 ) + this._color = 16777215; + else if ( this._color < 0 ) + this._color = 0; + + // let's not do weird things + if ( preserve === undef ) { + this._hsv.h = this._hsv.s = this._hsl.h = this._hsl.s = 0; + } + // EVENT GOES HERE + return this; + }, + + hue2rgb: function( p, q, t ) { + if ( t < 0 ) { + t += 1; + } + if ( t > 1 ) { + t -= 1; + } + if ( t < 1/6 ) { + return p + ( q - p ) * 6 * t; + } + if ( t < 1/2 ) { + return q; + } + if ( t < 2/3 ) { + return p + ( q - p ) * ( 2/3 - t ) * 6; + } + return p; + }, + + toString: function() { + var hex = parseInt( this._color, 10 ).toString( 16 ); + if ( this.error ) + return ''; + // maybe left pad it + if ( hex.length < 6 ) { + for (var i = 6 - hex.length - 1; i >= 0; i--) { + hex = '0' + hex; + } + } + return '#' + hex; + }, + + toCSS: function( type, alpha ) { + type = type || 'hex'; + alpha = parseFloat( alpha || this._alpha ); + switch ( type ) { + case 'rgb': + case 'rgba': + var rgb = this.toRgb(); + if ( alpha < 1 ) { + return "rgba( " + rgb.r + ", " + rgb.g + ", " + rgb.b + ", " + alpha + " )"; + } + else { + return "rgb( " + rgb.r + ", " + rgb.g + ", " + rgb.b + " )"; + } + break; + case 'hsl': + case 'hsla': + var hsl = this.toHsl(); + if ( alpha < 1 ) { + return "hsla( " + hsl.h + ", " + hsl.s + "%, " + hsl.l + "%, " + alpha + " )"; + } + else { + return "hsl( " + hsl.h + ", " + hsl.s + "%, " + hsl.l + "% )"; + } + break; + default: + return this.toString(); + } + }, + + toRgb: function() { + return { + r: 255 & ( this._color >> 16 ), + g: 255 & ( this._color >> 8 ), + b: 255 & ( this._color ) + }; + }, + + toHsl: function() { + var rgb = this.toRgb(); + var r = rgb.r / 255, g = rgb.g / 255, b = rgb.b / 255; + var max = Math.max( r, g, b ), min = Math.min( r, g, b ); + var h, s, l = ( max + min ) / 2; + + if ( max === min ) { + h = s = 0; // achromatic + } else { + var d = max - min; + s = l > 0.5 ? d / ( 2 - max - min ) : d / ( max + min ); + switch ( max ) { + case r: h = ( g - b ) / d + ( g < b ? 6 : 0 ); + break; + case g: h = ( b - r ) / d + 2; + break; + case b: h = ( r - g ) / d + 4; + break; + } + h /= 6; + } + + // maintain hue & sat if we've been manipulating things in the HSL space. + h = Math.round( h * 360 ); + if ( h === 0 && this._hsl.h !== h ) { + h = this._hsl.h; + } + s = Math.round( s * 100 ); + if ( s === 0 && this._hsl.s ) { + s = this._hsl.s; + } + + return { + h: h, + s: s, + l: Math.round( l * 100 ) + }; + + }, + + toHsv: function() { + var rgb = this.toRgb(); + var r = rgb.r / 255, g = rgb.g / 255, b = rgb.b / 255; + var max = Math.max( r, g, b ), min = Math.min( r, g, b ); + var h, s, v = max; + var d = max - min; + s = max === 0 ? 0 : d / max; + + if ( max === min ) { + h = s = 0; // achromatic + } else { + switch( max ){ + case r: + h = ( g - b ) / d + ( g < b ? 6 : 0 ); + break; + case g: + h = ( b - r ) / d + 2; + break; + case b: + h = ( r - g ) / d + 4; + break; + } + h /= 6; + } + + // maintain hue & sat if we've been manipulating things in the HSV space. + h = Math.round( h * 360 ); + if ( h === 0 && this._hsv.h !== h ) { + h = this._hsv.h; + } + s = Math.round( s * 100 ); + if ( s === 0 && this._hsv.s ) { + s = this._hsv.s; + } + + return { + h: h, + s: s, + v: Math.round( v * 100 ) + }; + }, + + toInt: function() { + return this._color; + }, + + toIEOctoHex: function() { + // AARRBBGG + var hex = this.toString(); + var AA = parseInt( 255 * this._alpha, 10 ).toString(16); + if ( AA.length === 1 ) { + AA = '0' + AA; + } + return '#' + AA + hex.replace(/^#/, '' ); + }, + + toLuminosity: function() { + var rgb = this.toRgb(); + return 0.2126 * Math.pow( rgb.r / 255, 2.2 ) + 0.7152 * Math.pow( rgb.g / 255, 2.2 ) + 0.0722 * Math.pow( rgb.b / 255, 2.2); + }, + + getDistanceLuminosityFrom: function( color ) { + if ( ! ( color instanceof Color ) ) { + throw 'getDistanceLuminosityFrom requires a Color object'; + } + var lum1 = this.toLuminosity(); + var lum2 = color.toLuminosity(); + if ( lum1 > lum2 ) { + return ( lum1 + 0.05 ) / ( lum2 + 0.05 ); + } + else { + return ( lum2 + 0.05 ) / ( lum1 + 0.05 ); + } + }, + + getMaxContrastColor: function() { + var lum = this.toLuminosity(); + var hex = ( lum >= 0.5 ) ? '000000' : 'ffffff'; + return new Color( hex ); + }, + + getReadableContrastingColor: function( bgColor, minContrast ) { + if ( ! bgColor instanceof Color ) { + return this; + } + + // you shouldn't use less than 5, but you might want to. + var targetContrast = ( minContrast === undef ) ? 5 : minContrast; + // working things + var contrast = bgColor.getDistanceLuminosityFrom( this ); + var maxContrastColor = bgColor.getMaxContrastColor(); + var maxContrast = maxContrastColor.getDistanceLuminosityFrom( bgColor ); + + // if current max contrast is less than the target contrast, we had wishful thinking. + // still, go max + if ( maxContrast <= targetContrast ) { + return maxContrastColor; + } + // or, we might already have sufficient contrast + else if ( contrast >= targetContrast ) { + return this; + } + + var incr = ( 0 === maxContrastColor.toInt() ) ? -1 : 1; + while ( contrast < targetContrast ) { + this.l( incr, true ); // 2nd arg turns this into an incrementer + contrast = this.getDistanceLuminosityFrom( bgColor ); + // infininite loop prevention: you never know. + if ( this._color === 0 || this._color === 16777215 ) { + break; + } + } + + return this; + + }, + + a: function( val ) { + if ( val === undef ) + return this._alpha; + + var a = parseFloat( val ); + + if ( isNaN( a ) ) + return this._error(); + + this._alpha = a; + return this; + }, + + // TRANSFORMS + + darken: function( amount ) { + amount = amount || 5; + return this.l( - amount, true ); + }, + + lighten: function( amount ) { + amount = amount || 5; + return this.l( amount, true ); + }, + + saturate: function( amount ) { + amount = amount || 15; + return this.s( amount, true ); + }, + + desaturate: function( amount ) { + amount = amount || 15; + return this.s( - amount, true ); + }, + + toGrayscale: function() { + return this.setHSpace('hsl').s( 0 ); + }, + + getComplement: function() { + return this.h( 180, true ); + }, + + getSplitComplement: function( step ) { + step = step || 1; + var incr = 180 + ( step * 30 ); + return this.h( incr, true ); + }, + + getAnalog: function( step ) { + step = step || 1; + var incr = step * 30; + return this.h( incr, true ); + }, + + getTetrad: function( step ) { + step = step || 1; + var incr = step * 60; + return this.h( incr, true ); + }, + + getTriad: function( step ) { + step = step || 1; + var incr = step * 120; + return this.h( incr, true ); + }, + + _partial: function( key ) { + var prop = shortProps[key]; + return function( val, incr ) { + var color = this._spaceFunc('to', prop.space); + + // GETTER + if ( val === undef ) + return color[key]; + + // INCREMENT + if ( incr === true ) + val = color[key] + val; + + // MOD & RANGE + if ( prop.mod ) + val = val % prop.mod; + if ( prop.range ) + val = ( val < prop.range[0] ) ? prop.range[0] : ( val > prop.range[1] ) ? prop.range[1] : val; + + // NEW VALUE + color[key] = val; + + return this._spaceFunc('from', prop.space, color); + }; + }, + + _spaceFunc: function( dir, s, val ) { + var space = s || this._hSpace, + funcName = dir + space.charAt(0).toUpperCase() + space.substr(1); + return this[funcName](val); + } + }; + + var shortProps = { + h: { + mod: 360 + }, + s: { + range: [0,100] + }, + l: { + space: 'hsl', + range: [0,100] + }, + v: { + space: 'hsv', + range: [0,100] + }, + r: { + space: 'rgb', + range: [0,255] + }, + g: { + space: 'rgb', + range: [0,255] + }, + b: { + space: 'rgb', + range: [0,255] + } + }; + + for ( var key in shortProps ) { + if ( shortProps.hasOwnProperty( key ) ) + Color.fn[key] = Color.fn._partial(key); + } + + // play nicely with Node + browser + if ( typeof exports === 'object' ) + module.exports = Color; + else + global.Color = Color; + +}(this)); diff --git a/lib/plugins/styling/lang/en/intro.txt b/lib/plugins/styling/lang/en/intro.txt new file mode 100644 index 000000000..4ea55172f --- /dev/null +++ b/lib/plugins/styling/lang/en/intro.txt @@ -0,0 +1,2 @@ +This tool allows you to change certain style settings of your currently selected template. +All changes are stored in a local configuration file and are upgrade safe. \ No newline at end of file diff --git a/lib/plugins/styling/lang/en/lang.php b/lib/plugins/styling/lang/en/lang.php new file mode 100644 index 000000000..a68464f15 --- /dev/null +++ b/lib/plugins/styling/lang/en/lang.php @@ -0,0 +1,32 @@ + + */ + +// menu entry for admin plugins +$lang['js']['menu'] = 'Template Style Settings'; + +// custom language strings for the plugin +$lang['error'] = 'Sorry, this template does not support this functionality.'; + +$lang['btn_preview'] = 'Preview your changes'; +$lang['btn_save'] = 'Save your changes'; +$lang['btn_reset'] = 'Reset your current changes'; +$lang['btn_revert'] = 'Revert all styles back to the template\'s default'; + +// default guaranteed placeholders +$lang['__text__'] = 'Main text color'; +$lang['__background__'] = 'Main text background color'; +$lang['__text_alt__'] = 'Alternative text color'; +$lang['__background_alt__'] = 'Alternative text background color'; +$lang['__text_neu__'] = 'Neutral text color'; +$lang['__background_neu__'] = 'Neutral text background color'; +$lang['__border__'] = 'Border color'; +$lang['__highlight__'] = 'Highlight color (for search results mainly)'; + + + + +//Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/styling/plugin.info.txt b/lib/plugins/styling/plugin.info.txt new file mode 100644 index 000000000..cdf01ee6f --- /dev/null +++ b/lib/plugins/styling/plugin.info.txt @@ -0,0 +1,7 @@ +base styling +author Andreas Gohr +email andi@splitbrain.org +date 2015-05-16 +name styling plugin +desc Allows to edit style.ini replacements +url https://www.dokuwiki.org/plugin:styling diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js new file mode 100644 index 000000000..76cd1a847 --- /dev/null +++ b/lib/plugins/styling/script.js @@ -0,0 +1,92 @@ +/* DOKUWIKI:include_once iris.js */ + +jQuery(function () { + // user openend the admin page, set cookie and redirect + if (jQuery('#plugin__styling').length) { + DokuCookie.setValue('styling_plugin', 1); + document.location.href = document.location.href.replace(/do=admin/, ''); + } + + // continue only if the styling Dialog is currently enabled + if (DokuCookie.getValue('styling_plugin') != 1) return; + + var styling_timeout = null; + + // create dialog element + var $dialog = jQuery(document.createElement('div')); + jQuery('body').append($dialog); + + + /** + * updates the current CSS with a new preview one + */ + function styling_updateCSS() { + var now = new Date().getTime(); + var $style = jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); + $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); + } + + /** + * save current values and reload preview (debounced) + */ + function styling_saveAndUpdate() { + if (styling_timeout) window.clearTimeout(styling_timeout); + styling_timeout = window.setTimeout(function () { + styling_timeout = null; + + var params = $dialog.find('input[type=text]').serializeArray(); + params[params.length] = { name: 'call', value: 'plugin_styling'}; + params[params.length] = {name: 'run', value: 'preview'}; + + jQuery.post( + DOKU_BASE + '/lib/exe/ajax.php', + params, + styling_updateCSS + ); + }, 500); + } + + // load the dialog content and apply listeners + $dialog.load( + DOKU_BASE + '/lib/exe/ajax.php', + { + 'call': 'plugin_styling', + 'run': 'html', + 'id': JSINFO.id + }, + function () { + // load the preview template + styling_updateCSS(); + + // open the dialog + $dialog.dialog({ + 'title': LANG.plugins.styling.menu, + 'width': 500, + 'height': 500, + 'top': 50, + 'position': { 'my': 'left bottom', 'at': 'left bottom', 'of': window }, + // bring everything back to normal + 'close': function (event, ui) { + // disable the styling plugin again + DokuCookie.setValue('styling_plugin', 0); + // reload + document.location.reload() + } + }); + + // we don't need the manual preview in JS mode + $dialog.find('.btn_preview').hide(); + + // add the color picker FIXME add saveAndUpdate to correct event + $dialog.find('.color').iris({ }); + + // listen to keyup events + $dialog.find('input[type=text]').keyup(function () { + console.log('change'); + styling_saveAndUpdate(); + }); + + } + ); + +}); -- cgit v1.2.3 From 4f2e8bf8642a993a0a5edf32a3172eaf77645a25 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 23 May 2015 15:31:16 +0200 Subject: fixed ajax endpoint for styling plugin --- lib/plugins/styling/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index 76cd1a847..f2b4b9ebb 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -39,7 +39,7 @@ jQuery(function () { params[params.length] = {name: 'run', value: 'preview'}; jQuery.post( - DOKU_BASE + '/lib/exe/ajax.php', + DOKU_BASE + 'lib/exe/ajax.php', params, styling_updateCSS ); @@ -48,7 +48,7 @@ jQuery(function () { // load the dialog content and apply listeners $dialog.load( - DOKU_BASE + '/lib/exe/ajax.php', + DOKU_BASE + 'lib/exe/ajax.php', { 'call': 'plugin_styling', 'run': 'html', -- cgit v1.2.3 From 49f111354ae7007893e877ceaeaed0dd3367e8f2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 23 May 2015 15:32:35 +0200 Subject: avoid double ampersand in url --- lib/plugins/styling/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index f2b4b9ebb..caedc7a1c 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -4,7 +4,7 @@ jQuery(function () { // user openend the admin page, set cookie and redirect if (jQuery('#plugin__styling').length) { DokuCookie.setValue('styling_plugin', 1); - document.location.href = document.location.href.replace(/do=admin/, ''); + document.location.href = document.location.href.replace(/&?do=admin/, ''); } // continue only if the styling Dialog is currently enabled -- cgit v1.2.3 From e4632ba4cca90438b3d47594f217a9ed18b980be Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Sat, 23 May 2015 15:37:05 +0000 Subject: Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- lib/plugins/styling/admin.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/admin.php b/lib/plugins/styling/admin.php index 85d87dd71..ab8e5a5f4 100644 --- a/lib/plugins/styling/admin.php +++ b/lib/plugins/styling/admin.php @@ -57,6 +57,7 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { /** * Create the actual editing form + * @param boolean $isajax */ public function form($isajax) { global $conf; -- cgit v1.2.3 From 23a5593c5cae9f85a8821c0207d9e8ad2b6f3b15 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 25 May 2015 00:54:20 +0100 Subject: improved copy for styler plugin --- lib/plugins/styling/lang/en/lang.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/lang/en/lang.php b/lib/plugins/styling/lang/en/lang.php index a68464f15..e50c6b912 100644 --- a/lib/plugins/styling/lang/en/lang.php +++ b/lib/plugins/styling/lang/en/lang.php @@ -18,11 +18,11 @@ $lang['btn_revert'] = 'Revert all styles back to the template\'s default'; // default guaranteed placeholders $lang['__text__'] = 'Main text color'; -$lang['__background__'] = 'Main text background color'; +$lang['__background__'] = 'Main background color'; $lang['__text_alt__'] = 'Alternative text color'; -$lang['__background_alt__'] = 'Alternative text background color'; +$lang['__background_alt__'] = 'Alternative background color'; $lang['__text_neu__'] = 'Neutral text color'; -$lang['__background_neu__'] = 'Neutral text background color'; +$lang['__background_neu__'] = 'Neutral background color'; $lang['__border__'] = 'Border color'; $lang['__highlight__'] = 'Highlight color (for search results mainly)'; -- cgit v1.2.3 From 418cb6171fc2d6d04a505e28c123b22c384db8c5 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 25 May 2015 09:58:54 +0200 Subject: removed unused class --- lib/plugins/styling/admin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/admin.php b/lib/plugins/styling/admin.php index ab8e5a5f4..3c2ab577c 100644 --- a/lib/plugins/styling/admin.php +++ b/lib/plugins/styling/admin.php @@ -93,16 +93,16 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { } echo ''; - echo '

'; + echo '

'; echo ''; echo ''; #FIXME only if preview.ini exists echo '

'; - echo '

'; + echo '

'; echo ''; echo '

'; - echo '

'; + echo '

'; echo ''; #FIXME only if local.ini exists echo '

'; -- cgit v1.2.3 From f969573b0f1e999e5252c3671da9a8b6ac0bbd38 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 25 May 2015 10:00:10 +0200 Subject: removed debuggin output --- lib/plugins/styling/script.js | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index caedc7a1c..7c8ffae91 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -82,7 +82,6 @@ jQuery(function () { // listen to keyup events $dialog.find('input[type=text]').keyup(function () { - console.log('change'); styling_saveAndUpdate(); }); -- cgit v1.2.3 From 18f4ec973d8b711f6687adb71ce03e77e5ab1f41 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 25 May 2015 10:41:49 +0200 Subject: fixed isBundled() check when remote info is unavailable --- lib/plugins/extension/helper/extension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index d089245b5..719249fbe 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -105,7 +105,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { */ public function isBundled() { if (!empty($this->remoteInfo['bundled'])) return $this->remoteInfo['bundled']; - return in_array($this->base, + return in_array($this->id, array( 'authad', 'authldap', 'authmysql', 'authpgsql', 'authplain', 'acl', 'info', 'extension', 'revert', 'popularity', 'config', 'safefnrecode', 'testing', 'template:dokuwiki' -- cgit v1.2.3 From 5875e534bcbccf90fe3767fc77d8ea2a76aad9bd Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Fri, 15 May 2015 15:49:11 +0200 Subject: Plugins can send usage data They just need to register to the PLUGIN_USAGE_DATA event, and then to add either a simple string, or an array of key / value. For example: function register(Doku_Event_Handler $controller) { $controller->register_hook('PLUGIN_USAGE_DATA', 'AFTER', $this, 'usage_data'); } function usage_data(&$event){ $event->data['my_plugin_name'] = 'my usage data'; //or: $event->data['my_plugin_name'] = array ('k1' => 'v1', 'k2' => 'v2'); } --- lib/plugins/popularity/helper.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index 8673fb5af..55264010f 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -253,9 +253,26 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { $data['php_exectime'] = $phptime; $data['php_extension'] = get_loaded_extensions(); + // plugin usage data + $this->_add_plugin_usage_data($data); + return $data; } + protected function _add_plugin_usage_data(&$data){ + $pluginsData = array(); + trigger_event('PLUGIN_POPULARITY_DATA_SETUP', $pluginsData); + foreach($pluginsData as $plugin => $d){ + if ( is_array($d) ) { + foreach($d as $key => $value){ + $data['plugin_' . $plugin . '_' . $key] = $value; + } + } else { + $data['plugin_' . $plugin] = $d; + } + } + } + /** * Callback to search and count the content of directories in DokuWiki * -- cgit v1.2.3 From edc61c3ad8e143dbc6aaf62829b2241e6393606e Mon Sep 17 00:00:00 2001 From: Ikuo Obataya Date: Thu, 28 May 2015 03:36:03 +0200 Subject: translation update --- lib/plugins/authad/lang/ja/lang.php | 3 +++ lib/plugins/authldap/lang/ja/settings.php | 1 + lib/plugins/extension/lang/ja/lang.php | 4 ++++ 3 files changed, 8 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/ja/lang.php b/lib/plugins/authad/lang/ja/lang.php index 91c4f046a..e82ca3791 100644 --- a/lib/plugins/authad/lang/ja/lang.php +++ b/lib/plugins/authad/lang/ja/lang.php @@ -5,6 +5,9 @@ * * @author PzF_X * @author Osaka + * @author Ikuo Obataya */ $lang['domain'] = 'ログオン時のドメイン'; $lang['authpwdexpire'] = 'あなたのパスワードは、あと%d日で有効期限が切れます。パスワードを変更してください。'; +$lang['passchangefail'] = 'パスワードを変更できませんでした。パスワードのルールに合わなかったのかもしれません。'; +$lang['connectfail'] = 'Active Directoryサーバーに接続できませんでした。'; diff --git a/lib/plugins/authldap/lang/ja/settings.php b/lib/plugins/authldap/lang/ja/settings.php index 6cff0ea67..717b5a6d9 100644 --- a/lib/plugins/authldap/lang/ja/settings.php +++ b/lib/plugins/authldap/lang/ja/settings.php @@ -7,6 +7,7 @@ * @author Hideaki SAWADA * @author Hideaki SAWADA * @author PzF_X + * @author Ikuo Obataya */ $lang['server'] = 'LDAPサーバー。ホスト名(localhost)又は完全修飾URL(ldap://server.tld:389)'; $lang['port'] = '上記が完全修飾URLでない場合、LDAPサーバーポート'; diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php index ce6ed2b97..42334c767 100644 --- a/lib/plugins/extension/lang/ja/lang.php +++ b/lib/plugins/extension/lang/ja/lang.php @@ -6,6 +6,7 @@ * @author Hideaki SAWADA * @author PzF_X * @author Satoshi Sahara + * @author Ikuo Obataya */ $lang['menu'] = '拡張機能管理'; $lang['tab_plugins'] = 'インストール済プラグイン'; @@ -27,6 +28,9 @@ $lang['btn_disable'] = '無効化'; $lang['btn_install'] = 'インストール'; $lang['btn_reinstall'] = '再インストール'; $lang['js']['reallydel'] = 'この拡張機能を本当にアンインストールしますか?'; +$lang['js']['display_enabled'] = '有効'; +$lang['js']['display_disabled'] = '無効'; +$lang['js']['display_updatable'] = '更新可能'; $lang['search_for'] = '拡張機能の検索:'; $lang['search'] = '検索'; $lang['extensionby'] = '%s 作者: %s'; -- cgit v1.2.3 From 6a7af1ccf98fac8f5dd1097f5d4978df562a5d02 Mon Sep 17 00:00:00 2001 From: Hendrik Diel Date: Sun, 7 Jun 2015 10:46:45 +0200 Subject: translation update --- lib/plugins/authmysql/lang/de/lang.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authmysql/lang/de/lang.php b/lib/plugins/authmysql/lang/de/lang.php index 6160f60ea..819b98458 100644 --- a/lib/plugins/authmysql/lang/de/lang.php +++ b/lib/plugins/authmysql/lang/de/lang.php @@ -4,5 +4,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Noel Tilliot + * @author Hendrik Diel */ +$lang['userexists'] = 'Entschuldigung, aber dieser Benutzername ist bereits vergeben.'; $lang['usernotexists'] = 'Sorry, dieser Nutzer existiert nicht.'; +$lang['writefail'] = 'Die Benutzerdaten konnten nicht geändert werden. Bitte wenden Sie sich an den Wiki-Admin.'; -- cgit v1.2.3 From e596bf92c4429edfcae42012e2a3507be9e9bbe9 Mon Sep 17 00:00:00 2001 From: hyeonsoft Date: Thu, 11 Jun 2015 12:01:03 +0200 Subject: translation update --- lib/plugins/authmysql/lang/ko/lang.php | 11 +++++++++++ lib/plugins/extension/lang/ko/lang.php | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 lib/plugins/authmysql/lang/ko/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authmysql/lang/ko/lang.php b/lib/plugins/authmysql/lang/ko/lang.php new file mode 100644 index 000000000..a2ad278c1 --- /dev/null +++ b/lib/plugins/authmysql/lang/ko/lang.php @@ -0,0 +1,11 @@ + + */ +$lang['connectfail'] = '데이터베이스에 연결하는 데 실패했습니다.'; +$lang['userexists'] = '이 계정으로 이미 로그인 된 사용자가 있습니다.'; +$lang['usernotexists'] = '이 계정은 존재하지 않습니다.'; +$lang['writefail'] = '사용자 데이터를 수정할 수 없습니다. 관리자에게 문의하십시오.'; diff --git a/lib/plugins/extension/lang/ko/lang.php b/lib/plugins/extension/lang/ko/lang.php index 5dc5d8269..3de28c0c8 100644 --- a/lib/plugins/extension/lang/ko/lang.php +++ b/lib/plugins/extension/lang/ko/lang.php @@ -5,6 +5,7 @@ * * @author Young gon Cha * @author Myeongjin + * @author hyeonsoft */ $lang['menu'] = '확장 기능 관리자'; $lang['tab_plugins'] = '설치된 플러그인'; @@ -26,6 +27,9 @@ $lang['btn_disable'] = '비활성화'; $lang['btn_install'] = '설치'; $lang['btn_reinstall'] = '다시 설치'; $lang['js']['reallydel'] = '정말 이 확장 기능을 제거하겠습니까?'; +$lang['js']['display_viewoptions'] = '보기 옵션:'; +$lang['js']['display_enabled'] = '켜짐'; +$lang['js']['display_disabled'] = '꺼짐'; $lang['search_for'] = '확장 기능 검색:'; $lang['search'] = '검색'; $lang['extensionby'] = '%s (저자 %s)'; -- cgit v1.2.3 From 98e550d66d125f8f445387a1b7f66446fb684421 Mon Sep 17 00:00:00 2001 From: Myeongjin Date: Sat, 13 Jun 2015 14:20:39 +0900 Subject: change two spaces to a space In line 5 and 6, Message have two spaces, so I change them to a space. --- lib/plugins/usermanager/lang/en/import.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/usermanager/lang/en/import.txt b/lib/plugins/usermanager/lang/en/import.txt index 360a0689b..3a1cf999e 100644 --- a/lib/plugins/usermanager/lang/en/import.txt +++ b/lib/plugins/usermanager/lang/en/import.txt @@ -2,8 +2,8 @@ Requires a CSV file of users with at least four columns. The columns must contain, in order: user-id, full name, email address and groups. -The CSV fields should be separated by commas (,) and strings delimited by quotation marks (%%""%%). Backslash (\) can be used for escaping. -For an example of a suitable file, try the "Export Users" function above. +The CSV fields should be separated by commas (,) and strings delimited by quotation marks (%%""%%). Backslash (\) can be used for escaping. +For an example of a suitable file, try the "Export Users" function above. Duplicate user-ids will be ignored. A password will be generated and emailed to each successfully imported user. -- cgit v1.2.3 From 11fcf0d8b9dbb221912cd2c4a487a31f0afb0395 Mon Sep 17 00:00:00 2001 From: Maurizio Date: Sun, 14 Jun 2015 19:46:30 +0200 Subject: translation update --- lib/plugins/authmysql/lang/it/settings.php | 2 ++ lib/plugins/authpgsql/lang/it/settings.php | 3 +++ lib/plugins/extension/lang/it/intro_install.txt | 1 + lib/plugins/extension/lang/it/intro_plugins.txt | 1 + lib/plugins/extension/lang/it/lang.php | 27 +++++++++++++++++++++++++ 5 files changed, 34 insertions(+) create mode 100644 lib/plugins/extension/lang/it/intro_install.txt create mode 100644 lib/plugins/extension/lang/it/intro_plugins.txt (limited to 'lib/plugins') diff --git a/lib/plugins/authmysql/lang/it/settings.php b/lib/plugins/authmysql/lang/it/settings.php index 10c0de96f..9dc1a0157 100644 --- a/lib/plugins/authmysql/lang/it/settings.php +++ b/lib/plugins/authmysql/lang/it/settings.php @@ -6,6 +6,7 @@ * @author Claudio Lanconelli * @author Mirko * @author Francesco + * @author Maurizio */ $lang['server'] = 'Il tuo server MySQL'; $lang['user'] = 'User name di MySQL'; @@ -17,6 +18,7 @@ $lang['checkPass'] = 'Istruzione SQL per il controllo password'; $lang['getUserInfo'] = 'Istruzione SQL per recuperare le informazioni utente'; $lang['getUsers'] = 'Istruzione SQL per listare tutti gli utenti'; $lang['FilterLogin'] = 'Istruzione SQL per per filtrare gli utenti in funzione del "login name"'; +$lang['FilterGroup'] = 'Clausola SQL per filtrare gli utenti in base all\'appartenenza al gruppo'; $lang['SortOrder'] = 'Istruzione SQL per ordinare gli utenti'; $lang['addUser'] = 'Istruzione SQL per aggiungere un nuovo utente'; $lang['addGroup'] = 'Istruzione SQL per aggiungere un nuovo gruppo'; diff --git a/lib/plugins/authpgsql/lang/it/settings.php b/lib/plugins/authpgsql/lang/it/settings.php index e8a40dcb2..bc326b34f 100644 --- a/lib/plugins/authpgsql/lang/it/settings.php +++ b/lib/plugins/authpgsql/lang/it/settings.php @@ -5,9 +5,12 @@ * * @author Francesco * @author Torpedo + * @author Maurizio */ $lang['server'] = 'Il tuo server PostgreSQL '; $lang['port'] = 'La porta del tuo server PostgreSQL '; $lang['user'] = 'Lo username PostgreSQL'; +$lang['password'] = 'Password dell\'utente summenzionato'; $lang['database'] = 'Database da usare'; +$lang['debug'] = 'Visualizza informazioni addizionali di debug'; $lang['getUsers'] = 'Dichiarazione SQL per elencare tutti gli utenti'; diff --git a/lib/plugins/extension/lang/it/intro_install.txt b/lib/plugins/extension/lang/it/intro_install.txt new file mode 100644 index 000000000..5106500ba --- /dev/null +++ b/lib/plugins/extension/lang/it/intro_install.txt @@ -0,0 +1 @@ +Qui potete installare manualmente plugin e template, sia caricandoli in upload sia fornendo una URL per scaricarli direttamente. \ No newline at end of file diff --git a/lib/plugins/extension/lang/it/intro_plugins.txt b/lib/plugins/extension/lang/it/intro_plugins.txt new file mode 100644 index 000000000..cd7825fb2 --- /dev/null +++ b/lib/plugins/extension/lang/it/intro_plugins.txt @@ -0,0 +1 @@ +Questi sono i plugin attualmente installati nel vostro DokuWiki. Qui potete abilitarli o disabilitarli o addirittura disinstallarli completamente. Qui sono mostrati anche gli aggiornamenti dei plugin, assicurativi di leggere la relativa documentazione prima di aggiornarli. \ No newline at end of file diff --git a/lib/plugins/extension/lang/it/lang.php b/lib/plugins/extension/lang/it/lang.php index 1aa658e0f..80ed0ddcf 100644 --- a/lib/plugins/extension/lang/it/lang.php +++ b/lib/plugins/extension/lang/it/lang.php @@ -6,7 +6,18 @@ * @author Francesco * @author Fabio * @author Torpedo + * @author Maurizio */ +$lang['menu'] = 'Manager delle Extension'; +$lang['tab_plugins'] = 'Plugin Installati'; +$lang['tab_templates'] = 'Template Installati'; +$lang['tab_search'] = 'Ricerca e Installazione'; +$lang['tab_install'] = 'Installazione Manuale'; +$lang['notimplemented'] = 'Questa funzionalità non è ancora stata implementata'; +$lang['notinstalled'] = 'Questa extension non è installata'; +$lang['alreadyenabled'] = 'Questa extension è già stata abilitata'; +$lang['alreadydisabled'] = 'Questa extension à già stata disabilitata'; +$lang['pluginlistsaveerror'] = 'Si è verificato un errore durante il salvataggio dell\'elenco dei plugin'; $lang['unknownauthor'] = 'Autore sconosciuto'; $lang['unknownversion'] = 'Revisione sconosciuta'; $lang['btn_info'] = 'Mostra maggiori informazioni'; @@ -17,7 +28,14 @@ $lang['btn_disable'] = 'Disabilita'; $lang['btn_install'] = 'Installa'; $lang['btn_reinstall'] = 'Reinstalla'; $lang['js']['reallydel'] = 'Sicuro di disinstallare questa estensione?'; +$lang['js']['display_viewoptions'] = 'Opzioni di Visualizzazione:'; +$lang['js']['display_enabled'] = 'abilitato'; +$lang['js']['display_disabled'] = 'disabilitato'; +$lang['js']['display_updatable'] = 'aggiornabile'; +$lang['search_for'] = 'Extension di Ricerca:'; $lang['search'] = 'Cerca'; +$lang['screenshot'] = 'Screenshot di %s'; +$lang['popularity'] = 'Popolarità: %s%%'; $lang['homepage_link'] = 'Documenti'; $lang['bugs_features'] = 'Bug'; $lang['tags'] = 'Tag:'; @@ -46,9 +64,13 @@ $lang['status_disabled'] = 'disabilitato'; $lang['status_unmodifiable'] = 'inmodificabile'; $lang['status_plugin'] = 'plugin'; $lang['status_template'] = 'modello'; +$lang['status_bundled'] = 'accoppiato'; $lang['msg_enabled'] = 'Plugin %s abilitato'; $lang['msg_disabled'] = 'Plugin %s disabilitato'; $lang['msg_delete_success'] = 'Estensione %s disinstallata'; +$lang['msg_delete_failed'] = 'Disinstallazione dell\'Extension %s fallita'; +$lang['msg_template_install_success'] = 'Il template %s è stato installato correttamente'; +$lang['msg_template_update_success'] = 'Il Template %s è stato aggiornato correttamente'; $lang['msg_plugin_install_success'] = 'Plugin %s installato con successo'; $lang['msg_plugin_update_success'] = 'Plugin %s aggiornato con successo'; $lang['msg_upload_failed'] = 'Caricamento del file fallito'; @@ -58,7 +80,12 @@ $lang['wrong_folder'] = 'Plugin non installato correttamente: Date: Fri, 26 Jun 2015 12:22:43 +0200 Subject: fixes various probelms mentioned in #1163 however I think I will convert the dialog to a real popup instead. --- lib/plugins/styling/lang/en/lang.php | 1 + lib/plugins/styling/script.js | 79 ++++++++++++++---------------------- lib/plugins/styling/style.less | 8 ++++ 3 files changed, 40 insertions(+), 48 deletions(-) create mode 100644 lib/plugins/styling/style.less (limited to 'lib/plugins') diff --git a/lib/plugins/styling/lang/en/lang.php b/lib/plugins/styling/lang/en/lang.php index e50c6b912..d100d4324 100644 --- a/lib/plugins/styling/lang/en/lang.php +++ b/lib/plugins/styling/lang/en/lang.php @@ -7,6 +7,7 @@ // menu entry for admin plugins $lang['js']['menu'] = 'Template Style Settings'; +$lang['js']['popup'] = 'Open as Popup'; // custom language strings for the plugin $lang['error'] = 'Sorry, this template does not support this functionality.'; diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index 7c8ffae91..6dc4c84ed 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -1,10 +1,17 @@ /* DOKUWIKI:include_once iris.js */ jQuery(function () { - // user openend the admin page, set cookie and redirect - if (jQuery('#plugin__styling').length) { - DokuCookie.setValue('styling_plugin', 1); - document.location.href = document.location.href.replace(/&?do=admin/, ''); + // add popup option to admin page + var $styling_plugin = jQuery('#plugin__styling'); + if ($styling_plugin.length) { + var $hl = $styling_plugin.find('h1').first(); + var $btn = jQuery(''); + $hl.append($btn); + + $btn.click(function (e) { + DokuCookie.setValue('styling_plugin', 1); + document.location.href = document.location.href.replace(/&?do=admin/, ''); + }); } // continue only if the styling Dialog is currently enabled @@ -16,7 +23,6 @@ jQuery(function () { var $dialog = jQuery(document.createElement('div')); jQuery('body').append($dialog); - /** * updates the current CSS with a new preview one */ @@ -26,29 +32,28 @@ jQuery(function () { $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); } - /** - * save current values and reload preview (debounced) - */ - function styling_saveAndUpdate() { - if (styling_timeout) window.clearTimeout(styling_timeout); - styling_timeout = window.setTimeout(function () { - styling_timeout = null; + // prepare the dialog + $dialog.dialog({ + 'autoOpen': false, + 'title': LANG.plugins.styling.menu, + 'width': 500, + 'height': 500, + 'position': {'my': 'left bottom', 'at': 'left bottom-40', 'of': window}, + 'closeOnEscape': true, + + // bring everything back to normal on close + 'close': function (event, ui) { + // disable the styling plugin again + DokuCookie.setValue('styling_plugin', 0); + // reload + document.location.reload() + } + }); - var params = $dialog.find('input[type=text]').serializeArray(); - params[params.length] = { name: 'call', value: 'plugin_styling'}; - params[params.length] = {name: 'run', value: 'preview'}; - - jQuery.post( - DOKU_BASE + 'lib/exe/ajax.php', - params, - styling_updateCSS - ); - }, 500); - } // load the dialog content and apply listeners $dialog.load( - DOKU_BASE + 'lib/exe/ajax.php', + DOKU_BASE + 'lib/exe/ajax.php', { 'call': 'plugin_styling', 'run': 'html', @@ -59,32 +64,10 @@ jQuery(function () { styling_updateCSS(); // open the dialog - $dialog.dialog({ - 'title': LANG.plugins.styling.menu, - 'width': 500, - 'height': 500, - 'top': 50, - 'position': { 'my': 'left bottom', 'at': 'left bottom', 'of': window }, - // bring everything back to normal - 'close': function (event, ui) { - // disable the styling plugin again - DokuCookie.setValue('styling_plugin', 0); - // reload - document.location.reload() - } - }); - - // we don't need the manual preview in JS mode - $dialog.find('.btn_preview').hide(); + $dialog.dialog('open'); // add the color picker FIXME add saveAndUpdate to correct event - $dialog.find('.color').iris({ }); - - // listen to keyup events - $dialog.find('input[type=text]').keyup(function () { - styling_saveAndUpdate(); - }); - + $dialog.find('.color').iris({}); } ); diff --git a/lib/plugins/styling/style.less b/lib/plugins/styling/style.less new file mode 100644 index 000000000..8920cb183 --- /dev/null +++ b/lib/plugins/styling/style.less @@ -0,0 +1,8 @@ +#plugin__styling { + + h1 button { + font-size: 12px; + line-height: 16px; + margin-left: 1em; + } +} -- cgit v1.2.3 From 6667cd8743e57a4492cfbcbe1066ea48d444f7a2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 26 Jun 2015 12:57:58 +0200 Subject: changed the whole thing to a real popup --- lib/plugins/styling/admin.php | 27 ++++++------- lib/plugins/styling/lang/en/lang.php | 4 +- lib/plugins/styling/popup.php | 28 ++++++++++++++ lib/plugins/styling/script.js | 73 +++++++----------------------------- 4 files changed, 56 insertions(+), 76 deletions(-) create mode 100644 lib/plugins/styling/popup.php (limited to 'lib/plugins') diff --git a/lib/plugins/styling/admin.php b/lib/plugins/styling/admin.php index 3c2ab577c..627efbd15 100644 --- a/lib/plugins/styling/admin.php +++ b/lib/plugins/styling/admin.php @@ -11,6 +11,8 @@ if(!defined('DOKU_INC')) die(); class admin_plugin_styling extends DokuWiki_Admin_Plugin { + public $ispopup = false; + /** * @return int sort number in admin menu */ @@ -25,15 +27,6 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { return true; } - /** - * @param string $language - * @return string - */ - public function getMenuText($language) { - $js = $this->getLang('js'); - return $js['menu']; - } - /** * handle the different actions (also called from ajax) */ @@ -49,17 +42,19 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { * Render HTML output, e.g. helpful text and a form */ public function html() { - echo '
'; - ptln('

'.$this->getMenuText('').'

'); - $this->form(false); + $class = 'nopopup'; + if($this->ispopup) $class = 'ispopup'; + + echo '
'; + ptln('

'.$this->getLang('menu').'

'); + $this->form(); echo '
'; } /** * Create the actual editing form - * @param boolean $isajax */ - public function form($isajax) { + public function form() { global $conf; global $ID; define('SIMPLE_TEST', 1); // hack, ideally certain functions should be moved out of css.php @@ -67,8 +62,8 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { $styleini = css_styleini($conf['template'], true); $replacements = $styleini['replacements']; - if($isajax) { - $target = wl($ID, array('do' => 'styling_plugin')); + if($this->ispopup) { + $target = DOKU_BASE.'lib/plugins/styling/popup.php'; } else { $target = wl($ID, array('do' => 'admin', 'page' => 'styling')); } diff --git a/lib/plugins/styling/lang/en/lang.php b/lib/plugins/styling/lang/en/lang.php index d100d4324..85ac0ec29 100644 --- a/lib/plugins/styling/lang/en/lang.php +++ b/lib/plugins/styling/lang/en/lang.php @@ -6,7 +6,9 @@ */ // menu entry for admin plugins -$lang['js']['menu'] = 'Template Style Settings'; +$lang['menu'] = 'Template Style Settings'; + + $lang['js']['popup'] = 'Open as Popup'; // custom language strings for the plugin diff --git a/lib/plugins/styling/popup.php b/lib/plugins/styling/popup.php new file mode 100644 index 000000000..eea4f3bfd --- /dev/null +++ b/lib/plugins/styling/popup.php @@ -0,0 +1,28 @@ +ispopup = true; + +// handle posts +$plugin->handle(); + +// output plugin in a very minimal template: +?> + + + <?php echo $plugin->getLang('menu') ?> + + + +
+ html() ?> +
+ + diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index 6dc4c84ed..8b4563986 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -1,74 +1,29 @@ /* DOKUWIKI:include_once iris.js */ jQuery(function () { - // add popup option to admin page + var $styling_plugin = jQuery('#plugin__styling'); - if ($styling_plugin.length) { + if(!$styling_plugin.length) return; + + + if (!$styling_plugin.hasClass('ispopup')) { var $hl = $styling_plugin.find('h1').first(); var $btn = jQuery(''); $hl.append($btn); $btn.click(function (e) { - DokuCookie.setValue('styling_plugin', 1); - document.location.href = document.location.href.replace(/&?do=admin/, ''); + var windowFeatures = "menubar=no,location=no,resizable=yes,scrollbars=yes,status=false,width=500,height=500"; + window.open(DOKU_BASE + 'lib/plugins/styling/popup.php', 'styling', windowFeatures) }); + return; } - // continue only if the styling Dialog is currently enabled - if (DokuCookie.getValue('styling_plugin') != 1) return; - - var styling_timeout = null; - - // create dialog element - var $dialog = jQuery(document.createElement('div')); - jQuery('body').append($dialog); - - /** - * updates the current CSS with a new preview one - */ - function styling_updateCSS() { - var now = new Date().getTime(); - var $style = jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); - $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); - } - - // prepare the dialog - $dialog.dialog({ - 'autoOpen': false, - 'title': LANG.plugins.styling.menu, - 'width': 500, - 'height': 500, - 'position': {'my': 'left bottom', 'at': 'left bottom-40', 'of': window}, - 'closeOnEscape': true, - - // bring everything back to normal on close - 'close': function (event, ui) { - // disable the styling plugin again - DokuCookie.setValue('styling_plugin', 0); - // reload - document.location.reload() - } - }); - - - // load the dialog content and apply listeners - $dialog.load( - DOKU_BASE + 'lib/exe/ajax.php', - { - 'call': 'plugin_styling', - 'run': 'html', - 'id': JSINFO.id - }, - function () { - // load the preview template - styling_updateCSS(); - - // open the dialog - $dialog.dialog('open'); + // add the color picker + $styling_plugin.find('.color').iris({}); - // add the color picker FIXME add saveAndUpdate to correct event - $dialog.find('.color').iris({}); - } - ); + // load preview in main window + var now = new Date().getTime(); + var $style = window.opener.jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); + $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); }); -- cgit v1.2.3 From 3e2beab52631135f77d0ad5b6ed297458bfff2f2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 26 Jun 2015 13:31:46 +0200 Subject: added a simple loading screen for the JavaScript preview --- lib/plugins/styling/lang/en/lang.php | 2 +- lib/plugins/styling/script.js | 25 ++++++++++++++++++++++++- lib/plugins/styling/style.less | 4 ++++ 3 files changed, 29 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/lang/en/lang.php b/lib/plugins/styling/lang/en/lang.php index 85ac0ec29..a076065cb 100644 --- a/lib/plugins/styling/lang/en/lang.php +++ b/lib/plugins/styling/lang/en/lang.php @@ -8,7 +8,7 @@ // menu entry for admin plugins $lang['menu'] = 'Template Style Settings'; - +$lang['js']['loader'] = 'Preview is loading...
if this does not goes away, your values may be faulty'; $lang['js']['popup'] = 'Open as Popup'; // custom language strings for the plugin diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index 8b4563986..f732c0524 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -3,7 +3,7 @@ jQuery(function () { var $styling_plugin = jQuery('#plugin__styling'); - if(!$styling_plugin.length) return; + if (!$styling_plugin.length) return; if (!$styling_plugin.hasClass('ispopup')) { @@ -21,9 +21,32 @@ jQuery(function () { // add the color picker $styling_plugin.find('.color').iris({}); + // append the loader screen + $loader = window.opener.jQuery('#plugin__styling_loader'); + if (!$loader.length) { + $loader = jQuery('
' + LANG.plugins.styling.loader + '
'); + $loader.css({ + 'position': 'absolute', + 'width': '100%', + 'height': '100%', + 'top': 0, + 'left': 0, + 'z-index': 5000, + 'background-color': '#fff', + 'opacity': '0.7', + 'color': '#000', + 'font-size': '40px', + 'text-align': 'center', + 'line-height': '90px' + }); + window.opener.jQuery('body').append($loader); + } + // load preview in main window var now = new Date().getTime(); var $style = window.opener.jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); + $style.attr('href', ''); $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); + }); diff --git a/lib/plugins/styling/style.less b/lib/plugins/styling/style.less index 8920cb183..3cb563fdb 100644 --- a/lib/plugins/styling/style.less +++ b/lib/plugins/styling/style.less @@ -6,3 +6,7 @@ margin-left: 1em; } } + +#plugin__styling_loader { + display: none; +} -- cgit v1.2.3 From bcea9d64ebf4b0cc2c80209b7669e3e7e954c4c8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 26 Jun 2015 13:35:15 +0200 Subject: removed no longer needed ajax action components --- lib/plugins/styling/action.php | 48 ------------------------------------------ lib/plugins/styling/script.js | 8 ++----- 2 files changed, 2 insertions(+), 54 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/action.php b/lib/plugins/styling/action.php index 622c634d6..896e14bef 100644 --- a/lib/plugins/styling/action.php +++ b/lib/plugins/styling/action.php @@ -26,8 +26,6 @@ class action_plugin_styling extends DokuWiki_Action_Plugin { * @return void */ public function register(Doku_Event_Handler $controller) { - $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle_ajax'); - $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'handle_action'); $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle_header'); } @@ -57,52 +55,6 @@ class action_plugin_styling extends DokuWiki_Action_Plugin { } } - /** - * Updates the style.ini settings by passing it on to handle() of the admin component - * - * @param Doku_Event $event event object by reference - * @param mixed $param [the parameters passed as fifth argument to register_hook() when this - * handler was registered] - * @return void - */ - public function handle_action(Doku_Event &$event, $param) { - if($event->data != 'styling_plugin') return; - if(!auth_isadmin()) return; - $event->data = 'show'; - - /** @var admin_plugin_styling $hlp */ - $hlp = plugin_load('admin', 'styling'); - $hlp->handle(); - } - - /** - * Create the style form in the floating Dialog - * - * @param Doku_Event $event event object by reference - * @param mixed $param [the parameters passed as fifth argument to register_hook() when this - * handler was registered] - * @return void - */ - - public function handle_ajax(Doku_Event &$event, $param) { - if($event->data != 'plugin_styling') return; - if(!auth_isadmin()) return; - $event->preventDefault(); - $event->stopPropagation(); - - global $ID; - global $INPUT; - $ID = getID(); - - /** @var admin_plugin_styling $hlp */ - $hlp = plugin_load('admin', 'styling'); - if($INPUT->str('run') == 'preview') { - $hlp->run_preview(); - } else { - $hlp->form(true); - } - } - } // vim:ts=4:sw=4:et: diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index f732c0524..409148471 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -5,6 +5,8 @@ jQuery(function () { var $styling_plugin = jQuery('#plugin__styling'); if (!$styling_plugin.length) return; + // add the color picker + $styling_plugin.find('.color').iris({}); if (!$styling_plugin.hasClass('ispopup')) { var $hl = $styling_plugin.find('h1').first(); @@ -18,9 +20,6 @@ jQuery(function () { return; } - // add the color picker - $styling_plugin.find('.color').iris({}); - // append the loader screen $loader = window.opener.jQuery('#plugin__styling_loader'); if (!$loader.length) { @@ -45,8 +44,5 @@ jQuery(function () { // load preview in main window var now = new Date().getTime(); var $style = window.opener.jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); - $style.attr('href', ''); $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); - - }); -- cgit v1.2.3 From c2f2dedb56cd3872aa50d58de0cb3083b36b7872 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 26 Jun 2015 14:04:20 +0200 Subject: reset page back to normal on closing dialog --- lib/plugins/styling/script.js | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index 409148471..6fc2b9043 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -2,12 +2,15 @@ jQuery(function () { + var doreload = 1; + var $styling_plugin = jQuery('#plugin__styling'); if (!$styling_plugin.length) return; // add the color picker $styling_plugin.find('.color').iris({}); + // add button on main page if (!$styling_plugin.hasClass('ispopup')) { var $hl = $styling_plugin.find('h1').first(); var $btn = jQuery(''); @@ -20,6 +23,23 @@ jQuery(function () { return; } + // reload the main page on close + window.onunload = function(e) { + if(doreload) { + window.opener.document.location.reload(); + } + return null; + }; + + // don't reload on our own buttons + jQuery('input[type=submit]').click(function(e){ + doreload = false; + }); + + // remove style + var $style = window.opener.jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); + $style.attr('href', ''); + // append the loader screen $loader = window.opener.jQuery('#plugin__styling_loader'); if (!$loader.length) { @@ -41,8 +61,11 @@ jQuery(function () { window.opener.jQuery('body').append($loader); } - // load preview in main window - var now = new Date().getTime(); - var $style = window.opener.jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); - $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); + // load preview in main window (timeout works around chrome updating CSS weirdness) + window.setTimeout(function() { + var now = new Date().getTime(); + $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); + }, 500); + + }); -- cgit v1.2.3 From f4b12de73d07db2a5a0549309329486d7a9e0fdf Mon Sep 17 00:00:00 2001 From: Takumo <9206984@mail.ru> Date: Mon, 29 Jun 2015 12:46:05 +0200 Subject: translation update --- lib/plugins/authad/lang/ru/lang.php | 3 +++ lib/plugins/authldap/lang/ru/lang.php | 9 +++++++++ lib/plugins/authmysql/lang/ru/lang.php | 11 +++++++++++ lib/plugins/extension/lang/ru/lang.php | 5 +++++ 4 files changed, 28 insertions(+) create mode 100644 lib/plugins/authldap/lang/ru/lang.php create mode 100644 lib/plugins/authmysql/lang/ru/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/ru/lang.php b/lib/plugins/authad/lang/ru/lang.php index 6a3f6e995..fe56be2bf 100644 --- a/lib/plugins/authad/lang/ru/lang.php +++ b/lib/plugins/authad/lang/ru/lang.php @@ -4,6 +4,9 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Aleksandr Selivanov + * @author Takumo <9206984@mail.ru> */ $lang['domain'] = 'Домен'; $lang['authpwdexpire'] = 'Действие вашего пароля истекает через %d дней. Вы должны изменить его как можно скорее'; +$lang['passchangefail'] = 'Не удалось изменить пароль. Возможно, он не соответствует требованиям к паролю.'; +$lang['connectfail'] = 'Невозможно соединиться с сервером AD.'; diff --git a/lib/plugins/authldap/lang/ru/lang.php b/lib/plugins/authldap/lang/ru/lang.php new file mode 100644 index 000000000..c05ed3b15 --- /dev/null +++ b/lib/plugins/authldap/lang/ru/lang.php @@ -0,0 +1,9 @@ + + */ +$lang['connectfail'] = 'Ошибка соединения LDAP с %s'; +$lang['domainfail'] = 'Не найдено имя пользователя LDAP (dn)'; diff --git a/lib/plugins/authmysql/lang/ru/lang.php b/lib/plugins/authmysql/lang/ru/lang.php new file mode 100644 index 000000000..75b5613f5 --- /dev/null +++ b/lib/plugins/authmysql/lang/ru/lang.php @@ -0,0 +1,11 @@ + + */ +$lang['connectfail'] = 'Ошибка соединения с базой данных.'; +$lang['userexists'] = 'Извините, пользователь с таким логином уже существует.'; +$lang['usernotexists'] = 'Извините, такой пользователь не существует.'; +$lang['writefail'] = 'Невозможно изменить данные пользователя. Сообщите об этом администратору Вики.'; diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php index 4b2542420..c7ef52b42 100644 --- a/lib/plugins/extension/lang/ru/lang.php +++ b/lib/plugins/extension/lang/ru/lang.php @@ -8,6 +8,7 @@ * @author Type-kun * @author Vitaly Filatenko * @author Alex P + * @author Takumo <9206984@mail.ru> */ $lang['menu'] = 'Управление дополнениями'; $lang['tab_plugins'] = 'Установленные плагины'; @@ -29,6 +30,10 @@ $lang['btn_disable'] = 'Отключить'; $lang['btn_install'] = 'Установить'; $lang['btn_reinstall'] = 'Переустановить'; $lang['js']['reallydel'] = 'Действительно удалить это дополнение?'; +$lang['js']['display_viewoptions'] = 'Показать как:'; +$lang['js']['display_enabled'] = 'включено'; +$lang['js']['display_disabled'] = 'отключено'; +$lang['js']['display_updatable'] = 'обновление'; $lang['search_for'] = 'Поиск дополнения:'; $lang['search'] = 'Найти'; $lang['extensionby'] = '%s — %s'; -- cgit v1.2.3 From 67b479b256ae7436b507860d32ee7e0b29b1657a Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 30 Jun 2015 22:41:51 +0200 Subject: PHPDocs for remote and action --- lib/plugins/acl/remote.php | 2 +- lib/plugins/action.php | 2 ++ lib/plugins/remote.php | 13 ++++++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/remote.php b/lib/plugins/acl/remote.php index 42449428f..031686f95 100644 --- a/lib/plugins/acl/remote.php +++ b/lib/plugins/acl/remote.php @@ -8,7 +8,7 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin { /** * Returns details about the remote plugin methods * - * @return array + * @return array Information about all provided methods. {@see RemoteAPI} */ public function _getMethods() { return array( diff --git a/lib/plugins/action.php b/lib/plugins/action.php index 4b5eef60a..23d94a509 100644 --- a/lib/plugins/action.php +++ b/lib/plugins/action.php @@ -16,6 +16,8 @@ class DokuWiki_Action_Plugin extends DokuWiki_Plugin { /** * Registers a callback function for a given event + * + * @param 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/remote.php b/lib/plugins/remote.php index a51f701fb..47f954ee6 100644 --- a/lib/plugins/remote.php +++ b/lib/plugins/remote.php @@ -1,19 +1,30 @@ api = new RemoteAPI(); } /** + * Get all available methods with remote access. + * * @abstract - * @return array Information to all provided methods. {@see RemoteAPI}. + * @return array Information about all provided methods. {@see RemoteAPI}. */ public abstract function _getMethods(); + /** + * @return RemoteAPI + */ protected function getApi() { return $this->api; } -- cgit v1.2.3 From f30ba39860122e7c5061989c09786dd2febe29eb Mon Sep 17 00:00:00 2001 From: rnck Date: Thu, 2 Jul 2015 15:55:57 +0200 Subject: translation update --- lib/plugins/authad/lang/de-informal/lang.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/de-informal/lang.php b/lib/plugins/authad/lang/de-informal/lang.php index e9361d5fe..973c992d2 100644 --- a/lib/plugins/authad/lang/de-informal/lang.php +++ b/lib/plugins/authad/lang/de-informal/lang.php @@ -4,5 +4,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Andreas Gohr + * @author rnck */ $lang['authpwdexpire'] = 'Dein Passwort läuft in %d Tag(en) ab. Du solltest es es frühzeitig ändern.'; +$lang['passchangefail'] = 'Das Passwort konnte nicht geändert werden. Eventuell wurde die Passwort-Richtlinie nicht eingehalten.'; +$lang['connectfail'] = 'Verbindung zum Active Directory Server fehlgeschlagen.'; -- cgit v1.2.3 From 2ee76f4a8d89135027e4a492d2d000b04252e0eb Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 5 Jul 2015 13:19:40 +0100 Subject: fixed installed extensions in extension manager not displaying without JS --- lib/plugins/extension/script.js | 9 +++++---- lib/plugins/extension/style.less | 25 ++++++++++++++----------- 2 files changed, 19 insertions(+), 15 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index bc1bf8b12..7d78d2a03 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -114,16 +114,17 @@ jQuery(function(){ Create section for enabling/disabling viewing options */ if ( $extmgr.find('.plugins, .templates').hasClass('active') ) { + var $extlist = jQuery('#extension__list'); + $extlist.addClass('hasDisplayOptions'); var $displayOpts = jQuery('

', { id: 'extension__viewoptions'} ).appendTo($extmgr.find( '.panelHeader' )); $displayOpts.append(LANG.plugins.extension.display_viewoptions); - + var displayOptionsHandler = function(){ - jQuery('#extension__list').toggleClass( this.name ); + $extlist.toggleClass( this.name ); }; - + jQuery(['enabled', 'disabled', 'updatable']).each(function(index, chkName){ - var $label = jQuery( '' ).appendTo($displayOpts); jQuery( '', { type: 'checkbox', name: chkName }).change(displayOptionsHandler).appendTo($label).click(); jQuery( '' ).append(LANG.plugins.extension['display_'+chkName]).appendTo($label); diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index 38b2d65d0..f35878009 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -281,18 +281,21 @@ * Enabled/Disabled overrides */ #extension__list { - - .enabled, .disabled, - .updatable { - display: none; - } - - &.enabled .enabled, - &.disabled .disabled, - &.updatable .updatable { - display: block; + + &.hasDisplayOptions { + .enabled, + .disabled, + .updatable { + display: none; + } + + &.enabled .enabled, + &.disabled .disabled, + &.updatable .updatable { + display: block; + } } - + .enabled div.screenshot span { background: transparent url(images/enabled.png) no-repeat 2px 2px; } -- cgit v1.2.3 From 1539b4dd6b40c7af97092763889cab5ee76c1187 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 5 Jul 2015 13:20:26 +0100 Subject: fixed small spacing/alignment issues in display options of extension manager --- lib/plugins/extension/script.js | 2 +- lib/plugins/extension/style.less | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index 7d78d2a03..c74c44ad1 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -127,7 +127,7 @@ jQuery(function(){ jQuery(['enabled', 'disabled', 'updatable']).each(function(index, chkName){ var $label = jQuery( '' ).appendTo($displayOpts); jQuery( '', { type: 'checkbox', name: chkName }).change(displayOptionsHandler).appendTo($label).click(); - jQuery( '' ).append(LANG.plugins.extension['display_'+chkName]).appendTo($label); + jQuery( '' ).append(' '+LANG.plugins.extension['display_'+chkName]).appendTo($label); }); } }); diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index f35878009..86e540b0f 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -379,4 +379,5 @@ #extension__viewoptions label { margin-left: 1em; + vertical-align: baseline; } -- cgit v1.2.3 From 9f4b197e717f979e2a6a5130ca0dff814d026be5 Mon Sep 17 00:00:00 2001 From: Rainbow Spike Date: Tue, 7 Jul 2015 19:09:20 +1000 Subject: Update lang.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Выравнивание и разбиение по образцу en/lang.php, унификация "директорий" и "папок", "расширений" и "дополнений" --- lib/plugins/extension/lang/ru/lang.php | 186 ++++++++++++++++++--------------- 1 file changed, 99 insertions(+), 87 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php index c7ef52b42..a16f0ca95 100644 --- a/lib/plugins/extension/lang/ru/lang.php +++ b/lib/plugins/extension/lang/ru/lang.php @@ -10,91 +10,103 @@ * @author Alex P * @author Takumo <9206984@mail.ru> */ -$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['js']['display_viewoptions'] = 'Показать как:'; -$lang['js']['display_enabled'] = 'включено'; -$lang['js']['display_disabled'] = 'отключено'; -$lang['js']['display_updatable'] = 'обновление'; -$lang['search_for'] = 'Поиск дополнения:'; -$lang['search'] = 'Найти'; -$lang['extensionby'] = '%s — %s'; -$lang['screenshot'] = 'Скриншот: %s'; -$lang['popularity'] = 'Популярность: %s%%'; -$lang['homepage_link'] = 'Описание'; -$lang['bugs_features'] = 'Баг-трекер'; -$lang['tags'] = 'Метки:'; -$lang['author_hint'] = 'Найти дополнения автора'; -$lang['installed'] = 'Установлено:'; -$lang['downloadurl'] = 'Скачать:'; -$lang['repository'] = 'Репозиторий:'; -$lang['unknown'] = 'неизвестно'; -$lang['installed_version'] = 'Уст. версия:'; -$lang['install_date'] = 'Посл. обновление:'; -$lang['available_version'] = 'Доступная версия:'; -$lang['compatible'] = 'Совместим с'; -$lang['depends'] = 'Зависит от'; -$lang['similar'] = 'Похож на'; -$lang['conflicts'] = 'Конфликтует с'; -$lang['donate'] = 'Нравится?'; -$lang['donate_action'] = 'Купить автору кофе!'; -$lang['repo_retry'] = 'Повторить'; -$lang['provides'] = 'Предоставляет:'; -$lang['status'] = 'Статус:'; -$lang['status_installed'] = 'установлено'; -$lang['status_not_installed'] = 'не установлено'; -$lang['status_protected'] = 'защищено'; -$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'] = 'Дополнение %s удалено'; -$lang['msg_delete_failed'] = 'Не удалось удалить расширение %s'; +$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['js']['display_viewoptions'] = 'Показать как:'; +$lang['js']['display_enabled'] = 'включено'; +$lang['js']['display_disabled'] = 'отключено'; +$lang['js']['display_updatable'] = 'обновление'; + +$lang['search_for'] = 'Поиск дополнения:'; +$lang['search'] = 'Найти'; + +$lang['extensionby'] = '%s — %s'; +$lang['screenshot'] = 'Скриншот: %s'; +$lang['popularity'] = 'Популярность: %s%%'; +$lang['homepage_link'] = 'Описание'; +$lang['bugs_features'] = 'Баг-трекер'; +$lang['tags'] = 'Метки:'; +$lang['author_hint'] = 'Найти дополнения этого автора'; +$lang['installed'] = 'Установлено:'; +$lang['downloadurl'] = 'Скачать:'; +$lang['repository'] = 'Репозиторий:'; +$lang['unknown'] = 'неизвестно'; +$lang['installed_version'] = 'Уст. версия:'; +$lang['install_date'] = 'Посл. обновление:'; +$lang['available_version'] = 'Доступная версия:'; +$lang['compatible'] = 'Совместим с:'; +$lang['depends'] = 'Зависит от:'; +$lang['similar'] = 'Похож на:'; +$lang['conflicts'] = 'Конфликтует с:'; +$lang['donate'] = 'Нравится?'; +$lang['donate_action'] = 'Купить автору кофе!'; +$lang['repo_retry'] = 'Повторить'; +$lang['provides'] = 'Предоставляет:'; +$lang['status'] = 'Состояние:'; +$lang['status_installed'] = 'установлено'; +$lang['status_not_installed'] = 'не установлено'; +$lang['status_protected'] = 'защищено'; +$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'] = 'Дополнение удалено'; +$lang['msg_delete_failed'] = 'Не удалось удалить дополнение %s'; $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['missing_dependency'] = 'Отсутствует или отключена зависимость: %s'; -$lang['security_issue'] = 'Проблема безопасности: %s'; -$lang['security_warning'] = 'Предупреждение безопасности: %s'; -$lang['update_available'] = 'Обновление: доступна новая версия %s.'; -$lang['wrong_folder'] = 'Плагин установлен неправильно: переименуйте папку плагина из %s в %s.'; -$lang['url_change'] = 'Ссылка изменилась: ссылка для загрузки изменилась с прошлого раза. Проверьте новую ссылку прежде, чем обновлять расширение.
Новая: %s
Старая: %s'; -$lang['error_badurl'] = 'Ссылки должны начинаться с http или https'; -$lang['error_dircreate'] = 'Не удалось создать временную директорию для загрузки'; -$lang['error_download'] = 'Не удалось загрузить файл: %s'; -$lang['error_decompress'] = 'Не удалось распаковать загруженный файл. Возможно, файл был повреждён при загрузке — тогда нужно попробовать ещё раз. Либо неизвестен формат архива — тогда загрузку и установку надо произвести вручную.'; -$lang['error_findfolder'] = 'Не удалось определить директорию для расширения, загрузку и установку надо произвести вручную.'; -$lang['error_copy'] = 'Возникла ошибка копирования файлов в директорию %s: возможно, диск переполнен, или неверно выставлены права доступа. Это могло привести к неполной установке плагина и нарушить работу вашей вики.'; -$lang['noperms'] = 'Папка для расширений недоступна для записи'; -$lang['notplperms'] = 'Папка для шаблонов недоступна для записи'; -$lang['nopluginperms'] = 'Папка плагинов недоступна для записи'; -$lang['git'] = 'Это расширение было установлено через git. Вы не можете обновить его тут.'; -$lang['auth'] = 'Этот auth плагин не включен в конфигурации, подумайте о его отключении'; -$lang['install_url'] = 'Установить с адреса URL'; -$lang['install_upload'] = 'Скачать расширение'; -$lang['repo_error'] = 'Сайт с плагинами недоступен. Убедитесь, что у сайта есть доступ на www.dokuwiki.org, а также проверьте настройки соединения с Интернетом.'; -$lang['nossl'] = 'Ваша PHP конфигурация не имеет SSL поддержки. Это поломает скачивание для многих DokuWiki плагинов и расширений.'; +$lang['msg_template_update_success'] = 'Шаблон %s успешно обновлён'; +$lang['msg_plugin_install_success'] = 'Плагин %s успешно установлен'; +$lang['msg_plugin_update_success'] = 'Плагин %s успешно обновлён'; +$lang['msg_upload_failed'] = 'Не удалось загрузить файл'; + +$lang['missing_dependency'] = 'Отсутствует или отключена зависимость: %s'; +$lang['security_issue'] = 'Проблема безопасности: %s'; +$lang['security_warning'] = 'Предупреждение безопасности: %s'; +$lang['update_available'] = 'Обновление: доступна новая версия %s'; +$lang['wrong_folder'] = 'Плагин установлен неправильно: переименуйте директорию плагина из %s в %s'; +$lang['url_change'] = 'Ссылка изменилась: ссылка для загрузки изменилась с прошлого раза. Проверьте новую ссылку прежде, чем обновлять дополнение.
Новая: %s
Старая: %s'; + +$lang['error_badurl'] = 'Ссылка должна начинаться с http или https'; +$lang['error_dircreate'] = 'Не удалось создать временную директорию для загрузки'; +$lang['error_download'] = 'Не удалось загрузить файл: %s'; +$lang['error_decompress'] = 'Не удалось распаковать загруженный файл. Возможно, файл был повреждён при загрузке — тогда нужно попробовать ещё раз. Либо неизвестен формат архива — тогда загрузку и установку надо произвести вручную'; +$lang['error_findfolder'] = 'Не удалось определить директорию для дополнения, загрузку и установку надо произвести вручную.'; +$lang['error_copy'] = 'Возникла ошибка копирования файлов в директорию %s: возможно, диск переполнен, или неверно выставлены права доступа. Это могло привести к неполной установке плагина и нарушить работу вашей вики.'; + +$lang['noperms'] = 'Директория для дополнений не доступна для записи'; +$lang['notplperms'] = 'Директория для шаблонов не доступна для записи'; +$lang['nopluginperms'] = 'Директория для плагинов не доступна для записи'; +$lang['git'] = 'Это дополнение было установлено через git. Вы не можете обновить его тут.'; +$lang['auth'] = 'Этот auth плагин не включен в конфигурации, подумайте о его отключении'; + +$lang['install_url'] = 'Установить с адреса:'; +$lang['install_upload'] = 'Скачать дополнение:'; + +$lang['repo_error'] = 'Сайт с плагинами недоступен. Убедитесь, что у сайта есть доступ на www.dokuwiki.org и также проверьте настройки соединения прокси.'; +$lang['nossl'] = 'Ваша PHP конфигурация не имеет SSL поддержки. Это поломает скачивание для многих DokuWiki плагинов и дополнений.'; -- cgit v1.2.3 From d634152e42ef1c75d899f021132ce0c2632257ac Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Tue, 7 Jul 2015 12:39:55 +0100 Subject: improved various minor frontend issues in styling plugin * improved spacing of popup * made primary buttons clearer * xhtml and validity fixes * improved some lang strings * moved 'open as popup' after intro * fixed page reload after clicking 'open as popup' button --- lib/plugins/styling/admin.php | 16 ++++++++-------- lib/plugins/styling/lang/en/lang.php | 10 +++++----- lib/plugins/styling/popup.php | 14 ++++++++------ lib/plugins/styling/script.js | 14 ++++++++------ lib/plugins/styling/style.less | 7 ++----- 5 files changed, 31 insertions(+), 30 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/admin.php b/lib/plugins/styling/admin.php index 627efbd15..f241e3fed 100644 --- a/lib/plugins/styling/admin.php +++ b/lib/plugins/styling/admin.php @@ -43,7 +43,7 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { */ public function html() { $class = 'nopopup'; - if($this->ispopup) $class = 'ispopup'; + if($this->ispopup) $class = 'ispopup page'; echo '

'; ptln('

'.$this->getLang('menu').'

'); @@ -75,7 +75,7 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { echo '
'; - echo ''; + echo '
'; foreach($replacements as $key => $value) { $name = tpl_getLang($key); if(empty($name)) $name = $this->getLang($key); @@ -83,22 +83,22 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { echo ''; echo ''; - echo ''; echo ''; } - echo '
'.$name.'colorClass($key).' />'; + echo 'colorClass($key).' />
'; + echo ''; echo '

'; - echo ''; - echo ''; #FIXME only if preview.ini exists + echo ' '; + echo ''; #FIXME only if preview.ini exists echo '

'; echo '

'; - echo ''; + echo ''; echo '

'; echo '

'; - echo ''; #FIXME only if local.ini exists + echo ''; #FIXME only if local.ini exists echo '

'; echo '
'; diff --git a/lib/plugins/styling/lang/en/lang.php b/lib/plugins/styling/lang/en/lang.php index a076065cb..010743956 100644 --- a/lib/plugins/styling/lang/en/lang.php +++ b/lib/plugins/styling/lang/en/lang.php @@ -8,15 +8,15 @@ // menu entry for admin plugins $lang['menu'] = 'Template Style Settings'; -$lang['js']['loader'] = 'Preview is loading...
if this does not goes away, your values may be faulty'; -$lang['js']['popup'] = 'Open as Popup'; +$lang['js']['loader'] = 'Preview is loading...
if this does not goes away, your values may be faulty'; +$lang['js']['popup'] = 'Open as a popup'; // custom language strings for the plugin $lang['error'] = 'Sorry, this template does not support this functionality.'; -$lang['btn_preview'] = 'Preview your changes'; -$lang['btn_save'] = 'Save your changes'; -$lang['btn_reset'] = 'Reset your current changes'; +$lang['btn_preview'] = 'Preview changes'; +$lang['btn_save'] = 'Save changes'; +$lang['btn_reset'] = 'Reset current changes'; $lang['btn_revert'] = 'Revert all styles back to the template\'s default'; // default guaranteed placeholders diff --git a/lib/plugins/styling/popup.php b/lib/plugins/styling/popup.php index eea4f3bfd..964b19e29 100644 --- a/lib/plugins/styling/popup.php +++ b/lib/plugins/styling/popup.php @@ -4,6 +4,7 @@ require_once(DOKU_INC . 'inc/init.php'); //close session session_write_close(); header('Content-Type: text/html; charset=utf-8'); +header('X-UA-Compatible: IE=edge,chrome=1'); /** @var admin_plugin_styling $plugin */ $plugin = plugin_load('admin', 'styling'); @@ -14,15 +15,16 @@ $plugin->ispopup = true; $plugin->handle(); // output plugin in a very minimal template: -?> - +?> + + <?php echo $plugin->getLang('menu') ?> + + - -
- html() ?> -
+ + html() ?> diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index 6fc2b9043..84b251eab 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -12,14 +12,15 @@ jQuery(function () { // add button on main page if (!$styling_plugin.hasClass('ispopup')) { - var $hl = $styling_plugin.find('h1').first(); - var $btn = jQuery(''); - $hl.append($btn); + var $form = $styling_plugin.find('form.styling').first(); + var $btn = jQuery(''); + $form.prepend($btn); $btn.click(function (e) { var windowFeatures = "menubar=no,location=no,resizable=yes,scrollbars=yes,status=false,width=500,height=500"; window.open(DOKU_BASE + 'lib/plugins/styling/popup.php', 'styling', windowFeatures) - }); + e.preventDefault(); + }).wrap('

'); return; } @@ -54,9 +55,10 @@ jQuery(function () { 'background-color': '#fff', 'opacity': '0.7', 'color': '#000', - 'font-size': '40px', + 'font-size': '2.5em', 'text-align': 'center', - 'line-height': '90px' + 'line-height': 1.5, + 'padding-top': '2em' }); window.opener.jQuery('body').append($loader); } diff --git a/lib/plugins/styling/style.less b/lib/plugins/styling/style.less index 3cb563fdb..120768289 100644 --- a/lib/plugins/styling/style.less +++ b/lib/plugins/styling/style.less @@ -1,9 +1,6 @@ #plugin__styling { - - h1 button { - font-size: 12px; - line-height: 16px; - margin-left: 1em; + input.primary { + font-weight: bold; } } -- cgit v1.2.3 From 147d8f481419c685b5408b7b793fd32a8923f35e Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Tue, 7 Jul 2015 13:04:52 +0100 Subject: added labels to form entries --- lib/plugins/styling/admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/admin.php b/lib/plugins/styling/admin.php index f241e3fed..c6c04bb52 100644 --- a/lib/plugins/styling/admin.php +++ b/lib/plugins/styling/admin.php @@ -82,8 +82,8 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { if(empty($name)) $name = $key; echo ''; - echo ''.$name.''; - echo 'colorClass($key).' />'; + echo ''; + echo 'colorClass($key).' />'; echo ''; } echo ''; -- cgit v1.2.3 From d750427ebf95dc91ec90b5c812180739317cd094 Mon Sep 17 00:00:00 2001 From: Errol Date: Wed, 8 Jul 2015 11:56:08 +0200 Subject: translation update --- lib/plugins/authad/lang/zh/lang.php | 3 +++ lib/plugins/authldap/lang/zh/lang.php | 9 +++++++++ lib/plugins/authldap/lang/zh/settings.php | 2 ++ lib/plugins/authmysql/lang/zh/lang.php | 11 +++++++++++ lib/plugins/extension/lang/zh/lang.php | 5 +++++ 5 files changed, 30 insertions(+) create mode 100644 lib/plugins/authldap/lang/zh/lang.php create mode 100644 lib/plugins/authmysql/lang/zh/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/zh/lang.php b/lib/plugins/authad/lang/zh/lang.php index 4f3794999..df1a7a7f7 100644 --- a/lib/plugins/authad/lang/zh/lang.php +++ b/lib/plugins/authad/lang/zh/lang.php @@ -4,6 +4,9 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author lainme + * @author Errol */ $lang['domain'] = '登录域'; $lang['authpwdexpire'] = '您的密码将在 %d 天内过期,请尽快更改'; +$lang['passchangefail'] = '密码更改失败。是不是密码规则不符合?'; +$lang['connectfail'] = '无法连接到Active Directory服务器。'; diff --git a/lib/plugins/authldap/lang/zh/lang.php b/lib/plugins/authldap/lang/zh/lang.php new file mode 100644 index 000000000..ef727497e --- /dev/null +++ b/lib/plugins/authldap/lang/zh/lang.php @@ -0,0 +1,9 @@ + + */ +$lang['connectfail'] = 'LDAP 无法连接: %s'; +$lang['domainfail'] = 'LDAP 无法找到你的用户 dn'; diff --git a/lib/plugins/authldap/lang/zh/settings.php b/lib/plugins/authldap/lang/zh/settings.php index d4ea5c615..4f4a0a8b8 100644 --- a/lib/plugins/authldap/lang/zh/settings.php +++ b/lib/plugins/authldap/lang/zh/settings.php @@ -5,6 +5,7 @@ * * @author lainme * @author oott123 + * @author Errol */ $lang['server'] = '您的 LDAP 服务器。填写主机名 (localhost) 或者完整的 URL (ldap://server.tld:389)'; $lang['port'] = 'LDAP 服务器端口 (如果上面没有给出完整的 URL)'; @@ -21,6 +22,7 @@ $lang['bindpw'] = '上述用户的密码'; $lang['userscope'] = '限制用户搜索的范围'; $lang['groupscope'] = '限制组搜索的范围'; $lang['groupkey'] = '根据任何用户属性得来的组成员(而不是标准的 AD 组),例如根据部门或者电话号码得到的组。'; +$lang['modPass'] = ' LDAP密码可以由dokuwiki修改吗?'; $lang['debug'] = '有错误时显示额外的调试信息'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; diff --git a/lib/plugins/authmysql/lang/zh/lang.php b/lib/plugins/authmysql/lang/zh/lang.php new file mode 100644 index 000000000..044fe6d60 --- /dev/null +++ b/lib/plugins/authmysql/lang/zh/lang.php @@ -0,0 +1,11 @@ + + */ +$lang['connectfail'] = '连接数据库失败'; +$lang['userexists'] = '抱歉,用户名已被使用。'; +$lang['usernotexists'] = '抱歉,用户不存在。'; +$lang['writefail'] = '无法修改用户数据。请通知管理员'; diff --git a/lib/plugins/extension/lang/zh/lang.php b/lib/plugins/extension/lang/zh/lang.php index 5ab3d77ba..62d54c160 100644 --- a/lib/plugins/extension/lang/zh/lang.php +++ b/lib/plugins/extension/lang/zh/lang.php @@ -7,6 +7,7 @@ * @author xiqingongzi * @author qinghao * @author lainme + * @author Errol */ $lang['menu'] = '扩展管理器'; $lang['tab_plugins'] = '安装插件'; @@ -28,6 +29,10 @@ $lang['btn_disable'] = '关闭'; $lang['btn_install'] = '安装'; $lang['btn_reinstall'] = '重新安装'; $lang['js']['reallydel'] = '确定卸载这个扩展么?'; +$lang['js']['display_viewoptions'] = '查看选项:'; +$lang['js']['display_enabled'] = '启用'; +$lang['js']['display_disabled'] = '禁用'; +$lang['js']['display_updatable'] = '可更新'; $lang['search_for'] = '搜索扩展'; $lang['search'] = '搜索'; $lang['extensionby'] = '%s by %s'; -- cgit v1.2.3 From 10da589230c0fe57b58ed23095fadd8d1951f1fe Mon Sep 17 00:00:00 2001 From: Myeongjin Date: Sat, 11 Jul 2015 09:51:04 +0200 Subject: translation update --- lib/plugins/authad/lang/ko/lang.php | 2 ++ lib/plugins/authldap/lang/ko/lang.php | 9 +++++++++ lib/plugins/authmysql/lang/ko/lang.php | 7 ++++--- lib/plugins/extension/lang/ko/lang.php | 5 +++-- lib/plugins/popularity/lang/ko/intro.txt | 2 +- 5 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 lib/plugins/authldap/lang/ko/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/ko/lang.php b/lib/plugins/authad/lang/ko/lang.php index c119fabc5..7e9b22f40 100644 --- a/lib/plugins/authad/lang/ko/lang.php +++ b/lib/plugins/authad/lang/ko/lang.php @@ -7,3 +7,5 @@ */ $lang['domain'] = '로그온 도메인'; $lang['authpwdexpire'] = '비밀번호를 바꾼지 %d일이 지났으며, 비밀번호를 곧 바꿔야 합니다.'; +$lang['passchangefail'] = '비밀번호를 바꾸는 데 실패했습니다. 비밀번호 정책을 따르지 않았나요?'; +$lang['connectfail'] = 'Active Directory 서버에 연결하는 데 실패했습니다.'; diff --git a/lib/plugins/authldap/lang/ko/lang.php b/lib/plugins/authldap/lang/ko/lang.php new file mode 100644 index 000000000..3c6722a81 --- /dev/null +++ b/lib/plugins/authldap/lang/ko/lang.php @@ -0,0 +1,9 @@ + + */ +$lang['connectfail'] = 'LDAP가 연결할 수 없습니다: %s'; +$lang['domainfail'] = 'LDAP가 사용자 DN을 찾을 수 없습니다'; diff --git a/lib/plugins/authmysql/lang/ko/lang.php b/lib/plugins/authmysql/lang/ko/lang.php index a2ad278c1..d07d58388 100644 --- a/lib/plugins/authmysql/lang/ko/lang.php +++ b/lib/plugins/authmysql/lang/ko/lang.php @@ -4,8 +4,9 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author hyeonsoft + * @author Myeongjin */ $lang['connectfail'] = '데이터베이스에 연결하는 데 실패했습니다.'; -$lang['userexists'] = '이 계정으로 이미 로그인 된 사용자가 있습니다.'; -$lang['usernotexists'] = '이 계정은 존재하지 않습니다.'; -$lang['writefail'] = '사용자 데이터를 수정할 수 없습니다. 관리자에게 문의하십시오.'; +$lang['userexists'] = '죄송하지만 이 계정으로 이미 로그인한 사용자가 있습니다.'; +$lang['usernotexists'] = '죄송하지만 해당 사용자가 존재하지 않습니다.'; +$lang['writefail'] = '사용자 데이터를 수정할 수 없습니다. 위키 관리자에게 문의하시기 바랍니다'; diff --git a/lib/plugins/extension/lang/ko/lang.php b/lib/plugins/extension/lang/ko/lang.php index 3de28c0c8..31b230b53 100644 --- a/lib/plugins/extension/lang/ko/lang.php +++ b/lib/plugins/extension/lang/ko/lang.php @@ -28,8 +28,9 @@ $lang['btn_install'] = '설치'; $lang['btn_reinstall'] = '다시 설치'; $lang['js']['reallydel'] = '정말 이 확장 기능을 제거하겠습니까?'; $lang['js']['display_viewoptions'] = '보기 옵션:'; -$lang['js']['display_enabled'] = '켜짐'; -$lang['js']['display_disabled'] = '꺼짐'; +$lang['js']['display_enabled'] = '활성화됨'; +$lang['js']['display_disabled'] = '비활성화됨'; +$lang['js']['display_updatable'] = '업데이트할 수 있음'; $lang['search_for'] = '확장 기능 검색:'; $lang['search'] = '검색'; $lang['extensionby'] = '%s (저자 %s)'; diff --git a/lib/plugins/popularity/lang/ko/intro.txt b/lib/plugins/popularity/lang/ko/intro.txt index bc9bb9dd0..edc0f8733 100644 --- a/lib/plugins/popularity/lang/ko/intro.txt +++ b/lib/plugins/popularity/lang/ko/intro.txt @@ -1,6 +1,6 @@ ====== 인기도 조사 ====== -설치된 위키의 익명 정보를 도쿠위키 개발자에게 보냅니다. 이 [[doku>ko:popularity|도구]]는 도쿠위키가 실제 사용자에게 어떻게 사용되는지 도쿠위키 개발자에게 알려줌으로써 이 후 개발 시 참고가 됩니다. +설치된 위키의 익명 정보를 도쿠위키 개발자에게 보냅니다. 이 [[doku>ko:popularity|도구]]는 도쿠위키가 실제 사용자에게 어떻게 사용되는지 도쿠위키 개발자에게 알려줌으로써 이 후 개발 시 참조가 됩니다. 설치된 위키가 커짐에 따라서 이 과정을 반복할 필요가 있습니다. 반복된 데이터는 익명 ID로 구별되어집니다. -- cgit v1.2.3 From d2293a6b3bad9d6d5b80632c327eda8d1390366e Mon Sep 17 00:00:00 2001 From: Myeongjin Date: Sat, 11 Jul 2015 18:25:55 +0900 Subject: adjust newline --- lib/plugins/config/lang/ar/intro.txt | 2 +- lib/plugins/config/lang/ca-valencia/intro.txt | 2 +- lib/plugins/config/lang/cs/intro.txt | 1 - lib/plugins/config/lang/da/intro.txt | 1 - lib/plugins/config/lang/de-informal/intro.txt | 2 +- lib/plugins/config/lang/de/intro.txt | 3 --- lib/plugins/config/lang/en/intro.txt | 2 -- lib/plugins/config/lang/fa/intro.txt | 2 +- lib/plugins/config/lang/fi/intro.txt | 2 +- lib/plugins/config/lang/fr/intro.txt | 2 -- lib/plugins/config/lang/he/intro.txt | 2 -- lib/plugins/config/lang/ia/intro.txt | 2 +- lib/plugins/config/lang/it/intro.txt | 2 -- lib/plugins/config/lang/ja/intro.txt | 2 -- lib/plugins/config/lang/ko/intro.txt | 1 - lib/plugins/config/lang/la/intro.txt | 2 +- lib/plugins/config/lang/mr/intro.txt | 2 +- lib/plugins/config/lang/nl/intro.txt | 2 -- lib/plugins/config/lang/pl/intro.txt | 2 -- lib/plugins/config/lang/pt-br/intro.txt | 2 +- lib/plugins/config/lang/pt/intro.txt | 2 +- lib/plugins/config/lang/ru/intro.txt | 2 -- lib/plugins/config/lang/sk/intro.txt | 2 +- lib/plugins/config/lang/sq/intro.txt | 2 +- lib/plugins/config/lang/sv/intro.txt | 2 -- lib/plugins/config/lang/tr/intro.txt | 2 +- lib/plugins/config/lang/zh-tw/intro.txt | 2 +- lib/plugins/config/lang/zh/intro.txt | 2 -- 28 files changed, 14 insertions(+), 40 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/config/lang/ar/intro.txt b/lib/plugins/config/lang/ar/intro.txt index d447ec315..15905189f 100644 --- a/lib/plugins/config/lang/ar/intro.txt +++ b/lib/plugins/config/lang/ar/intro.txt @@ -4,4 +4,4 @@ الاعدادات الظاهرة بخلفية حمراء فاتحة اعدادات محمية ولا يمكن تغييرها بهذه الاضافة. الاعدادات الظاهرة بخلفية زرقاء هي القيم الافتراضية والاعدادات الظاهرة بخلفية بيضاء خصصت لهذا التثبيت محليا. الاعدادات الزرقاء والبيضاء يمكن تغييرها. -تأكد من ضغط زر **SAVE** قبل ترك الصفحة وإلا ستضيع تعديلاتك. \ No newline at end of file +تأكد من ضغط زر **SAVE** قبل ترك الصفحة وإلا ستضيع تعديلاتك. diff --git a/lib/plugins/config/lang/ca-valencia/intro.txt b/lib/plugins/config/lang/ca-valencia/intro.txt index 40729e5fe..6dd461db3 100644 --- a/lib/plugins/config/lang/ca-valencia/intro.txt +++ b/lib/plugins/config/lang/ca-valencia/intro.txt @@ -7,4 +7,4 @@ Per a més informació al voltant d'este plúgin vaja a [[doku>config]]. Els ajusts mostrats en un fondo roig claret estan protegits i no els pot modificar en este plúgin. Els ajusts mostrats en un fondo blau tenen els valors predeterminats i els ajusts mostrats en un fondo blanc han segut modificats localment per ad esta instalació. Abdós ajusts, blaus i blancs, es poden modificar. -Recorde pulsar el botó **GUARDAR** ans d'anar-se'n d'esta pàgina o perdrà els canvis que haja fet. \ No newline at end of file +Recorde pulsar el botó **GUARDAR** ans d'anar-se'n d'esta pàgina o perdrà els canvis que haja fet. diff --git a/lib/plugins/config/lang/cs/intro.txt b/lib/plugins/config/lang/cs/intro.txt index 63381b84e..f98a62a6e 100644 --- a/lib/plugins/config/lang/cs/intro.txt +++ b/lib/plugins/config/lang/cs/intro.txt @@ -5,4 +5,3 @@ Tuto stránku můžete používat ke správě nastavení vaší instalace DokuWi Položky se světle červeným pozadím jsou chráněné a nelze je upravovat tímto pluginem. Položky s modrým pozadím jsou výchozí hodnoty a položky s bílým pozadím byly nastaveny lokálně v této konkrétní instalaci. Modré i bílé položky je možné upravovat. Než opustíte tuto stránku, nezapomeňte stisknout tlačítko **Uložit**, jinak budou změny ztraceny. - diff --git a/lib/plugins/config/lang/da/intro.txt b/lib/plugins/config/lang/da/intro.txt index f20961b98..14cd3d601 100644 --- a/lib/plugins/config/lang/da/intro.txt +++ b/lib/plugins/config/lang/da/intro.txt @@ -5,4 +5,3 @@ Brug denne side til at kontrollere indstillingerne for din Dokuwiki-opsætning. Indstillinger vist med lys rød baggrund er beskyttede og kan ikke ændres med denne udvidelse. Indstillinger vist med blå baggrund er standardindstillinger og indstillinger vist med hvid baggrund er blevet sat lokalt denne konkrete opsætning. Både blå og hvide indstillinger kan ændres. Husk at trykke på **Gem**-knappen før du forlader siden, for at du ikke mister dine ændringer. - diff --git a/lib/plugins/config/lang/de-informal/intro.txt b/lib/plugins/config/lang/de-informal/intro.txt index df9845ebc..ce4625cff 100644 --- a/lib/plugins/config/lang/de-informal/intro.txt +++ b/lib/plugins/config/lang/de-informal/intro.txt @@ -4,4 +4,4 @@ Benutze diese Seite zur Kontrolle der Einstellungen deiner DokuWiki-Installation Einstellungen die mit einem hellroten Hintergrund angezeigt werden, können mit dieser Erweiterung nicht verändert werden. Einstellungen mit einem blauen Hintergrund sind Standardwerte und Einstellungen mit einem weißen Hintergrund wurden lokal gesetzt für diese Installation. Sowohl blaue als auch weiße Einstellungen können angepasst werden. -Denke dran **Speichern** zu drücken bevor du die Seite verlässt, andernfalls werden deine Änderungen nicht übernommen. \ No newline at end of file +Denke dran **Speichern** zu drücken bevor du die Seite verlässt, andernfalls werden deine Änderungen nicht übernommen. diff --git a/lib/plugins/config/lang/de/intro.txt b/lib/plugins/config/lang/de/intro.txt index b79b5f871..e743379ff 100644 --- a/lib/plugins/config/lang/de/intro.txt +++ b/lib/plugins/config/lang/de/intro.txt @@ -5,6 +5,3 @@ Dieses Plugin hilft Ihnen bei der Konfiguration von DokuWiki. Hilfe zu den einze Einstellungen mit einem hellroten Hintergrund sind gesichert und können nicht mit diesem Plugin verändert werden, Einstellungen mit hellblauem Hintergrund sind Voreinstellungen, weiß hinterlegte Felder zeigen lokal veränderte Werte an. Sowohl die blauen als auch die weißen Felder können verändert werden. Bitte vergessen Sie nicht **Speichern** zu drücken bevor Sie die Seite verlassen, andernfalls gehen Ihre Änderungen verloren. - - - diff --git a/lib/plugins/config/lang/en/intro.txt b/lib/plugins/config/lang/en/intro.txt index 7cf46cee3..01089871c 100644 --- a/lib/plugins/config/lang/en/intro.txt +++ b/lib/plugins/config/lang/en/intro.txt @@ -5,5 +5,3 @@ Use this page to control the settings of your DokuWiki installation. For help o Settings shown with a light red background are protected and can not be altered with this plugin. Settings shown with a blue background are the default values and settings shown with a white background have been set locally for this particular installation. Both blue and white settings can be altered. Remember to press the **Save** button before leaving this page otherwise your changes will be lost. - - diff --git a/lib/plugins/config/lang/fa/intro.txt b/lib/plugins/config/lang/fa/intro.txt index f5b6ba235..31bbaea98 100644 --- a/lib/plugins/config/lang/fa/intro.txt +++ b/lib/plugins/config/lang/fa/intro.txt @@ -5,4 +5,4 @@ تنظیماتی که با پیش‌زمینه‌ی قرمز مشخص شده‌اند، غیرقابل تغییر می‌باشند. تنظیماتی که به پیش‌زمینه‌ی آبی مشخص شده‌اند نیز حامل مقادیر پیش‌فرض می‌باشند و تنظیماتی که پیش‌زمینه‌ی سفید دارند به طور محلی برای این سیستم تنظیم شده‌اند. تمامی مقادیر آبی و سفید قابلیت تغییر دارند. -به یاد داشته باشید که قبل از ترک صفحه، دکمه‌ی **ذخیره** را بفشارید، در غیر این صورت تنظیمات شما از بین خواهد رفت. \ No newline at end of file +به یاد داشته باشید که قبل از ترک صفحه، دکمه‌ی **ذخیره** را بفشارید، در غیر این صورت تنظیمات شما از بین خواهد رفت. diff --git a/lib/plugins/config/lang/fi/intro.txt b/lib/plugins/config/lang/fi/intro.txt index f6eedb50c..2765a18af 100644 --- a/lib/plugins/config/lang/fi/intro.txt +++ b/lib/plugins/config/lang/fi/intro.txt @@ -4,4 +4,4 @@ Käytä tätä sivua hallitaksesi DokuWikisi asetuksia. Apua yksittäisiin asetu Asetukset, jotka näkyvät vaaleanpunaisella taustalla ovat suojattuja, eikä niitä voi muutta tämän liitännäisen avulla. Asetukset, jotka näkyvät sinisellä taustalla ovat oletusasetuksia. Asetukset valkoisella taustalla ovat asetettu paikallisesti tätä asennusta varten. Sekä sinisiä että valkoisia asetuksia voi muokata. -Muista painaa **TALLENNA**-nappia ennen kuin poistut sivulta. Muuten muutoksesi häviävät. \ No newline at end of file +Muista painaa **TALLENNA**-nappia ennen kuin poistut sivulta. Muuten muutoksesi häviävät. diff --git a/lib/plugins/config/lang/fr/intro.txt b/lib/plugins/config/lang/fr/intro.txt index 3d71f6184..afc5805d8 100644 --- a/lib/plugins/config/lang/fr/intro.txt +++ b/lib/plugins/config/lang/fr/intro.txt @@ -5,5 +5,3 @@ Utilisez cette page pour contrôler les paramètres de votre installation de Dok Les paramètres affichés sur un fond rouge sont protégés et ne peuvent être modifiés avec cette extension. Les paramètres affichés sur un fond bleu sont les valeurs par défaut et les valeurs spécifiquement définies pour votre installation sont affichées sur un fond blanc. Seuls les paramètres sur fond bleu ou blanc peuvent être modifiés. N'oubliez pas d'utiliser le bouton **ENREGISTRER** avant de quitter cette page, sinon vos modifications ne seront pas prises en compte ! - - diff --git a/lib/plugins/config/lang/he/intro.txt b/lib/plugins/config/lang/he/intro.txt index 010c69018..d61a93861 100644 --- a/lib/plugins/config/lang/he/intro.txt +++ b/lib/plugins/config/lang/he/intro.txt @@ -5,5 +5,3 @@ הגדרות עם רקע אדום-בהיר מוגנות ואין אפשרות לשנותן עם תוסף זה. הגדרות עם רקע כחול הן בעלות ערך ברירת המחדל והגדרות עם רקע לבן הוגדרו באופן מקומי עבור התקנה זו. ההגדרות בעלות הרקעים הכחול והלבן הן ברות שינוי. יש לזכור ללחוץ על כפתור ה**שמירה** טרם עזיבת דף זה פן יאבדו השינויים. - - diff --git a/lib/plugins/config/lang/ia/intro.txt b/lib/plugins/config/lang/ia/intro.txt index 37b970c4f..eb2e10591 100644 --- a/lib/plugins/config/lang/ia/intro.txt +++ b/lib/plugins/config/lang/ia/intro.txt @@ -4,4 +4,4 @@ Usa iste pagina pro controlar le configurationes de tu installation de DokuWiki. Le configurationes monstrate super un fundo rubie clar es protegite e non pote esser alterate con iste plug-in. Le configurationes monstrate super un fundo blau es le valores predefinite e le configurationes monstrate super un fundo blanc ha essite definite localmente pro iste particular installation. Le configurationes blau e blanc pote esser alterate. -Rememora de premer le button **SALVEGUARDAR** ante de quitar iste pagina, alteremente tu modificationes essera perdite. \ No newline at end of file +Rememora de premer le button **SALVEGUARDAR** ante de quitar iste pagina, alteremente tu modificationes essera perdite. diff --git a/lib/plugins/config/lang/it/intro.txt b/lib/plugins/config/lang/it/intro.txt index 617e8c7b5..02984baa7 100644 --- a/lib/plugins/config/lang/it/intro.txt +++ b/lib/plugins/config/lang/it/intro.txt @@ -5,5 +5,3 @@ Usa questa pagina per gestire la configurazione della tua installazione DokuWiki Le impostazioni con lo sfondo rosso chiaro sono protette e non possono essere modificate con questo plugin. Le impostazioni con lo sfondo blu contengono i valori predefiniti, e le impostazioni con lo sfondo bianco sono relative solo a questa particolare installazione. Sia le impostazioni su sfondo blu che quelle su sfondo bianco possono essere modificate. Ricordati di premere il pulsante **SALVA** prima di lasciare questa pagina altrimenti le modifiche andranno perse. - - diff --git a/lib/plugins/config/lang/ja/intro.txt b/lib/plugins/config/lang/ja/intro.txt index 0c45471c6..6a1f956cb 100644 --- a/lib/plugins/config/lang/ja/intro.txt +++ b/lib/plugins/config/lang/ja/intro.txt @@ -5,5 +5,3 @@ 背景が薄い赤になっている場合、その設定は変更することが出来ません。 背景が青の値はデフォルト、背景が白の値は現在の設定となっており、 どちらの値も変更が可能です。 設定の変更後は必ず **保存** ボタンを押して変更を確定してください。 ボタンを押さなかった場合、変更は破棄されます。 - - diff --git a/lib/plugins/config/lang/ko/intro.txt b/lib/plugins/config/lang/ko/intro.txt index 979bbcb14..42240e3d7 100644 --- a/lib/plugins/config/lang/ko/intro.txt +++ b/lib/plugins/config/lang/ko/intro.txt @@ -5,4 +5,3 @@ 밝은 빨간색 배경으로 보이는 설정은 이 플러그인에서 바꿀 수 없도록 보호되어 있습니다. 파란색 배경으로 보이는 설정은 기본값이며 하얀색 배경으로 보이는 설정은 특수한 설치를 위해 로컬로 설정되어 있습니다. 파란색과 하얀색 배경으로 된 설정은 바꿀 수 있습니다. 이 페이지를 떠나기 전에 **저장** 버튼을 누르지 않으면 바뀜이 사라지는 것에 주의하세요. - diff --git a/lib/plugins/config/lang/la/intro.txt b/lib/plugins/config/lang/la/intro.txt index 573d34ac1..51d8c3d71 100644 --- a/lib/plugins/config/lang/la/intro.txt +++ b/lib/plugins/config/lang/la/intro.txt @@ -4,4 +4,4 @@ In hac pagina administratoris optiones mutare et inspicere potes. Auxilia in pag Optiones ostensae rubro colore tutae et non nunc mutabiles sunt. Optiones ostensae caeruleo colore praecipuae sunt et optiones ostensae in area alba singulares huic uici sunt. Et caerulae et albae optiones mutabiles sunt. -Memento premere **SERVA** ante quam nouam paginam eas: si hoc non facias, mutata amissa sunt. \ No newline at end of file +Memento premere **SERVA** ante quam nouam paginam eas: si hoc non facias, mutata amissa sunt. diff --git a/lib/plugins/config/lang/mr/intro.txt b/lib/plugins/config/lang/mr/intro.txt index 12ada73a1..e068295e5 100644 --- a/lib/plugins/config/lang/mr/intro.txt +++ b/lib/plugins/config/lang/mr/intro.txt @@ -7,4 +7,4 @@ निळ्या पार्श्वभूमीमधे दाखवलेले सेटिंग आपोआप सेट होणार्या किमती आहेत आणि पांढर्या पार्श्वभूमीमधे दाखवलेले सेटिंग या इन्स्टॉलेशनसाठी ख़ास सेट केलेले आहेत. निळे आणि पांढरे दोन्ही सेटिंग बदलता येतील. -ह्या पानावरून बाहर जाण्याआधी "Save" चे बटन क्लिक करायला विसरू नका नाहीतर सर्व बदल नाहीसे होतील. \ No newline at end of file +ह्या पानावरून बाहर जाण्याआधी "Save" चे बटन क्लिक करायला विसरू नका नाहीतर सर्व बदल नाहीसे होतील. diff --git a/lib/plugins/config/lang/nl/intro.txt b/lib/plugins/config/lang/nl/intro.txt index 3814b70bd..4d72b695d 100644 --- a/lib/plugins/config/lang/nl/intro.txt +++ b/lib/plugins/config/lang/nl/intro.txt @@ -5,5 +5,3 @@ Gebruik deze pagina om de instellingen van je DokuWiki te bekijken en/of te wijz Instellingen met een rode achtergond kunnen niet worden gewijzigd met deze plugin. Instellingen met een blauwe achtergrond hebben de default waarde, en instellingen met een witte achtergrond zijn lokaal gewijzigd voor deze specifieke installatie. Zowel blauwe als witte instellingen kunnen worden gewijzigd. Vergeet niet op **Opslaan** te drukken alvorens de pagina te verlaten, anders gaan je wijzigingen verloren. - - diff --git a/lib/plugins/config/lang/pl/intro.txt b/lib/plugins/config/lang/pl/intro.txt index 72c0e1c13..9d85c7a7c 100644 --- a/lib/plugins/config/lang/pl/intro.txt +++ b/lib/plugins/config/lang/pl/intro.txt @@ -5,5 +5,3 @@ Na tej stronie można zmienić ustawienia tej instalacji DokuWiki. W celu uzyska Ustawienia w kolorze jasnoczerwonym są chronione i nie mogą być zmienioną z użyciem tej wtyczki. Ustawienia w kolorze niebieskim mają domyślne wartości. Ustawienia w kolorze białym są specyficzne dla tej instalacji. Ustawienia w kolorach niebieskim i białym mogą być zmienione. W celu zapisania nowej konfiguracji naciśnij **zapisz** przed opuszczeniem tej strony. - - diff --git a/lib/plugins/config/lang/pt-br/intro.txt b/lib/plugins/config/lang/pt-br/intro.txt index 850ba25cb..db31de4cf 100644 --- a/lib/plugins/config/lang/pt-br/intro.txt +++ b/lib/plugins/config/lang/pt-br/intro.txt @@ -4,4 +4,4 @@ Use essa página para controlar as configurações da instalação do seu DokuWi Definições que apresentem um fundo vermelho claro são protegidas e não podem ser alteradas com esse plug-in. As definições com um fundo azul são o padrão e as com um fundo branco foram configuradas localmente para essa instalação em particular. Tanto as definições em azul quanto as em branco podem ser alteradas. -Lembre-se de pressionar o botão **Salvar** antes de sair dessa página, caso contrário, suas configurações serão perdidas. \ No newline at end of file +Lembre-se de pressionar o botão **Salvar** antes de sair dessa página, caso contrário, suas configurações serão perdidas. diff --git a/lib/plugins/config/lang/pt/intro.txt b/lib/plugins/config/lang/pt/intro.txt index 2010dadaf..06a68c475 100644 --- a/lib/plugins/config/lang/pt/intro.txt +++ b/lib/plugins/config/lang/pt/intro.txt @@ -4,4 +4,4 @@ Use esta página para controlar as definições da instalação do seu DokuWiki. Definições que apresentem um fundo vermelho claro são protegidas e não podem ser alteradas com este plugin. Definições com um fundo azul são padrão e definições com um fundo branco foram configuradas localmente para essa instalação em particular. Tanto as definições em azul como em branco podem ser alteradas. -Lembre-se de pressionar o botão **Guardar** antes de sair desta página, caso contrário, as suas definições serão perdidas. \ No newline at end of file +Lembre-se de pressionar o botão **Guardar** antes de sair desta página, caso contrário, as suas definições serão perdidas. diff --git a/lib/plugins/config/lang/ru/intro.txt b/lib/plugins/config/lang/ru/intro.txt index a629d9332..f30d4c791 100644 --- a/lib/plugins/config/lang/ru/intro.txt +++ b/lib/plugins/config/lang/ru/intro.txt @@ -5,5 +5,3 @@ Настройки, отображаемые на светло-красном фоне, защищены от изменений и не могут быть отредактированы с помощью этого плагина. Голубым фоном отмечены настройки со значениями по умолчанию, а белым фоном — настройки, которые были локально изменены для этой конкретной «ДокуВики». Как голубые, так и белые настройки доступны для изменения. Не забудьте нажать кнопку «**Сохранить**» перед тем, как покинуть эту страницу, иначе все ваши изменения будут потеряны. - - diff --git a/lib/plugins/config/lang/sk/intro.txt b/lib/plugins/config/lang/sk/intro.txt index 5de62a315..a3d15bf93 100644 --- a/lib/plugins/config/lang/sk/intro.txt +++ b/lib/plugins/config/lang/sk/intro.txt @@ -4,4 +4,4 @@ Túto stránku môžete používať na zmenu nastavení Vašej DokuWiki inštal Nastavenia zobrazené na červenom pozadí sú neprístupné a nemôžu byť týmto pluginom zmenené. Nastavenia s modrým pozadím obsahujú prednastavené hodnoty a nastavenia s bielym pozadím boli nastavené lokálne pre túto konkrétnu inštaláciu. Nastavenia s modrým a bielym pozadím môžu byť zmenené. -Nezabudnite stlačiť tlačidlo **Uložiť** pred opustením stránky, inak budú vaše zmeny stratené. \ No newline at end of file +Nezabudnite stlačiť tlačidlo **Uložiť** pred opustením stránky, inak budú vaše zmeny stratené. diff --git a/lib/plugins/config/lang/sq/intro.txt b/lib/plugins/config/lang/sq/intro.txt index 687b497c9..d2bab0fd5 100644 --- a/lib/plugins/config/lang/sq/intro.txt +++ b/lib/plugins/config/lang/sq/intro.txt @@ -4,4 +4,4 @@ Përdoreni këtë faqe për të kontrolluar kuadrot e instalimit të DokuWiki-t Kuadrot e treguara me një backgroudn me një ngjyrë të kuqe të lehtë janë të mbrojtura dhe nuk mund të ndryshohen me këtë plugin. Kuadrot e treguara me një background blu janë vlerat default dhe kuadrot e treguara me një background të bardhë janë vendosur lokalisht për këtë instalim të caktuar. Si kuadrot blu, ashtu edhe ato të bardhë mund të ndryshohen. -Kujtohuni të shtypni butonin **Ruaj** para se të dilni nga kjo faqe ose ndryshimet tuaja do të humbasin. \ No newline at end of file +Kujtohuni të shtypni butonin **Ruaj** para se të dilni nga kjo faqe ose ndryshimet tuaja do të humbasin. diff --git a/lib/plugins/config/lang/sv/intro.txt b/lib/plugins/config/lang/sv/intro.txt index 8887d4a7b..fd77634c2 100644 --- a/lib/plugins/config/lang/sv/intro.txt +++ b/lib/plugins/config/lang/sv/intro.txt @@ -5,5 +5,3 @@ Använd den här sidan för att göra inställningar i din Dokuwiki. För hjälp Inställningar med en rosa bakgrund är skyddade och kan inte ändras med den här insticksmodulen. Inställningar med en blå bakgrund är standardvärden, och inställningar som visas med en vit bakgrund har ändrats i den här installationen. Både blåa och vita inställningar kan ändras. Kom i håg att trycka på knappen **Spara** innan du lämnar den här sidan, annars kommer ändringarna att gå förlorade. - - diff --git a/lib/plugins/config/lang/tr/intro.txt b/lib/plugins/config/lang/tr/intro.txt index 4a9654222..2602fb3ed 100644 --- a/lib/plugins/config/lang/tr/intro.txt +++ b/lib/plugins/config/lang/tr/intro.txt @@ -4,4 +4,4 @@ Bu sayfayı DokuWiki kurulumunun ayarlarını değiştirmek için kullanabilirsi Açık kırmızı renkle gösterilenler bu eklenti ile değiştirilemez. Mavi ile gösterilenler varsayılan değerlerdir. Beyaz altyazı ile gösterilenler is bu kuruluma özel değiştirilmiş ayarlardır. Mavi ve beyaz ayarlar değiştirilebilir. -Değişiklik yapmanız durumunda **Kaydet** tuşuna basmayı unutmayınız. Aksi takdirde sayfayı kapattığınızda tüm ayarlar silinecektir. \ No newline at end of file +Değişiklik yapmanız durumunda **Kaydet** tuşuna basmayı unutmayınız. Aksi takdirde sayfayı kapattığınızda tüm ayarlar silinecektir. diff --git a/lib/plugins/config/lang/zh-tw/intro.txt b/lib/plugins/config/lang/zh-tw/intro.txt index 228c12e0a..e131ec342 100644 --- a/lib/plugins/config/lang/zh-tw/intro.txt +++ b/lib/plugins/config/lang/zh-tw/intro.txt @@ -4,4 +4,4 @@ 淡紅色背景的項目是受到保護的,不能通過這管理器更改。藍色背景的項目是系統的預設值,白色背景的項目是您更改過的。藍色和白色的設定項目都可以更改。 -離開本頁之前,不要忘記點擊最下面的 **儲存** 按鈕,否則您的修改不會生效。 \ No newline at end of file +離開本頁之前,不要忘記點擊最下面的 **儲存** 按鈕,否則您的修改不會生效。 diff --git a/lib/plugins/config/lang/zh/intro.txt b/lib/plugins/config/lang/zh/intro.txt index a7db4eda0..30cb65004 100644 --- a/lib/plugins/config/lang/zh/intro.txt +++ b/lib/plugins/config/lang/zh/intro.txt @@ -5,5 +5,3 @@ 淡红色背景的项目被保护,不能通过这个管理器更改。 蓝色背景的项目是系统的默认值,白色背景的项目是您作出更改的项目。蓝色和白色的设置项目都可以更改。 离开本页之前不要忘记点击最后的 **保存** 按钮,否则您做的修改不会生效。 - - -- cgit v1.2.3 From 771519d083ca31621d631a8d8393ad776341cd58 Mon Sep 17 00:00:00 2001 From: Mauricio Segura Date: Sun, 12 Jul 2015 12:01:00 +0200 Subject: translation update --- lib/plugins/authad/lang/es/lang.php | 3 +++ lib/plugins/authldap/lang/es/lang.php | 8 ++++++++ lib/plugins/extension/lang/es/lang.php | 5 +++++ 3 files changed, 16 insertions(+) create mode 100644 lib/plugins/authldap/lang/es/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/es/lang.php b/lib/plugins/authad/lang/es/lang.php index ffbff49a1..0ad262c21 100644 --- a/lib/plugins/authad/lang/es/lang.php +++ b/lib/plugins/authad/lang/es/lang.php @@ -5,6 +5,9 @@ * * @author Juan De La Cruz * @author Gerardo Zamudio + * @author Mauricio Segura */ $lang['domain'] = 'Dominio de inicio'; $lang['authpwdexpire'] = 'Su contraseña caducara en %d días, debería cambiarla lo antes posible'; +$lang['passchangefail'] = 'Error al cambiar la contraseña. ¿Tal vez no se cumplió la directiva de contraseñas?'; +$lang['connectfail'] = 'Error al conectar con el servidor de Active Directory.'; diff --git a/lib/plugins/authldap/lang/es/lang.php b/lib/plugins/authldap/lang/es/lang.php new file mode 100644 index 000000000..e68a42603 --- /dev/null +++ b/lib/plugins/authldap/lang/es/lang.php @@ -0,0 +1,8 @@ + + */ +$lang['connectfail'] = 'LDAP no se puede conectar: %5'; diff --git a/lib/plugins/extension/lang/es/lang.php b/lib/plugins/extension/lang/es/lang.php index a835cb630..b99f3b294 100644 --- a/lib/plugins/extension/lang/es/lang.php +++ b/lib/plugins/extension/lang/es/lang.php @@ -7,6 +7,7 @@ * @author Antonio Castilla * @author Jonathan Hernández * @author Álvaro Iradier + * @author Mauricio Segura */ $lang['menu'] = 'Administrador de Extensiones '; $lang['tab_plugins'] = 'Plugins instalados'; @@ -28,6 +29,10 @@ $lang['btn_disable'] = 'Desactivar'; $lang['btn_install'] = 'Instalar'; $lang['btn_reinstall'] = 'Reinstalar'; $lang['js']['reallydel'] = '¿Realmente quiere desinstalar esta extensión?'; +$lang['js']['display_viewoptions'] = 'Ver opciones:'; +$lang['js']['display_enabled'] = 'habilitado'; +$lang['js']['display_disabled'] = 'deshabilitado'; +$lang['js']['display_updatable'] = 'actualizable'; $lang['search_for'] = 'Extensión de búsqueda :'; $lang['search'] = 'Buscar'; $lang['extensionby'] = '%s por %s'; -- cgit v1.2.3 From ae614416a5d7f5cab6c5b82a0c45f587d7fa9c01 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 12 Jul 2015 19:05:43 +0100 Subject: changed all input type=submit buttons to button type=submit button for better stylability --- lib/plugins/acl/admin.php | 10 +++++----- lib/plugins/acl/script.js | 2 +- lib/plugins/config/admin.php | 4 ++-- lib/plugins/extension/helper/list.php | 2 +- lib/plugins/extension/script.js | 4 ++-- lib/plugins/extension/style.less | 4 ++-- lib/plugins/popularity/admin.php | 2 +- lib/plugins/revert/admin.php | 8 ++++---- lib/plugins/usermanager/admin.php | 22 +++++++++++----------- lib/plugins/usermanager/style.css | 2 +- 10 files changed, 30 insertions(+), 30 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 814bbfe9c..374205769 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -332,7 +332,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo $this->getLang('acl_perms').' '; $inl = $this->_html_select(); echo ''.NL; - echo ''.NL; + echo ''.NL; echo '
'.NL; echo '
'; @@ -391,10 +391,10 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo $this->_html_checkboxes($current,empty($this->ns),'acl'); if(is_null($current)){ - echo ''.NL; + echo ''.NL; }else{ - echo ''.NL; - echo ''.NL; + echo ''.NL; + echo ''.NL; } echo ''; @@ -641,7 +641,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo ''; echo ''; - echo ''; + echo ''; echo ''; echo ''; echo ''; diff --git a/lib/plugins/acl/script.js b/lib/plugins/acl/script.js index 58598b1e0..86badffdd 100644 --- a/lib/plugins/acl/script.js +++ b/lib/plugins/acl/script.js @@ -16,7 +16,7 @@ var dw_acl = { } jQuery('#acl__user select').change(dw_acl.userselhandler); - jQuery('#acl__user input[type=submit]').click(dw_acl.loadinfo); + jQuery('#acl__user button').click(dw_acl.loadinfo); $tree = jQuery('#acl__tree'); $tree.dw_tree({toggle_selector: 'img', diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index 2ef570b68..ec8ee0b84 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -212,8 +212,8 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { if (!$this->_config->locked) { ptln(' '); - ptln(' '); - ptln(' '); + ptln(' '); + ptln(' '); } ptln('

'); diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 11aea1d0e..bf099d308 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -535,7 +535,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $classes = 'button '.$action; $name = 'fn['.$action.']['.hsc($extension->getID()).']'; - return ''; + return ' '; } /** diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index c74c44ad1..0c43de6ae 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -5,7 +5,7 @@ jQuery(function(){ /** * Confirm uninstalling */ - $extmgr.find('input.uninstall').click(function(e){ + $extmgr.find('button.uninstall').click(function(e){ if(!window.confirm(LANG.plugins.extension.reallydel)){ e.preventDefault(); return false; @@ -46,7 +46,7 @@ jQuery(function(){ /** * Enable/Disable extension via AJAX */ - $extmgr.find('input.disable, input.enable').click(function (e) { + $extmgr.find('button.disable, button.enable').click(function (e) { e.preventDefault(); var $btn = jQuery(this); diff --git a/lib/plugins/extension/style.less b/lib/plugins/extension/style.less index 86e540b0f..c400d649a 100644 --- a/lib/plugins/extension/style.less +++ b/lib/plugins/extension/style.less @@ -80,8 +80,8 @@ overflow: hidden; } - input.button { - margin: 0 .3em .3em 0; + button { + margin-bottom: .3em; } } diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php index a2c3c6c8b..0cf174e0d 100644 --- a/lib/plugins/popularity/admin.php +++ b/lib/plugins/popularity/admin.php @@ -144,7 +144,7 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { .'' .''; } - $form .= '' + $form .= '' .'' .''; return $form; diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php index b61615d00..1a0300585 100644 --- a/lib/plugins/revert/admin.php +++ b/lib/plugins/revert/admin.php @@ -64,9 +64,9 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { global $lang, $INPUT; echo '
'; echo ''; - echo ''; - echo ' '; - echo ' '.$this->getLang('note1').''; + echo ' '; + echo ' '; + echo ''.$this->getLang('note1').''; echo '


'; } @@ -173,7 +173,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { echo ''; echo '

'; - echo ' '; + echo ' '; printf($this->getLang('note2'),hsc($filter)); echo '

'; diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 0d92e5cc1..86823ee2f 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -241,18 +241,18 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { ptln(" "); ptln(" "); ptln(" "); - ptln(" lang['delete_selected']."\" id=\"usrmgr__del\" />"); - ptln(" "); + ptln(" "); + ptln(" "); ptln(" "); - ptln(" lang['start']."\" />"); - ptln(" lang['prev']."\" />"); - ptln(" lang['next']."\" />"); - ptln(" lang['last']."\" />"); + ptln(" "); + ptln(" "); + ptln(" "); + ptln(" "); ptln(" "); if (!empty($this->_filter)) { - ptln(" lang['clear']."\" />"); + ptln(" "); } - ptln(" "); + ptln(" "); ptln(" "); ptln(" "); @@ -360,7 +360,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $this->_htmlFilterSettings($indent+10); - ptln(" lang[$cmd]."\" />",$indent); + ptln(" ",$indent); ptln(" ",$indent); ptln(" ",$indent); ptln(" ",$indent); @@ -369,7 +369,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if ($notes) { ptln("
    "); foreach ($notes as $note) { - ptln("
  • ".$note."
  • ",$indent); + ptln("
  • ".$note."
  • ",$indent); } ptln("
"); } @@ -456,7 +456,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { ptln('
',$indent); formSecurityToken(); ptln(' ',$indent); - ptln(' ',$indent); + ptln(' ',$indent); ptln(' ',$indent); ptln(' ',$indent); diff --git a/lib/plugins/usermanager/style.css b/lib/plugins/usermanager/style.css index d119b195a..9028fed5e 100644 --- a/lib/plugins/usermanager/style.css +++ b/lib/plugins/usermanager/style.css @@ -17,7 +17,7 @@ padding-left: 0; padding-right: 1.4em; } -#user__manager input.button[disabled] { +#user__manager button[disabled] { color: #ccc!important; border-color: #ccc!important; } -- cgit v1.2.3 From ea993669dce58ff6060821c2c83312cf5c05356d Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 12 Jul 2015 20:05:36 +0100 Subject: fixed lots of missing format strings in language files --- lib/plugins/authad/lang/et/lang.php | 4 ++-- lib/plugins/authad/lang/he/lang.php | 4 ++-- lib/plugins/extension/lang/cs/lang.php | 4 ++-- lib/plugins/extension/lang/de/lang.php | 4 ++-- lib/plugins/extension/lang/eo/lang.php | 4 ++-- lib/plugins/extension/lang/es/lang.php | 4 ++-- lib/plugins/extension/lang/hu/lang.php | 4 ++-- lib/plugins/extension/lang/lv/lang.php | 4 ++-- lib/plugins/extension/lang/pl/lang.php | 4 ++-- lib/plugins/extension/lang/pt-br/lang.php | 6 +++--- lib/plugins/extension/lang/ru/lang.php | 4 ++-- lib/plugins/extension/lang/zh/lang.php | 2 +- 12 files changed, 24 insertions(+), 24 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/et/lang.php b/lib/plugins/authad/lang/et/lang.php index 6dda19360..94fe9ed8e 100644 --- a/lib/plugins/authad/lang/et/lang.php +++ b/lib/plugins/authad/lang/et/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Janar Leas */ -$lang['authpwdexpire'] = 'Sinu salasõna aegub %päeva pärast, võiksid seda peatselt muuta.'; +$lang['authpwdexpire'] = 'Sinu salasõna aegub %d päeva pärast, võiksid seda peatselt muuta.'; diff --git a/lib/plugins/authad/lang/he/lang.php b/lib/plugins/authad/lang/he/lang.php index 616d1ab4b..ac8fbcb5c 100644 --- a/lib/plugins/authad/lang/he/lang.php +++ b/lib/plugins/authad/lang/he/lang.php @@ -2,9 +2,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author tomer * @author Menashe Tomer */ -$lang['authpwdexpire'] = 'הסיסמה שלך תפוג ב% d ימים, אתה צריך לשנות את זה בקרוב.'; +$lang['authpwdexpire'] = 'הסיסמה שלך תפוג ב %d ימים, אתה צריך לשנות את זה בקרוב.'; $lang['passchangefail'] = 'שגיאה בשינוי סיסמה. האם הסיסמה תואמת למדיניות המערכת?'; diff --git a/lib/plugins/extension/lang/cs/lang.php b/lib/plugins/extension/lang/cs/lang.php index dc38afd52..d48c517cf 100644 --- a/lib/plugins/extension/lang/cs/lang.php +++ b/lib/plugins/extension/lang/cs/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Viktor Zavadil * @author Jaroslav Lichtblau */ @@ -62,7 +62,7 @@ $lang['status_template'] = 'šablona'; $lang['status_bundled'] = 'svázaný'; $lang['msg_enabled'] = 'Zásuvný modul %s povolen'; $lang['msg_disabled'] = 'Zásuvný modul %s zakázán'; -$lang['msg_delete_success'] = 'Rozšíření odinstalováno'; +$lang['msg_delete_success'] = 'Rozšíření %s odinstalováno'; $lang['msg_delete_failed'] = 'Odinstalování rozšíření %s selhalo'; $lang['msg_template_install_success'] = 'Šablona %s úspěšně nainstalována'; $lang['msg_template_update_success'] = 'Šablona %s úspěšně aktualizována'; diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php index ef3197513..55a317309 100644 --- a/lib/plugins/extension/lang/de/lang.php +++ b/lib/plugins/extension/lang/de/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author H. Richard * @author Joerg * @author Simon @@ -69,7 +69,7 @@ $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_delete_success'] = 'Erweiterung %s 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'; diff --git a/lib/plugins/extension/lang/eo/lang.php b/lib/plugins/extension/lang/eo/lang.php index 6ce840be8..e0488cb46 100644 --- a/lib/plugins/extension/lang/eo/lang.php +++ b/lib/plugins/extension/lang/eo/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Robert Bogenschneider */ $lang['menu'] = 'Aldonaĵa administrado'; @@ -61,7 +61,7 @@ $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_delete_success'] = 'Aldonaĵo %s 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'; diff --git a/lib/plugins/extension/lang/es/lang.php b/lib/plugins/extension/lang/es/lang.php index b99f3b294..9e3d24318 100644 --- a/lib/plugins/extension/lang/es/lang.php +++ b/lib/plugins/extension/lang/es/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Antonio Bueno * @author Antonio Castilla * @author Jonathan Hernández @@ -69,7 +69,7 @@ $lang['status_template'] = 'plantilla'; $lang['status_bundled'] = 'agrupado'; $lang['msg_enabled'] = 'Plugin %s activado'; $lang['msg_disabled'] = 'Plugin %s desactivado'; -$lang['msg_delete_success'] = 'Extensión desinstalada'; +$lang['msg_delete_success'] = 'Extensión %s desinstalada'; $lang['msg_delete_failed'] = 'La desinstalación de la extensión %s ha fallado'; $lang['msg_template_install_success'] = 'Plantilla %s instalada con éxito'; $lang['msg_template_update_success'] = 'Plantilla %s actualizada con éxito'; diff --git a/lib/plugins/extension/lang/hu/lang.php b/lib/plugins/extension/lang/hu/lang.php index a27b5a307..28194ad9d 100644 --- a/lib/plugins/extension/lang/hu/lang.php +++ b/lib/plugins/extension/lang/hu/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Marton Sebok */ $lang['menu'] = 'Bővítménykezelő'; @@ -61,7 +61,7 @@ $lang['status_template'] = 'sablon'; $lang['status_bundled'] = 'beépített'; $lang['msg_enabled'] = 'A(z) %s modul engedélyezve'; $lang['msg_disabled'] = 'A(z) %s modul letiltva'; -$lang['msg_delete_success'] = 'A bővítmény törölve'; +$lang['msg_delete_success'] = 'A bővítmény %s törölve'; $lang['msg_template_install_success'] = 'A(z) %s sablon sikeresen telepítve'; $lang['msg_template_update_success'] = 'A(z) %s sablon sikeresen frissítve'; $lang['msg_plugin_install_success'] = 'A(z) %s modul sikeresen telepítve'; diff --git a/lib/plugins/extension/lang/lv/lang.php b/lib/plugins/extension/lang/lv/lang.php index e7e9bdfd9..b3e5ce0d2 100644 --- a/lib/plugins/extension/lang/lv/lang.php +++ b/lib/plugins/extension/lang/lv/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Aivars Miška */ -$lang['msg_delete_success'] = 'Papildinājums atinstalēts'; +$lang['msg_delete_success'] = 'Papildinājums %s atinstalēts'; diff --git a/lib/plugins/extension/lang/pl/lang.php b/lib/plugins/extension/lang/pl/lang.php index 4fdca79c9..ab9a818b6 100644 --- a/lib/plugins/extension/lang/pl/lang.php +++ b/lib/plugins/extension/lang/pl/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Mati */ $lang['menu'] = 'Menedżer rozszerzeń'; @@ -36,4 +36,4 @@ $lang['status_not_installed'] = 'nie zainstalowano'; $lang['status_enabled'] = 'uruchomione'; $lang['status_disabled'] = 'wyłączone'; $lang['status_plugin'] = 'dodatek'; -$lang['msg_delete_success'] = 'Rozszerzenie odinstalowane'; +$lang['msg_delete_success'] = 'Rozszerzenie %s odinstalowane'; diff --git a/lib/plugins/extension/lang/pt-br/lang.php b/lib/plugins/extension/lang/pt-br/lang.php index 47286389f..f7b7a0d2b 100644 --- a/lib/plugins/extension/lang/pt-br/lang.php +++ b/lib/plugins/extension/lang/pt-br/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Felipe Castro * @author Hudson FAS */ @@ -62,8 +62,8 @@ $lang['status_template'] = 'modelo'; $lang['status_bundled'] = 'agrupado'; $lang['msg_enabled'] = 'Extensão %s habilitada'; $lang['msg_disabled'] = 'Extensão %s desabilitada'; -$lang['msg_delete_success'] = 'Extensão desinstalada'; -$lang['msg_delete_failed'] = 'Falha na desinstalação da extensão'; +$lang['msg_delete_success'] = 'Extensão %s desinstalada'; +$lang['msg_delete_failed'] = 'Falha na desinstalação da extensão %s'; $lang['msg_template_install_success'] = 'Modelo %s instalado com sucesso'; $lang['msg_template_update_success'] = 'Modelo %s atualizado com sucesso'; $lang['msg_plugin_install_success'] = 'Extensão %s instalada com sucesso'; diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php index a16f0ca95..71d949606 100644 --- a/lib/plugins/extension/lang/ru/lang.php +++ b/lib/plugins/extension/lang/ru/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Aleksandr Selivanov * @author Igor Degraf * @author Type-kun @@ -77,7 +77,7 @@ $lang['status_bundled'] = 'в комплекте'; $lang['msg_enabled'] = 'Плагин %s включён'; $lang['msg_disabled'] = 'Плагин %s отключён'; -$lang['msg_delete_success'] = 'Дополнение удалено'; +$lang['msg_delete_success'] = 'Дополнение %s удалено'; $lang['msg_delete_failed'] = 'Не удалось удалить дополнение %s'; $lang['msg_template_install_success'] = 'Шаблон %s успешно установлен'; $lang['msg_template_update_success'] = 'Шаблон %s успешно обновлён'; diff --git a/lib/plugins/extension/lang/zh/lang.php b/lib/plugins/extension/lang/zh/lang.php index 62d54c160..f07bee0ac 100644 --- a/lib/plugins/extension/lang/zh/lang.php +++ b/lib/plugins/extension/lang/zh/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Cupen * @author xiqingongzi * @author qinghao -- cgit v1.2.3 From 969c52e5724a4a380ac11df87059f5bc39631da0 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 12 Jul 2015 21:49:21 +0100 Subject: fixed occurrences of html named entities in translation files to be xhtml-compatible --- lib/plugins/authldap/lang/zh-tw/settings.php | 6 +++--- lib/plugins/authldap/lang/zh/settings.php | 6 +++--- lib/plugins/authmysql/lang/ja/settings.php | 4 ++-- lib/plugins/authpgsql/lang/ja/settings.php | 4 ++-- lib/plugins/config/lang/eo/lang.php | 2 +- lib/plugins/config/lang/zh-tw/lang.php | 2 +- lib/plugins/extension/lang/pt-br/lang.php | 26 +++++++++++------------ lib/plugins/extension/lang/pt/intro_templates.txt | 2 +- 8 files changed, 26 insertions(+), 26 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/zh-tw/settings.php b/lib/plugins/authldap/lang/zh-tw/settings.php index e3d85cb87..dcbbace8c 100644 --- a/lib/plugins/authldap/lang/zh-tw/settings.php +++ b/lib/plugins/authldap/lang/zh-tw/settings.php @@ -2,15 +2,15 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author syaoranhinata@gmail.com */ $lang['server'] = '您的 LDAP 伺服器。填寫主機名稱 (localhost) 或完整的 URL (ldap://server.tld:389)'; $lang['port'] = 'LDAP 伺服器端口 (若上方沒填寫完整的 URL)'; $lang['usertree'] = '到哪裏尋找使用者帳號?如: ou=People, dc=server, dc=tld'; $lang['grouptree'] = '到哪裏尋找使用者群組?如: ou=Group, dc=server, dc=tld'; -$lang['userfilter'] = '用於搜索使用者賬號的 LDAP 篩選器。如: (&(uid=%{user})(objectClass=posixAccount))'; -$lang['groupfilter'] = '用於搜索群組的 LDAP 篩選器。例如 (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['userfilter'] = '用於搜索使用者賬號的 LDAP 篩選器。如: (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = '用於搜索群組的 LDAP 篩選器。例如 (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; $lang['version'] = '使用的通訊協定版本。您可能要設置為 3'; $lang['starttls'] = '使用 TLS 連接嗎?'; $lang['referrals'] = '是否允許引用 (referrals)?'; diff --git a/lib/plugins/authldap/lang/zh/settings.php b/lib/plugins/authldap/lang/zh/settings.php index 4f4a0a8b8..11cba4f55 100644 --- a/lib/plugins/authldap/lang/zh/settings.php +++ b/lib/plugins/authldap/lang/zh/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author lainme * @author oott123 * @author Errol @@ -11,8 +11,8 @@ $lang['server'] = '您的 LDAP 服务器。填写主机名 ( */ $lang['server'] = 'MySQL のホスト名'; @@ -11,7 +11,7 @@ $lang['password'] = 'MySQL 接続用ユーザーのパスワード' $lang['database'] = '使用するデータベース名'; $lang['charset'] = 'データベースの文字コード'; $lang['debug'] = 'デバック情報を表示する'; -$lang['forwardClearPass'] = '以下で定義する SQL ステートメントにおいて, パスワード変数 %{pass} を平文とする(DokiWiki側で暗号化しない)'; +$lang['forwardClearPass'] = '以下で定義する SQL ステートメントにおいて, パスワード変数 を平文とする(DokiWiki側で暗号化しない)'; $lang['TablesToLock'] = '書き込み時にロックするテーブル(コンマ区切りで列挙)'; $lang['checkPass'] = 'パスワードの照合に用いる SQL ステートメント'; $lang['getUserInfo'] = 'ユーザー情報の取得に用いる SQL ステートメント'; diff --git a/lib/plugins/authpgsql/lang/ja/settings.php b/lib/plugins/authpgsql/lang/ja/settings.php index d7a5f6cf2..001008c9f 100644 --- a/lib/plugins/authpgsql/lang/ja/settings.php +++ b/lib/plugins/authpgsql/lang/ja/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Satoshi Sahara */ $lang['server'] = 'PostgreSQL のサーバー名'; @@ -11,7 +11,7 @@ $lang['user'] = 'PostgreSQL 接続用ユーザー名'; $lang['password'] = 'PostgreSQL 接続用ユーザーのパスワード'; $lang['database'] = '使用するデータベース名'; $lang['debug'] = 'デバック情報を表示する'; -$lang['forwardClearPass'] = '以下で定義する SQL ステートメントにおいて, パスワード変数 %{pass} を平文とする(DokiWiki側で暗号化しない)'; +$lang['forwardClearPass'] = '以下で定義する SQL ステートメントにおいて, パスワード変数 を平文とする(DokiWiki側で暗号化しない)'; $lang['checkPass'] = 'パスワードの照合に用いる SQL ステートメント'; $lang['getUserInfo'] = 'ユーザー情報の取得に用いる SQL ステートメント'; $lang['getGroups'] = 'ユーザーが所属する全てのグループの取得に用いる SQL ステートメント'; diff --git a/lib/plugins/config/lang/eo/lang.php b/lib/plugins/config/lang/eo/lang.php index 440d771dc..566da0d2d 100644 --- a/lib/plugins/config/lang/eo/lang.php +++ b/lib/plugins/config/lang/eo/lang.php @@ -137,7 +137,7 @@ $lang['compress'] = 'Kompaktigi CSS-ajn kaj ĵavaskriptajn elmetojn $lang['cssdatauri'] = 'Grandeco en bitokoj, ĝis kiom en CSS-dosieroj referencitaj bildoj enmetiĝu rekte en la stilfolion por malgrandigi vanan HTTP-kapan trafikon. Tiu tekniko ne funkcias en IE 7 aŭ pli frua! 400 ĝis 600 bitokoj estas bona grandeco. Indiku 0 por malebligi enmeton.'; $lang['send404'] = 'Sendi la mesaĝon "HTTP 404/Paĝo ne trovita" por ne ekzistantaj paĝoj'; -$lang['broken_iua'] = 'Ĉu la funkcio "ignore_user_abort" difektas en via sistemo? Tio povus misfunkciigi la serĉindekson. IIS+PHP/CGI estas konata kiel fuŝaĵo. Vidu Cimon 852 por pli da informoj.'; +$lang['broken_iua'] = 'Ĉu la funkcio "ignore_user_abort" difektas en via sistemo? Tio povus misfunkciigi la serĉindekson. IIS+PHP/CGI estas konata kiel fuŝaĵo. Vidu Cimon 852 por pli da informoj.'; $lang['xsendfile'] = 'Ĉu uzi la kaplinion X-Sendfile por ebligi al la retservilo liveri fiksajn dosierojn? Via retservilo subtenu tion.'; $lang['renderer_xhtml'] = 'Prezentilo por la ĉefa vikia rezulto (xhtml)'; $lang['renderer__core'] = '%s (DokuWiki-a kerno)'; diff --git a/lib/plugins/config/lang/zh-tw/lang.php b/lib/plugins/config/lang/zh-tw/lang.php index cc2c28c31..c586a0d51 100644 --- a/lib/plugins/config/lang/zh-tw/lang.php +++ b/lib/plugins/config/lang/zh-tw/lang.php @@ -137,7 +137,7 @@ $lang['gzip_output'] = '對 xhtml 使用 gzip 內容編碼'; $lang['compress'] = '壓縮 CSS 與 JavaScript 的輸出'; $lang['cssdatauri'] = '假如 CSS 中所引用的圖片小於該數字大小(bytes),圖片將被直接嵌入 CSS 中,以減少 HTTP Request 的發送。 IE 7 及以下的版本並不支援此功能。推薦把此數值設定成 400600 bytes 之間。若輸入 0 則停用此功能。'; $lang['send404'] = '存取不存在的頁面時送出 "HTTP 404/Page Not Found"'; -$lang['broken_iua'] = 'ignore_user_abort 功能失效了?這有可能導致搜索索引不可用。IIS+PHP/CGI 已損壞。請參閱 Bug 852 獲取更多訊息。'; +$lang['broken_iua'] = 'ignore_user_abort 功能失效了?這有可能導致搜索索引不可用。IIS+PHP/CGI 已損壞。請參閱 Bug 852 獲取更多訊息。'; $lang['xsendfile'] = '使用 X-Sendfile 頭讓網頁伺服器發送狀態文件?您的網頁伺服器需要支持該功能。'; $lang['renderer_xhtml'] = '主要 wiki 輸出 (xhtml) 的渲染器'; $lang['renderer__core'] = '%s (dokuwiki 核心)'; diff --git a/lib/plugins/extension/lang/pt-br/lang.php b/lib/plugins/extension/lang/pt-br/lang.php index f7b7a0d2b..823900acf 100644 --- a/lib/plugins/extension/lang/pt-br/lang.php +++ b/lib/plugins/extension/lang/pt-br/lang.php @@ -63,7 +63,7 @@ $lang['status_bundled'] = 'agrupado'; $lang['msg_enabled'] = 'Extensão %s habilitada'; $lang['msg_disabled'] = 'Extensão %s desabilitada'; $lang['msg_delete_success'] = 'Extensão %s desinstalada'; -$lang['msg_delete_failed'] = 'Falha na desinstalação da extensão %s'; +$lang['msg_delete_failed'] = 'Falha na desinstalação da extensão %s'; $lang['msg_template_install_success'] = 'Modelo %s instalado com sucesso'; $lang['msg_template_update_success'] = 'Modelo %s atualizado com sucesso'; $lang['msg_plugin_install_success'] = 'Extensão %s instalada com sucesso'; @@ -75,18 +75,18 @@ $lang['security_warning'] = 'Aviso sobre segurança: %s'; $lang['update_available'] = 'Atualização: Nova versão %s está disponível.'; $lang['wrong_folder'] = 'Extensão instalada incorretamente: Renomeie o diretório de extensões "%s" para "%s".'; $lang['url_change'] = 'URL mudou: A URL para baixar mudou desde a última baixada. Verifique se a nova URL é válida antes de atualizar a extensão.
Novo: %s
Velho: %s'; -$lang['error_badurl'] = 'O URL deve começar com http ou https'; -$lang['error_dircreate'] = 'Impossível criar pasta temporária para receber o download'; -$lang['error_download'] = 'Impossável baixar o arquivo: %s'; -$lang['error_decompress'] = 'Impossável descompimir o arquivo baixado. Isso pode ser resultado de um download ruim que neste caso pode ser tentado novamente; ou o formato da compressão pode ser desconhecido, neste caso baixe e instale manualmente.'; -$lang['error_findfolder'] = 'Impossíl identificar a extensão do diretório, você deve baixar e instalar manualmente.'; -$lang['error_copy'] = 'Houve um erro de cópia de arquivo durante a tentativa de instalar os arquivos para o diretório %s : o disco pode estar cheio ou as permissões de acesso ao arquivo podem estar incorreta. Isso pode ter resultado em um plugin parcialmente instalado e deixar a sua instalação wiki instável'; -$lang['noperms'] = 'Diretório de extensão não é gravável'; -$lang['notplperms'] = 'Diretório de modelo (Template) não é gravável'; -$lang['nopluginperms'] = 'Diretório de plugin não é gravável'; -$lang['git'] = 'A extensão foi instalada via git, você talvez não queira atualizá-lo aqui.'; -$lang['auth'] = 'O plugin auth não está ativado na configuração, considere desativá-lo.'; +$lang['error_badurl'] = 'O URL deve começar com http ou https'; +$lang['error_dircreate'] = 'Impossível criar pasta temporária para receber o download'; +$lang['error_download'] = 'Impossável baixar o arquivo: %s'; +$lang['error_decompress'] = 'Impossável descompimir o arquivo baixado. Isso pode ser resultado de um download ruim que neste caso pode ser tentado novamente; ou o formato da compressão pode ser desconhecido, neste caso baixe e instale manualmente.'; +$lang['error_findfolder'] = 'Impossíl identificar a extensão do diretório, você deve baixar e instalar manualmente.'; +$lang['error_copy'] = 'Houve um erro de cópia de arquivo durante a tentativa de instalar os arquivos para o diretório %s : o disco pode estar cheio ou as permissões de acesso ao arquivo podem estar incorreta. Isso pode ter resultado em um plugin parcialmente instalado e deixar a sua instalação wiki instável'; +$lang['noperms'] = 'Diretório de extensão não é gravável'; +$lang['notplperms'] = 'Diretório de modelo (Template) não é gravável'; +$lang['nopluginperms'] = 'Diretório de plugin não é gravável'; +$lang['git'] = 'A extensão foi instalada via git, você talvez não queira atualizá-lo aqui.'; +$lang['auth'] = 'O plugin auth não está ativado na configuração, considere desativá-lo.'; $lang['install_url'] = 'Instale a partir do URL:'; -$lang['install_upload'] = 'Publicar Extensão:'; +$lang['install_upload'] = 'Publicar Extensão:'; $lang['repo_error'] = 'O repositório de plugin não pode ser contactado. Certifique-se de que o servidor pode acessar www.dokuwiki.org e confira suas configurações de proxy.'; $lang['nossl'] = 'Sua instalação PHP parece que não suporta SSL. Algumas extensões DokuWiki não serão baixadas.'; diff --git a/lib/plugins/extension/lang/pt/intro_templates.txt b/lib/plugins/extension/lang/pt/intro_templates.txt index ecdf99f17..02bc33643 100644 --- a/lib/plugins/extension/lang/pt/intro_templates.txt +++ b/lib/plugins/extension/lang/pt/intro_templates.txt @@ -1 +1 @@ -Estes são os modelos atualmente instalados em seu DokuWiki. Você pode selecionar o modelo a ser usado no [[Do = admin & page = configuração |? Configuration Manager]]. \ No newline at end of file +Estes são os modelos atualmente instalados em seu DokuWiki. Você pode selecionar o modelo a ser usado no [[?do=admin&page=config|Configuration Manager]]. -- cgit v1.2.3 From 70519db93fdd6d635397c1354a33f2b1071e2d13 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 13 Jul 2015 00:26:03 +0100 Subject: fixed a few links and html errors in language files --- lib/plugins/authad/lang/pt/settings.php | 4 ++-- lib/plugins/extension/lang/pt/lang.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/pt/settings.php b/lib/plugins/authad/lang/pt/settings.php index 6256eb597..c5756890d 100644 --- a/lib/plugins/authad/lang/pt/settings.php +++ b/lib/plugins/authad/lang/pt/settings.php @@ -2,14 +2,14 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author André Neves * @author Murilo * @author Paulo Silva * @author Guido Salatino */ $lang['account_suffix'] = 'O sufixo da sua conta. Por exemplo, @my.domain.org'; -$lang['base_dn'] = 'Sua base DN. Eg. DC=meu, DC=dominio, DC=org '; +$lang['base_dn'] = 'Sua base DN. Eg. DC=meu, DC=dominio, DC=org '; $lang['domain_controllers'] = 'Uma lista separada por vírgulas de Controladores de Domínio (AD DC). Ex.: srv1.domain.org,srv2.domain.org'; $lang['admin_username'] = 'Um utilizador com privilégios na Active Directory que tenha acesso aos dados de todos os outros utilizadores. Opcional, mas necessário para certas ações como enviar emails de subscrição.'; $lang['admin_password'] = 'A senha para o utilizador acima.'; diff --git a/lib/plugins/extension/lang/pt/lang.php b/lib/plugins/extension/lang/pt/lang.php index c9ca8d976..e8c8a7d55 100644 --- a/lib/plugins/extension/lang/pt/lang.php +++ b/lib/plugins/extension/lang/pt/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Guido Salatino * @author Romulo Pereira */ @@ -41,7 +41,7 @@ $lang['downloadurl'] = 'Baixar URL: '; $lang['repository'] = 'Repositório: '; -$lang['unknown'] = ' desconhecido +$lang['unknown'] = ' desconhecido '; $lang['installed_version'] = 'Versão instalada:'; $lang['install_date'] = 'Sua última atualização:'; -- cgit v1.2.3 From 8cce24b8aea630d7791ca2b67ad6dc4bf89c19a9 Mon Sep 17 00:00:00 2001 From: Hideaki SAWADA Date: Wed, 15 Jul 2015 14:56:08 +0200 Subject: translation update --- lib/plugins/authldap/lang/ja/lang.php | 9 +++++++++ lib/plugins/authldap/lang/ja/settings.php | 5 +++++ lib/plugins/authmysql/lang/ja/lang.php | 11 +++++++++++ lib/plugins/authmysql/lang/ja/settings.php | 2 +- lib/plugins/authpgsql/lang/ja/settings.php | 2 +- lib/plugins/extension/lang/ja/lang.php | 1 + 6 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 lib/plugins/authldap/lang/ja/lang.php create mode 100644 lib/plugins/authmysql/lang/ja/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/ja/lang.php b/lib/plugins/authldap/lang/ja/lang.php new file mode 100644 index 000000000..aeeb6c75e --- /dev/null +++ b/lib/plugins/authldap/lang/ja/lang.php @@ -0,0 +1,9 @@ + + */ +$lang['connectfail'] = 'LDAP に接続できません: %s'; +$lang['domainfail'] = 'LDAP で user dn を発見できません。'; diff --git a/lib/plugins/authldap/lang/ja/settings.php b/lib/plugins/authldap/lang/ja/settings.php index 717b5a6d9..99a70de79 100644 --- a/lib/plugins/authldap/lang/ja/settings.php +++ b/lib/plugins/authldap/lang/ja/settings.php @@ -23,10 +23,15 @@ $lang['binddn'] = '匿名バインドでは不十分な場合、 $lang['bindpw'] = '上記ユーザーのパスワード'; $lang['userscope'] = 'ユーザー検索の範囲を限定させる'; $lang['groupscope'] = 'グループ検索の範囲を限定させる'; +$lang['userkey'] = 'ユーザー名を示す属性。userfilter と一致している必要があります。'; $lang['groupkey'] = 'ユーザー属性をグループのメンバーシップから設定します(代わりに標準のADグループ)。 例えば、部署や電話番号などです。'; +$lang['modPass'] = 'DokuWiki から LDAP パスワードの変更が可能?'; $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'; +$lang['referrals_o_-1'] = 'デフォルトを使用する'; +$lang['referrals_o_0'] = 'referral に従わない'; +$lang['referrals_o_1'] = 'referral に従う'; diff --git a/lib/plugins/authmysql/lang/ja/lang.php b/lib/plugins/authmysql/lang/ja/lang.php new file mode 100644 index 000000000..a2348f2f3 --- /dev/null +++ b/lib/plugins/authmysql/lang/ja/lang.php @@ -0,0 +1,11 @@ + + */ +$lang['connectfail'] = 'データベースへの接続に失敗しました。'; +$lang['userexists'] = 'このログイン名のユーザーが既に存在しています。'; +$lang['usernotexists'] = 'そのユーザーは存在しません。'; +$lang['writefail'] = 'ユーザーデータを変更できません。Wiki の管理者に連絡してください。'; diff --git a/lib/plugins/authmysql/lang/ja/settings.php b/lib/plugins/authmysql/lang/ja/settings.php index cc0146b15..6bc3f9a14 100644 --- a/lib/plugins/authmysql/lang/ja/settings.php +++ b/lib/plugins/authmysql/lang/ja/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Satoshi Sahara */ $lang['server'] = 'MySQL のホスト名'; diff --git a/lib/plugins/authpgsql/lang/ja/settings.php b/lib/plugins/authpgsql/lang/ja/settings.php index 001008c9f..c4a82a179 100644 --- a/lib/plugins/authpgsql/lang/ja/settings.php +++ b/lib/plugins/authpgsql/lang/ja/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Satoshi Sahara */ $lang['server'] = 'PostgreSQL のサーバー名'; diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php index 42334c767..689a9877e 100644 --- a/lib/plugins/extension/lang/ja/lang.php +++ b/lib/plugins/extension/lang/ja/lang.php @@ -28,6 +28,7 @@ $lang['btn_disable'] = '無効化'; $lang['btn_install'] = 'インストール'; $lang['btn_reinstall'] = '再インストール'; $lang['js']['reallydel'] = 'この拡張機能を本当にアンインストールしますか?'; +$lang['js']['display_viewoptions'] = '表示オプション: '; $lang['js']['display_enabled'] = '有効'; $lang['js']['display_disabled'] = '無効'; $lang['js']['display_updatable'] = '更新可能'; -- cgit v1.2.3 From 70eb84aa3a9aff0dcd8bc888e98f34f9e24f4af2 Mon Sep 17 00:00:00 2001 From: Hideaki SAWADA Date: Wed, 15 Jul 2015 16:16:31 +0200 Subject: translation update --- lib/plugins/acl/lang/ja/help.txt | 15 ++++++--------- lib/plugins/popularity/lang/ja/intro.txt | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/lang/ja/help.txt b/lib/plugins/acl/lang/ja/help.txt index f7867f8e2..a1f03a3af 100644 --- a/lib/plugins/acl/lang/ja/help.txt +++ b/lib/plugins/acl/lang/ja/help.txt @@ -1,11 +1,8 @@ -=== クイックヘルプ: === +=== 操作案内 === -このページでは、Wiki内の名前空間とページに対する権限を追加・削除することができます。 +このページでは、Wiki 内の名前空間とページに対する権限を追加・削除することができます。 + * 左側のボックスには存在する名前空間とページが表示されています。 + * 上部のフォームを使って、選択したユーザーもしくはグループの権限を閲覧・変更することができます。 + * 下部の一覧は、現在設定されているアクセス制御のルールを表示します。この一覧を使って、複数のルールを素早く変更・削除することが可能です。 -左側のボックスには存在する名前空間とページが表示されています。 - -上記のフォームを使って、選択したユーザーもしくはグループの権限を閲覧・変更することができます。 - -以下のテープルには、現在設定されているアクセスコントロールのルールが表示されています。このテーブルを使って、複数のルールを素早く変更・削除することが可能です。 - -DokuWikiのアクセスコントロールについては、[[doku>acl|official documentation on ACL]] をお読み下さい。 \ No newline at end of file +DokuWiki のアクセス制御については、[[doku>ja:acl|アクセス制御リスト (ACL)の公式解説]]をお読み下さい。 \ No newline at end of file diff --git a/lib/plugins/popularity/lang/ja/intro.txt b/lib/plugins/popularity/lang/ja/intro.txt index 09886f418..db9a34284 100644 --- a/lib/plugins/popularity/lang/ja/intro.txt +++ b/lib/plugins/popularity/lang/ja/intro.txt @@ -1,6 +1,6 @@ ====== 利用状況調査 ====== -このツールは、ご利用中のwikiの情報を収集し、それをDokuWikiの開発者へ匿名で送信するものです。開発者はこのツールにより、DokuWikiが実際にどの様に利用されているかを理解し、そして実際の利用状況に基づいて今後の開発方針の決定することができます。 +この[[doku>ja:popularity|ツール]]は、ご利用中のwikiの情報を収集し、それをDokuWikiの開発者へ匿名で送信するものです。開発者はこのツールにより、DokuWikiが実際にどの様に利用されているかを理解し、そして実際の利用状況に基づいて今後の開発方針の決定することができます。 お使いのwikiの規模が大きくなってきたときは、このステップを定期的に繰り返すことを推奨しています。また、送信されたデータは匿名のIDで識別されます。 -- cgit v1.2.3 From 1afa9ba84a2a44f66944dfc754dd8b8662c987fb Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Thu, 16 Jul 2015 22:14:13 +0200 Subject: remove deleted files on update of extension Resolves #1192 `/lib/plugins//deleted.files` which list files that can be removed e.g. ``` # This is a list of files that were present in previous plugin releases # but were removed later. An up to date plugin should not have any of # the files installed action.php folder/file.txt ``` --- lib/plugins/extension/helper/extension.php | 41 +++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 719249fbe..7d723490e 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -578,6 +578,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { try { $installed = $this->installArchive("$tmp/upload.archive", true, $basename); $this->updateManagerData('', $installed); + $this->removeDeletedfiles($installed); // purge cache $this->purgeCache(); }catch (Exception $e){ @@ -598,6 +599,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $path = $this->download($url); $installed = $this->installArchive($path, true); $this->updateManagerData($url, $installed); + $this->removeDeletedfiles($installed); // purge cache $this->purgeCache(); @@ -623,6 +625,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { if (!isset($installed[$this->getID()])) { throw new Exception('Error, the requested extension hasn\'t been installed or updated'); } + $this->removeDeletedfiles($installed); $this->setExtension($this->getID()); $this->purgeCache(); return $installed; @@ -918,7 +921,9 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { if($this->dircopy($item['tmp'], $target)) { // return info $id = $item['base']; - if($item['type'] == 'template') $id = 'template:'.$id; + if($item['type'] == 'template') { + $id = 'template:'.$id; + } $installed_extensions[$id] = array( 'base' => $item['base'], 'type' => $item['type'], @@ -1117,6 +1122,40 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return true; } + + /** + * Delete outdated files from updated plugins + * + * @param array $installed + */ + private function removeDeletedfiles($installed) { + foreach($installed as $id => $extension) { + // only on update + if($extension['action'] == 'install') continue; + + // get definition file + if($extension['type'] == 'template') { + $extensiondir = DOKU_TPLLIB; + }else{ + $extensiondir = DOKU_PLUGIN; + } + $extensiondir = $extensiondir . $extension['base'] .'/'; + $definitionfile = $extensiondir . 'deleted.files'; + if(!file_exists($definitionfile)) continue; + + // delete the old files + $list = file($definitionfile); + + foreach($list as $line) { + $line = trim(preg_replace('/#.*$/', '', $line)); + if(!$line) continue; + $file = $extensiondir . $line; + if(!file_exists($file)) continue; + + io_rmdir($file, true); + } + } + } } // vim:ts=4:sw=4:et: -- cgit v1.2.3 From 75c8c6faaeefed18f12a4ce652c4161567219910 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 18 Jul 2015 12:23:26 +0200 Subject: readded cookie to styling plugin --- lib/plugins/styling/script.js | 95 +++++++++++++++++++++++++++---------------- 1 file changed, 59 insertions(+), 36 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index 84b251eab..f2d550b21 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -2,10 +2,58 @@ jQuery(function () { - var doreload = 1; + /** + * Function to reload the preview styles in the main window + * + * @param {window} target the main window + */ + function applyPreview(target) { + // remove style + var $style = target.jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); + $style.attr('href', ''); + + // append the loader screen + $loader = target.jQuery('#plugin__styling_loader'); + if (!$loader.length) { + $loader = jQuery('
' + LANG.plugins.styling.loader + '
'); + $loader.css({ + 'position': 'absolute', + 'width': '100%', + 'height': '100%', + 'top': 0, + 'left': 0, + 'z-index': 5000, + 'background-color': '#fff', + 'opacity': '0.7', + 'color': '#000', + 'font-size': '2.5em', + 'text-align': 'center', + 'line-height': 1.5, + 'padding-top': '2em' + }); + target.jQuery('body').append($loader); + } + + // load preview in main window (timeout works around chrome updating CSS weirdness) + target.setTimeout(function () { + var now = new Date().getTime(); + $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); + }, 500); + } + var doreload = 1; var $styling_plugin = jQuery('#plugin__styling'); - if (!$styling_plugin.length) return; + + // if we are not on the plugin page (either main or popup) + if (!$styling_plugin.length) { + // handle the preview cookie + if(DokuCookie.getValue('styling_plugin') == 1) { + applyPreview(window); + } + return; // nothing more to do here + } + + /* ---- from here on we're in the popup or admin page ---- */ // add the color picker $styling_plugin.find('.color').iris({}); @@ -18,15 +66,18 @@ jQuery(function () { $btn.click(function (e) { var windowFeatures = "menubar=no,location=no,resizable=yes,scrollbars=yes,status=false,width=500,height=500"; - window.open(DOKU_BASE + 'lib/plugins/styling/popup.php', 'styling', windowFeatures) + window.open(DOKU_BASE + 'lib/plugins/styling/popup.php', 'styling_popup', windowFeatures); e.preventDefault(); }).wrap('

'); - return; + return; // we exit here if this is not the popup } + /* ---- from here on we're in the popup only ---- */ + // reload the main page on close window.onunload = function(e) { if(doreload) { + window.opener.DokuCookie.setValue('styling_plugin', 0); window.opener.document.location.reload(); } return null; @@ -37,37 +88,9 @@ jQuery(function () { doreload = false; }); - // remove style - var $style = window.opener.jQuery('link[rel=stylesheet][href*="lib/exe/css.php"]'); - $style.attr('href', ''); - - // append the loader screen - $loader = window.opener.jQuery('#plugin__styling_loader'); - if (!$loader.length) { - $loader = jQuery('
' + LANG.plugins.styling.loader + '
'); - $loader.css({ - 'position': 'absolute', - 'width': '100%', - 'height': '100%', - 'top': 0, - 'left': 0, - 'z-index': 5000, - 'background-color': '#fff', - 'opacity': '0.7', - 'color': '#000', - 'font-size': '2.5em', - 'text-align': 'center', - 'line-height': 1.5, - 'padding-top': '2em' - }); - window.opener.jQuery('body').append($loader); - } - - // load preview in main window (timeout works around chrome updating CSS weirdness) - window.setTimeout(function() { - var now = new Date().getTime(); - $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); - }, 500); - + // on first load apply preview + applyPreview(window.opener); + // enable the preview cookie + window.opener.DokuCookie.setValue('styling_plugin', 1); }); -- cgit v1.2.3 From b28801bc7f36b024f1051c1e7afd9be8a4c5171e Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 18 Jul 2015 12:51:25 +0200 Subject: added plugin to list of bundled extensions --- lib/plugins/extension/helper/extension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 719249fbe..c23840805 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -108,7 +108,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return in_array($this->id, array( 'authad', 'authldap', 'authmysql', 'authpgsql', 'authplain', 'acl', 'info', 'extension', - 'revert', 'popularity', 'config', 'safefnrecode', 'testing', 'template:dokuwiki' + 'revert', 'popularity', 'config', 'safefnrecode', 'styling', 'testing', 'template:dokuwiki' ) ); } -- cgit v1.2.3 From 4c19c0bad21142b05872bf71c4a9599aeb7e15cc Mon Sep 17 00:00:00 2001 From: Philip Knack Date: Mon, 20 Jul 2015 10:21:22 +0200 Subject: translation update --- lib/plugins/authad/lang/de/lang.php | 3 +++ lib/plugins/authldap/lang/de/lang.php | 9 +++++++++ lib/plugins/authldap/lang/de/settings.php | 2 ++ lib/plugins/authmysql/lang/de/lang.php | 2 ++ lib/plugins/extension/lang/de/lang.php | 5 ++++- 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 lib/plugins/authldap/lang/de/lang.php (limited to 'lib/plugins') diff --git a/lib/plugins/authad/lang/de/lang.php b/lib/plugins/authad/lang/de/lang.php index 11f52a414..93a65667e 100644 --- a/lib/plugins/authad/lang/de/lang.php +++ b/lib/plugins/authad/lang/de/lang.php @@ -4,6 +4,9 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Andreas Gohr + * @author Philip Knack */ $lang['domain'] = 'Anmelde-Domäne'; $lang['authpwdexpire'] = 'Ihr Passwort läuft in %d Tag(en) ab. Sie sollten es frühzeitig ändern.'; +$lang['passchangefail'] = 'Kennwortänderung fehlgeschlagen. Entspricht das Kennwort der Richtlinie?'; +$lang['connectfail'] = 'Verbindung zum Active Directory Server fehlgeschlagen.'; diff --git a/lib/plugins/authldap/lang/de/lang.php b/lib/plugins/authldap/lang/de/lang.php new file mode 100644 index 000000000..74197f918 --- /dev/null +++ b/lib/plugins/authldap/lang/de/lang.php @@ -0,0 +1,9 @@ + + */ +$lang['connectfail'] = 'LDAP-Verbindung scheitert: %s'; +$lang['domainfail'] = 'LDAP kann nicht dein Benutzer finden dn'; diff --git a/lib/plugins/authldap/lang/de/settings.php b/lib/plugins/authldap/lang/de/settings.php index 933189c40..df1974867 100644 --- a/lib/plugins/authldap/lang/de/settings.php +++ b/lib/plugins/authldap/lang/de/settings.php @@ -5,6 +5,7 @@ * * @author Matthias Schulte * @author christian studer + * @author Philip Knack */ $lang['server'] = 'Adresse zum LDAP-Server. Entweder als Hostname (localhost) oder als FQDN (ldap://server.tld:389).'; $lang['port'] = 'Port des LDAP-Servers, falls kein Port angegeben wurde.'; @@ -28,3 +29,4 @@ $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'; +$lang['referrals_o_-1'] = 'Standard verwenden'; diff --git a/lib/plugins/authmysql/lang/de/lang.php b/lib/plugins/authmysql/lang/de/lang.php index 819b98458..c5c3c657a 100644 --- a/lib/plugins/authmysql/lang/de/lang.php +++ b/lib/plugins/authmysql/lang/de/lang.php @@ -5,7 +5,9 @@ * * @author Noel Tilliot * @author Hendrik Diel + * @author Philip Knack */ +$lang['connectfail'] = 'Verbindung zur Datenbank fehlgeschlagen.'; $lang['userexists'] = 'Entschuldigung, aber dieser Benutzername ist bereits vergeben.'; $lang['usernotexists'] = 'Sorry, dieser Nutzer existiert nicht.'; $lang['writefail'] = 'Die Benutzerdaten konnten nicht geändert werden. Bitte wenden Sie sich an den Wiki-Admin.'; diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php index 55a317309..53fbf25d5 100644 --- a/lib/plugins/extension/lang/de/lang.php +++ b/lib/plugins/extension/lang/de/lang.php @@ -2,13 +2,14 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author H. Richard * @author Joerg * @author Simon * @author Hoisl * @author Dominik Mahr * @author Noel Tilliot + * @author Philip Knack */ $lang['menu'] = 'Erweiterungen verwalten'; $lang['tab_plugins'] = 'Installierte Plugins'; @@ -33,6 +34,7 @@ $lang['js']['reallydel'] = 'Wollen Sie diese Erweiterung wirklich löschen $lang['js']['display_viewoptions'] = 'Optionen anzeigen'; $lang['js']['display_enabled'] = 'aktiviert'; $lang['js']['display_disabled'] = 'deaktiviert'; +$lang['js']['display_updatable'] = 'aktualisierbar'; $lang['search_for'] = 'Erweiterung suchen:'; $lang['search'] = 'Suchen'; $lang['extensionby'] = '%s von %s'; @@ -70,6 +72,7 @@ $lang['status_bundled'] = 'gebündelt'; $lang['msg_enabled'] = 'Plugin %s ist aktiviert'; $lang['msg_disabled'] = 'Erweiterung %s ist deaktiviert'; $lang['msg_delete_success'] = 'Erweiterung %s wurde entfernt'; +$lang['msg_delete_failed'] = 'Deinstallation der Erweiterung %s fehlgeschlagen'; $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'; -- cgit v1.2.3 From 519c232c1701947a305d8bec09812c77d8e2aad4 Mon Sep 17 00:00:00 2001 From: Philip Knack Date: Wed, 22 Jul 2015 15:01:38 +0200 Subject: translation update --- lib/plugins/extension/lang/de/lang.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php index 53fbf25d5..a47c9360f 100644 --- a/lib/plugins/extension/lang/de/lang.php +++ b/lib/plugins/extension/lang/de/lang.php @@ -94,6 +94,8 @@ $lang['noperms'] = 'Das Erweiterungs-Verzeichnis ist schreibgesch $lang['notplperms'] = 'Das Template-Verzeichnis ist schreibgeschützt'; $lang['nopluginperms'] = 'Das Plugin-Verzeichnis ist schreibgeschützt'; $lang['git'] = 'Diese Erweiterung wurde über git installiert und sollte daher nicht hier aktualisiert werden.'; +$lang['auth'] = 'Dieses Auth Plugin ist in der Konfiguration nicht aktiviert, Sie sollten es deaktivieren.'; $lang['install_url'] = 'Von Webadresse (URL) installieren'; $lang['install_upload'] = 'Erweiterung hochladen:'; $lang['repo_error'] = 'Es konnte keine Verbindung zum Plugin-Verzeichnis hergestellt werden. Stellen sie sicher das der Server Verbindung mit www.dokuwiki.org aufnehmen darf und überprüfen sie ihre Proxy Einstellungen.'; +$lang['nossl'] = 'Ihr PHP scheint SSL nicht zu unterstützen. Das Herunterladen vieler DokuWiki Erweiterungen wird scheitern.'; -- cgit v1.2.3 From 1dd04f9774f268918c142128043ff8696ea41b42 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 24 Jul 2015 09:46:42 +0200 Subject: fixed styling preview in IE IE doesn't like it when you create a DOM element in one window and try to insert it in another window. --- lib/plugins/styling/script.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index f2d550b21..2f4285269 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -5,7 +5,7 @@ jQuery(function () { /** * Function to reload the preview styles in the main window * - * @param {window} target the main window + * @param {Window} target the main window */ function applyPreview(target) { // remove style @@ -13,9 +13,9 @@ jQuery(function () { $style.attr('href', ''); // append the loader screen - $loader = target.jQuery('#plugin__styling_loader'); + var $loader = target.jQuery('#plugin__styling_loader'); if (!$loader.length) { - $loader = jQuery('
' + LANG.plugins.styling.loader + '
'); + $loader = target.jQuery('
' + LANG.plugins.styling.loader + '
'); $loader.css({ 'position': 'absolute', 'width': '100%', @@ -68,6 +68,7 @@ jQuery(function () { var windowFeatures = "menubar=no,location=no,resizable=yes,scrollbars=yes,status=false,width=500,height=500"; window.open(DOKU_BASE + 'lib/plugins/styling/popup.php', 'styling_popup', windowFeatures); e.preventDefault(); + e.stopPropagation(); }).wrap('

'); return; // we exit here if this is not the popup } -- cgit v1.2.3 From 345e401d3852cc9c7382a5f2aa888233b9fe0d10 Mon Sep 17 00:00:00 2001 From: trebmuh Date: Sat, 25 Jul 2015 01:16:25 +0200 Subject: Update lang.php Please someone who know the code, double check this one. It does look that translation for 2 options were missing. --- lib/plugins/config/lang/fr/lang.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php index e92144b22..75dc4f177 100644 --- a/lib/plugins/config/lang/fr/lang.php +++ b/lib/plugins/config/lang/fr/lang.php @@ -94,7 +94,9 @@ $lang['disableactions'] = 'Actions à désactiver dans DokuWiki'; $lang['disableactions_check'] = 'Vérifier'; $lang['disableactions_subscription'] = 'Abonnement aux pages'; $lang['disableactions_wikicode'] = 'Afficher le texte source'; +$lang['disableactions_profile_delete'] = 'Supprimer votre propre compte'; $lang['disableactions_other'] = 'Autres actions (séparées par des virgules)'; +$lang['disableactions_rss'] = 'Syndication XML (RSS)'; $lang['auth_security_timeout'] = 'Délai d\'expiration de sécurité (secondes)'; $lang['securecookie'] = 'Les cookies définis via HTTPS doivent-ils n\'être envoyé par le navigateur que via HTTPS ? Désactivez cette option lorsque seule la connexion à votre wiki est sécurisée avec SSL et que la navigation sur le wiki est effectuée de manière non sécurisée.'; $lang['remote'] = 'Active l\'API système distante. Ceci permet à d\'autres applications d\'accéder au wiki via XML-RPC ou d\'autres mécanismes.'; -- cgit v1.2.3 From 17a19868b701d17ba03918eb7f8a2eacc603a84f Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 25 Jul 2015 22:32:15 +0100 Subject: remove IE7 support --- lib/plugins/acl/style.css | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/style.css b/lib/plugins/acl/style.css index a53a03450..4233cd30b 100644 --- a/lib/plugins/acl/style.css +++ b/lib/plugins/acl/style.css @@ -81,7 +81,6 @@ [dir=rtl] #acl_manager .aclgroup { background: transparent url(pix/group.png) right 1px no-repeat; padding: 1px 18px 1px 0px; - display: inline-block; /* needed for IE7 */ } #acl_manager .acluser { @@ -91,7 +90,6 @@ [dir=rtl] #acl_manager .acluser { background: transparent url(pix/user.png) right 1px no-repeat; padding: 1px 18px 1px 0px; - display: inline-block; /* needed for IE7 */ } #acl_manager .aclpage { @@ -101,7 +99,6 @@ [dir=rtl] #acl_manager .aclpage { background: transparent url(pix/page.png) right 1px no-repeat; padding: 1px 18px 1px 0px; - display: inline-block; /* needed for IE7 */ } #acl_manager .aclns { @@ -111,7 +108,6 @@ [dir=rtl] #acl_manager .aclns { background: transparent url(pix/ns.png) right 1px no-repeat; padding: 1px 18px 1px 0px; - display: inline-block; /* needed for IE7 */ } #acl_manager label.disabled { -- cgit v1.2.3 From cf2c8e759bf06596f9492d090f4dd8dbb76a178c Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 25 Jul 2015 22:58:51 +0100 Subject: changed input submits to buttons, fixed small RTL issue --- lib/plugins/styling/admin.php | 10 +++++----- lib/plugins/styling/lang/en/lang.php | 2 +- lib/plugins/styling/script.js | 2 +- lib/plugins/styling/style.less | 6 +++++- 4 files changed, 12 insertions(+), 8 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/admin.php b/lib/plugins/styling/admin.php index c6c04bb52..c747c3130 100644 --- a/lib/plugins/styling/admin.php +++ b/lib/plugins/styling/admin.php @@ -83,22 +83,22 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { echo ''; echo ''; - echo 'colorClass($key).' />'; + echo 'colorClass($key).' dir="ltr" />'; echo ''; } echo ''; echo '

'; - echo ' '; - echo ''; #FIXME only if preview.ini exists + echo ' '; + echo ''; #FIXME only if preview.ini exists echo '

'; echo '

'; - echo ''; + echo ''; echo '

'; echo '

'; - echo ''; #FIXME only if local.ini exists + echo ''; #FIXME only if local.ini exists echo '

'; echo ''; diff --git a/lib/plugins/styling/lang/en/lang.php b/lib/plugins/styling/lang/en/lang.php index 010743956..e0011eb83 100644 --- a/lib/plugins/styling/lang/en/lang.php +++ b/lib/plugins/styling/lang/en/lang.php @@ -17,7 +17,7 @@ $lang['error'] = 'Sorry, this template does not support this functionality.'; $lang['btn_preview'] = 'Preview changes'; $lang['btn_save'] = 'Save changes'; $lang['btn_reset'] = 'Reset current changes'; -$lang['btn_revert'] = 'Revert all styles back to the template\'s default'; +$lang['btn_revert'] = 'Revert styles back to template\'s default'; // default guaranteed placeholders $lang['__text__'] = 'Main text color'; diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index 2f4285269..aa343fd71 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -85,7 +85,7 @@ jQuery(function () { }; // don't reload on our own buttons - jQuery('input[type=submit]').click(function(e){ + jQuery(':button').click(function(e){ doreload = false; }); diff --git a/lib/plugins/styling/style.less b/lib/plugins/styling/style.less index 120768289..be0e16a5b 100644 --- a/lib/plugins/styling/style.less +++ b/lib/plugins/styling/style.less @@ -1,7 +1,11 @@ #plugin__styling { - input.primary { + button.primary { font-weight: bold; } + + [dir=rtl] & table input { + text-align: right; + } } #plugin__styling_loader { -- cgit v1.2.3 From ec2b4bab83a5eb6ddcdb41853d311b99b71c6f86 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 26 Jul 2015 11:43:02 +0200 Subject: fix problem with IE11 hopefully doesn't break in the other browsers --- lib/plugins/styling/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index aa343fd71..074c8dc40 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -35,7 +35,7 @@ jQuery(function () { } // load preview in main window (timeout works around chrome updating CSS weirdness) - target.setTimeout(function () { + setTimeout(function () { var now = new Date().getTime(); $style.attr('href', DOKU_BASE + 'lib/exe/css.php?preview=1&tseed=' + now); }, 500); -- cgit v1.2.3 From 2e206e75efe39d8e8d038606d2f4998d7a5e440a Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 26 Jul 2015 16:29:31 +0100 Subject: updated dates in various info.txt files --- lib/plugins/acl/plugin.info.txt | 2 +- lib/plugins/authad/plugin.info.txt | 2 +- lib/plugins/authldap/plugin.info.txt | 2 +- lib/plugins/authmysql/plugin.info.txt | 2 +- lib/plugins/authpgsql/plugin.info.txt | 2 +- lib/plugins/authplain/plugin.info.txt | 2 +- lib/plugins/config/plugin.info.txt | 2 +- lib/plugins/extension/plugin.info.txt | 2 +- lib/plugins/info/plugin.info.txt | 2 +- lib/plugins/popularity/plugin.info.txt | 2 +- lib/plugins/revert/plugin.info.txt | 2 +- lib/plugins/styling/plugin.info.txt | 2 +- lib/plugins/usermanager/plugin.info.txt | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/acl/plugin.info.txt b/lib/plugins/acl/plugin.info.txt index cb8fe7e8e..1b2c82cb3 100644 --- a/lib/plugins/acl/plugin.info.txt +++ b/lib/plugins/acl/plugin.info.txt @@ -1,7 +1,7 @@ base acl author Andreas Gohr email andi@splitbrain.org -date 2014-06-04 +date 2015-07-25 name ACL Manager desc Manage Page Access Control Lists url http://dokuwiki.org/plugin:acl diff --git a/lib/plugins/authad/plugin.info.txt b/lib/plugins/authad/plugin.info.txt index dc0629189..57e1387e9 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 2014-04-03 +date 2015-07-13 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/plugin.info.txt b/lib/plugins/authldap/plugin.info.txt index 964fbb994..e0c6144c3 100644 --- a/lib/plugins/authldap/plugin.info.txt +++ b/lib/plugins/authldap/plugin.info.txt @@ -1,7 +1,7 @@ base authldap author Andreas Gohr email andi@splitbrain.org -date 2014-05-18 +date 2015-07-13 name LDAP Auth Plugin desc Provides user authentication against an LDAP server url http://www.dokuwiki.org/plugin:authldap diff --git a/lib/plugins/authmysql/plugin.info.txt b/lib/plugins/authmysql/plugin.info.txt index fa00fccf4..1658d7aac 100644 --- a/lib/plugins/authmysql/plugin.info.txt +++ b/lib/plugins/authmysql/plugin.info.txt @@ -1,7 +1,7 @@ base authmysql author Andreas Gohr email andi@splitbrain.org -date 2014-02-15 +date 2015-07-13 name MYSQL Auth Plugin desc Provides user authentication against a MySQL database url http://www.dokuwiki.org/plugin:authmysql diff --git a/lib/plugins/authpgsql/plugin.info.txt b/lib/plugins/authpgsql/plugin.info.txt index 59b7d89a9..1d53ca0b1 100644 --- a/lib/plugins/authpgsql/plugin.info.txt +++ b/lib/plugins/authpgsql/plugin.info.txt @@ -1,7 +1,7 @@ base authpgsql author Andreas Gohr email andi@splitbrain.org -date 2014-02-15 +date 2015-07-13 name PostgreSQL Auth Plugin desc Provides user authentication against a PostgreSQL database url http://www.dokuwiki.org/plugin:authpgsql diff --git a/lib/plugins/authplain/plugin.info.txt b/lib/plugins/authplain/plugin.info.txt index 2659ac7ad..c09dbcb34 100644 --- a/lib/plugins/authplain/plugin.info.txt +++ b/lib/plugins/authplain/plugin.info.txt @@ -1,7 +1,7 @@ base authplain author Andreas Gohr email andi@splitbrain.org -date 2014-07-01 +date 2015-07-18 name Plain Auth Plugin desc Provides user authentication against DokuWiki's local password storage url http://www.dokuwiki.org/plugin:authplain diff --git a/lib/plugins/config/plugin.info.txt b/lib/plugins/config/plugin.info.txt index 9472346b9..ddd72657d 100644 --- a/lib/plugins/config/plugin.info.txt +++ b/lib/plugins/config/plugin.info.txt @@ -1,7 +1,7 @@ base config author Christopher Smith email chris@jalakai.co.uk -date 2014-03-18 +date 2015-07-18 name Configuration Manager desc Manage Dokuwiki's Configuration Settings url http://dokuwiki.org/plugin:config diff --git a/lib/plugins/extension/plugin.info.txt b/lib/plugins/extension/plugin.info.txt index ee9830628..7ee84dcc0 100644 --- a/lib/plugins/extension/plugin.info.txt +++ b/lib/plugins/extension/plugin.info.txt @@ -1,7 +1,7 @@ base extension author Michael Hamann email michael@content-space.de -date 2014-06-15 +date 2015-07-26 name Extension Manager desc Allows managing and installing plugins and templates url https://www.dokuwiki.org/plugin:extension diff --git a/lib/plugins/info/plugin.info.txt b/lib/plugins/info/plugin.info.txt index 7773a419d..3f05391f7 100644 --- a/lib/plugins/info/plugin.info.txt +++ b/lib/plugins/info/plugin.info.txt @@ -1,7 +1,7 @@ base info author Andreas Gohr email andi@splitbrain.org -date 2014-03-05 +date 2014-10-01 name Info Plugin desc Displays information about various DokuWiki internals url http://dokuwiki.org/plugin:info diff --git a/lib/plugins/popularity/plugin.info.txt b/lib/plugins/popularity/plugin.info.txt index eadfffaa0..8ffc136a1 100644 --- a/lib/plugins/popularity/plugin.info.txt +++ b/lib/plugins/popularity/plugin.info.txt @@ -1,7 +1,7 @@ base popularity author Andreas Gohr email andi@splitbrain.org -date 2013-10-14 +date 2015-07-15 name Popularity Feedback Plugin desc Send anonymous data about your wiki to the DokuWiki developers url http://www.dokuwiki.org/plugin:popularity diff --git a/lib/plugins/revert/plugin.info.txt b/lib/plugins/revert/plugin.info.txt index 8d107dc32..bba939d37 100644 --- a/lib/plugins/revert/plugin.info.txt +++ b/lib/plugins/revert/plugin.info.txt @@ -1,7 +1,7 @@ base revert author Andreas Gohr email andi@splitbrain.org -date 2013-11-21 +date 2015-07-15 name Revert Manager desc Allows you to mass revert recent edits to remove Spam or vandalism url http://dokuwiki.org/plugin:revert diff --git a/lib/plugins/styling/plugin.info.txt b/lib/plugins/styling/plugin.info.txt index cdf01ee6f..9f002e282 100644 --- a/lib/plugins/styling/plugin.info.txt +++ b/lib/plugins/styling/plugin.info.txt @@ -1,7 +1,7 @@ base styling author Andreas Gohr email andi@splitbrain.org -date 2015-05-16 +date 2015-07-26 name styling plugin desc Allows to edit style.ini replacements url https://www.dokuwiki.org/plugin:styling diff --git a/lib/plugins/usermanager/plugin.info.txt b/lib/plugins/usermanager/plugin.info.txt index ae4f9b9cc..607eca75f 100644 --- a/lib/plugins/usermanager/plugin.info.txt +++ b/lib/plugins/usermanager/plugin.info.txt @@ -1,7 +1,7 @@ base usermanager author Chris Smith email chris@jalakai.co.uk -date 2014-03-05 +date 2015-07-15 name User Manager desc Manage DokuWiki user accounts url http://dokuwiki.org/plugin:usermanager -- cgit v1.2.3 From b4150bdc2c461def4ea3a0e9a3ed38bbcf631084 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 26 Jul 2015 16:34:28 +0100 Subject: fixed wrong format string in authldap translation --- lib/plugins/authldap/lang/es/lang.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/authldap/lang/es/lang.php b/lib/plugins/authldap/lang/es/lang.php index e68a42603..64ea7b964 100644 --- a/lib/plugins/authldap/lang/es/lang.php +++ b/lib/plugins/authldap/lang/es/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Mauricio Segura */ -$lang['connectfail'] = 'LDAP no se puede conectar: %5'; +$lang['connectfail'] = 'LDAP no se puede conectar: %s'; -- cgit v1.2.3 From fcf2eb0eee7dc56b5ef5ef429b54a504ca229f41 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 26 Jul 2015 17:03:51 +0100 Subject: fixed missing bug icon in extension manager (since #1247) --- lib/plugins/extension/helper/list.php | 2 +- lib/plugins/extension/images/bug.gif | Bin 0 -> 194 bytes lib/plugins/extension/style.less | 5 +++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 lib/plugins/extension/images/bug.gif (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index bf099d308..6ca72f7ce 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -266,7 +266,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return = '