get rid of: quote_smart, ${print:

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@451 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2009-04-04 21:35:58 +00:00
parent b62639db6b
commit ece83a4cfc
2 changed files with 4 additions and 6 deletions

View File

@ -71,8 +71,6 @@ function expand_var($matches) {
return form_value($var); return form_value($var);
} else if($prefix == 'page:') { } else if($prefix == 'page:') {
return $page[$var]; return $page[$var];
} else if($prefix == 'print:') {
return htmlspecialchars($page[$var]);
} else if($prefix == 'if:' || $prefix == 'else:' || $prefix == 'endif:' || $prefix == 'ifnot:') { } else if($prefix == 'if:' || $prefix == 'else:' || $prefix == 'endif:' || $prefix == 'ifnot:') {
return "<!-- wrong $prefix:$var -->"; return "<!-- wrong $prefix:$var -->";
} }

View File

@ -59,15 +59,15 @@ if( isset($_POST['address']) ) {
$query = sprintf( $query = sprintf(
"insert into chatban (dtmcreated,dtmtill,address,comment) values (CURRENT_TIMESTAMP,%s,'%s','%s')", "insert into chatban (dtmcreated,dtmtill,address,comment) values (CURRENT_TIMESTAMP,%s,'%s','%s')",
"FROM_UNIXTIME($utime)", "FROM_UNIXTIME($utime)",
quote_smart($address,$link), mysql_real_escape_string($address,$link),
quote_smart($comment,$link)); mysql_real_escape_string($comment,$link));
perform_query($query,$link); perform_query($query,$link);
} else { } else {
$query = sprintf( $query = sprintf(
"update chatban set dtmtill = %s,address = '%s',comment = '%s' where banid = $banId", "update chatban set dtmtill = %s,address = '%s',comment = '%s' where banid = $banId",
"FROM_UNIXTIME($utime)", "FROM_UNIXTIME($utime)",
quote_smart($address,$link), mysql_real_escape_string($address,$link),
quote_smart($comment,$link)); mysql_real_escape_string($comment,$link));
perform_query($query,$link); perform_query($query,$link);
} }
mysql_close($link); mysql_close($link);