We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit ab1f2ff9 authored by Evan Prodromou's avatar Evan Prodromou

every user is subscribed to themselves

darcs-hash:20080722144154-84dde-80beabad9a681f2e12edb34ceb4ac249f4ce6705.gz
parent 5f79bcdf
......@@ -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();
......
......@@ -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
......
......@@ -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() {
......
......@@ -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() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment