diff options
author | friendica <info@friendica.com> | 2012-02-13 22:48:35 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-02-13 22:48:35 -0800 |
commit | d2a9ce9362ae5983b633c3a249f397733c9d9f03 (patch) | |
tree | 2a8d0aa4486a23825355bb22a71a8e6e9514a012 /mod/contacts.php | |
parent | 4de67d95ce5ae6edd41767c8da5a54e0f1abd96e (diff) | |
download | volse-hubzilla-d2a9ce9362ae5983b633c3a249f397733c9d9f03.tar.gz volse-hubzilla-d2a9ce9362ae5983b633c3a249f397733c9d9f03.tar.bz2 volse-hubzilla-d2a9ce9362ae5983b633c3a249f397733c9d9f03.zip |
more contacts categorisation, page cleanup
Diffstat (limited to 'mod/contacts.php')
-rwxr-xr-x | mod/contacts.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index d1136f542..418cddf17 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -367,6 +367,7 @@ function contacts_content(&$a) { $blocked = false; $hidden = false; + $ignored = false; $all = false; $_SESSION['return_url'] = $a->query_string; @@ -383,6 +384,10 @@ function contacts_content(&$a) { $sql_extra = " AND `hidden` = 1 "; $hidden = true; } + elseif(($a->argc == 2) && ($a->argv[1] === 'ignored')) { + $sql_extra = " AND `readonly` = 1 "; + $ignored = true; + } else $sql_extra = " AND `blocked` = 0 "; @@ -398,7 +403,7 @@ function contacts_content(&$a) { array( 'label' => t('Unblocked Contacts'), 'url' => $a->get_baseurl() . '/contacts', - 'sel' => ((! $all) && (! $blocked) && (! $hidden) && (! $search) && (! $nets)) ? 'active' : '', + 'sel' => ((! $all) && (! $blocked) && (! $hidden) && (! $search) && (! $nets) && (! $ignored)) ? 'active' : '', ), array( @@ -406,11 +411,19 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl() . '/contacts/blocked', 'sel' => ($blocked) ? 'active' : '', ), + + array( + 'label' => t('Ignored Contacts'), + 'url' => $a->get_baseurl() . '/contacts/ignored', + 'sel' => ($ignored) ? 'active' : '', + ), + array( 'label' => t('Hidden Contacts'), 'url' => $a->get_baseurl() . '/contacts/hidden', 'sel' => ($hidden) ? 'active' : '', ), + ); $tab_tpl = get_markup_template('common_tabs.tpl'); @@ -419,8 +432,10 @@ function contacts_content(&$a) { - if($search) + if($search) { + $search_hdr = $search; $search = dbesc($search.'*'); + } $sql_extra .= ((strlen($search)) ? " AND MATCH `name` AGAINST ('$search' IN BOOLEAN MODE) " : ""); if($nets) @@ -441,7 +456,7 @@ function contacts_content(&$a) { '$header' => t('Contacts') . (($nets) ? ' - ' . network_to_name($nets) : ''), '$tabs' => $t, '$total' => $r[0]['total'], - '$search' => $search, + '$search' => $search_hdr, '$desc' => t('Search your contacts'), '$finding' => (strlen($search) ? '<h4>' . t('Finding: ') . "'" . $search . "'" . '</h4>' : ""), '$submit' => t('Find'), |