* Subfolder search idea from Patch #806075 by Thomas Pohl xraven at users.sourceforge.net. Thanks Thomas!
*
* @author Alex Lemaresquier - Brainstorm <alex at brainstorm.fr>
- * @copyright © 1999-2009 The SquirrelMail Project Team
+ * @copyright 1999-2018 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
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) {
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':
$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;