Awight has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/297808

Change subject: [WIP] Move RapidHtml inline loader statements to the server side
......................................................................

[WIP] Move RapidHtml inline loader statements to the server side

This should prevent race conditions when running with MediaWiki >= 1.26

Change-Id: I6e71259b45b8425aee5bc8ecd6c69872f90a94c8
---
M gateway_forms/RapidHtml.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/08/297808/1

diff --git a/gateway_forms/RapidHtml.php b/gateway_forms/RapidHtml.php
index fed21b4..472bbaf 100644
--- a/gateway_forms/RapidHtml.php
+++ b/gateway_forms/RapidHtml.php
@@ -117,8 +117,6 @@
                parent::__construct( $gateway );
                $form_errors = $this->form_errors;
 
-               $this->loadValidateJs();
-
                $ffname = $this->gateway->getData_Unstaged_Escaped( 'ffname' );
                // Get error passed via query string
                $error = $this->gateway->getRequest()->getText( 'error' );
@@ -157,6 +155,11 @@
        public function getForm() {
                $html = $this->load_html();
                $html = $this->replace_blocks( $html );
+
+               // FIXME: Hacky as hell to alter the form from a getter.
+               $this->loadModules( $this->gateway->getResourceLoaderModules() 
);
+               $this->loadValidateJs();
+
                return $this->add_data( $html );
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/297808
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e71259b45b8425aee5bc8ecd6c69872f90a94c8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to