src build elFinder-2.1-c81d9f8

This commit is contained in:
nao-pon
2024-01-05 14:01:19 +09:00
parent fb287a09eb
commit 975a4dc9f8
8 changed files with 55 additions and 30 deletions
+6
View File
@@ -1,3 +1,9 @@
2024-01-05 Naoki Sawada <hypweb+elfinder@gmail.com>
* elFinder (2.1.65):
- [js] update CDNs
- [php:editors] Zoho API update
2023-12-20 Naoki Sawada <hypweb+elfinder@gmail.com>
* elFinder (2.1.64):
- [css] re-fix #3584 css error and CI
+1 -1
View File
@@ -1,6 +1,6 @@
elFinder is issued under a 3-clauses BSD license.
Copyright (c) 2009-2023, Studio 42
Copyright (c) 2009-2024, Studio 42
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+2 -2
View File
@@ -1,9 +1,9 @@
/*!
* elFinder - file manager for web
* Version 2.1.64 (2.1-src Nightly: cb65186) (2023-12-21)
* Version 2.1.65 (2.1-src Nightly: c81d9f8) (2024-01-05)
* http://elfinder.org
*
* Copyright 2009-2023, Studio 42
* Copyright 2009-2024, Studio 42
* Licensed under a 3-clauses BSD license
*/
+2 -2
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -1,9 +1,9 @@
/*!
* elFinder - file manager for web
* Version 2.1.64 (2.1-src Nightly: cb65186) (2023-12-21)
* Version 2.1.65 (2.1-src Nightly: c81d9f8) (2024-01-05)
* http://elfinder.org
*
* Copyright 2009-2023, Studio 42
* Copyright 2009-2024, Studio 42
* Licensed under a 3-clauses BSD license
*/
(function(root, factory) {
@@ -10748,7 +10748,7 @@ if (!window.cancelAnimationFrame) {
*
* @type String
**/
elFinder.prototype.version = '2.1.64 (2.1-src Nightly: cb65186)';
elFinder.prototype.version = '2.1.65 (2.1-src Nightly: c81d9f8)';
@@ -25934,7 +25934,7 @@ elFinder.prototype.commands.fullscreen = function() {
html.push(sep);
html.push('<div class="'+lic+'">Licence: 3-clauses BSD Licence</div>');
html.push('<div class="'+lic+'">Copyright © 2009-2022, Studio 42 / nao-pon</div>');
html.push('<div class="'+lic+'">Copyright © 2009-2024, Studio 42 / nao-pon</div>');
html.push('<div class="'+lic+'">„ …'+fm.i18n('dontforget')+' ”</div>');
html.push('</div>');
},
+4 -4
View File
File diff suppressed because one or more lines are too long
+35 -16
View File
@@ -18,9 +18,9 @@ class elFinderEditorZohoOffice extends elFinderEditor
);
private $urls = array(
'writer' => 'https://writer.zoho.com/writer/officeapi/v1/document',
'sheet' => 'https://sheet.zoho.com/sheet/officeapi/v1/spreadsheet',
'show' => 'https://show.zoho.com/show/officeapi/v1/presentation',
'writer' => 'https://api.office-integrator.com/writer/officeapi/v1/document',
'sheet' => 'https://api.office-integrator.com/sheet/officeapi/v1/spreadsheet',
'show' => 'https://api.office-integrator.com/show/officeapi/v1/presentation',
);
private $srvs = array(
@@ -45,6 +45,28 @@ class elFinderEditorZohoOffice extends elFinderEditor
private $myName = '';
protected function extentionNormrize($extention, $srvsName) {
switch($srvsName) {
case 'writer':
if (!in_array($extention, array('zdoc', 'docx', 'rtf', 'odt', 'html', 'txt'))) {
$extention = 'docx';
}
break;
case 'sheet':
if (!in_array($extention, array('zsheet', 'xls', 'xlsx', 'ods', 'csv', 'tsv'))) {
$extention = 'xlsx';
}
break;
case 'show':
if (!in_array($extention, array('zslides', 'pptx', 'pps', 'ppsx', 'odp', 'sxi'))) {
$extention = 'pptx';
}
break;
}
return $extention;
}
public function __construct($elfinder, $args)
{
parent::__construct($elfinder, $args);
@@ -103,7 +125,8 @@ class elFinderEditorZohoOffice extends elFinderEditor
}
}
//$srv = $this->args['service'];
$format = $srcVol->getExtentionByMime($file['mime']);
$srvsName = $this->srvs[$file['mime']];
$format = $this->extentionNormrize($srcVol->getExtentionByMime($file['mime']), $srvsName);
if (!$format) {
$format = substr($file['name'], strrpos($file['name'], '.') * -1);
}
@@ -111,12 +134,11 @@ class elFinderEditorZohoOffice extends elFinderEditor
if ($lang === 'jp') {
$lang = 'ja';
}
$srvsName = $this->srvs[$file['mime']];
$data = array(
'apikey' => ELFINDER_ZOHO_OFFICE_APIKEY,
'callback_settings' => array(
'save_format' => $format,
'context_info' => array(
'save_url_params' => array(
'hash' => $hash
)
),
@@ -174,16 +196,13 @@ class elFinderEditorZohoOffice extends elFinderEditor
public function save()
{
if (!empty($_POST) && !empty($_POST['id']) && !empty($_FILES) && !empty($_FILES['content'])) {
$data = @json_decode(str_replace('&quot;', '"', $_POST['id']), true);
if (!empty($data['hash'])) {
$hash = $data['hash'];
/** @var elFinderVolumeDriver $volume */
if ($volume = $this->elfinder->getVolume($hash)) {
if ($content = file_get_contents($_FILES['content']['tmp_name'])) {
if ($volume->putContents($hash, $content)) {
return array('raw' => true, 'error' => '', 'header' => 'HTTP/1.1 200 OK');
}
if (!empty($_POST) && !empty($_POST['hash']) && !empty($_FILES) && !empty($_FILES['content'])) {
$hash = $_POST['hash'];
/** @var elFinderVolumeDriver $volume */
if ($volume = $this->elfinder->getVolume($hash)) {
if ($content = file_get_contents($_FILES['content']['tmp_name'])) {
if ($volume->putContents($hash, $content)) {
return array('raw' => true, 'error' => '', 'header' => 'HTTP/1.1 200 OK');
}
}
}
+1 -1
View File
@@ -32,7 +32,7 @@ class elFinder
*
* @var integer
*/
protected static $ApiRevision = 64;
protected static $ApiRevision = 65;
/**
* Storages (root dirs)