svncommit
2007-02-26 e17702395e1aa0fa54eea36817e1150c231d49eb
fixed check for selected value in value array in rcube_shared::select

3 files modified
19 ■■■■■ changed files
CHANGELOG 5 ●●●●● patch | view | raw | blame | history
program/include/rcube_shared.inc 12 ●●●●● patch | view | raw | blame | history
program/steps/mail/compose.inc 2 ●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,11 @@
CHANGELOG RoundCube Webmail
---------------------------
2007/02/25 (estadtherr)
----------
- Fixed priority selector issue (#1484150)
2007/02/21 (thomasb)
----------
- Fixed some CSS issues in default skin (closes #1484210 and #1484161)
program/include/rcube_shared.inc
@@ -1009,20 +1009,22 @@
    
    if (!is_array($select))
      $select = array((string)$select);
    foreach ($this->options as $option)
      {
      $selected = ((!empty($option['value']) && in_array($option['value'], $select, TRUE)) ||
                   (in_array($option['text'], $select, TRUE))) ? $this->_conv_case(' selected', 'attrib') : '';
      $selected = ((isset($option['value']) &&
                    in_array($option['value'], $select, TRUE)) ||
                   (in_array($option['text'], $select, TRUE))) ?
        $this->_conv_case(' selected', 'attrib') : '';
                  
      $options_str .= sprintf("<%s%s%s>%s</%s>\n",
                             $this->_conv_case('option', 'tag'),
                             !empty($option['value']) ? sprintf($value_str, $option['value']) : '',
                             isset($option['value']) ? sprintf($value_str, $option['value']) : '',
                             $selected, 
                             Q($option['text'], 'strict', FALSE),
                             $this->_conv_case('option', 'tag'));
      }
    // return final tag
    return sprintf('<%s%s>%s</%s>%s',
                   $this->_conv_case('select', 'tag'),
program/steps/mail/compose.inc
@@ -766,7 +766,7 @@
                       rcube_label('highest')),
                 array(5, 4, 0, 2, 1));
                 
  $sel = isset($_POST['_priority']) ? $_POST['_priority'] : rcube_label('normal');
  $sel = isset($_POST['_priority']) ? $_POST['_priority'] : 0;
  $out = $form_start ? "$form_start\n" : '';
  $out .= $selector->show($sel);