Physikerwelt has uploaded a new change for review.
https://gerrit.wikimedia.org/r/185637
Change subject: Rename rename mathindex_page_id
......................................................................
Rename rename mathindex_page_id
* The new name is mathindex_revision_id !
Change-Id: Icf048ceca909c86e2e59943f10830c813cbcd824
---
M maintenance/CreateBaseXMathTable.php
M maintenance/CreateDB2MathTable.php
M maintenance/CreateMWSHarvest.php
3 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch
refs/changes/37/185637/1
diff --git a/maintenance/CreateBaseXMathTable.php
b/maintenance/CreateBaseXMathTable.php
index fb0945a..6e92ca0 100644
--- a/maintenance/CreateBaseXMathTable.php
+++ b/maintenance/CreateBaseXMathTable.php
@@ -59,7 +59,7 @@
return "";
}
$out .= "\n<" . self::$mwsns . "expr url=\"" .
- MathSearchHooks::generateMathAnchorString(
$row->mathindex_page_id, $row->mathindex_anchor, '' ) . "\">\n\t";
+ MathSearchHooks::generateMathAnchorString(
$row->mathindex_revision_id, $row->mathindex_anchor, '' ) . "\">\n\t";
$out .= utf8_decode( $row->math_mathml );//
$xml->math->children()->asXML();
$out .= "\n</" . self::$mwsns . "expr>\n";
// TODO: This does not work yet.
diff --git a/maintenance/CreateDB2MathTable.php
b/maintenance/CreateDB2MathTable.php
index 3e0f92a..3b3f008 100644
--- a/maintenance/CreateDB2MathTable.php
+++ b/maintenance/CreateDB2MathTable.php
@@ -44,10 +44,10 @@
$mo = MathObject::constructformpagerow($row);
$out = '"'. $mo->getMd5().'"';
$out .= ',"'. $mo->getTex().'"';
- $out .= ','. $row->mathindex_page_id .'';
+ $out .= ','. $row->mathindex_revision_id .'';
$out .= ','. $row->mathindex_anchor.'';
$out .= ',"'.str_replace(array('"',"\n"),array('"',' '),
$mo->getMathml()).'"';
- $res = db2_execute($this->statment,
array($mo->getMd5(),$mo->getTex(),$row->mathindex_page_id,$row->mathindex_anchor,$mo->getMathml()));
+ $res = db2_execute($this->statment,
array($mo->getMd5(),$mo->getTex(),$row->mathindex_revision_id,$row->mathindex_anchor,$mo->getMathml()));
if ( ! $res ){
echo db2_stmt_errormsg();
}
@@ -72,9 +72,9 @@
if ( $this->conn ){
if ( $this->getOption('truncate' , false ) ){
db2_exec( $this->conn , 'DROP TABLE "math"');
- db2_exec( $this->conn , 'CREATE TABLE "math"
("math_md5" CHAR(32), "math_tex" VARCHAR(1000), "mathindex_pageid" INTEGER,
"mathindex_anchord" INTEGER, "math_mathml" XML)');
+ db2_exec( $this->conn , 'CREATE TABLE "math"
("math_md5" CHAR(32), "math_tex" VARCHAR(1000), "mathindex_revision_id"
INTEGER, "mathindex_anchord" INTEGER, "math_mathml" XML)');
}
- $this->statment = db2_prepare( $this->conn ,'insert
into "math" ("math_md5", "math_tex", "mathindex_pageid", "mathindex_anchord",
"math_mathml") values(?, ?, ?, ?, ?)');
+ $this->statment = db2_prepare( $this->conn ,'insert
into "math" ("math_md5", "math_tex", "mathindex_revision_id",
"mathindex_anchord", "math_mathml") values(?, ?, ?, ?, ?)');
//db2_autocommit($this->conn , DB2_AUTOCOMMIT_OFF);
}
parent::execute();
diff --git a/maintenance/CreateMWSHarvest.php b/maintenance/CreateMWSHarvest.php
index 876cafb..38e5ac1 100644
--- a/maintenance/CreateMWSHarvest.php
+++ b/maintenance/CreateMWSHarvest.php
@@ -58,7 +58,7 @@
// if ( $xml->math ) {
// $smath = $xml->math->semantics-> { 'annotation-xml'
} ->children()->asXML();
$out .= "\n<" . self::$mwsns . "expr url=\"" .
- MathSearchHooks::generateMathAnchorString(
$row->mathindex_page_id, $row->mathindex_anchor, '' ) .
+ MathSearchHooks::generateMathAnchorString(
$row->mathindex_revision_id, $row->mathindex_anchor, '' ) .
"\">\n\t";
$out .= utf8_decode( $row->math_mathml );//
$xml->math->children()->asXML();
$out .= "\n</" . self::$mwsns . "expr>\n";
--
To view, visit https://gerrit.wikimedia.org/r/185637
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf048ceca909c86e2e59943f10830c813cbcd824
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits