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, 6.0 has been updated
via 7a8e533d7b1c31392e12178866513d86967bccb7 (commit)
from f4de37c176b6a76a5db62b1fea75a1a93aeabb76 (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=7a8e533d7b1c31392e12178866513d86967bccb7
commit 7a8e533d7b1c31392e12178866513d86967bccb7
Author: Sylvain Beucler <[email protected]>
Date: Fri Dec 4 11:06:14 2015 +0100
news: pending site news e-mail reminder: properly filter out private
projects
diff --git a/src/CHANGES b/src/CHANGES
index 2910503..e63fe02 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -7,6 +7,7 @@ FusionForge 6.0.4:
* FRS: fix shownotes.php link. Use new url form. view=shownotes (TrivialDev)
* FRS: frs latest zip migration script hardening (TrivialDev)
* MTA-Exim4: restart exim4 on install
+* News: pending site news e-mail reminder: properly filter out private
projects (Inria)
* Plugin SCM: fix another race condition when creating project with SCM
selected (Inria)
* Plugin SCM Git: improve user matching when computing stats, support git
.mailmap (Inria)
* Plugin scmhook: fix non-editable mailing list name in some configurations
(Inria)
diff --git a/src/cronjobs/db/get_news_notapproved.php
b/src/cronjobs/db/get_news_notapproved.php
index efdf039..e7aaca1 100755
--- a/src/cronjobs/db/get_news_notapproved.php
+++ b/src/cronjobs/db/get_news_notapproved.php
@@ -44,7 +44,7 @@ if ($debug) {
}
$old_date = time()-60*60*24*30;
-$res = db_query_params("SELECT group_name,summary,details
+$res = db_query_params("SELECT group_name,summary,details,g.group_id
FROM news_bytes n, groups g
WHERE is_approved = 0
AND n.group_id=g.group_id
@@ -59,13 +59,11 @@ while ($arr = db_fetch_array($res)) {
$thereisnews = false;
$emailformatted = '';
+$ra = RoleAnonymous::getInstance();
foreach ($results_array as $newsnotapprob) {
- list($group_name, $summary, $details) = $newsnotapprob;
+ list($group_name, $summary, $details,$group_id) = $newsnotapprob;
- $res = db_query_params("SELECT COUNT(*) FROM pfo_role_setting prs,
groups g
- WHERE prs.role_id=1 AND prs.section_name = 'project_read' AND
prs.perm_val = 1
- AND prs.ref_id = g.group_id AND g.unix_group_name =
$1", array($group_name));
- if (db_numrows($res) >= 1) { # $is_public == true
+ if ($ra->hasPermission('project_read', $group_id)) {
$thereisnews = true;
$title = "$group_name: $summary\n";
$emailformatted .= wordwrap($title, 78);
-----------------------------------------------------------------------
Summary of changes:
src/CHANGES | 1 +
src/cronjobs/db/get_news_notapproved.php | 10 ++++------
2 files changed, 5 insertions(+), 6 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits