Merge branch '2.5.x' into cc-5709-airtime-analyzer
Conflicts: airtime_mvc/application/controllers/LoginController.php airtime_mvc/application/controllers/plugins/Acl_plugin.php airtime_mvc/locale/de_AT/LC_MESSAGES/airtime.po airtime_mvc/locale/en_GB/LC_MESSAGES/airtime.po airtime_mvc/locale/pt_BR/LC_MESSAGES/airtime.po
This commit is contained in:
commit
24d842c4a6
16 changed files with 11781 additions and 53 deletions
22
INSTALL
22
INSTALL
|
@ -1,22 +0,0 @@
|
|||
Airtime is the open radio software for scheduling and remote station management.
|
||||
Home page: http://airtime.sourcefabric.org/
|
||||
|
||||
Installation instructions are here:
|
||||
http://wiki.sourcefabric.org/x/BQBF
|
||||
|
||||
Here is the manual:
|
||||
http://en.flossmanuals.net/airtime/
|
||||
|
||||
To report bugs, visit our bug tracker at:
|
||||
http://dev.sourcefabric.org/browse/CC
|
||||
|
||||
Visit our community support forum here:
|
||||
http://forum.sourcefabric.org/index.php/f/14/
|
||||
|
||||
For commercial support, see:
|
||||
http://sourcefabric.org/en/services/about/347/Support.htm
|
||||
or send an e-mail to contact@sourcefabric.org
|
||||
|
||||
If you are a developer and want to hack on Airtime, go here:
|
||||
http://wiki.sourcefabric.org/display/CC
|
||||
|
|
@ -14,9 +14,11 @@ class LoginController extends Zend_Controller_Action
|
|||
$request = $this->getRequest();
|
||||
|
||||
Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', 'en_CA'));
|
||||
if (Zend_Auth::getInstance()->hasIdentity())
|
||||
{
|
||||
$auth = Zend_Auth::getInstance();
|
||||
Application_Model_Auth::pinSessionToClient($auth);
|
||||
|
||||
if ($auth->hasIdentity())
|
||||
{
|
||||
$this->_redirect('Showbuilder');
|
||||
}
|
||||
|
||||
|
@ -53,7 +55,6 @@ class LoginController extends Zend_Controller_Action
|
|||
$authAdapter->setIdentity($username)
|
||||
->setCredential($password);
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$result = $auth->authenticate($authAdapter);
|
||||
if ($result->isValid()) {
|
||||
//all info about this user from the login table omit only the password
|
||||
|
@ -66,14 +67,12 @@ class LoginController extends Zend_Controller_Action
|
|||
Application_Model_LoginAttempts::resetAttempts($_SERVER['REMOTE_ADDR']);
|
||||
Application_Model_Subjects::resetLoginAttempts($username);
|
||||
|
||||
$tempSess = new Zend_Session_Namespace("referrer");
|
||||
$tempSess->referrer = 'login';
|
||||
|
||||
//set the user locale in case user changed it in when logging in
|
||||
Application_Model_Preference::SetUserLocale($locale);
|
||||
|
||||
$this->_redirect('Showbuilder');
|
||||
} else {
|
||||
|
||||
$message = _("Wrong username or password provided. Please try again.");
|
||||
Application_Model_Subjects::increaseLoginAttempts($username);
|
||||
Application_Model_LoginAttempts::increaseAttempts($_SERVER['REMOTE_ADDR']);
|
||||
|
@ -96,7 +95,9 @@ class LoginController extends Zend_Controller_Action
|
|||
|
||||
public function logoutAction()
|
||||
{
|
||||
Zend_Auth::getInstance()->clearIdentity();
|
||||
$auth = Zend_Auth::getInstance();
|
||||
Application_Model_Auth::pinSessionToClient($auth);
|
||||
$auth->clearIdentity();
|
||||
$this->_redirect('showbuilder/index');
|
||||
}
|
||||
|
||||
|
@ -188,6 +189,7 @@ class LoginController extends Zend_Controller_Action
|
|||
$auth->invalidateTokens($user, 'password.restore');
|
||||
|
||||
$zend_auth = Zend_Auth::getInstance();
|
||||
Application_Model_Auth::pinSessionToClient($zend_auth);
|
||||
$zend_auth->clearIdentity();
|
||||
|
||||
$authAdapter = Application_Model_Auth::getAuthAdapter();
|
||||
|
|
|
@ -109,6 +109,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
|||
public function preDispatch(Zend_Controller_Request_Abstract $request)
|
||||
{
|
||||
$controller = strtolower($request->getControllerName());
|
||||
Application_Model_Auth::pinSessionToClient(Zend_Auth::getInstance());
|
||||
|
||||
//Ignore authentication for all access to the rest API. We do auth via API keys for this
|
||||
//and/or by OAuth.
|
||||
|
|
|
@ -110,4 +110,13 @@ class Application_Model_Auth
|
|||
|
||||
return $string;
|
||||
}
|
||||
|
||||
/** It is essential to do this before interacting with Zend_Auth otherwise sessions could be shared between
|
||||
* different copies of Airtime on the same webserver. This essentially pins this session to this hostname and client ID.
|
||||
* @param Zend_Auth $auth Get this with Zend_Auth::getInstance().
|
||||
*/
|
||||
public static function pinSessionToClient($auth)
|
||||
{
|
||||
$auth->setStorage(new Zend_Auth_Storage_Session('Airtime' . $_SERVER['SERVER_NAME'] . Application_Model_Preference::GetClientId()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -303,10 +303,10 @@ SQL;
|
|||
$p_start_str = $p_start->format("Y-m-d H:i:s");
|
||||
$p_end_str = $p_end->format("Y-m-d H:i:s");
|
||||
|
||||
//We need to search 24 hours before and after the show times so that that we
|
||||
//We need to search 48 hours before and after the show times so that that we
|
||||
//capture all of the show's contents.
|
||||
$p_track_start= $p_start->sub(new DateInterval("PT24H"))->format("Y-m-d H:i:s");
|
||||
$p_track_end = $p_end->add(new DateInterval("PT24H"))->format("Y-m-d H:i:s");
|
||||
$p_track_start= $p_start->sub(new DateInterval("PT48H"))->format("Y-m-d H:i:s");
|
||||
$p_track_end = $p_end->add(new DateInterval("PT48H"))->format("Y-m-d H:i:s");
|
||||
|
||||
$templateSql = <<<SQL
|
||||
SELECT DISTINCT sched.starts AS sched_starts,
|
||||
|
|
|
@ -85,33 +85,32 @@ class Application_Service_CalendarService
|
|||
$currentShow = Application_Model_Show::getCurrentShow();
|
||||
$currentShowId = count($currentShow) == 1 ? $currentShow[0]["id"] : null;
|
||||
$showIsLinked = $this->ccShow->isLinked();
|
||||
|
||||
//user can add/remove content if the show has not ended
|
||||
if ($now < $end && ($isAdminOrPM || $isHostOfShow) && !$this->ccShowInstance->isRecorded()) {
|
||||
//if the show is not linked the user can add/remove content
|
||||
if (!$showIsLinked) {
|
||||
|
||||
$menu["schedule"] = array(
|
||||
"name"=> _("Add / Remove Content"),
|
||||
"icon" => "add-remove-content",
|
||||
"url" => $baseUrl."showbuilder/builder-dialog/");
|
||||
//if the show is linked and it's not currently playing the user can add/remove content
|
||||
} elseif ($showIsLinked && $currentShowId != $this->ccShow->getDbId()) {
|
||||
//if the show is not linked OR if the show is linked AND not the current playing show
|
||||
//the user can add/remove content
|
||||
if (!$showIsLinked || ($showIsLinked && $currentShowId != $this->ccShow->getDbId())) {
|
||||
|
||||
$menu["schedule"] = array(
|
||||
"name"=> _("Add / Remove Content"),
|
||||
"icon" => "add-remove-content",
|
||||
"url" => $baseUrl."showbuilder/builder-dialog/");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($now < $start && ($isAdminOrPM || $isHostOfShow) &&
|
||||
!$this->ccShowInstance->isRecorded() ) {
|
||||
//user can remove all content if the show has not started
|
||||
if ($now < $start && ($isAdminOrPM || $isHostOfShow) && !$this->ccShowInstance->isRecorded() ) {
|
||||
//if the show is not linked OR if the show is linked AND not the current playing show
|
||||
//the user can remove all content
|
||||
if (!$showIsLinked || ($showIsLinked && $currentShowId != $this->ccShow->getDbId())) {
|
||||
|
||||
$menu["clear"] = array(
|
||||
"name"=> _("Remove All Content"),
|
||||
"icon" => "remove-all-content",
|
||||
"url" => $baseUrl."schedule/clear-show");
|
||||
}
|
||||
}
|
||||
|
||||
//"Show Content" should be a menu item at all times except when
|
||||
//the show is recorded
|
||||
|
|
BIN
airtime_mvc/locale/az/LC_MESSAGES/airtime.mo
Normal file
BIN
airtime_mvc/locale/az/LC_MESSAGES/airtime.mo
Normal file
Binary file not shown.
3913
airtime_mvc/locale/az/LC_MESSAGES/airtime.po
Normal file
3913
airtime_mvc/locale/az/LC_MESSAGES/airtime.po
Normal file
File diff suppressed because it is too large
Load diff
Binary file not shown.
Binary file not shown.
BIN
airtime_mvc/locale/hy/LC_MESSAGES/airtime.mo
Normal file
BIN
airtime_mvc/locale/hy/LC_MESSAGES/airtime.mo
Normal file
Binary file not shown.
3913
airtime_mvc/locale/hy/LC_MESSAGES/airtime.po
Normal file
3913
airtime_mvc/locale/hy/LC_MESSAGES/airtime.po
Normal file
File diff suppressed because it is too large
Load diff
BIN
airtime_mvc/locale/ka/LC_MESSAGES/airtime.mo
Normal file
BIN
airtime_mvc/locale/ka/LC_MESSAGES/airtime.mo
Normal file
Binary file not shown.
3913
airtime_mvc/locale/ka/LC_MESSAGES/airtime.po
Normal file
3913
airtime_mvc/locale/ka/LC_MESSAGES/airtime.po
Normal file
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -283,11 +283,11 @@ def organized_path(old_path, root_path, orig_md):
|
|||
title_re = re.match(r, normal_md['MDATA_KEY_TITLE'])
|
||||
show_name = title_re.group('show')
|
||||
#date = title_re.group('date')
|
||||
yyyy, mm, _ = normal_md['MDATA_KEY_YEAR'].split('-',2)
|
||||
yyyy, mm, dd = normal_md['MDATA_KEY_YEAR'].split('-',2)
|
||||
fname_base = '%s-%s-%s.%s' % \
|
||||
(title_re.group('time'), show_name,
|
||||
normal_md['MDATA_KEY_BITRATE'], ext)
|
||||
filepath = os.path.join(root_path, yyyy, mm, fname_base)
|
||||
filepath = os.path.join(root_path, yyyy, mm, dd, fname_base)
|
||||
elif len(normal_md['MDATA_KEY_TRACKNUMBER']) == 0:
|
||||
fname = u'%s-%s.%s' % (normal_md['MDATA_KEY_TITLE'],
|
||||
normal_md['MDATA_KEY_BITRATE'], ext)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue