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 807e25b8bf9981086f999cc6db6e0511952ec5e7 (commit)
via a5c8c3c2653de2cd91443b7ee9639e765ffefcb0 (commit)
via 1bf2952570aa3d04792a3ea6fce1ed51b5effb24 (commit)
from 848df00f6c0a944f83a6cbce444d1021ca64ced4 (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=807e25b8bf9981086f999cc6db6e0511952ec5e7
commit 807e25b8bf9981086f999cc6db6e0511952ec5e7
Author: Roland Mas <[email protected]>
Date: Thu Dec 10 15:56:07 2015 +0100
Prevent errors when updating project history (if a field has a null old
value)
diff --git a/src/common/include/Group.class.php
b/src/common/include/Group.class.php
index 885515b..74a62eb 100644
--- a/src/common/include/Group.class.php
+++ b/src/common/include/Group.class.php
@@ -2315,6 +2315,10 @@ class Group extends Error {
* @access public
*/
function addHistory($field_name, $old_value) {
+ if ($old_value == NULL) {
+ $old_value = '';
+ }
+
return db_query_params ('INSERT INTO
group_history(group_id,field_name,old_value,mod_by,adddate)
VALUES ($1,$2,$3,$4,$5)',
array($this->getID(),
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=a5c8c3c2653de2cd91443b7ee9639e765ffefcb0
commit a5c8c3c2653de2cd91443b7ee9639e765ffefcb0
Author: Roland Mas <[email protected]>
Date: Tue Dec 8 16:14:31 2015 +0100
Added setHomepage() method
diff --git a/src/common/include/Group.class.php
b/src/common/include/Group.class.php
index 7a7e9d4..885515b 100644
--- a/src/common/include/Group.class.php
+++ b/src/common/include/Group.class.php
@@ -1576,6 +1576,35 @@ class Group extends Error {
}
return $this->data_array['homepage'];
}
+ /**
+ * setHomepage - the hostname of the scm box where this project is
located.
+ *
+ * @param string $homepage The name of the new HOMEPAGE
+ * @return bool
+ */
+ function setHomepage($homepage) {
+
+ if ($homepage == $this->data_array['homepage']) {
+ return true;
+ }
+ if ($homepage) {
+ db_begin();
+ $res = db_query_params('UPDATE groups SET homepage=$1
WHERE group_id=$2', array($homepage, $this->getID()));
+ if ($res) {
+ $this->addHistory('homepage',
$this->data_array['homepage']);
+ $this->data_array['homepage'] = $homepage;
+ db_commit();
+ return true;
+ } else {
+ db_rollback();
+ $this->setError(_("Could not insert homepage to
database"));
+ return false;
+ }
+ } else {
+ $this->setError(_("SCM Box cannot be empty"));
+ return false;
+ }
+ }
/**
* getTags - Tags of this project.
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=1bf2952570aa3d04792a3ea6fce1ed51b5effb24
commit 1bf2952570aa3d04792a3ea6fce1ed51b5effb24
Author: Roland Mas <[email protected]>
Date: Tue Dec 8 10:48:11 2015 +0100
Also refresh NSS for groups
diff --git a/src/bin/refresh_nss.php b/src/bin/refresh_nss.php
index 1bb9a9d..4c24133 100755
--- a/src/bin/refresh_nss.php
+++ b/src/bin/refresh_nss.php
@@ -41,4 +41,14 @@ while ($arr = db_fetch_array($res)) {
$SYS->sysCheckCreateUser($u->getID());
}
+$res = db_query_params ('SELECT group_id FROM groups WHERE status=$1 ORDER BY
group_id',
+ array ('A'));
+
+while ($arr = db_fetch_array($res)) {
+ $g = group_get_object($arr['group_id']);
+ echo "Refreshing NSS for group ".$g->getUnixName()."\n" ;
+
+ $SYS->sysCheckCreateGroup($g->getID());
+}
+
?>
-----------------------------------------------------------------------
Summary of changes:
src/bin/refresh_nss.php | 10 ++++++++++
src/common/include/Group.class.php | 33 +++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits