From ad6c82bdea11e4c35284e18608f78ad4c355405d Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 24 Jun 2012 22:23:17 -0700 Subject: implement "follow" service limits --- include/plugin.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'include/plugin.php') diff --git a/include/plugin.php b/include/plugin.php index 3b6faa072..89715485e 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -353,4 +353,17 @@ function service_class_allows($uid,$property,$usage = false) { return true; return (((intval($usage)) < intval($arr[$property])) ? true : false); } -} \ No newline at end of file +} + +function upgrade_link() { + $l = get_config('service_class','upgrade_link'); + $t = sprintf('' . t('Click here to upgrade.') . '', $l); + if($l) + return $t; + return ''; +} + +function upgrade_message() { + $x = upgrade_link(); + return t('This action exceeds the limits set by your subscription plan.') . (($x) ? ' ' . $x : '') ; +} -- cgit v1.2.3