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 50760df7ba06336e4a0edb755a07524c71b32b99 (commit)
from 03b3c1bbecca35a63a5a494a39a154f873e73eee (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=50760df7ba06336e4a0edb755a07524c71b32b99
commit 50760df7ba06336e4a0edb755a07524c71b32b99
Author: Franck Villaume <[email protected]>
Date: Sun Jun 19 13:48:28 2016 +0200
Group: support createtimestamp to ease import data
diff --git a/src/common/include/Group.class.php
b/src/common/include/Group.class.php
index 41d8855..6a2f3a6 100644
--- a/src/common/include/Group.class.php
+++ b/src/common/include/Group.class.php
@@ -343,10 +343,11 @@ class Group extends FFError {
* @param bool $is_public
* @param bool $send_mail Whether to send an
email or not
* @param int $built_from_template The id of the project
this new project is based on
+ * @param int $createtimestamp The Time Stamp of
creation to ease import.
* @return bool success or not
*/
function create(&$user, $group_name, $unix_name, $description,
$purpose, $unix_box = 'shell1',
- $scm_box = 'cvs1', $is_public = true, $send_mail =
true, $built_from_template = 0) {
+ $scm_box = 'cvs1', $is_public = true, $send_mail =
true, $built_from_template = 0, $createtimestamp = null) {
// $user is ignored - anyone can create pending group
global $SYS;
@@ -385,7 +386,7 @@ class Group extends FFError {
}
db_begin();
-
+ $createtimestamp = (($createtimestamp) ?
$createtimestamp : time());
$res = db_query_params('
INSERT INTO groups(
group_name,
@@ -411,7 +412,7 @@ class Group extends FFError {
$unix_box,
$scm_box,
htmlspecialchars($purpose),
- time(),
+ $createtimestamp,
md5(util_randbytes()),
$built_from_template));
if (!$res || db_affected_rows($res) < 1) {
@@ -442,6 +443,7 @@ class Group extends FFError {
$hook_params['group_id'] = $this->getID();
$hook_params['group_name'] = $group_name;
$hook_params['unix_group_name'] = $unix_name;
+ $hook_params['createtimestamp'] = $createtimestamp;
plugin_hook("group_create", $hook_params);
db_commit();
-----------------------------------------------------------------------
Summary of changes:
src/common/include/Group.class.php | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits