<?php
use Friendica\App;
+use Friendica\Core\Addon;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
$term = notags(trim($_GET['term']));
// no commas allowed
- $term = str_replace(array(',',' '),array('','_'),$term);
+ $term = str_replace([',',' '],['','_'],$term);
if(! $term)
return;
$termlink = html_entity_decode('⌗') . '[url=' . System::baseUrl() . '/search?tag=' . urlencode($term) . ']'. $term . '[/url]';
- $arr = array();
+ $arr = [];
$arr['guid'] = get_guid(32);
$arr['uri'] = $uri;
$arr['deny_gid'] = $item['deny_gid'];
$arr['visible'] = 1;
$arr['unseen'] = 1;
- $arr['last-child'] = 1;
$arr['origin'] = 1;
$post_id = item_store($arr);
$arr['id'] = $post_id;
- call_hooks('post_local_end', $arr);
+ Addon::callHooks('post_local_end', $arr);
Worker::add(PRIORITY_HIGH, "Notifier", "tag", $post_id);