[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [18590] change data type order to make it more effici
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] [18590] change data type order to make it more efficient and remove some unsupported options |
Date: |
Wed, 04 Jun 2008 13:15:14 +0000 |
Revision: 18590
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18590
Author: skwashd
Date: 2008-06-04 13:15:12 +0000 (Wed, 04 Jun 2008)
Log Message:
-----------
change data type order to make it more efficient and remove some unsupported
options
Modified Paths:
--------------
trunk/phpgwapi/inc/class.phpgw.inc.php
Modified: trunk/phpgwapi/inc/class.phpgw.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.phpgw.inc.php 2008-06-03 12:23:24 UTC (rev
18589)
+++ trunk/phpgwapi/inc/class.phpgw.inc.php 2008-06-04 13:15:12 UTC (rev
18590)
@@ -396,6 +396,11 @@
switch ( $value_type )
{
+ case 'string':
+ default:
+ $value = filter_var($value,
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
+ $value =
htmlspecialchars($value, ENT_COMPAT, 'UTF-8');
+
case 'bool':
if (
preg_match('/^[false|0|no]$/', $value) )
{
@@ -405,7 +410,6 @@
case 'float':
case 'double':
- case 'real':
if ( (float) $value == $value )
{
return (float)
$value;
@@ -413,7 +417,6 @@
return (float) $default;
case 'int':
- case 'integer':
case 'number':
if ( (int) $value == $value )
{
@@ -484,11 +487,6 @@
case 'html':
$value =
self::clean_html($value);
break;
-
- case 'string':
- default:
- $value = filter_var($value,
FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
- $value =
htmlspecialchars($value, ENT_COMPAT, 'UTF-8');
}
return $value;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [18590] change data type order to make it more efficient and remove some unsupported options,
Dave Hall <=