Skip to content

Commit

Permalink
Fixed issue #11248: Saving plugin survey settings send PHP notice
Browse files Browse the repository at this point in the history
Dev: remove the second call to same function
Dev: e8f6f76 child
  • Loading branch information
Shnoulle committed May 24, 2016
1 parent 67b3976 commit 7c3efa8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions application/controllers/admin/database.php
Expand Up @@ -1073,7 +1073,7 @@ function index($sa = null)
// Preload survey
$oSurvey=Survey::model()->findByPk($iSurveyID);

// Save plugin settings.
// Save plugin settings : actually leave it before saving core : we are sure core settings is saved in LS way.
$pluginSettings = App()->request->getPost('plugin', array());
foreach($pluginSettings as $plugin => $settings)
{
Expand Down Expand Up @@ -1159,11 +1159,6 @@ function index($sa = null)
$oSurvey->adminemail = App()->request->getPost('adminemail');
$oSurvey->bounce_email = App()->request->getPost('bounce_email');

$event = new PluginEvent('newSurveySettings');
$event->set('newSurvey', $oSurvey);
$event->set('survey', $iSurveyID);
App()->getPluginManager()->dispatchEvent($event);

if ($oSurvey->save())
{
Yii::app()->setFlashMessage(gT("Survey settings were successfully saved."));
Expand Down

0 comments on commit 7c3efa8

Please sign in to comment.