]> git.mxchange.org Git - friendica.git/blobdiff - mod/tagger.php
Merge pull request #11973 from MrPetovan/task/test-fixDateFormat
[friendica.git] / mod / tagger.php
index d55e34f78bd1d2dfa1f68ade73b5d6c939d07e00..e0d95ce662ff4fe928b8ae37d1010b3724c21581 100644 (file)
@@ -1,6 +1,6 @@
 <?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
  *
@@ -51,7 +51,7 @@ function tagger_content(App $a) {
 
        $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]);
@@ -69,11 +69,11 @@ function tagger_content(App $a) {
 
        $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 );
@@ -167,6 +167,5 @@ EOT;
        $post = Post::selectFirst(['uri-id', 'uid'], ['id' => $post_id]);
 
        Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, $post['uri-id'], $post['uid']);
-
-       exit();
+       System::exit();
 }