Merge branch 'cc-5709-airtime-analyzer' into cc-5709-airtime-analyzer-saas

This commit is contained in:
Albert Santoni 2014-06-23 15:28:50 -04:00
commit 72ef576f03
16 changed files with 11781 additions and 53 deletions

View file

@ -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()));
}
}

View file

@ -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,