X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=twitter%2Ftwitter.php;h=244eaee7d8de6536a53f9157352178fbd0e0c0d4;hb=f8c162cbfb777793891f885e019eb8eae319dce1;hp=43aee0fef502193b2734e97bda444966a714dba1;hpb=1a260ceea70ffd2ca2d38c7bca37b37c3b4959ec;p=friendica-addons.git
diff --git a/twitter/twitter.php b/twitter/twitter.php
index 43aee0fe..244eaee7 100644
--- a/twitter/twitter.php
+++ b/twitter/twitter.php
@@ -1,5 +1,4 @@
config['twitter']['consumerkey'] = 'your consumer_key here';
* $a->config['twitter']['consumersecret'] = 'your consumer_secret here';
*
- * To activate the plugin itself add it to the $a->config['system']['addon']
+ * To activate the addon itself add it to the $a->config['system']['addon']
* setting. After this, your user can configure their Twitter account settings
- * from "Settings -> Plugin Settings".
+ * from "Settings -> Addon Settings".
*
* Requirements: PHP5, curl [Slinky library]
*/
use Friendica\App;
use Friendica\Content\OEmbed;
+use Friendica\Core\Addon;
use Friendica\Core\Config;
+use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Model\GContact;
use Friendica\Model\Group;
use Friendica\Model\Photo;
+use Friendica\Model\Queue;
use Friendica\Model\User;
use Friendica\Object\Image;
@@ -78,38 +80,38 @@ define('TWITTER_DEFAULT_POLL_INTERVAL', 5); // given in minutes
function twitter_install()
{
// we need some hooks, for the configuration and for sending tweets
- register_hook('connector_settings', 'addon/twitter/twitter.php', 'twitter_settings');
- register_hook('connector_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post');
- register_hook('post_local', 'addon/twitter/twitter.php', 'twitter_post_local');
- register_hook('notifier_normal', 'addon/twitter/twitter.php', 'twitter_post_hook');
- register_hook('jot_networks', 'addon/twitter/twitter.php', 'twitter_jot_nets');
- register_hook('cron', 'addon/twitter/twitter.php', 'twitter_cron');
- register_hook('queue_predeliver', 'addon/twitter/twitter.php', 'twitter_queue_hook');
- register_hook('follow', 'addon/twitter/twitter.php', 'twitter_follow');
- register_hook('expire', 'addon/twitter/twitter.php', 'twitter_expire');
- register_hook('prepare_body', 'addon/twitter/twitter.php', 'twitter_prepare_body');
- register_hook('check_item_notification', 'addon/twitter/twitter.php', 'twitter_check_item_notification');
+ Addon::registerHook('connector_settings', 'addon/twitter/twitter.php', 'twitter_settings');
+ Addon::registerHook('connector_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post');
+ Addon::registerHook('post_local', 'addon/twitter/twitter.php', 'twitter_post_local');
+ Addon::registerHook('notifier_normal', 'addon/twitter/twitter.php', 'twitter_post_hook');
+ Addon::registerHook('jot_networks', 'addon/twitter/twitter.php', 'twitter_jot_nets');
+ Addon::registerHook('cron', 'addon/twitter/twitter.php', 'twitter_cron');
+ Addon::registerHook('queue_predeliver', 'addon/twitter/twitter.php', 'twitter_queue_hook');
+ Addon::registerHook('follow', 'addon/twitter/twitter.php', 'twitter_follow');
+ Addon::registerHook('expire', 'addon/twitter/twitter.php', 'twitter_expire');
+ Addon::registerHook('prepare_body', 'addon/twitter/twitter.php', 'twitter_prepare_body');
+ Addon::registerHook('check_item_notification', 'addon/twitter/twitter.php', 'twitter_check_item_notification');
logger("installed twitter");
}
function twitter_uninstall()
{
- unregister_hook('connector_settings', 'addon/twitter/twitter.php', 'twitter_settings');
- unregister_hook('connector_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post');
- unregister_hook('post_local', 'addon/twitter/twitter.php', 'twitter_post_local');
- unregister_hook('notifier_normal', 'addon/twitter/twitter.php', 'twitter_post_hook');
- unregister_hook('jot_networks', 'addon/twitter/twitter.php', 'twitter_jot_nets');
- unregister_hook('cron', 'addon/twitter/twitter.php', 'twitter_cron');
- unregister_hook('queue_predeliver', 'addon/twitter/twitter.php', 'twitter_queue_hook');
- unregister_hook('follow', 'addon/twitter/twitter.php', 'twitter_follow');
- unregister_hook('expire', 'addon/twitter/twitter.php', 'twitter_expire');
- unregister_hook('prepare_body', 'addon/twitter/twitter.php', 'twitter_prepare_body');
- unregister_hook('check_item_notification', 'addon/twitter/twitter.php', 'twitter_check_item_notification');
+ Addon::unregisterHook('connector_settings', 'addon/twitter/twitter.php', 'twitter_settings');
+ Addon::unregisterHook('connector_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post');
+ Addon::unregisterHook('post_local', 'addon/twitter/twitter.php', 'twitter_post_local');
+ Addon::unregisterHook('notifier_normal', 'addon/twitter/twitter.php', 'twitter_post_hook');
+ Addon::unregisterHook('jot_networks', 'addon/twitter/twitter.php', 'twitter_jot_nets');
+ Addon::unregisterHook('cron', 'addon/twitter/twitter.php', 'twitter_cron');
+ Addon::unregisterHook('queue_predeliver', 'addon/twitter/twitter.php', 'twitter_queue_hook');
+ Addon::unregisterHook('follow', 'addon/twitter/twitter.php', 'twitter_follow');
+ Addon::unregisterHook('expire', 'addon/twitter/twitter.php', 'twitter_expire');
+ Addon::unregisterHook('prepare_body', 'addon/twitter/twitter.php', 'twitter_prepare_body');
+ Addon::unregisterHook('check_item_notification', 'addon/twitter/twitter.php', 'twitter_check_item_notification');
// old setting - remove only
- unregister_hook('post_local_end', 'addon/twitter/twitter.php', 'twitter_post_hook');
- unregister_hook('plugin_settings', 'addon/twitter/twitter.php', 'twitter_settings');
- unregister_hook('plugin_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post');
+ Addon::unregisterHook('post_local_end', 'addon/twitter/twitter.php', 'twitter_post_hook');
+ Addon::unregisterHook('addon_settings', 'addon/twitter/twitter.php', 'twitter_settings');
+ Addon::unregisterHook('addon_settings_post', 'addon/twitter/twitter.php', 'twitter_settings_post');
}
function twitter_check_item_notification(App $a, &$notification_data)
@@ -151,7 +153,7 @@ function twitter_follow(App $a, &$contact)
$cb->setConsumerKey($ckey, $csecret);
$cb->setToken($otoken, $osecret);
- $parameters = array();
+ $parameters = [];
$parameters["screen_name"] = $nickname;
$user = $cb->friendships_create($parameters);
@@ -178,7 +180,7 @@ function twitter_jot_nets(App $a, &$b)
$tw_defpost = PConfig::get(local_user(), 'twitter', 'post_by_default');
$selected = ((intval($tw_defpost) == 1) ? ' checked="checked" ' : '');
$b .= '
'
- . t('Post to Twitter') . '
';
+ . L10n::t('Post to Twitter') . '';
}
}
@@ -239,7 +241,7 @@ function twitter_settings_post(App $a, $post)
PConfig::delete(local_user(), 'twitter', 'lastid');
}
- info(t('Twitter settings updated.') . EOL);
+ info(L10n::t('Twitter settings updated.') . EOL);
}
}
}
@@ -269,11 +271,11 @@ function twitter_settings(App $a, &$s)
$css = (($enabled) ? '' : '-disabled');
$s .= '';
$s .= '';
$s .= '
';
- $s .= '' . t('Twitter Import/Export/Mirror') . ' ';
+ $s .= '' . L10n::t('Twitter Import/Export/Mirror') . ' ';
$s .= ' ';
if ((!$ckey) && (!$csecret)) {
@@ -281,7 +283,7 @@ function twitter_settings(App $a, &$s)
* no global consumer keys
* display warning and skip personal config
*/
- $s .= '
' . t('No consumer key pair for Twitter found. Please contact your site administrator.') . '
';
+ $s .= '
' . L10n::t('No consumer key pair for Twitter found. Please contact your site administrator.') . '
';
} else {
/* * *
* ok we have a consumer key pair now look into the OAuth stuff
@@ -300,15 +302,15 @@ function twitter_settings(App $a, &$s)
/* * *
* make some nice form
*/
- $s .= '
' . t('At this Friendica instance the Twitter plugin was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your public posts will be posted to Twitter.') . '
';
- $s .= '
';
+ $s .= '
' . L10n::t('At this Friendica instance the Twitter addon was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your public posts will be posted to Twitter.') . '
';
+ $s .= '
';
$s .= '
';
- $s .= '
';
+ $s .= '
';
} else {
/* * *
* we have an OAuth key / secret pair for the user
@@ -321,8 +323,8 @@ function twitter_settings(App $a, &$s)
$field_checkbox = get_markup_template('field_checkbox.tpl');
$s .= '';
$s .= '
';
- $s .= replace_macros($field_checkbox, array(
- '$field' => array('twitter-enable', t('Allow posting to Twitter'), $enabled, t('If enabled all your
public postings can be posted to the associated Twitter account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.'))
- ));
+ $s .= replace_macros($field_checkbox, [
+ '$field' => ['twitter-enable', L10n::t('Allow posting to Twitter'), $enabled, L10n::t('If enabled all your
public postings can be posted to the associated Twitter account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.')]
+ ]);
if ($a->user['hidewall']) {
- $s .= '
' . t('Note : Due to your privacy settings (Hide your profile details from unknown viewers? ) the link potentially included in public postings relayed to Twitter will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '
';
+ $s .= '
' . L10n::t('Note : Due to your privacy settings (Hide your profile details from unknown viewers? ) the link potentially included in public postings relayed to Twitter will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '
';
}
- $s .= replace_macros($field_checkbox, array(
- '$field' => array('twitter-default', t('Send public postings to Twitter by default'), $defenabled, '')
- ));
- $s .= replace_macros($field_checkbox, array(
- '$field' => array('twitter-mirror', t('Mirror all posts from twitter that are no replies'), $mirrorenabled, '')
- ));
- $s .= replace_macros($field_checkbox, array(
- '$field' => array('twitter-import', t('Import the remote timeline'), $importenabled, '')
- ));
- $s .= replace_macros($field_checkbox, array(
- '$field' => array('twitter-create_user', t('Automatically create contacts'), $create_userenabled, '')
- ));
+ $s .= replace_macros($field_checkbox, [
+ '$field' => ['twitter-default', L10n::t('Send public postings to Twitter by default'), $defenabled, '']
+ ]);
+ $s .= replace_macros($field_checkbox, [
+ '$field' => ['twitter-mirror', L10n::t('Mirror all posts from twitter that are no replies'), $mirrorenabled, '']
+ ]);
+ $s .= replace_macros($field_checkbox, [
+ '$field' => ['twitter-import', L10n::t('Import the remote timeline'), $importenabled, '']
+ ]);
+ $s .= replace_macros($field_checkbox, [
+ '$field' => ['twitter-create_user', L10n::t('Automatically create contacts'), $create_userenabled, '']
+ ]);
$s .= '
';
- $s .= '
';
+ $s .= '
';
}
}
$s .= '
';
@@ -399,7 +401,7 @@ function twitter_action(App $a, $uid, $pid, $action)
$cb->setConsumerKey($ckey, $csecret);
$cb->setToken($otoken, $osecret);
- $post = array('id' => $pid);
+ $post = ['id' => $pid];
logger("twitter_action '" . $action . "' ID: " . $pid . " data: " . print_r($post, true), LOGGER_DATA);
@@ -468,7 +470,7 @@ function twitter_post_hook(App $a, &$b)
// Dont't post if the post doesn't belong to us.
// This is a check for forum postings
- $self = dba::select('contact', array('id'), array('uid' => $b['uid'], 'self' => true), array('limit' => 1));
+ $self = dba::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
if ($b['contact-id'] != $self['id']) {
return;
}
@@ -557,7 +559,7 @@ function twitter_post_hook(App $a, &$b)
$cb->setConsumerKey($ckey, $csecret);
$cb->setToken($otoken, $osecret);
- $post = array('status' => $msg, 'media[]' => $tempfile);
+ $post = ['status' => $msg, 'media[]' => $tempfile];
if ($iscomment) {
$post["in_reply_to_status_id"] = substr($orig_post["uri"], 9);
@@ -604,7 +606,7 @@ function twitter_post_hook(App $a, &$b)
}
// -----------------
$url = 'statuses/update';
- $post = array('status' => $msg, 'weighted_character_count' => 'true');
+ $post = ['status' => $msg, 'weighted_character_count' => 'true'];
if ($iscomment) {
$post["in_reply_to_status_id"] = substr($orig_post["uri"], 9);
@@ -625,10 +627,10 @@ function twitter_post_hook(App $a, &$b)
$a->contact = $r[0]["id"];
}
- $s = serialize(array('url' => $url, 'item' => $b['id'], 'post' => $post));
- require_once 'include/queue_fn.php';
- add_to_queue($a->contact, NETWORK_TWITTER, $s);
- notice(t('Twitter post failed. Queued for retry.') . EOL);
+ $s = serialize(['url' => $url, 'item' => $b['id'], 'post' => $post]);
+
+ Queue::add($a->contact, NETWORK_TWITTER, $s);
+ notice(L10n::t('Twitter post failed. Queued for retry.') . EOL);
} elseif ($iscomment) {
logger('twitter_post: Update extid ' . $result->id_str . " for post id " . $b['id']);
q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d",
@@ -640,25 +642,25 @@ function twitter_post_hook(App $a, &$b)
}
}
-function twitter_plugin_admin_post(App $a)
+function twitter_addon_admin_post(App $a)
{
$consumerkey = x($_POST, 'consumerkey') ? notags(trim($_POST['consumerkey'])) : '';
$consumersecret = x($_POST, 'consumersecret') ? notags(trim($_POST['consumersecret'])) : '';
Config::set('twitter', 'consumerkey', $consumerkey);
Config::set('twitter', 'consumersecret', $consumersecret);
- info(t('Settings updated.') . EOL);
+ info(L10n::t('Settings updated.') . EOL);
}
-function twitter_plugin_admin(App $a, &$o)
+function twitter_addon_admin(App $a, &$o)
{
$t = get_markup_template("admin.tpl", "addon/twitter/");
- $o = replace_macros($t, array(
- '$submit' => t('Save Settings'),
+ $o = replace_macros($t, [
+ '$submit' => L10n::t('Save Settings'),
// name, label, value, help, [extra values]
- '$consumerkey' => array('consumerkey', t('Consumer key'), Config::get('twitter', 'consumerkey'), ''),
- '$consumersecret' => array('consumersecret', t('Consumer secret'), Config::get('twitter', 'consumersecret'), ''),
- ));
+ '$consumerkey' => ['consumerkey', L10n::t('Consumer key'), Config::get('twitter', 'consumerkey'), ''],
+ '$consumersecret' => ['consumersecret', L10n::t('Consumer secret'), Config::get('twitter', 'consumersecret'), ''],
+ ]);
}
function twitter_cron(App $a, $b)
@@ -737,9 +739,9 @@ function twitter_expire(App $a, $b)
}
if (method_exists('dba', 'delete')) {
- $r = dba::select('item', array('id'), array('deleted' => true, 'network' => NETWORK_TWITTER));
+ $r = dba::select('item', ['id'], ['deleted' => true, 'network' => NETWORK_TWITTER]);
while ($row = dba::fetch($r)) {
- dba::delete('item', array('id' => $row['id']));
+ dba::delete('item', ['id' => $row['id']]);
}
dba::close($r);
} else {
@@ -825,13 +827,13 @@ function twitter_do_mirrorpost(App $a, $uid, $post)
if (is_object($post->retweeted_status)) {
// We don't support nested shares, so we mustn't show quotes as shares on retweets
- $item = twitter_createpost($a, $uid, $post->retweeted_status, array('id' => 0), false, false, true);
+ $item = twitter_createpost($a, $uid, $post->retweeted_status, ['id' => 0], false, false, true);
$datarray['body'] = "\n" . share_header($item['author-name'], $item['author-link'], $item['author-avatar'], "", $item['created'], $item['plink']);
$datarray['body'] .= $item['body'] . '[/share]';
} else {
- $item = twitter_createpost($a, $uid, $post, array('id' => 0), false, false, false);
+ $item = twitter_createpost($a, $uid, $post, ['id' => 0], false, false, false);
$datarray['body'] = $item['body'];
}
@@ -873,7 +875,7 @@ function twitter_fetchtimeline(App $a, $uid)
require_once 'library/twitteroauth.php';
$connection = new TwitterOAuth($ckey, $csecret, $otoken, $osecret);
- $parameters = array("exclude_replies" => true, "trim_user" => false, "contributor_details" => true, "include_rts" => true, "tweet_mode" => "extended");
+ $parameters = ["exclude_replies" => true, "trim_user" => false, "contributor_details" => true, "include_rts" => true, "tweet_mode" => "extended"];
$first_time = ($lastid == "");
@@ -924,8 +926,6 @@ function twitter_queue_hook(App $a, &$b)
return;
}
- require_once 'include/queue_fn.php';
-
foreach ($qi as $x) {
if ($x['network'] !== NETWORK_TWITTER) {
continue;
@@ -971,7 +971,7 @@ function twitter_queue_hook(App $a, &$b)
logger('twitter_queue: Send to Twitter failed: "' . print_r($result->errors, true) . '"');
} else {
$success = true;
- remove_queue_item($x['id']);
+ Queue::removeItem($x['id']);
}
} else {
logger("twitter_queue: Error getting tokens for user " . $user['uid']);
@@ -979,7 +979,7 @@ function twitter_queue_hook(App $a, &$b)
if (!$success) {
logger('twitter_queue: delayed');
- update_queue_time($x['id']);
+ Queue::updateTime($x['id']);
}
}
}
@@ -1004,11 +1004,11 @@ function twitter_fetch_contact($uid, $contact, $create_user)
$avatar = twitter_fix_avatar($contact->profile_image_url_https);
- GContact::update(array("url" => "https://twitter.com/" . $contact->screen_name,
+ GContact::update(["url" => "https://twitter.com/" . $contact->screen_name,
"network" => NETWORK_TWITTER, "photo" => $avatar, "hide" => true,
"name" => $contact->name, "nick" => $contact->screen_name,
"location" => $contact->location, "about" => $contact->description,
- "addr" => $contact->screen_name . "@twitter.com", "generation" => 2));
+ "addr" => $contact->screen_name . "@twitter.com", "generation" => 2]);
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `alias` = '%s' LIMIT 1",
intval($uid), dbesc("twitter::" . $contact->id_str));
@@ -1149,7 +1149,7 @@ function twitter_fetchuser(App $a, $uid, $screen_name = "", $user_id = "")
return;
}
- $parameters = array();
+ $parameters = [];
if ($screen_name != "") {
$parameters["screen_name"] = $screen_name;
@@ -1261,10 +1261,10 @@ function twitter_expand_entities(App $a, $body, $item, $no_tags = false, $pictur
}
if ($no_tags) {
- return array("body" => $body, "tags" => "", "plain" => $plain);
+ return ["body" => $body, "tags" => "", "plain" => $plain];
}
- $tags_arr = array();
+ $tags_arr = [];
foreach ($item->entities->hashtags AS $hashtag) {
$url = "#[url=" . $a->get_baseurl() . "/search?tag=" . rawurlencode($hashtag->text) . "]" . $hashtag->text . "[/url]";
@@ -1319,7 +1319,7 @@ function twitter_expand_entities(App $a, $body, $item, $no_tags = false, $pictur
$tags = implode($tags_arr, ",");
}
- return array("body" => $body, "tags" => $tags, "plain" => $plain);
+ return ["body" => $body, "tags" => $tags, "plain" => $plain];
}
/**
@@ -1351,7 +1351,7 @@ function twitter_media_entities($post, &$postarray)
}
// This is a pure media post, first search for all media urls
- $media = array();
+ $media = [];
foreach ($post->extended_entities->media AS $medium) {
switch ($medium->type) {
case 'photo':
@@ -1388,7 +1388,7 @@ function twitter_media_entities($post, &$postarray)
function twitter_createpost(App $a, $uid, $post, $self, $create_user, $only_existing_contact, $noquote)
{
- $postarray = array();
+ $postarray = [];
$postarray['network'] = NETWORK_TWITTER;
$postarray['gravity'] = 0;
$postarray['uid'] = $uid;
@@ -1404,7 +1404,7 @@ function twitter_createpost(App $a, $uid, $post, $self, $create_user, $only_exis
if (count($r)) {
logger("Item with extid " . $postarray['uri'] . " found.", LOGGER_DEBUG);
- return array();
+ return [];
}
$contactid = 0;
@@ -1453,7 +1453,7 @@ function twitter_createpost(App $a, $uid, $post, $self, $create_user, $only_exis
$postarray['owner-avatar'] = $r[0]["photo"];
} else {
logger("No self contact for user " . $uid, LOGGER_DEBUG);
- return array();
+ return [];
}
}
// Don't create accounts of people who just comment something
@@ -1475,7 +1475,7 @@ function twitter_createpost(App $a, $uid, $post, $self, $create_user, $only_exis
$contactid = $self['id'];
} elseif ($contactid <= 0) {
logger("Contact ID is zero or less than zero.", LOGGER_DEBUG);
- return array();
+ return [];
}
$postarray['contact-id'] = $contactid;
@@ -1599,7 +1599,7 @@ function twitter_checknotification(App $a, $uid, $own_id, $top_item, $postarray)
$conv_parent = $conv['parent'];
- notification(array(
+ notification([
'type' => NOTIFY_COMMENT,
'notify_flags' => $user[0]['notify-flags'],
'language' => $user[0]['language'],
@@ -1614,7 +1614,7 @@ function twitter_checknotification(App $a, $uid, $own_id, $top_item, $postarray)
'verb' => ACTIVITY_POST,
'otype' => 'item',
'parent' => $conv_parent,
- ));
+ ]);
// only send one notification
break;
@@ -1626,10 +1626,10 @@ function twitter_fetchparentposts(App $a, $uid, $post, $connection, $self, $own_
{
logger("twitter_fetchparentposts: Fetching for user " . $uid . " and post " . $post->id_str, LOGGER_DEBUG);
- $posts = array();
+ $posts = [];
while ($post->in_reply_to_status_id_str != "") {
- $parameters = array("trim_user" => false, "tweet_mode" => "extended", "id" => $post->in_reply_to_status_id_str);
+ $parameters = ["trim_user" => false, "tweet_mode" => "extended", "id" => $post->in_reply_to_status_id_str];
$post = $connection->get('statuses/show', $parameters);
@@ -1725,7 +1725,7 @@ function twitter_fetchhometimeline(App $a, $uid)
return;
}
- $parameters = array("exclude_replies" => false, "trim_user" => false, "contributor_details" => true, "include_rts" => true, "tweet_mode" => "extended");
+ $parameters = ["exclude_replies" => false, "trim_user" => false, "contributor_details" => true, "include_rts" => true, "tweet_mode" => "extended"];
//$parameters["count"] = 200;
// Fetching timeline
$lastid = PConfig::get($uid, 'twitter', 'lasthometimelineid');
@@ -1857,7 +1857,7 @@ function twitter_fetchhometimeline(App $a, $uid)
if (($item != 0) && !function_exists("check_item_notification")) {
require_once 'include/enotify.php';
- notification(array(
+ notification([
'type' => NOTIFY_TAGSELF,
'notify_flags' => $u[0]['notify-flags'],
'language' => $u[0]['language'],
@@ -1872,7 +1872,7 @@ function twitter_fetchhometimeline(App $a, $uid)
'verb' => ACTIVITY_TAG,
'otype' => 'item',
'parent' => $parent_id
- ));
+ ]);
}
}
}