Skip to content

Commit

Permalink
Fixed issue #5912: Error when trying to create new survey and using P…
Browse files Browse the repository at this point in the history
…ostGres
  • Loading branch information
c-schmitz committed Mar 17, 2012
1 parent 9df9ed9 commit ceb9902
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions application/controllers/admin/database.php
Expand Up @@ -308,7 +308,7 @@ function index($sa = null)


//$insertqids=array(); //?
$insertqid =array();
$insertqid =array();
for ($scale_id=0;$scale_id<$scalecount;$scale_id++)
{
foreach ($anslangs as $language)
Expand Down Expand Up @@ -432,7 +432,7 @@ function index($sa = null)

// Checked
// Get the last inserted questionid for other languages
$qid=Yii::app()->db->getLastInsertID();
$qid=$question->qid;

// Add other languages
if ($result)
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/questiongroup.php
Expand Up @@ -186,7 +186,7 @@ public function insert($surveyid)
foreach ($aData as $k => $v)
$group->$k = $v;
$group->save();
$groupid = Yii::app()->db->getLastInsertID();
$groupid = $group->gid;
$first = false;
}
else
Expand Down
2 changes: 1 addition & 1 deletion application/models/Survey_permissions.php
Expand Up @@ -191,7 +191,7 @@ function deleteSomeRecords($condition)

foreach ($condition as $item => $value)
{
$criteria->addCondition($item.'="'.$value.'"');
$criteria->addCondition($item."='".$value."'");
}

$this->deleteAll($criteria);
Expand Down

0 comments on commit ceb9902

Please sign in to comment.