]> git.mxchange.org Git - friendica.git/blobdiff - mod/tagger.php
Finish t() for mod
[friendica.git] / mod / tagger.php
index 90fd2414b8af9bbd5a951f4a4a38bb0db2b3a062..942cad2ad5b5f5957b943603949306798a92e7b2 100644 (file)
@@ -1,13 +1,17 @@
 <?php
-
+/**
+ * @file mod/tagger.php
+ */
 use Friendica\App;
+use Friendica\Core\Addon;
+use Friendica\Core\L10n;
 use Friendica\Core\System;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
 
-require_once('include/security.php');
-require_once('include/bbcode.php');
-require_once('include/items.php');
+require_once 'include/security.php';
+require_once 'include/bbcode.php';
+require_once 'include/items.php';
 
 function tagger_content(App $a) {
 
@@ -63,7 +67,7 @@ function tagger_content(App $a) {
 
        $uri = item_new_uri($a->get_hostname(),$owner_uid);
        $xterm = xmlify($term);
-       $post_type = (($item['resource-id']) ? t('photo') : t('status'));
+       $post_type = (($item['resource-id']) ? L10n::t('photo') : L10n::t('status'));
        $targettype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
 
        $link = xmlify('<link rel="alternate" type="text/html" href="'
@@ -96,7 +100,7 @@ EOT;
        </object>
 EOT;
 
-       $bodyverb = t('%1$s tagged %2$s\'s %3$s with %4$s');
+       $bodyverb = L10n::t('%1$s tagged %2$s\'s %3$s with %4$s');
 
        if (! isset($bodyverb)) {
                return;
@@ -139,7 +143,6 @@ EOT;
        $arr['deny_gid'] = $item['deny_gid'];
        $arr['visible'] = 1;
        $arr['unseen'] = 1;
-       $arr['last-child'] = 1;
        $arr['origin'] = 1;
 
        $post_id = item_store($arr);
@@ -214,7 +217,7 @@ EOT;
 
        $arr['id'] = $post_id;
 
-       call_hooks('post_local_end', $arr);
+       Addon::callHooks('post_local_end', $arr);
 
        Worker::add(PRIORITY_HIGH, "Notifier", "tag", $post_id);