]> git.mxchange.org Git - friendica.git/blobdiff - mod/viewcontacts.php
Merge branch 'friendika-master'
[friendica.git] / mod / viewcontacts.php
index 47132e6a8218cd9e417ce7385bbe94bd76cdfc61..90ff85b9dbd4476c3534a6138b108f1d6608d613 100644 (file)
@@ -2,7 +2,6 @@
 
 function viewcontacts_init(&$a) {
 
-       require_once("mod/profile.php");
        profile_load($a,$a->argv[1]);
 
 }
@@ -22,7 +21,7 @@ function viewcontacts_content(&$a) {
                intval($a->profile['uid'])
        );
        if(count($r))
-               $a->pager['totalitems'] = $r[0]['total'];
+               $a->set_pager_total($r[0]['total']);
 
        $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 ORDER BY `name` ASC LIMIT %d , %d ",
                intval($a->profile['uid']),
@@ -34,7 +33,7 @@ function viewcontacts_content(&$a) {
                return $o;
        }
 
-       $tpl = file_get_contents("view/viewcontact_template.tpl");
+       $tpl = load_view_file("view/viewcontact_template.tpl");
 
        foreach($r as $rr) {
                if($rr['self'])
@@ -44,7 +43,7 @@ function viewcontacts_content(&$a) {
                        '$id' => $rr['id'],
                        '$alt_text' => t('Visit ') . $rr['name'] . t('\'s profile'),
                        '$thumb' => $rr['thumb'], 
-                       '$name' => $rr['name'],
+                       '$name' => substr($rr['name'],0,20),
                        '$url' => $rr['url'] 
                ));
        }