Henry Lyne (henrylyne) wrote in changelog,
Henry Lyne

[livejournal] r15503: Keep the comment text even if an error i...

Committer: henrylyne
Keep the comment text even if an error is returned.
Don't just return on error right away, push error on to error list.

Thanks to http://bugs.dwscoalition.org/show_bug.cgi?id=126

U   trunk/htdocs/talkpost_do.bml
U   trunk/htdocs/talkpost_do.bml.text
Modified: trunk/htdocs/talkpost_do.bml
--- trunk/htdocs/talkpost_do.bml	2009-07-16 13:48:18 UTC (rev 15502)
+++ trunk/htdocs/talkpost_do.bml	2009-07-16 14:05:39 UTC (rev 15503)
@@ -111,7 +111,7 @@
     # FIXME: this isn't entirely correct, if ecphash is present but ignored/incorrect
     # that fix would need to be done in talklib.pl
-    return "<?h1 $ML{'Error'} h1?> $ML{'error.invalidform'}"
+    push @errors, $ML{'.error.invalidform'}
         if $remote && ! ($skip_form_auth || $POST{'ecphash'} || LJ::check_form_auth());
     ## preview

Modified: trunk/htdocs/talkpost_do.bml.text
--- trunk/htdocs/talkpost_do.bml.text	2009-07-16 13:48:18 UTC (rev 15502)
+++ trunk/htdocs/talkpost_do.bml.text	2009-07-16 14:05:39 UTC (rev 15503)
@@ -14,6 +14,8 @@
 .error.friendsonly=Only friends of [[user]] may post in this journal.
+.error.invalidform=Invalid form submission. You may have left the reply form open too long, or logged out since you opened the page. Please try posting again.
 .error.membersonly=Only members of [[user]] can post in this community.
 .error.lostcookie=Your login cookie seems to have disappeared?


  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment