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] changelog2009-07-22 01:17 am

[dw-free] Broken poll markup results in wrong/misleading errors

[commit: http://hg.dwscoalition.org/dw-free/rev/7a5eb132ec5e]

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

Clear up error messages when you attempt to post with a poll and it fails.

Patch by [personal profile] afuna.

Files modified:
  • htdocs/update.bml
  • htdocs/update.bml.text
--------------------------------------------------------------------------------
diff -r 97862ec274a4 -r 7a5eb132ec5e htdocs/update.bml
--- a/htdocs/update.bml	Wed Jul 22 01:14:58 2009 +0000
+++ b/htdocs/update.bml	Wed Jul 22 01:17:16 2009 +0000
@@ -394,15 +394,18 @@
                 $update_message = LJ::auto_linkify(LJ::ehtml($res{'message'}));
             }
 
-            # report results
-            $$body .= "<?p <strong>$ML{'.updating'}</strong> ";
-
             if ($res{'success'} ne 'OK') {
                 # update failed?
+                $$body .= "<?p <strong>$ML{'.update.status.failed'}</strong> ";
+
                 $$body .= "<br /><?errorbar <strong>$ML{'.error.update'}</strong> ";
                 $$body .= LJ::ehtml($res{'errmsg'}) . " errorbar?>";
                 $$body .= "<br /> p?>";
             } else {
+
+                # update succeeded
+                $$body .= "<?p <strong>$ML{'.update.status.succeeded'}</strong> ";
+
                 # Clear out a draft
                 $remote->set_prop('entry_draft', '')
                     if $remote;
diff -r 97862ec274a4 -r 7a5eb132ec5e htdocs/update.bml.text
--- a/htdocs/update.bml.text	Wed Jul 22 01:14:58 2009 +0000
+++ b/htdocs/update.bml.text	Wed Jul 22 01:17:16 2009 +0000
@@ -123,9 +123,11 @@
 
 .update.head=Update your Journal...
 
+.update.status.failed=Your entry has not been posted.
+
+.update.status.succeeded=Your entry has been posted.
+
 .update.success2=Update successful. You can view your updated journal <a [[aopts]]>here</a>.
-
-.updating=Updating journal...
 
 .username=Username:
 
--------------------------------------------------------------------------------