mirror of
https://github.com/friendica/friendica
synced 2025-04-24 10:30:11 +00:00
Merge remote-tracking branch 'upstream/2019.12-rc' into poco-cleanup
This commit is contained in:
commit
01205f7d41
10 changed files with 9274 additions and 9321 deletions
|
@ -398,15 +398,15 @@ class BBCode extends BaseObject
|
|||
*/
|
||||
public static function removeAttachment($body, $no_link_desc = false)
|
||||
{
|
||||
return preg_replace_callback("/\[attachment (.*)\](.*?)\[\/attachment\]/ism",
|
||||
return preg_replace_callback("/\s*\[attachment (.*)\](.*?)\[\/attachment\]\s*/ism",
|
||||
function ($match) use ($no_link_desc) {
|
||||
$attach_data = self::getAttachmentData($match[0]);
|
||||
if (empty($attach_data['url'])) {
|
||||
return $match[0];
|
||||
} elseif (empty($attach_data['title']) || $no_link_desc) {
|
||||
return '[url]' . $attach_data['url'] . "[/url]\n";
|
||||
return "\n[url]" . $attach_data['url'] . "[/url]\n";
|
||||
} else {
|
||||
return '[url=' . $attach_data['url'] . ']' . $attach_data['title'] . "[/url]\n";
|
||||
return "\n[url=" . $attach_data['url'] . ']' . $attach_data['title'] . "[/url]\n";
|
||||
}
|
||||
}, $body);
|
||||
}
|
||||
|
|
|
@ -85,15 +85,20 @@ class Compose extends BaseModule
|
|||
$type = 'post';
|
||||
$doesFederate = true;
|
||||
|
||||
if ($_REQUEST['contact_allow']
|
||||
. $_REQUEST['group_allow']
|
||||
. $_REQUEST['contact_deny']
|
||||
. $_REQUEST['group_deny'])
|
||||
$contact_allow = $_REQUEST['contact_allow'] ?? '';
|
||||
$group_allow = $_REQUEST['group_allow'] ?? '';
|
||||
$contact_deny = $_REQUEST['contact_deny'] ?? '';
|
||||
$group_deny = $_REQUEST['group_deny'] ?? '';
|
||||
|
||||
if ($contact_allow
|
||||
. $group_allow
|
||||
. $contact_deny
|
||||
. $group_deny)
|
||||
{
|
||||
$contact_allow_list = $_REQUEST['contact_allow'] ? explode(',', $_REQUEST['contact_allow']) : [];
|
||||
$group_allow_list = $_REQUEST['group_allow'] ? explode(',', $_REQUEST['group_allow']) : [];
|
||||
$contact_deny_list = $_REQUEST['contact_deny'] ? explode(',', $_REQUEST['contact_deny']) : [];
|
||||
$group_deny_list = $_REQUEST['group_deny'] ? explode(',', $_REQUEST['group_deny']) : [];
|
||||
$contact_allow_list = $contact_allow ? explode(',', $contact_allow) : [];
|
||||
$group_allow_list = $group_allow ? explode(',', $group_allow) : [];
|
||||
$contact_deny_list = $contact_deny ? explode(',', $contact_deny) : [];
|
||||
$group_deny_list = $group_deny ? explode(',', $group_deny) : [];
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -562,7 +562,7 @@ class OnePoll
|
|||
}
|
||||
|
||||
// Decoding the header
|
||||
$subject = imap_mime_header_decode($meta->subject);
|
||||
$subject = imap_mime_header_decode($meta->subject ?? '');
|
||||
$datarray['title'] = "";
|
||||
foreach ($subject as $subpart) {
|
||||
if ($subpart->charset != "default") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue