Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch '2.05' of git@github.com:LimeSurvey/LimeSurvey.git into …
…2.05
  • Loading branch information
Shnoulle committed Oct 21, 2013
2 parents c0be99a + 187bdc3 commit 66b6776
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
3 changes: 2 additions & 1 deletion application/controllers/InstallerController.php
Expand Up @@ -294,7 +294,8 @@ private function stepDatabaseConfiguration()
// Check if the surveys table exists or not
if ($bDBExists == true) {
try {
$this->connection->createCommand()->select()->from('{{surveys}}')->queryAll();
if ($dataReader=$this->connection->createCommand()->select()->from('{{users}}')->query()->rowCount==0) // DBLIB does not throw an exception on a missing table
$bTablesDoNotExist = true;
} catch(Exception $e) {
$bTablesDoNotExist = true;
}
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/authentication.php
Expand Up @@ -164,7 +164,7 @@ public function forgotpassword()
private function _sendPasswordEmail($sEmailAddr, $aFields)
{
$clang = $this->getController()->lang;
$sFrom = Yii::app()->getConfig('siteadminemail');
$sFrom = Yii::app()->getConfig("siteadminname") . " <" . Yii::app()->getConfig("siteadminemail") . ">";
$sTo = $sEmailAddr;
$sSubject = $clang->gT('User data');
$sNewPass = createPassword();
Expand Down
3 changes: 2 additions & 1 deletion application/controllers/admin/tokens.php
Expand Up @@ -489,7 +489,7 @@ function getTokens_json($iSurveyId, $search = null)
}
if(Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'update'))
$action .= viewHelper::getImageLink('edit_16.png', null, $clang->gT("Edit token entry"), null, 'imagelink token_edit');
if(!empty($token['participant_id']) && $token['participant_id'] != "" && hasGlobalPermission('USER_RIGHT_PARTICIPANT_PANEL')) {
if(!empty($token['participant_id']) && $token['participant_id'] != "" && Permission::model()->hasGlobalPermission('participantpanel','read')) {
$action .= viewHelper::getImageLink('cpdb_16.png', null, $clang->gT("View this person in the central participants database"), null, 'imagelink cpdb',array('onclick'=>"sendPost('".$this->getController()->createUrl('admin/participants/sa/displayParticipants')."','',['searchcondition'],['participant_id||equal||{$token['participant_id']}']);"));
} else {
$action .= '<div style="width: 20px; height: 16px; float: left;"></div>';
Expand Down Expand Up @@ -2369,6 +2369,7 @@ function _newtokentable($iSurveyId)
if (Yii::app()->request->getQuery('createtable') == "Y")
{
createTokenTable($iSurveyId);
LimeExpressionManager::SetDirtyFlag(); // LimeExpressionManager needs to know about the new token table
$this->_renderWrappedTemplate('token', array('message' =>array(
'title' => $clang->gT("Token control"),
'message' => $clang->gT("A token table has been created for this survey.") . " (\"" . Yii::app()->db->tablePrefix . "tokens_$iSurveyId\")<br /><br />\n"
Expand Down
3 changes: 0 additions & 3 deletions application/helpers/admin/activate_helper.php
Expand Up @@ -251,8 +251,6 @@ function checkQuestions($postsid, $iSurveyID, $qtypes)

function activateSurvey($iSurveyID, $simulate = false)
{


$createsurvey='';
$activateoutput='';
$createsurveytimings='';
Expand Down Expand Up @@ -463,7 +461,6 @@ function activateSurvey($iSurveyID, $simulate = false)
}
$acquery = "UPDATE {{surveys}} SET active='Y' WHERE sid=".$iSurveyID;
$acresult = Yii::app()->db->createCommand($acquery)->query();

return $aResult;
}

Expand Down
Expand Up @@ -231,10 +231,8 @@

</div>
<br/>
<table id="displayparticipants"></table> <div id="pager"></div>
<p><input type="button" name="addtosurvey" id="addtosurvey" value="<?php $clang->eT("Add to survey") ?>" />
</p>

<table id="displayparticipants"></table>
<div id="pager"></div>
<div id="fieldnotselected" title="<?php $clang->eT("Error") ?>" style="display:none">
<p>
<?php $clang->eT("Please select a field"); ?>
Expand Down

0 comments on commit 66b6776

Please sign in to comment.