From e51d3f26ab0068474c568d58bbc3126975100f93 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sat, 20 Dec 2003 18:26:24 +0000 Subject: [PATCH] intval -> (int) --- phpgwapi/addressbook.php | 6 +++--- phpgwapi/inc/class.applications.inc.php | 6 +++--- phpgwapi/inc/class.sbox2.inc.php | 6 +++--- phpgwapi/setup/tables_current.inc.php | 2 +- phpgwapi/setup/tables_update.inc.php | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/phpgwapi/addressbook.php b/phpgwapi/addressbook.php index 6f35b59070..bc810ed92a 100644 --- a/phpgwapi/addressbook.php +++ b/phpgwapi/addressbook.php @@ -47,9 +47,9 @@ 'lang_to_title' => lang('Select all %1 %2 for %3') )); - $start = intval(get_var('start',array('POST','GET'),0)); + $start = (int)get_var('start',array('POST','GET'),0); $filter = get_var('filter',array('POST','GET'),'none'); - $cat_id = intval(get_var('cat_id',array('POST','GET'),0)); + $cat_id = (int)get_var('cat_id',array('POST','GET'),0); $query = get_var('query',array('POST','GET')); $sort = get_var('sort',array('POST','GET')); $order = get_var('order',array('POST','GET')); @@ -305,7 +305,7 @@ if ($inserted || $inserted === 0) { $GLOBALS['phpgw']->template->set_var('message',''. - lang('%1 email addresses inserted',intval($_GET['inserted'])).''); + lang('%1 email addresses inserted',(int)$_GET['inserted']).''); } $GLOBALS['phpgw']->template->parse('out','addressbook_list_t',True); $GLOBALS['phpgw']->template->p('out'); diff --git a/phpgwapi/inc/class.applications.inc.php b/phpgwapi/inc/class.applications.inc.php index 101468c297..45881ea4bb 100755 --- a/phpgwapi/inc/class.applications.inc.php +++ b/phpgwapi/inc/class.applications.inc.php @@ -292,8 +292,8 @@ 'name' => $this->db->f('app_name'), 'enabled' => True, 'status' => $this->db->f('app_enabled'), - 'id' => intval($this->db->f('app_id')), - 'order' => intval($this->db->f('app_order')), + 'id' => (int)$this->db->f('app_id'), + 'order' => (int)$this->db->f('app_order'), 'version' => $this->db->f('app_version') ); } @@ -324,7 +324,7 @@ { foreach($GLOBALS['phpgw_info']['apps'] as $appname => $app) { - if(intval($app['id']) == intval($id)) + if((int)$app['id'] == (int)$id) { return $appname; } diff --git a/phpgwapi/inc/class.sbox2.inc.php b/phpgwapi/inc/class.sbox2.inc.php index 8a351823cb..9584c1eed7 100644 --- a/phpgwapi/inc/class.sbox2.inc.php +++ b/phpgwapi/inc/class.sbox2.inc.php @@ -135,7 +135,7 @@ { $this->bocal = createobject('calendar.bocalendar'); } - if (!is_array($event) && (int) $event > 0) + if (!is_array($event) && (int)$event > 0) { $event = $this->bocal->read_entry($event); } @@ -271,13 +271,13 @@ return $this->getId($name,$title,lang('Pattern for Search in Addressbook'),$id_name,$content,lang('use Button to search for Address'),$multiple); } - function addr2email( $addr,$home='' ) + function addr2email($addr,$home='') { if (!is_array($addr)) { $home = substr($addr,-1) == 'h'; $contacts = createobject('phpgwapi.contacts'); - list( $addr ) = $contacts->read_single_entry( intval($addr) ); + list($addr) = $contacts->read_single_entry((int)$addr); } if ($home) { diff --git a/phpgwapi/setup/tables_current.inc.php b/phpgwapi/setup/tables_current.inc.php index 25ffcc65b9..00145045c8 100644 --- a/phpgwapi/setup/tables_current.inc.php +++ b/phpgwapi/setup/tables_current.inc.php @@ -377,7 +377,7 @@ $_ver_str = @mysql_get_server_info(); $_ver_arr = explode(".",$_ver_str); $_ver = $_ver_arr[1]; - if(intval($_ver) < 23) + if((int)$_ver < 23) { $phpgw_baseline['lang']['fd']['message_id'] = array( 'type' => 'varchar', diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index 5278ca8fd7..a54f8e0f3f 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -377,7 +377,7 @@ $_ver_str = @mysql_get_server_info(); $_ver_arr = explode(".",$_ver_str); $_ver = $_ver_arr[1]; - if(intval($_ver) < 23) + if((int)$_ver < 23) { $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.016'; return $GLOBALS['setup_info']['phpgwapi']['currentver']; @@ -647,7 +647,7 @@ $GLOBALS['phpgw_setup']->oProc->query("SELECT * FROM old_preferences"); while ($GLOBALS['phpgw_setup']->oProc->next_record()) { - $owner = intval($GLOBALS['phpgw_setup']->oProc->f('preference_owner')); + $owner = (int)$GLOBALS['phpgw_setup']->oProc->f('preference_owner'); $prefs = unserialize($GLOBALS['phpgw_setup']->oProc->f('preference_value')); if (is_array($prefs))