holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r20919: 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-17 13:51:54 UTC (rev 20918)
+++ trunk/cgi-bin/LJ/Blob.pm	2012-01-18 06:16:33 UTC (rev 20919)
@@ -133,9 +133,9 @@
     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 = FB::get_db_writer();
     if ($domain) {
         if ($domain eq 'fotobilder') {
+            my $udbh = FB::get_db_writer();
             my $diskusage_Kb = $udbh->selectrow_array(qq{
                      SELECT Kibused FROM diskusage
                      WHERE userid = ?
@@ -147,6 +147,7 @@
                                           $u->{userid}, LJ::get_blob_domainid($domain));
         }
     } else {
+        my $udbh = FB::get_db_writer();
         my $diskusage_without_fotobilder = $dbcr->selectrow_array("SELECT SUM(length) FROM userblob ".
                                                                   "WHERE journalid=? AND domain<>?", undef, 
                                                                   $u->{userid}, LJ::get_blob_domainid('fotobilder'));

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