From: <gem...@li...> - 2011-09-27 13:00:46
|
Revision: 80 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=80&view=rev Author: matijsdejong Date: 2011-09-27 13:00:35 +0000 (Tue, 27 Sep 2011) Log Message: ----------- - fix for #14, misspelled gtr_organisations name Modified Paths: -------------- trunk/library/changelog.txt trunk/library/classes/Gems/Default/ProjectSurveysAction.php trunk/library/classes/Gems/Default/ProjectTracksAction.php trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php trunk/library/classes/Gems/Default/TokenPlanAction.php trunk/library/classes/Gems/Default/TrackActionAbstract.php trunk/library/classes/Gems/Default/TrackMaintenanceAction.php trunk/library/configs/db/patches.sql trunk/library/configs/db/tables/gems__tracks.30.sql trunk/library/snippets/AddTracksSnippet.php trunk/library/snippets/EditTrackEngineSnippet.php Modified: trunk/library/changelog.txt =================================================================== --- trunk/library/changelog.txt 2011-09-27 12:43:37 UTC (rev 79) +++ trunk/library/changelog.txt 2011-09-27 13:00:35 UTC (rev 80) @@ -1,3 +1,7 @@ +Important changes from 1.4.2 => 1.4.3 +============================================================ + * gtr_organisations renamed to gtr_organizations + Important changes from 1.4.1 => 1.4.2 ============================================================ * To have an autosubmit form it is enough now to just use $form->setAutoSubmit($href, $targetId) Modified: trunk/library/classes/Gems/Default/ProjectSurveysAction.php =================================================================== --- trunk/library/classes/Gems/Default/ProjectSurveysAction.php 2011-09-27 12:43:37 UTC (rev 79) +++ trunk/library/classes/Gems/Default/ProjectSurveysAction.php 2011-09-27 13:00:35 UTC (rev 80) @@ -78,7 +78,7 @@ $filter = parent::getDataFilter($data); $organization_id = $this->escort->getCurrentOrganization(); - $filter[] = "gtr_organisations LIKE '%|$organization_id|%'"; + $filter[] = "gtr_organizations LIKE '%|$organization_id|%'"; return $filter; } Modified: trunk/library/classes/Gems/Default/ProjectTracksAction.php =================================================================== --- trunk/library/classes/Gems/Default/ProjectTracksAction.php 2011-09-27 12:43:37 UTC (rev 79) +++ trunk/library/classes/Gems/Default/ProjectTracksAction.php 2011-09-27 13:00:35 UTC (rev 80) @@ -75,7 +75,7 @@ $filter = parent::getDataFilter($data); $organization_id = $this->escort->getCurrentOrganization(); - $filter[] = "gtr_organisations LIKE '%|$organization_id|%'"; + $filter[] = "gtr_organizations LIKE '%|$organization_id|%'"; return $filter; } Modified: trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2011-09-27 12:43:37 UTC (rev 79) +++ trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2011-09-27 13:00:35 UTC (rev 80) @@ -203,7 +203,7 @@ $bridge->addDate( 'gtr_date_start', 'label', $this->_('Assignable since')); $bridge->addDate( 'gtr_date_until', 'label', $this->_('Assignable until')); // feature request #200 - $bridge->addMultiCheckbox('gtr_organisations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true); + $bridge->addMultiCheckbox('gtr_organizations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true); } else { $standAloneButton = new MUtil_Form_Element_FakeSubmit('create_stand_alone'); @@ -228,8 +228,8 @@ public function afterFormLoad(array &$data, $isNew) { // feature request #200 - if (isset($data['gtr_organisations']) && (! is_array($data['gtr_organisations']))) { - $data['gtr_organisations'] = explode('|', trim($data['gtr_organisations'], '|')); + if (isset($data['gtr_organizations']) && (! is_array($data['gtr_organizations']))) { + $data['gtr_organizations'] = explode('|', trim($data['gtr_organizations'], '|')); } } @@ -259,8 +259,8 @@ $data['gtr_track_class'] = 'SingleSurveyEngine'; // feature request #200 - if (isset($data['gtr_organisations']) && is_array($data['gtr_organisations'])) { - $data['gtr_organisations'] = '|' . implode('|', $data['gtr_organisations']) . '|'; + if (isset($data['gtr_organizations']) && is_array($data['gtr_organizations'])) { + $data['gtr_organizations'] = '|' . implode('|', $data['gtr_organizations']) . '|'; } if ($data['gsu_active']==1 && empty($data['gsu_id_primary_group'])) { Modified: trunk/library/classes/Gems/Default/TokenPlanAction.php =================================================================== --- trunk/library/classes/Gems/Default/TokenPlanAction.php 2011-09-27 12:43:37 UTC (rev 79) +++ trunk/library/classes/Gems/Default/TokenPlanAction.php 2011-09-27 13:00:35 UTC (rev 80) @@ -289,7 +289,7 @@ // Add track selection if ($this->escort instanceof Gems_Project_Tracks_MultiTracksInterface) { - $sql = "SELECT gtr_id_track, gtr_track_name FROM gems__tracks WHERE gtr_active=1 AND gtr_track_type='T' AND INSTR(gtr_organisations, '|$orgId|') > 0"; + $sql = "SELECT gtr_id_track, gtr_track_name FROM gems__tracks WHERE gtr_active=1 AND gtr_track_type='T' AND INSTR(gtr_organizations, '|$orgId|') > 0"; $elements[] = $this->_createSelectElement('gto_id_track', $sql, $this->_('(all tracks)')); } @@ -299,7 +299,7 @@ LENGTH(gro_round_description) > 0 AND gtr_active=1 AND gtr_track_type='T' AND - INSTR(gtr_organisations, '|$orgId|') > 0"; + INSTR(gtr_organizations, '|$orgId|') > 0"; $elements[] = $this->_createSelectElement('gto_round_description', $sql, $this->_('(all rounds)')); $sql = "SELECT gsu_id_survey, gsu_survey_name @@ -309,7 +309,7 @@ gro_active=1 AND gtr_active=1 AND gtr_track_type='T' AND - INSTR(gtr_organisations, '|$orgId|') > 0"; + INSTR(gtr_organizations, '|$orgId|') > 0"; /* TODO: use this when we can update this list using ajax if (isset($data['gsu_id_primary_group'])) { $sql .= $this->db->quoteInto(" AND gsu_id_primary_group = ?", $data['gsu_id_primary_group']); @@ -335,7 +335,7 @@ gro_active=1 AND gtr_active=1 AND gtr_track_type='T' AND - INSTR(gtr_organisations, '|$orgId|') > 0"; + INSTR(gtr_organizations, '|$orgId|') > 0"; $elements[] = $this->_createSelectElement('gsu_id_primary_group', $sql, $this->_('(all fillers)')); if (($this->escort instanceof Gems_Project_Organization_MultiOrganizationInterface) && Modified: trunk/library/classes/Gems/Default/TrackActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Default/TrackActionAbstract.php 2011-09-27 12:43:37 UTC (rev 79) +++ trunk/library/classes/Gems/Default/TrackActionAbstract.php 2011-09-27 13:00:35 UTC (rev 80) @@ -93,7 +93,7 @@ $filter['gtr_track_type'] = $this->trackType; $filter['gtr_active'] = 1; $filter[] = '(gtr_date_until IS NULL OR gtr_date_until >= CURRENT_DATE) AND gtr_date_start <= CURRENT_DATE'; - $filter[] = "gtr_organisations LIKE '%|$organisation_id|%'"; + $filter[] = "gtr_organizations LIKE '%|$organisation_id|%'"; $baseurl = array('action' => 'index', 'gr2o_patient_nr' => $id, MUtil_Model::TEXT_FILTER => $searchText); Modified: trunk/library/classes/Gems/Default/TrackMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/TrackMaintenanceAction.php 2011-09-27 12:43:37 UTC (rev 79) +++ trunk/library/classes/Gems/Default/TrackMaintenanceAction.php 2011-09-27 13:00:35 UTC (rev 80) @@ -98,7 +98,7 @@ $bridge->addDate( 'gtr_date_until'); // $bridge->addList( 'gtr_start_date_field', 'label', $this->_('Date used for track')); $bridge->addCheckbox('gtr_active'); - $bridge->addMultiCheckbox('gtr_organisations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true); + $bridge->addMultiCheckbox('gtr_organizations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true); } /** @@ -109,8 +109,8 @@ public function afterFormLoad(array &$data, $isNew) { // feature request #200 - if (isset($data['gtr_organisations']) && (! is_array($data['gtr_organisations']))) { - $data['gtr_organisations'] = explode('|', trim($data['gtr_organisations'], '|')); + if (isset($data['gtr_organizations']) && (! is_array($data['gtr_organizations']))) { + $data['gtr_organizations'] = explode('|', trim($data['gtr_organizations'], '|')); } } @@ -124,8 +124,8 @@ public function beforeSave(array &$data, $isNew, Zend_Form $form = null) { // feature request #200 - if (isset($data['gtr_organisations']) && is_array($data['gtr_organisations'])) { - $data['gtr_organisations'] = '|' . implode('|', $data['gtr_organisations']) . '|'; + if (isset($data['gtr_organizations']) && is_array($data['gtr_organizations'])) { + $data['gtr_organizations'] = '|' . implode('|', $data['gtr_organizations']) . '|'; } if (isset($data['gtr_id_track'])) { $data['gtr_survey_rounds'] = $this->db->fetchOne("SELECT COUNT(*) FROM gems__rounds WHERE gro_active = 1 AND gro_id_track = ?", $data['gtr_id_track']); Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2011-09-27 12:43:37 UTC (rev 79) +++ trunk/library/configs/db/patches.sql 2011-09-27 13:00:35 UTC (rev 80) @@ -84,10 +84,10 @@ ALTER TABLE `gems__staff` ADD `gsf_reset_key` varchar(64) NULL AFTER `gsf_phone_1`; ALTER TABLE `gems__staff` ADD `gsf_reset_req`timestamp NULL AFTER `gsf_reset_key`; --- PATCH: Add gtr_organisations to tracks -ALTER TABLE `gems__tracks` ADD `gtr_organisations` VARCHAR(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `gtr_track_type` ; +-- PATCH: Add gtr_organizations to tracks +ALTER TABLE `gems__tracks` ADD `gtr_organizations` VARCHAR(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `gtr_track_type` ; UPDATE gems__tracks - SET `gtr_organisations` = (SELECT CONCAT('|', CONVERT(GROUP_CONCAT(gor_id_organization SEPARATOR '|'), CHAR), '|') as orgs FROM gems__organizations WHERE gor_active=1) + SET `gtr_organizations` = (SELECT CONCAT('|', CONVERT(GROUP_CONCAT(gor_id_organization SEPARATOR '|'), CHAR), '|') as orgs FROM gems__organizations WHERE gor_active=1) WHERE gtr_active = 1; -- PATCH: Gewijzigd track model @@ -196,3 +196,6 @@ ALTER TABLE gems__log_respondent_communications ADD grco_sender varchar(120) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null AFTER grco_address; ALTER TABLE gems__log_respondent_communications ADD grco_id_message bigint unsigned null references gems__mail_templates (gmt_id_message) AFTER grco_comments; +-- GEMS VERSION: 41 +-- PATCH: Corrected misspelling of gtr_organisations +ALTER TABLE gems__tracks CHANGE gtr_organisations gtr_organizations varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'; Modified: trunk/library/configs/db/tables/gems__tracks.30.sql =================================================================== --- trunk/library/configs/db/tables/gems__tracks.30.sql 2011-09-27 12:43:37 UTC (rev 79) +++ trunk/library/configs/db/tables/gems__tracks.30.sql 2011-09-27 13:00:35 UTC (rev 80) @@ -20,7 +20,7 @@ gtr_track_class varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null, -- Yes, quick and dirty, will correct later (probably) - gtr_organisations varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', + gtr_organizations varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', gtr_changed timestamp not null default current_timestamp on update current_timestamp, gtr_changed_by bigint unsigned not null, Modified: trunk/library/snippets/AddTracksSnippet.php =================================================================== --- trunk/library/snippets/AddTracksSnippet.php 2011-09-27 12:43:37 UTC (rev 79) +++ trunk/library/snippets/AddTracksSnippet.php 2011-09-27 13:00:35 UTC (rev 80) @@ -117,7 +117,7 @@ (gtr_date_until IS NULL OR gtr_date_until > CURRENT_TIMESTAMP) AND gtr_active = 1 AND gtr_track_type = 'T' AND - gtr_organisations LIKE '%|$organization_id|%' + gtr_organizations LIKE '%|$organization_id|%' ORDER BY gtr_track_name"; break; case 'S': @@ -131,7 +131,7 @@ gtr_active = 1 AND gtr_track_type = 'S' AND ggp_respondent_members = 1 AND - gtr_organisations LIKE '%|$organization_id|%' + gtr_organizations LIKE '%|$organization_id|%' ORDER BY gtr_track_name"; break; case 'M': @@ -145,7 +145,7 @@ gtr_active = 1 AND gtr_track_type = 'S' AND ggp_respondent_members = 0 AND - gtr_organisations LIKE '%|$organization_id|%' + gtr_organizations LIKE '%|$organization_id|%' ORDER BY gtr_track_name"; break; // default: Modified: trunk/library/snippets/EditTrackEngineSnippet.php =================================================================== --- trunk/library/snippets/EditTrackEngineSnippet.php 2011-09-27 12:43:37 UTC (rev 79) +++ trunk/library/snippets/EditTrackEngineSnippet.php 2011-09-27 13:00:35 UTC (rev 80) @@ -134,7 +134,7 @@ if (! $this->createData) { $bridge->addCheckbox('gtr_active'); } - $bridge->addMultiCheckbox('gtr_organisations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true); + $bridge->addMultiCheckbox('gtr_organizations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true); } /** @@ -247,8 +247,8 @@ parent::loadFormData(); // feature request #200 - if (isset($this->formData['gtr_organisations']) && (! is_array($this->formData['gtr_organisations']))) { - $this->formData['gtr_organisations'] = explode('|', trim($this->formData['gtr_organisations'], '|')); + if (isset($this->formData['gtr_organizations']) && (! is_array($this->formData['gtr_organizations']))) { + $this->formData['gtr_organizations'] = explode('|', trim($this->formData['gtr_organizations'], '|')); } } @@ -262,8 +262,8 @@ protected function saveData() { // feature request #200 - if (isset($this->formData['gtr_organisations']) && is_array($this->formData['gtr_organisations'])) { - $this->formData['gtr_organisations'] = '|' . implode('|', $this->formData['gtr_organisations']) . '|'; + if (isset($this->formData['gtr_organizations']) && is_array($this->formData['gtr_organizations'])) { + $this->formData['gtr_organizations'] = '|' . implode('|', $this->formData['gtr_organizations']) . '|'; } if ($this->trackEngine) { $this->formData['gtr_survey_rounds'] = $this->trackEngine->calculateRoundCount(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |