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
fde112e2d9
|
@ -149,6 +149,27 @@ if($fullsearch) {
|
|||
}
|
||||
}
|
||||
|
||||
/* Creation date {{{ */
|
||||
$createstartts = null;
|
||||
$createstartdate = null;
|
||||
$createendts = null;
|
||||
$createenddate = null;
|
||||
if(!empty($_GET["createstart"])) {
|
||||
$createstartts = makeTsFromDate($_GET["createstart"]);
|
||||
$createstartdate = array('year'=>(int)date('Y', $createstartts), 'month'=>(int)date('m', $createstartts), 'day'=>(int)date('d', $createstartts), 'hour'=>0, 'minute'=>0, 'second'=>0);
|
||||
}
|
||||
if ($createstartdate && !checkdate($createstartdate['month'], $createstartdate['day'], $createstartdate['year'])) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_create_date_end"));
|
||||
}
|
||||
if(!empty($_GET["createend"])) {
|
||||
$createendts = makeTsFromDate($_GET["createend"]);
|
||||
$createenddate = array('year'=>(int)date('Y', $createendts), 'month'=>(int)date('m', $createendts), 'day'=>(int)date('d', $createendts), 'hour'=>23, 'minute'=>59, 'second'=>59);
|
||||
}
|
||||
if ($createenddate && !checkdate($createenddate['month'], $createenddate['day'], $createenddate['year'])) {
|
||||
UI::exitError(getMLText("search"),getMLText("invalid_create_date_end"));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
// status
|
||||
if(isset($_GET['status']))
|
||||
$status = $_GET['status'];
|
||||
|
@ -200,7 +221,7 @@ if($fullsearch) {
|
|||
$terms = $index->terms($_GET['query'], $settings->_suggestTerms);
|
||||
}
|
||||
$lucenesearch = $fulltextservice->Search();
|
||||
$searchresult = $lucenesearch->search($query, array('record_type'=>$record_type, 'owner'=>$ownernames, 'status'=>$status, 'category'=>$categorynames, 'user'=>$user->isAdmin() ? [] : [$user->getLogin()], 'mimetype'=>$mimetype, 'startFolder'=>$startFolder, 'rootFolder'=>$rootFolder, 'attributes'=>$attributes), ($pageNumber == 'all' ? array() : array('limit'=>$limit, 'offset'=>$limit * ($pageNumber-1))));
|
||||
$searchresult = $lucenesearch->search($query, array('record_type'=>$record_type, 'owner'=>$ownernames, 'status'=>$status, 'category'=>$categorynames, 'user'=>$user->isAdmin() ? [] : [$user->getLogin()], 'mimetype'=>$mimetype, 'startFolder'=>$startFolder, 'rootFolder'=>$rootFolder, 'created_start'=>$createstartts, 'created_end'=>$createendts, 'attributes'=>$attributes), ($pageNumber == 'all' ? array() : array('limit'=>$limit, 'offset'=>$limit * ($pageNumber-1))));
|
||||
if($searchresult === false) {
|
||||
$session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('splash_invalid_searchterm')));
|
||||
$dcount = 0;
|
||||
|
|
|
@ -794,6 +794,14 @@ $(document).ready(function() {
|
|||
)
|
||||
);
|
||||
$this->formField(getMLText("under_folder"), $this->getFolderChooserHtml("form1", M_READ, -1, $startfolder, 'folderfullsearchid'));
|
||||
$this->formField(
|
||||
getMLText("creation_date")." (".getMLText('from').")",
|
||||
$this->getDateChooser($createstartdate, "createstart", $this->params['session']->getLanguage())
|
||||
);
|
||||
$this->formField(
|
||||
getMLText("creation_date")." (".getMLText('to').")",
|
||||
$this->getDateChooser($createenddate, "createend", $this->params['session']->getLanguage())
|
||||
);
|
||||
if(!isset($facets['owner'])) {
|
||||
$options = array();
|
||||
foreach ($allUsers as $currUser) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user