jenkins-bot has submitted this change and it was merged.
Change subject: Add option to disable MathSearch submissions
......................................................................
Add option to disable MathSearch submissions
Change-Id: I894a1107cfd22c7bb5d668fa2b463b7ac2a8b438
---
M MathSearch.php
M SpecialUploadResult.php
2 files changed, 3 insertions(+), 1 deletion(-)
Approvals:
Physikerwelt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/MathSearch.php b/MathSearch.php
index 993697a..2db52e8 100644
--- a/MathSearch.php
+++ b/MathSearch.php
@@ -98,3 +98,4 @@
$wgAutoloadClasses['SpecialUploadResult'] = $dir . 'SpecialUploadResult.php';
$wgSpecialPages['MathUpload'] = 'SpecialUploadResult';
$wgSpecialPageGroups['MathUpload'] = 'mathsearch';
+$wgMathUploadEnabled = false;
\ No newline at end of file
diff --git a/SpecialUploadResult.php b/SpecialUploadResult.php
index b980765..3d0727c 100644
--- a/SpecialUploadResult.php
+++ b/SpecialUploadResult.php
@@ -22,8 +22,9 @@
}
function execute( $query ) {
+ global $wgMathUploadEnabled;
$this->setHeaders();
- if ( ! $this->getUser()->isAllowed( 'mathwmcsubmit' ) ) {
+ if ( ! ( $this->getUser()->isAllowed( 'mathwmcsubmit' ) &&
$wgMathUploadEnabled === true ) ) {
throw new PermissionsError( 'mathwmcsubmit' );
}
--
To view, visit https://gerrit.wikimedia.org/r/179406
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I894a1107cfd22c7bb5d668fa2b463b7ac2a8b438
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits