diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index 6e8e445fa..cc4acd49e 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -310,13 +310,9 @@ class ScheduleController extends Zend_Controller_Action return; } - $start = explode(" ", $start_timestamp); - $end = explode(" ", $end_timestamp); - $startTime = explode(":", $start[1]); - $endTime = explode(":", $end[1]); - $dateInfo_s = getDate(strtotime($start_timestamp)); - $dateInfo_e = getDate(strtotime($end_timestamp)); - + $dateInfo_s = getDate(strtotime(Application_Model_DateHelper::ConvertToLocalDateTimeString($start_timestamp))); + $dateInfo_e = getDate(strtotime(Application_Model_DateHelper::ConvertToLocalDateTimeString($end_timestamp))); + $this->view->showContent = $show->getShowContent(); $this->view->timeFilled = $show->getTimeScheduled(); $this->view->showName = $show->getName(); @@ -329,8 +325,8 @@ class ScheduleController extends Zend_Controller_Action $this->view->e_wday = $dateInfo_e['weekday']; $this->view->e_month = $dateInfo_e['month']; $this->view->e_day = $dateInfo_e['mday']; - $this->view->startTime = sprintf("%d:%02d", $startTime[0], $startTime[1]); - $this->view->endTime = sprintf("%d:%02d", $endTime[0], $endTime[1]); + $this->view->startTime = sprintf("%02d:%02d", $dateInfo_s['hours'], $dateInfo_s['minutes']); + $this->view->endTime = sprintf("%02d:%02d", $dateInfo_e['hours'], $dateInfo_e['minutes']); $this->view->chosen = $this->view->render('schedule/scheduled-content.phtml'); $this->view->dialog = $this->view->render('schedule/schedule-show-dialog.phtml'); diff --git a/airtime_mvc/application/forms/AddUser.php b/airtime_mvc/application/forms/AddUser.php index 43b76495c..1f00f7865 100644 --- a/airtime_mvc/application/forms/AddUser.php +++ b/airtime_mvc/application/forms/AddUser.php @@ -81,7 +81,7 @@ class Application_Form_AddUser extends Zend_Form $submit = new Zend_Form_Element_Submit('submit'); $submit->setAttrib('class', 'ui-button ui-state-default right-floated'); $submit->setIgnore(true); - $submit->setLabel('Submit'); + $submit->setLabel('Save'); $this->addElement($submit); } diff --git a/airtime_mvc/application/forms/AdvancedSearch.php b/airtime_mvc/application/forms/AdvancedSearch.php index ff074718b..4c15795b7 100644 --- a/airtime_mvc/application/forms/AdvancedSearch.php +++ b/airtime_mvc/application/forms/AdvancedSearch.php @@ -16,7 +16,7 @@ class Application_Form_AdvancedSearch extends Zend_Form // Add the submit button $this->addElement('button', 'search_submit', array( 'ignore' => true, - 'label' => 'Submit', + 'label' => 'Save', 'order' => '-1' )); $this->getElement('search_submit')->removeDecorator('DtDdWrapper'); diff --git a/airtime_mvc/application/forms/EditAudioMD.php b/airtime_mvc/application/forms/EditAudioMD.php index 423ef1025..a4968644f 100644 --- a/airtime_mvc/application/forms/EditAudioMD.php +++ b/airtime_mvc/application/forms/EditAudioMD.php @@ -134,7 +134,7 @@ class Application_Form_EditAudioMD extends Zend_Form $this->addElement('submit', 'submit', array( 'ignore' => true, 'class' => 'ui-button ui-state-default', - 'label' => 'Submit', + 'label' => 'Save', 'decorators' => array( 'ViewHelper' ) diff --git a/airtime_mvc/application/forms/PlaylistMetadata.php b/airtime_mvc/application/forms/PlaylistMetadata.php index 15de97699..d53a4ddab 100644 --- a/airtime_mvc/application/forms/PlaylistMetadata.php +++ b/airtime_mvc/application/forms/PlaylistMetadata.php @@ -24,7 +24,7 @@ class Application_Form_PlaylistMetadata extends Zend_Form{ // Add the comment element $this->addElement('button', 'new_playlist_submit', array( - 'label' => 'Submit', + 'label' => 'Save', 'ignore' => true )); } diff --git a/airtime_mvc/application/forms/RegisterAirtime.php b/airtime_mvc/application/forms/RegisterAirtime.php index 694224b9d..4ca52e27c 100644 --- a/airtime_mvc/application/forms/RegisterAirtime.php +++ b/airtime_mvc/application/forms/RegisterAirtime.php @@ -1,5 +1,7 @@ setRequired(false) ->setDecorators(array('File')) ->addValidator('Count', false, 1) - ->addValidator('Extension', false, 'jpg,png,gif') - ->addValidator('ImageSize', false, array( - 'minwidth' => 200, - 'minheight' => 200, - 'maxwidth' => 600, - 'maxheight' => 600)); + ->addValidator('Extension', false, 'jpg,jpeg,png,gif') + ->addFilter('ImageSize'); $this->addElement($upload); //enable support feedback diff --git a/airtime_mvc/application/forms/SupportSettings.php b/airtime_mvc/application/forms/SupportSettings.php index 605e85878..ab97000e7 100644 --- a/airtime_mvc/application/forms/SupportSettings.php +++ b/airtime_mvc/application/forms/SupportSettings.php @@ -1,5 +1,7 @@ setRequired(false) ->setDecorators(array('File')) ->addValidator('Count', false, 1) - ->addValidator('Extension', false, 'jpg,png,gif') - ->addValidator('ImageSize', false, array( - 'minwidth' => 200, - 'minheight' => 200, - 'maxwidth' => 600, - 'maxheight' => 600)); + ->addValidator('Extension', false, 'jpg,jpeg,png,gif') + ->addFilter('ImageSize'); $upload->setAttrib('accept', 'image/jpeg,image/gif,image/png,image/jpg'); $this->addElement($upload); @@ -153,7 +151,7 @@ class Application_Form_SupportSettings extends Zend_Form $submit = new Zend_Form_Element_Submit("submit"); $submit->class = 'ui-button ui-state-default right-floated'; $submit->setIgnore(true) - ->setLabel("Submit") + ->setLabel("Save") ->setDecorators(array('ViewHelper')); $this->addElement($submit); } diff --git a/airtime_mvc/application/forms/customfilters/ImageSize.php b/airtime_mvc/application/forms/customfilters/ImageSize.php new file mode 100644 index 000000000..9dcfffffe --- /dev/null +++ b/airtime_mvc/application/forms/customfilters/ImageSize.php @@ -0,0 +1,42 @@ + diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index f7fca885e..af7ea4924 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -7,7 +7,7 @@ class Application_Model_Preference global $CC_CONFIG, $CC_DBC; //called from a daemon process - if(!Zend_Auth::getInstance()->hasIdentity()) { + if(!class_exists("Zend_Auth", false) || !Zend_Auth::getInstance()->hasIdentity()) { $id = NULL; } else { @@ -369,11 +369,16 @@ class Application_Model_Preference $outputArray['NUM_OF_SCHEDULED_PLAYLISTS'] = Application_Model_Schedule::getSchduledPlaylistCount(); $outputArray['NUM_OF_PAST_SHOWS'] = Application_Model_ShowInstance::GetShowInstanceCount(date("Y-m-d H:i:s")); $outputArray['UNIQUE_ID'] = self::GetUniqueId(); + $outputArray['SAAS'] = self::GetPlanLevel(); + $outputArray['INSTALL_METHOD'] = self::GetInstallMethod(); $outputArray = array_merge($systemInfoArray, $outputArray); $outputString = "\n"; foreach($outputArray as $key => $out){ + if($key == 'SAAS' && ($out != '' || $out != 'disabled')){ + continue; + } if($out != ''){ $outputString .= $key.' : '.$out."\n"; } @@ -386,6 +391,20 @@ class Application_Model_Preference return $outputString; } } + + public static function GetInstallMethod(){ + $easy_install = file_exists('/usr/bin/airtime-easy-install'); + $debian_install = file_exists('/var/lib/dpkg/info/airtime.config'); + if($debian_install){ + if($easy_install){ + return "easy_install"; + }else{ + return "debian_install"; + } + }else{ + return "manual_install"; + } + } public static function SetRemindMeDate($now){ $weekAfter = mktime(0, 0, 0, date("m") , date("d")+7, date("Y")); @@ -446,7 +465,11 @@ class Application_Model_Preference } public static function GetPlanLevel(){ - return self::GetValue("plan_level"); + $plan = self::GetValue("plan_level"); + if(trim($plan) == ''){ + $plan = 'disabled'; + } + return $plan; } public static function SetTrialEndingDate($date){ diff --git a/airtime_mvc/application/views/scripts/form/register-dialog.phtml b/airtime_mvc/application/views/scripts/form/register-dialog.phtml index acb461be5..8faeb5913 100644 --- a/airtime_mvc/application/views/scripts/form/register-dialog.phtml +++ b/airtime_mvc/application/views/scripts/form/register-dialog.phtml @@ -144,7 +144,7 @@ element->getElement('Logo') ?> -
Min. size: 200x200 Max. size: 600x600
+Note: Anything larger than 600x600 will be resized.
element->getElement('Logo')->hasErrors()) : ?>Min. size: 200x200 Max. size: 600x600
Note: Anything larger than 600x600 will be resized.