Skip to content

Commit

Permalink
Dev: Check limesurvey.org logged in at Cint order update
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Aug 17, 2016
1 parent 4c2bf4e commit dc90b9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions application/core/plugins/CintLink/CintLink.php
Expand Up @@ -451,6 +451,7 @@ public function beforeSurveyActivate()
CintLinkOrder::updateOrders($surveyId);
}

// Abort if survey has no blocking Cint orders (no order is hold, live or new)
if (!CintLinkOrder::hasAnyBlockingOrders($surveyId))
{
return;
Expand Down
5 changes: 5 additions & 0 deletions application/core/plugins/CintLink/model/CintLinkOrder.php
Expand Up @@ -437,6 +437,11 @@ public static function updateOrders($orders)
$newOrders = array();
$limesurveyOrgKey = Yii::app()->user->getState('limesurveyOrgKey');

if (empty($limesurveyOrgKey))
{
throw new Exception('Not logged in on limesurvey.org');
}

// Loop through orders and get updated info from Cint
foreach ($orders as $order)
{
Expand Down

0 comments on commit dc90b9f

Please sign in to comment.