From: <gem...@li...> - 2011-10-21 13:55:30
|
Revision: 125 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=125&view=rev Author: matijsdejong Date: 2011-10-21 13:55:24 +0000 (Fri, 21 Oct 2011) Log Message: ----------- Fix for #26, new round timing defaults to Day units. Fix for #27, incorrectly escaped question labels Modified Paths: -------------- trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php trunk/library/configs/db/patches.sql Modified: trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php 2011-10-21 12:29:37 UTC (rev 124) +++ trunk/library/classes/Gems/Tracker/Engine/StepEngineAbstract.php 2011-10-21 13:55:24 UTC (rev 125) @@ -438,7 +438,7 @@ $model->set('grp_valid_for_id', 'label', $this->_('Round used'), 'default', ''); $model->set('grp_valid_for_field', 'label', $this->_('Date used'), 'default', 'gto_valid_from'); $model->set('grp_valid_for_length', 'label', $this->_('Add to date'), 'required', false, 'default', 2); - $model->set('grp_valid_for_unit', 'label', $this->_('Add to date unit'), 'multiOptions', $this->getDateUnitsList(false), 'default', 'M'); + $model->set('grp_valid_for_unit', 'label', $this->_('Add to date unit'), 'multiOptions', $this->getDateUnitsList(false)); // Continue with last round level items $model->set('gro_active'); Modified: trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php =================================================================== --- trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php 2011-10-21 12:29:37 UTC (rev 124) +++ trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php 2011-10-21 13:55:24 UTC (rev 125) @@ -605,22 +605,22 @@ } if (! isset($oldfld) || ($oldfld['question'] !== $field['question'])) { - $tmpres['label'] = $this->removeHtml($field['question']); + $tmpres['label'] = MUtil_Html::raw($this->removeHtml($field['question'])); } // Juggle the labels for sub-questions etc.. if (isset($field['sq_question'])) { if (isset($field['sq_question1'])) { - $field['label'] = sprintf($this->translate->_('%s: %s'), $field['sq_question'], $field['sq_question1']); + $field['label'] = MUtil_Html::raw(sprintf($this->translate->_('%s: %s'), $field['sq_question'], $field['sq_question1'])); } if (! isset($tmpres['label'])) { - $tmpres['label'] = $this->removeHtml($field['sq_question']); + $tmpres['label'] = MUtil_Html::raw($this->removeHtml($field['sq_question'])); } else { // Add non answered question for grouping $model->set('_' . $name . '_', $tmpres); // "Next" question - $tmpres['label'] = $this->removeHtml($field['sq_question']); + $tmpres['label'] = MUtil_Html::raw($this->removeHtml($field['sq_question'])); } $tmpres['thClass'] = 'question_sub'; } @@ -826,7 +826,7 @@ * @param string $removeContent Pipe | separated tags from which contect will be stripped * @return string */ - private function removeHtml($s , $keepTags = '' , $removeContent = 'script|style|noframes|select|option'){ + private function removeHtml($s, $keepTags = '' , $removeContent = 'script|style|noframes|select|option'){ /**///prep the string $s = ' ' . $s; Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2011-10-21 12:29:37 UTC (rev 124) +++ trunk/library/configs/db/patches.sql 2011-10-21 13:55:24 UTC (rev 125) @@ -211,3 +211,7 @@ -- PATCH: Add mail actions to admin role UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.mail.log') WHERE grl_name = 'admin' AND grl_privileges NOT LIKE '%pr.mail.log%'; UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges, ',pr.mail.server,pr.mail.server.create,pr.mail.server.delete,pr.mail.server.edit') WHERE grl_name = 'super' AND grl_privileges NOT LIKE '%pr.mail.server%'; + +-- PATCH: Set default for new rounds at days +ALTER TABLE `gems__round_periods` CHANGE `grp_valid_after_unit` `grp_valid_after_unit` CHAR(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'D', + CHANGE `grp_valid_for_unit` `grp_valid_for_unit` CHAR(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'D'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |