Merge branch 'dev' into nomadic

This commit is contained in:
Mike Macgirvin 2024-05-11 08:25:34 +10:00
commit 9b1e705937
2 changed files with 9 additions and 1 deletions

View file

@ -931,6 +931,8 @@ function builtin_activity_puller($item, &$conv_responses)
$url = '';
if (!$item['author']['xchan_name']) {
logger('Unidentified author for item: ' . $item['id']);
logger('Unidentified item: ' . print_r($item,true), LOGGER_DATA);
continue;
}
switch ($mode) {
@ -957,7 +959,8 @@ function builtin_activity_puller($item, &$conv_responses)
}
if ((activity_match($item['verb'], $verb)) && ($item['id'] != $item['parent'])) {
$name = $item['author']['xchan_name'];
$name = $item['author']['xchan_name'] ?: t('Unknown');
$url = (($item['author_xchan'] && $item['author']['xchan_photo_s'])
? '<a class="dropdown-item" href="' . chanlink_hash($item['author_xchan']) . '">' . '<img class="menu-img-1" src="' . zid($item['author']['xchan_photo_s']) . '" alt="' . urlencode($name) . '" /> ' . $name . ' (' . relative_date($item['received']) .')</a>'
: '<a class="dropdown-item" href="#" class="disabled">' . $name . ' (' . relative_date($item['received']) . ')</a>'

View file

@ -140,6 +140,11 @@ class Profile_edit
}
}
// Normalise any line endings encountered from input.
foreach ($_POST as $key => $value) {
$_POST[$key] = str_replace("\r\n", "\n", $value);
}
$name = escape_tags(trim($_POST['name']));
if ($orig[0]['fullname'] != $name) {