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()
{
$show_instance_id = $this->_getParam('showinstanceid');
$file_id = $this->_getParam('fileid');
$this->view->fileid = $file_id;
$show_instance_id = $this->_getParam('showinstanceid');
$file_id = $this->_getParam('fileid');
$this->view->fileid = $file_id;
$this->view->showinstanceid = $show_instance_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();
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
$files = array();
$files = array();
$playlists = array();
$blocks = array();
$streams = array();
$blocks = array();
$streams = array();
$message = null;

View File

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

View File

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

View File

@ -104,6 +104,7 @@ CREATE TABLE cc_webstream_metadata (
ALTER TABLE cc_files
DROP COLUMN gunid,
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 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;
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