diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index 3da9b45c33..262b1eace9 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -12,10 +12,6 @@ /* $Id$ */ - if (!function_exists('get_var')) - { - include_once('get_var.php'); - } $ui = ''; // html UI, which UI to use, should come from api and be in $GLOBALS['phpgw']??? if ($_ENV['DISPLAY'] && isset($_SERVER['_'])) { diff --git a/etemplate/inc/get_var.php b/etemplate/inc/get_var.php deleted file mode 100644 index 7b79300144..0000000000 --- a/etemplate/inc/get_var.php +++ /dev/null @@ -1,141 +0,0 @@ -= '4.2.0') - { - $meth = '_'.strtoupper($method[$i]); - } - else - { - $meth = 'HTTP_'.strtoupper($method[$i]).'_VARS'; - } - if(@isset($GLOBALS[$meth][$varname])) - { - $value = $GLOBALS[$meth][$varname]; - $i = $cnt+1; - } - break; - default: - if(@isset($GLOBALS[strtoupper($method[$i])][$varname])) - { - $value = $GLOBALS[strtoupper($method[$i])][$varname]; - $i = $cnt+1; - } - break; - } - } - - if (@!isset($value)) - { - $value = $default_value; - } - - if (@!is_array($value)) - { - if ($value == '') - { - $result = $value; - } - else - { - if (sanitize($value,$valuetype) == 1) - { - $result = $value; - } - else - { - $result = $default_value; - } - } - } - else - { - reset($value); - while(list($k, $v) = each($value)) - { - if ($v == '') - { - $result[$k] = $v; - } - else - { - if (is_array($valuetype)) - { - $vt = $valuetype[$k]; - } - else - { - $vt = $valuetype; - } - - if (sanitize($v,$vt) == 1) - { - $result[$k] = $v; - } - else - { - if (is_array($default_value)) - { - $result[$k] = $default_value[$k]; - } - else - { - $result[$k] = $default_value; - } - } - } - } - } - if($register) - { - $GLOBALS['phpgw_info'][$GLOBALS['phpgw_info']['flags']['currentapp']][$varname] = $result; - } - return $result; - } - - /*! - @function get_var - @abstract retrieve a value from either a POST, GET, COOKIE, SERVER or from a class variable. - @author skeeter - @discussion This function is used to retrieve a value from a user defined order of methods. - @syntax get_var('id',array('HTTP_POST_VARS'||'POST','HTTP_GET_VARS'||'GET','HTTP_COOKIE_VARS'||'COOKIE','GLOBAL','DEFAULT')); - @example $this->id = get_var('id',array('HTTP_POST_VARS'||'POST','HTTP_GET_VARS'||'GET','HTTP_COOKIE_VARS'||'COOKIE','GLOBAL','DEFAULT')); - @param $variable name - @param $method ordered array of methods to search for supplied variable - @param $default_value (optional) - */ - function get_var($variable,$method='any',$default_value='') - { - return reg_var($variable,$method,'any',$default_value,False); - }