Merge branch 'cc-5709-airtime-analyzer' of github.com:sourcefabric/Airtime into cc-5709-airtime-analyzer

This commit is contained in:
Albert Santoni 2014-04-08 14:16:20 -04:00
commit b90356b74c
2 changed files with 9 additions and 27 deletions

View File

@ -1,29 +1,5 @@
<?php
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../../install_minimal/../airtime_mvc/application'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
realpath(APPLICATION_PATH . '/../library')
)));
/*set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
realpath(APPLICATION_PATH . '/../library/propel/runtime/lib')
)));*/
//Propel classes.
set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_path());
set_include_path(APPLICATION_PATH . '/models/airtime' . PATH_SEPARATOR . get_include_path());
set_include_path(APPLICATION_PATH . '/models/om' . PATH_SEPARATOR . get_include_path());
require_once 'propel/runtime/lib/Propel.php';
require_once 'CcMusicDirsQuery.php';
#require_once 'BaseCcMusicDirsQuery.php';
class StorageQuotaUpgrade
{
public static function startUpgrade()
@ -35,10 +11,10 @@ class StorageQuotaUpgrade
private static function setStorageUsage()
{
$musicDir = CcMusicDirsQuery::create()
->filterByDbType('stor')
->filterByDbExists(true)
->filterByType('stor')
->filterByExists(true)
->findOne();
$storPath = $musicDir->getDbDirectory();
$storPath = $musicDir->getDirectory();
$freeSpace = disk_free_space($storPath);
$totalSpace = disk_total_space($storPath);

View File

@ -1,5 +1,11 @@
<?php
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../../install_minimal/../airtime_mvc/application'));
//include index.php so we can use propel classes
require_once APPLICATION_PATH.'/../public/index.php';
require_once 'DbUpgrade.php';
require_once 'StorageQuotaUpgrade.php';