Author Topic: Why is a new mail always composed with the lowest (5) priority ?  (Read 8130 times)

Offline Andre_E

  • Newbie
  • *
  • Posts: 5
Dear all,

I do have a 'small' issue with my RC install. i'm using the SVN TRUNK #451 'incl advanced addressbook' and i love it.
But when i compose a new mail i always get the lowest priority :? In the 'compose.inc' file it say's:

Code: [Select]
function rcmail_priority_selector($attrib)
 {
 list($form_start, $form_end) = get_form_tags($attrib);
 unset($attrib['form']);
 
 $attrib['name'] = '_priority';
 $selector = new select($attrib);

 $selector->add(array(rcube_label('lowest'),
            rcube_label('low'),
            rcube_label('normal'),
            rcube_label('high'),
            rcube_label('highest')),
         array(5, 4, 0, 2, 1));
         
 $sel = isset($_POST['_priority']) ? $_POST['_priority'] : 0;

 $out = $form_start ? "$form_start\n" : '';
 $out .= $selector->show($sel);
 $out .= $form_end ? "\n$form_end" : '';
     
 return $out;
 }

What is wrong?
-- UNIX is an operating system, OS/2 is half an operating system, Windows is a shell, and DOS is a boot partition virus. --

Reload

  • Guest
Re: Why is a new mail always composed with the lowest (5) priority ?
« Reply #1 on: January 10, 2007, 04:30:35 AM »
I'm having the same issue.... :-\

Offline robin.one

  • Newbie
  • *
  • Posts: 9
Re: Why is a new mail always composed with the lowest (5) priority ?
« Reply #2 on: January 12, 2007, 09:42:19 PM »
same here, no ideas...

Offline alex.raceanu

  • Newbie
  • *
  • Posts: 3
Re: Why is a new mail always composed with the lowest (5) priority ?
« Reply #3 on: January 17, 2007, 12:48:53 PM »
Nothing is wrong there,
The problem comes from "program/include/rcube_shared.inc".
You can use the attached patch to fix this bug.

Quote from: Andre_E
Dear all,

I do have a 'small' issue with my RC install. i'm using the SVN TRUNK #451 'incl advanced addressbook' and i love it.
But when i compose a new mail i always get the lowest priority :? In the 'compose.inc' file it say's:

What is wrong?

Offline Andre_E

  • Newbie
  • *
  • Posts: 5
Re: Why is a new mail always composed with the lowest (5) priority ?
« Reply #4 on: January 17, 2007, 05:02:59 PM »
Quote from: alex.raceanu
Nothing is wrong there,
The problem comes from "program/include/rcube_shared.inc".
You can use the attached patch to fix this bug.
Thanks for your patch, but witch part of the rcube_shared.inc file do i have to replace with your part?
-- UNIX is an operating system, OS/2 is half an operating system, Windows is a shell, and DOS is a boot partition virus. --

Offline alex.raceanu

  • Newbie
  • *
  • Posts: 3
Re: Why is a new mail always composed with the lowest (5) priority ?
« Reply #5 on: January 22, 2007, 06:58:25 AM »
Quote from: Andre_E
Quote from: alex.raceanu
Nothing is wrong there,
The problem comes from "program/include/rcube_shared.inc".
You can use the attached patch to fix this bug.
Thanks for your patch, but witch part of the rcube_shared.inc file do i have to replace with your part?

Just untar the pach in the root folder of your installation and apply it with "patch -p0 < fix-prio-v2.patch"
This is the only thing to do :)

Best regards,
Alex R.

Offline Andre_E

  • Newbie
  • *
  • Posts: 5
Re: Why is a new mail always composed with the lowest (5) priority ?
« Reply #6 on: January 22, 2007, 03:04:20 PM »
Alex, your the best :) Thanks, this fixed my problem at ones ::)

Kind regards, Andre
-- UNIX is an operating system, OS/2 is half an operating system, Windows is a shell, and DOS is a boot partition virus. --

Offline zorensen

  • Newbie
  • *
  • Posts: 9
