Skip to content

Commit

Permalink
Fixed issue #6503: Update of "Invitation sent" is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Aug 21, 2012
1 parent f4fb8b3 commit 3e95f68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/surveyadmin.php
Expand Up @@ -667,7 +667,7 @@ public function getSurveys_json()


$aSurveyEntry['viewurl'] = $this->getController()->createUrl("/admin/survey/view/surveyid/" . $rows['sid']);
if (Yii::app()->db->schema->getTable("{{tokens_" . $rows['sid'] . "}}"))
if (tableExists('tokens_' . $rows['sid'] ))
{
$tokens = Tokens_dynamic::model($rows['sid'])->count();
$tokenscompleted = Tokens_dynamic::model($rows['sid'])->count(array(
Expand Down
5 changes: 2 additions & 3 deletions application/models/Tokens_dynamic.php
Expand Up @@ -82,13 +82,12 @@ public function rules()
array('usesleft','numerical', 'integerOnly'=>true,'allowEmpty'=>true),
array('mpid','numerical', 'integerOnly'=>true,'allowEmpty'=>true),
array('blacklisted', 'in','range'=>array('Y','N'), 'allowEmpty'=>true),
array('sent', 'in','range'=>array('Y','N'), 'allowEmpty'=>true),
array('completed', 'in','range'=>array('Y','N'), 'allowEmpty'=>true),
array('validfrom','date', 'format'=>array('yyyy-MM-dd', 'yyyy-MM-dd HH:mm', 'yyyy-MM-dd HH:mm:ss',), 'allowEmpty'=>true),
array('validuntil','date', 'format'=>array('yyyy-MM-dd', 'yyyy-MM-dd HH:mm', 'yyyy-MM-dd HH:mm:ss',), 'allowEmpty'=>true),
);
}



/**
* Returns summary information of this token table
*
Expand Down

0 comments on commit 3e95f68

Please sign in to comment.