X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=program%2Fsteps%2Fsettings%2Ffunc.inc;h=8df3ce8d3300ad9c5d83f6beab18d6791cd150e9;hb=76507f7c63a660742e76889ad6e3919f3dde3bb0;hp=7a7c128acbe283b2cbd370602007cb29724505fc;hpb=b68022ca3782d5eb5a1a7ef6f8cf7abe1dc15bd6;p=roundcube.git diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 7a7c128..8df3ce8 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -4,8 +4,8 @@ +-----------------------------------------------------------------------+ | program/steps/settings/func.inc | | | - | This file is part of the RoundCube Webmail client | - | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland | + | This file is part of the Roundcube Webmail client | + | Copyright (C) 2005-2007, The Roundcube Dev Team | | Licensed under the GNU GPL | | | | PURPOSE: | @@ -15,25 +15,17 @@ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ - $Id: func.inc 2830 2009-08-03 18:27:53Z alec $ + $Id: func.inc 5481 2011-11-24 07:53:00Z alec $ */ if (!$OUTPUT->ajax_call) $OUTPUT->set_pagetitle(rcube_label('preferences')); -// define sections list -$SECTIONS['general'] = array('id' => 'general', 'section' => rcube_label('uisettings')); -$SECTIONS['mailbox'] = array('id' => 'mailbox', 'section' => rcube_label('mailboxview')); -$SECTIONS['compose'] = array('id' => 'compose', 'section' => rcube_label('messagescomposition')); -$SECTIONS['mailview'] = array('id' => 'mailview','section' => rcube_label('messagesdisplaying')); -$SECTIONS['folders'] = array('id' => 'folders', 'section' => rcube_label('specialfolders')); -$SECTIONS['server'] = array('id' => 'server', 'section' => rcube_label('serversettings')); - // similar function as /steps/settings/identities.inc::rcmail_identity_frame() function rcmail_preferences_frame($attrib) - { +{ global $OUTPUT; if (!$attrib['id']) @@ -43,76 +35,84 @@ function rcmail_preferences_frame($attrib) $OUTPUT->set_env('contentframe', $attrib['name']); $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/blank.gif'); - + return html::iframe($attrib); - } +} function rcmail_sections_list($attrib) - { - global $RCMAIL, $SECTIONS; - +{ + global $RCMAIL; + // add id to message list table if not specified if (!strlen($attrib['id'])) $attrib['id'] = 'rcmsectionslist'; - // hook + define list cols - $plugin = $RCMAIL->plugins->exec_hook('list_prefs_sections', - array('list' => $SECTIONS, 'cols' => array('section'))); - + list($list, $cols) = rcmail_user_prefs(); + // create XHTML table - $out = rcube_table_output($attrib, $plugin['list'], $plugin['cols'], 'id'); + $out = rcube_table_output($attrib, $list, $cols, 'id'); // set client env $RCMAIL->output->add_gui_object('sectionslist', $attrib['id']); $RCMAIL->output->include_script('list.js'); return $out; - } +} function rcmail_identities_list($attrib) - { +{ global $OUTPUT, $USER, $RCMAIL; // add id to message list table if not specified if (!strlen($attrib['id'])) $attrib['id'] = 'rcmIdentitiesList'; + // get identities list and define 'mail' column + $list = $USER->list_identities(); + foreach ($list as $idx => $row) + $list[$idx]['mail'] = trim($row['name'] . ' <' . rcube_idn_to_utf8($row['email']) .'>'); + // get all identites from DB and define list of cols to be displayed - $plugin = $RCMAIL->plugins->exec_hook('list_identities', array( - 'list' => $USER->list_identities(), - 'cols' => array('name', 'email'))); + $plugin = $RCMAIL->plugins->exec_hook('identities_list', array( + 'list' => $list, + 'cols' => array('mail'))); - // create XHTML table + // @TODO: use