<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
$item_id = ((DI::args()->getArgc() > 1) ? trim(DI::args()->getArgv()[1]) : 0);
- Logger::notice('tagger: tag ' . $term . ' item ' . $item_id);
+ Logger::info('tagger: tag', ['term' => $term, 'item' => $item_id]);
$item = Post::selectFirst([], ['id' => $item_id]);
$contact = Contact::selectFirst([], ['self' => true, 'uid' => local_user()]);
if (!DBA::isResult($contact)) {
- Logger::notice('tagger: no contact_id');
+ Logger::warning('Self contact not found.', ['uid' => local_user()]);
return;
}
- $uri = Item::newURI($owner_uid);
+ $uri = Item::newURI();
$xterm = XML::escape($term);
$post_type = (($item['resource-id']) ? DI::l10n()->t('photo') : DI::l10n()->t('status'));
$targettype = (($item['resource-id']) ? Activity\ObjectType::IMAGE : Activity\ObjectType::NOTE );
$post = Post::selectFirst(['uri-id', 'uid'], ['id' => $post_id]);
Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, $post['uri-id'], $post['uid']);
-
- exit();
+ System::exit();
}