Skip to content

Commit ac8a66b

Browse files
committed
Update elfinder to latest version Important: requires composer update.
1 parent 5607ff6 commit ac8a66b

File tree

5 files changed

+224
-105
lines changed

5 files changed

+224
-105
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"szymach/c-pchart": "1.*",
7979
"aferrandini/phpqrcode": "1.0.1",
8080
"mpdf/mpdf": "6.1.*",
81-
"barryvdh/elfinder-builds": "2.1.0.3",
81+
"studio-42/elfinder": "2.1.*",
8282
"jbroadway/urlify": "dev-master",
8383
"monolog/monolog": "~1.0",
8484
"ircmaxell/password-compat": "~1.0.4",

main/template/default/javascript/editor/elfinder_standalone.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% set finderFolder = _p.web ~ 'vendor/barryvdh/elfinder-builds/' %}
1+
{% set finderFolder = _p.web ~ 'vendor/studio-42/elfinder/' %}
22
<!-- elFinder CSS (REQUIRED) -->
33
<link rel="stylesheet" type="text/css" media="screen" href="{{ finderFolder }}css/elfinder.full.css">
44
<link rel="stylesheet" type="text/css" media="screen" href="{{ finderFolder }}css/theme.css">

src/Chamilo/CoreBundle/Component/Editor/Driver/CourseDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public function getCourseDirectory()
219219
/**
220220
* {@inheritdoc}
221221
*/
222-
public function upload($fp, $dst, $name, $tmpname)
222+
public function upload($fp, $dst, $name, $tmpname, $hashes = array())
223223
{
224224
$this->setConnectorFromPlugin();
225225

src/Chamilo/CoreBundle/Component/Editor/Driver/PersonalDriver.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public function setup()
2020
$userId = api_get_user_id();
2121
$dir = \UserManager::getUserPathById($userId, 'system');
2222
if (!empty($dir)) {
23-
2423
if (!is_dir($dir)) {
2524
mkdir($dir);
2625
}
@@ -37,11 +36,9 @@ public function setup()
3736
public function getConfiguration()
3837
{
3938
if ($this->allow()) {
40-
4139
$userId = api_get_user_id();
4240

4341
if (!empty($userId)) {
44-
4542
// Adding user personal files
4643
$dir = \UserManager::getUserPathById($userId, 'system');
4744
$dirWeb = \UserManager::getUserPathById($userId, 'web');
@@ -78,12 +75,10 @@ public function getConfiguration()
7875
/**
7976
* {@inheritdoc}
8077
*/
81-
public function upload($fp, $dst, $name, $tmpname)
78+
public function upload($fp, $dst, $name, $tmpname, $hashes = array())
8279
{
8380
$this->setConnectorFromPlugin();
84-
8581
if ($this->allow()) {
86-
8782
return parent::upload($fp, $dst, $name, $tmpname);
8883
}
8984
}
@@ -96,7 +91,6 @@ public function rm($hash)
9691
$this->setConnectorFromPlugin();
9792

9893
if ($this->allow()) {
99-
10094
return parent::rm($hash);
10195
}
10296
}
@@ -107,7 +101,6 @@ public function rm($hash)
107101
public function allow()
108102
{
109103
//if ($this->connector->security->isGranted('IS_AUTHENTICATED_FULLY')) {
110-
111104
return !api_is_anonymous();
112105
}
113106
}

0 commit comments

Comments
 (0)