Merge branch 'saas' into saas-embed-player

This commit is contained in:
drigato 2015-02-25 12:13:41 -05:00
commit cf11291877
38 changed files with 8964 additions and 85 deletions

View file

@ -160,11 +160,11 @@ class ApiController extends Zend_Controller_Action
// If we're passing in a Stored File object, it's faster
// to use getFileSize() and pass in the result
if (!$size || $size <= 0) {
if (!isset($size) || $size < 0) {
$size= filesize($location);
}
if ($size <= 0) {
if ($size < 0) {
throw new Exception("Invalid file size returned for file at $location");
}
@ -195,9 +195,11 @@ class ApiController extends Zend_Controller_Action
header('Cache-Control: public, must-revalidate, max-age=0');
header('Pragma: no-cache');
header('Accept-Ranges: bytes');
header('Content-Length:' . (($end - $begin) + 1));
if (isset($_SERVER['HTTP_RANGE'])) {
header("Content-Range: bytes $begin-$end/$size");
if ($size > 0) {
header('Content-Length:' . (($end - $begin) + 1));
if (isset($_SERVER['HTTP_RANGE'])) {
header("Content-Range: bytes $begin-$end/$size");
}
}
header("Content-Transfer-Encoding: binary");

View file

@ -116,6 +116,15 @@ class PreferenceController extends Zend_Controller_Action
{
}
public function removeLogoAction()
{
$this->view->layout()->disableLayout();
// Remove reliance on .phtml files to render requests
$this->_helper->viewRenderer->setNoRender(true);
Application_Model_Preference::SetStationLogo("");
}
public function streamSettingAction()
{
$CC_CONFIG = Config::getConfig();

View file

@ -18,6 +18,7 @@ class UpgradeController extends Zend_Controller_Action
array_push($upgraders, new AirtimeUpgrader254());
array_push($upgraders, new AirtimeUpgrader255());
array_push($upgraders, new AirtimeUpgrader259());
array_push($upgraders, new AirtimeUpgrader2510());
$didWePerformAnUpgrade = false;
try

View file

@ -0,0 +1,2 @@
ALTER TABLE cc_files ADD COLUMN filesize integer NOT NULL
CONSTRAINT filesize_default DEFAULT 0