Skip to content

Commit

Permalink
Fixed issue #7071: Survey timing tables are archived and offered for …
Browse files Browse the repository at this point in the history
…deletion when visiting the integrity check
  • Loading branch information
c-schmitz committed Dec 12, 2012
1 parent 2f5ee46 commit 0d432b0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions application/controllers/admin/checkintegrity.php
Expand Up @@ -359,11 +359,9 @@ protected function _checkintegrity()
{
$sTableName = substr(reset($aRow), strlen($sDBPrefix));
if ($sTableName == 'survey_permissions' || $sTableName == 'survey_links' || $sTableName == 'survey_url_parameters') continue;
$iSurveyID = substr($sTableName, strpos($sTableName, '_') + 1);
$count = $surveys = Survey::model()->findAllByPk($iSurveyID);
if (Survey::model()->hasErrors()) safeDie(Survey::model()->getError());

if ($count == 0) {
$aTableName=explode('_',$sTableName);
$iSurveyID = $aTableName[1];
if (false == array_search($iSurveyID, $sids)) {
$sDate = date('YmdHis') . rand(1, 1000);
$sOldTable = "survey_{$iSurveyID}";
$sNewTable = "old_survey_{$iSurveyID}_{$sDate}";
Expand Down

0 comments on commit 0d432b0

Please sign in to comment.