mirror of
https://github.com/e107inc/e107.git
synced 2025-08-10 08:34:09 +02:00
Code-cleanup and safestr
This commit is contained in:
@@ -5019,17 +5019,26 @@ TEMPLATE;
|
||||
$type = $val['type'];
|
||||
|
||||
$strings = array('time','timestamp','datetime','year','tinyblob','blob',
|
||||
'mediumblob','longblob','tinytext','mediumtext','longtext','text','date','varchar','char');
|
||||
|
||||
'mediumblob','longblob','tinytext','mediumtext','longtext','text','date');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(in_array(strtolower($type),$strings))
|
||||
{
|
||||
$value = 'str';
|
||||
}
|
||||
}
|
||||
elseif($type === 'varchar' || $type === 'char')
|
||||
{
|
||||
$value = 'safestr';
|
||||
}
|
||||
else
|
||||
{
|
||||
$value = 'int';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$fname = $this->table."[fields][".$name."][data]";
|
||||
|
Reference in New Issue
Block a user