Merge branch 'saas' into cc-5709-airtime-analyzer-cloud-storage-saas
This commit is contained in:
commit
d99147bad4
|
@ -164,8 +164,12 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
&& strpos($_SERVER['REQUEST_URI'], $baseUrl.'audiopreview/playlist-preview') === false
|
||||
&& strpos($_SERVER['REQUEST_URI'], $baseUrl.'audiopreview/block-preview') === false) {
|
||||
if (Application_Model_Preference::GetLiveChatEnabled()) {
|
||||
$client_id = Application_Model_Preference::GetClientId();
|
||||
$view->headScript()->appendScript("var livechat_client_id = '$client_id';");
|
||||
$client_id = strval(Application_Model_Preference::GetClientId());
|
||||
$plan_level = strval(Application_Model_Preference::GetPlanLevel());
|
||||
$station_url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
|
||||
$view->headScript()->appendScript("var livechat_client_id = '$client_id';\n".
|
||||
"var livechat_plan_type = '$plan_level';\n".
|
||||
"var livechat_station_url = 'http://$station_url';");
|
||||
$view->headScript()->appendFile($baseUrl . 'js/airtime/common/livechat.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,6 +114,11 @@ $pages = array(
|
|||
'uri' => '#',
|
||||
'resource' => 'dashboard',
|
||||
'pages' => array(
|
||||
array(
|
||||
'label' => _('Help Center'),
|
||||
'uri' => "http://help.sourcefabric.org/",
|
||||
'target' => "_blank"
|
||||
),
|
||||
array(
|
||||
'label' => _('Getting Started'),
|
||||
'module' => 'default',
|
||||
|
|
|
@ -572,6 +572,7 @@ class BillingController extends Zend_Controller_Action {
|
|||
try {
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); // WHMCS IP whitelist doesn't support IPv6
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 5); //Aggressive 5 second timeout
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
|
@ -598,4 +599,4 @@ class BillingController extends Zend_Controller_Action {
|
|||
throw new Exception("Invalid client ID: " . Application_Model_Preference::GetClientId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -439,6 +439,7 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); // WHMCS IP whitelist doesn't support IPv6
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 5); //Aggressive 5 second timeout
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string);
|
||||
|
|
|
@ -155,6 +155,7 @@ class WHMCS_Auth_Adapter implements Zend_Auth_Adapter_Interface {
|
|||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, WHMCS_API_URL);
|
||||
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); // WHMCS IP whitelist doesn't support IPv6
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
|
||||
|
@ -164,7 +165,8 @@ class WHMCS_Auth_Adapter implements Zend_Auth_Adapter_Interface {
|
|||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
$jsondata = curl_exec($ch);
|
||||
if (curl_error($ch)) {
|
||||
die(curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));
|
||||
Logging::error("Failed to reach WHMCS server in " . __FUNCTION__ . ": "
|
||||
. curl_errno($ch) . ' - ' . curl_error($ch) . ' - ' . curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));
|
||||
//die("Connection Error: ".curl_errno($ch).' - '.curl_error($ch));
|
||||
}
|
||||
curl_close($ch);
|
||||
|
@ -201,6 +203,7 @@ class WHMCS_Auth_Adapter implements Zend_Auth_Adapter_Interface {
|
|||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, WHMCS_API_URL);
|
||||
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); // WHMCS IP whitelist doesn't support IPv6
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
|
||||
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
|
||||
|
@ -210,7 +213,8 @@ class WHMCS_Auth_Adapter implements Zend_Auth_Adapter_Interface {
|
|||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
$jsondata = curl_exec($ch);
|
||||
if (curl_error($ch)) {
|
||||
die(curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));
|
||||
Logging::error("Failed to reach WHMCS server in " . __FUNCTION__ . ": "
|
||||
. curl_errno($ch) . ' - ' . curl_error($ch) . ' - ' . curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));
|
||||
//die("Connection Error: ".curl_errno($ch).' - '.curl_error($ch));
|
||||
}
|
||||
curl_close($ch);
|
||||
|
@ -255,4 +259,4 @@ class WHMCS_Auth_Adapter implements Zend_Auth_Adapter_Interface {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
//
|
||||
// Add the description element
|
||||
$this->addElement('textarea', 'widgetCode', array(
|
||||
'label' => 'Javascript Code:',
|
||||
'label' => _('HTML Code:'),
|
||||
'required' => false,
|
||||
'readonly' => true,
|
||||
'style' => 'font-family: Consolas, "Liberation Mono", Courier,
|
||||
|
@ -134,10 +134,14 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
|
||||
$host = $_SERVER['SERVER_NAME'];
|
||||
$code = <<<CODE
|
||||
<script src="http://$host/widgets/js/jquery-1.6.1.min.js" type="text/javascript"></script>
|
||||
<script src="http://$host/widgets/js/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
|
||||
<script src="http://$host/widgets/js/jquery.showinfo.js" type="text/javascript"></script>
|
||||
<!-- READ THESE INSTRUCTIONS CAREFULLY:
|
||||
Step 1 of 2: Paste these next 4 lines in the <head> section of your HTML page -->
|
||||
<script src="https://$host/widgets/js/jquery-1.6.1.min.js" type="text/javascript"></script>
|
||||
<script src="https://$host/widgets/js/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
|
||||
<script src="https://$host/widgets/js/jquery.showinfo.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="https://$host/widgets/css/airtime-widgets.css"></link>
|
||||
|
||||
<!-- Step 2 of 2: Paste these remaining lines in the <body> section of your HTML page -->
|
||||
<div id="headerLiveHolder" style="border: 1px solid #999999; padding: 10px;"></div>
|
||||
<div id="onAirToday"></div>
|
||||
<div id="scheduleTabs"></div>
|
||||
|
@ -159,6 +163,8 @@ $(document).ready(function() {
|
|||
sourceDomain:"http://$host",
|
||||
updatePeriod: 600 //seconds
|
||||
});
|
||||
var d = new Date().getDay();
|
||||
$('#scheduleTabs').tabs({selected: d === 0 ? 6 : d-1, fx: { opacity: 'toggle' }});
|
||||
});
|
||||
</script>
|
||||
CODE;
|
||||
|
|
|
@ -309,7 +309,7 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
|
|||
$media_url = self::getXspfUrl($url);
|
||||
} elseif (preg_match("/pls\+xml/", $mime) || preg_match("/x-scpls/", $mime)) {
|
||||
$media_url = self::getPlsUrl($url);
|
||||
} elseif (preg_match("/(mpeg|ogg|audio\/aacp)/", $mime)) {
|
||||
} elseif (preg_match("/(mpeg|ogg|audio\/aacp|audio\/aac)/", $mime)) {
|
||||
if ($content_length_found) {
|
||||
throw new Exception(_("Invalid webstream - This appears to be a file download."));
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@ function setupLiveChat() {
|
|||
// this is where we pass custom variables to livechat;
|
||||
// only pass the client id assigned by WHMCS for now
|
||||
__lc.params = [
|
||||
{ name: 'client_id', value: livechat_client_id }
|
||||
{ name: 'client_id', value: livechat_client_id },
|
||||
{ name: 'plan_type', value: livechat_plan_type},
|
||||
{ name: 'station_url', value: livechat_station_url}
|
||||
];
|
||||
|
||||
var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true;
|
||||
|
@ -15,4 +17,4 @@ function setupLiveChat() {
|
|||
|
||||
$(document).ready(function() {
|
||||
setupLiveChat();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
if bitrate == 24 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 24, aot="mpeg4_he_aac_v2"), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 24, aot="mpeg4_he_aac_v2", afterburner=false, sbr_mode=true), !source))
|
||||
elsif bitrate == 32 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 32, aot="mpeg4_he_aac_v2"), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 32, aot="mpeg4_he_aac_v2", afterburner=false, sbr_mode=true), !source))
|
||||
elsif bitrate == 48 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 48, aot="mpeg4_he_aac_v2"), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 48, aot="mpeg4_he_aac_v2", afterburner=false, sbr_mode=true), !source))
|
||||
elsif bitrate == 64 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 64, aot="mpeg4_he_aac_v2"), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 64, aot="mpeg4_he_aac_v2", afterburner=false, sbr_mode=true), !source))
|
||||
elsif bitrate == 96 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 96, aot="mpeg4_he_aac_v2"), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 96, aot="mpeg4_he_aac_v2", afterburner=false, sbr_mode=true), !source))
|
||||
elsif bitrate == 128 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 128, aot="mpeg4_he_aac_v2"), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 128, aot="mpeg4_he_aac_v2", afterburner=false, sbr_mode=true), !source))
|
||||
elsif bitrate == 160 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 160, aot="mpeg4_he_aac_v2"), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 160, aot="mpeg4_he_aac_v2", afterburner=true, sbr_mode=true), !source))
|
||||
elsif bitrate == 192 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 192, aot="mpeg4_he_aac_v2"), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 192, aot="mpeg4_he_aac_v2", afterburner=true, sbr_mode=true), !source))
|
||||
elsif bitrate == 224 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 224, aot="mpeg4_he_aac_v2"), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 224, aot="mpeg4_he_aac_v2", afterburner=true, sbr_mode=true), !source))
|
||||
elsif bitrate == 256 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 256, aot="mpeg4_he_aac_v2"), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 256, aot="mpeg4_he_aac_v2", afterburner=true, sbr_mode=true), !source))
|
||||
elsif bitrate == 320 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 320, aot="mpeg4_he_aac_v2"), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 320, aot="mpeg4_he_aac_v2", afterburner=true, sbr_mode=true), !source))
|
||||
end
|
||||
|
||||
|
|
|
@ -150,20 +150,22 @@ def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, de
|
|||
end
|
||||
%endif
|
||||
|
||||
%ifencoder %aac
|
||||
if type == "aac" then
|
||||
%include "aac.liq"
|
||||
end
|
||||
%endif
|
||||
# FDK-AAC is the only good AAC encoder. libvoaac is deprecated and aacplus is subpar.
|
||||
# The difference in compression quality is clearly audible. -- Albert
|
||||
# %ifencoder %aac
|
||||
# if type == "aac" then
|
||||
# %include "aac.liq"
|
||||
# end
|
||||
# %endif
|
||||
|
||||
%ifencoder %aacplus
|
||||
if type == "aacplus" then
|
||||
%include "aacplus.liq"
|
||||
end
|
||||
%endif
|
||||
# %ifencoder %aacplus
|
||||
# if type == "aacplus" then
|
||||
# %include "aacplus.liq"
|
||||
# end
|
||||
# %endif
|
||||
|
||||
%ifencoder %fdkaac
|
||||
if type == "fdkaac" then
|
||||
if type == "aac" then
|
||||
%include "fdkaac.liq"
|
||||
end
|
||||
%endif
|
||||
|
|
Loading…
Reference in New Issue