00001 <?php
00002 # This file is part of the Savane project
00003 # <http://gna.org/projects/savane/>
00004 #
00005 # $Id: postadd_comment.php 4567 2005-06-30 17:19:37Z toddy $
00006 #
00007 # Copyright 1999-2000 (c) The SourceForge Crew
00008 #
00009 # Copyright 2003-2004 (c) Mathieu Roy <yeupou--at--gnu.org>
00010 #
00011 # The Savane project is free software; you can redistribute it and/or
00012 # modify it under the terms of the GNU General Public License
00013 # as published by the Free Software Foundation; either version 2
00014 # of the License, or (at your option) any later version.
00015 #
00016 # The Savane project is distributed in the hope that it will be useful,
00017 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00019 # GNU General Public License for more details.
00020 #
00021 # You should have received a copy of the GNU General Public License
00022 # along with the Savane project; if not, write to the Free Software
00023 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024
00025
00026 $changes = array();
00027 $changed = false;
00028
00029 # Add a new comment if there is one
00030 if ($details != '')
00031 {
00032
00033 # For none project members force the comment type to None (100)
00034 trackers_data_add_history ('details',htmlspecialchars($details),'',$item_id,100);
00035 $changes['details']['add'] = stripslashes($details);
00036 $changes['details']['type'] = 'None';
00037 $changed = true;
00038
00039 ' Comment added to item ';
00040
00041 }
00042
00043 # Add a new cc if any
00044 if ($add_cc) {
00045 $changed |= trackers_add_cc($item_id,$group_id,$add_cc,$cc_comment,$changes);
00046 }
00047
00048 # Attach new file if there is one
00049 if ($add_file && $input_file)
00050 {
00051 $changed |= trackers_attach_file($item_id,$group_id,$input_file,
00052 $input_file_name,$input_file_type,
00053 $input_file_size,$file_description,
00054 $changes);
00055 }
00056
00057 if (!$changed)
00058 {
00059 fb(_('Nothing Done'));
00060 }
00061
00062 ?>