CC-5781: Upgrade script for new storage quota implementation
Upgrade script for saas only
This commit is contained in:
parent
bbc81be1d3
commit
65b7c7ee05
|
@ -16,9 +16,12 @@ class StorageQuotaUpgrade
|
||||||
->findOne();
|
->findOne();
|
||||||
$storPath = $musicDir->getDirectory();
|
$storPath = $musicDir->getDirectory();
|
||||||
|
|
||||||
$freeSpace = disk_free_space($storPath);
|
$f = $storPath;
|
||||||
$totalSpace = disk_total_space($storPath);
|
$io = popen('/usr/bin/du -bs ' . $f, 'r');
|
||||||
|
$size = fgets($io, 4096);
|
||||||
|
$size = substr($size, 0, strpos($size, "\t"));
|
||||||
|
pclose($io);
|
||||||
|
|
||||||
Application_Model_Preference::setDiskUsage($totalSpace - $freeSpace);
|
Application_Model_Preference::setDiskUsage($size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue