[Tickets #345] NEW: Bug in displaying first and last message of a mailbox

bugs at bugs.horde.org bugs at bugs.horde.org
Wed Jun 30 17:18:22 PDT 2004


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

-Ticket 345
-Queue: IMP
-Created By: 


>From wizard at gmx.fr (Wed Jun 30 17:18:22 2004):
The current message number and the total count for the first and last
message are erroneous. 

The following Notice appears : Undefined index: 1 in
/home/erevenu/www-horde/horde/imp/message.php on line 271.

Solution is to remove two lines from message.php :

(line : 247)
if ($imp['mailbox'] != '**search') {
    if (!$uidsvalid ||
// REMOVE THIS //        $array_index == count($sorted) + 1 ||
// REMOVE THIS //       $array_index == 0 ||
        (($actionID == DELETE_MESSAGES || $actionID == MOVE_MESSAGES ||
$actionID == COPY_MESSAGES) &&
         ($array_index == count($sorted) - 2))) {

        if ($prefs->getValue('sortby') != SORTTHREAD) {
            if ($prefs->getValue('delhide')) {
                $sorted = imap_sort($imp['stream'],
$prefs->getValue('sortby'),
                                    $prefs->getValue('sortdir'), SE_UID,
'UNDELETED');
            } else {
                $sorted = imap_sort($imp['stream'],
$prefs->getValue('sortby'),
                                    $prefs->getValue('sortdir'), SE_UID);
            }
        } else {
            IMP_Message::threadSort();
        }

        $sorted = IMP_Message::range($sorted, $array_index + $imp['offset']
+ 1,
                                     $imp['offset'], $array_index,
$imp['msgcount']);
        $imp['msgl'] = implode(':', $sorted);
        $sorted = explode(':', $imp['msgl']);
        $indices = array_flip($sorted);
        $array_index = $indices[$index];
    }
}





http://bugs.horde.org/details.php?id=345

-- 


More information about the bugs mailing list