From a541533e043ba4e426237d4379ce089ea48a9b26 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 6 Sep 2015 02:04:12 +0200 Subject: [PATCH] Use Profile objects in Subscription::saveNew --- classes/Subscription.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/Subscription.php b/classes/Subscription.php index 16bab350d9..314a597f55 100644 --- a/classes/Subscription.php +++ b/classes/Subscription.php @@ -101,7 +101,7 @@ class Subscription extends Managed_DataObject $sub = Subscription_queue::getSubQueue($subscriber, $other); } } else { - $sub = self::saveNew($subscriber->id, $other->id); + $sub = self::saveNew($subscriber, $other); $sub->notify(); self::blow('user:notices_with_friends:%d', $subscriber->id); @@ -150,12 +150,12 @@ class Subscription extends Managed_DataObject * Low-level subscription save. * Outside callers should use Subscription::start() */ - protected static function saveNew($subscriber_id, $other_id) + protected static function saveNew(Profile $subscriber, Profile $other) { $sub = new Subscription(); - $sub->subscriber = $subscriber_id; - $sub->subscribed = $other_id; + $sub->subscriber = $subscriber->getID(); + $sub->subscribed = $other->getID(); $sub->jabber = 1; $sub->sms = 1; $sub->created = common_sql_now(); -- 2.39.5