Skip to content

Commit

Permalink
Fixed several PHP8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Apr 28, 2021
1 parent 5cdf20f commit e877a50
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/questions.php
Expand Up @@ -138,7 +138,7 @@ public function view($surveyid, $gid, $qid)
/**
* Display import view
*/
public function importView($groupid = null, $surveyid)
public function importView($groupid , $surveyid)
{
$iSurveyID = (int) $surveyid;
if (!Permission::model()->hasSurveyPermission($iSurveyID, 'surveycontent', 'import')) {
Expand Down
27 changes: 13 additions & 14 deletions application/controllers/admin/surveyadmin.php
Expand Up @@ -1808,10 +1808,10 @@ private function _pluginTabSurvey($survey)
/**
* survey::_tabPresentationNavigation()
* Load "Presentation & navigation" tab.
* @param mixed $esrow
* @param mixed $survey
* @return array
*/
private function _tabPresentationNavigation($esrow)
private function _tabPresentationNavigation($survey)
{
global $showxquestions, $showgroupinfo, $showqnumcode;

Expand All @@ -1820,7 +1820,7 @@ private function _tabPresentationNavigation($esrow)
$shownoanswer = getGlobalSetting('shownoanswer') ? getGlobalSetting('shownoanswer') : 'Y';

$aData = [];
$aData['esrow'] = $esrow;
$aData['esrow'] = $survey;
$aData['shownoanswer'] = $shownoanswer;
$aData['showxquestions'] = $showxquestions;
$aData['showgroupinfo'] = $showgroupinfo;
Expand All @@ -1846,26 +1846,26 @@ private function _tabPublicationAccess($survey)
/**
* survey::_tabNotificationDataManagement()
* Load "Notification & data management" tab.
* @param mixed $esrow
* @param mixed $survey
* @return array
*/
private function _tabNotificationDataManagement($esrow)
private function _tabNotificationDataManagement($survey)
{
$aData = [];
$aData['esrow'] = $esrow;
$aData['esrow'] = $survey;
return $aData;
}

/**
* survey::_tabTokens()
* Load "Tokens" tab.
* @param mixed $esrow
* @param mixed $survey
* @return array
*/
private function _tabTokens($esrow)
private function _tabTokens($survey)
{
$aData = [];
$aData['esrow'] = $esrow;
$aData['esrow'] = $survey;
return $aData;
}

Expand Down Expand Up @@ -1915,21 +1915,20 @@ private function _tabPanelIntegration($survey, $sLang = null)
/**
* survey::_tabResourceManagement()
* Load "Resources" tab.
* @param Survey $survey survey
* @param Survey $survey survey
* @return mixed
*/
private function _tabResourceManagement($oSurvey)
private function _tabResourceManagement($survey)
{
global $sCKEditorURL;

// TAB Uploaded Resources Management
$ZIPimportAction = " onclick='if (window.LS.validatefilename(this.form,\"".gT('Please select a file to import!', 'js')."\")) { this.form.submit();}'";
if (!function_exists("zip_open")) {
$ZIPimportAction = " onclick='alert(\"".gT("The ZIP library is not activated in your PHP configuration thus importing ZIP files is currently disabled.", "js")."\");'";
}

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

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

Expand Down
2 changes: 1 addition & 1 deletion application/helpers/admin/statistics_helper.php
Expand Up @@ -26,7 +26,7 @@
* @param string $sQuestionType The question type
* @return false|string
*/
function createChart($iQuestionID, $iSurveyID, $type = null, $lbl, $gdata, $grawdata, $cache, $sLanguageCode, $sQuestionType)
function createChart($iQuestionID, $iSurveyID, $type, $lbl, $gdata, $grawdata, $cache, $sLanguageCode, $sQuestionType)
{
/* This is a lazy solution to bug #6389. A better solution would be to find out how
the "T" gets passed to this function from the statistics.js file in the first place! */
Expand Down

0 comments on commit e877a50

Please sign in to comment.