jenkins-bot has submitted this change and it was merged.
Change subject: Correct revision id displayed via UpdateMath
......................................................................
Correct revision id displayed via UpdateMath
* While running the maitenance script UpdateMath.php
the revision id was not displayed correctly.
* The hooks were run before the rendering result was
stored in the database. The mathindex that links to
the table that store the rendering results would
have links to database entries before they have been
stored.
Change-Id: Ic8be03b05686befbf32b02e1243724ae47207f86
---
M maintenance/UpdateMath.php
1 file changed, 5 insertions(+), 7 deletions(-)
Approvals:
Physikerwelt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/maintenance/UpdateMath.php b/maintenance/UpdateMath.php
index 2f1dada..976c764 100644
--- a/maintenance/UpdateMath.php
+++ b/maintenance/UpdateMath.php
@@ -50,7 +50,7 @@
$this->addArg( 'max', "If set processing is stopped at the page
with rank(pageID)<=max", false );
$this->addOption( 'verbose', "If set output for successful
rendering will produced",false,false,'v' );
$this->addOption( 'SVG', "If set SVG images will be produced",
false, false );
- $this->addOption( 'hoooks', "If set hooks will be skipped, but
index will be updated.", false, false );
+ $this->addOption( 'hooks', "If set hooks will be skipped, but
index will be updated.", false, false );
$this->addOption( 'texvccheck', "If set texvccheck will be
skipped", false, false );
$this->addOption( 'mode' , 'Rendering mode to be used (0 = PNG,
5= MathML, 7=MathML)',false,true,'m');
}
@@ -98,7 +98,7 @@
if ( $cMax > 0 && $count > $cMax ) {
$count = $cMax;
}
- $this->output( "Rebuilding index fields for {$count} pages with
option {$this->purge}...\n" );
+ $this->output( "Rebuilding index fields for pages with revision
< {$count} with option {$this->purge}...\n" );
$fCount = 0;
//return;
while ( $n < $count ) {
@@ -114,12 +114,10 @@
);
$this->dbw->begin();
// echo "before" +$this->dbw->selectField('mathindex',
'count(*)')."\n";
- $i = $n;
foreach ( $res as $s ) {
- echo "\nr$i:";
+ $this->output( "\nr{$s->rev_id}" );
$revText = Revision::getRevisionText( $s );
$fCount += $this->doUpdate( $s->page_id,
$revText, $s->page_title, $s->rev_id );
- $i++;
}
// echo "before" +$this->dbw->selectField('mathindex',
'count(*)')."\n";
$start = microtime( true );
@@ -187,6 +185,8 @@
echo "\nF:\t\t".$renderer->getMd5()."
texvccheck error:" . $renderer->getLastError();
continue;
}
+ $renderer->writeCache( $this->dbw );
+ $this->time("write Cache");
MathSearchHooks::setNextID( $eId, $renderer,
$pid );
if ( ! $this->getOption( "hooks", false ) ) {
Hooks::run( 'MathFormulaPostRender',
array( $parser, &$renderer, &$notused ) );
@@ -195,8 +195,6 @@
MathSearchHooks::writeMathIndex(
$revId, $eId, $renderer->getInputHash(), '' );
$this->time( "index" );
}
- $renderer->writeCache($this->dbw);
- $this->time("write Cache");
if ( $renderer->getLastError() ) {
echo "\n\t\t".
$renderer->getLastError() ;
echo "\nF:\t\t".$renderer->getMd5()."
equation " . ( $eId ) .
--
To view, visit https://gerrit.wikimedia.org/r/224098
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8be03b05686befbf32b02e1243724ae47207f86
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Dyiop <[email protected]>
Gerrit-Reviewer: Hcohl <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: Whyameri <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits