X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Ftext.php;h=78eae145e2c90a8617450e27ea31030cf08a4042;hb=20ca4512000e80386fe6f9b3fd85864bc0e91627;hp=66447069e455ad6c53a9cd90a9514d14bd0361ba;hpb=d8bd4fbb3e38bf0ff9c7b61dba58e20c0d097d75;p=friendica.git
diff --git a/include/text.php b/include/text.php
index 66447069e4..78eae145e2 100644
--- a/include/text.php
+++ b/include/text.php
@@ -539,22 +539,30 @@ function contact_block() {
$total = intval($r[0]['total']);
}
if(! $total) {
- $o .= '
';
- return $o;
- }
- $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 ORDER BY RAND() LIMIT %d",
- intval($a->profile['uid']),
- intval($shown)
- );
- if(count($r)) {
- $o .= '';
- foreach($r as $rr) {
- $o .= micropro($rr,true,'mpfriend');
- }
- $o .= '
';
- $o .= '';
+ $contacts = t('No contacts');
+ $micropro = Null;
+ } else {
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 ORDER BY RAND() LIMIT %d",
+ intval($a->profile['uid']),
+ intval($shown)
+ );
+ if(count($r)) {
+ $contacts = sprintf( tt('%d Contact','%d Contacts', $total),$total);
+ $micropro = Array();
+ foreach($r as $rr) {
+ $micropro[] = micropro($rr,true,'mpfriend');
+ }
+ }
}
+
+ $tpl = get_markup_template('contact_block.tpl');
+ $o = replace_macros($tpl, array(
+ '$contacts' => $contacts,
+ '$nickname' => $a->profile['nickname'],
+ '$viewcontacts' => t('View Contacts'),
+ '$micropro' => $micropro,
+ ));
$arr = array('contacts' => $r, 'output' => $o);
@@ -602,12 +610,14 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
if(! function_exists('search')) {
-function search($s,$id='search-box',$url='/search') {
+function search($s,$id='search-box',$url='/search',$save = false) {
$a = get_app();
$o = '';
$o .= '
';
return $o;
}}