From 8b86d02d3da2ba2f23dcc040269bc185efdeb73e Mon Sep 17 00:00:00 2001 From: meirzamoodle Date: Fri, 30 Aug 2024 11:29:16 +0700 Subject: [PATCH] MDL-62640 filter_tex: Adjust code for slashargument removal --- filter/tex/classes/text_filter.php | 7 +------ filter/tex/texdebug.php | 25 ------------------------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/filter/tex/classes/text_filter.php b/filter/tex/classes/text_filter.php index ff58dc5dd7d..35140b75872 100644 --- a/filter/tex/classes/text_filter.php +++ b/filter/tex/classes/text_filter.php @@ -186,12 +186,7 @@ class text_filter extends \core_filters\text_filter { // Build the output. $anchorcontents = "\"$alt\"slasharguments) { - // Use this method if possible for better client-side caching. - $anchorcontents .= "$CFG->wwwroot/filter/tex/pix.php/$imagefile"; - } else { - $anchorcontents .= "$CFG->wwwroot/filter/tex/pix.php?file=$imagefile"; - } + $anchorcontents .= "$CFG->wwwroot/filter/tex/pix.php/$imagefile"; $anchorcontents .= "\" $style/>"; $imagefound = file_exists("$CFG->dataroot/filter/tex/$imagefile"); diff --git a/filter/tex/texdebug.php b/filter/tex/texdebug.php index 25481b3101e..62fe9a925dd 100644 --- a/filter/tex/texdebug.php +++ b/filter/tex/texdebug.php @@ -89,12 +89,6 @@ tex2image($texexp); } - // Action: Check Slasharguments - if ($action=='SlashArguments') { - slasharguments($texexp); - exit; - } - // Action: Show Tex command line output if ($action=='ShowImageTex') { TexOutput($texexp, true); @@ -293,23 +287,6 @@ return $output; } - function slasharguments($texexp) { - global $CFG; - $admin = $CFG->wwwroot.'/'.$CFG->admin.'/settings.php?section=http'; - $image = tex2image($texexp,true); - echo "

If the following image displays correctly, set your "; - echo "Administration->Server->HTTP "; - echo "setting for slasharguments to file.php/1/pic.jpg: "; - echo "wwwroot/filter/tex/pix.php/$image\" align=\"absmiddle\">

\n"; - echo "

Otherwise set it to file.php?file=/1/pic.jpg "; - echo "It should display correctly as "; - echo "wwwroot/filter/tex/pix.php?file=$image\" align=\"absmiddle\">

\n"; - echo "

If neither equation image displays correctly, please seek "; - echo "further help at moodle.org at the "; - echo ""; - echo "Mathematics Tools Forum

"; - } - ?> @@ -335,8 +312,6 @@
  • -
  • -