diff --git a/application/controllers/admin/tokens.php b/application/controllers/admin/tokens.php
index 70ed789b45d..0e8cb5de617 100644
--- a/application/controllers/admin/tokens.php
+++ b/application/controllers/admin/tokens.php
@@ -2232,6 +2232,7 @@ public function kill($iSurveyId)
$aData = array();
$aData['thissurvey'] = getSurveyInfo($iSurveyId);
$aData['surveyid'] = $iSurveyId;
+ $aData['title_bar']['title'] = $survey->currentLanguageSettings->surveyls_title." (".gT("ID").":".$iSurveyId.")";
$date = date('YmdHis');
/* If there is not a $_POST value of 'ok', then ask if the user is sure they want to
@@ -2422,18 +2423,21 @@ private function _newtokentable($iSurveyId)
Yii::import('application.helpers.admin.token_helper', true);
$aData = array();
+ $aData['thissurvey'] = getSurveyInfo($iSurveyId);
+ $aData['surveyid'] = $iSurveyId;
+ $aData['title_bar']['title'] = $survey->currentLanguageSettings->surveyls_title." (".gT("ID").":".$iSurveyId.")";
+ $aData['sidemenu']['state'] = false;
// Update table, must be CRSF controlled
if (Yii::app()->request->getPost('createtable') == "Y") {
Token::createTable($iSurveyId);
- $aData['sidemenu']['state'] = false;
LimeExpressionManager::SetDirtyFlag(); // LimeExpressionManager needs to know about the new survey participants table
$this->_renderWrappedTemplate('token', array('message' =>array(
'title' => gT("Survey participants"),
'message' => gT("A participant table has been created for this survey.")." (\"".Yii::app()->db->tablePrefix."tokens_$iSurveyId\")
\n"
. "getController()->createUrl("admin/tokens/sa/index/surveyid/$iSurveyId")."', '_top')\" />\n"
- )), ['surveyid' => $iSurveyId]);
+ )), $aData);
}
/* Restore a previously deleted tokens table */
elseif (returnGlobal('restoretable') == "Y" && Yii::app()->request->getPost('oldtable')) {
@@ -2462,21 +2466,18 @@ private function _newtokentable($iSurveyId)
}
Survey::model()->updateByPk($iSurveyId, array('attributedescriptions' => json_encode($fieldcontents)));
-
Yii::app()->db->createCommand()->renameTable(Yii::app()->request->getPost('oldtable'), Yii::app()->db->tablePrefix."tokens_".intval($iSurveyId));
Yii::app()->db->schema->getTable(Yii::app()->db->tablePrefix."tokens_".intval($iSurveyId), true); // Refresh schema cache just in case the table existed in the past
//Add any survey_links from the renamed table
SurveyLink::model()->rebuildLinksFromTokenTable($iSurveyId);
- $aData = array();
- $aData['sidemenu']['state'] = false;
$this->_renderWrappedTemplate('token', array('message' => array(
'title' => gT("Import old tokens"),
'message' => gT("A survey participants table has been created for this survey and the old tokens were imported.")." (\"".Yii::app()->db->tablePrefix."tokens_$iSurveyId"."\")