-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Extension check for SF and adding SF JS checks in form #10
Conversation
return ''; | ||
} | ||
global $wgOut; /* No other way to access http://www.mediawiki.org/wiki/Manual:$wgOut */ | ||
$wgOut->addModules( 'ext.semanticforms.main' ); | ||
|
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.
Is not possible to use $this->getSkin()->getOutput()->addModules( ... )
?
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.
No :( At least, I didn't manage in a simpler way.
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.
I was expecting QuickTemplate
to have access to getSkin
because of https://github.com/wikimedia/mediawiki/blob/073d4001f5bd1ac7d52c1a34d534ff3a59c2863f/includes/skins/QuickTemplate.php#L177
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.
I see what's going on. It's available in MW master but not in MW 1.23 (the one I'm testing). I'd include some conditionals there.
@@ -19,6 +19,14 @@ | |||
die( '<b>Error:</b> This version of <a href="https://github.com/SemanticMediaWiki/SemanticSignup/">SemanticSignup</a> is only compatible with MediaWiki 1.19 or above. You need to upgrade MediaWiki first.' ); | |||
} | |||
|
|||
if ( !defined( 'SF_VERSION' ) ) { | |||
die( '<b>Error:</b> <a href="https://github.com/SemanticMediaWiki/SemanticSignup/">SemanticSignup</a> is a Semantic Forms extension. You need to install <a href="https://www.mediawiki.org/wiki/Extension:Semantic_Forms">Semantic Forms</a> first.' ); |
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.
How about ( !defined( 'SF_VERSION' ) || version_compare( SF_VERSION, '2.7', 'lt' ) ) {
?
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.
Fine for me. Just in case I would increase to 2.8 in coherence with README.md
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.
👍
It does work for MW 1.23 and MW 1.25. I would commit if possible. |
Thanks. Nice to have someone making it work. |
Extension check for SF and adding SF JS checks in form
No description provided.