Skip to content
Newer
Older
100644 125 lines (109 sloc) 4.17 KB
a2a5953 removed CR
Kenzaburo Ito authored Jan 22, 2002
1 <?php
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored Feb 14, 2009
2 # MantisBT - a php based bugtracking system
2669909 @giallu Merge back to HEAD the changes between tags:
giallu authored Oct 24, 2007
3
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored Feb 14, 2009
4 # MantisBT is free software: you can redistribute it and/or modify
2669909 @giallu Merge back to HEAD the changes between tags:
giallu authored Oct 24, 2007
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 2 of the License, or
7 # (at your option) any later version.
8 #
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored Feb 14, 2009
9 # MantisBT is distributed in the hope that it will be useful,
2669909 @giallu Merge back to HEAD the changes between tags:
giallu authored Oct 24, 2007
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored Feb 14, 2009
15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
a03af20 new header, old comment was a cut-and-paste-o
Julian Fitzell authored Aug 26, 2002
16
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ )…
grangeway authored Sep 25, 2008
17 /**
18 * CALLERS
19 * This page is submitted to by the following pages:
20 * - bugnote_inc.php
21 *
22 * EXPECTED BEHAVIOUR
23 * Allow the user to modify the text of a bugnote, then submit to
24 * bugnote_update.php with the new text
25 *
26 * RESTRICTIONS & PERMISSIONS
27 * - none beyond API restrictions
28 *
29 * @package MantisBT
30 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
c757c81 @dregad Update copyright year to 2012
dregad authored Jan 1, 2012
31 * @copyright Copyright (C) 2002 - 2012 MantisBT Team - mantisbt-dev@lists.sourceforge.net
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ )…
grangeway authored Sep 25, 2008
32 * @link http://www.mantisbt.org
33 */
34 /**
4d63b48 @siebrand Mantis -> MantisBT in file headers, comments, and elsewhere.
siebrand authored Feb 14, 2009
35 * MantisBT Core API's
526bbaa @grangeway Comment updates for phpdoc ( http://www.mantisforge.org/dev/phpdoc/ )…
grangeway authored Sep 25, 2008
36 */
1ac5f0b More require_once statements added. Note that these new statements en…
Jeroen Latour authored Jan 24, 2003
37 require_once( 'core.php' );
638dcd0 Fixed inconsistencies in line-endings
Jeroen Latour authored Feb 12, 2005
38
c36df5b @grangeway following giallu's change to use set_include_path to set first requir…
grangeway authored May 26, 2009
39 require_once( 'bug_api.php' );
40 require_once( 'bugnote_api.php' );
41 require_once( 'string_api.php' );
42 require_once( 'current_user_api.php' );
c15dc49 @jreese Fix #11293: Obey project overrides for configs
jreese authored Dec 31, 2009
43
5b92ff5 cleanup all the bugnote pages (except bugnote_inc.php) and the bugnot…
Julian Fitzell authored Dec 30, 2002
44 $f_bugnote_id = gpc_get_int( 'bugnote_id' );
41f3745 @thraxisp Additional fixes for 0005432: Viewing a bug should change the "curren…
thraxisp authored Jul 25, 2005
45 $t_bug_id = bugnote_get_field( $f_bugnote_id, 'bug_id' );
46
47 $t_bug = bug_get( $t_bug_id, true );
48 if( $t_bug->project_id != helper_get_current_project() ) {
49 # in case the current project is not the same project of the bug we are viewing...
50 # ... override the current project. This to avoid problems with categories and handlers lists etc.
51 $g_project_override = $t_bug->project_id;
52 }
d6843bb Remove f_ prefix from POST and GET field names. The variables should …
Julian Fitzell authored Dec 29, 2002
53
143d4db * bugnote_delete.php bugnote_edit_page.php bugnote_update.phpview_all…
int2str authored Feb 26, 2003
54 # Check if the current user is allowed to edit the bugnote
ee2fe00 Tweak a variable name and use auth_get_current_user_id() instead of c…
Julian Fitzell authored Feb 26, 2003
55 $t_user_id = auth_get_current_user_id();
56 $t_reporter_id = bugnote_get_field( $f_bugnote_id, 'reporter_id' );
143d4db * bugnote_delete.php bugnote_edit_page.php bugnote_update.phpview_all…
int2str authored Feb 26, 2003
57
638dcd0 Fixed inconsistencies in line-endings
Jeroen Latour authored Feb 12, 2005
58 if ( ( $t_user_id != $t_reporter_id ) ||
c233ecb * bugnote_delete.php bugnote_edit_page.php bugnote_update.php
int2str authored Feb 26, 2003
59 ( OFF == config_get( 'bugnote_allow_user_edit_delete' ) ) ) {
143d4db * bugnote_delete.php bugnote_edit_page.php bugnote_update.phpview_all…
int2str authored Feb 26, 2003
60 access_ensure_bugnote_level( config_get( 'update_bugnote_threshold' ), $f_bugnote_id );
61 }
4460989 Fixed bugnote update to check for proper access.
Kenzaburo Ito authored Apr 2, 2002
62
3054556 @vboctor Some fixes for comments.
vboctor authored May 17, 2004
63 # Check if the bug is readonly
9fdced8 @vboctor Enh #3152: Adding notes and documents to resolved bugs.
vboctor authored May 17, 2004
64 if ( bug_is_readonly( $t_bug_id ) ) {
65 error_parameters( $t_bug_id );
66 trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR );
5b92ff5 cleanup all the bugnote pages (except bugnote_inc.php) and the bugnot…
Julian Fitzell authored Dec 30, 2002
67 }
23e6ae4 @vboctor - Removed hard-coded uses of RESOLVED status to mark a defects as rea…
vboctor authored Jan 2, 2003
68
615dfef This commit attempts to clean up the string output escaping a bit.
Julian Fitzell authored Feb 10, 2003
69 $t_bugnote_text = string_textarea( bugnote_get_text( $f_bugnote_id ) );
f02da95 Add g_time_tracking_view_threshold and g_time_tracking_edit_threshold…
davidnewcomb authored Dec 29, 2006
70
71 # No need to gather the extra information if not used
72 if ( config_get('time_tracking_enabled') &&
9222369 time_tracking: Change access_has_global_level to access_has_bug_level
davidnewcomb authored Jan 4, 2007
73 access_has_bug_level( config_get( 'time_tracking_edit_threshold' ), $t_bug_id ) ) {
f02da95 Add g_time_tracking_view_threshold and g_time_tracking_edit_threshold…
davidnewcomb authored Dec 29, 2006
74 $t_time_tracking = bugnote_get_field( $f_bugnote_id, "time_tracking" );
75 $t_time_tracking = db_minutes_to_hhmm( $t_time_tracking );
76 }
a2a5953 removed CR
Kenzaburo Ito authored Jan 22, 2002
77
78 # Determine which view page to redirect back to.
28570b3 Sweeping changes to move view_bug_*.php => bug_view_*.php and bug_add…
Julian Fitzell authored Sep 21, 2002
79 $t_redirect_url = string_get_bug_view_url( $t_bug_id );
a2a5953 removed CR
Kenzaburo Ito authored Jan 22, 2002
80
230e3f4 @grangeway HTML api documentation + tidy up of api names
grangeway authored Apr 5, 2009
81 html_page_top( bug_format_summary( $t_bug_id, SUMMARY_CAPTION ) );
82 ?>
9655dec changed P tags to BR. This will format better across more browsers. A…
Kenzaburo Ito authored Sep 3, 2002
83 <br />
a2a5953 removed CR
Kenzaburo Ito authored Jan 22, 2002
84 <div align="center">
4d4ee05 fixing form tags for xzhtml compliance
Kenzaburo Ito authored Sep 30, 2002
85 <form method="post" action="bugnote_update.php">
d43b14d @davidhicks Add CSRF protection for bugnote_update
davidhicks authored Jun 28, 2009
86 <?php echo form_security_field( 'bugnote_update' ) ?>
a2a5953 removed CR
Kenzaburo Ito authored Jan 22, 2002
87 <table class="width75" cellspacing="1">
88 <tr>
89 <td class="form-title">
d6843bb Remove f_ prefix from POST and GET field names. The variables should …
Julian Fitzell authored Dec 29, 2002
90 <input type="hidden" name="bugnote_id" value="<?php echo $f_bugnote_id ?>" />
5b92ff5 cleanup all the bugnote pages (except bugnote_inc.php) and the bugnot…
Julian Fitzell authored Dec 30, 2002
91 <?php echo lang_get( 'edit_bugnote_title' ) ?>
a2a5953 removed CR
Kenzaburo Ito authored Jan 22, 2002
92 </td>
93 <td class="right">
5b92ff5 cleanup all the bugnote pages (except bugnote_inc.php) and the bugnot…
Julian Fitzell authored Dec 30, 2002
94 <?php print_bracket_link( $t_redirect_url, lang_get( 'go_back' ) ) ?>
a2a5953 removed CR
Kenzaburo Ito authored Jan 22, 2002
95 </td>
96 </tr>
97 <tr class="row-1">
98 <td class="center" colspan="2">
cff357b @giallu XHTML validation fix.
giallu authored Jul 13, 2007
99 <textarea cols="80" rows="10" name="bugnote_text"><?php echo $t_bugnote_text ?></textarea>
a2a5953 removed CR
Kenzaburo Ito authored Jan 22, 2002
100 </td>
101 </tr>
fe2bc7b Add time tracking functionality see bug 4428
davidnewcomb authored Dec 12, 2006
102 <?php if ( config_get('time_tracking_enabled') ) { ?>
9222369 time_tracking: Change access_has_global_level to access_has_bug_level
davidnewcomb authored Jan 4, 2007
103 <?php if ( access_has_bug_level( config_get( 'time_tracking_edit_threshold' ), $t_bug_id ) ) { ?>
fe2bc7b Add time tracking functionality see bug 4428
davidnewcomb authored Dec 12, 2006
104 <tr class="row-2">
105 <td class="center" colspan="2">
106 <b><?php echo lang_get( 'time_tracking') ?> (HH:MM)</b><br />
107 <input type="text" name="time_tracking" size="5" value="<?php echo $t_time_tracking ?>" />
108 </td>
109 </tr>
110 <?php } ?>
f02da95 Add g_time_tracking_view_threshold and g_time_tracking_edit_threshold…
davidnewcomb authored Dec 29, 2006
111 <?php } ?>
8d47ecb @jreese Bugnote event integration.
jreese authored Jan 16, 2009
112
113 <?php event_signal( 'EVENT_BUGNOTE_EDIT_FORM', array( $t_bug_id, $f_bugnote_id ) ); ?>
114
a2a5953 removed CR
Kenzaburo Ito authored Jan 22, 2002
115 <tr>
116 <td class="center" colspan="2">
ff82370 Enh #3735: New CSS class for HTML Form Buttons
Jeroen Latour authored Apr 12, 2004
117 <input type="submit" class="button" value="<?php echo lang_get( 'update_information_button' ) ?>" />
a2a5953 removed CR
Kenzaburo Ito authored Jan 22, 2002
118 </td>
119 </tr>
120 </table>
4d4ee05 fixing form tags for xzhtml compliance
Kenzaburo Ito authored Sep 30, 2002
121 </form>
a2a5953 removed CR
Kenzaburo Ito authored Jan 22, 2002
122 </div>
123
624fafd @grangeway We dont use __FILE__ param of html_page_bottom. Note: someone who wer…
grangeway authored Jul 18, 2009
124 <?php html_page_bottom();
Something went wrong with that request. Please try again.