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 b8926c5b38c2d2a44101d00d2946feb3b2d3623a (commit)
from 620f70303bf948fa5d4e3c25442b855d50990480 (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=b8926c5b38c2d2a44101d00d2946feb3b2d3623a
commit b8926c5b38c2d2a44101d00d2946feb3b2d3623a
Author: Franck Villaume <[email protected]>
Date: Mon Nov 28 19:11:36 2016 +0100
fix is_deleted support in search
diff --git a/src/common/search/ArtifactSearchQuery.class.php
b/src/common/search/ArtifactSearchQuery.class.php
index 8269977..7b8f65c 100644
--- a/src/common/search/ArtifactSearchQuery.class.php
+++ b/src/common/search/ArtifactSearchQuery.class.php
@@ -5,6 +5,7 @@
* Copyright 1999-2001, VA Linux Systems, Inc
* Copyright 2004, Guillaume Smet/Open Wide
* Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2016, Franck Villaume - TrivialDev
*
* This file is part of FusionForge. FusionForge is free software;
* you can redistribute it and/or modify it under the terms of the
@@ -64,13 +65,13 @@ class ArtifactSearchQuery extends SearchQuery {
$words = $this->getFTIwords();
if (count($this->phrases)) {
- $qpa = db_construct_qpa(false, 'SELECT x.* FROM (SELECT
artifact.artifact_id, artifact.group_artifact_id, artifact.summary,
artifact.open_date, users.realname,
artifact.summary||$1||artifact.details||$1||coalesce(ff_string_agg(artifact_message.body),
$1) as full_string_agg, artifact_idx.vectors FROM artifact LEFT OUTER JOIN
artifact_message USING (artifact_id), users, artifact_idx WHERE users.user_id =
artifact.submitted_by AND artifact.group_artifact_id = $2 AND
artifact.artifact_id = artifact_idx.artifact_id AND vectors @@ to_tsquery($3)
GROUP BY artifact.artifact_id, artifact.group_artifact_id, artifact.summary,
artifact.open_date, users.realname, artifact.details, vectors) AS x WHERE ',
+ $qpa = db_construct_qpa(false, 'SELECT x.* FROM (SELECT
artifact.artifact_id, artifact.group_artifact_id, artifact.summary,
artifact.open_date, users.realname,
artifact.summary||$1||artifact.details||$1||coalesce(ff_string_agg(artifact_message.body),
$1) as full_string_agg, artifact_idx.vectors FROM artifact LEFT OUTER JOIN
artifact_message USING (artifact_id), users, artifact_idx WHERE
artifact.is_deleted = 0 AND users.user_id = artifact.submitted_by AND
artifact.group_artifact_id = $2 AND artifact.artifact_id =
artifact_idx.artifact_id AND vectors @@ to_tsquery($3) GROUP BY
artifact.artifact_id, artifact.group_artifact_id, artifact.summary,
artifact.open_date, users.realname, artifact.details, vectors) AS x WHERE ',
array
($this->field_separator, $this->artifactId, $words));
$qpa = $this->addMatchCondition($qpa,
'full_string_agg');
$qpa = db_construct_qpa($qpa, ' ORDER BY
ts_rank(vectors, to_tsquery($1)) DESC',
array($words));
} else {
- $qpa = db_construct_qpa(false, 'SELECT
artifact.artifact_id, artifact.group_artifact_id, artifact.summary,
artifact.open_date, users.realname, artifact_idx.vectors FROM artifact, users,
artifact_idx WHERE users.user_id = artifact.submitted_by AND
artifact.group_artifact_id = $1 AND artifact.artifact_id =
artifact_idx.artifact_id AND vectors @@ to_tsquery($2) ORDER BY
ts_rank(vectors, to_tsquery($2)) DESC',
+ $qpa = db_construct_qpa(false, 'SELECT
artifact.artifact_id, artifact.group_artifact_id, artifact.summary,
artifact.open_date, users.realname, artifact_idx.vectors FROM artifact, users,
artifact_idx WHERE artifact.is_deleted = 0 AND users.user_id =
artifact.submitted_by AND artifact.group_artifact_id = $1 AND
artifact.artifact_id = artifact_idx.artifact_id AND vectors @@ to_tsquery($2)
ORDER BY ts_rank(vectors, to_tsquery($2)) DESC',
array
($this->artifactId, $words));
}
@@ -78,9 +79,7 @@ class ArtifactSearchQuery extends SearchQuery {
}
function isRowVisible($row) {
- return forge_check_perm('tracker',
-
$row['group_artifact_id'],
- 'read');
+ return forge_check_perm('tracker', $row['group_artifact_id'],
'read');
}
}
-----------------------------------------------------------------------
Summary of changes:
src/common/search/ArtifactSearchQuery.class.php | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits