mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
make it work with 6.0.17
This commit is contained in:
parent
b7315c501f
commit
d9d434a7be
|
@ -122,9 +122,9 @@ if(isset($options['f'])) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
$mimetype = '';
|
||||
$mymimetype = '';
|
||||
if(isset($options['t'])) {
|
||||
$mimetype = $options['t'];
|
||||
$mymimetype = $options['t'];
|
||||
}
|
||||
|
||||
$reqversion = 0;
|
||||
|
@ -248,8 +248,8 @@ if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
|
|||
if(is_readable($filename)) {
|
||||
if(filesize($filename)) {
|
||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||
if(!$mimetype) {
|
||||
$mimetype = $finfo->file($filename);
|
||||
if(!$mymimetype) {
|
||||
$mymimetype = $finfo->file($filename);
|
||||
}
|
||||
$filetype = "." . pathinfo($filename, PATHINFO_EXTENSION);
|
||||
} else {
|
||||
|
@ -304,20 +304,11 @@ $filetmp = $filename;
|
|||
$reviewers = array();
|
||||
$approvers = array();
|
||||
|
||||
if($settings->_enableFullSearch) {
|
||||
$index = $indexconf['Indexer']::open($settings->_luceneDir);
|
||||
$indexconf['Indexer']::init($settings->_stopWordsFile);
|
||||
} else {
|
||||
$index = null;
|
||||
$indexconf = null;
|
||||
}
|
||||
|
||||
if($folder) {
|
||||
$controller = Controller::factory('AddDocument', array('dms'=>$dms, 'user'=>$user));
|
||||
$controller->setParam('documentsource', 'script');
|
||||
$controller->setParam('folder', $folder);
|
||||
$controller->setParam('index', $index);
|
||||
$controller->setParam('indexconf', $indexconf);
|
||||
$controller->setParam('fulltextservice', $fulltextservice);
|
||||
$controller->setParam('name', $name);
|
||||
$controller->setParam('comment', $comment);
|
||||
$controller->setParam('expires', $expires);
|
||||
|
@ -327,7 +318,7 @@ if($folder) {
|
|||
$controller->setParam('userfiletmp', $filetmp);
|
||||
$controller->setParam('userfilename', basename($filename));
|
||||
$controller->setParam('filetype', $filetype);
|
||||
$controller->setParam('userfiletype', $mimetype);
|
||||
$controller->setParam('userfiletype', $mymimetype);
|
||||
$minmax = $folder->getDocumentsMinMax();
|
||||
if($settings->_defaultDocPosition == 'start')
|
||||
$controller->setParam('sequence', $minmax['min'] - 1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user