Merge remote-tracking branch 'upstream/2019.09-rc' into performance

This commit is contained in:
Michael 2019-09-03 15:02:16 +00:00
commit 33006d8455
9 changed files with 3716 additions and 3554 deletions

View file

@ -1,6 +1,6 @@
Version 2019.09-dev (UNRELEASED) Version 2019.09-dev (UNRELEASED)
Friendica Core: Friendica Core:
Update to the translations (CS, DE, FR, JA, NL) [translation teams] Update to the translations (CS, DE, FR, JA, NL, PL) [translation teams]
Update to the themes (frio, vier) [JeroenED, MrPetovan, tobiasd, vinzv] Update to the themes (frio, vier) [JeroenED, MrPetovan, tobiasd, vinzv]
Update to the documentation [guzzisti, vinzv] Update to the documentation [guzzisti, vinzv]
Enhanced the log output of the background process [annando] Enhanced the log output of the background process [annando]
@ -49,7 +49,7 @@ Version 2019.09-dev (UNRELEASED)
3816, 4815, 6384, 6675, 7235, 7293, 7314, 7317, 7337, 7338, 7346, 3816, 4815, 6384, 6675, 7235, 7293, 7314, 7317, 7337, 7338, 7346,
7350, 7367, 7383, 7396, 7397, 7401, 7406, 7408, 7426, 7428, 7456, 7350, 7367, 7383, 7396, 7397, 7401, 7406, 7408, 7426, 7428, 7456,
7442, 7457, 7468, 7471, 7473, 7488, 7497, 7498, 7501, 7507, 7522, 7442, 7457, 7468, 7471, 7473, 7488, 7497, 7498, 7501, 7507, 7522,
7527, 7536, 7542, 7545 7527, 7536, 7542, 7545, 7576, 7586
Version 2019.06 (2019-06-23) Version 2019.06 (2019-06-23)
Friendica Core: Friendica Core:

View file

@ -31,10 +31,11 @@ class L10n extends BaseObject
* *
* If called repeatedly, it won't save the translation strings again, just load the new ones. * If called repeatedly, it won't save the translation strings again, just load the new ones.
* *
* @param string $lang Language code
*
* @throws \Exception
* @see popLang() * @see popLang()
* @brief Stores the current language strings and load a different language. * @brief Stores the current language strings and load a different language.
* @param string $lang Language code
* @throws \Exception
*/ */
public static function pushLang($lang) public static function pushLang($lang)
{ {
@ -63,6 +64,7 @@ class L10n extends BaseObject
* *
* @param string $s * @param string $s
* @param array $vars Variables to interpolate in the translation string * @param array $vars Variables to interpolate in the translation string
*
* @return string * @return string
*/ */
public static function t($s, ...$vars) public static function t($s, ...$vars)
@ -86,6 +88,7 @@ class L10n extends BaseObject
* @param string $singular * @param string $singular
* @param string $plural * @param string $plural
* @param int $count * @param int $count
*
* @return string * @return string
* @throws \Exception * @throws \Exception
*/ */
@ -114,6 +117,7 @@ class L10n extends BaseObject
* @brief Translate days and months names. * @brief Translate days and months names.
* *
* @param string $s String with day or month name. * @param string $s String with day or month name.
*
* @return string Translated string. * @return string Translated string.
*/ */
public static function getDay($s) public static function getDay($s)
@ -125,10 +129,23 @@ class L10n extends BaseObject
* @brief Translate short days and months names. * @brief Translate short days and months names.
* *
* @param string $s String with short day or month name. * @param string $s String with short day or month name.
*
* @return string Translated string. * @return string Translated string.
*/ */
public static function getDayShort($s) public static function getDayShort($s)
{ {
return self::getClass(L10nClass::class)->getDayShort($s); return self::getClass(L10nClass::class)->getDayShort($s);
} }
/**
* Load poke verbs
*
* @return array index is present tense verb
* value is array containing past tense verb, translation of present, translation of past
* @hook poke_verbs pokes array
*/
public static function getPokeVerbs()
{
return self::getClass(L10nClass::class)->getPokeVerbs();
}
} }

View file

