Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/LimeSurvey/LimeSurvey in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
Shnoulle committed Jan 31, 2017
2 parents 1878a11 + 88ab241 commit 33fc574
Show file tree
Hide file tree
Showing 23 changed files with 520 additions and 147 deletions.
5 changes: 3 additions & 2 deletions application/config/version.php
Expand Up @@ -11,12 +11,13 @@
* See COPYRIGHT.php for copyright notices and details.
*/


$config['versionnumber'] = '3.0.0-alpha'; //The current version of this branch
$config['masterversion'] = '2.59.1'; //The current masters version merged into this branch
$config['masterversion'] = '2.62.1'; //The current masters version merged into this branch
$config['dbversionnumber'] = 264;
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['assetsversionnumber'] = '2591';
$config['assetsversionnumber'] = '2620';
return $config;

?>
23 changes: 23 additions & 0 deletions application/controllers/admin/dataentry.php
Expand Up @@ -376,6 +376,12 @@ public function import($surveyid)
{
$targetResponse[$targetField] = $sourceResponse[$sourceField];
}

$beforeDataEntryImport = new PluginEvent('beforeDataEntryImport');
$beforeDataEntryImport->set('iSurveyID',$iSurveyId);
$beforeDataEntryImport->set('oModel',$targetResponse);
App()->getPluginManager()->dispatchEvent($beforeDataEntryImport);

$imported++;
$targetResponse->save();
$aSRIDConversions[$iOldID]=$targetResponse->id;
Expand Down Expand Up @@ -1413,6 +1419,12 @@ public function delete()

$delquery = "DELETE FROM $surveytable WHERE id=$id";
Yii::app()->loadHelper('database');

$beforeDataEntryDelete = new PluginEvent('beforeDataEntryDelete');
$beforeDataEntryDelete->set('iSurveyID',$surveyid);
$beforeDataEntryDelete->set('iResponseID',$id);
App()->getPluginManager()->dispatchEvent($beforeDataEntryDelete);

$delresult = dbExecuteAssoc($delquery) or safeDie ("Couldn't delete record $id<br />\n");

$aData['sidemenu']['state'] = false;
Expand Down Expand Up @@ -1530,6 +1542,11 @@ public function update()
$updateqr = substr($updateqr, 0, -3);
$updateqr .= " WHERE id=$id";

$beforeDataEntryUpdate = new PluginEvent('beforeDataEntryUpdate');
$beforeDataEntryUpdate->set('iSurveyID',$surveyid);
$beforeDataEntryUpdate->set('iResponseID',$id);
App()->getPluginManager()->dispatchEvent($beforeDataEntryUpdate);

$updateres = dbExecuteAssoc($updateqr) or safeDie("Update failed:<br />\n<br />$updateqr");

Yii::app()->setFlashMessage(sprintf(gT("The response record %s was updated."),$id));
Expand Down Expand Up @@ -1768,6 +1785,12 @@ public function insert()
{
$new_response->$column = $value;
}

$beforeDataEntryCreate = new PluginEvent('beforeDataEntryCreate');
$beforeDataEntryCreate->set('iSurveyID',$surveyid);
$beforeDataEntryCreate->set('oModel',$new_response);
App()->getPluginManager()->dispatchEvent($beforeDataEntryCreate);

$new_response->save();
$last_db_id = $new_response->getPrimaryKey();
if (isset($_POST['closerecord']) && isset($_POST['token']) && $_POST['token'] != '') // submittoken
Expand Down

0 comments on commit 33fc574

Please sign in to comment.