}
}
+
+
+
+
+
// This extra param just confuses things, remove it
if($ret['network'] === NETWORK_DIASPORA)
$ret['url'] = str_replace('?absolute=true','',$ret['url']);
$ret['notify'] = '';
}
+
+
+
+
+
if(! $ret['notify']) {
$result['message'] .= t('Limited profile. This person will be unable to receive direct/personal notifications from you.') . EOL;
}
}
else {
+
+ // check service class limits
+
+ $r = q("select count(*) as total from contact where uid = %d and pending = 0 and self = 0",
+ intval($uid)
+ );
+ if(count($r))
+ $total_contacts = $r[0]['total'];
+
+ if(! service_class_allows($uid,'total_contacts',$total_contacts)) {
+ $result['message'] .= upgrade_message();
+ return $result;
+ }
+
+ $r = q("select count(network) as total from contact where uid = %d and network = '%s' and pending = 0 and self = 0",
+ intval($uid),
+ dbesc($network)
+ );
+ if(count($r))
+ $total_network = $r[0]['total'];
+
+ if(! service_class_allows($uid,'total_contacts_' . $network,$total_network)) {
+ $result['message'] .= upgrade_message();
+ return $result;
+ }
+
$new_relation = (($ret['network'] === NETWORK_MAIL) ? CONTACT_IS_FRIEND : CONTACT_IS_SHARING);
if($ret['network'] === NETWORK_DIASPORA)
$new_relation = CONTACT_IS_FOLLOWER;
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('<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 : '') ;
+}
Hey, \r
-I'm $sitename. \r
+I'm $sitename; \r
The friendica developers released update $update recently, \r
but when I tried to install it, something went terribly wrong. \r
This needs to be fixed soon and I can't do it alone. Please contact a \r