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 c1bcb2cab16d527ff90fd84946dad83c49e3da53 (commit)
from b510cc07923a2d7817983622c5545e3c2211d91c (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=c1bcb2cab16d527ff90fd84946dad83c49e3da53
commit c1bcb2cab16d527ff90fd84946dad83c49e3da53
Author: Franck Villaume <[email protected]>
Date: Tue Oct 4 11:32:15 2016 +0200
remove obsolete type_id on group object
diff --git a/src/common/include/Group.class.php
b/src/common/include/Group.class.php
index d858827..ce6332d 100644
--- a/src/common/include/Group.class.php
+++ b/src/common/include/Group.class.php
@@ -83,13 +83,7 @@ function &group_get_object($group_id, $res = false) {
/*
check group type and set up object
*/
- if (db_result($res,0,'type_id') == 1) {
- //project
- $GROUP_OBJ["_".$group_id."_"] = new
Group($group_id, $res);
- } else {
- //invalid
- $GROUP_OBJ["_".$group_id."_"] = false;
- }
+ $GROUP_OBJ["_".$group_id."_"] = new Group($group_id,
$res);
}
}
return $GROUP_OBJ["_".$group_id."_"];
@@ -181,7 +175,7 @@ function
group_get_public_active_projects_asc($max_query_limit = -1, $offset = 0
$res_grp = db_query_params ('
SELECT group_id, group_name, unix_group_name,
short_description, register_time
FROM groups
- WHERE status = $1 AND type_id=1 AND is_template=0 AND
register_time > 0
+ WHERE status = $1 AND is_template=0 AND register_time > 0
AND group_id in (select ref_id FROM pfo_role_setting
WHERE section_name = $2 and perm_val = 1 and role_id IN ('.$role_id.'))
ORDER BY group_name ASC
',
@@ -218,7 +212,7 @@ function
group_get_readable_projects_using_tag_asc($selected_tag, $max_query_lim
FROM project_tags, groups
WHERE LOWER(name) = $1
AND project_tags.group_id = groups.group_id
- AND groups.status = $2 AND groups.type_id=1 AND
groups.is_template=0 AND groups.register_time > 0
+ AND groups.status = $2 AND groups.is_template=0 AND
groups.register_time > 0
AND groups.group_id in (select ref_id FROM pfo_role_setting
WHERE section_name = $3 and perm_val = 1 and role_id IN ('.$role_id.'))
ORDER BY groups.group_name ASC',
array(strtolower($selected_tag), 'A', 'project_read'),
@@ -458,13 +452,12 @@ class Group extends FFError {
* This function require site admin privilege.
*
* @param object $user User requesting operation (for
access control).
- * @param int $type_id Group type. Obsolete parameter
NOT USED.
* @param string $unix_box Machine on which group's home
directory located.
* @param string $http_domain Domain which serves group's WWW.
* @return bool status.
* @access public
*/
- function updateAdmin(&$user, $type_id, $unix_box, $http_domain) {
+ function updateAdmin(&$user, $unix_box, $http_domain) {
$perm =& $this->getPermission();
if (!$perm || !is_object($perm)) {
diff --git a/src/common/include/Stats.class.php
b/src/common/include/Stats.class.php
index e37f996..80d9d9e 100644
--- a/src/common/include/Stats.class.php
+++ b/src/common/include/Stats.class.php
@@ -52,7 +52,7 @@ class Stats extends FFError {
*/
function getMostActiveStats($type, $offset) {
if ($type == 'week') {
- return db_query_params('SELECT
groups.group_name,groups.unix_group_name,groups.group_id,project_weekly_metric.ranking,project_weekly_metric.percentile
FROM groups,project_weekly_metric WHERE
groups.group_id=project_weekly_metric.group_id AND groups.type_id=1 AND
groups.status = $1 AND groups.use_stats=1 ORDER BY ranking ASC',
+ return db_query_params('SELECT
groups.group_name,groups.unix_group_name,groups.group_id,project_weekly_metric.ranking,project_weekly_metric.percentile
FROM groups,project_weekly_metric WHERE
groups.group_id=project_weekly_metric.group_id AND groups.status = $1 AND
groups.use_stats=1 ORDER BY ranking ASC',
array('A'),
0,
$offset) ;
@@ -60,7 +60,6 @@ class Stats extends FFError {
return db_query_params('SELECT
g.group_name,g.unix_group_name,g.group_id,s.group_ranking as
ranking,s.group_metric as percentile
FROM groups g,stats_project_all_vw s
WHERE g.group_id=s.group_id
- AND g.type_id=1
AND g.status = $1
AND g.use_stats=1
AND s.group_ranking > 0
diff --git a/src/cronjobs/db/db_trove_maint.php
b/src/cronjobs/db/db_trove_maint.php
index 8c15c5d..0609088 100755
--- a/src/cronjobs/db/db_trove_maint.php
+++ b/src/cronjobs/db/db_trove_maint.php
@@ -44,7 +44,6 @@ db_query_params ('INSERT INTO trove_agg
FROM groups g
LEFT JOIN project_weekly_metric USING (group_id), trove_group_link tgl,
pfo_role_setting prs
WHERE tgl.group_id=g.group_id
-AND g.type_id = 1
AND g.status = $1
AND g.group_id = prs.ref_id
AND prs.section_name = $2
@@ -93,7 +92,6 @@ $res = db_query_params ('SELECT
trove_cat.trove_cat_id,trove_cat.parent,count(gr
groups.group_id=trove_group_link.group_id,
pfo_role_setting prs
WHERE (groups.status=$1 OR groups.status IS NULL)
- AND (groups.type_id=1 OR groups.status IS NULL)
AND groups.group_id = prs.ref_id
AND prs.section_name = $2
AND prs.role_id = 1
diff --git a/src/plugins/projects-hierarchy/include/hierarchy_utils.php
b/src/plugins/projects-hierarchy/include/hierarchy_utils.php
index 6df0f33..556ff86 100644
--- a/src/plugins/projects-hierarchy/include/hierarchy_utils.php
+++ b/src/plugins/projects-hierarchy/include/hierarchy_utils.php
@@ -25,7 +25,6 @@ function link_box($group_id, $name, $selected = 'xzxzxz') {
if (!$link) {
$link = db_query_params('SELECT
group_id,group_name,register_time FROM groups
WHERE status=$1
- AND type_id=1
AND group_id != $2
AND group_id NOT IN (SELECT
sub_project_id FROM plugin_projects_hierarchy WHERE project_id = $2 )
AND group_id NOT IN (SELECT project_id
FROM plugin_projects_hierarchy WHERE sub_project_id = $2 )
diff --git a/src/plugins/scmcvs/cronjobs/usergroup.php
b/src/plugins/scmcvs/cronjobs/usergroup.php
index 1ab6d96..ad2a250 100755
--- a/src/plugins/scmcvs/cronjobs/usergroup.php
+++ b/src/plugins/scmcvs/cronjobs/usergroup.php
@@ -206,9 +206,8 @@ $shadow_contents .= "\n#GFORGEEND\n";
$group_orig = file("/etc/group");
// Add the groups from the gforge database
-$group_res = db_query_params ('SELECT group_id, unix_group_name FROM groups
WHERE status=$1 AND type_id=$2',
- array('A',
- '1'));
+$group_res = db_query_params ('SELECT group_id, unix_group_name FROM groups
WHERE status=$1',
+ array('A'));
$err .= db_error();
$gforge_groups = array();
diff --git a/src/www/admin/groupedit.php b/src/www/admin/groupedit.php
index 76daa28..d93c36c 100644
--- a/src/www/admin/groupedit.php
+++ b/src/www/admin/groupedit.php
@@ -42,7 +42,7 @@ if (!$group || !is_object($group)) {
}
// This function performs very update
-function do_update(&$group, $is_template, $status, $group_type, $unix_box,
$http_domain, $scm_box='') {
+function do_update(&$group, $is_template, $status, $unix_box, $http_domain,
$scm_box='') {
global $feedback;
global $error_msg;
@@ -54,7 +54,7 @@ function do_update(&$group, $is_template, $status,
$group_type, $unix_box, $http
return false;
}
- if (!$group->updateAdmin(session_get_user(), $group_type, $unix_box,
$http_domain)) {
+ if (!$group->updateAdmin(session_get_user(), $unix_box, $http_domain)) {
$error_msg .= $group->getErrorMessage();
db_rollback();
return false;
@@ -85,7 +85,7 @@ if (getStringFromRequest('submit')) {
$form_domain = getStringFromRequest('form_domain');
$form_scm_box = getStringFromRequest('form_scm_box');
- do_update($group, $form_template, $form_status, 1, $form_box,
$form_domain, $form_scm_box);
+ do_update($group, $form_template, $form_status, $form_box,
$form_domain, $form_scm_box);
} elseif (getStringFromRequest('resend')) {
diff --git a/src/www/export/rss20_projects.php
b/src/www/export/rss20_projects.php
index 37f37b9..a047eed 100644
--- a/src/www/export/rss20_projects.php
+++ b/src/www/export/rss20_projects.php
@@ -32,7 +32,7 @@ print '<?xml version="1.0" encoding="UTF-8"?>
$limit = getIntFromRequest('limit', 10);
$res = db_query_params('SELECT
group_id,group_name,unix_group_name,homepage,short_description,register_time
FROM groups
- WHERE status = $1 AND type_id=1 AND is_template=0 AND
register_time > 0
+ WHERE status = $1 AND is_template=0 AND register_time > 0
ORDER BY register_time DESC',
array ('A'),
$limit);
diff --git a/src/www/export/rss_sfnewreleases.php
b/src/www/export/rss_sfnewreleases.php
index bda3b21..cc67102 100644
--- a/src/www/export/rss_sfnewreleases.php
+++ b/src/www/export/rss_sfnewreleases.php
@@ -1,14 +1,25 @@
<?php
/**
- *
- * SourceForge Exports: Export new releases info in RSS
- *
- *
- * SourceForge: Breaking Down the Barriers to Open Source Development
- * Copyright 1999-2001 (c) VA Linux Systems
- * http://sourceforge.net
- *
- */
+ * FusionForge Exports: Export new releases info in RSS
+ *
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * http://fusionforge.org
+
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
require_once '../env.inc.php';
require_once $gfcommon.'include/pre.php';
@@ -26,8 +37,6 @@ print '<?xml version="1.0" encoding="UTF-8"?>
$res=db_query_params ('SELECT
groups.group_id,
groups.group_name,
- groups.unix_group_name,
- groups.type_id,
news_bytes.forum_id,
news_bytes.summary,
news_bytes.post_date,
diff --git a/src/www/export/rss_sfnews.php b/src/www/export/rss_sfnews.php
index ccfae9f..23c4d92 100644
--- a/src/www/export/rss_sfnews.php
+++ b/src/www/export/rss_sfnews.php
@@ -1,12 +1,23 @@
<?php
/**
+ * FusionForge Exports: Export front page news in RSS
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * http://fusionforge.org
*
- * SourceForge Exports: Export front page news in RSS
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
*
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * SourceForge: Breaking Down the Barriers to Open Source Development
- * Copyright 1999-2001 (c) VA Linux Systems
- * http://sourceforge.net
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
diff --git a/src/www/include/features_boxes.php
b/src/www/include/features_boxes.php
index 29be6d0..d76e55b 100644
--- a/src/www/include/features_boxes.php
+++ b/src/www/include/features_boxes.php
@@ -167,7 +167,7 @@ function show_sitestats() {
function show_newest_projects() {
global $HTML;
- $res_newproj = db_query_params ('SELECT
group_id,unix_group_name,group_name,register_time FROM groups WHERE status=$1
AND type_id=1 AND register_time > 0 ORDER BY register_time DESC', array ('A'));
+ $res_newproj = db_query_params ('SELECT
group_id,unix_group_name,group_name,register_time FROM groups WHERE status=$1
AND register_time > 0 ORDER BY register_time DESC', array ('A'));
$return = '';
diff --git a/src/www/news/news_utils.php b/src/www/news/news_utils.php
index 4649031..734681f 100644
--- a/src/www/news/news_utils.php
+++ b/src/www/news/news_utils.php
@@ -94,7 +94,7 @@ function
news_show_latest($group_id=0,$limit=10,$show_summaries=true,$allow_subm
}
$result = db_query_params ('
SELECT groups.group_name, groups.unix_group_name, groups.group_id,
- groups.type_id, users.user_name, users.realname,
+ users.user_name, users.realname,
news_bytes.forum_id, news_bytes.summary, news_bytes.post_date,
news_bytes.details
FROM users,news_bytes,groups
diff --git a/src/www/soap/common/group.php b/src/www/soap/common/group.php
index 4156ba0..4713b59 100644
--- a/src/www/soap/common/group.php
+++ b/src/www/soap/common/group.php
@@ -417,7 +417,7 @@ function updateGroup($session_ser, $group_id, $is_public,
$is_template, $status,
$error_msg .= $group->getErrorMessage();
}
- if (!$group->updateAdmin(session_get_user(), $is_public, $group_type,
$unix_box, $http_domain)) {
+ if (!$group->updateAdmin(session_get_user(), $unix_box, $http_domain)) {
$error_msg .= $group->getErrorMessage();
}
diff --git a/src/www/softwaremap/full_list.php
b/src/www/softwaremap/full_list.php
index 21c8b03..0b9499f 100644
--- a/src/www/softwaremap/full_list.php
+++ b/src/www/softwaremap/full_list.php
@@ -84,7 +84,7 @@ if ($start < 0) {
$HTML->header(array('title'=>_('Project List'),'pagename'=>'softwaremap'));
$HTML->printSoftwareMapLinks();
-$nbProjects = FusionForge::getInstance()->getNumberOfProjects(array('status'
=> 'A', 'type_id' => 1, 'is_template' => 0), 'register_time > 0 AND group_id in
(select ref_id FROM pfo_role_setting WHERE section_name = \'project_read\' and
perm_val = 1 and role_id IN ('.$role_id.'))');
+$nbProjects = FusionForge::getInstance()->getNumberOfProjects(array('status'
=> 'A', 'is_template' => 0), 'register_time > 0 AND group_id in (select ref_id
FROM pfo_role_setting WHERE section_name = \'project_read\' and perm_val = 1
and role_id IN ('.$role_id.'))');
$projects = group_get_public_active_projects_asc($paging, $start);
diff --git a/src/www/softwaremap/tag_cloud.php
b/src/www/softwaremap/tag_cloud.php
index d65e50c..62f0f3a 100644
--- a/src/www/softwaremap/tag_cloud.php
+++ b/src/www/softwaremap/tag_cloud.php
@@ -90,7 +90,7 @@ if ($selected_tag) {
if ($start < 0) {
$start = 0;
}
- $nbProjects =
FusionForge::getInstance()->getNumberOfProjectsUsingTags(array('groups.status'
=> 'A', 'groups.type_id' => 1, 'groups.is_template' => 0, 'LOWER(name)' =>
strtolower($selected_tag)), 'register_time > 0 AND groups.group_id in (select
ref_id FROM pfo_role_setting WHERE section_name = \'project_read\' and perm_val
= 1 and role_id IN ('.$role_id.'))');
+ $nbProjects =
FusionForge::getInstance()->getNumberOfProjectsUsingTags(array('groups.status'
=> 'A', 'groups.is_template' => 0, 'LOWER(name)' => strtolower($selected_tag)),
'register_time > 0 AND groups.group_id in (select ref_id FROM pfo_role_setting
WHERE section_name = \'project_read\' and perm_val = 1 and role_id IN
('.$role_id.'))');
$projects = group_get_readable_projects_using_tag_asc($selected_tag,
$paging, $start);
$max = ($nbProjects > ($start + $paging)) ? ($start + $paging) :
$nbProjects;
-----------------------------------------------------------------------
Summary of changes:
src/common/include/Group.class.php | 15 +++--------
src/common/include/Stats.class.php | 3 +--
src/cronjobs/db/db_trove_maint.php | 2 --
.../projects-hierarchy/include/hierarchy_utils.php | 1 -
src/plugins/scmcvs/cronjobs/usergroup.php | 5 ++--
src/www/admin/groupedit.php | 6 ++---
src/www/export/rss20_projects.php | 2 +-
src/www/export/rss_sfnewreleases.php | 31 ++++++++++++++--------
src/www/export/rss_sfnews.php | 19 ++++++++++---
src/www/include/features_boxes.php | 2 +-
src/www/news/news_utils.php | 2 +-
src/www/soap/common/group.php | 2 +-
src/www/softwaremap/full_list.php | 2 +-
src/www/softwaremap/tag_cloud.php | 2 +-
14 files changed, 51 insertions(+), 43 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits