mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
intval, ereg, and gettype updates
This commit is contained in:
parent
5a1f288b96
commit
c4c6251e9d
@ -90,7 +90,7 @@
|
||||
$owner_name = lang('Group').' ('.$owner_name.')';
|
||||
}
|
||||
unset($acct);
|
||||
$this->acl = CreateObject('phpgwapi.acl',intval($owner));
|
||||
$this->acl = CreateObject('phpgwapi.acl',(int)$owner);
|
||||
$this->acl->read_repository();
|
||||
|
||||
if ($_POST['submit'])
|
||||
@ -250,16 +250,16 @@
|
||||
$vars = $this->template->get_undefined('row_colspan');
|
||||
while (list(,$var) = each($vars))
|
||||
{
|
||||
if (ereg('lang_',$var))
|
||||
if(strstr($var,'lang_'))
|
||||
{
|
||||
$value = ereg_replace('lang_','',$var);
|
||||
$value = ereg_replace('_',' ',$value);
|
||||
$value = str_replace('lang_','',$var);
|
||||
$value = str_replace('_',' ',$value);
|
||||
|
||||
$this->template->set_var($var,lang($value));
|
||||
}
|
||||
}
|
||||
|
||||
if (intval($s_groups) <> count($groups))
|
||||
if ((int)$s_groups <> count($groups))
|
||||
{
|
||||
$this->template->set_var('string',lang('Groups'));
|
||||
$this->template->parse('row','row_colspan',True);
|
||||
|
@ -156,7 +156,7 @@
|
||||
}
|
||||
if (isset($prefs[$name]))
|
||||
{
|
||||
$prefs[$name] = intval(!!$prefs[$name]); // to care for '' and 'True'
|
||||
$prefs[$name] = (int)(!!$prefs[$name]); // to care for '' and 'True'
|
||||
}
|
||||
|
||||
return create_select_box($label,$name,array(
|
||||
@ -424,11 +424,11 @@
|
||||
$GLOBALS['type'] = 'user';
|
||||
}
|
||||
$show_help = "$session_data[show_help]" != '' && $session_data['appname'] == $_GET['appname'] ?
|
||||
$session_data['show_help'] : intval($GLOBALS['phpgw_info']['user']['preferences']['common']['show_help']);
|
||||
$session_data['show_help'] : (int)$GLOBALS['phpgw_info']['user']['preferences']['common']['show_help'];
|
||||
|
||||
if ($toggle_help = get_var('toggle_help','POST'))
|
||||
{
|
||||
$show_help = intval(!$show_help);
|
||||
$show_help = (int)(!$show_help);
|
||||
}
|
||||
$has_help = 0;
|
||||
|
||||
@ -557,7 +557,7 @@
|
||||
}
|
||||
$t->set_var('lang_submit', lang('save'));
|
||||
$t->set_var('lang_cancel', lang('cancel'));
|
||||
$t->set_var('show_help',intval($show_help));
|
||||
$t->set_var('show_help',(int)$show_help);
|
||||
$t->set_var('help_button',$has_help ? '<input type="submit" name="toggle_help" value="'.
|
||||
($show_help ? lang('help off') : lang('help')).'">' : '');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user