diff --git a/application/helpers/remotecontrol/remotecontrol_handle.php b/application/helpers/remotecontrol/remotecontrol_handle.php index df664d74981..9c0b4556831 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();