Pasted in multi-language support from rcdumper.php
[lhc/web/wiklou.git] / texvc.phtml
index 7467f81..4dfd732 100644 (file)
@@ -1,7 +1,6 @@
 <?
-gobal $IP;
 include( "./LocalSettings.php" );
-include( "$IP/Setup.php" );
+include( "Setup.php" );
 header( "Content-type: text/xml; charset={$wgInputEncoding}" );
 print "<";
 print "?xml version=\"1.0\" encoding=\"utf-8\"?";
@@ -42,7 +41,7 @@ function texvc_cgi_renderMath( $tex )
     $md5_sql = mysql_escape_string(pack("H32", $md5));
     $sql = "SELECT math_outputhash,math_html_conservativeness,math_html,math_mathml FROM math WHERE math_inputhash = '".$md5_sql."'";
 
-    $res = wfQuery( $sql, $fname );
+    $res = wfQuery( $sql, 0, $fname );
     if ( wfNumRows( $res ) == 0 )
     {
        $cmd = "./math/texvc ".escapeshellarg($wgTmpDirectory)." ".
@@ -112,7 +111,7 @@ function texvc_cgi_renderMath( $tex )
 
        $sql = "INSERT INTO math VALUES ('".$md5_sql."', '".$outmd5_sql."', ".$conservativeness.", ".$sql_html.", ".$sql_mathml.")";
 
-       $res = wfQuery( $sql, $fname );
+       $res = wfQuery( $sql, 0, $fname );
 // we don't really care if it fails
     } else {
        $rpage = wfFetchObject ( $res );