журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[livejournal] r22744: LJSUP-13430: Add error message on update...

Committer: nnikulochkina
LJSUP-13430: Add error message on update.bml
U   trunk/bin/upgrading/en.dat
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/bin/upgrading/en.dat
===================================================================
--- trunk/bin/upgrading/en.dat	2012-08-27 13:58:37 UTC (rev 22743)
+++ trunk/bin/upgrading/en.dat	2012-08-27 14:05:50 UTC (rev 22744)
@@ -10218,6 +10218,9 @@
 xmlrpc.error.222|staleness=1
 xmlrpc.error.222=Cannot create or update paid repost button via API
 
+xmlrpc.error.223|staleness=1
+xmlrpc.error.223=Repost budget is empty
+
 xmlrpc.error.300|staleness=1
 xmlrpc.error.300=Don't have access to requested journal
 

Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2012-08-27 13:58:37 UTC (rev 22743)
+++ trunk/cgi-bin/ljprotocol.pl	2012-08-27 14:05:50 UTC (rev 22744)
@@ -101,6 +101,7 @@
      "220" => E_PERM,
      "221" => E_PERM,
      "222" => E_PERM,    
+     "223" => E_TEMP,
 
      # Access Errors
      "300" => E_TEMP,
@@ -2439,10 +2440,12 @@
              userid        => $posterid}, 
             \$error
         );
-        
+
         return fail($err,222) if $repost_offer && ! $flags->{noauth};
        
         return fail($err,160,$error) if $error;
+
+        return fail($err,223) if $req->{'paid_repost_on'} && ! $repost_offer->{'budget'};
     }
 
     # convert RTE lj-embeds to normal lj-embeds

Tags: dat, livejournal, nikulochkina, nnikulochkina, pl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments