mirror of
https://github.com/friendica/friendica
synced 2025-04-27 08:30:10 +00:00
Merge remote-tracking branch 'upstream/develop' into public-redir
This commit is contained in:
commit
b5b172500d
59 changed files with 18880 additions and 13205 deletions
|
@ -803,10 +803,10 @@ class Event extends BaseObject
|
|||
/**
|
||||
* @brief Format an item array with event data to HTML.
|
||||
*
|
||||
* @param arr $item Array with item and event data.
|
||||
* @param array $item Array with item and event data.
|
||||
* @return string HTML output.
|
||||
*/
|
||||
public static function getItemHTML($item) {
|
||||
public static function getItemHTML(array $item) {
|
||||
$same_date = false;
|
||||
$finish = false;
|
||||
|
||||
|
|
|
@ -1122,8 +1122,9 @@ class Item extends BaseObject
|
|||
}
|
||||
|
||||
// Is this a shadow entry?
|
||||
if ($item['uid'] == 0)
|
||||
if ($item['uid'] == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Is there a shadow parent?
|
||||
if (!dba::exists('item', ['uri' => $item['parent-uri'], 'uid' => 0])) {
|
||||
|
@ -1163,10 +1164,8 @@ class Item extends BaseObject
|
|||
|
||||
// If this was a comment to a Diaspora post we don't get our comment back.
|
||||
// This means that we have to distribute the comment by ourselves.
|
||||
if ($origin) {
|
||||
if (dba::exists('item', ['id' => $parent, 'network' => NETWORK_DIASPORA])) {
|
||||
self::distribute($public_shadow);
|
||||
}
|
||||
if ($origin && dba::exists('item', ['id' => $parent, 'network' => NETWORK_DIASPORA])) {
|
||||
self::distribute($public_shadow);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1177,14 +1176,14 @@ class Item extends BaseObject
|
|||
*/
|
||||
private static function addLanguageInPostopts(&$item)
|
||||
{
|
||||
$postopts = "";
|
||||
|
||||
if (!empty($item['postopts'])) {
|
||||
if (strstr($item['postopts'], 'lang=')) {
|
||||
// do not override
|
||||
return;
|
||||
}
|
||||
$postopts = $item['postopts'];
|
||||
} else {
|
||||
$postopts = "";
|
||||
}
|
||||
|
||||
$naked_body = Text\BBCode::toPlaintext($item['body'], false);
|
||||
|
|
|
@ -331,6 +331,7 @@ class User
|
|||
$confirm = x($data, 'confirm') ? trim($data['confirm']) : '';
|
||||
$blocked = x($data, 'blocked') ? intval($data['blocked']) : 0;
|
||||
$verified = x($data, 'verified') ? intval($data['verified']) : 0;
|
||||
$language = x($data, 'language') ? notags(trim($data['language'])) : 'en';
|
||||
|
||||
$publish = x($data, 'profile_publish_reg') && intval($data['profile_publish_reg']) ? 1 : 0;
|
||||
$netpublish = strlen(Config::get('system', 'directory')) ? $publish : 0;
|
||||
|
@ -466,6 +467,7 @@ class User
|
|||
'sprvkey' => $sprvkey,
|
||||
'verified' => $verified,
|
||||
'blocked' => $blocked,
|
||||
'language' => $language,
|
||||
'timezone' => 'UTC',
|
||||
'register_date' => DateTimeFormat::utcNow(),
|
||||
'default-location' => ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue