diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/register.php | 14 | ||||
-rw-r--r-- | actions/showstream.php | 2 | ||||
-rw-r--r-- | actions/subscribers.php | 1 | ||||
-rw-r--r-- | actions/subscriptions.php | 1 |
4 files changed, 18 insertions, 0 deletions
diff --git a/actions/register.php b/actions/register.php index 0832b0847..6ac283059 100644 --- a/actions/register.php +++ b/actions/register.php @@ -159,6 +159,20 @@ class RegisterAction extends Action { return FALSE; } + # Everyone is subscribed to themself + + $subscription = new Subscription(); + $subscription->subscriber = $user->id; + $subscription->subscribed = $user->id; + $subscription->created = $user->created; + + $result = $subscription->insert(); + + if (!$result) { + common_log_db_error($subscription, 'INSERT', __FILE__); + return FALSE; + } + if ($email) { $confirm = new Confirm_address(); diff --git a/actions/showstream.php b/actions/showstream.php index bccdd3cc8..87858e14b 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -205,6 +205,8 @@ class ShowstreamAction extends StreamAction { $subs = DB_DataObject::factory('subscription'); $subs->subscriber = $profile->id; + $subs->whereAdd('subscribed != ' . $profile->id); + $subs->orderBy('created DESC'); # We ask for an extra one to know if we need to do another page diff --git a/actions/subscribers.php b/actions/subscribers.php index de2090cf1..2cc82d457 100644 --- a/actions/subscribers.php +++ b/actions/subscribers.php @@ -38,6 +38,7 @@ class SubscribersAction extends GalleryAction { function define_subs(&$subs, &$profile) { $subs->subscribed = $profile->id; + $subs->whereAdd('subscriber != ' . $profile->id); } function div_class() { diff --git a/actions/subscriptions.php b/actions/subscriptions.php index e0643e0dc..5566acb41 100644 --- a/actions/subscriptions.php +++ b/actions/subscriptions.php @@ -38,6 +38,7 @@ class SubscriptionsAction extends GalleryAction { function define_subs(&$subs, &$profile) { $subs->subscriber = $profile->id; + $subs->whereAdd('subscribed != ' . $profile->id); } function div_class() { |