remove unnecessary code
This commit is contained in:
parent
807aa6b4a6
commit
2ef8604c31
|
@ -214,18 +214,6 @@ class Application_Model_Systemstatus
|
||||||
{
|
{
|
||||||
$partions = array();
|
$partions = array();
|
||||||
|
|
||||||
if (isset($_SERVER['AIRTIME_SRV'])) {
|
|
||||||
//connect to DB and find how much total space user has allocated.
|
|
||||||
$totalSpace = Application_Model_Preference::GetDiskQuota();
|
|
||||||
|
|
||||||
$storPath = Application_Model_MusicDir::getStorDir()->getDirectory();
|
|
||||||
|
|
||||||
list($usedSpace,) = preg_split("/[\s]+/", exec("du -bs $storPath"));
|
|
||||||
|
|
||||||
$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
|
/* First lets get all the watched directories. Then we can group them
|
||||||
* into the same partitions by comparing the partition sizes. */
|
* into the same partitions by comparing the partition sizes. */
|
||||||
$musicDirs = Application_Model_MusicDir::getWatchedDirs();
|
$musicDirs = Application_Model_MusicDir::getWatchedDirs();
|
||||||
|
@ -243,7 +231,6 @@ class Application_Model_Systemstatus
|
||||||
|
|
||||||
$partitions[$totalSpace]->dirs[] = $md->getDirectory();
|
$partitions[$totalSpace]->dirs[] = $md->getDirectory();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return array_values($partitions);
|
return array_values($partitions);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue