holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r20938: LJSV-1762: A user has used only 4GB out ...

Committer: akanashin
LJSV-1762: A user has used only 4GB out of 10GB scrapbook space, but is getting 'disk full' error
U   trunk/cgi-bin/LJ/Blob.pm
Modified: trunk/cgi-bin/LJ/Blob.pm
===================================================================
--- trunk/cgi-bin/LJ/Blob.pm	2012-01-19 15:12:40 UTC (rev 20937)
+++ trunk/cgi-bin/LJ/Blob.pm	2012-01-19 15:23:07 UTC (rev 20938)
@@ -133,9 +133,10 @@
     shift @_ unless LJ::isu($_[0]);  # let it be called as class method (LJ::Blob->get_disk_usage($u,...))
     my ($u, $domain) = @_;
     my $dbcr = LJ::get_cluster_reader($u);
+    my $udbh;
     if ($domain) {
         if ($domain eq 'fotobilder') {
-            my $udbh = FB::get_db_writer();
+            eval{$udbh = FB::get_db_writer()};
             return 0 unless $udbh;
             my $diskusage_Kb = $udbh->selectrow_array(qq{
                      SELECT Kibused FROM diskusage
@@ -148,7 +149,7 @@
                                           $u->{userid}, LJ::get_blob_domainid($domain));
         }
     } else {
-        my $udbh = FB::get_db_writer();
+        eval {$udbh = FB::get_db_writer()};
         my $diskusage_fotobilder_Kb = 0;
         my $diskusage_without_fotobilder = $dbcr->selectrow_array("SELECT SUM(length) FROM userblob ".
                                                                   "WHERE journalid=? AND domain<>?", undef, 

Tags: akanashin, holyandrew, livejournal, pm
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