function prepStr($val, &$db) { // convert all utf-8 values to iso8859-1 $val = ValueCast::toLatinISO($val); return $db->quoteSmart(ValueCast::castStr($val)); }
function cleanupItem($var) { include_once 'model/value_cast.php'; $var = ValueCast::toLatinISO($var); // some weird mnogosearch characters to replace $var = preg_replace('/\\x02/', '<b>', $var); $var = preg_replace('/\\x03/', '</b>', $var); return $var; }