Make better use of Subscription class

removed lib/subs.php as it was essentially only a wrapper for Subscription
This commit is contained in:
Mikael Nordfeldth
2013-09-19 17:20:44 +02:00
parent a35344eb00
commit 93e878d7ca
10 changed files with 61 additions and 88 deletions

View File

@@ -235,11 +235,11 @@ function newSub($i)
$to = User::getKV('nickname', $tunic);
if (empty($to)) {
if (!($to instanceof User)) {
throw new Exception("Can't find user '$tunic'.");
}
subs_subscribe_to($from, $to);
Subscription::start($from->getProfile(), $to->getProfile());
$from->free();
$to->free();