X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fimap_asearch.php;h=288061920ec725e58b3352a4b91ab19bfb93cd6d;hb=134ee6a85886fe56aec3ef4953790ac398d3f010;hp=6443d5dd2e5a63d240bac50e4e6ca12b540df99f;hpb=be51990845071cfa21f7001d1a36a2bb347e9e3e;p=squirrelmail.git diff --git a/functions/imap_asearch.php b/functions/imap_asearch.php index 6443d5dd..28806192 100644 --- a/functions/imap_asearch.php +++ b/functions/imap_asearch.php @@ -8,7 +8,7 @@ * Subfolder search idea from Patch #806075 by Thomas Pohl xraven at users.sourceforge.net. Thanks Thomas! * * @author Alex Lemaresquier - Brainstorm - * @copyright © 1999-2007 The SquirrelMail Project Team + * @copyright 1999-2017 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -190,7 +190,7 @@ function sqimap_asearch_parse_date($what) global $imap_asearch_months; $what = trim($what); - $what = ereg_replace('[ /\\.,]+', '-', $what); + $what = preg_replace('/[ \/\\.,]+/', '-', $what); if ($what) { preg_match('/^([0-9]+)-+([^\-]+)-+([0-9]+)$/', $what, $what_parts); if (count($what_parts) == 4) { @@ -232,7 +232,7 @@ function sqimap_asearch_build_criteria($opcode, $what, $charset) default: case 'anum': $what = str_replace(' ', '', $what); - $what = ereg_replace('[^0-9]+[^KMG]$', '', strtoupper($what)); + $what = preg_replace('/[^0-9]+[^KMG]$/', '', strtoupper($what)); if ($what != '') { switch (substr($what, -1)) { case 'G': @@ -268,7 +268,7 @@ function sqimap_asearch_build_criteria($opcode, $what, $charset) $criteria = $opcode . ' ' . sqimap_asearch_encode_string($what, $charset) . ' '; break; case 'asequence': - $what = ereg_replace('[^0-9:\(\)]+', '', $what); + $what = preg_replace('/[^0-9:()]+/', '', $what); if ($what != '') $criteria = $opcode . ' ' . $what . ' '; break;