Skip to content

Commit

Permalink
one click assign
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@121 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Kenzaburo Ito committed Jan 25, 2001
1 parent f87aaa3 commit d290cba
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions bug_assign.php3
@@ -0,0 +1,74 @@
<?
# Mantis - a php based bugtracking system
# Copyright (C) 2000 Kenzaburo Ito - kenito@300baud.org
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details

# This module is based on bug_update.php3 and provides a quick method
# for assigning a call to the currently signed on user.
# Copyright (C) 2001 Steve Davies - steved@ihug.co.nz

?>
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

### get user id
$t_handler_id = get_current_user_field( "id" );
$query = "UPDATE $g_mantis_bug_table
SET handler_id='$t_handler_id', status='assigned',
date_submitted='$f_date_submitted',
last_updated=NOW()
WHERE id='$f_id'";
$result = db_query($query);

?>
<? print_html_top() ?>
<? print_head_top() ?>
<? print_title( $g_window_title ) ?>
<? print_css( $g_css_include_file ) ?>
<?
if ( $result ) {
if ( get_current_user_profile_field( "advanced_view" )=="on" ) {
print_meta_redirect( "$g_view_bug_advanced_page?f_id=$f_id", $g_wait_time );
}
else {
print_meta_redirect( "$g_view_bug_page?f_id=$f_id", $g_wait_time );
}
}
?>
<? include( $g_meta_include_file ) ?>
<? print_head_bottom() ?>
<? print_body_top() ?>
<? print_header( $g_page_title ) ?>
<p>
<? print_menu( $g_menu_include_file ) ?>

<p>
<div align=center>
<?
### SUCCESS
if ( $result ) {
PRINT "$s_bug_assign_msg<p>";
}
### FAILURE
else {
PRINT "$s_sql_error_detected <a href=\"<? echo $g_administrator_email ?>\">administrator</a><p>";
echo $query;
}
?>
<p>
<?
if ( get_current_user_profile_field( "advanced_view" )=="on" ) {
PRINT "<a href=\"$g_view_bug_advanced_page?f_id=$f_id\">$s_proceed</a>";
}
else {
PRINT "<a href=\"$g_view_bug_page?f_id=$f_id\">$s_proceed</a>";
}
?>
</div>

<? print_footer(__FILE__) ?>
<? print_body_bottom() ?>
<? print_html_bottom() ?>

0 comments on commit d290cba

Please sign in to comment.