diff --git a/boot.php b/boot.php index 36a0745d6..1716956fa 100644 --- a/boot.php +++ b/boot.php @@ -29,15 +29,6 @@ use Friendica\Core\Session; -/** - * Constant with a HTML line break. - * - * Contains a HTML line break (br) element and a real carriage return with line - * feed for the source. - * This can be used in HTML and JavaScript where needed a line break. - */ -define('EOL', "
\r\n"); - /** * @name Gravity * diff --git a/mod/wall_attach.php b/mod/wall_attach.php index 8341d7252..8a3ed7606 100644 --- a/mod/wall_attach.php +++ b/mod/wall_attach.php @@ -66,7 +66,7 @@ function wall_attach_post(App $a) { if ($r_json) { System::jsonExit(['error' => DI::l10n()->t('Permission denied.')]); } - DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.') . EOL ); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); System::exit(); } @@ -90,7 +90,7 @@ function wall_attach_post(App $a) { */ if ($filesize <= 0) { - $msg = DI::l10n()->t('Sorry, maybe your upload is bigger than the PHP configuration allows') . EOL .(DI::l10n()->t('Or - did you try to upload an empty file?')); + $msg = DI::l10n()->t('Sorry, maybe your upload is bigger than the PHP configuration allows') . '
' . (DI::l10n()->t('Or - did you try to upload an empty file?')); @unlink($src); if ($r_json) { System::jsonExit(['error' => $msg]); @@ -106,7 +106,7 @@ function wall_attach_post(App $a) { if ($r_json) { System::jsonExit(['error' => $msg]); } else { - echo $msg . EOL; + echo $msg . '
'; } System::exit(); } @@ -120,7 +120,7 @@ function wall_attach_post(App $a) { if ($r_json) { System::jsonExit(['error' => $msg]); } else { - echo $msg . EOL; + echo $msg . '
'; } System::exit(); } diff --git a/mod/wall_upload.php b/mod/wall_upload.php index befb0fceb..efea196fd 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -165,7 +165,7 @@ function wall_upload_post(App $a, $desktopmode = true) if ($r_json) { System::jsonExit(['error' => $msg]); } else { - echo $msg. EOL; + echo $msg . '
'; } System::exit(); } @@ -203,7 +203,7 @@ function wall_upload_post(App $a, $desktopmode = true) if ($r_json) { System::jsonExit(['error' => $msg]); } else { - echo $msg. EOL; + echo $msg . '
'; } System::exit(); } @@ -227,7 +227,7 @@ function wall_upload_post(App $a, $desktopmode = true) if ($r_json) { System::jsonExit(['error' => $msg]); } else { - echo $msg. EOL; + echo $msg . '
'; } System::exit(); } diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 84f75cff3..a38182849 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -261,7 +261,7 @@ class Conversation break; } - $expanded .= "\t" . ''; + $expanded .= "\t" . ''; } $o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('voting_fakelink.tpl'), [ diff --git a/src/Core/Installer.php b/src/Core/Installer.php index 9a9bdfb5f..1d29a5cf9 100644 --- a/src/Core/Installer.php +++ b/src/Core/Installer.php @@ -197,7 +197,7 @@ class Installer $result = DBStructure::install(); if ($result) { - $txt = DI::l10n()->t('You may need to import the file "database.sql" manually using phpmyadmin or mysql.') . EOL; + $txt = DI::l10n()->t('You may need to import the file "database.sql" manually using phpmyadmin or mysql.') . '
'; $txt .= DI::l10n()->t('Please see the file "doc/INSTALL.md".'); $this->addCheck($txt, false, true, htmlentities($result, ENT_COMPAT, 'UTF-8')); @@ -259,9 +259,9 @@ class Installer $help = ""; if (!$passed) { - $help .= DI::l10n()->t('Could not find a command line version of PHP in the web server PATH.') . EOL; - $help .= DI::l10n()->t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See 'Setup the worker'") . EOL; - $help .= EOL . EOL; + $help .= DI::l10n()->t('Could not find a command line version of PHP in the web server PATH.') . '
'; + $help .= DI::l10n()->t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See 'Setup the worker'") . '
'; + $help .= '

'; $tpl = Renderer::getMarkupTemplate('field_input.tpl'); /// @todo Separate backend Installer class and presentation layer/view $help .= Renderer::replaceMacros($tpl, [ @@ -279,7 +279,7 @@ class Installer [$result] = explode("\n", $result); $help = ""; if (!$passed2) { - $help .= DI::l10n()->t("PHP executable is not the php cli binary \x28could be cgi-fgci version\x29") . EOL; + $help .= DI::l10n()->t("PHP executable is not the php cli binary \x28could be cgi-fgci version\x29") . '
'; $help .= DI::l10n()->t('Found PHP version: ') . "$result"; } $this->addCheck(DI::l10n()->t('PHP cli binary'), $passed2, true, $help); @@ -295,7 +295,7 @@ class Installer $passed3 = $result == $str; $help = ""; if (!$passed3) { - $help .= DI::l10n()->t('The command line version of PHP on your system does not have "register_argc_argv" enabled.') . EOL; + $help .= DI::l10n()->t('The command line version of PHP on your system does not have "register_argc_argv" enabled.') . '
'; $help .= DI::l10n()->t('This is required for message delivery to work.'); } else { $this->phppath = $phppath; @@ -333,7 +333,7 @@ class Installer // Get private key if (!$res) { - $help .= DI::l10n()->t('Error: the "openssl_pkey_new" function on this system is not able to generate encryption keys') . EOL; + $help .= DI::l10n()->t('Error: the "openssl_pkey_new" function on this system is not able to generate encryption keys') . '
'; $help .= DI::l10n()->t('If running under Windows, please see "http://www.php.net/manual/en/openssl.installation.php".'); $status = false; } @@ -511,10 +511,10 @@ class Installer (!file_exists('config/local.config.php') && !is_writable('.'))) { $status = false; - $help = DI::l10n()->t('The web installer needs to be able to create a file called "local.config.php" in the "config" folder of your web server and it is unable to do so.') . EOL; - $help .= DI::l10n()->t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.') . EOL; - $help .= DI::l10n()->t('At the end of this procedure, we will give you a text to save in a file named local.config.php in your Friendica "config" folder.') . EOL; - $help .= DI::l10n()->t('You can alternatively skip this procedure and perform a manual installation. Please see the file "doc/INSTALL.md" for instructions.') . EOL; + $help = DI::l10n()->t('The web installer needs to be able to create a file called "local.config.php" in the "config" folder of your web server and it is unable to do so.') . '
'; + $help .= DI::l10n()->t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.') . '
'; + $help .= DI::l10n()->t('At the end of this procedure, we will give you a text to save in a file named local.config.php in your Friendica "config" folder.') . '
'; + $help .= DI::l10n()->t('You can alternatively skip this procedure and perform a manual installation. Please see the file "doc/INSTALL.md" for instructions.') . '
'; } $this->addCheck(DI::l10n()->t('config/local.config.php is writable'), $status, false, $help); @@ -537,10 +537,10 @@ class Installer if (!is_writable('view/smarty3')) { $status = false; - $help = DI::l10n()->t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') . EOL; - $help .= DI::l10n()->t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.') . EOL; - $help .= DI::l10n()->t("Please ensure that the user that your web server runs as \x28e.g. www-data\x29 has write access to this folder.") . EOL; - $help .= DI::l10n()->t("Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files \x28.tpl\x29 that it contains.") . EOL; + $help = DI::l10n()->t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') . '
'; + $help .= DI::l10n()->t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.') . '
'; + $help .= DI::l10n()->t("Please ensure that the user that your web server runs as \x28e.g. www-data\x29 has write access to this folder.") . '
'; + $help .= DI::l10n()->t("Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files \x28.tpl\x29 that it contains.") . '
'; } $this->addCheck(DI::l10n()->t('view/smarty3 is writable'), $status, true, $help); @@ -571,7 +571,7 @@ class Installer if ($fetchResult->getReturnCode() != 204) { $status = false; - $help = DI::l10n()->t('Url rewrite in .htaccess seems not working. Make sure you copied .htaccess-dist to .htaccess.') . EOL; + $help = DI::l10n()->t('Url rewrite in .htaccess seems not working. Make sure you copied .htaccess-dist to .htaccess.') . '
'; $help .= DI::l10n()->t('In some circumstances (like running inside containers), you can skip this error.'); $error_msg = []; $error_msg['head'] = DI::l10n()->t('Error message from Curl when fetching'); diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index d14e791e2..74bd5b423 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -150,7 +150,7 @@ class DBStructure echo DI::l10n()->t("\nError %d occurred during database update:\n%s\n", DBA::errorNo(), DBA::errorMessage()); - return DI::l10n()->t('Errors encountered performing database changes: ') . $message . EOL; + return DI::l10n()->t('Errors encountered performing database changes: ') . $message . '
'; } /** diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 434c2b1f6..ca23c09f6 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -2853,30 +2853,30 @@ class Contact // do we have enough information? if (empty($protocol) || ($protocol == Protocol::PHANTOM) || (empty($ret['url']) && empty($ret['addr']))) { - $result['message'] .= DI::l10n()->t('The profile address specified does not provide adequate information.') . EOL; + $result['message'] .= DI::l10n()->t('The profile address specified does not provide adequate information.') . '
'; if (empty($ret['poll'])) { - $result['message'] .= DI::l10n()->t('No compatible communication protocols or feeds were discovered.') . EOL; + $result['message'] .= DI::l10n()->t('No compatible communication protocols or feeds were discovered.') . '
'; } if (empty($ret['name'])) { - $result['message'] .= DI::l10n()->t('An author or name was not found.') . EOL; + $result['message'] .= DI::l10n()->t('An author or name was not found.') . '
'; } if (empty($ret['url'])) { - $result['message'] .= DI::l10n()->t('No browser URL could be matched to this address.') . EOL; + $result['message'] .= DI::l10n()->t('No browser URL could be matched to this address.') . '
'; } if (strpos($ret['url'], '@') !== false) { - $result['message'] .= DI::l10n()->t('Unable to match @-style Identity Address with a known protocol or email contact.') . EOL; - $result['message'] .= DI::l10n()->t('Use mailto: in front of address to force email check.') . EOL; + $result['message'] .= DI::l10n()->t('Unable to match @-style Identity Address with a known protocol or email contact.') . '
'; + $result['message'] .= DI::l10n()->t('Use mailto: in front of address to force email check.') . '
'; } return $result; } if ($protocol === Protocol::OSTATUS && DI::config()->get('system', 'ostatus_disabled')) { - $result['message'] .= DI::l10n()->t('The profile address specified belongs to a network which has been disabled on this site.') . EOL; + $result['message'] .= DI::l10n()->t('The profile address specified belongs to a network which has been disabled on this site.') . '
'; $ret['notify'] = ''; } if (!$ret['notify']) { - $result['message'] .= DI::l10n()->t('Limited profile. This person will be unable to receive direct/personal notifications from you.') . EOL; + $result['message'] .= DI::l10n()->t('Limited profile. This person will be unable to receive direct/personal notifications from you.') . '
'; } $writeable = ((($protocol === Protocol::OSTATUS) && ($ret['notify'])) ? 1 : 0); @@ -2935,7 +2935,7 @@ class Contact $contact = DBA::selectFirst('contact', [], ['url' => $ret['url'], 'network' => $ret['network'], 'uid' => $uid]); if (!DBA::isResult($contact)) { - $result['message'] .= DI::l10n()->t('Unable to retrieve contact information.') . EOL; + $result['message'] .= DI::l10n()->t('Unable to retrieve contact information.') . '
'; return $result; } diff --git a/src/Model/User.php b/src/Model/User.php index 5bd84466f..005e3bbf3 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -994,7 +994,7 @@ class User try { $authurl = $openid->authUrl(); } catch (Exception $e) { - throw new Exception(DI::l10n()->t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . EOL . EOL . DI::l10n()->t('The error message was:') . $e->getMessage(), 0, $e); + throw new Exception(DI::l10n()->t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . '
' . DI::l10n()->t('The error message was:') . $e->getMessage(), 0, $e); } System::externalRedirect($authurl); // NOTREACHED diff --git a/src/Module/Install.php b/src/Module/Install.php index 843cee9f1..1631cfe7f 100644 --- a/src/Module/Install.php +++ b/src/Module/Install.php @@ -337,7 +337,7 @@ class Install extends BaseModule if (count($this->installer->getChecks()) == 0) { $txt = '

'; - $txt .= $this->t('Your Friendica site database has been installed.') . EOL; + $txt .= $this->t('Your Friendica site database has been installed.') . '
'; $db_return_text .= $txt; } diff --git a/src/Object/EMail/ItemCCEMail.php b/src/Object/EMail/ItemCCEMail.php index 927a068d7..fd4baa0b9 100644 --- a/src/Object/EMail/ItemCCEMail.php +++ b/src/Object/EMail/ItemCCEMail.php @@ -41,8 +41,8 @@ class ItemCCEMail extends Email $disclaimer = '


' . $l10n->t('This message was sent to you by %s, a member of the Friendica social network.', $user['username']) . '
'; - $disclaimer .= $l10n->t('You may visit them online at %s', $baseUrl . '/profile/' . $a->getLoggedInUserNickname()) . EOL; - $disclaimer .= $l10n->t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . EOL; + $disclaimer .= $l10n->t('You may visit them online at %s', $baseUrl . '/profile/' . $a->getLoggedInUserNickname()) . '
'; + $disclaimer .= $l10n->t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . '
'; if (!$item['title'] == '') { $subject = $item['title']; } else {