<?php
print "<form method=\"post\" action=\"{$wgServer}{$wgScriptPath}/texvc_cgi.phtml\">"
?>
-<textarea name='math' rows='10' cols='80'><?
+<textarea name='math' rows='10' cols='80'><?php
global $math;
$math = preg_replace ("/\\\\\\\\/", '\\', $math);
print $math;
function texvc_cgi_renderMath( $tex )
{
global $wgMathDirectory, $wgTmpDirectory, $wgInputEncoding;
- $dbr =& wfGetDB( DB_READ );
+ $dbr =& wfGetDB( DB_SLAVE );
$mf = wfMsg( "math_failure" );
$munk = wfMsg( "math_unknown_error" );
$outmd5_sql = pack("H32", $outmd5);
# Someone may have inserted the same hash since the SELECT, but that's no big deal, just ignore errors
- $dbw =& wfGetDB( DB_WRITE );
+ $dbw =& wfGetDB( DB_MASTER );
$dbw->insertArray( 'math',
array(
'math_inputhash' => $md5_sql,