diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/emoticons/emoticons.php | 63 | ||||
-rw-r--r-- | plugins/managesieve/localization/fr_FR.inc | 2 | ||||
-rw-r--r-- | plugins/managesieve/localization/ru_RU.inc | 33 | ||||
-rw-r--r-- | plugins/new_user_dialog/localization/es_ES.inc | 4 | ||||
-rw-r--r-- | plugins/new_user_dialog/new_user_dialog.php | 1 | ||||
-rw-r--r-- | plugins/new_user_dialog/package.xml | 26 | ||||
-rw-r--r-- | plugins/password/config.inc.php.dist | 2 | ||||
-rw-r--r-- | plugins/password/drivers/chpasswd.php | 2 | ||||
-rw-r--r-- | plugins/password/drivers/ldap.php | 38 | ||||
-rw-r--r-- | plugins/password/drivers/ldap_simple.php | 35 | ||||
-rw-r--r-- | plugins/password/drivers/sql.php | 8 | ||||
-rw-r--r-- | plugins/password/package.xml | 4 |
12 files changed, 138 insertions, 80 deletions
diff --git a/plugins/emoticons/emoticons.php b/plugins/emoticons/emoticons.php index e929c9f9d..95f5ecf39 100644 --- a/plugins/emoticons/emoticons.php +++ b/plugins/emoticons/emoticons.php @@ -5,7 +5,7 @@ * * Sample plugin to replace emoticons in plain text message body with real icons * - * @version 1.2.0 + * @version 1.3 * @author Thomas Bruederli * @author Aleksander Machniak * @website http://roundcube.net @@ -35,38 +35,30 @@ class emoticons extends rcube_plugin // map of emoticon replacements $map = array( - '/:\)/' => html::img(array( - 'src' => './program/js/tiny_mce/plugins/emotions/img/smiley-smile.gif', - 'title' => ':)' - )), - '/:-\)/' => html::img(array( - 'src' => './program/js/tiny_mce/plugins/emotions/img/smiley-smile.gif', - 'title' => ':-)' - )), - '/(?<!mailto):D/' => html::img(array( - 'src' => './program/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif', - 'title' => ':D' - )), - '/:-D/' => html::img(array( - 'src' => './program/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif', - 'title' => ':-D' - )), - '/:\(/' => html::img(array( - 'src' => './program/js/tiny_mce/plugins/emotions/img/smiley-frown.gif', - 'title' => ':(' - )), - '/:-\(/' => html::img(array( - 'src' => './program/js/tiny_mce/plugins/emotions/img/smiley-frown.gif', - 'title' => ':-(' - )), - '/'.$entity.';\)/' => html::img(array( - 'src' => './program/js/tiny_mce/plugins/emotions/img/smiley-wink.gif', - 'title' => ';)' - )), - '/'.$entity.';-\)/' => html::img(array( - 'src' => './program/js/tiny_mce/plugins/emotions/img/smiley-wink.gif', - 'title' => ';-)' - )), + '/:\)/' => $this->img_tag('smiley-smile.gif', ':)' ), + '/:-\)/' => $this->img_tag('smiley-smile.gif', ':-)' ), + '/(?<!mailto):D/' => $this->img_tag('smiley-laughing.gif', ':D' ), + '/:-D/' => $this->img_tag('smiley-laughing.gif', ':-D' ), + '/:\(/' => $this->img_tag('smiley-frown.gif', ':(' ), + '/:-\(/' => $this->img_tag('smiley-frown.gif', ':-(' ), + '/'.$entity.';\)/' => $this->img_tag('smiley-wink.gif', ';)' ), + '/'.$entity.';-\)/' => $this->img_tag('smiley-wink.gif', ';-)' ), + '/8\)/' => $this->img_tag('smiley-cool.gif', '8)' ), + '/8-\)/' => $this->img_tag('smiley-cool.gif', '8-)' ), + '/(?<!mailto):O/i' => $this->img_tag('smiley-surprised.gif', ':O' ), + '/(?<!mailto):-O/i' => $this->img_tag('smiley-surprised.gif', ':-O' ), + '/(?<!mailto):P/i' => $this->img_tag('smiley-tongue-out.gif', ':P' ), + '/(?<!mailto):-P/i' => $this->img_tag('smiley-tongue-out.gif', ':-P' ), + '/(?<!mailto):@/i' => $this->img_tag('smiley-yell.gif', ':@' ), + '/(?<!mailto):-@/i' => $this->img_tag('smiley-yell.gif', ':-@' ), + '/O:\)/i' => $this->img_tag('smiley-innocent.gif', 'O:)' ), + '/O:-\)/i' => $this->img_tag('smiley-innocent.gif', 'O:-)' ), + '/(?<!mailto):$/' => $this->img_tag('smiley-embarassed.gif', ':$' ), + '/(?<!mailto):-$/' => $this->img_tag('smiley-embarassed.gif', ':-$' ), + '/(?<!mailto):\*/i' => $this->img_tag('smiley-kiss.gif', ':*' ), + '/(?<!mailto):-\*/i' => $this->img_tag('smiley-kiss.gif', ':-*' ), + '/(?<!mailto):S/i' => $this->img_tag('smiley-undecided.gif', ':S' ), + '/(?<!mailto):-S/i' => $this->img_tag('smiley-undecided.gif', ':-S' ), ); if ($args['type'] == 'plain') { @@ -77,4 +69,9 @@ class emoticons extends rcube_plugin return $args; } + private function img_tag($ico, $title) + { + $path = './program/js/tiny_mce/plugins/emotions/img/'; + return html::img(array('src' => $path.$ico, 'title' => $title)); + } } diff --git a/plugins/managesieve/localization/fr_FR.inc b/plugins/managesieve/localization/fr_FR.inc index e7d09945a..0b494f041 100644 --- a/plugins/managesieve/localization/fr_FR.inc +++ b/plugins/managesieve/localization/fr_FR.inc @@ -26,6 +26,8 @@ $labels['messageredirect'] = 'Transférer le message à'; $labels['messagereply'] = 'Répondre avec le message'; $labels['messagedelete'] = 'Supprimer le message'; $labels['messagediscard'] = 'Rejeter avec le message'; +$labels['messagecopyto'] = 'Copier le message vers'; +$labels['messagesendcopy'] = 'Envoyer une copie du message à'; $labels['messagesrules'] = 'Pour les mails entrants:'; $labels['messagesactions'] = '...exécuter les actions suivantes:'; $labels['add'] = 'Ajouter'; diff --git a/plugins/managesieve/localization/ru_RU.inc b/plugins/managesieve/localization/ru_RU.inc index 95f302818..d485f0ed3 100644 --- a/plugins/managesieve/localization/ru_RU.inc +++ b/plugins/managesieve/localization/ru_RU.inc @@ -1,4 +1,22 @@ <?php +/* + ++-----------------------------------------------------------------------+ +| plugins/managesieve/localization/ru_RU.inc | +| | +| Russian translation for roundcube/managesieve plugin | +| Copyright (C) 2008-2010 | +| Licensed under the GNU GPL | +| | ++-----------------------------------------------------------------------+ +| Author: | +| Updates: Sergey Dukachev <iam@dukess.ru> | ++-----------------------------------------------------------------------+ + +@version 2010-10-11 + +*/ + $labels['filters'] = 'Фильтры'; $labels['managefilters'] = 'Управление фильтрами для входящей почты'; $labels['filtername'] = 'Название фильтра'; @@ -21,7 +39,9 @@ $labels['filterover'] = 'на'; $labels['addrule'] = 'Добавить правило'; $labels['delrule'] = 'Удалить правило'; $labels['messagemoveto'] = 'Переместить сообщение в'; -$labels['messageredirect'] = 'Перенаправить сообщение на '; +$labels['messageredirect'] = 'Перенаправить сообщение на'; +$labels['messagecopyto'] = 'Скопировать сообщение в'; +$labels['messagesendcopy'] = 'Отправить копию сообщения на'; $labels['messagereply'] = 'Ответить с сообщением'; $labels['messagedelete'] = 'Удалить сообщение'; $labels['messagediscard'] = 'Отбросить с сообщением'; @@ -38,12 +58,13 @@ $labels['rulestop'] = 'Закончить выполнение'; $labels['filterset'] = 'Набор фильтров'; $labels['filtersetadd'] = 'Добавить набор фильтров'; $labels['filtersetdel'] = 'Удалить текущий набор фильтров'; -$labels['filtersetact'] = 'Активировать текущий набор фильтров'; +$labels['filtersetact'] = 'Включить текущий набор фильтров'; +$labels['filtersetdeact'] = 'Отключить текущий набор фильтров'; $labels['filtersetget'] = 'Скачать набор фильтров в виде текста'; $labels['filterdef'] = 'Описание фильтра'; $labels['filtersetname'] = 'Название набора фильтров'; $labels['newfilterset'] = 'Новый набор фильтров'; -$labels['active'] = 'активный'; +$labels['active'] = 'используется'; $labels['none'] = 'пустой'; $labels['fromset'] = 'из набора'; $labels['fromfile'] = 'из файла'; @@ -61,9 +82,11 @@ $messages['ruledeleteconfirm'] = 'Вы уверенны, что хотите у $messages['actiondeleteconfirm'] = 'Вы уверенны, что хотите удалить это действие?'; $messages['forbiddenchars'] = 'Недопустимые символы в поле'; $messages['cannotbeempty'] = 'Поле не может быть пустым'; -$messages['setactivateerror'] = 'Невозможно активировать выбранный набор фильтров. Ошибка сервера'; +$messages['setactivateerror'] = 'Невозможно включить выбранный набор фильтров. Ошибка сервера'; +$messages['setdeactivateerror'] = 'Невозможно отключить выбранный набор фильтров. Ошибка сервера'; $messages['setdeleteerror'] = 'Невозможно удалить выбранный набор фильтров. Ошибка сервера'; -$messages['setactivated'] = 'Набор фильтров успешно активирован'; +$messages['setactivated'] = 'Набор фильтров успешно включён'; +$messages['setdeactivated'] = 'Набор фильтров успешно отключён'; $messages['setdeleted'] = 'Набор фильтров успешно удалён'; $messages['setdeleteconfirm'] = 'Вы уверены в том, что хотите удалить выбранный набор фильтров?'; $messages['setcreateerror'] = 'Невозможно создать набор фильтров. Ошибка сервера'; diff --git a/plugins/new_user_dialog/localization/es_ES.inc b/plugins/new_user_dialog/localization/es_ES.inc index 73f47f25a..2d2ccfe0a 100644 --- a/plugins/new_user_dialog/localization/es_ES.inc +++ b/plugins/new_user_dialog/localization/es_ES.inc @@ -1,7 +1,7 @@ <?php $labels = array(); -$labels['identitydialogtitle'] = 'Por favor completa tus datos'; -$labels['identitydialoghint'] = 'Este diálogo sólo aparece la primera vez que te conectas.'; +$labels['identitydialogtitle'] = 'Por favor, complete sus datos personales'; +$labels['identitydialoghint'] = 'Este diálogo sólo aparecerá la primera vez que se conecte al correo.'; ?> diff --git a/plugins/new_user_dialog/new_user_dialog.php b/plugins/new_user_dialog/new_user_dialog.php index 9b773be65..96cd0da23 100644 --- a/plugins/new_user_dialog/new_user_dialog.php +++ b/plugins/new_user_dialog/new_user_dialog.php @@ -85,6 +85,7 @@ class new_user_dialog extends rcube_plugin "$(document).ready(function () { rcmail.message_list.key_press = function(){}; rcmail.message_list.key_down = function(){}; + $('input[name=_name]').focus(); });", 'foot'); $this->include_stylesheet('newuserdialog.css'); diff --git a/plugins/new_user_dialog/package.xml b/plugins/new_user_dialog/package.xml index 7caa87ca4..198a9fadb 100644 --- a/plugins/new_user_dialog/package.xml +++ b/plugins/new_user_dialog/package.xml @@ -13,10 +13,10 @@ <email>roundcube@gmail.com</email> <active>yes</active> </lead> - <date>2010-05-27</date> + <date>2010-12-02</date> <time>12:00:00</time> <version> - <release>1.2</release> + <release>1.3</release> <api>1.0</api> </version> <stability> @@ -25,8 +25,8 @@ </stability> <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> <notes> -- Add overlay box only to mail task main template -- Fix possible error on form submission (#1486103) +- Added setting of focus on name input +- Added gl_ES translation </notes> <contents> <dir baseinstalldir="/" name="/"> @@ -45,6 +45,7 @@ <file name="de_DE.inc" role="data" /> <file name="es_ES.inc" role="data" /> <file name="et_EE.inc" role="data" /> + <file name="gl_ES.inc" role="data" /> <file name="it_IT.inc" role="data" /> <file name="ja_JP.inc" role="data" /> <file name="nl_NL.inc" role="data" /> @@ -101,5 +102,22 @@ - Fix space bar and backspace buttons not working (#1486726) </notes> </release> + <release> + <date>2010-05-27</date> + <time>12:00:00</time> + <version> + <release>1.2</release> + <api>1.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> + <notes> +- Add overlay box only to mail task main template +- Fix possible error on form submission (#1486103) + </notes> + </release> </changelog> </package> diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist index b412663ba..10a659d32 100644 --- a/plugins/password/config.inc.php.dist +++ b/plugins/password/config.inc.php.dist @@ -127,6 +127,7 @@ $rcmail_config['password_ldap_adminPW'] = null; // '%login' will be replaced by the current roundcube user's login // '%name' will be replaced by the current roundcube user's name part // '%domain' will be replaced by the current roundcube user's domain part +// '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com" // Exemple: 'uid=%login,ou=people,dc=exemple,dc=com' $rcmail_config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com'; @@ -164,6 +165,7 @@ $rcmail_config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com'; // '%login' will be replaced by the current roundcube user's login // '%name' will be replaced by the current roundcube user's name part // '%domain' will be replaced by the current roundcube user's domain part +// '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com" // Example: '(uid=%login)' // Example: '(&(objectClass=posixAccount)(uid=%login))' $rcmail_config['password_ldap_search_filter'] = '(uid=%login)'; diff --git a/plugins/password/drivers/chpasswd.php b/plugins/password/drivers/chpasswd.php index 8450af154..28c3e5d7a 100644 --- a/plugins/password/drivers/chpasswd.php +++ b/plugins/password/drivers/chpasswd.php @@ -18,7 +18,7 @@ function password_save($currpass, $newpass) $username = $_SESSION['username']; $handle = popen($cmd, "w"); - fwrite($handle, "$username:$newpass"); + fwrite($handle, "$username:$newpass\n"); if (pclose($handle) == 0) { return PASSWORD_SUCCESS; diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php index c5cb2328a..98b6636be 100644 --- a/plugins/password/drivers/ldap.php +++ b/plugins/password/drivers/ldap.php @@ -18,18 +18,18 @@ function password_save($curpass, $passwd) { $rcmail = rcmail::get_instance(); require_once ('Net/LDAP2.php'); - + // Building user DN if ($userDN = $rcmail->config->get('password_ldap_userDN_mask')) { $userDN = substitute_vars($userDN); } else { $userDN = search_userdn($rcmail); } - + if (empty($userDN)) { return PASSWORD_CONNECT_ERROR; } - + // Connection Method switch($rcmail->config->get('password_ldap_method')) { case 'admin': @@ -42,7 +42,7 @@ function password_save($curpass, $passwd) $bindpw = $curpass; break; } - + // Configuration array $ldapConfig = array ( 'binddn' => $binddn, @@ -53,27 +53,27 @@ function password_save($curpass, $passwd) 'starttls' => $rcmail->config->get('password_ldap_starttls'), 'version' => $rcmail->config->get('password_ldap_version'), ); - + // Connecting using the configuration array $ldap = Net_LDAP2::connect($ldapConfig); - + // Checking for connection error if (PEAR::isError($ldap)) { return PASSWORD_CONNECT_ERROR; } - + // Crypting new password $newCryptedPassword = hashPassword($passwd, $rcmail->config->get('password_ldap_encodage')); if (!$newCryptedPassword) { return PASSWORD_CRYPT_ERROR; } - + // Writing new crypted password to LDAP $userEntry = $ldap->getEntry($userDN); if (Net_LDAP2::isError($userEntry)) { return PASSWORD_CONNECT_ERROR; } - + $pwattr = $rcmail->config->get('password_ldap_pwattr'); $force = $rcmail->config->get('password_ldap_force_replace'); @@ -132,25 +132,30 @@ function search_userdn($rcmail) if (PEAR::isError($result) || ($result->count() != 1)) { return ''; } - + return $result->current()->dn(); } /** - * Substitute %login, %name and %domain in $str. + * Substitute %login, %name, %domain, %dc in $str. * See plugin config for details. */ function substitute_vars($str) { $rcmail = rcmail::get_instance(); + $domain = $rcmail->user->get_username('domain'); + $dc = 'dc='.strtr($domain, array('.' => ',dc=')); // hierarchal domain string + $str = str_replace(array( '%login', '%name', '%domain', + '%dc', ), array( $_SESSION['username'], $rcmail->user->get_username('local'), - $rcmail->user->get_username('domain'), + $domain, + $dc, ), $str ); @@ -178,7 +183,7 @@ function hashPassword( $passwordClear, $encodageType ) case 'crypt': $cryptedPassword = '{CRYPT}' . crypt($passwordClear,randomSalt(2)); break; - + case 'ext_des': // extended des crypt. see OpenBSD crypt man page. if ( ! defined( 'CRYPT_EXT_DES' ) || CRYPT_EXT_DES == 0 ) { @@ -263,8 +268,7 @@ function hashPassword( $passwordClear, $encodageType ) * @param int $length The length of the salt string to generate. * @return string The generated salt string. */ - -function randomSalt( $length ) +function randomSalt( $length ) { $possible = '0123456789'. 'abcdefghijklmnopqrstuvwxyz'. @@ -273,8 +277,8 @@ function randomSalt( $length ) $str = ''; // mt_srand((double)microtime() * 1000000); - while( strlen( $str ) < $length ) - $str .= substr( $possible, ( rand() % strlen( $possible ) ), 1 ); + while (strlen($str) < $length) + $str .= substr($possible, (rand() % strlen($possible)), 1); return $str; } diff --git a/plugins/password/drivers/ldap_simple.php b/plugins/password/drivers/ldap_simple.php index 541afa96b..38db9f129 100644 --- a/plugins/password/drivers/ldap_simple.php +++ b/plugins/password/drivers/ldap_simple.php @@ -20,7 +20,7 @@ function password_save($curpass, $passwd) return PASSWORD_CONNECT_ERROR; } - /* Set protocol version */ + /* Set protocol version */ if (!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, $rcmail->config->get('password_ldap_version'))) { ldap_unbind($ds); return PASSWORD_CONNECT_ERROR; @@ -40,12 +40,12 @@ function password_save($curpass, $passwd) } else { $user_dn = ldap_simple_search_userdn($rcmail, $ds); } - + if (empty($user_dn)) { ldap_unbind($ds); return PASSWORD_CONNECT_ERROR; } - + /* Connection method */ switch ($rcmail->config->get('password_ldap_method')) { case 'admin': @@ -64,27 +64,27 @@ function password_save($curpass, $passwd) ldap_unbind($ds); return PASSWORD_CONNECT_ERROR; } - + /* Crypting new password */ $passwd = ldap_simple_hash_password($passwd, $rcmail->config->get('password_ldap_encodage')); if (!$passwd) { ldap_unbind($ds); return PASSWORD_CRYPT_ERROR; } - + $entree[$rcmail->config->get('password_ldap_pwattr')] = $passwd; /* Updating PasswordLastChange Attribute if desired */ if ($lchattr = $rcmail->config->get('password_ldap_lchattr')) { - $entree[$lchattr] = (int)(time() / 86400) + $entree[$lchattr] = (int)(time() / 86400); } - + if (!ldap_modify($ds, $user_dn, $entree)) { ldap_unbind($ds); return PASSWORD_CONNECT_ERROR; } - + /* All done, no error */ ldap_unbind($ds); return PASSWORD_SUCCESS; @@ -101,34 +101,37 @@ function ldap_simple_search_userdn($rcmail, $ds) if (!ldap_bind($ds, $rcmail->config->get('password_ldap_searchDN'), $rcmail->config->get('password_ldap_searchPW'))) { return false; } - + /* Search for the DN */ if (!$sr = ldap_search($ds, $rcmail->config->get('password_ldap_search_base'), ldap_simple_substitute_vars($rcmail->config->get('password_ldap_search_filter')))) { return false; } - + /* If no or more entries were found, return false */ if (ldap_count_entries($ds, $sr) != 1) { return false; } - + return ldap_get_dn($ds, ldap_first_entry($ds, $sr)); } /** - * Substitute %login, %name and %domain in $str + * Substitute %login, %name, %domain, %dc in $str * See plugin config for details */ function ldap_simple_substitute_vars($str) { $str = str_replace('%login', $_SESSION['username'], $str); $str = str_replace('%l', $_SESSION['username'], $str); - + $parts = explode('@', $_SESSION['username']); + if (count($parts) == 2) { + $dc = 'dc='.strtr($parts[1], array('.' => ',dc=')); // hierarchal domain string + $str = str_replace('%name', $parts[0], $str); - $str = str_replace('%n', $parts[0], $str); - + $str = str_replace('%n', $parts[0], $str); + $str = str_replace('%dc', $dc, $str); $str = str_replace('%domain', $parts[1], $str); $str = str_replace('%d', $parts[1], $str); } @@ -228,6 +231,6 @@ function ldap_simple_random_salt($length) while (strlen($str) < $length) { $str .= substr($possible, (rand() % strlen($possible)), 1); } - + return $str; } diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php index 70e564396..33469ec62 100644 --- a/plugins/password/drivers/sql.php +++ b/plugins/password/drivers/sql.php @@ -33,7 +33,7 @@ function password_save($curpass, $passwd) if ($err = $db->is_error()) return PASSWORD_ERROR; - + // crypted password if (strpos($sql, '%c') !== FALSE) { $salt = ''; @@ -56,7 +56,11 @@ function password_save($curpass, $passwd) $dovecotpw = 'dovecotpw'; if (!($method = $rcmail->config->get('password_dovecotpw_method'))) $method = 'CRAM-MD5'; - $tmpfile = tempnam('/tmp', 'roundcube-'); + + // use common temp dir + $tmp_dir = $rcmail->config->get('temp_dir'); + $tmpfile = tempnam($tmp_dir, 'roundcube-'); + $pipe = popen("'$dovecotpw' -s '$method' > '$tmpfile'", "w"); if (!$pipe) { unlink($tmpfile); diff --git a/plugins/password/package.xml b/plugins/password/package.xml index 1fe49fb74..381783b97 100644 --- a/plugins/password/package.xml +++ b/plugins/password/package.xml @@ -29,6 +29,10 @@ <notes> - hMail driver: add username_domain detection (#1487100) - hMail driver: HTML tags in logged messages should be stripped off (#1487099) +- Chpasswd driver: add newline at end of input to chpasswd binary (#1487141) +- Fix usage of configured temp_dir instead of /tmp (#1487447) +- ldap_simple driver: fix parse error +- ldap/ldap_simple drivers: support %dc variable in config </notes> <contents> <dir baseinstalldir="/" name="/"> |