Re: Why is a new mail always composed with the lowest (5) priority ?
« Reply #7 on: January 22, 2007, 04:16:23 PM »
How do I apply this patch if i dont got SSL access to my webspace?

Offline WestSideRick

  • Newbie
  • *
  • Posts: 2
Re: Why is a new mail always composed with the lowest (5) priority ?
« Reply #8 on: January 24, 2007, 10:10:22 PM »
THANKS so much for posting this, it helped me greatly!

 ;D

-Rick



Quote from: alex.raceanu
Nothing is wrong there,
The problem comes from "program/include/rcube_shared.inc".
You can use the attached patch to fix this bug.

Quote from: Andre_E
Dear all,

I do have a 'small' issue with my RC install. i'm using the SVN TRUNK #451 'incl advanced addressbook' and i love it.
But when i compose a new mail i always get the lowest priority :? In the 'compose.inc' file it say's:

What is wrong?

Offline Venet

  • Newbie
  • *
  • Posts: 2
Re: Why is a new mail always composed with the lowest (5) priority ?
« Reply #9 on: February 15, 2007, 09:26:45 AM »
If you have just source access you can solve this by editing the ./program/includercube_shared.inc

Change the line 1015 which says:
$selected = ((!empty($option['value']) && in_array($option['value'], $select, TRUE)) ||
          (in_array($option['text'], $select, TRUE))) ? $this->_conv_case(' selected', 'attrib') : '';

Into:
$selected = ((isset($option['value']) && in_array($option['value'], $select, TRUE)) ||
          (in_array($option['text'], $select, TRUE))) ? $this->_conv_case(' selected', 'attrib') : '';

This bug is still in the SVN version.

Offline alex.raceanu

  • Newbie
  • *
  • Posts: 3
Re: Why is a new mail always composed with the lowest (5) priority ?
« Reply #10 on: February 26, 2007, 05:26:07 AM »
Sorry for the lat response, but here are some tips to apply the patch...
You can download rcube_shared.inc from your webspace on your local machine, open it with your
favorite text editor ( wordpad, pico, vim etc. ) and just replace at line 1012 following :
Code: [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') : '';
         
    $options_str .= sprintf(&quot;<%s%s%s>%s</%s>\n&quot;,
               $this->_conv_case('option', 'tag'),
               !empty($option['value']) ? sprintf($value_str, $option['value']) : '',
               $selected,
               Q($option['text'], 'strict', FALSE),
               $this->_conv_case('option', 'tag'));
with
Code: [Select]
  foreach ($this->options as $option)
    {
    $selected = (((isset($option['value']) && ($option['value'] == 0 || !empty($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\n",
               $this->_conv_case('option', 'tag'),
               (isset($option['value']) && ($option['value'] == 0 || !empty($option['value']))) ? sprintf($value_str, $option['value']) : '',
               $selected,
               Q($option['text'], 'strict', FALSE),
               $this->_conv_case('option', 'tag'));
And upload it back to your webspace. That's all :)

Quote from: zorensen
How do I apply this patch if i dont got SSL access to my webspace?

qqilihq

  • Guest
Why is a new mail always composed with the lowest (5) priority ?
« Reply #11 on: August 27, 2008, 06:29:51 AM »
Sorry to dig this thread out again -- I am having the described problem when replying to mails. Any idea how to fix this?
« Last Edit: August 27, 2008, 06:46:47 AM by qqilihq »

qqilihq

  • Guest
Why is a new mail always composed with the lowest (5) priority ?
« Reply #12 on: August 28, 2008, 06:04:41 AM »
Fixed this problem by editing "program/steps/mail/compose.inc", from line 713:


  $sel 
= isset($_POST['_priority']) ? $_POST['_priority'] : intval($MESSAGE->headers->priority);

  
$out $form_start "$form_start\n" '';


… to …


  $sel 
= isset($_POST['_priority']) ? $_POST['_priority'] : intval($MESSAGE->headers->priority);
  if (
$sel == 3$sel 0;
  
$out $form_start "$form_start\n" '';


Bye,
qqilihq.