diff --git a/core/lang/az/global.php b/core/lang/az/global.php index df49cbae10..e370db7fd9 100644 --- a/core/lang/az/global.php +++ b/core/lang/az/global.php @@ -1401,6 +1401,7 @@ $_lang['email_method_title'] = 'E-poçt göndərmə metodu'; $_lang['email_method_mail'] = 'PHP mail() funksiyası'; $_lang['email_method_smtp'] = 'SMTP Server'; +$_lang['email_method_message'] = 'Sistem məktublarının göndərilmə üsulu. «PHP mail() funksiyası» məktubu serverin yerli poçt proqramına ötürür və əlavə tənzimləmə tələb etmir. «SMTP Server» aşağıda tənzimlənmiş xarici SMTP serveri vasitəsilə göndərir və göndərənin avtomatik seçiminin SMTP istifadəçi adından yararlana bildiyi yeganə rejimdir.'; $_lang['smtp_auth_title'] = 'SMTP-AUTH'; $_lang['smtp_autotls_title'] = 'SMTPAutoTLS'; $_lang['smtp_host_title'] = 'SMTP host'; @@ -1592,7 +1593,7 @@ $_lang['email_sender_method'] = 'Mesajın göndərən ünvani'; $_lang['auto'] = 'Avtomatik tanıma'; $_lang['use_emailsender'] = '[(emailsender)] dəyərini istifadə et'; -$_lang['email_sender_method_message'] = 'Mesajın göndərən ünvani. Bu, adətən alınan tərəf tərəfindən Return-Path başlığına çevriləcək və geri dönən mesajlar bu ünvana göndəriləcək. Avtomatik tanıma əksər hallarda işləyir.'; +$_lang['email_sender_method_message'] = '«Avtomatik tanıma»: SMTP seçildikdə və SMTP istifadəçi adı düzgün e-poçt ünvanı olduqda, həmin ünvan həm From, həm də zərf göndəricisi (envelope sender) kimi istifadə olunur. Əks halda From üçün [(emailsender)] istifadə edilir, zərf göndəricisi isə nəqliyyatın əvvəlki avtomatik davranışına buraxılır. «[(emailsender)] dəyərini istifadə et» bu ünvanı həm From, həm də zərf göndəricisi üçün məcburi edir.'; $_lang['login_form_position_title'] = 'Daxil olma forması mövqeyi'; $_lang['login_form_position_left'] = 'sol'; diff --git a/core/lang/be/global.php b/core/lang/be/global.php index 07515873b1..92cd7a2153 100644 --- a/core/lang/be/global.php +++ b/core/lang/be/global.php @@ -1393,6 +1393,7 @@ $_lang['email_method_title'] = 'Метад адпраўкі пошты'; $_lang['email_method_mail'] = 'Функцыя PHP mail().'; $_lang['email_method_smtp'] = 'Сервер SMTP'; +$_lang['email_method_message'] = 'Спосаб адпраўкі сістэмных лістоў. «Функцыя PHP mail()» перадае ліст лакальнай паштовай праграме сервера і не патрабуе дадатковай наладкі. «Сервер SMTP» адпраўляе праз знешні SMTP-сервер, наладжаны ніжэй, і гэта адзіны рэжым, у якім аўтаматычны выбар адпраўніка можа выкарыстаць імя карыстальніка SMTP.'; $_lang['smtp_auth_title'] = 'Аўтэнтыфікацыя SMTP'; $_lang['smtp_autotls_title'] = 'Аўтаматычны TLS для SMTP'; $_lang['smtp_host_title'] = 'Хост SMTP'; @@ -1591,7 +1592,7 @@ $_lang['email_sender_method'] = 'Метад адправніка паведамленняў'; $_lang['auto'] = 'Аўтаматычна'; $_lang['use_emailsender'] = 'Выкарыстоўвайце значэнне [(emailsender)].'; -$_lang['email_sender_method_message'] = 'Метад адправніка паведамленняў. Звычайна гэта значэнне пераўтвараецца ў загаловак Return-Path і выкарыстоўваецца для адпраўкі адмоўных паведамленняў. У большасці выпадкаў аўтаматычнае вызначэнне будзе працаваць карэктна.'; +$_lang['email_sender_method_message'] = '«Аўтаматычна»: калі выбраны SMTP і імя карыстальніка SMTP — карэктны email-адрас, ён выкарыстоўваецца і як адрас From, і як адпраўнік канверта. Інакш для From выкарыстоўваецца [(emailsender)], а адпраўнік канверта застаецца на ранейшай аўтаматычнай апрацоўцы транспарту. «Выкарыстоўвайце значэнне [(emailsender)]» прымусова задае гэты адрас і для From, і для адпраўніка канверта.'; $_lang['login_form_position_title'] = 'Пазіцыя формы ўваходу'; $_lang['login_form_position_left'] = 'Злева'; diff --git a/core/lang/de/global.php b/core/lang/de/global.php index ce31dd39d4..9e50cf29b7 100644 --- a/core/lang/de/global.php +++ b/core/lang/de/global.php @@ -1264,6 +1264,7 @@ $_lang['email_method_title'] = 'Sendmail Methode'; $_lang['email_method_mail'] = 'PHP mail() Funktion'; $_lang['email_method_smtp'] = 'SMTP Server'; +$_lang['email_method_message'] = 'Transportweg für System-E-Mails. „PHP mail() Funktion“ übergibt die Nachricht an das lokale Mailprogramm des Servers und benötigt keine weitere Konfiguration. „SMTP Server“ versendet über den unten konfigurierten externen SMTP-Server und ist der einzige Modus, in dem die automatische Absenderwahl den SMTP-Benutzernamen verwenden kann.'; $_lang['smtp_auth_title'] = 'SMTP Auth'; $_lang['smtp_autotls_title'] = 'SMTPAutoTLS'; $_lang['smtp_host_title'] = 'SMTP Host'; @@ -1452,7 +1453,7 @@ $_lang['email_sender_method'] = 'Absender-Adresse'; $_lang['auto'] = 'Automatische Erkennung'; $_lang['use_emailsender'] = 'Benutze [(emailsender)]'; -$_lang['email_sender_method_message'] = 'Die Absender-Adresse wird normalerweise als Return-Path Header durch den Versender verwendet, und empfängt daher Mails welche nicht zugestellt werden konnten (Bounces). Die automatische Erkennung ist in der Regel ausreichend.'; +$_lang['email_sender_method_message'] = '„Automatische Erkennung“: Ist SMTP ausgewählt und der SMTP-Benutzername eine gültige E-Mail-Adresse, wird diese sowohl als From-Adresse als auch als Envelope-Sender verwendet. Andernfalls dient [(emailsender)] als From-Adresse, und der Envelope-Sender bleibt der bisherigen automatischen Behandlung durch den Transport überlassen. „Benutze [(emailsender)]“ erzwingt diese Adresse für From und Envelope-Sender gleichermaßen.'; $_lang['login_form_position_title'] = 'Position des Login-Formulars'; $_lang['login_form_position_left'] = 'links'; diff --git a/core/lang/en/global.php b/core/lang/en/global.php index 59d0335e57..838eae4a1a 100644 --- a/core/lang/en/global.php +++ b/core/lang/en/global.php @@ -1295,9 +1295,10 @@ $_lang["configcheck_sysfiles_mod"] = 'Important System Files have been modified.'; $_lang["configcheck_sysfiles_mod_msg"] = 'You have configured Evolution CMS to check important system files for possible website script attacks. This warning does not necessarily mean your site has been compromised, however, you should review the watched files in your installation (set in System configuration -> User -> Check core files on login). If you find your files unaltered or changes were made by site administrators, go to System Configuration and click to re-save settings to dismiss this message. Changes in the following files have been found:'; -$_lang['email_method_title'] = 'Sendmail method'; +$_lang['email_method_title'] = 'Mail sending method'; $_lang['email_method_mail'] = 'PHP mail() function'; $_lang['email_method_smtp'] = 'SMTP Server'; +$_lang['email_method_message'] = 'Transport used to send system email. “PHP mail() function” hands the message to the local mail program of the server and needs no further configuration. “SMTP Server” delivers through the external SMTP server configured below, and is the only mode in which automatic sender selection can use the SMTP username.'; $_lang['smtp_auth_title'] = 'SMTP-AUTH'; $_lang['smtp_autotls_title'] = 'SMTPAutoTLS'; $_lang['smtp_host_title'] = 'SMTP host'; @@ -1489,10 +1490,10 @@ $_lang["viewopts_fontsize"] = 'Font-Size'; $_lang["viewopts_cb_alltabs"] = 'All Tabs'; -$_lang['email_sender_method'] = 'The envelope sender of the message'; +$_lang['email_sender_method'] = 'Message sender'; $_lang['auto'] = 'Auto-detect'; $_lang['use_emailsender'] = 'Use [(emailsender)] value'; -$_lang['email_sender_method_message'] = 'Automatic uses a valid email-form SMTP username as both From and envelope sender when SMTP is selected. Otherwise it uses [(emailsender)] as From and retains the transport\'s legacy automatic envelope handling. “Use [(emailsender)]” forces that address for both From and envelope sender.'; +$_lang['email_sender_method_message'] = '“Auto-detect”: when SMTP is selected and the SMTP username is a valid email address, that address is used as both the From address and the envelope sender. Otherwise [(emailsender)] is used as From and the envelope sender is left to the transport\'s previous automatic handling. “Use [(emailsender)] value” forces that address for both From and envelope sender.'; $_lang['login_form_position_title'] = 'Login form postiton'; $_lang['login_form_position_left'] = 'left'; diff --git a/core/lang/es/global.php b/core/lang/es/global.php index c60c499a24..1d21629251 100644 --- a/core/lang/es/global.php +++ b/core/lang/es/global.php @@ -1262,9 +1262,10 @@ $_lang["configcheck_sysfiles_mod"] = 'Se han modificado archivos importantes del sistema.'; $_lang["configcheck_sysfiles_mod_msg"] = 'You have configured EVO to check important system files for possible website script attacks. This warning does not necessarily mean your site has been compromised, however, you should review the watched files in your installation (set in System configuration -> User -> Check core files on login). If you find your files unaltered or changes were made by site administrators, go to System Configuration and click to re-save settings to dismiss this message. Changes in the following files have been found:'; -$_lang['email_method_title'] = 'Sendmail method'; -$_lang['email_method_mail'] = 'PHP mail() function'; -$_lang['email_method_smtp'] = 'SMTP Server'; +$_lang['email_method_title'] = 'Método de envío de correo'; +$_lang['email_method_mail'] = 'Función PHP mail()'; +$_lang['email_method_smtp'] = 'Servidor SMTP'; +$_lang['email_method_message'] = 'Transporte usado para enviar el correo del sistema. «Función PHP mail()» entrega el mensaje al programa de correo local del servidor y no necesita más configuración. «Servidor SMTP» envía a través del servidor SMTP externo configurado más abajo, y es el único modo en el que la detección automática del remitente puede usar el nombre de usuario SMTP.'; $_lang['smtp_auth_title'] = 'SMTP-AUTH'; $_lang['smtp_autotls_title'] = 'SMTPAutoTLS'; $_lang['smtp_host_title'] = 'SMTP host'; @@ -1450,10 +1451,10 @@ $_lang["viewopts_fontsize"] = 'Tamaño de fuente'; $_lang["viewopts_cb_alltabs"] = 'Todas las pestañas'; -$_lang['email_sender_method'] = 'The envelope sender of the message'; -$_lang['auto'] = 'Auto-detect'; -$_lang['use_emailsender'] = 'Use [(emailsender)] value'; -$_lang['email_sender_method_message'] = 'The envelope sender of the message. This will usually be turned into a Return-Path header by the receiver, and is the address that bounces will be sent to. Auto-detect will work in most cases.'; +$_lang['email_sender_method'] = 'Remitente del mensaje'; +$_lang['auto'] = 'Detección automática'; +$_lang['use_emailsender'] = 'Usar el valor de [(emailsender)]'; +$_lang['email_sender_method_message'] = '«Detección automática»: si se selecciona SMTP y el nombre de usuario SMTP es una dirección de correo válida, esa dirección se usa tanto como remitente From como remitente del sobre (envelope sender). En caso contrario se usa [(emailsender)] como From y el remitente del sobre queda en la gestión automática anterior del transporte. «Usar el valor de [(emailsender)]» fuerza esa dirección tanto para From como para el remitente del sobre.'; $_lang['login_form_position_title'] = 'Posición de formulario de inicio de sesión'; $_lang['login_form_position_left'] = 'izquierda'; diff --git a/core/lang/it/global.php b/core/lang/it/global.php index 87ad36b157..a919d64ade 100644 --- a/core/lang/it/global.php +++ b/core/lang/it/global.php @@ -1276,6 +1276,7 @@ $_lang['email_method_title'] = 'Metodo di invio mail:'; $_lang['email_method_mail'] = 'Funzione mail() di PHP'; $_lang['email_method_smtp'] = 'Server SMTP'; +$_lang['email_method_message'] = 'Trasporto usato per inviare le email di sistema. «Funzione mail() di PHP» consegna il messaggio al programma di posta locale del server e non richiede altra configurazione. «Server SMTP» invia tramite il server SMTP esterno configurato qui sotto ed è la sola modalità in cui il riconoscimento automatico del mittente può usare il nome utente SMTP.'; $_lang['smtp_auth_title'] = 'SMTP-AUTH:'; $_lang['smtp_autotls_title'] = 'SMTPAutoTLS'; $_lang['smtp_host_title'] = 'Host SMTP:'; @@ -1464,7 +1465,7 @@ $_lang['email_sender_method'] = 'Il mittente del messaggio'; $_lang['auto'] = 'Riconoscimento automatico'; $_lang['use_emailsender'] = 'Usa il valore [(emailsender)]'; -$_lang['email_sender_method_message'] = 'Il mittente del messaggio. In genere verrà trasformato in un header Return-Path dal destinatario ed è l\'indirizzo al quale verranno notificati gli indirizzi errati. Attivare Il riconoscimento automatico andrà bene nella maggior parte dei casi.'; +$_lang['email_sender_method_message'] = '«Riconoscimento automatico»: se è selezionato SMTP e il nome utente SMTP è un indirizzo email valido, tale indirizzo viene usato sia come mittente From sia come mittente della busta (envelope sender). Altrimenti viene usato [(emailsender)] come From e il mittente della busta resta affidato alla precedente gestione automatica del trasporto. «Usa il valore [(emailsender)]» impone tale indirizzo sia per From sia per il mittente della busta.'; $_lang['login_form_position_title'] = 'Posizione del form di login'; $_lang['login_form_position_left'] = 'sinistra'; diff --git a/core/lang/ja/global.php b/core/lang/ja/global.php index 5a5e9d71aa..cb827fd8d5 100644 --- a/core/lang/ja/global.php +++ b/core/lang/ja/global.php @@ -1301,6 +1301,7 @@ $_lang['email_method_title'] = 'Sendmail による方法'; $_lang['email_method_mail'] = 'PHP mail() による機能'; $_lang['email_method_smtp'] = 'SMTP サーバ'; +$_lang['email_method_message'] = 'システムメールの送信方法。「PHP mail() による機能」はメッセージをサーバーのローカルメールプログラムに渡すため、追加の設定は不要です。「SMTP サーバ」は下で設定した外部 SMTP サーバー経由で送信し、送信者の自動検出が SMTP ユーザー名を利用できる唯一のモードです。'; $_lang['smtp_auth_title'] = 'SMTP-AUTH'; $_lang['smtp_autotls_title'] = 'SMTPAutoTLS'; $_lang['smtp_host_title'] = 'SMTP ホスト'; @@ -1493,7 +1494,7 @@ $_lang['email_sender_method'] = 'メッセージの送り主'; $_lang['auto'] = '自動検出'; $_lang['use_emailsender'] = ' [(emailsender)] の値を使う'; -$_lang['email_sender_method_message'] = 'メッセージの送り主。これは通常、受信者によってReturn-Pathヘッダーに変換され、またこのアドレスはバウンスの送信先となります。ほとんどの場合、自動検出が機能します。'; +$_lang['email_sender_method_message'] = '「自動検出」: SMTP が選択されていて、SMTP ユーザー名が有効なメールアドレスである場合、そのアドレスが From とエンベロープ送信者の両方に使われます。それ以外の場合は [(emailsender)] が From に使われ、エンベロープ送信者はトランスポートの従来の自動処理に委ねられます。「[(emailsender)] の値を使う」を選ぶと、そのアドレスが From とエンベロープ送信者の両方に強制的に使われます。'; $_lang['login_form_position_title'] = 'ログインフォームのポジション'; $_lang['login_form_position_left'] = '左部'; diff --git a/core/lang/pl/global.php b/core/lang/pl/global.php index 442d1a2098..fcb75705dc 100644 --- a/core/lang/pl/global.php +++ b/core/lang/pl/global.php @@ -1266,6 +1266,7 @@ $_lang['email_method_title'] = 'Metoda wysyłania poczty'; $_lang['email_method_mail'] = 'Funkcja PHP mail()'; $_lang['email_method_smtp'] = 'Serwer SMTP'; +$_lang['email_method_message'] = 'Sposób wysyłania poczty systemowej. „Funkcja PHP mail()” przekazuje wiadomość lokalnemu programowi pocztowemu serwera i nie wymaga dodatkowej konfiguracji. „Serwer SMTP” wysyła przez zewnętrzny serwer SMTP skonfigurowany poniżej i jest jedynym trybem, w którym automatyczne wykrywanie nadawcy może użyć nazwy użytkownika SMTP.'; $_lang['smtp_auth_title'] = 'SMTP-AUTH'; $_lang['smtp_autotls_title'] = 'SMTPAutoTLS'; $_lang['smtp_host_title'] = 'SMTP host'; @@ -1454,7 +1455,7 @@ $_lang['email_sender_method'] = 'Nadawca wiadomości'; $_lang['auto'] = 'Wykryj automatycznie'; $_lang['use_emailsender'] = 'Użyj wartości [(emailsender)]'; -$_lang['email_sender_method_message'] = 'Nadawca koperty wiadomości. Zwykle zostanie zamieniony na nagłówek Return-Path przez odbiorcę i jest to adres, do którego zostaną wysłane odrzucone wiadomości. Automatyczne wykrywanie będzie działać w większości przypadków.'; +$_lang['email_sender_method_message'] = '„Wykryj automatycznie”: jeśli wybrano SMTP, a nazwa użytkownika SMTP jest poprawnym adresem e-mail, adres ten jest używany zarówno jako From, jak i jako nadawca koperty. W przeciwnym razie jako From używany jest [(emailsender)], a nadawcę koperty ustala dotychczasowa automatyczna obsługa transportu. „Użyj wartości [(emailsender)]” wymusza ten adres zarówno dla From, jak i dla nadawcy koperty.'; $_lang['login_form_position_title'] = 'Pozycja formularza logowania'; $_lang['login_form_position_left'] = 'Lewa strona'; diff --git a/core/lang/ru/global.php b/core/lang/ru/global.php index 1ceedaae2e..b91be5fb7c 100644 --- a/core/lang/ru/global.php +++ b/core/lang/ru/global.php @@ -1287,8 +1287,9 @@ $_lang["configcheck_sysfiles_mod_msg"] = 'Вы включили проверку системных файлов на наличие изменений, характерных для взломанных сайтов. Это не значит, что сайт был взломан, но желательно просмотреть измененные файлы.(index.php, .htaccess, [+MGR_DIR+]/index.php, [+MGR_DIR+]/includes/config.inc.php)'; $_lang['email_method_title'] = 'Метод отправки писем'; -$_lang['email_method_mail'] = 'MAIL - cообщения отправляются с помощью функции mail().'; +$_lang['email_method_mail'] = 'MAIL - сообщения отправляются с помощью функции mail().'; $_lang['email_method_smtp'] = 'Через SMTP-сервер'; +$_lang['email_method_message'] = 'Способ отправки системных писем. Вариант с функцией mail() передаёт письмо локальной почтовой программе сервера и не требует дополнительной настройки. «Через SMTP-сервер» отправляет через внешний SMTP-сервер, настроенный ниже, и это единственный режим, в котором автоопределение отправителя может использовать имя пользователя SMTP.'; $_lang['smtp_auth_title'] = 'SMTP авторизация'; $_lang['smtp_autotls_title'] = 'SMTPAutoTLS'; $_lang['smtp_host_title'] = 'Адрес SMTP-сервера'; @@ -1484,10 +1485,10 @@ $_lang["viewopts_fontsize"] = 'Размер шрифта'; $_lang["viewopts_cb_alltabs"] = 'Все табы'; -$_lang['email_sender_method'] = 'The envelope sender of the message'; -$_lang['auto'] = 'Auto-detect'; -$_lang['use_emailsender'] = 'Use [(emailsender)] value'; -$_lang['email_sender_method_message'] = 'The envelope sender of the message. This will usually be turned into a Return-Path header by the receiver, and is the address that bounces will be sent to. Auto-detect will work in most cases.'; +$_lang['email_sender_method'] = 'Отправитель сообщения'; +$_lang['auto'] = 'Автоопределение'; +$_lang['use_emailsender'] = 'Использовать значение [(emailsender)]'; +$_lang['email_sender_method_message'] = '«Автоопределение»: если выбран SMTP и имя пользователя SMTP является корректным email-адресом, оно используется и как адрес From, и как отправитель конверта. Иначе в качестве From используется [(emailsender)], а отправитель конверта остаётся на прежней автоматической обработке транспортом. «Использовать значение [(emailsender)]» принудительно задаёт этот адрес и для From, и для отправителя конверта.'; $_lang['login_form_position_title'] = 'Положение формы авторизации'; $_lang['login_form_position_left'] = 'Слева'; diff --git a/core/lang/uk/global.php b/core/lang/uk/global.php index abc396640e..34158c83fb 100644 --- a/core/lang/uk/global.php +++ b/core/lang/uk/global.php @@ -1294,6 +1294,7 @@ $_lang['email_method_title'] = 'Метод відправки листів'; $_lang['email_method_mail'] = 'MAIL - повідомлення відправляються за допомогою функції mail().'; $_lang['email_method_smtp'] = 'Через SMTP-сервер'; +$_lang['email_method_message'] = 'Спосіб відправки системних листів. Варіант із функцією mail() передає лист локальній поштовій програмі сервера і не потребує додаткового налаштування. «Через SMTP-сервер» відправляє через зовнішній SMTP-сервер, налаштований нижче, і це єдиний режим, у якому автовизначення відправника може використати ім’я користувача SMTP.'; $_lang['smtp_auth_title'] = 'SMTP авторизація'; $_lang['smtp_autotls_title'] = 'SMTPAutoTLS'; $_lang['smtp_host_title'] = 'Адреса SMTP-сервера'; @@ -1492,7 +1493,7 @@ $_lang['email_sender_method'] = 'Відправник повідомлення'; $_lang['auto'] = 'Автовизначення'; $_lang['use_emailsender'] = 'Використовуйте значення [(emailsender)]'; -$_lang['email_sender_method_message'] = 'Автоматично: якщо вибрано SMTP і ім’я користувача SMTP є коректною email-адресою, воно використовується як From і відправник конверта. Інакше для From використовується [(emailsender)] і зберігається попередня автоматична обробка конверта транспортом. «Використовувати [(emailsender)]» примусово використовує цю адресу і для From, і для відправника конверта.'; +$_lang['email_sender_method_message'] = '«Автовизначення»: якщо вибрано SMTP і ім’я користувача SMTP є коректною email-адресою, воно використовується і як адреса From, і як відправник конверта. Інакше для From використовується [(emailsender)], а відправник конверта залишається на попередній автоматичній обробці транспортом. «Використовуйте значення [(emailsender)]» примусово задає цю адресу і для From, і для відправника конверта.'; $_lang['login_form_position_title'] = 'Положення форми авторизації'; $_lang['login_form_position_left'] = 'зліва'; diff --git a/core/src/Core.php b/core/src/Core.php index cd33257c46..0231c9e22a 100644 --- a/core/src/Core.php +++ b/core/src/Core.php @@ -2150,7 +2150,7 @@ public function evalPlugin($pluginCode, $params) if ($modx->isBackend()) { $modx->event->alert($errMsg); } - unset($modx->event->params); + $modx->event->params = []; return; } $msg = ob_get_clean(); @@ -2175,7 +2175,7 @@ public function evalPlugin($pluginCode, $params) } else { echo $msg; } - unset($modx->event->params); + $modx->event->params = []; } /** @@ -2237,7 +2237,7 @@ public function evalSnippet($phpcode, $params) ); } } - unset($modx->event->params); + $modx->event->params = []; if (is_array($return) || is_object($return)) { return $return; } @@ -5771,7 +5771,6 @@ public function removeEventListener($evtName) */ public function removeAllEventListener() { - unset($this->pluginEvent); $this->pluginEvent = []; } @@ -5779,7 +5778,6 @@ protected function restoreEvent() { $event = $this->event->getPreviousEvent(); if ($event) { - unset($this->event); $this->event = $event; $this->Event = &$this->event; } else { diff --git a/core/src/Support/MysqlDumper.php b/core/src/Support/MysqlDumper.php index faed2eec39..15e355850e 100644 --- a/core/src/Support/MysqlDumper.php +++ b/core/src/Support/MysqlDumper.php @@ -140,7 +140,8 @@ private function writeDump($callBack, $modx, array $createtable, array $dataBase if (isset($this->_dbtables) && count($this->_dbtables)) { $this->_dbtables = implode(',', $this->_dbtables); } else { - unset($this->_dbtables); + // Null keeps the isset() guards below false, meaning "dump every table". + $this->_dbtables = null; } diff --git a/core/tests/Unit/Console/PackageRequireCommandTest.php b/core/tests/Unit/Console/PackageRequireCommandTest.php index 3ccc2ef71a..983fb4aa85 100644 --- a/core/tests/Unit/Console/PackageRequireCommandTest.php +++ b/core/tests/Unit/Console/PackageRequireCommandTest.php @@ -2,18 +2,34 @@ use EvolutionCMS\Console\Packages\InstallPackageRequireCommand; use EvolutionCMS\Console\Packages\RemovePackageRequireCommand; +use Illuminate\Container\Container; use Symfony\Component\Console\Tester\CommandTester; if (!defined('EVO_CORE_PATH')) { define('EVO_CORE_PATH', dirname(__DIR__, 3) . '/'); } +/** + * Minimal stand-in for the CMS application container. Illuminate\Console\Command + * resolves its output style and view components through the container and asks it + * whether the process is a unit test run, which the bare container cannot answer. + */ +final class PackageRequireTestContainer extends Container +{ + public function runningUnitTests(): bool + { + return true; + } +} + function setPackageRequireComposerPath(InstallPackageRequireCommand $command, string $path): void { $reflection = new ReflectionClass(InstallPackageRequireCommand::class); $property = $reflection->getProperty('composer'); $property->setAccessible(true); $property->setValue($command, $path); + + $command->setLaravel(new PackageRequireTestContainer()); } test('package remove require reports missing requirements', function () { diff --git a/core/tests/Unit/Console/SiteUpdateCommandTest.php b/core/tests/Unit/Console/SiteUpdateCommandTest.php index 9d74ed918b..6dddb785bd 100644 --- a/core/tests/Unit/Console/SiteUpdateCommandTest.php +++ b/core/tests/Unit/Console/SiteUpdateCommandTest.php @@ -163,8 +163,16 @@ function invokeSiteUpdateMethod(SiteUpdateCommand $command, string $method, arra ], ]); + // The builder quotes each package with escapeshellarg(), whose quoting style + // is platform specific, so the expectation is quoted the same way. + $quoted = implode(' ', array_map('escapeshellarg', [ + 'evolution-cms/eai:1.2.3', + 'seiger/stask:1.0.10', + 'seiger/scommerce', + ])); + expect($command) - ->toBe("composer update 'evolution-cms/eai:1.2.3' 'seiger/stask:1.0.10' 'seiger/scommerce' --with-all-dependencies --no-dev --no-interaction --prefer-dist --optimize-autoloader --classmap-authoritative --no-scripts"); + ->toBe("composer update {$quoted} --with-all-dependencies --no-dev --no-interaction --prefer-dist --optimize-autoloader --classmap-authoritative --no-scripts"); $composerBinary === false ? putenv('COMPOSER_BINARY') : putenv('COMPOSER_BINARY=' . $composerBinary); $composerBin === false ? putenv('COMPOSER_BIN') : putenv('COMPOSER_BIN=' . $composerBin); @@ -175,10 +183,12 @@ function invokeSiteUpdateMethod(SiteUpdateCommand $command, string $method, arra putenv('COMPOSER_BINARY=/home/evo/.composer/composer'); + $binary = escapeshellarg('/home/evo/.composer/composer'); + expect(invokeSiteUpdateMethod($this->command, 'composerInstallCommand')) - ->toBe("'/home/evo/.composer/composer' install --no-dev --no-interaction --prefer-dist --optimize-autoloader --classmap-authoritative --no-scripts"); + ->toBe("{$binary} install --no-dev --no-interaction --prefer-dist --optimize-autoloader --classmap-authoritative --no-scripts"); expect(invokeSiteUpdateMethod($this->command, 'composerDumpAutoloadCommand')) - ->toBe("'/home/evo/.composer/composer' dump-autoload -o --no-dev --classmap-authoritative --no-scripts"); + ->toBe("{$binary} dump-autoload -o --no-dev --classmap-authoritative --no-scripts"); $composerBinary === false ? putenv('COMPOSER_BINARY') : putenv('COMPOSER_BINARY=' . $composerBinary); }); diff --git a/core/tests/Unit/Console/VendorPublishManifestTest.php b/core/tests/Unit/Console/VendorPublishManifestTest.php index 530be937bd..9a97da48c4 100644 --- a/core/tests/Unit/Console/VendorPublishManifestTest.php +++ b/core/tests/Unit/Console/VendorPublishManifestTest.php @@ -5,8 +5,9 @@ expect($source) ->toContain('vendor-publish/manifest.json') - ->toContain('recordPublishedItem($from, $to, \'file\'') - ->toContain('recordPublishedItem($source,') + ->toContain('protected function recordPublishedItem($from, $to, $type, $action, $existedBefore)') + ->toMatch('/recordPublishedItem\(\s*\$from,\s*\$to,\s*\'file\',/') + ->toMatch('/recordPublishedItem\(\s*\$source,/') ->toContain('package_version') ->toContain('composer.lock') ->toContain('writePublishManifest()'); diff --git a/core/tests/Unit/CoreTest.php b/core/tests/Unit/CoreTest.php index 630e6e2ad7..3f83f8fd18 100644 --- a/core/tests/Unit/CoreTest.php +++ b/core/tests/Unit/CoreTest.php @@ -45,7 +45,12 @@ define('EVO_CLASS', 'Tests\Mocks\MockDocumentParser'); } + // core/vendor is the dependency tree the CMS ships with; the root vendor/ + // only holds the static-analysis tools and is absent on the test runners. $autoload = EVO_CORE_PATH . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; + if (!file_exists($autoload)) { + $autoload = EVO_BASE_PATH . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; + } if (!file_exists($autoload)) { throw new \RuntimeException("Run: composer install"); } diff --git a/core/tests/Unit/Install/ManagerAclBaselineRepairTest.php b/core/tests/Unit/Install/ManagerAclBaselineRepairTest.php index 4738f71f77..bb1037f0c0 100644 --- a/core/tests/Unit/Install/ManagerAclBaselineRepairTest.php +++ b/core/tests/Unit/Install/ManagerAclBaselineRepairTest.php @@ -39,8 +39,8 @@ public function testRepairMigrationBootstrapsMissingManagerAclBaseline(): void { $source = (string) file_get_contents(dirname(__DIR__, 4) . '/core/database/migrations/2026_04_12_000000_create_system_cli_tasks_tables.php'); - self::assertStringContainsString("new UserPermissionsTableSeeder()", $source); - self::assertStringContainsString("new UserRolesTableSeeder()", $source); + self::assertStringContainsString("new \\Database\\Seeders\\UserPermissionsTableSeeder()", $source); + self::assertStringContainsString("new \\Database\\Seeders\\UserRolesTableSeeder()", $source); self::assertStringContainsString("where('id', 1)", $source); self::assertStringContainsString("where('key', 'access_permissions')", $source); self::assertStringContainsString("where('role_id', 1)->where('permission', 'access_permissions')", $source); diff --git a/core/tests/Unit/Manager/UkSettingFromFileLocalizationTest.php b/core/tests/Unit/Manager/UkSettingFromFileLocalizationTest.php index a5949b3435..eae36ab8e3 100644 --- a/core/tests/Unit/Manager/UkSettingFromFileLocalizationTest.php +++ b/core/tests/Unit/Manager/UkSettingFromFileLocalizationTest.php @@ -49,7 +49,9 @@ ->toContain('GET & POST') ->not->toContain('GET & POST') ->and($_lang['email_sender_method_message']) - ->toContain('адреса, на яку буде відправлено відмову') + ->toContain('відправник конверта') + ->toContain('[(emailsender)]') + ->not->toContain('envelope sender') ->not->toContain('якиу') ->and($_lang['websignupemail_message']) ->toContain('[+uid+] та [+pwd+]') diff --git a/core/tests/Unit/Manager/ViewOptionsPanelLayoutTest.php b/core/tests/Unit/Manager/ViewOptionsPanelLayoutTest.php index c1b80fe993..a2523ba981 100644 --- a/core/tests/Unit/Manager/ViewOptionsPanelLayoutTest.php +++ b/core/tests/Unit/Manager/ViewOptionsPanelLayoutTest.php @@ -11,8 +11,8 @@ ->toContain('name="cb_icons"') ->toContain('name="fontsize"') ->and($mainCss) - ->toContain('.switchForm { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem;') - ->toContain('.switchForm .form-row { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem;') + ->toContain('.switchForm { display: flex; flex-wrap: wrap; align-items: center; padding: 0.5rem 0;') + ->toContain('.switchForm .form-row { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; margin: 0 1rem 0.25rem 0;') ->toContain('.switchForm label { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; min-height: 2rem;') ->toContain('.switchForm input[type="checkbox"], .switchForm input[type="radio"] { flex: 0 0 auto; margin: 0;') ->toContain('.switchForm .columns, .switchForm .fontsize { flex: 0 0 5rem; width: 5rem; min-width: 5rem;') diff --git a/core/tests/Unit/RemoveLocksConfirmMessageTest.php b/core/tests/Unit/RemoveLocksConfirmMessageTest.php index f77a29a8ef..58e43e4d3a 100644 --- a/core/tests/Unit/RemoveLocksConfirmMessageTest.php +++ b/core/tests/Unit/RemoveLocksConfirmMessageTest.php @@ -3,7 +3,7 @@ test('remove locks confirm dialog normalizes escaped newlines in the default manager theme', function () { $defaultThemeJs = file_get_contents(dirname(__DIR__, 3) . '/manager/media/style/default/js/evo.js'); - expect($defaultThemeJs)->toContain("confirm(modx.lang.confirm_remove_locks.replace(/\\\\n/g, '\\n'))"); + expect($defaultThemeJs)->toContain("confirm(evo.lang.confirm_remove_locks.replace(/\\\\n/g, '\\n'))"); }); test('uk manager lexicon keeps remove locks confirmation readable', function () { diff --git a/manager/views/page/system_settings/mail_templates.blade.php b/manager/views/page/system_settings/mail_templates.blade.php index 915ccfac47..b4c0ea2393 100644 --- a/manager/views/page/system_settings/mail_templates.blade.php +++ b/manager/views/page/system_settings/mail_templates.blade.php @@ -49,7 +49,7 @@ ] ], 'comment' => (isset($disabledSettings['email_method']) ? __('global.setting_from_file') . '
' : '') . - __('global.email_sender_method_message'), + __('global.email_method_message'), 'disabled' => $disabledSettings['email_method'] ?? null ])