mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
default public status of attachments can be configured
This commit is contained in:
parent
14afb5f1b7
commit
244066d34d
|
@ -12,6 +12,7 @@
|
|||
- major overhaul of fulltext search, add new search tab for a more
|
||||
facetted based search
|
||||
- add initial version of Dashboard
|
||||
- default public status of attachments can be configured
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.30
|
||||
|
|
|
@ -122,6 +122,8 @@ class Settings { /* {{{ */
|
|||
var $_proxyPassword = null;
|
||||
// enable removal of file from dropfolder after success import
|
||||
var $_removeFromDropFolder = false;
|
||||
// uploaded attachements are not public by default
|
||||
var $_uploadedAttachmentIsPublic = false;
|
||||
// Where the stop word file is located
|
||||
var $_stopWordsFile = null;
|
||||
// enable/disable lucene fulltext search
|
||||
|
@ -740,6 +742,7 @@ class Settings { /* {{{ */
|
|||
$this->_enableDuplicateSubFolderNames = Settings::boolval($tab["enableDuplicateSubFolderNames"]);
|
||||
$this->_overrideMimeType = Settings::boolval($tab["overrideMimeType"]);
|
||||
$this->_removeFromDropFolder = Settings::boolval($tab["removeFromDropFolder"]);
|
||||
$this->_uploadedAttachmentIsPublic = Settings::boolval($tab["uploadedAttachmentIsPublic"]);
|
||||
}
|
||||
|
||||
// XML Path: /configuration/advanced/notification
|
||||
|
@ -1087,6 +1090,7 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "enableDuplicateSubFolderNames", $this->_enableDuplicateSubFolderNames);
|
||||
$this->setXMLAttributValue($node, "overrideMimeType", $this->_overrideMimeType);
|
||||
$this->setXMLAttributValue($node, "removeFromDropFolder", $this->_removeFromDropFolder);
|
||||
$this->setXMLAttributValue($node, "uploadedAttachmentIsPublic", $this->_uploadedAttachmentIsPublic);
|
||||
|
||||
// XML Path: /configuration/advanced/notification
|
||||
$node = $this->getXMLNode($xml, '/configuration/advanced', 'notification');
|
||||
|
|
|
@ -927,7 +927,7 @@ switch($command) {
|
|||
$name = utf8_basename($userfilename);
|
||||
$comment = '';
|
||||
$version = 0;
|
||||
$public = false;
|
||||
$public = $settings->_uploadedAttachmentIsPublic;
|
||||
$res = $document->addDocumentFile($name, $comment, $user, $userfiletmp,
|
||||
utf8_basename($userfilename),$fileType, $userfiletype, $version, $public);
|
||||
if (is_bool($res) && !$res) {
|
||||
|
|
|
@ -253,6 +253,7 @@ if ($action == "saveSettings")
|
|||
setBoolValue("enableDuplicateSubFolderNames");
|
||||
setBoolValue("overrideMimeType");
|
||||
setBoolValue("removeFromDropFolder");
|
||||
setBoolValue("uploadedAttachmentIsPublic");
|
||||
|
||||
// SETTINGS - ADVANCED - NOTIFICATION
|
||||
setBoolValue("enableOwnerNotification");
|
||||
|
|
|
@ -55,6 +55,7 @@ if($view) {
|
|||
$view->setParam('document', $document);
|
||||
$view->setParam('strictformcheck', $settings->_strictFormCheck);
|
||||
$view->setParam('enablelargefileupload', $settings->_enableLargeFileUpload);
|
||||
$view->setParam('uploadedattachmentispublic', $settings->_uploadedAttachmentIsPublic);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
|
|
|
@ -111,6 +111,7 @@ $(document).ready( function() {
|
|||
$document = $this->params['document'];
|
||||
$strictformcheck = $this->params['strictformcheck'];
|
||||
$enablelargefileupload = $this->params['enablelargefileupload'];
|
||||
$uploadedattachmentispublic = $this->params['uploadedattachmentispublic'];
|
||||
$maxuploadsize = $this->params['maxuploadsize'];
|
||||
|
||||
$this->htmlAddHeader('<script type="text/javascript" src="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/vendors/jquery-validation/jquery.validate.js"></script>'."\n", 'js');
|
||||
|
@ -183,7 +184,7 @@ $(document).ready( function() {
|
|||
'id'=>'public',
|
||||
'name'=>'public',
|
||||
'value'=>'true',
|
||||
'checked'=>true,
|
||||
'checked'=>$uploadedattachmentispublic,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -515,6 +515,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
|||
<?php $this->showConfigCheckbox('settings_enableDuplicateSubFolderNames', 'enableDuplicateSubFolderNames'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_overrideMimeType', 'overrideMimeType'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_removeFromDropFolder', 'removeFromDropFolder'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_uploadedAttachmentIsPublic', 'uploadedAttachmentIsPublic'); ?>
|
||||
|
||||
<!--
|
||||
-- SETTINGS - ADVANCED - NOTIFICATION
|
||||
|
|
Loading…
Reference in New Issue
Block a user