From cf657e7157991b39f5de10b0b37f10c216c0178a Mon Sep 17 00:00:00 2001 From: Stefan Verweij Date: Fri, 20 Jan 2017 08:35:10 +0100 Subject: [PATCH] Fixed issue: Timeline remote control not working Fixes the Remote Control Timeline function --- application/helpers/remotecontrol/remotecontrol_handle.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/helpers/remotecontrol/remotecontrol_handle.php b/application/helpers/remotecontrol/remotecontrol_handle.php index 0440ae5c4f6..418f2fd1779 100644 --- a/application/helpers/remotecontrol/remotecontrol_handle.php +++ b/application/helpers/remotecontrol/remotecontrol_handle.php @@ -480,7 +480,7 @@ public function export_timeline($sSessionKey, $iSurveyID, $sType, $dStart, $dEnd { if (!$this->_checkSessionKey($sSessionKey)) return array('status' => 'Invalid session key'); if (!in_array($sType, array('day','hour'))) return array('status' => 'Invalid Period'); - if (!hasSurveyPermission($iSurveyID, 'responses', 'read')) return array('status' => 'No permission'); + if (!Permission::model()->hasSurveyPermission($iSurveyID, 'responses', 'read')) return array('status' => 'No permission'); $oSurvey=Survey::model()->findByPk($iSurveyID); if (is_null($oSurvey)) return array('status' => 'Error: Invalid survey ID'); if (!tableExists('{{survey_' . $iSurveyID . '}}')) return array('status' => 'No available data'); @@ -1296,6 +1296,7 @@ public function import_question($sSessionKey, $iSurveyID,$iGroupID, $sImportData libxml_disable_entity_loader($bOldEntityLoaderState); // Put back entity loader to its original state, to avoid contagion to other applications on the server + try { $oQuestion->save();