Committer: ailyin
LJSUP-9710 (Dublicate error when try to promote incorrect post)U trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm
Modified: trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm =================================================================== --- trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm 2011-09-06 05:31:42 UTC (rev 10962) +++ trunk/cgi-bin/LJ/Widget/Shop/View/SelfPromo.pm 2011-09-06 06:06:12 UTC (rev 10963) @@ -98,6 +98,12 @@ my $format_result = sub { my ( $result, $html ) = @_; + if ( $result eq 'error' ) { + my $ml_title = LJ::Lang::ml('error.procrequest'); + $html = "<p><strong>$ml_title</strong></p>" . + "<ul><li><p>$html</p></li></ul>"; + } + return LJ::JSON->to_json( { 'result' => $result, 'html' => $html } ); };