every user is subscribed to themselves
darcs-hash:20080722144154-84dde-80beabad9a681f2e12edb34ceb4ac249f4ce6705.gz
This commit is contained in:
		| @@ -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() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user