diff --git a/boot.php b/boot.php index cbaeeff0aa..73f83e978a 100644 --- a/boot.php +++ b/boot.php @@ -35,7 +35,7 @@ use Friendica\Util\DateTimeFormat; define('FRIENDICA_PLATFORM', 'Friendica'); define('FRIENDICA_CODENAME', 'The Tazmans Flax-lily'); -define('FRIENDICA_VERSION', '2018.12-rc'); +define('FRIENDICA_VERSION', '2019.01-rc'); define('DFRN_PROTOCOL_VERSION', '2.23'); define('NEW_UPDATE_ROUTINE_VERSION', 1170); @@ -870,4 +870,4 @@ function rdirname($path, $levels = 1) } else { return dirname($path); } -} \ No newline at end of file +} diff --git a/doc/de/FAQ.md b/doc/de/FAQ.md index 0c77635ccb..0317a35be0 100644 --- a/doc/de/FAQ.md +++ b/doc/de/FAQ.md @@ -8,6 +8,7 @@ Nutzer * **[Warum erhalte ich Warnungen über fehlende Zertifikate?](help/FAQ#ssl)** * **[Wie kann ich Bilder, Dateien, Links, Video und Audio in Beiträge einfügen?](help/FAQ#upload)** * **[Ist es möglich, bei mehreren Profilen verschiedene Avatare (Nutzerbilder) zu haben?](help/FAQ#avatars)** +* **[Wie kann ich Friendica in einer bestimmten Sprache ansehen?](help/FAQ#language)** * **[Was ist der Unterschied zwischen blockierten|ignorierten|archivierten|versteckten Kontakten?](help/FAQ#contacts)** * **[Was passiert, wenn ein Account gelöscht ist? Ist dieser richtig gelöscht?](help/FAQ#removed)** * **[Kann ich einem Hashtag folgen?](help/FAQ#hashtag)** @@ -90,6 +91,31 @@ Anschließend siehst Du eine Seite mit allen Infos zu diesem Profil. Klicke nun oben auf den Link "Profilbild ändern" und lade im nächsten Fenster ein Bild von Deinem PC hoch. Um Deine privaten Daten zu schützen, wird in Beiträgen nur das Bild aus Deinem öffentlichen Profil angezeigt. + +### Wie kann ich Friendica in einer bestimmten Sprache ansehen? + +Die Sprache des Friendica Interfaces kann durch den `lang` Parameter un der URL beeinflusst werden. +Das Argument des Parameters ist ein [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) Code. +Zwischen der URL und dem Parameter muss ein Fragezeichen als Trennzeichen verwendet werden. + +Ein Beispiel: + + https://social.example.com/profile/example + +auf Deutsch: + + https://social.example.com/profile/example?lang=de. + +Wenn das Fragezeichen bereits in der URL verwendet wird, werden die einzelnen URL Parameter mit einem kaufmännischen Und getrennt werden. + +Ein Beispiel: + + https://social.example.com/profile/example?tab=profile + +auf Deutsch: + + https://social.example.com/profile/example?tab=profile&lang=de. + ### Was ist der Unterschied zwischen blockierten|ignorierten|archivierten|versteckten Kontakten? diff --git a/doc/translations.md b/doc/translations.md index 24b3d8b75d..9ecd8f6d49 100644 --- a/doc/translations.md +++ b/doc/translations.md @@ -20,7 +20,7 @@ Thank you for your interest in improving Friendica's translation! Please register a free Transifex account and ask over at [the Transifex Friendica page](https://www.transifex.com/Friendica/friendica/dashboard/) to join the translation team for your favorite language. As a rule of thumb, we add support for a language in Friendica when at least 50% of the strings have been translated to avoid a scattered experience. -For addons, we add support for a language when all the strings for this addon have been translated and only if we already support the language in Friendica. +For addons, we add support for a language when if we already support the language in Friendica. ## Add new translation strings diff --git a/mod/admin.php b/mod/admin.php index c0ad281d3b..1cbe24e71d 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1752,7 +1752,7 @@ function admin_page_users_post(App $a) Thank you and welcome to %4$s.')); $preamble = sprintf($preamble, $user['username'], Config::get('config', 'sitename')); - $body = sprintf($body, System::baseUrl(), $user['email'], $result['password'], Config::get('config', 'sitename')); + $body = sprintf($body, System::baseUrl(), $user['nickname'], $result['password'], Config::get('config', 'sitename')); notification([ 'type' => SYSTEM_EMAIL, diff --git a/mod/lostpass.php b/mod/lostpass.php index 3803ebeeef..cb2dd3ca3c 100644 --- a/mod/lostpass.php +++ b/mod/lostpass.php @@ -21,7 +21,7 @@ function lostpass_post(App $a) } $condition = ['(`email` = ? OR `nickname` = ?) AND `verified` = 1 AND `blocked` = 0', $loginame, $loginame]; - $user = DBA::selectFirst('user', ['uid', 'username', 'email', 'language'], $condition); + $user = DBA::selectFirst('user', ['uid', 'username', 'nickname', 'email', 'language'], $condition); if (!DBA::isResult($user)) { notice(L10n::t('No valid account found.') . EOL); $a->internalRedirect(); @@ -63,7 +63,7 @@ function lostpass_post(App $a) The login details are as follows: Site Location: %2$s - Login Name: %3$s', $resetlink, System::baseUrl(), $user['email'])); + Login Name: %3$s', $resetlink, System::baseUrl(), $user['nickname'])); notification([ 'type' => SYSTEM_EMAIL, @@ -85,7 +85,7 @@ function lostpass_content(App $a) if ($a->argc > 1) { $pwdreset_token = $a->argv[1]; - $user = DBA::selectFirst('user', ['uid', 'username', 'email', 'pwdreset_time', 'language'], ['pwdreset' => $pwdreset_token]); + $user = DBA::selectFirst('user', ['uid', 'username', 'nickname', 'email', 'pwdreset_time', 'language'], ['pwdreset' => $pwdreset_token]); if (!DBA::isResult($user)) { notice(L10n::t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed.")); @@ -161,7 +161,7 @@ function lostpass_generate_password($user) Password: %3$s You may change that password from your account settings page after logging in. - ', System::baseUrl(), $user['email'], $new_password)); + ', System::baseUrl(), $user['nickname'], $new_password)); notification([ 'type' => SYSTEM_EMAIL, diff --git a/src/Core/Theme.php b/src/Core/Theme.php index bfff67058d..1ea39d606c 100644 --- a/src/Core/Theme.php +++ b/src/Core/Theme.php @@ -6,6 +6,7 @@ namespace Friendica\Core; +use Friendica\BaseObject; use Friendica\Core\Logger; use Friendica\Core\System; @@ -191,11 +192,16 @@ class Theme */ public static function getStylesheetPath($theme) { - $a = \get_app(); + $a = BaseObject::getApp(); $opts = (($a->profile_uid) ? '?f=&puid=' . $a->profile_uid : ''); if (file_exists('view/theme/' . $theme . '/style.php')) { - return 'view/theme/' . $theme . '/style.pcss' . $opts; + if ($a->is_mobile) { + // Workaround for iOS Safari not sending the cookie for static files + return 'view/theme/' . $theme . '/style' . $opts; + } else { + return 'view/theme/' . $theme . '/style.pcss' . $opts; + } } return 'view/theme/' . $theme . '/style.css'; diff --git a/src/Model/APContact.php b/src/Model/APContact.php index bbaf6dad62..5f47313dc8 100644 --- a/src/Model/APContact.php +++ b/src/Model/APContact.php @@ -61,7 +61,7 @@ class APContact extends BaseObject * Fetches a profile from a given url * * @param string $url profile url - * @param boolean $update true = always update, false = never update, null = update when not found + * @param boolean $update true = always update, false = never update, null = update when not found or outdated * @return array profile array */ public static function getByURL($url, $update = null) @@ -71,18 +71,22 @@ class APContact extends BaseObject } if (empty($update)) { + if (is_null($update)) { + $ref_update = DateTimeFormat::utc('now - 1 month'); + } else { + $ref_update = DBA::NULL_DATETIME; + } + $apcontact = DBA::selectFirst('apcontact', [], ['url' => $url]); - if (DBA::isResult($apcontact)) { - return $apcontact; + if (!DBA::isResult($apcontact)) { + $apcontact = DBA::selectFirst('apcontact', [], ['alias' => $url]); } - $apcontact = DBA::selectFirst('apcontact', [], ['alias' => $url]); - if (DBA::isResult($apcontact)) { - return $apcontact; + if (!DBA::isResult($apcontact)) { + $apcontact = DBA::selectFirst('apcontact', [], ['addr' => $url]); } - $apcontact = DBA::selectFirst('apcontact', [], ['addr' => $url]); - if (DBA::isResult($apcontact)) { + if (DBA::isResult($apcontact) && ($apcontact['updated'] > $ref_update)) { return $apcontact; } @@ -185,6 +189,22 @@ class APContact extends BaseObject // Update some data in the contact table with various ways to catch them all $contact_fields = ['name' => $apcontact['name'], 'about' => $apcontact['about']]; + + // Fetch the type and match it with the contact type + $contact_types = array_keys(ActivityPub::ACCOUNT_TYPES, $apcontact['type']); + if (!empty($contact_types)) { + $contact_type = array_pop($contact_types); + if (is_int($contact_type)) { + $contact_fields['contact-type'] = $contact_type; + + // Resetting the 'forum' and 'prv' field when it isn't a forum + if ($contact_fields['contact-type'] != Contact::ACCOUNT_TYPE_COMMUNITY) { + $contact_fields['forum'] = false; + $contact_fields['prv'] = false; + } + } + } + DBA::update('contact', $contact_fields, ['nurl' => Strings::normaliseLink($url)]); $contacts = DBA::select('contact', ['uid', 'id'], ['nurl' => Strings::normaliseLink($url)]); @@ -194,6 +214,9 @@ class APContact extends BaseObject DBA::close($contacts); // Update the gcontact table + // These two fields don't exist in the gcontact table + unset($contact_fields['forum']); + unset($contact_fields['prv']); DBA::update('gcontact', $contact_fields, ['nurl' => Strings::normaliseLink($url)]); Logger::log('Updated profile for ' . $url, Logger::DEBUG); diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 36840c17fa..49fb868e3a 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -514,6 +514,10 @@ class Profile $p['address'] = $p['location']; } + if (isset($p['address'])) { + $p['address'] = BBCode::convert($p['address']); + } + if (isset($p['photo'])) { $p['photo'] = ProxyUtils::proxifyUrl($p['photo'], false, ProxyUtils::SIZE_SMALL); } diff --git a/src/Model/User.php b/src/Model/User.php index 49a486cba2..edf28969c2 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -771,7 +771,7 @@ class User If you ever want to delete your account, you can do so at %3$s/removeme Thank you and welcome to %2$s.', - $user['email'], $sitename, $siteurl, $user['username'], $password + $user['nickname'], $sitename, $siteurl, $user['username'], $password )); return notification([ diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 410f5878bb..06c6ee2417 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -642,7 +642,7 @@ class Contact extends BaseModule '$profileurllabel'=> L10n::t('Profile URL'), '$profileurl' => $contact['url'], '$account_type' => Model\Contact::getAccountType($contact), - '$location' => $contact['location'], + '$location' => BBCode::convert($contact['location']), '$location_label' => L10n::t('Location:'), '$xmpp' => BBCode::convert($contact['xmpp']), '$xmpp_label' => L10n::t('XMPP:'), diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 95085c4e75..ed58350341 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -1326,15 +1326,8 @@ class Diaspora $x = false; } - // This will work for older Diaspora and Friendica servers if (!$x) { - $source_url = $server."/p/".urlencode($guid).".xml"; - Logger::log("Fetch post from ".$source_url, Logger::DEBUG); - - $x = Network::fetchUrl($source_url); - if (!$x) { - return false; - } + return false; } $source_xml = XML::parseString($x); diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index 79fb94cf8a..458fee1620 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -1228,7 +1228,7 @@ class OStatus { $siteinfo = BBCode::getAttachedData($body); - if (($siteinfo["type"] == "photo")) { + if (($siteinfo["type"] == "photo") && (!empty($siteinfo["preview"]) || !empty($siteinfo["image"]))) { if (isset($siteinfo["preview"])) { $preview = $siteinfo["preview"]; } else { diff --git a/view/templates/contact_edit.tpl b/view/templates/contact_edit.tpl index 6f63dde2b6..644121cadd 100644 --- a/view/templates/contact_edit.tpl +++ b/view/templates/contact_edit.tpl @@ -53,7 +53,7 @@ {{* Some information about the contact from the profile *}}
{{$profileurllabel}}
{{$profileurl}}
- {{if $location}}
{{$location_label}}
{{$location}}
{{/if}} + {{if $location}}
{{$location_label}}
{{$location nofilter}}
{{/if}} {{if $xmpp}}
{{$xmpp_label}}
{{$xmpp}}
{{/if}} {{if $keywords}}
{{$keywords_label}}
{{$keywords}}
{{/if}} {{if $about}}
{{$about_label}}
{{$about nofilter}}
{{/if}} diff --git a/view/templates/head.tpl b/view/templates/head.tpl index e76b97b8b9..8631d76093 100644 --- a/view/templates/head.tpl +++ b/view/templates/head.tpl @@ -19,7 +19,7 @@
{{$location}}
- {{if $profile.address}}
{{$profile.address}}
{{/if}} + {{if $profile.address}}
{{$profile.address nofilter}}
{{/if}} {{$profile.locality}}{{if $profile.locality}}, {{/if}} {{$profile.region}} diff --git a/view/theme/duepuntozero/templates/profile_vcard.tpl b/view/theme/duepuntozero/templates/profile_vcard.tpl index a7d0a0bc5a..d80b8feed2 100644 --- a/view/theme/duepuntozero/templates/profile_vcard.tpl +++ b/view/theme/duepuntozero/templates/profile_vcard.tpl @@ -15,7 +15,7 @@ {{if $location}}
{{$location}}
- {{if $profile.address}}
{{$profile.address}}
{{/if}} + {{if $profile.address}}
{{$profile.address nofilter}}
{{/if}} {{$profile.locality}}{{if $profile.locality}}, {{/if}} {{$profile.region}} diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index e8f004f157..cfb404f9fe 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -2087,8 +2087,8 @@ ul.dropdown-menu li:hover { } /* Notificaiotn badges */ -.nav-notify .show { - display: block; +#mail-update-li.show { + display: inline-block!important; } /* Media Classes */ diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index d10639c8fe..0965f3a3e8 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -439,10 +439,10 @@ function justifyPhotos() { margins: 3, border: 0, sizeRangeSuffixes: { - 'lt100': '-2', - 'lt240': '-2', + 'lt48': '-6', + 'lt80': '-5', + 'lt300': '-4', 'lt320': '-2', - 'lt500': '', 'lt640': '-1', 'lt1024': '-0' } diff --git a/view/theme/frio/templates/contact_edit.tpl b/view/theme/frio/templates/contact_edit.tpl index 70ebdcd0c8..92ff615a98 100644 --- a/view/theme/frio/templates/contact_edit.tpl +++ b/view/theme/frio/templates/contact_edit.tpl @@ -88,7 +88,7 @@

{{$location_label}}
-
{{$location}}
+
{{$location nofilter}}
{{/if}} diff --git a/view/theme/frio/templates/head.tpl b/view/theme/frio/templates/head.tpl index d8f8b1d82d..e1805f744f 100644 --- a/view/theme/frio/templates/head.tpl +++ b/view/theme/frio/templates/head.tpl @@ -40,7 +40,7 @@ - {{if $profile.address}}{{$profile.address}}{{/if}} + {{if $profile.address}}{{$profile.address nofilter}}{{/if}} {{$profile.locality}}{{if $profile.locality}}, {{/if}} {{$profile.region}} diff --git a/view/theme/quattro/templates/profile_vcard.tpl b/view/theme/quattro/templates/profile_vcard.tpl index 68028fe91e..927047cd33 100644 --- a/view/theme/quattro/templates/profile_vcard.tpl +++ b/view/theme/quattro/templates/profile_vcard.tpl @@ -38,7 +38,7 @@ {{if $location}}
{{$location}}
- {{if $profile.address}}
{{$profile.address}}
{{/if}} + {{if $profile.address}}
{{$profile.address nofilter}}
{{/if}} {{$profile.locality}}{{if $profile.locality}}, {{/if}} {{$profile.region}} diff --git a/view/theme/vier/mobile.css b/view/theme/vier/mobile.css index b528ca4bd0..bf79222876 100644 --- a/view/theme/vier/mobile.css +++ b/view/theme/vier/mobile.css @@ -60,8 +60,8 @@ nav ul { .wall-item-container .wall-item-content .type-link img.attachment-image, .type-link img.attachment-image, .type-video img.attachment-image { max-width: 350px; } - a.desktop-view { display: none; } - a.mobile-view { display: initial; } + .desktop-view { display: none; } + .mobile-view { display: initial; } #nav-apps-link { display: none; } .wall-item-container .wall-item-info { width: auto; } diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 6c4f2b20f3..eedbe09a45 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -365,10 +365,12 @@ pre code { box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); } +.desktop-view { display: none; } + /* some settings for different form-factors */ @media (min-width: 601px) { - a.mobile-view { display: none }; - a.desktop-view { display: initial }; + .mobile-view { display: none!important; } + .desktop-view { display: initial; } } /* tool */ @@ -685,8 +687,11 @@ nav .nav-menu img { margin-right: 4px; } -nav .nav-menu-icon .nav-notify { +nav .nav-menu > a > .nav-notify, +nav .nav-menu-icon > a > .nav-notify { + position: absolute; top: 3px; + right: -5px; } nav .nav-menu-label { margin: 3px 5px 0px; @@ -738,33 +743,27 @@ nav .nav-menu:hover { nav .nav-notify { display: none; - position: absolute; - /* background-color: #36c; */ - background-color: #F80; - /* background-color: #19aeff; */ + background-color: #F80; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; font-size: 10px; padding: 1px 3px; - top: 0px; - /* right: -10px; */ - right: -5px; min-width: 15px; - /* text-align: right; */ text-align: center; color: white; } - nav .nav-notify.show { - display: block; + display: inline-block; } + nav #nav-help-link, nav #nav-search-link, nav #nav-directory-link, nav #nav-apps-link, nav #nav-apps-link, nav #nav-login-link, +nav #nav-messages-linkmenu, nav #nav-notifications-linkmenu, nav #nav-site-linkmenu, nav #nav-contacts-linkmenu, @@ -845,10 +844,6 @@ nav #nav-user-linkmenu { padding: 5px 10px; */ } -#mail-update { - top: 56px; -} - .notify-unseen {background-color: #FFF; } .notify-seen { diff --git a/view/theme/vier/templates/contact_edit.tpl b/view/theme/vier/templates/contact_edit.tpl index 8fbbbfc380..a01fac9ee4 100644 --- a/view/theme/vier/templates/contact_edit.tpl +++ b/view/theme/vier/templates/contact_edit.tpl @@ -54,7 +54,7 @@ {{* Some information about the contact from the profile *}}
{{$profileurllabel}}
{{$profileurl}}
- {{if $location}}
{{$location_label}}
{{$location}}
{{/if}} + {{if $location}}
{{$location_label}}
{{$location nofilter}}
{{/if}} {{if $xmpp}}
{{$xmpp_label}}
{{$xmpp}}
{{/if}} {{if $keywords}}
{{$keywords_label}}
{{$keywords}}
{{/if}} {{if $about}}
{{$about_label}}
{{$about nofilter}}
{{/if}} diff --git a/view/theme/vier/templates/nav.tpl b/view/theme/vier/templates/nav.tpl index 777df44cd2..5f62773dbb 100644 --- a/view/theme/vier/templates/nav.tpl +++ b/view/theme/vier/templates/nav.tpl @@ -14,16 +14,20 @@ {{if $nav.home}} {{/if}} {{if $nav.network}} {{/if}} {{if $nav.events}} @@ -48,9 +52,22 @@ + {{if $nav.messages}} + + {{/if}} + + {{if $nav.notifications}} -