-<?
-gobal $IP;
+<?php
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\"?";
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>texvc</title></head><body>
-<?
+<?php
print "<form method=\"post\" action=\"{$wgServer}{$wgScriptPath}/texvc_cgi.phtml\">"
?>
<textarea name='math' rows='10' cols='80'><?
$math = preg_replace ("/\\\\\\\\/", '\\', $math);
print $math;
?></textarea><br /><input type="submit" value="Preview" name="preview" /></form>
-<?
+<?php
function xlinkToMathImage ( $tex, $outputhash )
{
global $wgMathPath;
$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)." ".
$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 );