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 f0daea5ad10476a3a4426b8d7cda0fbe2e7c0a29 (commit)
via 016c1a0bb43ec5cf78abb70c3308c547c28f959f (commit)
via 9cf0ce86c08b910311c628b20262072450530e66 (commit)
via 9cdf93600b886201ac974086a10e9491e9b203d1 (commit)
via 002b1464d86a819bbf284b39a11538ae307f3493 (commit)
from 3d31f03c43da55f029bcdaa7cd3f3bb7d62ffb47 (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=f0daea5ad10476a3a4426b8d7cda0fbe2e7c0a29
commit f0daea5ad10476a3a4426b8d7cda0fbe2e7c0a29
Merge: 3d31f03 016c1a0
Author: Franck Villaume <[email protected]>
Date: Mon Aug 16 15:38:55 2021 +0200
Merge remote-tracking branch 'rhabacker/master-956'
Implement #956: improve email notificationn for file shares
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=016c1a0bb43ec5cf78abb70c3308c547c28f959f
commit 016c1a0bb43ec5cf78abb70c3308c547c28f959f
Author: Aaron Nottbeck <[email protected]>
Date: Fri Jun 4 11:10:37 2021 +0200
[#956] sendNotice for frs release reactivated
Sends notice for new releases if status is active and on update
if send notice is checked and status is active.
diff --git a/src/common/frs/FRSRelease.class.php
b/src/common/frs/FRSRelease.class.php
index e419030..4ac5b44 100644
--- a/src/common/frs/FRSRelease.class.php
+++ b/src/common/frs/FRSRelease.class.php
@@ -88,6 +88,7 @@ class FRSRelease extends FFObject {
var $FRSPackage;
var $release_files;
var $files_count = null;
+ var $send_notice = true;
/**
* @param object $FRSPackage The FRSPackage object
to which this release is associated.
@@ -200,6 +201,9 @@ class FRSRelease extends FFObject {
@mkdir($newdirlocation);
}
db_commit();
+ if ($status_id == 1) {
+ $this->sendNotice();
+ }
return true;
}
}
@@ -302,6 +306,22 @@ class FRSRelease extends FFObject {
function getReleaseDate() {
return $this->data_array['release_date'];
}
+
+ /**
+ * setSendNotice - sets if the notice email should be send
+ * @param $value true/false
+ */
+ function setSendNotice($value) {
+ $this->send_notice = $value;
+ }
+
+ /**
+ * getSendNotice - get if the notice email should be send
+ * @return true/false
+ */
+ function getSendNotice() {
+ return $this->send_notice;
+ }
/**
* sendNotice - the logic to send an email notice for a release.
@@ -310,6 +330,7 @@ class FRSRelease extends FFObject {
*/
function sendNotice() {
$arr =& $this->FRSPackage->getMonitorIDs();
+ $project_adresses =
$this->FRSPackage->Group->getFRSEmailAddress();
$subject = sprintf(_('[%1$s Release] %2$s'),
$this->FRSPackage->Group->getUnixName(),
@@ -337,8 +358,8 @@ class FRSRelease extends FFObject {
forge_get_config('forge_name'))
. "\n\n"
.
util_make_url('/frs/monitor.php?filemodule_id='.$this->FRSPackage->getID()."&group_id=".$this->FRSPackage->Group->getID()."&stop=1");
- if (count($arr)) {
- util_handle_message(array_unique($arr), $subject,
$text);
+ if (count($arr) || strlen($project_adresses) > 0) {
+ util_handle_message(array_unique($arr), $subject,
$text, $project_adresses);
}
}
@@ -510,6 +531,9 @@ class FRSRelease extends FFObject {
if ($this->hasFiles()) {
$this->FRSPackage->createReleaseFilesAsZip($this->getID());
}
+ if ($this->getSendNotice()) {
+ $this->sendNotice();
+ }
return true;
}
diff --git a/src/common/frs/actions/addrelease.php
b/src/common/frs/actions/addrelease.php
index 894051b..7ae366d 100644
--- a/src/common/frs/actions/addrelease.php
+++ b/src/common/frs/actions/addrelease.php
@@ -54,6 +54,7 @@ $userfile = getUploadedFile('userfile');
$userfile_name = $userfile['name'];
$type_id = getIntFromRequest('type_id');
$release_name = getStringFromRequest('release_name');
+$status_id = getIntFromRequest('status_id');
$uploaded_notes = getUploadedFile('uploaded_notes');
$uploaded_changes = getUploadedFile('uploaded_changes');
$release_notes = getStringFromRequest('release_notes');
@@ -103,7 +104,7 @@ if (strlen($release_name) >= 3) {
if ($exec_changes) {
$frsr = new FRSRelease($frsp);
- if ($frsr->create($release_name, $notes, $changes,
$preformatted, $release_date)) {
+ if ($frsr->create($release_name, $notes, $changes,
$preformatted, $release_date, $status_id)) {
$feedback = _('Release successfully created');
if (strlen($userfile_name) || strlen($ftp_filename) ||
strlen($manual_filename) || $docman_fileid) {
$ret = frs_add_file_from_form($frsr, $type_id,
$processor_id, $release_date, $userfile, $ftp_filename, $manual_filename,
$docman_fileid);
diff --git a/src/common/frs/actions/editrelease.php
b/src/common/frs/actions/editrelease.php
index 1004a04..cecab34 100644
--- a/src/common/frs/actions/editrelease.php
+++ b/src/common/frs/actions/editrelease.php
@@ -42,6 +42,7 @@ $release_id = getIntFromRequest('release_id');
$release_date = getStringFromRequest('release_date');
$release_name = getStringFromRequest('release_name');
$status_id = getIntFromRequest('status_id');
+$send_notice = getIntFromRequest('send_notice');
$uploaded_notes = getUploadedFile('uploaded_notes');
$uploaded_changes = getUploadedFile('uploaded_changes');
$release_notes = getStringFromRequest('release_notes');
@@ -103,6 +104,7 @@ if ($uploaded_changes['tmp_name']) {
// If we haven't encountered any problems so far then save the changes
if ($exec_changes) {
+ $frsr->setSendNotice($send_notice == 1 && $frsr->getStatus() == 3 &&
$status_id == 1);
$release_date = strtotime($release_date);
if (!$frsr->update($status_id, $release_name, $notes, $changes,
$preformatted, $release_date)) {
$error_msg = $frsr->getErrorMessage();
diff --git a/src/common/frs/views/editrelease.php
b/src/common/frs/views/editrelease.php
index 3efa28d..99a374d 100644
--- a/src/common/frs/views/editrelease.php
+++ b/src/common/frs/views/editrelease.php
@@ -87,7 +87,7 @@ if (forge_check_perm('frs', $package_id, 'admin')) {
echo $HTML->multiTableRow(array(), $cells);
$cells = array();
$cells[][] = '<strong>'._('Status')._(':').'</strong>';
- $cells[][] = frs_show_status_popup('status_id',$frsr->getStatus());
+ $cells[][] =
frs_show_status_popup('status_id',$frsr->getStatus()).($frsr->getStatus() ==
3?' <input type="checkbox" name="send_notice" value="1"
checked="checked"> '. _('Send release notice email if set to active'):'');
echo $HTML->multiTableRow(array(), $cells);
$cells = array();
$cells[] = array(_('Edit the Release Notes or Change Log for this
release of this package. These changes will apply to all files attached to this
release.').'<br/>'.
diff --git a/src/common/frs/views/qrs.php b/src/common/frs/views/qrs.php
index 033a433..5ff23f4 100644
--- a/src/common/frs/views/qrs.php
+++ b/src/common/frs/views/qrs.php
@@ -58,6 +58,10 @@ $cells[][] = html_e('strong', array(), _('Release
Date')._(':'));
$cells[][] = html_e('input', array('type' => 'text', 'name' => 'release_date',
'value' => date('Y-m-d H:i'), 'size' => 16, 'maxlength' => 16));
echo $HTML->multiTableRow(array(), $cells);
$cells = array();
+$cells[][] = html_e('strong', array(), _('Status')._(':'));
+$cells[][] = frs_show_status_popup('status_id',1)." " . _("NOTE: Release
notification will only be send if status is active.");
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
$cells[][] = html_e('strong', array(), _('File Name')._(':'));
$content = $HTML->information(sprintf(_('You can probably not upload files
larger than about %.2f MiB in size.'),
human_readable_bytes(util_get_maxuploadfilesize()))).
_('Upload a new file')._(': ').html_e('input', array('type' =>
'file', 'name' => 'userfile', 'size' => 30));
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=9cf0ce86c08b910311c628b20262072450530e66
commit 9cf0ce86c08b910311c628b20262072450530e66
Author: Ralf Habacker <[email protected]>
Date: Thu Jul 29 08:26:32 2021 +0200
[#956] Add missing new line after adding release notes in notification email
diff --git a/src/common/frs/FRSRelease.class.php
b/src/common/frs/FRSRelease.class.php
index 684b934..e419030 100644
--- a/src/common/frs/FRSRelease.class.php
+++ b/src/common/frs/FRSRelease.class.php
@@ -322,6 +322,7 @@ class FRSRelease extends FFObject {
. _('Release
Notes')._(':')
. "\n\n"
. $this->getNotes()
+ . "\n\n"
. _('Change Log')._(':')
. "\n\n"
. $this->getChanges()
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=9cdf93600b886201ac974086a10e9491e9b203d1
commit 9cdf93600b886201ac974086a10e9491e9b203d1
Author: Aaron Nottbeck <[email protected]>
Date: Fri Jun 4 08:00:45 2021 +0200
[#956] Fix wrong parameter in call to sendNotice() in FrsPackage::update()
Previously every package update was announced as new package in email
notifications.
diff --git a/src/common/frs/FRSPackage.class.php
b/src/common/frs/FRSPackage.class.php
index a02a732..b523529 100644
--- a/src/common/frs/FRSPackage.class.php
+++ b/src/common/frs/FRSPackage.class.php
@@ -468,7 +468,7 @@ class FRSPackage extends FFError {
}
db_commit();
$this->createReleaseFilesAsZip($this->getNewestReleaseID());
- $this->sendNotice();
+ $this->sendNotice(false);
return true;
}
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=002b1464d86a819bbf284b39a11538ae307f3493
commit 002b1464d86a819bbf284b39a11538ae307f3493
Author: Aaron Nottbeck <[email protected]>
Date: Fri Jun 4 07:57:43 2021 +0200
[#956] Fix bug that release date is not visible at quick release file page
diff --git a/src/common/frs/views/qrs.php b/src/common/frs/views/qrs.php
index 668484e..033a433 100644
--- a/src/common/frs/views/qrs.php
+++ b/src/common/frs/views/qrs.php
@@ -56,6 +56,7 @@ echo $HTML->multiTableRow(array(), $cells);
$cells = array();
$cells[][] = html_e('strong', array(), _('Release Date')._(':'));
$cells[][] = html_e('input', array('type' => 'text', 'name' => 'release_date',
'value' => date('Y-m-d H:i'), 'size' => 16, 'maxlength' => 16));
+echo $HTML->multiTableRow(array(), $cells);
$cells = array();
$cells[][] = html_e('strong', array(), _('File Name')._(':'));
$content = $HTML->information(sprintf(_('You can probably not upload files
larger than about %.2f MiB in size.'),
human_readable_bytes(util_get_maxuploadfilesize()))).
-----------------------------------------------------------------------
Summary of changes:
src/common/frs/FRSPackage.class.php | 2 +-
src/common/frs/FRSRelease.class.php | 29 +++++++++++++++++++++++++++--
src/common/frs/actions/addrelease.php | 3 ++-
src/common/frs/actions/editrelease.php | 2 ++
src/common/frs/views/editrelease.php | 2 +-
src/common/frs/views/qrs.php | 5 +++++
6 files changed, 38 insertions(+), 5 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits