Author: david
Date: Tue Aug 30 11:34:54 2011
New Revision: 9628

Log:
Remove code that was copied to editUploadLimit component

Modified:
   trunk/apps/qubit/modules/repository/actions/contextMenuComponent.class.php

Modified: 
trunk/apps/qubit/modules/repository/actions/contextMenuComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/repository/actions/contextMenuComponent.class.php  
Tue Aug 30 10:49:49 2011        (r9627)
+++ trunk/apps/qubit/modules/repository/actions/contextMenuComponent.class.php  
Tue Aug 30 11:34:54 2011        (r9628)
@@ -32,60 +32,6 @@
       return sfView::NONE;
     }
 
-    // Show current disk usage vs. limit for repository, unless upload is
-    // disabled (zero)
-    if (0 != $this->resource->uploadLimit)
-    {
-      // Convert bytes to GB
-      $du = floatval($this->resource->getDiskUsage()) / pow(10, 9);
-
-      // Get display value for disk usage
-      if (0 < $du && 0.01 > $du)
-      {
-        $this->diskUsage = '<&nbsp;0.01';
-      }
-      else
-      {
-        $this->diskUsage = round($du, 2);
-      }
-
-      // Get display value for upload limit
-      if (0 > $this->resource->uploadLimit)
-      {
-        $this->uploadLimit = '<em>Unlimited</em>';
-      }
-      else
-      {
-        $this->uploadLimit = $this->resource->uploadLimit;
-      }
-
-      // Calc progress bar and percentages values for usage limit > 0
-      if (0 < $this->resource->uploadLimit)
-      {
-        // Default color for "disk usage" bar is green
-        $this->barColor = '#390';
-
-        // Calculate disk usage percentages
-        $dup = $du / floatval($this->resource->uploadLimit) * 100;
-        if (0 < $dup && 1 > $dup)
-        {
-          $this->diskUsagePercent = '<&nbsp;1';
-          $this->barPixels = '1';
-        }
-        else if (100 < $dup)
-        {
-          $this->diskUsagePercent = '>&nbsp;100';
-          $this->barPixels = 200;
-          $this->barColor = '#C33'; // RED!
-        }
-        else
-        {
-          $this->diskUsagePercent = round($dup, 0);
-          $this->barPixels = round($dup * 2, 0);
-        }
-      }
-    }
-
     $criteria = new Criteria;
     $criteria->addJoin(QubitInformationObject::ID, QubitObject::ID);
     $criteria->add(QubitInformationObject::REPOSITORY_ID, $this->resource->id);

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to