Skip to content

Commit

Permalink
Dev: Add uploaddir alias in plugin manager (needs testing)
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Feb 23, 2021
1 parent 9679c7f commit 899bc0c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions application/libraries/PluginManager/PluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

namespace LimeSurvey\PluginManager;

use \Yii;
use Yii;
use Plugin;
use ExtensionConfig;

/**
* Factory for limesurvey plugin objects.
* @method mixed dispatchEvent
* @method mixed dispatchEvent(): void
*/
class PluginManager extends \CApplicationComponent
{
Expand Down Expand Up @@ -37,7 +38,7 @@ class PluginManager extends \CApplicationComponent
// Core plugins.
'core' => 'application.core.plugins',
// Uploaded plugins installed through ZIP file.
'upload' => 'webroot.upload.plugins'
'upload' => 'uploaddir.plugins'
];

/**
Expand Down Expand Up @@ -69,6 +70,8 @@ public function init()
$this->shutdownObject = new PluginManagerShutdownFunction();
register_shutdown_function($this->shutdownObject);

\Yii::setPathOfAlias('uploaddir', Yii::app()->getConfig('uploaddir'));

parent::init();
if (!is_object($this->api)) {
$class = $this->api;
Expand Down Expand Up @@ -560,7 +563,7 @@ public function loadQuestionObjects($forceReload = false)
* @param string $guid
* @param int $questionId,
* @param int $responseId
* @return iQuestion
* @return \Question
*/
public function constructQuestionFromGUID($guid, $questionId = null, $responseId = null)
{
Expand Down

0 comments on commit 899bc0c

Please sign in to comment.