This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  a8fed44287df6ecca23d93cf7c2e9cb2a527c6a7 (commit)
      from  7ab21df9602f0dc39ed846d614977bc9226dabb8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=a8fed44287df6ecca23d93cf7c2e9cb2a527c6a7

commit a8fed44287df6ecca23d93cf7c2e9cb2a527c6a7
Author: Franck Villaume <franck.villa...@trivialdev.com>
Date:   Thu Sep 22 14:06:32 2016 +0200

    docman search: add missing params for paging, use Int vs. String to retrive 
params, remove useless var

diff --git a/src/common/docman/views/search.php 
b/src/common/docman/views/search.php
index 84ad878..3cdafbb 100644
--- a/src/common/docman/views/search.php
+++ b/src/common/docman/views/search.php
@@ -40,23 +40,21 @@ if (!forge_check_perm('docman', $group_id, 'read')) {
        session_redirect($redirect_url);
 }
 
-$is_editor = forge_check_perm('docman', $g->getID(), 'approve');
 $searchString = trim(getStringFromRequest('textsearch', null));
-$insideDocuments = getStringFromPost('insideDocuments');
-$subprojectsIncluded = getStringFromPost('includesubprojects');
-$limitByStartDate = getIntFromPost('limitByStartDate', 0);
-$limitByEndDate = getIntFromPost('limitByEndDate', 0);
+$insideDocuments = getIntFromRequest('insideDocuments', 0);
+$subprojectsIncluded = getIntFromRequest('includesubprojects', 0);
+$limitByStartDate = getIntFromRequest('limitByStartDate', 0);
+$limitByEndDate = getIntFromRequest('limitByEndDate', 0);
 $received_begin = getStringFromRequest('start_date', 0);
 $received_end = getStringFromRequest('end_date', 0);
-$allchecked = '';
-$onechecked = '';
+$search_type = getStringFromRequest('search_type', 'all');
 $insideDocumentsCheckbox = '';
 $attrsInputSearchAll = array('type' => 'radio', 'name' => 'search_type', 
'required' => 'required', 'value' => 'all', 'title' => _('All searched words 
are mandatory.'));
 $attrsInputSearchOne = array('type' => 'radio', 'name' => 'search_type', 
'required' => 'required', 'value' => 'one', 'title' => _('At least one word 
must be found.'));
 $date_format_js = _('yy-mm-dd');
 $date_format = _('Y-m-d');
 
-if (getStringFromPost('search_type') == 'one') {
+if ($search_type == 'one') {
        $attrsInputSearchOne['checked'] = 'checked';
        $isExact = false;
 } else {
@@ -181,8 +179,8 @@ if ($searchString) {
        $result = 
$docsHtmlSearchRenderer->searchQuery->getData($docsHtmlSearchRenderer->searchQuery->getRowsPerPage(),$docsHtmlSearchRenderer->searchQuery->getOffset());
        $nbDocs = count($result);
        $max = $docsHtmlSearchRenderer->searchQuery->getRowsTotalCount();
-       echo $HTML->paging_top($start, $paging, $max, $nbDocs, 
$redirect_url.'&view=search&textsearch='.$searchString);
+       echo $HTML->paging_top($start, $paging, $max, $nbDocs, 
$redirect_url.'&view=search&textsearch='.$searchString.'&insideDocuments='.$insideDocuments.'&search_type='.$search_type.'&includesubprojects='.$includesubprojects.'&limitByStartDate='.$limitByStartDate.'&limitByEndDate='.$limitByEndDate.'&start_date='.$received_begin.'&end_date='.$received_end);
        $docsHtmlSearchRenderer->writeBody(false);
-       echo $HTML->paging_bottom($start, $paging, $max, 
$redirect_url.'&view=search&textsearch='.$searchString);
+       echo $HTML->paging_bottom($start, $paging, $max, 
$redirect_url.'&view=search&textsearch='.$searchString.'&insideDocuments='.$insideDocuments.'&search_type='.$search_type.'&includesubprojects='.$includesubprojects.'&limitByStartDate='.$limitByStartDate.'&limitByEndDate='.$limitByEndDate.'&start_date='.$received_begin.'&end_date='.$received_end);
 }
 echo html_ac(html_ap() -2);

-----------------------------------------------------------------------

Summary of changes:
 src/common/docman/views/search.php | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
Fusionforge-commits@lists.fusionforge.org
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to