$arr['network'] = trim(defaults($arr, 'network', NETWORK_PHANTOM));
}
- if ($notify) {
- $guid_prefix = "";
- } elseif ((trim($arr['guid']) == "") && (trim($arr['plink']) != "")) {
+ $guid_prefix = '';
+ if ((trim($arr['guid']) == "") && (trim($arr['plink']) != "")) {
$arr['guid'] = self::guidFromUri($arr['plink']);
} elseif ((trim($arr['guid']) == "") && (trim($arr['uri']) != "")) {
$arr['guid'] = self::guidFromUri($arr['uri']);
$arr['thr-parent'] = $arr['parent-uri'];
+ $notify_type = '';
+ $allow_cid = '';
+ $allow_gid = '';
+ $deny_cid = '';
+ $deny_gid = '';
if ($arr['parent-uri'] === $arr['uri']) {
$parent_id = 0;
$parent_deleted = 0;
private static function updateContact($arr)
{
// Unarchive the author
- $contact = dba::selectFirst('contact', [], ['id' => $arr["author-link"]]);
- if ($contact['term-date'] > NULL_DATE) {
- Contact::unmarkForArchival($contact);
+ $contact = dba::selectFirst('contact', [], ['id' => $arr["author-id"]]);
+ if (DBM::is_result($contact)) {
+ Contact::unmarkForArchival($contact);
}
- // Unarchive the contact if it is a toplevel posting
- if ($arr["parent-uri"] === $arr["uri"]) {
- $contact = dba::selectFirst('contact', [], ['id' => $arr["contact-id"]]);
- if ($contact['term-date'] > NULL_DATE) {
- Contact::unmarkForArchival($contact);
- }
+ // Unarchive the contact if it's not our own contact
+ $contact = dba::selectFirst('contact', [], ['id' => $arr["contact-id"], 'self' => false]);
+ if (DBM::is_result($contact)) {
+ Contact::unmarkForArchival($contact);
}
$update = (!$arr['private'] && (($arr["author-link"] === $arr["owner-link"]) || ($arr["parent-uri"] === $arr["uri"])));