X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=templates%2Futil_addressbook.php;h=92c1b2fe031c075ab83fa9864067191d22ba8d4d;hp=09cde519b72d64483145919f7ef9371afe85faad;hb=f4f64c5865bd0ae43c408e458858d7d7065c41ca;hpb=abced421cdc854a9286098d1f7c927442d9068c8 diff --git a/templates/util_addressbook.php b/templates/util_addressbook.php index 09cde519..92c1b2fe 100644 --- a/templates/util_addressbook.php +++ b/templates/util_addressbook.php @@ -4,59 +4,14 @@ * * Functions to make working with address books easier * - * @copyright © 1999-2006 The SquirrelMail Project Team + * @copyright © 1999-2007 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail * @subpackage templates */ -/** - * Display a column header with sort buttons - * - * @param string $field which field to display - * @author Steve Brown - * @since 1.5.2 - */ -function addAbookSort ($field) { - global $abook_sort_order; - - switch ($field) { - case 'nickname': - $str = _("Nickname"); - $alt = _("sort by nickname"); - $down = 0; - $up = 1; - $has_sort = true; - break; - case 'fullname': - $str = _("Name"); - $alt = _("sort by name"); - $down = 2; - $up = 3; - $has_sort = true; - break; - case 'email': - $str = _("E-mail"); - $alt = _("sort by email"); - $down = 4; - $up = 5; - $has_sort = true; - break; - case 'info': - $str = _("Info"); - $alt = _("sort by info"); - $down = 6; - $up = 7; - $has_sort = true; - break; - default: - return 'BAD SORT FIELD GIVEN: "'.$field.'"'; - } - - return $str . ($has_sort ? show_abook_sort_button($abook_sort_order, $alt, $down, $up) : ''); -} - +//FIXME: the functions in this file should be reviewed and moved to functions/template/abook_util.php and this file should be removed /** * Create a link to compose an email to the email address given. * @@ -185,9 +140,11 @@ function getBackends () { $backends['-1'] = _("All address books"); $ret = $abook->get_backend_list(); while (list($undef,$v) = each($ret)) { + if ($v->btype == 'local' && !$v->listing) { + continue; + } $backends[$v->bnum] = $v->sname; } return $backends; } -?> \ No newline at end of file