diff --git a/addressbook/inc/class.uiaddressbook.inc.php b/addressbook/inc/class.uiaddressbook.inc.php index 748556476e..8a8fd4ade0 100644 --- a/addressbook/inc/class.uiaddressbook.inc.php +++ b/addressbook/inc/class.uiaddressbook.inc.php @@ -982,7 +982,7 @@ { if($contactscat) { - $catinfo = $this->cat->return_single(intval($contactscat)); + $catinfo = $this->cat->return_single((int)$contactscat); $catname .= $catinfo[0]['name'] . '; '; } } @@ -993,8 +993,8 @@ } else { - $fields[0]['cat_id'] = ereg_replace(',','',$fields[0]['cat_id']); - $catinfo = $this->cat->return_single(intval($fields[0]['cat_id'])); + $fields[0]['cat_id'] = str_replace(',','',$fields[0]['cat_id']); + $catinfo = $this->cat->return_single((int)$fields[0]['cat_id']); $catname = $catinfo[0]['name']; if(!$this->cat_id) { @@ -1077,7 +1077,7 @@ { $prefs = $_POST['prefs']; $other = $_POST['other']; - $fcat_id = intval($_POST['fcat_id']); + $fcat_id = (int)$_POST['fcat_id']; $custom = $this->fields->read_custom_fields(); $customfields = array(); @@ -1469,7 +1469,7 @@ { while(list($name,$value) = each($customfields)) { - $value = ereg_replace('_',' ',$value); + $value = str_replace('_',' ',$value); $custom .= '   diff --git a/addressbook/inc/class.uifields.inc.php b/addressbook/inc/class.uifields.inc.php index c227450bcd..6ed60923a3 100644 --- a/addressbook/inc/class.uifields.inc.php +++ b/addressbook/inc/class.uifields.inc.php @@ -419,7 +419,7 @@ } if($new) { - $tmp = strtolower(ereg_replace(' ','_',$new)); + $tmp = strtolower(str_replace(' ','_',$new)); $this->config->config_data['custom_fields'][$tmp] = $new; } diff --git a/addressbook/inc/functions.inc.php b/addressbook/inc/functions.inc.php index 4dcc53672f..230882162f 100755 --- a/addressbook/inc/functions.inc.php +++ b/addressbook/inc/functions.inc.php @@ -139,8 +139,8 @@ { if ( substr($col,0,6) == 'extra_' ) { - $fields[$j]['name'] = ereg_replace('extra_','',$col); - $fields[$j]['name'] = ereg_replace(' ','_',$fields[$j]['name']); + $fields[$j]['name'] = str_replace('extra_','',$col); + $fields[$j]['name'] = str_replace(' ','_',$fields[$j]['name']); $fields[$j]['id'] = $i; if ($query && ($fields[$j]['name'] != $query))