Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
denise 2012-08-29 16:13:30 -04:00
commit b75f2ab9c7
5 changed files with 90 additions and 80 deletions

View File

@ -405,9 +405,9 @@ class ApiController extends Zend_Controller_Action
public function uploadRecordedAction() public function uploadRecordedAction()
{ {
$show_instance_id = $this->_getParam('showinstanceid'); $show_instance_id = $this->_getParam('showinstanceid');
$file_id = $this->_getParam('fileid'); $file_id = $this->_getParam('fileid');
$this->view->fileid = $file_id; $this->view->fileid = $file_id;
$this->view->showinstanceid = $show_instance_id; $this->view->showinstanceid = $show_instance_id;
$this->uploadRecordedActionParam($show_instance_id, $file_id); $this->uploadRecordedActionParam($show_instance_id, $file_id);
} }

View File

@ -271,10 +271,10 @@ class LibraryController extends Zend_Controller_Action
$user = Application_Model_User::getCurrentUser(); $user = Application_Model_User::getCurrentUser();
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER)); $isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
$files = array(); $files = array();
$playlists = array(); $playlists = array();
$blocks = array(); $blocks = array();
$streams = array(); $streams = array();
$message = null; $message = null;

View File

@ -18,8 +18,11 @@ class Application_Form_RegisterAirtime extends Zend_Form
} }
$this->setDecorators(array( $this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/register-dialog.phtml', 'privacyChecked'=>$privacyChecked)), array('ViewScript', array('viewScript' =>
array('File', array('viewScript' => 'form/register-dialog.phtml', 'placement' => false))) 'form/register-dialog.phtml', 'privacyChecked'=>$privacyChecked)),
array('File', array('viewScript' => 'form/register-dialog.phtml',
'placement' => false)))
); );
// Station Name // Station Name
@ -36,7 +39,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
'label' => 'Phone:', 'label' => 'Phone:',
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'value' => Application_Model_Preference::GetPhone(), 'value' => Application_Model_Preference::GetPhone(),
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
@ -48,7 +51,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
'label' => 'Email:', 'label' => 'Email:',
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'value' => Application_Model_Preference::GetEmail(), 'value' => Application_Model_Preference::GetEmail(),
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
@ -68,10 +71,10 @@ class Application_Form_RegisterAirtime extends Zend_Form
// county list dropdown // county list dropdown
$this->addElement('select', 'Country', array( $this->addElement('select', 'Country', array(
'label' => 'Country:', 'label' => 'Country:',
'required' => false, 'required' => false,
'value' => Application_Model_Preference::GetStationCountry(), 'value' => Application_Model_Preference::GetStationCountry(),
'multiOptions' => $country_list, 'multiOptions' => $country_list,
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
)); ));
@ -128,13 +131,13 @@ class Application_Form_RegisterAirtime extends Zend_Form
// text area for sending detail // text area for sending detail
$this->addElement('textarea', 'SendInfo', array( $this->addElement('textarea', 'SendInfo', array(
'class' => 'sending_textarea', 'class' => 'sending_textarea',
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'readonly' => true, 'readonly' => true,
'rows' => 5, 'rows' => 5,
'cols' => 61, 'cols' => 61,
'value' => Application_Model_Preference::GetSystemInfo(false, true), 'value' => Application_Model_Preference::GetSystemInfo(false, true),
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )

View File

@ -2,86 +2,86 @@
class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
{ {
private $criteriaOptions = array( private $criteriaOptions = array(
0 => "Select criteria", 0 => "Select criteria",
"album_title" => "Album", "album_title" => "Album",
"bit_rate" => "Bit Rate (Kbps)", "bit_rate" => "Bit Rate (Kbps)",
"bpm" => "Bpm", "bpm" => "Bpm",
"comments" => "Comments", "comments" => "Comments",
"composer" => "Composer", "composer" => "Composer",
"conductor" => "Conductor", "conductor" => "Conductor",
"artist_name" => "Creator", "artist_name" => "Creator",
"disc_number" => "Disc Number", "disc_number" => "Disc Number",
"genre" => "Genre", "genre" => "Genre",
"isrc_number" => "ISRC", "isrc_number" => "ISRC",
"label" => "Label", "label" => "Label",
"language" => "Language", "language" => "Language",
"mtime" => "Last Modified", "mtime" => "Last Modified",
"lptime" => "Last Played", "lptime" => "Last Played",
"length" => "Length", "length" => "Length",
"lyricist" => "Lyricist", "lyricist" => "Lyricist",
"mood" => "Mood", "mood" => "Mood",
"name" => "Name", "name" => "Name",
"orchestra" => "Orchestra", "orchestra" => "Orchestra",
"rating" => "Rating", "rating" => "Rating",
"sample_rate" => "Sample Rate (kHz)", "sample_rate" => "Sample Rate (kHz)",
"track_title" => "Title", "track_title" => "Title",
"track_number" => "Track Number", "track_number" => "Track Number",
"utime" => "Uploaded", "utime" => "Uploaded",
"year" => "Year" "year" => "Year"
); );
private $criteriaTypes = array( private $criteriaTypes = array(
0 => "", 0 => "",
"album_title" => "s", "album_title" => "s",
"artist_name" => "s", "artist_name" => "s",
"bit_rate" => "n", "bit_rate" => "n",
"bpm" => "n", "bpm" => "n",
"comments" => "s", "comments" => "s",
"composer" => "s", "composer" => "s",
"conductor" => "s", "conductor" => "s",
"utime" => "n", "utime" => "n",
"mtime" => "n", "mtime" => "n",
"lptime" => "n", "lptime" => "n",
"disc_number" => "n", "disc_number" => "n",
"genre" => "s", "genre" => "s",
"isrc_number" => "s", "isrc_number" => "s",
"label" => "s", "label" => "s",
"language" => "s", "language" => "s",
"length" => "n", "length" => "n",
"lyricist" => "s", "lyricist" => "s",
"mood" => "s", "mood" => "s",
"name" => "s", "name" => "s",
"orchestra" => "s", "orchestra" => "s",
"rating" => "n", "rating" => "n",
"sample_rate" => "n", "sample_rate" => "n",
"track_title" => "s", "track_title" => "s",
"track_number" => "n", "track_number" => "n",
"year" => "n" "year" => "n"
); );
private $stringCriteriaOptions = array( private $stringCriteriaOptions = array(
"0" => "Select modifier", "0" => "Select modifier",
"contains" => "contains", "contains" => "contains",
"does not contain" => "does not contain", "does not contain" => "does not contain",
"is" => "is", "is" => "is",
"is not" => "is not", "is not" => "is not",
"starts with" => "starts with", "starts with" => "starts with",
"ends with" => "ends with" "ends with" => "ends with"
); );
private $numericCriteriaOptions = array( private $numericCriteriaOptions = array(
"0" => "Select modifier", "0" => "Select modifier",
"is" => "is", "is" => "is",
"is not" => "is not", "is not" => "is not",
"is greater than" => "is greater than", "is greater than" => "is greater than",
"is less than" => "is less than", "is less than" => "is less than",
"is in the range" => "is in the range" "is in the range" => "is in the range"
); );
private $limitOptions = array( private $limitOptions = array(
"hours" => "hours", "hours" => "hours",
"minutes" => "minutes", "minutes" => "minutes",
"items" => "items" "items" => "items"
); );
public function init() public function init()

View File

@ -104,6 +104,7 @@ CREATE TABLE cc_webstream_metadata (
ALTER TABLE cc_files ALTER TABLE cc_files
DROP COLUMN gunid, DROP COLUMN gunid,
ADD COLUMN replay_gain character varying(16), ADD COLUMN replay_gain character varying(16),
ADD COLUMN owner_id integer;
ALTER COLUMN bpm TYPE integer using airtime_to_int(bpm) /* TYPE change - table: cc_files original: character varying(8) new: integer */; ALTER COLUMN bpm TYPE integer using airtime_to_int(bpm) /* TYPE change - table: cc_files original: character varying(8) new: integer */;
ALTER TABLE cc_playlistcontents ALTER TABLE cc_playlistcontents
@ -154,3 +155,9 @@ ALTER TABLE cc_webstream_metadata
ADD CONSTRAINT cc_schedule_inst_fkey FOREIGN KEY (instance_id) REFERENCES cc_schedule(id) ON DELETE CASCADE; ADD CONSTRAINT cc_schedule_inst_fkey FOREIGN KEY (instance_id) REFERENCES cc_schedule(id) ON DELETE CASCADE;
DROP FUNCTION airtime_to_int(chartoconvert character varying); DROP FUNCTION airtime_to_int(chartoconvert character varying);
UPDATE cc_files
SET owner_id=(SELECT id FROM cc_subjs WHERE type='A' LIMIT 1)
WHERE owner_id is NULL