Skip to content

Commit

Permalink
Fixed issue #12000: 'token' column collation is not set in survey tables
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jan 2, 2017
1 parent 450397e commit a01f669
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/helpers/admin/activate_helper.php
Expand Up @@ -260,10 +260,10 @@ function activateSurvey($iSurveyID, $simulate = false)
$bCreateSurveyDir=false;
// Specify case sensitive collations for the token
$sCollation='';
if (Yii::app()->db->driverName=='mysqli' | Yii::app()->db->driverName=='mysqli'){
$sCollation=" COLLATE 'utf8_bin'";
if (Yii::app()->db->driverName=='mysqli' || Yii::app()->db->driverName=='mysqli'){

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Jan 2, 2017

Collaborator

(Yii::app()->db->driverName=='mysqli' || Yii::app()->db->driverName=='mysql')

No ? Here : 2 times mysqli :)

$sCollation=" COLLATE 'utf8mb4_bin'";
}
if (Yii::app()->db->driverName=='sqlsrv' | Yii::app()->db->driverName=='dblib' | Yii::app()->db->driverName=='mssql'){
if (Yii::app()->db->driverName=='sqlsrv' || Yii::app()->db->driverName=='dblib' || Yii::app()->db->driverName=='mssql'){
$sCollation=" COLLATE SQL_Latin1_General_CP1_CS_AS";
}
//Check for any additional fields for this survey and create necessary fields (token and datestamp)
Expand Down

0 comments on commit a01f669

Please sign in to comment.