aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorM.Dent <dentm42@dm42.net>2018-09-27 22:42:42 -0400
committerM.Dent <dentm42@dm42.net>2018-09-27 22:43:36 -0400
commitfe8b72362286ce55044e38524179e6694acda014 (patch)
tree88c8187fed0fddf29d2173f6e3483ad07d8b29e8 /Zotlabs/Module
parentc15de3b68b2fecdaec70e5978f9b592ddfc57013 (diff)
downloadvolse-hubzilla-fe8b72362286ce55044e38524179e6694acda014.tar.gz
volse-hubzilla-fe8b72362286ce55044e38524179e6694acda014.tar.bz2
volse-hubzilla-fe8b72362286ce55044e38524179e6694acda014.zip
Hide form when at or over service_class['limit_identities']
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/New_channel.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/Zotlabs/Module/New_channel.php b/Zotlabs/Module/New_channel.php
index 97a46a43e..ebdd6c37f 100644
--- a/Zotlabs/Module/New_channel.php
+++ b/Zotlabs/Module/New_channel.php
@@ -142,9 +142,12 @@ class New_channel extends \Zotlabs\Web\Controller {
}
$limit = account_service_class_fetch(get_account_id(),'total_identities');
-
+ $canadd = true;
if($r && ($limit !== false)) {
$channel_usage_message = sprintf( t("You have created %1$.0f of %2$.0f allowed channels."), $r[0]['total'], $limit);
+ if ($r[0]['total'] >= $limit) {
+ $canadd = false;
+ }
}
else {
$channel_usage_message = '';
@@ -186,7 +189,8 @@ class New_channel extends \Zotlabs\Web\Controller {
'$nickname' => $nickname,
'$validate' => t('Validate'),
'$submit' => t('Create'),
- '$channel_usage_message' => $channel_usage_message
+ '$channel_usage_message' => $channel_usage_message,
+ '$canadd' => $canadd
));
return $o;