diff --git a/admin/inc/class.bocurrentsessions.inc.php b/admin/inc/class.bocurrentsessions.inc.php
index 814b7d4b34..eb50f49c6b 100644
--- a/admin/inc/class.bocurrentsessions.inc.php
+++ b/admin/inc/class.bocurrentsessions.inc.php
@@ -31,7 +31,7 @@
while (list(,$value) = @each($values))
{
- if (ereg('@',$value['session_lid']))
+ if (strpos($value['session_lid'],'@') !== false)
{
$t = explode('@',$value['session_lid']);
$session_lid = $t[0];
diff --git a/admin/inc/class.uiaccounts.inc.php b/admin/inc/class.uiaccounts.inc.php
index 920db39d35..8d36d71650 100755
--- a/admin/inc/class.uiaccounts.inc.php
+++ b/admin/inc/class.uiaccounts.inc.php
@@ -94,7 +94,7 @@
if(isset($_REQUEST['query']))
{
// limit query to limit characters
- //if(eregi('^[a-z_0-9]+$',$_REQUEST['query']))
+ //if(preg_match('/^[a-z_0-9]+$/i',$_REQUEST['query']))
$GLOBALS['query'] = $_REQUEST['query'];
}
diff --git a/calendar/csv_import.php b/calendar/csv_import.php
index bdb66695f4..7b0f0b9261 100644
--- a/calendar/csv_import.php
+++ b/calendar/csv_import.php
@@ -442,7 +442,7 @@ case 'import':
// convert german DD.MM.YYYY format into ISO YYYY-MM-DD format
$values[$date] = preg_replace('/([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})/','\3-\2-\1',$values[$date]);
// remove fractures of seconds if present at the end of the string
- if (ereg('(.*)\.[0-9]+',$values[$date],$parts)) $values[$date] = $parts[1];
+ if (preg_match('/(.*)\.[0-9]+/',$values[$date],$parts)) $values[$date] = $parts[1];
$values[$date] = strtotime($values[$date]);
}
}
diff --git a/calendar/sitemgr/class.module_calendar_list.inc.php b/calendar/sitemgr/class.module_calendar_list.inc.php
index 45e5abdfbb..8411a27cfb 100644
--- a/calendar/sitemgr/class.module_calendar_list.inc.php
+++ b/calendar/sitemgr/class.module_calendar_list.inc.php
@@ -216,7 +216,7 @@ class module_calendar_list extends Module
{
$is_group = false;
$has_read_permissions = false;
- $acl =& new acl($entry['account_id']);
+ $acl = new acl($entry['account_id']);
$acl->read_repository();
// get the rights for each account to check whether the anon user has read permissions.
$rights = $acl->get_rights($anon_user,'calendar');
@@ -272,8 +272,8 @@ class module_calendar_list extends Module
{
$html = "";
$GLOBALS['egw']->translation->add_app('calendar');
- $this->bo =& new calendar_bo();
- $this->ui =& new calendar_uiviews();
+ $this->bo = new calendar_bo();
+ $this->ui = new calendar_uiviews();
$this->ui->allowEdit = false;
$this->ui->use_time_grid = isset($arguments['grid']) ? $arguments['grid'] : false;
diff --git a/calendar/sitemgr/class.module_calendar_month.inc.php b/calendar/sitemgr/class.module_calendar_month.inc.php
index 273f558f7f..f1d168ebbc 100644
--- a/calendar/sitemgr/class.module_calendar_month.inc.php
+++ b/calendar/sitemgr/class.module_calendar_month.inc.php
@@ -46,7 +46,7 @@ class module_calendar_month extends Module
function module_calendar_month()
{
- $this->bo =& new calendar_bo();
+ $this->bo = new calendar_bo();
$this->arguments = array(
'category' => array(
'type' => 'select',
@@ -166,7 +166,7 @@ class module_calendar_month extends Module
{
$is_group = false;
$has_read_permissions = false;
- $acl =& new acl($entry['account_id']);
+ $acl = new acl($entry['account_id']);
$acl->read_repository();
// get the rights for each account to check whether the anon user has read permissions.
$rights = $acl->get_rights($anon_user,'calendar');
@@ -222,7 +222,7 @@ class module_calendar_month extends Module
{
$html = "";
$GLOBALS['egw']->translation->add_app('calendar');
- $this->ui =& new calendar_uiviews();
+ $this->ui = new calendar_uiviews();
$this->ui->allowEdit = false;
$this->ui->use_time_grid = isset($arguments['grid']) ? $arguments['grid'] : false;
diff --git a/etemplate/inc/class.ajax_captcha_widget.inc.php b/etemplate/inc/class.ajax_captcha_widget.inc.php
index 732f071baa..aeb6b047a1 100644
--- a/etemplate/inc/class.ajax_captcha_widget.inc.php
+++ b/etemplate/inc/class.ajax_captcha_widget.inc.php
@@ -62,7 +62,7 @@ class ajax_captcha_widget
//sets main etemplate cell with data created in etemplate.captcha_widget
$cell['type'] = 'template';
$cell['size'] = $cell['name'];
- $widget =& new etemplate('etemplate.captcha_widget');
+ $widget = new etemplate('etemplate.captcha_widget');
$widget->no_onclick = True;
$cell['obj'] = &$widget;
diff --git a/infolog/csv_import.php b/infolog/csv_import.php
index 64bce4dc8c..6e0990d85e 100644
--- a/infolog/csv_import.php
+++ b/infolog/csv_import.php
@@ -466,7 +466,7 @@ case 'import':
{
if (isset($values[$date]) && !is_numeric($date))
{
- if (ereg('(.*)\.[0-9]+',$values[$date],$parts)) $values[$date] = $parts[1];
+ if (preg_match('/(.*)\.[0-9]+/',$values[$date],$parts)) $values[$date] = $parts[1];
$values[$date] = strtotime($values[$date]);
}
}
diff --git a/phpgwapi/inc/class.phpmailer.inc.php b/phpgwapi/inc/class.phpmailer.inc.php
index 82abf5bd95..a531668865 100644
--- a/phpgwapi/inc/class.phpmailer.inc.php
+++ b/phpgwapi/inc/class.phpmailer.inc.php
@@ -618,7 +618,7 @@ class PHPMailer {
/* Retry while there is no connection */
while($index < count($hosts) && $connection == false) {
$hostinfo = array();
- if(eregi('^(.+):([0-9]+)$', $hosts[$index], $hostinfo)) {
+ if(preg_match('/^(.+):([0-9]+)$/i', $hosts[$index], $hostinfo)) {
$host = $hostinfo[1];
$port = $hostinfo[2];
} else {
diff --git a/phpgwapi/inc/class.validator.inc.php b/phpgwapi/inc/class.validator.inc.php
index 2e250bf724..d9eb9e5c0b 100644
--- a/phpgwapi/inc/class.validator.inc.php
+++ b/phpgwapi/inc/class.validator.inc.php
@@ -144,7 +144,7 @@
if(@$uris[$url_elements['scheme']])
{
//echo ' is valid
host ' . $url_elements['host'];
- if(eregi("[a-z]", $url_elements['host']))
+ if(preg_match('/[a-z]/i', $url_elements['host']))
{
//echo ' is name
';
return $this->is_hostname($url_elements['host']);
diff --git a/phpgwapi/inc/fpdf/font/makefont/makefont.php b/phpgwapi/inc/fpdf/font/makefont/makefont.php
index 4db5a6c5bd..ae31a5f162 100755
--- a/phpgwapi/inc/fpdf/font/makefont/makefont.php
+++ b/phpgwapi/inc/fpdf/font/makefont/makefont.php
@@ -167,7 +167,7 @@ function MakeFontDescriptor($fm,$symbolic)
//StemV
if(isset($fm['StdVW']))
$stemv=$fm['StdVW'];
- elseif(isset($fm['Weight']) and eregi('(bold|black)',$fm['Weight']))
+ elseif(isset($fm['Weight']) and preg_match('/(bold|black)/i',$fm['Weight']))
$stemv=120;
else
$stemv=70;
diff --git a/phpgwapi/inc/xml_functions.inc.php b/phpgwapi/inc/xml_functions.inc.php
index 2c109597d2..941951d3a6 100644
--- a/phpgwapi/inc/xml_functions.inc.php
+++ b/phpgwapi/inc/xml_functions.inc.php
@@ -390,7 +390,7 @@
{
// we have a DOUBLE
// we must check that only 0123456789-. are characters here
- if (!ereg("^[+-]?[eE0123456789 \\t\\.]+$", $GLOBALS['_xh'][$parser]['ac']))
+ if (!preg_match('/^[+-]?[eE0123456789 \\t\\.]+$/', $GLOBALS['_xh'][$parser]['ac']))
{
// TODO: find a better way of throwing an error
// than this!
@@ -407,7 +407,7 @@
{
// we have an I4/INT
// we must check that only 0123456789- are characters here
- if (!ereg("^[+-]?[0123456789 \\t]+$", $GLOBALS['_xh'][$parser]['ac']))
+ if (!preg_match('/^[+-]?[0123456789 \\t]+$/', $GLOBALS['_xh'][$parser]['ac']))
{
// TODO: find a better way of throwing an error
// than this!
diff --git a/soap.php b/soap.php
index 6749866fff..2c3d0d59fd 100644
--- a/soap.php
+++ b/soap.php
@@ -54,7 +54,7 @@
}
$headers = getallheaders();
- if(ereg('Basic',$headers['Authorization']))
+ if(strpos($headers['Authorization'],'Basic') !== false)
{
$tmp = $headers['Authorization'];
$tmp = str_replace(' ','',$tmp);