From: skodak Date: Mon, 2 Jun 2008 08:46:50 +0000 (+0000) Subject: MDL-14679 towards filters conversion X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b402e134092d1613c5d68789665f62c303eab322;p=moodle.git MDL-14679 towards filters conversion --- diff --git a/filter/tex/filter.php b/filter/tex/filter.php index 4e9d78c710..ba74ca349b 100644 --- a/filter/tex/filter.php +++ b/filter/tex/filter.php @@ -149,7 +149,7 @@ function tex_filter ($courseid, $text) { $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); } diff --git a/filter/tex/pix.php b/filter/tex/pix.php index 6ac9835483..6ca5bb5671 100644 --- a/filter/tex/pix.php +++ b/filter/tex/pix.php @@ -41,7 +41,7 @@ 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'); } diff --git a/filter/tex/texdebug.php b/filter/tex/texdebug.php index fdb2d839e7..137659620c 100644 --- a/filter/tex/texdebug.php +++ b/filter/tex/texdebug.php @@ -30,7 +30,7 @@ // 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