X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2FRSSCloud%2FRSSCloudPlugin.php;h=7d9c39a67da139c9fa093b63e4d7898a6ca266e6;hb=01f32e3998b8d031d2a39e2d0506253142b6632e;hp=001106aceceb4606b2a4e3a741bb90351720b704;hpb=369885f04f6822355da24595637916e4263db702;p=quix0rs-gnu-social.git diff --git a/plugins/RSSCloud/RSSCloudPlugin.php b/plugins/RSSCloud/RSSCloudPlugin.php index 001106acec..7d9c39a67d 100644 --- a/plugins/RSSCloud/RSSCloudPlugin.php +++ b/plugins/RSSCloud/RSSCloudPlugin.php @@ -100,7 +100,7 @@ class RSSCloudPlugin extends Plugin * * Hook for RouterInitialized event. * - * @param Mapper &$m URL parser and mapper + * @param Mapper $m URL parser and mapper * * @return boolean hook return */ @@ -192,24 +192,12 @@ class RSSCloudPlugin extends Plugin function onStartEnqueueNotice($notice, &$transports) { - array_push($transports, 'rsscloud'); + if ($notice->isLocal()) { + array_push($transports, 'rsscloud'); + } return true; } - /** - * Determine whether the notice was locally created - * - * @param Notice $notice the notice in question - * - * @return boolean locality - */ - - function _isLocal($notice) - { - return ($notice->is_local == Notice::LOCAL_PUBLIC || - $notice->is_local == Notice::LOCAL_NONPUBLIC); - } - /** * Create the rsscloud_subscription table if it's not * already in the DB @@ -221,19 +209,16 @@ class RSSCloudPlugin extends Plugin { $schema = Schema::get(); $schema->ensureTable('rsscloud_subscription', - array(new ColumnDef('subscribed', 'integer', - null, false, 'PRI'), - new ColumnDef('url', 'varchar', - '255', false, 'PRI'), - new ColumnDef('failures', 'integer', - null, false, null, 0), - new ColumnDef('created', 'datetime', - null, false), - new ColumnDef('modified', 'timestamp', - null, false, null, - 'CURRENT_TIMESTAMP', - 'on update CURRENT_TIMESTAMP') - )); + array( + 'fields' => array( + 'subscribed' => array('type' => 'int', 'not null' => true), + 'url' => array('type' => 'varchar', 'length' => '255', 'not null' => true), + 'failures' => array('type' => 'int', 'not null' => true, 'default' => 0), + 'created' => array('type' => 'datetime', 'not null' => true), + 'modified' => array('type' => 'timestamp', 'not null' => true), + ), + 'primary key' => array('subscribed', 'url'), + )); return true; } @@ -259,10 +244,9 @@ class RSSCloudPlugin extends Plugin 'rawdescription' => _m('The RSSCloud plugin enables your StatusNet instance to publish ' . 'real-time updates for profile RSS feeds using the ' . - 'RSSCloud protocol".')); + 'RSSCloud protocol.')); return true; } } -