]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14679 towards filters conversion
authorskodak <skodak>
Mon, 2 Jun 2008 08:46:50 +0000 (08:46 +0000)
committerskodak <skodak>
Mon, 2 Jun 2008 08:46:50 +0000 (08:46 +0000)
filter/tex/filter.php
filter/tex/pix.php
filter/tex/texdebug.php

index 4e9d78c710ca8f59602abef828c89908eb0944ce..ba74ca349bf0f8441537058f5852766e3ae0059b 100644 (file)
@@ -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);
         }
index 6ac983548328aa49015b8cefb79befefa4a17016..6ca5bb567143ab58e30b4dca774b3dafcdc7cec1 100644 (file)
@@ -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');
             }
index fdb2d839e7e7fac4daa611842f30ce8071eb2475..137659620c4b729646e5afa743fa3b29c92cae80 100644 (file)
@@ -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