]> git.mxchange.org Git - friendica.git/blobdiff - mod/tagger.php
Add pwdreset_time field to user table
[friendica.git] / mod / tagger.php
index c7e8a9469aed35207dfc48a6ca269514cd968c96..74cbd658fd4750abb8d629469cb41882da3cd8f7 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 use Friendica\App;
+use Friendica\Core\Addon;
 use Friendica\Core\System;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
@@ -17,7 +18,7 @@ function tagger_content(App $a) {
 
        $term = notags(trim($_GET['term']));
        // no commas allowed
-       $term = str_replace(array(',',' '),array('','_'),$term);
+       $term = str_replace([',',' '],['','_'],$term);
 
        if(! $term)
                return;
@@ -104,7 +105,7 @@ EOT;
 
        $termlink = html_entity_decode('&#x2317;') . '[url=' . System::baseUrl() . '/search?tag=' . urlencode($term) . ']'. $term . '[/url]';
 
-       $arr = array();
+       $arr = [];
 
        $arr['guid'] = get_guid(32);
        $arr['uri'] = $uri;
@@ -139,7 +140,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 +214,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);