|
From: <gem...@li...> - 2012-11-01 16:35:01
|
Revision: 1005
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1005&view=rev
Author: matijsdejong
Date: 2012-11-01 16:34:55 +0000 (Thu, 01 Nov 2012)
Log Message:
-----------
Fix for bug 547 superadmin cannot change email template
Fix for bug 570 wrong reception code shown while deleting
Modified Paths:
--------------
trunk/library/classes/Gems/Email/MailTemplateForm.php
trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php
Modified: trunk/library/classes/Gems/Email/MailTemplateForm.php
===================================================================
--- trunk/library/classes/Gems/Email/MailTemplateForm.php 2012-11-01 11:08:38 UTC (rev 1004)
+++ trunk/library/classes/Gems/Email/MailTemplateForm.php 2012-11-01 16:34:55 UTC (rev 1005)
@@ -131,10 +131,10 @@
$org_id = $this->getValue('gto_id_organization');
$filter['gto_id_organization'] = $org_id ? $org_id : $this->escort->getCurrentOrganization();
+ $filter[] = 'grs_email IS NOT NULL';
- // By sorting descending we get the filled values first, so we usually get a correct value
- // with email and valid_from date, but use any other token afterwards
- $sort = array('grs_email' => SORT_DESC, 'gto_valid_from' => SORT_DESC);
+ // Without sorting we get the fastest load times
+ $sort = false;
$tokenData = $model->loadFirst($filter, $sort);
Modified: trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php
===================================================================
--- trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php 2012-11-01 11:08:38 UTC (rev 1004)
+++ trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php 2012-11-01 16:34:55 UTC (rev 1005)
@@ -136,7 +136,7 @@
public function getRespondentDeletionCodes()
{
$select = $this->_getDeletionCodeSelect();
- $select->where('(grc_for_respondents = 1 OR grc_for_surveys = ?)', self::APPLY_STOP);
+ $select->where('grc_for_respondents = 1');
return $this->db->fetchPairs($select);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|