From 59478e06c25303a790a0840ab2ac30662c4ef781 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 5 Aug 2014 16:46:22 +0200 Subject: c'est la merde.. --- program/steps/settings/func.inc | 1961 +++++++++++++++++---------------------- 1 file changed, 850 insertions(+), 1111 deletions(-) (limited to 'program/steps/settings/func.inc') diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index fdc07be9e..981d4e406 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -19,1176 +19,915 @@ +-----------------------------------------------------------------------+ */ -if (!$OUTPUT->ajax_call) { - $OUTPUT->set_pagetitle(rcube_label('preferences')); -} +if (!$OUTPUT->ajax_call) + $OUTPUT->set_pagetitle(rcube_label('preferences')); + // similar function as /steps/settings/identities.inc::rcmail_identity_frame() function rcmail_preferences_frame($attrib) { - global $OUTPUT; + global $OUTPUT; - if (!$attrib['id']) { - $attrib['id'] = 'rcmprefsframe'; - } + if (!$attrib['id']) + $attrib['id'] = 'rcmprefsframe'; - return $OUTPUT->frame($attrib, true); + return $OUTPUT->frame($attrib, true); } function rcmail_sections_list($attrib) { - global $RCMAIL; + global $RCMAIL; - // add id to message list table if not specified - if (!strlen($attrib['id'])) { - $attrib['id'] = 'rcmsectionslist'; - } + // add id to message list table if not specified + if (!strlen($attrib['id'])) + $attrib['id'] = 'rcmsectionslist'; - list($list, $cols) = rcmail_user_prefs(); + list($list, $cols) = rcmail_user_prefs(); - // create XHTML table - $out = rcube_table_output($attrib, $list, $cols, 'id'); + // create XHTML table + $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'); + // set client env + $RCMAIL->output->add_gui_object('sectionslist', $attrib['id']); + $RCMAIL->output->include_script('list.js'); - return $out; + return $out; } function rcmail_identities_list($attrib) { - global $OUTPUT, $RCMAIL; + global $OUTPUT, $RCMAIL; - // add id to message list table if not specified - if (!strlen($attrib['id'])) { - $attrib['id'] = 'rcmIdentitiesList'; - } + // add id to message list table if not specified + if (!strlen($attrib['id'])) + $attrib['id'] = 'rcmIdentitiesList'; - // get identities list and define 'mail' column - $list = $RCMAIL->user->list_identities(); - foreach ($list as $idx => $row) { - $list[$idx]['mail'] = trim($row['name'] . ' <' . rcube_idn_to_utf8($row['email']) .'>'); - } + // get identities list and define 'mail' column + $list = $RCMAIL->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('identities_list', array( - 'list' => $list, - 'cols' => array('mail') - )); + // get all identites from DB and define list of cols to be displayed + $plugin = $RCMAIL->plugins->exec_hook('identities_list', array( + 'list' => $list, + 'cols' => array('mail'))); - // @TODO: use