mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2010-03-17 05:08 am

[dw-free] Unnecessary check for password when crossposting for all accounts is disabled

[commit: http://hg.dwscoalition.org/dw-free/rev/568bf43b36e1]

http://bugs.dwscoalition.org/show_bug.cgi?id=2438

Don't check for a password if xposting is disabled. Prevents spurious
errors.

Patch by [personal profile] afuna.

Files modified:
  • htdocs/js/xpost.js
--------------------------------------------------------------------------------
diff -r 574d2016a620 -r 568bf43b36e1 htdocs/js/xpost.js
--- a/htdocs/js/xpost.js	Wed Mar 17 05:05:20 2010 +0000
+++ b/htdocs/js/xpost.js	Wed Mar 17 05:08:45 2010 +0000
@@ -43,8 +43,12 @@ XPostAccount = new Class(Object, {
     },
 
     doChallengeResponse: function () {
+      var xpost_button = $("prop_xpost_check");
+
       // check to see if we need to do a challenge/response for this.
-      if ((! this.locked) && this.chalField != null && this.checkboxTag != null && this.checkboxTag.checked) {
+      if ((! this.locked) && this.chalField != null
+            && this.checkboxTag != null && this.checkboxTag.checked
+            && xpost_button != null && xpost_button.checked) {
         this.locked = true;
 
         if (this.passField == null || this.passField.value == null || this.passField.value == "") {
--------------------------------------------------------------------------------