ereg/intval update

This commit is contained in:
Miles Lott 2003-12-19 09:27:23 +00:00
parent 83fa2e42a9
commit ec67908ccf
3 changed files with 8 additions and 8 deletions

View File

@ -982,7 +982,7 @@
{ {
if($contactscat) if($contactscat)
{ {
$catinfo = $this->cat->return_single(intval($contactscat)); $catinfo = $this->cat->return_single((int)$contactscat);
$catname .= $catinfo[0]['name'] . '; '; $catname .= $catinfo[0]['name'] . '; ';
} }
} }
@ -993,8 +993,8 @@
} }
else else
{ {
$fields[0]['cat_id'] = ereg_replace(',','',$fields[0]['cat_id']); $fields[0]['cat_id'] = str_replace(',','',$fields[0]['cat_id']);
$catinfo = $this->cat->return_single(intval($fields[0]['cat_id'])); $catinfo = $this->cat->return_single((int)$fields[0]['cat_id']);
$catname = $catinfo[0]['name']; $catname = $catinfo[0]['name'];
if(!$this->cat_id) if(!$this->cat_id)
{ {
@ -1077,7 +1077,7 @@
{ {
$prefs = $_POST['prefs']; $prefs = $_POST['prefs'];
$other = $_POST['other']; $other = $_POST['other'];
$fcat_id = intval($_POST['fcat_id']); $fcat_id = (int)$_POST['fcat_id'];
$custom = $this->fields->read_custom_fields(); $custom = $this->fields->read_custom_fields();
$customfields = array(); $customfields = array();
@ -1469,7 +1469,7 @@
{ {
while(list($name,$value) = each($customfields)) while(list($name,$value) = each($customfields))
{ {
$value = ereg_replace('_',' ',$value); $value = str_replace('_',' ',$value);
$custom .= ' $custom .= '
<tr bgcolor="' . $GLOBALS['phpgw_info']['theme']['row_off'] . '"> <tr bgcolor="' . $GLOBALS['phpgw_info']['theme']['row_off'] . '">
<td>&nbsp;</td> <td>&nbsp;</td>

View File

@ -419,7 +419,7 @@
} }
if($new) if($new)
{ {
$tmp = strtolower(ereg_replace(' ','_',$new)); $tmp = strtolower(str_replace(' ','_',$new));
$this->config->config_data['custom_fields'][$tmp] = $new; $this->config->config_data['custom_fields'][$tmp] = $new;
} }

View File

@ -139,8 +139,8 @@
{ {
if ( substr($col,0,6) == 'extra_' ) if ( substr($col,0,6) == 'extra_' )
{ {
$fields[$j]['name'] = ereg_replace('extra_','',$col); $fields[$j]['name'] = str_replace('extra_','',$col);
$fields[$j]['name'] = ereg_replace(' ','_',$fields[$j]['name']); $fields[$j]['name'] = str_replace(' ','_',$fields[$j]['name']);
$fields[$j]['id'] = $i; $fields[$j]['id'] = $i;
if ($query && ($fields[$j]['name'] != $query)) if ($query && ($fields[$j]['name'] != $query))