Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
+6
View File
@@ -0,0 +1,6 @@
# Deny direct access to template files.
# Templates are loaded by PHP internally via the filesystem, not via HTTP,
# so they never need to be web-accessible.
<FilesMatch "\.tpl$">
Require all denied
</FilesMatch>
@@ -19,9 +19,17 @@
$().ready(function() {
var funcNum = getUrlParam('CKEditorFuncNum');
var sessionId = {{ session_id }};
// Pattern matches Chamilo's document suffix format: __<sessionId>__<groupId>
// First captured group is always session ID, second is always group ID.
var suffixPattern = /__(\d+)__(\d+)(?:\.[^.]+)?$/;
var elf = $('#elfinder').elfinder({
url : '{{ _p.web_lib ~ 'elfinder/connectorAction.php?' }}{{ course_condition }}', // connector URL (REQUIRED)
getFileCallback : function(file) {
var match = suffixPattern.exec(file.name);
if (match && parseInt(match[1]) !== 0 && parseInt(match[1]) !== sessionId) {
return;
}
if (window.opener) {
if (window.opener.CKEDITOR) {
window.opener.CKEDITOR.tools.callFunction(funcNum, file.url);
@@ -36,7 +44,21 @@
},
startPathHash: 'l2_Lw', // Sets the course driver as default
resizable: false,
lang: '{{ elfinder_lang }}'
lang: '{{ elfinder_lang }}',
handlers : {
open : function(event, elfinderInstance) {
// Defer until after the CWD plugin has rendered the file list DOM
setTimeout(function() {
var files = elfinderInstance.files();
for (var key in files) {
var match = suffixPattern.exec(files[key].name);
if (match && parseInt(match[1]) !== 0 && parseInt(match[1]) !== sessionId) {
elfinderInstance.cwdHash2Elm(files[key].hash).hide();
}
}
}, 0);
}
}
}).elfinder('instance');
});
</script>
File diff suppressed because it is too large Load Diff