Skip to content

Commit

Permalink
Fixed issue #13204: Even with good settings : browse ressources show …
Browse files Browse the repository at this point in the history
…"You don't have Permission to browse this server"
  • Loading branch information
lacrioque committed Mar 9, 2018
1 parent 4bb18c0 commit c484af6
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions application/controllers/admin/surveyadmin.php
Expand Up @@ -219,11 +219,6 @@ public function editsurveysettings($iSurveyID)
//Yii::app()->loadHelper('text');
Yii::app()->loadHelper('surveytranslator');

Yii::app()->session['FileManagerContext'] = "edit:survey:{$iSurveyID}";

Yii::app()->loadHelper('/admin/htmleditor');
initKcfinder();

$esrow = self::_fetchSurveyInfo('editsurvey', $iSurveyID);

$aData = array();
Expand Down Expand Up @@ -981,7 +976,6 @@ public function rendersidemenulink($iSurveyID, $subaction)

$templateData = array_merge($this->_getGeneralTemplateData($iSurveyID), $templateData);
$this->_registerScriptFiles();
Yii::app()->loadHelper("admin/htmleditor");

//Start collecting aData
$aData['surveyid'] = $iSurveyID;
Expand Down Expand Up @@ -1763,7 +1757,7 @@ private function _tabPanelIntegration($survey)
* @param Survey $survey survey
* @return mixed
*/
private function _tabResourceManagement($survey)
private function _tabResourceManagement($oSurvey)
{
global $sCKEditorURL;

Expand All @@ -1774,7 +1768,7 @@ private function _tabResourceManagement($survey)
}

$disabledIfNoResources = '';
if (hasResources($survey->sid, 'survey') === false) {
if (hasResources($oSurvey->sid, 'survey') === false) {
$disabledIfNoResources = " disabled='disabled'";
}
$aData = [];
Expand All @@ -1783,6 +1777,11 @@ private function _tabResourceManagement($survey)
$aData['sCKEditorURL'] = $sCKEditorURL;
$aData['noform'] = true;

//KCFINDER SETTINGS
Yii::app()->session['FileManagerContext'] = "edit:survey:{$oSurvey->sid}";
Yii::app()->loadHelper('admin.htmleditor');
initKcfinder();

return $aData;
}

Expand Down

0 comments on commit c484af6

Please sign in to comment.