Mercurial > hg > rc2
comparison program/lib/Roundcube/rcube_imap_generic.php @ 11:aff04b06b685 default tip
various small fixes from upgrades to PHP and/or hangover from fix to apt-get overwrite at beginning of the year somehow
author | Charlie Root |
---|---|
date | Sun, 26 Jan 2025 13:09:03 -0500 |
parents | 3a5f959af5ae |
children |
comparison
equal
deleted
inserted
replaced
10:8e3cc6fc791d | 11:aff04b06b685 |
---|---|
3897 | 3897 |
3898 sort($messages); | 3898 sort($messages); |
3899 | 3899 |
3900 $result = array(); | 3900 $result = array(); |
3901 $start = $prev = $messages[0]; | 3901 $start = $prev = $messages[0]; |
3902 $needStrip = (strpos($start,'_') !== false); | |
3902 | 3903 |
3903 foreach ($messages as $id) { | 3904 foreach ($messages as $id) { |
3904 $incr = $id - $prev; | 3905 #rcube::write_log('mail',"non-num? id: |$id|, prev: |$prev|"); |
3906 #Advanced search calls with pseudo-message-ids? Non-numeric, anyway, e.g. | |
3907 # 420__MB__97ce7451bd364b47894f71ba7eb8ceb1 | |
3908 if ($needStrip) { | |
3909 $incr = substr($id,0,strpos($id,'_')) - substr($prev,0,strpos($prev,'_')); | |
3910 } | |
3911 else { | |
3912 $incr = $id - $prev; | |
3913 } | |
3905 if ($incr > 1) { // found a gap | 3914 if ($incr > 1) { // found a gap |
3906 if ($start == $prev) { | 3915 if ($start == $prev) { |
3907 $result[] = $prev; // push single id | 3916 $result[] = $prev; // push single id |
3908 } | 3917 } |
3909 else { | 3918 else { |