aboutsummaryrefslogtreecommitdiffstats
path: root/mod/contacts.php
diff options
context:
space:
mode:
authorMichael <icarus@dabo.de>2012-02-23 20:53:22 +0100
committerMichael <icarus@dabo.de>2012-02-23 20:53:22 +0100
commit0409b5cdba003b6ce90d5ad0181e81c06af95ab1 (patch)
treec677adb7c0e8140bdb1e115a95d1aa23fdf734ed /mod/contacts.php
parent311e35731c52102cbce3befc6343f179080ad38c (diff)
parent8cacff69858c2ad097bafb80c93405e79c311edf (diff)
downloadvolse-hubzilla-0409b5cdba003b6ce90d5ad0181e81c06af95ab1.tar.gz
volse-hubzilla-0409b5cdba003b6ce90d5ad0181e81c06af95ab1.tar.bz2
volse-hubzilla-0409b5cdba003b6ce90d5ad0181e81c06af95ab1.zip
Merge remote branch 'upstream/master'
Conflicts: include/bbcode.php
Diffstat (limited to 'mod/contacts.php')
-rwxr-xr-xmod/contacts.php62
1 files changed, 33 insertions, 29 deletions
diff --git a/mod/contacts.php b/mod/contacts.php
index 418cddf17..c8edea151 100755
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -451,19 +451,7 @@ function contacts_content(&$a) {
$a->set_pager_total($r[0]['total']);
- $tpl = get_markup_template("contacts-top.tpl");
- $o .= replace_macros($tpl,array(
- '$header' => t('Contacts') . (($nets) ? ' - ' . network_to_name($nets) : ''),
- '$tabs' => $t,
- '$total' => $r[0]['total'],
- '$search' => $search_hdr,
- '$desc' => t('Search your contacts'),
- '$finding' => (strlen($search) ? '<h4>' . t('Finding: ') . "'" . $search . "'" . '</h4>' : ""),
- '$submit' => t('Find'),
- '$cmd' => $a->cmd
-
- ));
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `pending` = 0 $sql_extra $sql_extra2 ORDER BY `name` ASC LIMIT %d , %d ",
intval($_SESSION['uid']),
@@ -471,9 +459,9 @@ function contacts_content(&$a) {
intval($a->pager['itemspage'])
);
- if(count($r)) {
+ $contacts = array();
- $tpl = get_markup_template("contact_template.tpl");
+ if(count($r)) {
foreach($r as $rr) {
if($rr['self'])
@@ -505,24 +493,40 @@ function contacts_content(&$a) {
}
- $o .= replace_macros($tpl, array(
- '$img_hover' => sprintf( t('Visit %s\'s profile [%s]'),$rr['name'],$rr['url']),
- '$edit_hover' => t('Edit contact'),
- '$contact_photo_menu' => contact_photo_menu($rr),
- '$id' => $rr['id'],
- '$alt_text' => $alt_text,
- '$dir_icon' => $dir_icon,
- '$thumb' => $rr['thumb'],
- '$name' => $rr['name'],
- '$username' => $rr['name'],
- '$sparkle' => $sparkle,
- '$url' => $url
- ));
+ $contacts[] = array(
+ 'img_hover' => sprintf( t('Visit %s\'s profile [%s]'),$rr['name'],$rr['url']),
+ 'edit_hover' => t('Edit contact'),
+ 'photo_menu' => contact_photo_menu($rr),
+ 'id' => $rr['id'],
+ 'alt_text' => $alt_text,
+ 'dir_icon' => $dir_icon,
+ 'thumb' => $rr['thumb'],
+ 'name' => $rr['name'],
+ 'username' => $rr['name'],
+ 'sparkle' => $sparkle,
+ 'url' => $url,
+ 'item' => $rr,
+ );
}
- $o .= '<div id="contact-edit-end"></div>';
+
}
- $o .= paginate($a);
+
+ $tpl = get_markup_template("contacts-template.tpl");
+ $o .= replace_macros($tpl,array(
+ '$header' => t('Contacts') . (($nets) ? ' - ' . network_to_name($nets) : ''),
+ '$tabs' => $t,
+ '$total' => $r[0]['total'],
+ '$search' => $search_hdr,
+ '$desc' => t('Search your contacts'),
+ '$finding' => (strlen($search) ? t('Finding: ') . "'" . $search . "'" : ""),
+ '$submit' => t('Find'),
+ '$cmd' => $a->cmd,
+ '$contacts' => $contacts,
+ '$paginate' => paginate($a),
+
+ ));
+
return $o;
}