mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Using PHP_OS to detect OS (thanks, Greg Barnett!)
Included three binaries for mimetex ... Linux is tested but I haven't tested the others yet
This commit is contained in:
parent
0f6f62cbdb
commit
aaad489149
4 changed files with 11 additions and 1 deletions
BIN
filter/tex/mimetex.darwin
Executable file
BIN
filter/tex/mimetex.darwin
Executable file
Binary file not shown.
BIN
filter/tex/mimetex.exe
Executable file
BIN
filter/tex/mimetex.exe
Executable file
Binary file not shown.
|
@ -46,7 +46,17 @@
|
|||
$texexp = str_replace('>','>',$texexp);
|
||||
$texexp = preg_replace('!\r\n?!',' ',$texexp);
|
||||
$texexp = '\Large ' . $texexp;
|
||||
system("QUERY_STRING=;export QUERY_STRING;$CFG->dirroot/$CFG->texfilterdir/mimetex -d ". escapeshellarg($texexp) . " >$pathname");
|
||||
switch (PHP_OS) {
|
||||
case "Linux":
|
||||
system("QUERY_STRING=;export QUERY_STRING;$CFG->dirroot/$CFG->texfilterdir/mimetex.linux -d ". escapeshellarg($texexp) . " >$pathname");
|
||||
break;
|
||||
case "Windows":
|
||||
system("$CFG->dirroot/$CFG->texfilterdir/mimetex.exe -d ". escapeshellarg($texexp) . " >$pathname");
|
||||
break;
|
||||
case "Darwin":
|
||||
system("QUERY_STRING=;export QUERY_STRING;$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin -d ". escapeshellarg($texexp) . " >$pathname");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue