]> git.mxchange.org Git - friendica.git/blobdiff - mod/tagger.php
We got rid of two workerqueue queries, yeah!
[friendica.git] / mod / tagger.php
index d44288ef0aabc146fe49109b5fe87d310b49ab9c..e6619f9fe2d37a148724da85467a21fcca81176f 100644 (file)
@@ -1,11 +1,12 @@
 <?php
 
+use Friendica\App;
+
 require_once('include/security.php');
 require_once('include/bbcode.php');
 require_once('include/items.php');
 
-
-function tagger_content(&$a) {
+function tagger_content(App $a) {
 
        if(! local_user() && ! remote_user()) {
                return;
@@ -60,7 +61,7 @@ function tagger_content(&$a) {
        $uri = item_new_uri($a->get_hostname(),$owner_uid);
        $xterm = xmlify($term);
        $post_type = (($item['resource-id']) ? t('photo') : t('status'));
-       $targettype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
+       $targettype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
 
        $link = xmlify('<link rel="alternate" type="text/html" href="'
                . App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
@@ -94,8 +95,9 @@ EOT;
 
        $bodyverb = t('%1$s tagged %2$s\'s %3$s with %4$s');
 
-       if(! isset($bodyverb))
-                       return;
+       if (! isset($bodyverb)) {
+               return;
+       }
 
        $termlink = html_entity_decode('&#x2317;') . '[url=' . App::get_baseurl() . '/search?tag=' . urlencode($term) . ']'. $term . '[/url]';