mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-11-27 18:10:42 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
0b5b585d6f
|
|
@ -347,6 +347,8 @@
|
|||
- add endpoints to rest api for setting comment and name of folder
|
||||
- initial support for installation from git
|
||||
- memcached support can be configured (still rarely used)
|
||||
- fix folder parameter passed to hook 'folderRowAction'
|
||||
- require unrestricted access on document/folder for deletion by rest api
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.41
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
}
|
||||
},
|
||||
"require": {
|
||||
"pear/http_request2": "2.5.0",
|
||||
"pear/http_request2": "^2",
|
||||
"robthree/twofactorauth": "^3.0",
|
||||
"php-mime-mail-parser/php-mime-mail-parser": "*",
|
||||
"slim/slim": "^4.0",
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
"alecrabbit/php-console-colour": "*",
|
||||
"zf1/zend-search-lucene": "*",
|
||||
"symfony/http-foundation": "^5.4",
|
||||
"php-di/php-di": "^6.4",
|
||||
"php-di/php-di": "^7",
|
||||
"hfig/mapi": "*",
|
||||
"slim/psr7": "^1.7",
|
||||
"chillerlan/php-qrcode": "^5.0",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
"require": {
|
||||
"php": ">=8.2.0",
|
||||
"phing/phing": "3.*",
|
||||
"pear/http_request2": "2.5.0",
|
||||
"pear/http_request2": "^2",
|
||||
"robthree/twofactorauth": "^3.0",
|
||||
"php-mime-mail-parser/php-mime-mail-parser": "*",
|
||||
"slim/slim": "^4.0",
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
"alecrabbit/php-console-colour": "*",
|
||||
"zf1/zend-search-lucene": "*",
|
||||
"symfony/http-foundation": "^5.4",
|
||||
"php-di/php-di": "^6.4",
|
||||
"php-di/php-di": "^7",
|
||||
"hfig/mapi": "*",
|
||||
"slim/psr7": "^1.7",
|
||||
"chillerlan/php-qrcode": "^5.0",
|
||||
|
|
@ -56,12 +56,12 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"composer/composer": "dev-main",
|
||||
"behat/mink": "1.8.1",
|
||||
"behat/mink-selenium2-driver": "1.4.0",
|
||||
"dmore/chrome-mink-driver": "2.8.0",
|
||||
"friendsofphp/php-cs-fixer": "3.87.2",
|
||||
"behat/mink": "^1",
|
||||
"behat/mink-selenium2-driver": "^1",
|
||||
"dmore/chrome-mink-driver": "^2",
|
||||
"friendsofphp/php-cs-fixer": "^3",
|
||||
"phpunit/phpunit": "9.5.9",
|
||||
"squizlabs/php_codesniffer": "3.6.0",
|
||||
"squizlabs/php_codesniffer": "^4",
|
||||
"phpstan/phpstan": "^2.1",
|
||||
"pear/archive_tar": "*"
|
||||
},
|
||||
|
|
@ -102,6 +102,9 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"scripts": {
|
||||
"phpcs": "phpcs -s"
|
||||
},
|
||||
"extra": {
|
||||
"merge-plugin": {
|
||||
"include": [
|
||||
|
|
|
|||
|
|
@ -241,6 +241,8 @@ in your current installation with new versions from the quickstart archive.
|
|||
3. copy the directory `pear` from the unpacked archive into your current
|
||||
installation, replacing the existing directory. Make a backup of `pear` before
|
||||
the replacement if you want to ensure to be able to go back to your old version.
|
||||
Since version 5.1.42 and 6.0.35 of SeeDMS the directory `pear` was replaced
|
||||
by `vendor`, which was previously a ѕubdirectory of `pear`.
|
||||
4. you may compare your `conf/settings.xml` file with the shipped version
|
||||
`conf/settings.xml.template` for new parameters. If you don't do it, the next
|
||||
time you save the configuration the default values will be used.
|
||||
|
|
|
|||
|
|
@ -1318,6 +1318,20 @@ class SeedDMS_Utils { /* {{{ */
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Create a random string
|
||||
*
|
||||
* @param integer $n number of chars
|
||||
* @param string $alph alphabet used as source for chars
|
||||
* @return string random string
|
||||
*/
|
||||
static public function makeRandomString($n, $alph = "0123456789abcdefghijklmnopqrstuvwxyz") { /* {{{ */
|
||||
$s = "";
|
||||
for ($i = 0; $i != $n; ++$i)
|
||||
$s .= $alph[mt_rand(0, 35)];
|
||||
return $s;
|
||||
} /* }}} */
|
||||
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -646,7 +646,7 @@ final class SeedDMS_RestapiController { /* {{{ */
|
|||
}
|
||||
$mfolder = $dms->getFolder($args['id']);
|
||||
if($mfolder) {
|
||||
if ($mfolder->getAccessMode($userobj, 'removeFolder') >= M_READWRITE) {
|
||||
if ($mfolder->getAccessMode($userobj, 'removeFolder') > M_READWRITE) {
|
||||
if($mfolder->remove()) {
|
||||
return $this->renderer->json($response, array('success'=>true, 'message'=>'', 'data'=>''))->withStatus(200);
|
||||
} else {
|
||||
|
|
@ -1224,7 +1224,7 @@ final class SeedDMS_RestapiController { /* {{{ */
|
|||
|
||||
$document = $dms->getDocument($args['id']);
|
||||
if($document) {
|
||||
if ($document->getAccessMode($userobj, 'deleteDocument') >= M_READWRITE) {
|
||||
if ($document->getAccessMode($userobj, 'deleteDocument') > M_READWRITE) {
|
||||
if($document->remove()) {
|
||||
return $this->renderer->json($response, array('success'=>true, 'message'=>'', 'data'=>''))->withStatus(200);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -3669,7 +3669,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$hookObjs = $this->getHookObjects();
|
||||
foreach($hookObjs as $hookObj) {
|
||||
if (method_exists($hookObj, 'folderRowAction')) {
|
||||
$actions = $hookObj->folderRowAction($this, $folder, $actions);
|
||||
$actions = $hookObj->folderRowAction($this, $subFolder, $actions);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -626,6 +626,7 @@ $(document).ready( function() {
|
|||
break;
|
||||
case 'video/webm':
|
||||
case 'video/mp4':
|
||||
case 'video/mpeg':
|
||||
case 'video/avi':
|
||||
case 'video/msvideo':
|
||||
case 'video/x-msvideo':
|
||||
|
|
|
|||
|
|
@ -3695,7 +3695,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$hookObjs = $this->getHookObjects();
|
||||
foreach($hookObjs as $hookObj) {
|
||||
if (method_exists($hookObj, 'folderRowAction')) {
|
||||
$actions = $hookObj->folderRowAction($this, $folder, $actions);
|
||||
$actions = $hookObj->folderRowAction($this, $subFolder, $actions);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1718,7 +1718,7 @@ $(document).ready(function() { /* {{{ */
|
|||
|
||||
$(document).ready(function() { /* {{{ */
|
||||
$('body').on('click.modal.data-api', '[data-toggle="modal"]', function(){
|
||||
if($(this).attr("href"))
|
||||
if($(this).attr('href'))
|
||||
$($(this).data("target")+' .modal-body').load($(this).attr('href'));
|
||||
});
|
||||
}); /* }}} */
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ require "inc/inc.Settings.php";
|
|||
use DI\ContainerBuilder;
|
||||
use Slim\Factory\AppFactory;
|
||||
|
||||
if(true) {
|
||||
if (true) {
|
||||
require_once("inc/inc.Utils.php");
|
||||
require_once("inc/inc.LogInit.php");
|
||||
require_once("inc/inc.Language.php");
|
||||
|
|
@ -60,18 +60,18 @@ if(true) {
|
|||
$container->set('notifier', $notifier);
|
||||
$container->set('authenticator', $authenticator);
|
||||
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'addMiddleware')) {
|
||||
$hookObj->addMiddleware($app);
|
||||
}
|
||||
if (isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
|
||||
foreach ($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'addMiddleware')) {
|
||||
$hookObj->addMiddleware($app);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$app->addErrorMiddleware(false, true, true);
|
||||
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
|
||||
if (isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
|
||||
foreach ($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'addRoute')) {
|
||||
// FIXME: pass $app only just like initRestAPI. $app has a container
|
||||
// which contains all other objects
|
||||
|
|
@ -81,16 +81,14 @@ if(true) {
|
|||
}
|
||||
|
||||
/* Catch all route */
|
||||
$app->get('/{path:.*}', function($request, $response) use ($settings) {
|
||||
$app->get('/{path:.*}', function ($request, $response) use ($settings) {
|
||||
return $response
|
||||
->withHeader('Location', $settings->_httpRoot.'out/out.ViewFolder.php')
|
||||
->withStatus(302);
|
||||
|
||||
});
|
||||
|
||||
$app->run();
|
||||
} else {
|
||||
|
||||
header("Location: ". (isset($settings->_siteDefaultPage) && strlen($settings->_siteDefaultPage)>0 ? $settings->_siteDefaultPage : "out/out.ViewFolder.php"));
|
||||
?>
|
||||
<html>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user