Fix session duration extra data - refs BT#9092

1.10.x
Daniel Barreto 11 years ago
parent 6d2c9e5ce1
commit 29d23c99ec
  1. 4
      main/inc/lib/sessionmanager.lib.php
  2. 2
      plugin/advancedsubscription/src/HookAdvancedSubscription.php
  3. 6
      tests/scripts/insert_session_fields.php

@ -5431,7 +5431,7 @@ class SessionManager
/** /**
* Returns list of a few data from session (name, short description, start date, end date) * Returns list of a few data from session (name, short description, start date, end date)
* And the next extra fields * And the next extra fields
* short_description, mode, duration, vacancies, brochure, target, schedule * short_description, mode, human_text_duration, vacancies, brochure, target, schedule
* from Session category Id. * from Session category Id.
* @param int $categoryId * @param int $categoryId
* @param string $target * @param string $target
@ -5450,7 +5450,7 @@ class SessionManager
// Join session field and session field values tables // Join session field and session field values tables
$joinTable = $sfTable . ' sf INNER JOIN ' . $sfvTable . ' sfv ON sf.id = sfv.field_id'; $joinTable = $sfTable . ' sf INNER JOIN ' . $sfvTable . ' sfv ON sf.id = sfv.field_id';
$fieldsArray = array( $fieldsArray = array(
'short_description', 'mode', 'duration', 'vacancies', 'brochure', 'target', 'schedule' 'short_description', 'mode', 'human_text_duration', 'vacancies', 'brochure', 'target', 'schedule'
); );
// Get the session list from session category and target // Get the session list from session category and target
$sessionList = Database::select( $sessionList = Database::select(

@ -77,7 +77,7 @@ class HookAdvancedSubscription extends HookObserver implements
'mode' => array('name' => 'mode', 'type' => 'xsd:string'), // session.mode 'mode' => array('name' => 'mode', 'type' => 'xsd:string'), // session.mode
'date_start' => array('name' => 'date_start', 'type' => 'xsd:string'), // session.date_start 'date_start' => array('name' => 'date_start', 'type' => 'xsd:string'), // session.date_start
'date_end' => array('name' => 'date_end', 'type' => 'xsd:string'), // session.date_end 'date_end' => array('name' => 'date_end', 'type' => 'xsd:string'), // session.date_end
'duration' => array('name' => 'duration', 'type' => 'xsd:string'), // session.duration 'duration' => array('name' => 'duration', 'type' => 'xsd:string'), // session.human_text_duration
'vacancies' => array('name' => 'vacancies', 'type' => 'xsd:string'), // session.vacancies 'vacancies' => array('name' => 'vacancies', 'type' => 'xsd:string'), // session.vacancies
'schedule' => array('name' => 'schedule', 'type' => 'xsd:string'), // session.schedule 'schedule' => array('name' => 'schedule', 'type' => 'xsd:string'), // session.schedule
) )

@ -108,9 +108,9 @@ $isOpenSession->save(array(
$duration = new ExtraField('session'); $duration = new ExtraField('session');
$duration->save(array( $duration->save(array(
'field_type' => ExtraField::FIELD_TYPE_INTEGER, 'field_type' => ExtraField::FIELD_TYPE_TEXT,
'field_variable' => 'duration', 'field_variable' => 'human_text_duration',
'field_display_text' => get_lang('Duration'), 'field_display_text' => get_lang('DurationInWords'),
'field_visible' => 1, 'field_visible' => 1,
'field_changeable' => 1 'field_changeable' => 1
)); ));

Loading…
Cancel
Save