remove unecessary saas code
This commit is contained in:
parent
ea9e97d834
commit
c6493f9d74
1 changed files with 7 additions and 27 deletions
|
@ -214,7 +214,6 @@ class Application_Model_Systemstatus
|
|||
{
|
||||
$partions = array();
|
||||
|
||||
if (isset($_SERVER['AIRTIME_SRV'])) {
|
||||
//connect to DB and find how much total space user has allocated.
|
||||
$totalSpace = Application_Model_Preference::GetDiskQuota();
|
||||
|
||||
|
@ -225,25 +224,6 @@ class Application_Model_Systemstatus
|
|||
$partitions[$totalSpace]->totalSpace = $totalSpace;
|
||||
$partitions[$totalSpace]->totalFreeSpace = $totalSpace - $usedSpace;
|
||||
Logging::info($partitions[$totalSpace]->totalFreeSpace);
|
||||
} else {
|
||||
/* First lets get all the watched directories. Then we can group them
|
||||
* into the same partitions by comparing the partition sizes. */
|
||||
$musicDirs = Application_Model_MusicDir::getWatchedDirs();
|
||||
$musicDirs[] = Application_Model_MusicDir::getStorDir();
|
||||
|
||||
foreach ($musicDirs as $md) {
|
||||
$totalSpace = disk_total_space($md->getDirectory());
|
||||
|
||||
if (!isset($partitions[$totalSpace])) {
|
||||
$partitions[$totalSpace] = new StdClass;
|
||||
$partitions[$totalSpace]->totalSpace = $totalSpace;
|
||||
$partitions[$totalSpace]->totalFreeSpace = disk_free_space($md->getDirectory());
|
||||
|
||||
}
|
||||
|
||||
$partitions[$totalSpace]->dirs[] = $md->getDirectory();
|
||||
}
|
||||
}
|
||||
|
||||
return array_values($partitions);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue