[Fusionforge-commits] FusionForge branch Branch_5_3 updated. 1508f3b14b5813f724e4a55df58c37ca587e550e
Sylvain Beucler
beuc-inria at fusionforge.org
Tue Jul 1 11:30:07 CEST 2014
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, Branch_5_3 has been updated
via 1508f3b14b5813f724e4a55df58c37ca587e550e (commit)
from 13965ea907aa09a1c7f9861fb4400996f8457e52 (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 -----------------------------------------------------------------
commit 1508f3b14b5813f724e4a55df58c37ca587e550e
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date: Tue Jul 1 11:22:50 2014 +0200
news: don't send requests for frontpage display for private projects
diff --git a/src/CHANGES b/src/CHANGES
index 053f791..09e6a89 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -5,6 +5,7 @@ Fusionforge-5.3.2:
* Admin: fix edit table themes, fix frs_processor sequence [#691] (TrivialDev)
* User SSH keys (ssh_create.php): fix harmless warning when user removes all her keys (Inria)
* Mailing lists: handle quotes and accents in description (Inria)
+* News: don't send requests for frontpage display for private projects (Inria)
* Plugin mediawiki: fix paths in import/export scripts (Inria)
* Plugin fckeditor: dropped in favor of ckeditor
diff --git a/src/cronjobs/get_news_notapproved.pl b/src/cronjobs/get_news_notapproved.pl
index 3f0f617..e2595e2 100755
--- a/src/cronjobs/get_news_notapproved.pl
+++ b/src/cronjobs/get_news_notapproved.pl
@@ -78,8 +78,17 @@ $sth->finish() or die "Problems with the query '$query' in DB";
$dbh->commit or die $dbh->errstr;
foreach my $newsnotapprob (@results_array) {
- $therearenews = 1;
my ($group_name, $summary, $details) = @{$newsnotapprob};
+
+ my $query = "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 = '$group_name'";
+ my $c = $dbh->prepare($query);
+ $c->execute();
+ my $is_public = (int($c->fetchrow()) > 0);
+ next if (!$is_public);
+
+ $therearenews = 1;
my $title = "$group_name: $summary\n";
$emailformatted .= autoformat $title, { all => 1, left=>0, right=>78 };
$emailformatted .= "----------------------------------------------------------------------\n";
-----------------------------------------------------------------------
Summary of changes:
src/CHANGES | 1 +
src/cronjobs/get_news_notapproved.pl | 11 ++++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list