-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update for new GraphViz extension class structure #365
Conversation
Is this compatible with MW 1.27? |
Also pass the dot source to GraphViz in a slightly more robust way (the args parameter was an empty string, but it should have been an array). Bug: T181926
Good point! I forgot about the parser service. Switched now; see what you think. |
@@ -112,7 +115,7 @@ protected function getResultText( SMWQueryResult $res, $outputmode ) { | |||
$graphInput .= "}"; | |||
|
|||
// Calls graphvizParserHook function from MediaWiki GraphViz extension | |||
$result = GraphViz::graphvizParserHook( $graphInput, "", $GLOBALS['wgParser'], "" ); | |||
$result = $wgParser->recursiveTagParse( "<graphviz>$graphInput</graphviz>" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$GLOBALS['wgParser']
is better in the sense that you do not pollute the whole function scope with the global
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Does this change implies that GraphViz 3.+ is required? |
@mwjames: Thanks! And no, it works for old or new versions of GraphViz. |
|
This PR is made in reference to: https://phabricator.wikimedia.org/T181926
This PR addresses or contains:
<graphviz>
element, rather than directly calling the render method).This PR includes: