implement "follow" service limits
This commit is contained in:
@@ -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 : '') ;
|
||||
}
|
||||
|
Reference in New Issue
Block a user