[Fusionforge-commits] r13680 - trunk/src/plugins/projects_hierarchy/www
Franck VILLAUME
nerville at fusionforge.org
Tue Jul 5 09:30:48 CEST 2011
Author: nerville
Date: 2011-07-05 09:30:48 +0200 (Tue, 05 Jul 2011)
New Revision: 13680
Removed:
trunk/src/plugins/projects_hierarchy/www/add_son.php
trunk/src/plugins/projects_hierarchy/www/del_father.php
trunk/src/plugins/projects_hierarchy/www/del_son.php
trunk/src/plugins/projects_hierarchy/www/wait_son.php
Log:
remove dead code
Deleted: trunk/src/plugins/projects_hierarchy/www/add_son.php
===================================================================
--- trunk/src/plugins/projects_hierarchy/www/add_son.php 2011-07-04 16:33:26 UTC (rev 13679)
+++ trunk/src/plugins/projects_hierarchy/www/add_son.php 2011-07-05 07:30:48 UTC (rev 13680)
@@ -1,80 +0,0 @@
-<?php
-/**
- * Copyright 2004 (c) GForge LLC
- * Copyright 2006 (c) Fabien Regnier - Sogeti
- * Copyright 2010, Franck Villaume - Capgemini
- * Copyright 2011, Franck Villaume - TrivialDev
- * 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';
-
-session_require_perm('project_admin', $group_id);
-
-$group_id = getIntFromRequest('group_id');
-$sub_project_id = getIntFromRequest('sub_project_id');
-$com = getStringFromRequest('com');
-
-//add link between two projects
-$res = db_query_params('SELECT project_id, sub_project_id, link_type FROM plugin_projects_hierarchy
- WHERE project_id = $1 AND sub_project_id = $2 AND link_type = $3',
- array($group_id,
- $sub_project_id,
- 'shar'));
-
-if (!$res) {
- $error_msg = _('Unable to retrieve data from DB');
- session_redirect('/project/admin/index.php?group_id='.$group_id.'&error_msg='.urlencode($error_msg));
-}
-
-if (db_numrows($res) == 0) {
- db_begin();
- db_query_params ('INSERT INTO plugin_projects_hierarchy (project_id ,sub_project_id,link_type,com) VALUES ($1 , $2, $3, $4)',
- array ($group_id,
- $sub_project_id,
- 'shar',
- $com)) or die(db_error());
- db_commit();
-
- $project = group_get_object($group_id);
- $subproject = group_get_object($sub_project_id);
-
- $message = sprintf(_('New Parent Relation Submitted
-
- Parent Project Full Name: %1$s
- Child Project Full Name: %2$s
- Need validation.
- Please visit the following URL %3$s'),
- $project->getPublicName(),
- $subproject->getPublicName(),
- util_make_url ('project/admin/index.php?group_id='.$sub_project_id));
-
- $admins = $subproject->getAdmins();
- foreach ($admins as $u) {
- util_send_message($u->getEmail(),
- sprintf(_('New Parent %1$s Relation Submitted'),
- $project->getPublicName()),
- $message);
- }
- $feedback = _('Hierarchy link saved');
- session_redirect('/project/admin/index.php?group_id='.$group_id.'&feedback='.urlencode($feedback));
-} else {
- $warning_msg = _('Hierarchy link already exists');
- session_redirect('/project/admin/index.php?group_id='.$group_id.'&warning_msg='.urlencode($warning_msg));
-}
-?>
Deleted: trunk/src/plugins/projects_hierarchy/www/del_father.php
===================================================================
--- trunk/src/plugins/projects_hierarchy/www/del_father.php 2011-07-04 16:33:26 UTC (rev 13679)
+++ trunk/src/plugins/projects_hierarchy/www/del_father.php 2011-07-05 07:30:48 UTC (rev 13680)
@@ -1,48 +0,0 @@
-<?php
-/**
- * Role Editing Page
- *
- * Copyright 2004 (c) GForge LLC
- *
- * @author Fabien Regnier fabien.regnier at sogeti.com
- * @date 2006-10-10
- *
- * 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 License, 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 this program; 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';
-
-$group_id = getIntFromRequest('group_id');
-$sub_group_id = getIntFromRequest('sub_group_id');
-
-session_require_perm ('project_admin', $group_id) ;
-
-//plugin webcal
-$params[0] = $sub_group_id;
-$params[1] = $group_id;
-plugin_hook('del_cal_link_father',$params);
-
-//del link between two projects
-db_begin();
-db_query_params ('DELETE FROM plugin_projects_hierarchy WHERE project_id = $1 AND sub_project_id = $2',
- array ($group_id,
- $sub_group_id)) or die(db_error());
-db_commit();
-
-header("Location: ".util_make_url ('/project/admin/index.php?group_id='.$sub_group_id));
-?>
Deleted: trunk/src/plugins/projects_hierarchy/www/del_son.php
===================================================================
--- trunk/src/plugins/projects_hierarchy/www/del_son.php 2011-07-04 16:33:26 UTC (rev 13679)
+++ trunk/src/plugins/projects_hierarchy/www/del_son.php 2011-07-05 07:30:48 UTC (rev 13680)
@@ -1,47 +0,0 @@
-<?php
-/**
- * Projects Hierarchy Plugin
- *
- * Copyright 2006, Fabien Regnier fabien.regnier at sogeti.com
- * Copyright 2011, Franck Villaume - TrivialDev
- * 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';
-
-$group_id = getIntFromRequest('group_id');
-$sub_group_id = getIntFromRequest('sub_group_id');
-
-session_require_perm('project_admin', $group_id);
-
-//plugin webcal
-$params[0] = $sub_group_id;
-$params[1] = $group_id ;
-
-plugin_hook('del_cal_link_father',$params);
-
-//del link between two projects
-db_begin();
-db_query_params ('DELETE FROM plugin_projects_hierarchy WHERE project_id = $1 AND sub_project_id = $2',
- array ($group_id,
- $sub_group_id)) or die(db_error());
-db_commit();
-
-header("Location: ".util_make_url ('/project/admin/index.php?group_id='.$group_id));
-?>
Deleted: trunk/src/plugins/projects_hierarchy/www/wait_son.php
===================================================================
--- trunk/src/plugins/projects_hierarchy/www/wait_son.php 2011-07-04 16:33:26 UTC (rev 13679)
+++ trunk/src/plugins/projects_hierarchy/www/wait_son.php 2011-07-05 07:30:48 UTC (rev 13680)
@@ -1,68 +0,0 @@
-<?php
-/**
- * Copyright 2004 (c) GForge LLC
- * Copyright 2006 (c) Fabien Regnier - Sogeti
- * Copyright 2010 (c) Franck Villaume - Capgemini
- *
- * 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 License, 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 this program; 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';
-
-$group_id = getIntFromRequest('group_id');
-$sub_group_id = getIntFromRequest('sub_group_id');
-
-session_require_perm('project_admin', $group_id);
-//update the link when the son allow the father
-db_begin();
-db_query_params('UPDATE plugin_projects_hierarchy SET activated = true WHERE project_id = $1 AND sub_project_id = $2',
- array($group_id, $sub_group_id)
- ) or die(db_error());
-db_commit();
-
-$project = group_get_object($group_id);
-$subproject = group_get_object($sub_group_id);
-
-//plugin webcal
-$params[0] = $sub_group_id;
-$params[1] = $group_id;
-
-plugin_hook('add_cal_link_father',$params);
-
-// send mail to admin of the parent project for share knowledge
-$message = sprintf(_('New Parent Relation Validated
-
-Parent Project Full Name: %1$s
-Child Project Full Name: %2$s'),
- $project->getPublicName(),
- $subproject->getPublicName());
-
-$admins = $project->getAdmins();
-if (count($admins) < 1) {
- $project->setError(_("There is no administrator to send the mail."));
-}
-
-foreach ($admins as $u) {
- util_send_message($u->getEmail(),
- sprintf(_('New Parent %1$s Relation Validated'),
- $project->getPublicName()),
- $message);
-}
-
-header("Location: ".util_make_url ('/project/admin/index.php?group_id='.$sub_group_id));
-?>
More information about the Fusionforge-commits
mailing list