$texcache->filter = 'tex';
$texcache->version = 1;
$texcache->md5key = $md5;
- $texcache->rawtext = addslashes($texexp);
+ $texcache->rawtext = $texexp;
$texcache->timemodified = time();
$DB->insert_record("cache_filters",$texcache, false);
}
if (!file_exists($pathname)) {
$md5 = str_replace('.gif','',$image);
- if ($texcache = get_record('cache_filters', 'filter', 'tex', 'md5key', $md5)) {
+ if ($texcache = $DB->get_record('cache_filters', array('filter'=>'tex', 'md5key'=>$md5))) {
if (!file_exists($CFG->dataroot.'/filter/tex')) {
make_upload_directory('filter/tex');
}
// look up in cache if required
if ($action=='ShowDB' or $action=='DeleteDB') {
$md5 = md5($texexp);
- $texcache = get_record("cache_filters","filter","tex", "md5key", $md5);
+ $texcache = $DB->get_record("cache_filters", array("filter"=>"tex", "md5key"=>$md5));
}
// Action: Show DB Entry