@ -44,15 +44,19 @@ class Search extends BaseObject
if ((filter_var($user, FILTER_VALIDATE_EMAIL) && Network::isEmailDomainValid($user)) || if ((filter_var($user, FILTER_VALIDATE_EMAIL) && Network::isEmailDomainValid($user)) ||
(substr(Strings::normaliseLink($user), 0, 7) == "http://")) { (substr(Strings::normaliseLink($user), 0, 7) == "http://")) {
/// @todo Possibly use "getIdForURL" instead?
$user_data = Probe::uri($user); $user_data = Probe::uri($user);
if (empty($user_data)) { if (empty($user_data)) {
return $emptyResultList; return $emptyResultList;
} }
if (!(in_array($user_data["network"], Protocol::FEDERATED))) { if (!in_array($user_data["network"], Protocol::FEDERATED)) {
return $emptyResultList; return $emptyResultList;
} }
// Ensure that we do have a contact entry
Contact::getIdForURL(defaults($user_data, 'url', ''));
$contactDetails = Contact::getDetailsByURL(defaults($user_data, 'url', ''), local_user()); $contactDetails = Contact::getDetailsByURL(defaults($user_data, 'url', ''), local_user());
$itemUrl = defaults($contactDetails, 'addr', defaults($user_data, 'url', '')); $itemUrl = defaults($contactDetails, 'addr', defaults($user_data, 'url', ''));
@ -63,7 +67,7 @@ class Search extends BaseObject
defaults($user_data, 'url', ''), defaults($user_data, 'url', ''),
defaults($user_data, 'photo', ''), defaults($user_data, 'photo', ''),
defaults($user_data, 'network', ''), defaults($user_data, 'network', ''),
defaults($contactDetails, 'cid', 0), defaults($contactDetails, 'id', 0),
0, 0,
defaults($user_data, 'tags', '') defaults($user_data, 'tags', '')
); );

View file

@ -111,7 +111,7 @@ class ItemDeliveryData
* @return bool * @return bool
* @throws \Exception * @throws \Exception
*/ */
public static function incrementQueueCount($item_id, $increment) public static function incrementQueueCount(int $item_id, int $increment = 1)
{ {
return DBA::e('UPDATE `item-delivery-data` SET `queue_count` = `queue_count` + ? WHERE `iid` = ?', $increment, $item_id); return DBA::e('UPDATE `item-delivery-data` SET `queue_count` = `queue_count` + ? WHERE `iid` = ?', $increment, $item_id);
} }

View file

@ -55,7 +55,7 @@ class Diaspora
* *
* @param array $contact of the relay contact * @param array $contact of the relay contact
*/ */
public static function markRelayForArchival($contact) public static function markRelayForArchival(array $contact)
{ {
if (!empty($contact['contact-type']) && ($contact['contact-type'] == Contact::TYPE_RELAY)) { if (!empty($contact['contact-type']) && ($contact['contact-type'] == Contact::TYPE_RELAY)) {
// This is already the relay contact, we don't need to fetch it // This is already the relay contact, we don't need to fetch it
@ -175,7 +175,7 @@ class Diaspora
* @return array with the contact * @return array with the contact
* @throws \Exception * @throws \Exception
*/ */
private static function getRelayContact($server_url, $fields = ['batch', 'id', 'name', 'network', 'protocol', 'archive', 'blocked']) private static function getRelayContact(string $server_url, array $fields = ['batch', 'id', 'name', 'network', 'protocol', 'archive', 'blocked'])
{ {
// Fetch the relay contact // Fetch the relay contact
$condition = ['uid' => 0, 'nurl' => Strings::normaliseLink($server_url), $condition = ['uid' => 0, 'nurl' => Strings::normaliseLink($server_url),

View file

@ -211,7 +211,13 @@ class Delivery extends BaseObject
return; return;
} }
private static function setFailedQueue($cmd, $id) /**
* Increased the "failed" counter in the item delivery data
*
* @param string $cmd Command
* @param integer $id Item id
*/
private static function setFailedQueue(string $cmd, int $id)
{ {
if (!in_array($cmd, [Delivery::POST, Delivery::POKE])) { if (!in_array($cmd, [Delivery::POST, Delivery::POKE])) {
return; return;

View file

@ -4,14 +4,14 @@
# #
# Translators: # Translators:
# Antron Samurai <rock_spring_fu@yahoo.co.jp>, 2018 # Antron Samurai <rock_spring_fu@yahoo.co.jp>, 2018
# Ozero Dien <rgfx0020+misc@gmail.com>, 2019 # ozero dien <rgfx0020+misc@gmail.com>, 2019
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: friendica\n" "Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-06 16:52+0200\n" "POT-Creation-Date: 2019-08-06 16:52+0200\n"
"PO-Revision-Date: 2019-08-29 13:02+0000\n" "PO-Revision-Date: 2019-08-29 13:02+0000\n"
"Last-Translator: Ozero Dien <rgfx0020+misc@gmail.com>\n" "Last-Translator: ozero dien <rgfx0020+misc@gmail.com>\n"
"Language-Team: Japanese (http://www.transifex.com/Friendica/friendica/language/ja/)\n" "Language-Team: Japanese (http://www.transifex.com/Friendica/friendica/language/ja/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff