mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
24ae96b9fa
|
@ -213,6 +213,7 @@
|
|||
- fix sending of some notification mails to groups
|
||||
- major overhaul of notifications
|
||||
- check view access for FolderAccess and DocumentAccess
|
||||
- more settings to disable import and download of extensions
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.23
|
||||
|
|
|
@ -224,13 +224,11 @@
|
|||
<!--
|
||||
-siteDefaultPage: Default page on login. Defaults to out/out.ViewFolder.php
|
||||
- rootFolderID: ID of root-folder (mostly no need to change)
|
||||
- titleDisplayHack: Workaround for page titles that go over more than 2 lines.
|
||||
- showMissingTranslations: XXX
|
||||
-->
|
||||
<display
|
||||
siteDefaultPage = ""
|
||||
rootFolderID = "1"
|
||||
titleDisplayHack = "true"
|
||||
showMissingTranslations = "false"
|
||||
/>
|
||||
<!--
|
||||
|
|
|
@ -163,8 +163,6 @@ class Settings { /* {{{ */
|
|||
var $_overrideTheme = false;
|
||||
// experimental one page mode for ViewFolder page
|
||||
var $_onePageMode = false;
|
||||
// Workaround for page titles that go over more than 2 lines.
|
||||
var $_titleDisplayHack = true;
|
||||
// enable/disable automatic email notification
|
||||
var $_enableEmail = true;
|
||||
// enable/disable group and user view for all users
|
||||
|
@ -254,6 +252,12 @@ class Settings { /* {{{ */
|
|||
var $_calendarDefaultView = "y";
|
||||
// first day of the week (0=sunday, 1=monday, 6=saturday)
|
||||
var $_firstDayOfWeek = 0;
|
||||
// enable/disable download of extensions
|
||||
var $_enableExtensionDownload = true;
|
||||
// enable/disable import of extensions
|
||||
var $_enableExtensionImport = true;
|
||||
// enable/disable import of extensions from repository
|
||||
var $_enableExtensionImportFromRepository = true;
|
||||
// enable/disable display of the clipboard
|
||||
var $_enableClipboard = true;
|
||||
// enable/disable list of tasks in main menu
|
||||
|
@ -573,7 +577,7 @@ class Settings { /* {{{ */
|
|||
$this->_libraryFolder = intval($tab["libraryFolder"]);
|
||||
$this->_defaultDocPosition = strval($tab["defaultDocPosition"]);
|
||||
|
||||
// XML Path: /configuration/site/calendar
|
||||
// XML Path: /configuration/site/webdav
|
||||
$node = $xml->xpath('/configuration/site/webdav');
|
||||
if($node) {
|
||||
$tab = $node[0]->attributes();
|
||||
|
@ -589,6 +593,15 @@ class Settings { /* {{{ */
|
|||
$this->_firstDayOfWeek = intval($tab["firstDayOfWeek"]);
|
||||
}
|
||||
|
||||
// XML Path: /configuration/site/extensionmgr
|
||||
$node = $xml->xpath('/configuration/site/extensionmgr');
|
||||
if($node) {
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_enableExtensionDownload = Settings::boolVal($tab["enableExtensionDownload"]);
|
||||
$this->_enableExtensionImport = Settings::boolVal($tab["enableExtensionImport"]);
|
||||
$this->_enableExtensionImportFromRepository = Settings::boolVal($tab["enableExtensionImportFromRepository"]);
|
||||
}
|
||||
|
||||
// XML Path: /configuration/system/server
|
||||
$node = $xml->xpath('/configuration/system/server');
|
||||
if($node) {
|
||||
|
@ -726,7 +739,6 @@ class Settings { /* {{{ */
|
|||
$this->_siteDefaultPage = strval($tab["siteDefaultPage"]);
|
||||
$this->_rootFolderID = intval($tab["rootFolderID"]);
|
||||
$this->_useHomeAsRootFolder = Settings::boolval($tab["useHomeAsRootFolder"]);
|
||||
$this->_titleDisplayHack = Settings::boolval($tab["titleDisplayHack"]);
|
||||
$this->_showMissingTranslations = Settings::boolval($tab["showMissingTranslations"]);
|
||||
$this->_hiddenConfFields = explode(';', strval($tab["hiddenConfFields"]));
|
||||
}
|
||||
|
@ -961,7 +973,7 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "libraryFolder", $this->_libraryFolder);
|
||||
$this->setXMLAttributValue($node, "defaultDocPosition", $this->_defaultDocPosition);
|
||||
|
||||
// XML Path: /configuration/site/calendar
|
||||
// XML Path: /configuration/site/webdav
|
||||
$node = $this->getXMLNode($xml, '/configuration/site', 'webdav');
|
||||
$this->setXMLAttributValue($node, "enableWebdavReplaceDoc", $this->_enableWebdavReplaceDoc);
|
||||
|
||||
|
@ -971,6 +983,12 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "calendarDefaultView", $this->_calendarDefaultView);
|
||||
$this->setXMLAttributValue($node, "firstDayOfWeek", $this->_firstDayOfWeek);
|
||||
|
||||
// XML Path: /configuration/site/extensionmgr
|
||||
$node = $this->getXMLNode($xml, '/configuration/site', 'extensionmgr');
|
||||
$this->setXMLAttributValue($node, "enableExtensionDownload", $this->_enableExtensionDownload);
|
||||
$this->setXMLAttributValue($node, "enableExtensionImport", $this->_enableExtensionImport);
|
||||
$this->setXMLAttributValue($node, "enableExtensionImportFromRepository", $this->_enableExtensionImportFromRepository);
|
||||
|
||||
// XML Path: /configuration/system/server
|
||||
$this->getXMLNode($xml, '/configuration', 'system');
|
||||
$node = $this->getXMLNode($xml, '/configuration/system', 'server');
|
||||
|
@ -1088,7 +1106,6 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "siteDefaultPage", $this->_siteDefaultPage);
|
||||
$this->setXMLAttributValue($node, "rootFolderID", $this->_rootFolderID);
|
||||
$this->setXMLAttributValue($node, "useHomeAsRootFolder", $this->_useHomeAsRootFolder);
|
||||
$this->setXMLAttributValue($node, "titleDisplayHack", $this->_titleDisplayHack);
|
||||
$this->setXMLAttributValue($node, "showMissingTranslations", $this->_showMissingTranslations);
|
||||
// $this->setXMLAttributValue($node, "hiddenConfFields", $this->_hiddenConfFields);
|
||||
|
||||
|
|
|
@ -45,6 +45,9 @@ else $currenttab=NULL;
|
|||
|
||||
// Download extension -------------------------------------------------------
|
||||
if ($action == "download") { /* {{{ */
|
||||
if(!$settings->_enableExtensionDownload) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
|
||||
}
|
||||
if (!isset($_POST["extname"])) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("unknown_id"));
|
||||
}
|
||||
|
@ -72,6 +75,9 @@ elseif ($action == "refresh") { /* {{{ */
|
|||
header("Location:../out/out.ExtensionMgr.php?currenttab=".$currenttab);
|
||||
} /* }}} */
|
||||
elseif ($action == "upload") { /* {{{ */
|
||||
if(!$settings->_enableExtensionImport) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("extension_mgr_upload_disabled"));
|
||||
}
|
||||
if(!$extMgr->isWritableExtDir()) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("extension_mgr_no_upload"));
|
||||
}
|
||||
|
@ -92,6 +98,9 @@ elseif ($action == "upload") { /* {{{ */
|
|||
header("Location:../out/out.ExtensionMgr.php?currenttab=".$currenttab);
|
||||
} /* }}} */
|
||||
elseif ($action == "import") { /* {{{ */
|
||||
if(!$settings->_enableExtensionImportFromRepository) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("extension_mgr_upload_disabled"));
|
||||
}
|
||||
if(!$_POST['url']) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
|
||||
}
|
||||
|
|
|
@ -160,6 +160,11 @@ if ($action == "saveSettings")
|
|||
setStrValue("calendarDefaultView");
|
||||
setIntValue("firstDayOfWeek");
|
||||
|
||||
// SETTINGS - SITE - EXTENSIONMGR
|
||||
setBoolValue("enableExtensionDownload");
|
||||
setBoolValue("enableExtensionImport");
|
||||
setBoolValue("enableExtensionImportFromRepository");
|
||||
|
||||
// SETTINGS - SYSTEM - SERVER
|
||||
setDirValue("rootDir");
|
||||
setStrValue("httpRoot");
|
||||
|
@ -223,7 +228,6 @@ if ($action == "saveSettings")
|
|||
setStrValue("siteDefaultPage");
|
||||
setIntValue("rootFolderID");
|
||||
setBoolValue("useHomeAsRootFolder");
|
||||
setBoolValue("titleDisplayHack");
|
||||
setBoolValue("showMissingTranslations");
|
||||
|
||||
// SETTINGS - ADVANCED - AUTHENTICATION
|
||||
|
|
|
@ -218,7 +218,8 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
}
|
||||
if($extconf['config'])
|
||||
echo "<a href=\"../out/out.Settings.php?currenttab=extensions#".$extname."\" title=\"".getMLText('configure_extension')."\"><i class=\"fa fa-cogs\"></i></a>";
|
||||
echo "<form style=\"display: inline-block; margin: 0px;\" method=\"post\" action=\"../op/op.ExtensionMgr.php\" id=\"".$extname."-download\">".createHiddenFieldWithKey('extensionmgr')."<input type=\"hidden\" name=\"action\" value=\"download\" /><input type=\"hidden\" name=\"extname\" value=\"".$extname."\" /><a class=\"download\" data-extname=\"".$extname."\" title=\"".getMLText('download_extension')."\"><i class=\"fa fa-download\"></i></a></form>";
|
||||
if($settings->_enableExtensionDownload)
|
||||
echo "<form style=\"display: inline-block; margin: 0px;\" method=\"post\" action=\"../op/op.ExtensionMgr.php\" id=\"".$extname."-download\">".createHiddenFieldWithKey('extensionmgr')."<input type=\"hidden\" name=\"action\" value=\"download\" /><input type=\"hidden\" name=\"extname\" value=\"".$extname."\" /><a class=\"download\" data-extname=\"".$extname."\" title=\"".getMLText('download_extension')."\"><i class=\"fa fa-download\"></i></a></form>";
|
||||
if(!$settings->extensionIsDisabled($extname)) {
|
||||
echo ' <a href="#" class="toggle" data-extname="'.$extname.'" title="'.getMLText('disable_extension').'"><i class="fa fa-check"</i></a>';
|
||||
} else {
|
||||
|
@ -249,7 +250,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
$this->contentHeading(getMLText("extension_manager"));
|
||||
$this->rowStart();
|
||||
$this->columnStart(4);
|
||||
if($extmgr->isWritableExtDir()) {
|
||||
if($settings->_enableExtensionImport && $extmgr->isWritableExtDir()) {
|
||||
?>
|
||||
<form class="form-horizontal" method="post" enctype="multipart/form-data" action="../op/op.ExtensionMgr.php">
|
||||
<?= createHiddenFieldWithKey('extensionmgr') ?>
|
||||
|
@ -264,7 +265,10 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
</form>
|
||||
<?php
|
||||
} else {
|
||||
echo "<div class=\"alert alert-warning\">".getMLText('extension_mgr_no_upload')."</div>";
|
||||
if($settings->_enableExtensionImport)
|
||||
echo "<div class=\"alert alert-warning\">".getMLText('extension_mgr_no_upload')."</div>";
|
||||
else
|
||||
echo "<div class=\"alert alert-warning\">".getMLText('extension_mgr_upload_disabled')."</div>";
|
||||
}
|
||||
$this->columnEnd();
|
||||
$this->columnStart(8);
|
||||
|
@ -324,7 +328,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
|
|||
echo "<div class=\"list-action\">";
|
||||
echo $this->getModalBoxLink(array('target'=>'extensionInfo', 'remote'=>'out.ExtensionMgr.php?action=info_versions&extensionname='.$re['name'], 'class'=>'', 'title'=>'<i class="fa fa-list-ol"></i>'));
|
||||
echo $this->getModalBoxLink(array('target'=>'extensionChangelog', 'remote'=>'out.ExtensionMgr.php?action=info_changelog&extensionname='.$re['name'], 'class'=>'', 'title'=>'<i class="fa fa-reorder"></i>'));
|
||||
if(!$checkmsgs && $extmgr->isWritableExtDir())
|
||||
if(!$checkmsgs && $settings->_enableExtensionImportFromRepository && $extmgr->isWritableExtDir())
|
||||
echo "<form style=\"display: inline-block; margin: 0px;\" method=\"post\" action=\"../op/op.ExtensionMgr.php\" id=\"".$re['name']."-import\">".createHiddenFieldWithKey('extensionmgr')."<input type=\"hidden\" name=\"action\" value=\"import\" /><input type=\"hidden\" name=\"currenttab\" value=\"repository\" /><input type=\"hidden\" name=\"url\" value=\"".$re['filename']."\" /><a class=\"import\" data-extname=\"".$re['name']."\" title=\"".getMLText('import_extension')."\"><i class=\"fa fa-download\"></i></a></form>";
|
||||
echo "</div>";
|
||||
echo "</td>";
|
||||
|
|
|
@ -388,6 +388,14 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
|||
<?php $this->showConfigCheckbox('settings_enableCalendar', 'enableCalendar'); ?>
|
||||
<?php $this->showConfigOption('settings_calendarDefaultView', 'calendarDefaultView', array('w'=>'week_view', 'm'=>'month_view', 'y'=>'year_view'), false, true); ?>
|
||||
<?php $this->showConfigOption('settings_firstDayOfWeek', 'firstDayOfWeek', array(' 0'=>'sunday', ' 1'=>'monday', ' 2'=>'tuesday', ' 3'=>'wednesday', ' 4'=>'thursday', ' 5'=>'friday', ' 6'=>'saturday'), false, true); ?>
|
||||
|
||||
<!--
|
||||
-- SETTINGS - SITE - EXTENSIONMGR
|
||||
-->
|
||||
<?php $this->showConfigHeadline('settings_ExtensionMgr'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_enableExtensionDownload', 'enableExtensionDownload'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_enableExtensionImport', 'enableExtensionImport'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_enableExtensionImportFromRepository', 'enableExtensionImportFromRepository'); ?>
|
||||
<?php
|
||||
$this->showEndPaneContent('site', $currenttab);
|
||||
|
||||
|
@ -474,7 +482,6 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
|||
<?php $this->showConfigText('settings_siteDefaultPage', 'siteDefaultPage'); ?>
|
||||
<?php $this->showConfigText('settings_rootFolderID', 'rootFolderID'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_useHomeAsRootFolder', 'useHomeAsRootFolder'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_titleDisplayHack', 'titleDisplayHack'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_showMissingTranslations', 'showMissingTranslations'); ?>
|
||||
|
||||
<!--
|
||||
|
|
Loading…
Reference in New Issue
Block a user