check for aes/AES, language/theme selector logic

This commit is contained in:
oheil 2022-08-25 13:04:07 +02:00
parent 1640d6ee4a
commit 8f14897979
22 changed files with 146 additions and 79 deletions

View file

@ -13,7 +13,7 @@
*
* @package NOCC
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: action.php 2974 2021-12-14 13:19:30Z oheil $
* @version SVN: $Id: action.php 3016 2022-08-25 11:00:42Z oheil $
*/
require_once './common.php';
@ -506,9 +506,15 @@ switch($action) {
if (isset($_REQUEST['lang']))
$user_prefs->lang = $_REQUEST['lang'];
if (isset($_REQUEST['theme'])) {
if( isset($_REQUEST['theme']) ) {
$user_prefs->theme = $_REQUEST['theme'];
$_SESSION['nocc_theme'] = $_REQUEST['theme'];
if( $_REQUEST['theme']=="default" ) {
$_SESSION['nocc_theme'] = $conf->default_theme;
}
else {
$_SESSION['nocc_theme'] = $_REQUEST['theme'];
}
}
if ($conf->prefs_dir) {

View file

@ -10,7 +10,7 @@
*
* @package NOCC
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: nocc_languages.php 2373 2011-01-04 15:06:58Z gerundt $
* @version SVN: $Id: nocc_languages.php 3016 2022-08-25 11:00:42Z oheil $
*/
/**
@ -56,6 +56,7 @@ class NOCC_Languages {
$path .= '/';
}
$this->_languages["default"]=convertLang2Html($html_default);
//TODO: Move some code to a NOCC_Directory class?
if ($handle = opendir($path)) { //if can open the directory...
while (false !== ($name = readdir($handle))) { //for each item...

View file

@ -10,7 +10,7 @@
*
* @package NOCC
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: nocc_themes.php 2580 2013-08-19 21:57:33Z gerundt $
* @version SVN: $Id: nocc_themes.php 3016 2022-08-25 11:00:42Z oheil $
*/
/**
@ -47,7 +47,7 @@ class NOCC_Themes {
*/
public function __construct($path, $defaultThemeName = '') {
$this->_themes = array();
$this->_defaultThemeName = 'standard';
$this->_defaultThemeName = 'default';
$this->_selectedThemeName = '';
if (isset($path) && is_string($path) && !empty($path)) { //if path is set...
@ -149,4 +149,4 @@ class NOCC_Themes {
}
return false;
}
}
}

View file

@ -11,7 +11,7 @@
*
* @package NOCC
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: common.php 2981 2021-12-22 08:53:00Z oheil $
* @version SVN: $Id: common.php 3016 2022-08-25 11:00:42Z oheil $
*/
define('NOCC_DEBUG_LEVEL', 0);
@ -132,19 +132,29 @@ $languages = new NOCC_Languages('./lang/', $conf->default_lang);
//TODO: Check $_REQUEST['lang'] also when force_default_lang?
if (isset($_REQUEST['lang'])) { //if a language is requested...
if ($languages->setSelectedLangId($_REQUEST['lang'])) { //if the language exists...
if( $languages->setSelectedLangId($_REQUEST['lang']) || $_REQUEST['lang']=="default" ) { //if the language exists...
$_SESSION['nocc_lang'] = $languages->getSelectedLangId();
}
}
if (isset($_SESSION['nocc_lang'])) { //if session language already set...
if( isset($_SESSION['nocc_lang']) && $_SESSION['nocc_lang']!="default" ) { //if session language already set...
$languages->setSelectedLangId($_SESSION['nocc_lang']);
}
else { //if session language NOT already set...
if (!isset($conf->force_default_lang) || !$conf->force_default_lang) { //if NOT force default language...
$languages->detectFromBrowser();
}
$_SESSION['nocc_lang'] = $languages->getSelectedLangId();
else {
if( isset($conf->default_lang) ) {
$languages->setSelectedLangId($conf->default_lang);
}
else {
$languages->setSelectedLangId('en');
}
}
if( $_SESSION['nocc_lang']!="default" ) {
$_SESSION['nocc_lang'] = $languages->getSelectedLangId();
}
}
$lang = $languages->getSelectedLangId();
@ -161,17 +171,20 @@ if ($lang != 'en') { //if NOT English...
//--------------------------------------------------------------------------------
// Set the theme...
//--------------------------------------------------------------------------------
$themes = new NOCC_Themes('./themes/', $conf->default_theme);
//TODO: Check $_REQUEST['theme'] also when NOT use_theme?
if (isset($_REQUEST['theme'])) { //if a theme is requested...
if ($themes->setSelectedThemeName($_REQUEST['theme'])) { //if the theme exists...
if( isset($_REQUEST['theme']) && isset($conf->use_theme) && $conf->use_theme ) {
if( $themes->setSelectedThemeName($_REQUEST['theme']) ) { //if the theme exists...
$_SESSION['nocc_theme'] = $themes->getSelectedThemeName();
}
}
if (!isset($_SESSION['nocc_theme'])) { //if session theme NOT already set...
$_SESSION['nocc_theme'] = $themes->getDefaultThemeName();
$default_theme_set=false;
if( !isset($_SESSION['nocc_theme']) ) { //if session theme NOT already set...
$_SESSION['nocc_theme'] = $themes->getDefaultThemeName();
$default_theme_set=true;
}
//--------------------------------------------------------------------------------
@ -333,19 +346,20 @@ if (isset($_SESSION['nocc_user']) && isset($_SESSION['nocc_domain'])) {
//--------------------------------------------------------------------------------
// Set and load the user prefs language...
//--------------------------------------------------------------------------------
//TODO: Move to normal language loading!
if (isset($user_prefs->lang) && $user_prefs->lang != '') {
$userLang = $languages->getSelectedLangId();
if ($languages->setSelectedLangId($user_prefs->lang)) { //if the language exists...
$userLang = $languages->getSelectedLangId();
if (($userLang != 'en') && ($userLang != $lang)) { //if NOT English AND current language...
$_SESSION['nocc_lang'] = $languages->getSelectedLangId();
$lang = $languages->getSelectedLangId();
if( !isset($_SESSION['nocc_lang']) || (isset($_SESSION['nocc_lang']) && $_SESSION['nocc_lang']=='default') ) {
if( isset($user_prefs->lang) && $user_prefs->lang != '' && $user_prefs->lang != 'default' ) {
$userLang = $languages->getSelectedLangId();
if ($languages->setSelectedLangId($user_prefs->lang)) { //if the language exists...
$userLang = $languages->getSelectedLangId();
if (($userLang != 'en') && ($userLang != $lang)) { //if NOT English AND current language...
$_SESSION['nocc_lang'] = $languages->getSelectedLangId();
$lang = $languages->getSelectedLangId();
require './lang/'. $lang . '.php';
}
}
unset($userLang);
require './lang/'. $lang . '.php';
}
}
unset($userLang);
}
}
unset($languages);
//--------------------------------------------------------------------------------
@ -353,13 +367,14 @@ if (isset($_SESSION['nocc_user']) && isset($_SESSION['nocc_domain'])) {
//--------------------------------------------------------------------------------
// Set the user prefs theme...
//--------------------------------------------------------------------------------
//TODO: Move to normal theme loading!
if (isset($conf->use_theme) && ($conf->use_theme == true)) { //if allow theme changing...
if (isset($user_prefs->theme) && $user_prefs->theme != '') {
if ($themes->setSelectedThemeName($user_prefs->theme)) { //if the theme exists...
$_SESSION['nocc_theme'] = $themes->getSelectedThemeName();
}
}
if( $default_theme_set || !isset($_SESSION['nocc_theme']) || (isset($_SESSION['nocc_theme']) && $_SESSION['nocc_theme']=='default') ) {
if (isset($conf->use_theme) && ($conf->use_theme == true)) { //if allow theme changing...
if( isset($user_prefs->theme) && $user_prefs->theme != '' && $user_prefs->theme != 'default' ) {
if ($themes->setSelectedThemeName($user_prefs->theme)) { //if the theme exists...
$_SESSION['nocc_theme'] = $themes->getSelectedThemeName();
}
}
}
}
unset($themes);
//--------------------------------------------------------------------------------

View file

@ -13,7 +13,7 @@
* @package NOCC
* @subpackage Configuration
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: conf_lang.php 2967 2021-12-10 14:24:34Z oheil $
* @version SVN: $Id: conf_lang.php 3016 2022-08-25 11:00:42Z oheil $
*/
// ################### Language Array ################### //
@ -585,6 +585,10 @@ $lang_array[$i]->label = 'ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ';
usort($lang_array, function($a,$b){return($a->filename <=> $b->filename);});
$default=new lang();
$default->filename = 'default';
$default->label = convertLang2Html($html_default);
array_unshift($lang_array,$default);
/* Message documentation (translatewiki.net specific)

View file

@ -4,10 +4,17 @@ Latest version is 1.9.11
NOCC 1.9.12-dev ???????? ??, ????
Misc
* Bug in mail part/attachment parsing (Oliver Heil).
* Autoupdate: a -dev version is smaller than the release,
e.g. 1.9.12-dev is smaller than 1.9.12, because release is later (Oliver Heil).
* Regression bug in session handling: session expires premature (Oliver Heil).
* Language/theme selector and preferences logic enhanced (Oliver Heil)
https://github.com/oheil/NOCC/issues/1
Bugs
* Bug in mail part/attachment parsing (Oliver Heil).
* Regression bug in session handling: session expires premature (Oliver Heil).
* Bug in check for AES256, should be lowercase, check for both (Oliver Heil).
* Bug on login screen: reload when lang/theme change, new session is
ignored (Oliver Heil).
NOCC 1.9.11 December 10, 2021

View file

@ -1,4 +1,4 @@
<!-- start of $Id: prefs.php 2967 2021-12-10 14:24:34Z oheil $ -->
<!-- start of $Id: prefs.php 3016 2022-08-25 11:00:42Z oheil $ -->
<?php
if (!isset($conf->loaded))
die('Hacking attempt');
@ -257,13 +257,20 @@ if (count($big_list) > 1) {
<td class="prefsData">
<select class="button" name="lang" id="lang">
<?php
for ($i = 0; $i < sizeof($lang_array); $i++)
if (file_exists('lang/'.$lang_array[$i]->filename.'.php')) {
echo '<option value="'.$lang_array[$i]->filename.'"';
if ($_SESSION['nocc_lang'] == $lang_array[$i]->filename)
echo ' selected="selected"';
echo '>'.$lang_array[$i]->label.'</option>';
}
for ($i = 0; $i < sizeof($lang_array); $i++) {
if( $lang_array[$i]->filename == 'default' || file_exists('lang/'.$lang_array[$i]->filename.'.php') ) {
echo '<option value="'.$lang_array[$i]->filename.'"';
if( isset($user_prefs->lang) ) {
if( $user_prefs->lang == $lang_array[$i]->filename ) {
echo ' selected="selected"';
}
}
else if( $_SESSION['nocc_lang'] == $lang_array[$i]->filename ) {
echo ' selected="selected"';
}
echo '>'.$lang_array[$i]->label.'</option>';
}
}
?>
</select>
</td>
@ -274,12 +281,18 @@ if (count($big_list) > 1) {
<td class="prefsData">
<select class="button" name="theme" id="theme">
<?php
echo '<option value="default"';
if( ! isset($user_prefs->theme) || $user_prefs->theme=="default" ) {
echo ' selected="selected"';
}
echo '>'.convertLang2Html($html_default).'</option>';
$handle = opendir('./themes');
while (($file = readdir($handle)) != false) {
if (($file != '.') && ($file != '..') && ($file != '.svn')) {
echo '<option value="'.$file.'"';
if ($file == $_SESSION['nocc_theme'])
echo ' selected="selected"';
if( isset($user_prefs->theme) && $user_prefs->theme==$file ) {
echo ' selected="selected"';
}
echo '>'.$file.'</option>';
}
}
@ -320,4 +333,4 @@ if (count($big_list) > 1) {
</div>
</form>
</div>
<!-- end of $Id: prefs.php 2967 2021-12-10 14:24:34Z oheil $ -->
<!-- end of $Id: prefs.php 3016 2022-08-25 11:00:42Z oheil $ -->

View file

@ -12,7 +12,7 @@
*
* @package NOCC
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: index.php 2967 2021-12-10 14:24:34Z oheil $
* @version SVN: $Id: index.php 3016 2022-08-25 11:00:42Z oheil $
*/
//If a previous authentification cookie was set, we use it to bypass login
@ -124,17 +124,20 @@ require './html/header.php';
<tr>
<th><label for="lang"><?php echo $html_lang_label ?></label></th>
<td>
<select class="button" name="lang" id="lang" onchange="updateLoginPage()">
<select class="button" name="lang" id="lang" onchange="updateLoginPage('<?php echo NOCC_Session::getUrlGetSession(); ?>')">
<?php
echo '<option value="default"';
if( ! isset($_REQUEST['lang']) || $_REQUEST['lang']=="default" ) {
echo ' selected="selected"';
}
echo '>' . convertLang2Html($html_default) . '</option>';
foreach ($lang_array as $_lang_key => $_lang_var) {
if (file_exists('lang/' . $_lang_var->filename . '.php')) {
echo '<option value="' . $_lang_var->filename . '"';
if ($_SESSION['nocc_lang'] == $_lang_var->filename) {
if (isset($_REQUEST['lang']) && $_REQUEST['lang']!="default" && $_SESSION['nocc_lang'] == $_lang_var->filename) {
echo ' selected="selected"';
}
echo '>' . convertLang2Html($_lang_var->label) . '</option>';
}
}
@ -150,12 +153,17 @@ require './html/header.php';
<tr>
<th><label for="theme"><?php echo $html_theme_label ?></label></th>
<td>
<select class="button" name="theme" id="theme" onchange="updateLoginPage()">
<select class="button" name="theme" id="theme" onchange="updateLoginPage('<?php echo NOCC_Session::getUrlGetSession(); ?>')">
<?php
echo '<option value="default"';
if( ! isset($_REQUEST['lang']) || $_REQUEST['lang']=="default" ) {
echo ' selected="selected"';
}
echo '>' . convertLang2Html($html_default) . '</option>';
$themes = new NOCC_Themes('./themes/', $_SESSION['nocc_theme']);
foreach ($themes->getThemeNames() as $themeName) { //for all theme names...
echo '<option value="' . $themeName . '"';
if ($themeName == $_SESSION['nocc_theme']) { //if selected theme...
if (isset($_REQUEST['theme']) && $_REQUEST['theme']!="default" && $themeName == $_SESSION['nocc_theme']) {
echo ' selected="selected"';
}
echo '>' . $themeName . '</option>';

View file

@ -32,23 +32,24 @@ function updateLoginPort() {
/**
* Update login page.
*/
function updateLoginPage() {
function updateLoginPage(id) {
if( ! id ) { id=""; }
var form = document.getElementById("nocc_webmail_login");
if (form.user.value == "" && form.passwd.value == "") {
if (form.theme && form.lang) {
var lang_page = "index.php?theme=" + form.theme[form.theme.selectedIndex].value + "&lang=" + form.lang[form.lang.selectedIndex].value;
var lang_page = "index.php?"+id+"&theme=" + form.theme[form.theme.selectedIndex].value + "&lang=" + form.lang[form.lang.selectedIndex].value;
self.location = lang_page;
}
if (!form.theme && form.lang) {
var lang_page = "index.php?lang=" + form.lang[form.lang.selectedIndex].value;
var lang_page = "index.php?"+id+"&lang=" + form.lang[form.lang.selectedIndex].value;
self.location = lang_page;
}
if (form.theme && !form.lang) {
var lang_page = "index.php?theme=" + form.theme[form.theme.selectedIndex].value;
var lang_page = "index.php?"+id+"&theme=" + form.theme[form.theme.selectedIndex].value;
self.location = lang_page;
}
if (!form.theme && !form.lang) {
var lang_page = "index.php";
var lang_page = "index.php?"+id;
self.location = lang_page;
}
}

View file

@ -22,6 +22,7 @@
* @ingroup Language
* @file
*
* @author Fitoschido
* @author Xuacu
*/
@ -59,7 +60,7 @@ $html_preferences = 'Preferencies';
$html_full_name_label = 'Nome completu:';
$html_email_address_label = 'Direición de corréu electrónicu:';
$html_bccself = 'Poneme na CCT';
$html_hide_addresses = 'Tapecer les direiciones';
$html_hide_addresses = 'Anubrir les señes';
$html_outlook_quoting = 'Citar al estilu Outlook';
$html_reply_to = 'Responder a';
$html_reply_to_label = 'Responder a:';

View file

@ -72,7 +72,7 @@ $html_colored_quotes = 'রঙীন উক্তি';
$html_send_html_mail = 'HTML ফরম্যাটে ই-মেইল পাঠান';
$html_folders = 'ফোল্ডারগুলি';
$html_folders_create_failed = 'ফোল্ডার তৈরি করা যায় নি!';
$html_folder_rename = 'নামান্তর';
$html_folder_rename = 'পুনঃনামকরণ';
$html_folder_delete = 'অপসারণ';
$html_folder_to = 'এতে';
$html_filter_remove = 'অপসারণ';

View file

@ -12,7 +12,7 @@
* @package NOCC
* @subpackage Translations
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: de.php 2937 2021-03-12 06:05:32Z translatewiki $
* @version SVN: $Id: de.php 3016 2022-08-25 11:00:42Z oheil $
*/
/** German (Deutsch)
*
@ -273,3 +273,4 @@ $html_inbox_changed = 'Der Inhalt Ihres Posteingangs wurde geändert';
$html_inbox_show_alert = 'Hinweis anzeigen, wenn sich die Anzahl der E-Mails im Posteingang ändert';
$lang_horde_require_failed = 'Horde Imap Client Klasse nicht gefunden';
$lang_strong_encryption_required = 'Unsichere Verschlüsselung ist nicht erlaubt';
$html_default = 'Standard';

View file

@ -265,7 +265,7 @@ $html_version_message3 = 'Yew versiyono newe esto';
$html_session_expired = 'Wahde nê ronıştışi biyo pır';
$html_session_ip_changed = 'Waştoğ poğta vuriyayışê IP ra';
$html_session_expire_time = 'No otomatikman terix de baş beno';
$html_inbox_changed = 'Zerrekê dora ameyanê vurneya';
$html_inbox_changed = 'Zerrekê qutiya şımaya ameyışi vurniya';
$html_inbox_show_alert = 'Dora mesacanê ameyanê de amarê postaya vuriyena se dora iqazi bımocne';
$lang_horde_require_failed = 'Sınıfa waştoğê \'\'horde pmap\'\'i nêvêniye';
$lang_strong_encryption_required = 'Bêitimad parola kerdışi rê mısade nêdeyeno';

View file

@ -47,7 +47,6 @@ $title_prev_msg = 'Previous message';
$html_theme_label = 'Theme:';
$html_welcome = 'Welcome to %1$s';
$html_login = 'Login';
$html_user_label = 'User:';
$html_passwd_label = 'Password:';
$html_submit = 'Submit';
$html_help = 'Help';

View file

@ -12,7 +12,7 @@
* @package NOCC
* @subpackage Translations
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: en.php 2871 2020-04-13 14:16:02Z oheil $
* @version SVN: $Id: en.php 3016 2022-08-25 11:00:42Z oheil $
*/
/** English (English)
*
@ -262,3 +262,4 @@ $html_inbox_changed = 'The content of your inbox has changed';
$html_inbox_show_alert = 'Show alert box when number of emails in inbox change';
$lang_horde_require_failed = 'Horde pmap client class not found';
$lang_strong_encryption_required = 'Unsecure encryption is not allowed';
$html_default = 'Default';

View file

@ -12,7 +12,7 @@
* @package NOCC
* @subpackage Translations
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: eo.php 2937 2021-03-12 06:05:32Z translatewiki $
* @version SVN: $Id: eo.php 3003 2022-03-28 11:11:38Z translatewiki $
*/
/** Esperanto (Esperanto)
*
@ -261,3 +261,5 @@ $html_session_ip_changed = 'pro ŝangô de klienta IP-adreso';
$html_session_expire_time = 'Ĉi tiu sesio eksvalidiĝos aŭtomate je';
$html_inbox_changed = 'Ŝanĝiĝis la enhavo de via enirkesto';
$html_inbox_show_alert = 'Montri atentigan skatolon se ŝanĝiĝas la nombro de retmesaĝoj en la enirkesto';
$lang_horde_require_failed = 'Horde pmap-klientklaso ne trovita';
$lang_strong_encryption_required = 'Malsekura ĉifrado ne estas permesita';

View file

@ -12,7 +12,7 @@
* @package NOCC
* @subpackage Translations
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: fa.php 2937 2021-03-12 06:05:32Z translatewiki $
* @version SVN: $Id: fa.php 3006 2022-04-25 11:11:55Z translatewiki $
*/
/** Persian (فارسی)
*
@ -23,11 +23,13 @@
* @file
*
* @author Alirezaaa
* @author Beginneruser
* @author Ebraminio
* @author FarsiNevis
* @author Huji
* @author Iriman
* @author Mjbmr
* @author Mohammad ebz
* @author Omnia
* @author Reza1615
* @author ZxxZxxZ
@ -39,7 +41,7 @@ $default_date_format = '%Y-%m-%d';
$no_locale_date_format = '%Y-%m-%d';
$default_time_format = '%I:%M %p';
$err_user_empty = 'شناسه کاربر خالى است';
$err_passwd_empty = 'رمز خالى است';
$err_passwd_empty = 'قسمت رمز عبور خالى است';
$alt_delete = 'پاک کردن پيغامهاى انتخاب شده';
$alt_delete_one = 'پاک کردن پيغام';
$alt_new_msg = 'پيغامهاى جديد';
@ -56,7 +58,7 @@ $html_theme_label = 'پوسته';
$html_welcome = 'خوش آمدید به %1$s';
$html_login = 'ورود به سامانه';
$html_user_label = 'کاربر:';
$html_passwd_label = 'کلمه عبور:';
$html_passwd_label = 'رمز عبور:';
$html_submit = 'ارسال';
$html_help = 'راهنما';
$html_server_label = 'سرور :';
@ -65,7 +67,7 @@ $html_retry = 'سعى دوباره';
$html_remember = 'تنظیمات را به یاد داشته باشید';
$html_lang_label = 'زبان:';
$html_msgperpage_label = 'پيغامها به ازاء هر صفحه';
$html_preferences = نظيمات';
$html_preferences = رجیحات';
$html_full_name_label = 'نام و نام خانوادگی :';
$html_email_address_label = 'نشانی ایمیل:';
$html_bccself = 'رونوشت پنهان به خود';

View file

@ -12,7 +12,7 @@
* @package NOCC
* @subpackage Translations
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: pl.php 2937 2021-03-12 06:05:32Z translatewiki $
* @version SVN: $Id: pl.php 3010 2022-05-16 11:11:12Z translatewiki $
*/
/** Polish (polski)
*
@ -27,6 +27,7 @@
* @author Ryszard Janiszewski <dex7@akacje.net>
* @author Sp5uhe
* @author Tomasz Mateja <tommat@pimpek.one.pl>
* @author WaldiSt
* @author Woytecr
*/
@ -79,6 +80,7 @@ $html_manage_filters_link = 'Reguły wiadomości';
$html_use_graphical_smilies = 'Używaj emotikon';
$html_sent_folder_label = 'Kopiuj wysłane wiadomości do wyznaczonego folderu';
$html_trash_folder_label = 'Przenieś usunięte wiadomości do dedykowanego katalogu';
$html_inbox_folder_label = 'Połącz pozycję menu Skrzynka odbiorcza z folderem:';
$html_colored_quotes = 'Wyróżnij cytaty kolorami';
$html_display_struct = 'Wyświetl skonstruowany tekst';
$html_send_html_mail = 'Wyślij wiadomość w formacie HTML';

View file

@ -12,7 +12,7 @@
* @package NOCC
* @subpackage Translations
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: ru.php 2937 2021-03-12 06:05:32Z translatewiki $
* @version SVN: $Id: ru.php 3009 2022-05-12 11:11:13Z translatewiki $
*/
/** Russian (русский)
*
@ -31,9 +31,11 @@
* @author Lvova
* @author Nzeemin
* @author Okras
* @author Pacha Tchernof
* @author Putnik
* @author Sergey Frolovithev <serg@spylog.ru>
* @author Sk
* @author Vcohen
* @author Александр Сигачёв
* @author Туллук
* @author გიორგიმელა
@ -121,7 +123,7 @@ $html_and = 'и';
$html_new_msg_in = 'Новые сообщения в';
$html_or = 'или';
$html_move = 'Переместить';
$html_copy = 'Копировать';
$html_copy = 'Скопировать';
$html_messages_to = 'выбранные письма в';
$html_gotopage = 'Перейти к странице';
$html_gotofolder = 'Перейти в папку';
@ -236,7 +238,7 @@ $original_msg = '-- Исходное письмо --';
$to_empty = 'Поле \'Кому\' не должно быть пустым !';
$html_images_warning = 'Для вашей безопасности удаленные картинки не показаны';
$html_images_display = 'Отобразить картинки';
$html_smtp_error_no_conn = 'Не возможно установить SMTP соединение';
$html_smtp_error_no_conn = 'Невозможно установить SMTP-соединение';
$html_smtp_error_unexpected = 'Неожиданный ответ SMTP:';
$lang_could_not_connect = 'Невозможно подключиться к серверу';
$lang_invalid_msg_num = 'Плохой номер изображения';

View file

@ -29,6 +29,8 @@
$default_date_format = '%A %d %B %Y';
$no_locale_date_format = '%d-%m-%Y';
$default_time_format = '%H:%M';
$err_user_empty = 'Lu campu di login è vacanti';
$err_passwd_empty = 'Lu campu password è vacanti';
$alt_new_msg = 'Missaggi novi';
$alt_next = 'N avanti';
$title_next_page = 'Pàggina appressu';

View file

@ -65,7 +65,7 @@ $html_use_signature = 'يوزر جي صحيح';
$html_signature = 'صحيح';
$html_signature_label = 'صحيح:';
$html_colored_quotes = 'رنڱيل قول';
$html_send_html_mail = 'ايڇ ٽي ايم ايل فارميٽ ۾ ايميل موڪليو';
$html_send_html_mail = 'ايڇ.ٽي.ايم.ايل فارميٽ ۾ ايميل موڪليو';
$html_folders = 'خانا';
$html_folders_create_failed = 'فولڊر تخليق نٿو ڪري سگهجي!';
$html_folders_rename_failed = 'فولڊر کي ٻيھر نالو نٿو ڏئي سگهجي!';

View file

@ -14,7 +14,7 @@
* @package NOCC
* @subpackage Utilities
* @license http://www.gnu.org/licenses/ GNU General Public License
* @version SVN: $Id: crypt.php 2871 2020-04-13 14:16:02Z oheil $
* @version SVN: $Id: crypt.php 3016 2022-08-25 11:00:42Z oheil $
*/
function encrXOR($string, $key) {
@ -45,7 +45,7 @@ function encpass($passwd, $rkey) {
if( extension_loaded("openssl") && function_exists("openssl_encrypt") && function_exists("openssl_decrypt")
&& extension_loaded("hash") && function_exists("hash")
&& in_array("sha256",hash_algos())
&& in_array("AES256",openssl_get_cipher_methods(true))
&& count( preg_grep("/^aes256$/i",openssl_get_cipher_methods(true)) ) > 0
) {
$key=hash("SHA256",$rkey,true);
$iv_size=openssl_cipher_iv_length("AES256");
@ -91,7 +91,7 @@ function decpass($cipher, $rkey) {
if( extension_loaded("openssl") && function_exists("openssl_encrypt") && function_exists("openssl_decrypt")
&& extension_loaded("hash") && function_exists("hash")
&& in_array("sha256",hash_algos())
&& in_array("AES256",openssl_get_cipher_methods(true))
&& count( preg_grep("/^aes256$/i",openssl_get_cipher_methods(true)) )>0
) {
$key=hash("SHA256",$rkey,true);
$iv_size=openssl_cipher_iv_length("AES256");