1
0
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:
Cameron
2019-03-19 15:12:17 -07:00
parent 6c682dffae
commit 78b95a54b6
3 changed files with 22 additions and 321 deletions

View File

@@ -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]";