Merge branch 'cc-5709-airtime-analyzer' into saas
Conflicts: airtime_mvc/application/modules/rest/controllers/MediaController.php
This commit is contained in:
commit
ca7d0688e7
1 changed files with 0 additions and 29 deletions
|
@ -80,35 +80,6 @@ class Rest_MediaController extends Zend_Rest_Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clearAction()
|
|
||||||
{
|
|
||||||
if (!$this->verifyAuth(true, true))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//set file_exists flag to false for every file
|
|
||||||
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME);
|
|
||||||
$selectCriteria = new Criteria();
|
|
||||||
$selectCriteria->add(CcFilesPeer::FILE_EXISTS, true);
|
|
||||||
$updateCriteria = new Criteria();
|
|
||||||
$updateCriteria->add(CcFilesPeer::FILE_EXISTS, false);
|
|
||||||
BasePeer::doUpdate($selectCriteria, $updateCriteria, $con);
|
|
||||||
|
|
||||||
//delete all files and directories under .../imported
|
|
||||||
$path = isset($_SERVER['AIRTIME_BASE']) ? $_SERVER['AIRTIME_BASE']."/srv/airtime/stor/imported/*" : "/srv/airtime/stor/imported/*";
|
|
||||||
exec("rm -rf $path");
|
|
||||||
|
|
||||||
//update disk_usage value in cc_pref
|
|
||||||
$storDir = isset($_SERVER['AIRTIME_BASE']) ? $_SERVER['AIRTIME_BASE']."srv/airtime/stor" : "/srv/airtime/stor";
|
|
||||||
$diskUsage = shell_exec("du -sb $storDir | awk '{print $1}'");
|
|
||||||
Application_Model_Preference::setDiskUsage($diskUsage);
|
|
||||||
|
|
||||||
$this->getResponse()
|
|
||||||
->setHttpResponseCode(200)
|
|
||||||
->appendBody("Library has been cleared");
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getAction()
|
public function getAction()
|
||||||
{
|
{
|
||||||
if (!$this->verifyAuth(true, true))
|
if (!$this->verifyAuth(true, true))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue