Reformatted code
This commit is contained in:
parent
21006aec74
commit
15ea39d830
1 changed files with 16 additions and 14 deletions
|
@ -56,13 +56,13 @@ const TWITTER_MAX_IMAGE_SIZE = 500000;
|
||||||
|
|
||||||
function twitter_install()
|
function twitter_install()
|
||||||
{
|
{
|
||||||
Hook::register('load_config' , __FILE__, 'twitter_load_config');
|
Hook::register('load_config', __FILE__, 'twitter_load_config');
|
||||||
Hook::register('connector_settings' , __FILE__, 'twitter_settings');
|
Hook::register('connector_settings', __FILE__, 'twitter_settings');
|
||||||
Hook::register('connector_settings_post', __FILE__, 'twitter_settings_post');
|
Hook::register('connector_settings_post', __FILE__, 'twitter_settings_post');
|
||||||
Hook::register('hook_fork' , __FILE__, 'twitter_hook_fork');
|
Hook::register('hook_fork', __FILE__, 'twitter_hook_fork');
|
||||||
Hook::register('post_local' , __FILE__, 'twitter_post_local');
|
Hook::register('post_local', __FILE__, 'twitter_post_local');
|
||||||
Hook::register('notifier_normal' , __FILE__, 'twitter_post_hook');
|
Hook::register('notifier_normal', __FILE__, 'twitter_post_hook');
|
||||||
Hook::register('jot_networks' , __FILE__, 'twitter_jot_nets');
|
Hook::register('jot_networks', __FILE__, 'twitter_jot_nets');
|
||||||
}
|
}
|
||||||
|
|
||||||
function twitter_load_config(ConfigFileManager $loader)
|
function twitter_load_config(ConfigFileManager $loader)
|
||||||
|
@ -146,8 +146,10 @@ function twitter_hook_fork(array &$b)
|
||||||
|
|
||||||
$post = $b['data'];
|
$post = $b['data'];
|
||||||
|
|
||||||
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
|
if (
|
||||||
!strstr($post['postopts'], 'twitter') || ($post['gravity'] != Item::GRAVITY_PARENT)) {
|
$post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
|
||||||
|
!strstr($post['postopts'], 'twitter') || ($post['gravity'] != Item::GRAVITY_PARENT)
|
||||||
|
) {
|
||||||
$b['execute'] = false;
|
$b['execute'] = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue