mirror of
https://github.com/friendica/friendica
synced 2025-04-25 02:30:11 +00:00
implement "follow" service limits
This commit is contained in:
parent
c464bc494c
commit
ad6c82bdea
3 changed files with 51 additions and 2 deletions
|
@ -353,4 +353,17 @@ function service_class_allows($uid,$property,$usage = false) {
|
|||
return true;
|
||||
return (((intval($usage)) < intval($arr[$property])) ? true : false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function upgrade_link() {
|
||||
$l = get_config('service_class','upgrade_link');
|
||||
$t = sprintf('<a href="%s">' . t('Click here to upgrade.') . '</div>', $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 : '') ;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue