Changeset f8e8af7 in github
- Timestamp:
- Sep 15, 2010 5:27:45 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- acbf0f5
- Parents:
- f12d218
- Location:
- program/steps/settings
- Files:
-
- 2 edited
-
edit_prefs.inc (modified) (2 diffs)
-
func.inc (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/steps/settings/edit_prefs.inc
rb25dfd0 rf8e8af7 35 35 36 36 unset($attrib['form']); 37 37 38 38 list($form_start, $form_end) = get_form_tags($attrib, 'save-prefs', null, 39 39 array('name' => '_section', 'value' => $CURR_SECTION)); … … 42 42 43 43 foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $idx => $block) { 44 if ( $block['options']) {44 if (!empty($block['options'])) { 45 45 $table = new html_table(array('cols' => 2)); 46 46 47 47 foreach ($block['options'] as $option) { 48 48 if ($option['advanced']) 49 $table->set_row_attribs('advanced');50 49 $table->set_row_attribs('advanced'); 50 51 51 $table->add('title', $option['title']); 52 $table->add(null, $option['content']);53 }54 52 $table->add(null, $option['content']); 53 } 54 55 55 $out .= html::tag('fieldset', null, html::tag('legend', null, $block['name']) . $table->show($attrib)); 56 }57 56 } 57 else if (!empty($block['content'])) { 58 $out .= html::tag('fieldset', null, html::tag('legend', null, $block['name']) . $block['content']); 59 } 60 } 58 61 59 62 return $out . $form_end; -
program/steps/settings/func.inc
rd11fb20 rf8e8af7 36 36 $OUTPUT->set_env('contentframe', $attrib['name']); 37 37 $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/blank.gif'); 38 38 39 39 return html::iframe($attrib); 40 40 } … … 44 44 { 45 45 global $RCMAIL; 46 46 47 47 // add id to message list table if not specified 48 48 if (!strlen($attrib['id'])) … … 50 50 51 51 list($list, $cols) = rcmail_user_prefs(); 52 52 53 53 // create XHTML table 54 54 $out = rcube_table_output($attrib, $list, $cols, 'id'); … … 97 97 98 98 $form_start = $form_end = ''; 99 99 100 100 if (empty($EDIT_FORM)) { 101 101 $request_key = $action . (isset($id) ? '.'.$id : ''); … … 108 108 'noclose' => true 109 109 ) + $attrib); 110 110 111 111 if (is_array($hidden)) { 112 112 $hiddenfields = new html_hiddenfield($hidden); 113 113 $form_start .= $hiddenfields->show(); 114 114 } 115 115 116 116 $form_end = !strlen($attrib['form']) ? '</form>' : ''; 117 117 … … 140 140 141 141 $sections = $plugin['list']; 142 142 143 143 $config = $RCMAIL->config->all(); 144 144 $no_override = array_flip($RCMAIL->config->get('dont_override', array())); 145 145 146 146 foreach ($sections as $idx => $sect) { 147 147 148 148 if ($current && $sect['id'] != $current) 149 149 continue; 150 150 151 151 $blocks = array(); 152 152 153 153 switch ($sect['id']) { 154 154 // general 155 155 case 'general': 156 156 157 157 $blocks = array( 158 158 'main' => array('name' => Q(rcube_label('mainoptions'))), 159 159 'list' => array('name' => Q(rcube_label('listoptions'))), 160 160 ); 161 161 162 162 // language selection 163 163 if (!isset($no_override['language'])) { … … 276 276 } 277 277 } 278 279 break; 280 278 279 break; 280 281 281 // Mailbox view (mail screen) 282 282 case 'mailbox': 283 283 284 284 $blocks = array( 285 285 'main' => array('name' => Q(rcube_label('mainoptions'))), … … 303 303 // apply default if config option is not set at all 304 304 $config['preview_pane_mark_read'] = $RCMAIL->config->get('preview_pane_mark_read', 0); 305 305 306 306 $field_id = 'rcmfd_preview_pane_mark_read'; 307 307 $select_delay = new html_select(array('name' => '_preview_pane_mark_read', 'id' => $field_id, … … 343 343 $select_autoexpand_threads->add(rcube_label('do_expand'), 1); 344 344 $select_autoexpand_threads->add(rcube_label('expand_only_unread'), 2); 345 345 346 346 $blocks['main']['options']['autoexpand_threads'] = array( 347 347 'title' => html::label($field_id, Q(rcube_label('autoexpand_threads'))), … … 387 387 388 388 break; 389 389 390 390 // Message viewing 391 391 case 'mailview': 392 392 393 393 $blocks = array( 394 394 'main' => array('name' => Q(rcube_label('mainoptions'))), … … 453 453 454 454 break; 455 455 456 456 // Mail composition 457 457 case 'compose': 458 458 459 459 $blocks = array( 460 460 'main' => array('name' => Q(rcube_label('mainoptions'))), … … 559 559 560 560 break; 561 561 562 562 // Special IMAP folders 563 563 case 'folders': 564 564 565 565 $blocks = array( 566 566 'main' => array('name' => Q(rcube_label('mainoptions'))), … … 606 606 607 607 break; 608 608 609 609 // Server settings 610 610 case 'server': 611 611 612 612 $blocks = array( 613 613 'main' => array('name' => Q(rcube_label('mainoptions'))), … … 677 677 ); 678 678 } 679 679 680 680 break; 681 681 } … … 683 683 $data = $RCMAIL->plugins->exec_hook('preferences_list', array('section' => $sect['id'], 'blocks' => $blocks)); 684 684 $found = false; 685 685 686 686 // create output 687 687 foreach ($data['blocks'] as $block) { 688 if ($block['options']) { 689 foreach ($block['options'] as $option) { 690 $found = true; 691 break 2; 692 } 688 if (!empty($block['content']) || !empty($block['options'])) { 689 $found = true; 690 break; 693 691 } 694 692 } … … 710 708 711 709 $dir = opendir($path); 712 710 713 711 if (!$dir) 714 712 return false; 715 713 716 714 while (($file = readdir($dir)) !== false) 717 715 {
Note: See TracChangeset
for help on using the changeset viewer.
