diff -Naur mantis-1.1.1/account_prefs_inc.php mantis/account_prefs_inc.php
--- mantis-1.1.1/account_prefs_inc.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/account_prefs_inc.php	2008-02-19 11:51:30.000000000 +0100
@@ -176,6 +176,20 @@
 </tr>
 <tr class="row-1">
 	<td class="category">
+		<?php echo lang_get( 'email_on_processed' ) ?>
+	</td>
+	<td>
+		<input type="checkbox" name="email_on_processed" <?php check_checked( $t_pref->email_on_processed, ON ); ?> />
+		<?php echo lang_get( 'with_minimum_severity' ) ?>
+		<select name="email_on_processed_min_severity">
+			<option value="<?php echo OFF ?>"><?php echo lang_get( 'any' ) ?></option>
+			<option value="<?php echo OFF ?>"></option>
+			<?php print_enum_string_option_list( 'severity', $t_pref->email_on_processed_min_severity ) ?>
+		</select>
+	</td>
+</tr>
+<tr class="row-2">
+	<td class="category">
 		<?php echo lang_get( 'email_on_resolved' ) ?>
 	</td>
 	<td>
@@ -188,7 +202,7 @@
 		</select>
 	</td>
 </tr>
-<tr class="row-2">
+<tr class="row-1">
 	<td class="category">
 		<?php echo lang_get( 'email_on_closed' ) ?>
 	</td>
@@ -202,7 +216,7 @@
 		</select>
 	</td>
 </tr>
-<tr class="row-1">
+<tr class="row-2">
 	<td class="category">
 		<?php echo lang_get( 'email_on_reopened' ) ?>
 	</td>
@@ -216,7 +230,7 @@
 		</select>
 	</td>
 </tr>
-<tr class="row-2">
+<tr class="row-1">
 	<td class="category">
 		<?php echo lang_get( 'email_on_bugnote_added' ) ?>
 	</td>
@@ -230,7 +244,7 @@
 		</select>
 	</td>
 </tr>
-<tr class="row-1">
+<tr class="row-2">
 	<td class="category">
 		<?php echo lang_get( 'email_on_status_change' ) ?>
 	</td>
@@ -244,7 +258,7 @@
 		</select>
 	</td>
 </tr>
-<tr class="row-2">
+<tr class="row-1">
 	<td class="category">
 		<?php echo lang_get( 'email_on_priority_change' ) ?>
 	</td>
@@ -258,7 +272,7 @@
 		</select>
 	</td>
 </tr>
-<tr class="row-1">
+<tr class="row-2">
 	<td class="category">
 		<?php echo lang_get( 'email_bugnote_limit' ) ?>
 	</td>
@@ -269,9 +283,10 @@
 <?php } else { ?>
 		<input type="hidden" name="email_on_new"      value="<?php echo $t_pref->email_on_new ?>" />
 		<input type="hidden" name="email_on_assigned" value="<?php echo $t_pref->email_on_assigned ?>" />
+		<input type="hidden" name="email_on_closed"   value="<?php echo $t_pref->email_on_closed ?>" />
 		<input type="hidden" name="email_on_feedback" value="<?php echo $t_pref->email_on_feedback ?>" />
+		<input type="hidden" name="email_on_processed" value="<?php echo $t_pref->email_on_processed ?>" />
 		<input type="hidden" name="email_on_resolved" value="<?php echo $t_pref->email_on_resolved ?>" />
-		<input type="hidden" name="email_on_closed"   value="<?php echo $t_pref->email_on_closed ?>" />
 		<input type="hidden" name="email_on_reopened" value="<?php echo $t_pref->email_on_reopened ?>" />
 		<input type="hidden" name="email_on_bugnote"  value="<?php echo $t_pref->email_on_bugnote ?>" />
 		<input type="hidden" name="email_on_status"   value="<?php echo $t_pref->email_on_status ?>" />
@@ -279,6 +294,7 @@
 		<input type="hidden" name="email_on_new_min_severity"      value="<?php echo $t_pref->email_on_new_min_severity ?>" />
 		<input type="hidden" name="email_on_assigned_min_severity" value="<?php echo $t_pref->email_on_assigned_min_severity ?>" />
 		<input type="hidden" name="email_on_feedback_min_severity" value="<?php echo $t_pref->email_on_feedback_min_severity ?>" />
+		<input type="hidden" name="email_on_processed_min_severity" value="<?php echo $t_pref->email_on_processed_min_severity ?>" />
 		<input type="hidden" name="email_on_resolved_min_severity" value="<?php echo $t_pref->email_on_resolved_min_severity ?>" />
 		<input type="hidden" name="email_on_closed_min_severity"   value="<?php echo $t_pref->email_on_closed_min_severity ?>" />
 		<input type="hidden" name="email_on_reopened_min_severity" value="<?php echo $t_pref->email_on_reopened_min_severity ?>" />
@@ -287,7 +303,7 @@
 		<input type="hidden" name="email_on_priority_min_severity" value="<?php echo $t_pref->email_on_priority_min_severity ?>" />
 		<input type="hidden" name="email_bugnote_limit" value="<?php echo $t_pref->email_bugnote_limit ?>" />
 <?php } ?>
-<tr class="row-2">
+<tr class="row-1">
 	<td class="category">
 		<?php echo lang_get( 'language' ) ?>
 	</td>
diff -Naur mantis-1.1.1/account_prefs_update.php mantis/account_prefs_update.php
--- mantis-1.1.1/account_prefs_update.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/account_prefs_update.php	2008-02-19 11:52:22.000000000 +0100
@@ -69,6 +69,7 @@
 	$t_prefs->email_on_bugnote	= gpc_get_bool( 'email_on_bugnote' );
 	$t_prefs->email_on_status	= gpc_get_bool( 'email_on_status' );
 	$t_prefs->email_on_priority	= gpc_get_bool( 'email_on_priority' );
+	$t_prefs->email_on_processed	= gpc_get_bool( 'email_on_processed' );
 	$t_prefs->email_on_new_min_severity			= gpc_get_int( 'email_on_new_min_severity' );
 	$t_prefs->email_on_assigned_min_severity	= gpc_get_int( 'email_on_assigned_min_severity' );
 	$t_prefs->email_on_feedback_min_severity	= gpc_get_int( 'email_on_feedback_min_severity' );
@@ -78,6 +79,7 @@
 	$t_prefs->email_on_bugnote_min_severity		= gpc_get_int( 'email_on_bugnote_min_severity' );
 	$t_prefs->email_on_status_min_severity		= gpc_get_int( 'email_on_status_min_severity' );
 	$t_prefs->email_on_priority_min_severity	= gpc_get_int( 'email_on_priority_min_severity' );
+	$t_prefs->email_on_processed_min_severity	= gpc_get_int( 'email_on_processed_min_severity' );
 
 	$t_prefs->bugnote_order = gpc_get_string( 'bugnote_order' );
 	$t_prefs->email_bugnote_limit = gpc_get_int( 'email_bugnote_limit' );
diff -Naur mantis-1.1.1/admin/upgrades/1_00_inc.php mantis/admin/upgrades/1_00_inc.php
--- mantis-1.1.1/admin/upgrades/1_00_inc.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/admin/upgrades/1_00_inc.php	2008-02-20 19:51:54.000000000 +0100
@@ -179,6 +179,6 @@
 			'add default for fixed in version',
 			"ALTER TABLE $t_bug_table CHANGE fixed_in_version fixed_in_version VARCHAR(64) DEFAULT '' NOT NULL"
 		);
-	
+
 	return $upgrades;
 ?>
diff -Naur mantis-1.1.1/admin/upgrades/update_tasks.sql mantis/admin/upgrades/update_tasks.sql
--- mantis-1.1.1/admin/upgrades/update_tasks.sql	1970-01-01 01:00:00.000000000 +0100
+++ mantis/admin/upgrades/update_tasks.sql	2008-02-20 15:41:41.000000000 +0100
@@ -0,0 +1,19 @@
+alter table mantis_bug_table add column task_order integer;
+alter table mantis_bug_table add column deadline date;
+alter table mantis_user_pref_table add column email_on_processed smallint;
+alter table mantis_user_pref_table add column email_on_processed_min_severiy smallint
+
+update mantis_bug_table set task_order=0;
+update mantis_user_prefs_table set email_on_processed=0;
+update mantis_user_prefs_table set email_on_processed_min_severity=0;
+
+alter table mantis_user_prefs_table alter column email_on_processed set default 0;
+alter table mantis_user_prefs_table alter column email_on_processed set not null;
+
+alter table mantis_user_prefs_table alter column email_on_processed_min_severity set default 0;
+alter table mantis_user_prefs_table alter column email_on_processed_min_severity set not null;
+
+alter table mantis_bug_table alter column task_order set default 0;
+alter table mantis_bug_table alter column task_order set not null;
+
+alter table mantis_email_table alter column email_id set default nextval( 'mantis_email_table_id_seq'::regclass);
diff -Naur mantis-1.1.1/bug_assign.php mantis/bug_assign.php
--- mantis-1.1.1/bug_assign.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/bug_assign.php	2008-02-11 13:31:53.000000000 +0100
@@ -33,8 +33,10 @@
 ?>
 <?php
 	$f_bug_id = gpc_get_int( 'bug_id' );
+	
 	$t_bug = bug_get( $f_bug_id );
 	
+	
 	if( $t_bug->project_id != helper_get_current_project() ) {
 		# in case the current project is not the same project of the bug we are viewing...
 		# ... override the current project. This to avoid problems with categories and handlers lists etc.
diff -Naur mantis-1.1.1/bug_change_status_page.php mantis/bug_change_status_page.php
--- mantis-1.1.1/bug_change_status_page.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/bug_change_status_page.php	2008-02-21 08:58:40.000000000 +0100
@@ -52,6 +52,20 @@
 			) ) {
 		access_denied();
 	}
+	
+       #deal with tasks
+	$t_current_user_id = auth_get_current_user_id();
+	$t_global_level = access_get_global_level();
+	$t_local_level = project_get_local_user_access_level( $t_bug->project_id, $t_current_user_id );
+       
+        if ( $t_bug->severity == config_get( 'task_severity_threshold' ) ) {
+                if ( $t_local_level >= config_get( 'task_manager_threshold' ) || $t_global_level == ADMINISTRATOR ) {
+                } else if ( $t_bug->reporter == $t_current_user_id && $t_bug->status < config_get( 'task_aproved_threshold' ) ) {
+                } else if ( $t_bug->handler_id > 0 ) {
+                } else {
+                        trigger_error( ERROR_ACCESS_DENIED, ERROR );
+                }
+        }
 
 	# get new issue handler if set, otherwise default to original handler
 	$f_handler_id = gpc_get_int( 'handler_id', bug_get_field( $f_bug_id, 'handler_id' ) );
@@ -79,6 +93,7 @@
 
 	$t_status_label = str_replace( " ", "_", get_enum_to_string( config_get( 'status_enum_string' ), $f_new_status ) );
 	$t_resolved = config_get( 'bug_resolved_status_threshold' );
+	$t_task = config_get( 'task_severity_threshold' );
 
 	$t_bug = bug_get( $f_bug_id );
 
@@ -163,6 +178,38 @@
 	</td>
 </tr>
 <?php } ?>
+<!-- Deadline for task -->
+<?php
+if ( $t_bug->severity >= $t_task ) {
+# @@@ (thraxisp) this may want a browser check  ( MS IE >= 5.0, Mozilla >= 1.0, Safari >=1.2, ...)
+        if ( ( ON == config_get( 'dhtml_filters' ) ) && ( ON == config_get( 'use_javascript' ) ) ){
+                        echo "<style type=\"text/css\">@import url(javascript/jscalendar/calendar-blue.css);</style>";
+                        echo "<script type=\"text/javascript\" src=\"javascript/jscalendar/calendar.js\"></script>\n";
+                        echo "<script type=\"text/javascript\" src=\"javascript/jscalendar/lang/calendar-en.js\"></script>\n";
+
+                        echo "<script type=\"text/javascript\" src=\"javascript/jscalendar/calendar-setup.js\"></script>\n";
+
+                }
+        $t_icon_path = config_get( 'icon_path' );
+        $cal_icon = $t_icon_path ."calendar-img.gif";
+
+
+
+
+?>
+<tr <?php echo helper_alternate_class() ?>>
+	<td class="category">
+		<?php echo lang_get( 'deadline' ) ?>
+	</td>
+<?php
+            print "<td colspan=\"1\"><input ".helper_get_tab_index()." type=\"text\" id=\"deadline\" name=\"deadline\" size=\"20\" maxlength=\"10\" value=\"".$t_bug->deadline."\">";
+?>
+            <input type="image" class="button" id="trigger" SRC="
+            <?php print $cal_icon;?> " onClick="return showCalendar ('sel1', '%Y-%m-%d', 24, true)" />
+        </td>	
+</tr>
+<?php } ?>
+
 
 <!-- Custom Fields -->
 <?php
@@ -321,6 +368,18 @@
 
 </table>
 </form>
+<?php if ( $t_bug->severity >= $t_task ) { #'?>
+        <script type="text/javascript">
+                Calendar.setup (
+                {
+                 inputField     : "deadline",
+                 ifFormat       : "%Y-%m-%d",
+                 button         : "trigger"
+                }
+                );
+        </script>
+
+<?php } ?>
 </div>
 
 <br />
diff -Naur mantis-1.1.1/bug_process.php mantis/bug_process.php
--- mantis-1.1.1/bug_process.php	1970-01-01 01:00:00.000000000 +0100
+++ mantis/bug_process.php	2008-02-19 11:11:38.000000000 +0100
@@ -0,0 +1,58 @@
+<?php
+	# Mantis - a php based bugtracking system
+	# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+	# Copyright (C) 2002 - 2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+	# This program is distributed under the terms and conditions of the GPL
+	# See the README and LICENSE files for details
+
+	# --------------------------------------------------------
+	# $Id: bug_assign.php,v 1.42 2005/06/14 22:00:32 thraxisp Exp $
+	# --------------------------------------------------------
+?>
+<?php
+	# Process bug then redirect to viewing page
+?>
+<?php
+	require_once( 'core.php' );
+
+	$t_core_path = config_get( 'core_path' );
+
+	require_once( $t_core_path.'bug_api.php' );
+?>
+<?php
+	$f_bug_id = gpc_get_int( 'bug_id' );
+	$t_bug = bug_get( $f_bug_id );
+	
+	if( $t_bug->project_id != helper_get_current_project() ) {
+		# in case the current project is not the same project of the bug we are viewing...
+		# ... override the current project. This to avoid problems with categories and handlers lists etc.
+		$g_project_override = $t_bug->project_id;
+	}
+
+	$f_handler_id = gpc_get_int( 'handler_id', auth_get_current_user_id() );
+
+	# check that current user has rights to assign the issue
+	access_ensure_bug_level( config_get( 'update_process_threshold', config_get( 'update_bug_process_threshold' ) ), $f_bug_id );
+
+	$t_bug_sponsored = sponsorship_get_amount( sponsorship_get_all_ids( $f_bug_id ) ) > 0;
+	if ( $t_bug_sponsored ) {
+		if ( !access_has_bug_level( config_get( 'assign_sponsored_bugs_threshold' ), $f_bug_id ) ) {
+			trigger_error( ERROR_SPONSORSHIP_ASSIGNER_ACCESS_LEVEL_TOO_LOW, ERROR );
+		}
+	}
+
+	if ( $f_handler_id != NO_USER ) {
+		# check that new handler has rights to handle the issue
+		access_ensure_bug_level( config_get( 'handle_bug_threshold' ), $f_bug_id, $f_handler_id );
+
+		if ( $t_bug_sponsored ) {
+			if ( !access_has_bug_level( config_get( 'handle_sponsored_bugs_threshold' ), $f_bug_id, $f_handler_id ) ) {
+				trigger_error( ERROR_SPONSORSHIP_HANDLER_ACCESS_LEVEL_TOO_LOW, ERROR );
+			}
+		}
+	}
+
+	bug_process( $f_bug_id, '' );
+
+	print_successful_redirect_to_bug( $f_bug_id );
+?>
diff -Naur mantis-1.1.1/bug_report.php mantis/bug_report.php
--- mantis-1.1.1/bug_report.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/bug_report.php	2008-02-21 10:45:37.000000000 +0100
@@ -31,6 +31,7 @@
 	require_once( $t_core_path.'file_api.php' );
 	require_once( $t_core_path.'bug_api.php' );
 	require_once( $t_core_path.'custom_field_api.php' );
+	require_once( $t_core_path.'task_api.php' );
 
 	access_ensure_project_level( config_get('report_bug_threshold' ) );
 
@@ -149,13 +150,20 @@
 	}
 
 	email_new_bug( $t_bug_id );
+	if ( $t_bug_data->severity == config_get( 'task_severity_threshold' ) ) {
+		task_add_task( $t_bug_id, $t_bug_data->handler_id );	
+	}
 
 	helper_call_custom_function( 'issue_create_notify', array( $t_bug_id ) );
 
 	html_page_top1();
 
 	if ( ! $f_report_stay ) {
-		html_meta_redirect( 'view_all_bug_page.php' );
+		if ( $t_bug_data->severity == config_get( 'task_severity_threshold' ) ) {
+			html_meta_redirect( 'task_list_page.php' );
+		} else {
+			html_meta_redirect( 'view_all_bug_page.php' );
+		}
 	}
 
 	html_page_top2();
@@ -165,7 +173,11 @@
 <?php
 	echo lang_get( 'operation_successful' ) . '<br />';
 	print_bracket_link( string_get_bug_view_url( $t_bug_id ), lang_get( 'view_submitted_bug_link' ) . " $t_bug_id" );
-	print_bracket_link( 'view_all_bug_page.php', lang_get( 'view_bugs_link' ) );
+	if ( $t_bug_data->severity == config_get( 'task_severity_threshold' ) ) {	
+		print_bracket_link( 'task_list_page.php', lang_get( 'task_list_link' ) );
+	} else {
+		print_bracket_link( 'view_all_bug_page.php', lang_get( 'view_bugs_link' ) );
+	}
 
 	if ( $f_report_stay ) {
 ?>
diff -Naur mantis-1.1.1/bug_report_page.php mantis/bug_report_page.php
--- mantis-1.1.1/bug_report_page.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/bug_report_page.php	2008-02-21 10:42:00.000000000 +0100
@@ -134,7 +134,7 @@
 </tr>
 
 
-<!-- Category -->
+<!-- Category  
 <tr <?php echo helper_alternate_class() ?>>
 	<td class="category" width="30%">
 		<?php echo '<span class="required">*</span>', lang_get( 'category' ) ?> <?php print_documentation_link( 'category' ) ?>
@@ -155,7 +155,7 @@
 	</td>
 </tr>
 
-
+-->
 <!-- Reproducibility -->
 <tr <?php echo helper_alternate_class() ?>>
 	<td class="category">
diff -Naur mantis-1.1.1/bug_update.php mantis/bug_update.php
--- mantis-1.1.1/bug_update.php	2007-10-26 10:52:18.000000000 +0200
+++ mantis/bug_update.php	2008-02-20 18:34:26.000000000 +0100
@@ -32,13 +32,15 @@
 	require_once( $t_core_path.'bug_api.php' );
 	require_once( $t_core_path.'bugnote_api.php' );
 	require_once( $t_core_path.'custom_field_api.php' );
+	require_once( $t_core_path.'task_api.php' );
 ?>
 <?php
+
 	$f_bug_id = gpc_get_int( 'bug_id' );
 	$f_update_mode = gpc_get_bool( 'update_mode', FALSE ); # set if called from generic update page
 	$f_new_status	= gpc_get_int( 'status', bug_get_field( $f_bug_id, 'status' ) );
 
-	$t_bug_data = bug_get( $f_bug_id, true );
+	$t_bug_data = bug_get( $f_bug_id, true );	
 	if( $t_bug_data->project_id != helper_get_current_project() ) {
 		# in case the current project is not the same project of the bug we are viewing...
 		# ... override the current project. This to avoid problems with categories and handlers lists etc.
@@ -54,9 +56,17 @@
 			) ) {
 		access_denied();
 	}
+	
+	
 
 	# extract current extended information
 	$t_old_bug_status = $t_bug_data->status;
+	$t_old_bug_severity = $t_bug_data->severity;
+	$t_old_bug_reporter = $t_bug_data->reporter_id;
+	$t_current_user_id = auth_get_current_user_id();
+	$t_local_level = project_get_local_user_access_level( $c_bug_data->project_id, $t_current_user_id );
+	$t_global_level = access_get_global_level($t_current_user_id);
+	
 
 	$t_bug_data->reporter_id		= gpc_get_int( 'reporter_id', $t_bug_data->reporter_id );
 	$t_bug_data->handler_id			= gpc_get_int( 'handler_id', $t_bug_data->handler_id );
@@ -82,11 +92,29 @@
 	$t_bug_data->description		= gpc_get_string( 'description', $t_bug_data->description );
 	$t_bug_data->steps_to_reproduce	= gpc_get_string( 'steps_to_reproduce', $t_bug_data->steps_to_reproduce );
 	$t_bug_data->additional_information	= gpc_get_string( 'additional_information', $t_bug_data->additional_information );
+	$t_bug_data->deadline			= gpc_get_string( 'deadline', $t_bug_data->deadline );
 
 	$f_private						= gpc_get_bool( 'private' );
 	$f_bugnote_text					= gpc_get_string( 'bugnote_text', '' );
 	$f_time_tracking			= gpc_get_string( 'time_tracking', '0:00' );
 	$f_close_now					= gpc_get_string( 'close_now', false );
+	
+
+	#deal with tasks
+	if ( ($t_old_bug_severity == config_get( 'task_severity_threshold' )
+			 && $t_bug_data->severity != config_get( 'task_severity_threshold' ) ) || 
+			($t_old_bug_severity != config_get( 'task_severity_threshold' ) && 
+			    $t_bug_data->severity == config_get( 'task_severity_threshold' ) ) ) {
+		if ( $t_local_level >= config_get( 'task_manager_threshold' ) || 
+			    $t_global_level == ADMINISTRATOR ) {
+		} else if ( $t_old_bug_reporter == $t_current_user_id && 
+		    $t_old_bug_status <= config_get( 'task_aproved_threshold' ) && 
+		    $t_bug_data->status <= config_get( 'task_aproved_threshold' ) ) {
+		} else if ( $t_bug_data->handler_id > 0 ) { 
+		} else {
+			trigger_error( ERROR_ACCESS_DENIED, ERROR );
+		}
+	}
 
 	# Handle auto-assigning
 	if ( ( NEW_ == $t_bug_data->status )
@@ -157,8 +185,15 @@
 
 				if ( $f_close_now ) {
 					bug_set_field( $f_bug_id, 'status', CLOSED );
+					$c_task = task_is_task( $p_bug_id );
+					if ( $c_task ) {
+		    			$t_user_id = bug_get_field( $p_bug_id, 'handler_id' );
+		    			task_remove_task( $p_bug_id );
+		    			history_log_event_direct( $p_bug_id, lang_get( 'task_is_task' ), lang_get( 'task_removed' ), user_get_realname( $t_user_id ) );
+		    			//info do historii
+					}
+					
 				}
-
 				// update bug data with fields that may be updated inside bug_resolve(), otherwise changes will be overwritten
 				// in bug_update() call below.
 				$t_bug_data->handler_id = bug_get_field( $f_bug_id, 'handler_id' );
@@ -197,7 +232,9 @@
 	# Update the bug entry, notify if we haven't done so already
 	bug_update( $f_bug_id, $t_bug_data, true, ( false == $t_notify ) );
 
+	
 	helper_call_custom_function( 'issue_update_notify', array( $f_bug_id ) );
 
 	print_successful_redirect_to_bug( $f_bug_id );
-?>
+	
+?>
\ No newline at end of file
diff -Naur mantis-1.1.1/bug_update_advanced_page.php mantis/bug_update_advanced_page.php
--- mantis-1.1.1/bug_update_advanced_page.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/bug_update_advanced_page.php	2008-02-20 15:37:58.000000000 +0100
@@ -31,11 +31,24 @@
 	require_once( $t_core_path.'date_api.php' );
 	require_once( $t_core_path.'last_visited_api.php' );
 	require_once( $t_core_path.'projax_api.php' );
+	require_once( $t_core_path.'authentication_api.php' );
+	require_once( $t_core_path.'project_api.php' );
+	require_once( $t_core_path.'access_api.php' );
+	require_once( $t_core_path.'lang_api.php' );
+	
+
 ?>
 <?php
 	$f_bug_id = gpc_get_int( 'bug_id' );
-
+	
 	$t_bug = bug_prepare_edit( bug_get( $f_bug_id, true ) );
+	
+	$t_current_user_id = auth_get_current_user_id();
+	
+	$t_level = project_get_local_user_access_level ( $t_bug->project_id, $t_current_user_id );
+	
+	$t_syslevel = access_get_global_level();
+	
 
 	if( $t_bug->project_id != helper_get_current_project() ) {
 		# in case the current project is not the same project of the bug we are viewing...
@@ -64,7 +77,7 @@
 ?>
 
 <br />
-<form method="post" action="bug_update.php">
+<form method="post" action="bug_update.php" name="bue">
 <table class="width100" cellspacing="1">
 <tr>
 	<td class="form-title" colspan="3">
@@ -428,11 +441,41 @@
 
 <tr <?php echo helper_alternate_class() ?>>
 
-<?php
+<?php #"
 	if ( access_has_bug_level( config_get( 'roadmap_update_threshold' ), $f_bug_id ) ) {
+
+#	<!-- deadline -->
+# @@@ (thraxisp) this may want a browser check  ( MS IE >= 5.0, Mozilla >= 1.0, Safari >=1.2, ...)
+        if ( ( ON == config_get( 'dhtml_filters' ) ) && ( ON == config_get( 'use_javascript' ) ) ){
+			echo "<style type=\"text/css\">@import url(javascript/jscalendar/calendar-blue.css);</style>";
+			echo "<script type=\"text/javascript\" src=\"javascript/jscalendar/calendar.js\"></script>\n"; 
+			echo "<script type=\"text/javascript\" src=\"javascript/jscalendar/lang/calendar-en.js\"></script>\n"; 
+			echo "<script type=\"text/javascript\" src=\"javascript/jscalendar/calendar-setup.js\"></script>\n"; 	
+		}
+	$t_icon_path = config_get( 'icon_path' );
+	$cal_icon = $t_icon_path ."calendar-img.gif";
 ?>
-	<!-- spacer -->
-	<td colspan="2">&nbsp;</td>
+		
+	<td class="category"><?php print lang_get( 'deadline' ); ?></td>
+<?php
+	if ( $t_level >= config_get( 'task_manager_threshold' ) || $t_syslevel == ADMINISTRATOR ) {
+	    print "<td colspan=\"1\"><input ".helper_get_tab_index()." type=\"text\" id=\"deadline\" name=\"deadline\" size=\"20\" maxlength=\"10\" value=\"".$t_bug->deadline."\">";
+?>
+	    <input type="image" class="button" id="trigger" SRC="
+	    <?php print $cal_icon;?> " onClick="return showCalendar ('sel1', '%Y-%m-%d', 24, true)" />
+<?php	    
+	} else {
+	    if ( $t_bug->status >= config_get( 'bug_resolved_status_threshold' ) ) {
+		print "<td colspan=\"1\">";
+		print $t_bug->deadline;
+	    } else {
+		print "<td colspan=\"1\" class=\"deadline\">";
+		print $t_bug->deadline;
+	    
+	    }
+	}
+?>
+	</td>
 
 	<td class="category">
 		<?php
@@ -612,7 +655,23 @@
 </table>
 </form>
 
+<!--		var cal2 = new calendar3(document.forms['bue'].elements['deadline']);
+		cal2.year_scroll = true;
+		cal2.time_comp = false; -->
+
+
+<?php if ( $t_level >= config_get( 'task_manager_threshold' ) || $t_syslevel == ADMINISTRATOR ) { ?>
+	<script type="text/javascript">
+		Calendar.setup (
+		{
+		 inputField 	: "deadline",
+		 ifFormat 	: "%Y-%m-%d",
+		 button		: "trigger"
+		}
+		);
+	</script>
 <?php
+	}
 	include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'bugnote_view_inc.php' );
 	html_page_bottom1( __FILE__ );
 
diff -Naur mantis-1.1.1/bug_view_advanced_page.php mantis/bug_view_advanced_page.php
--- mantis-1.1.1/bug_view_advanced_page.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/bug_view_advanced_page.php	2008-02-20 18:46:56.000000000 +0100
@@ -427,6 +427,21 @@
 <?php
 	}
 ?>
+<tr <?php echo helper_alternate_class() ?>>
+	<td class="category"><?php print lang_get( 'deadline' ); ?>
+	</td>
+	<?php
+	if ( $t_bug->status < config_get( 'bug_resolved_status_threshold' ) && !is_blank( $t_bug->deadline ) ) {
+		echo '<td class="deadline">'.$t_bug->deadline;
+	} else {
+		echo '<td>'.$t_bug->deadline;
+	}
+	?>
+	</td>
+	<td colspan="4">&nbsp;</td>
+</tr>
+
+
 
 <!-- spacer -->
 <tr class="spacer">
diff -Naur mantis-1.1.1/bug_view_page.php mantis/bug_view_page.php
--- mantis-1.1.1/bug_view_page.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/bug_view_page.php	2008-02-20 18:47:55.000000000 +0100
@@ -43,6 +43,7 @@
 	bug_ensure_exists( $f_bug_id );
 
 	access_ensure_bug_level( VIEWER, $f_bug_id );
+	
 
 	$t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) );
 
@@ -314,6 +315,19 @@
 		}
 	?>
 </tr>
+<tr <?php echo helper_alternate_class() ?>>
+	<td class="category"><?php print lang_get( 'deadline' ); ?>
+	</td>
+	<?php
+	if ( $t_bug->status < config_get( 'bug_resolved_status_threshold' ) && !is_blank( $t_bug->deadline ) ) {
+		echo '<td class="deadline">'.$t_bug->deadline;
+	} else {
+		echo '<td>'.$t_bug->deadline;
+	}
+	?>
+	</td>
+	<td colspan="4">&nbsp;</td>
+</tr>
 
 
 <!-- spacer -->
diff -Naur mantis-1.1.1/config_defaults_inc.php mantis/config_defaults_inc.php
--- mantis-1.1.1/config_defaults_inc.php	2008-01-16 23:16:24.000000000 +0100
+++ mantis/config_defaults_inc.php	2008-02-20 18:45:26.000000000 +0100
@@ -267,7 +267,7 @@
 	# You might want to do something similar so all managers are notified when a
 	# bug is closed.  If you didn't want reporters to be notified when a bug is
 	# closed (only when it is resolved) you would use:
-	#
+	#'
 	# $g_notify_flags['closed']['reporter'] = OFF;
 
 	$g_default_notify_flags	= array('reporter'	=> ON,
@@ -699,6 +699,7 @@
 	$g_default_email_on_bugnote		= ON;
 	$g_default_email_on_status		= 0; # @@@ Unused
 	$g_default_email_on_priority	= 0; # @@@ Unused
+	$g_default_email_on_processed = ON;
 	$g_default_email_on_new_minimum_severity		= OFF; # 'any'
 	$g_default_email_on_assigned_minimum_severity	= OFF; # 'any'
 	$g_default_email_on_feedback_minimum_severity	= OFF; # 'any'
@@ -708,6 +709,7 @@
 	$g_default_email_on_bugnote_minimum_severity	= OFF; # 'any'
 	$g_default_email_on_status_minimum_severity		= OFF; # 'any'
 	$g_default_email_on_priority_minimum_severity	= OFF; # @@@ Unused
+	$g_default_email_on_processed_minimum_severity = OFF;
 	$g_default_email_bugnote_limit					= 0;
 	# default_language - is set to site language
 
@@ -1280,6 +1282,7 @@
 									 'acknowledged'	=> '#ffd850', # orange
 									 'confirmed'	=> '#ffffb0', # yellow
 									 'assigned'		=> '#c8c8ff', # blue
+									 'processed'	=> '#c674fc', # magenta
 									 'resolved'		=> '#cceedd', # buish-green
 									 'closed'		=> '#e8e8e8'); # light gray
 
@@ -1386,7 +1389,7 @@
 	# --- enum strings ----------------
 	# status from $g_status_index-1 to 79 are used for the onboard customization (if enabled)
 	# directly use Mantis to edit them.
-	$g_access_levels_enum_string		= '10:viewer,25:reporter,40:updater,55:developer,70:manager,90:administrator';
+	$g_access_levels_enum_string		= '10:viewer,25:reporter,40:updater,55:developer,60:task_manager,:70:manager,90:administrator';
 	$g_project_status_enum_string		= '10:development,30:release,50:stable,70:obsolete';
 	$g_project_view_state_enum_string	= '10:public,50:private';
 	$g_view_state_enum_string			= '10:public,50:private';
@@ -1394,7 +1397,7 @@
 	$g_priority_enum_string				= '10:none,20:low,30:normal,40:high,50:urgent,60:immediate';
 	$g_severity_enum_string				= '10:feature,20:trivial,30:text,40:tweak,50:minor,60:major,70:crash,80:block';
 	$g_reproducibility_enum_string		= '10:always,30:sometimes,50:random,70:have not tried,90:unable to duplicate,100:N/A';
-	$g_status_enum_string				= '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed';
+	$g_status_enum_string				= '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:processed,80:resolved,90:closed';
 	  # @@@ for documentation, the values in this list are also used to define variables in the language files
 	  #  (e.g., $s_new_bug_title referenced in bug_change_status_page.php )
 	  # Embedded spaces are converted to underscores (e.g., "working on" references $s_working_on_bug_title).
@@ -1930,4 +1933,24 @@
 	
 	# The twitter account password.
 	$g_twitter_password = '';
+
+	#############################
+	# Twitter Settings
+	#############################
+
+	# Task list config
+	# Add tasklist 
+	$g_task_enabled = OFF;
+	
+	# Minimum project level to be able to sort task list
+	$g_task_manager_threshold = TASK_MANAGER;
+	
+	# Issue severity assumed as TASK
+	$g_task_severity_threshold = FEATURE;
+	
+	# Minimum severit for approved task / below is unaproved
+	$g_task_aproved_threshold = CONFIRMED;
+		
+	# columns displayed on Task list view
+	$g_view_task_page_columns = array ( 'selection', 'id', 'eta', 'deadline', 'status', 'last_updated', 'summary' );	
 ?>
diff -Naur mantis-1.1.1/core/bug_api.php mantis/core/bug_api.php
--- mantis-1.1.1/core/bug_api.php	2008-01-19 08:43:47.000000000 +0100
+++ mantis/core/bug_api.php	2008-02-20 18:35:18.000000000 +0100
@@ -31,6 +31,7 @@
 	require_once( $t_core_dir . 'sponsorship_api.php' );
 	require_once( $t_core_dir . 'twitter_api.php' );
 	require_once( $t_core_dir . 'tag_api.php' );
+	require_once( $t_core_dir . 'task_api.php' );
 
 	# MASC RELATIONSHIP
 	require_once( $t_core_dir.'relationship_api.php' );
@@ -79,6 +80,10 @@
 		
 		#internal helper objects
 		var $_stats = null;
+		
+		#systherm
+		var $task_order = 0;
+		var $deadline = '';
 	}
 
 	#===================================
@@ -365,6 +370,8 @@
 		$c_additional_info		= db_prepare_string( $p_bug_data->additional_information );
 		$c_sponsorship_total 	= 0;
 		$c_sticky 				= 0;
+		$c_task_order			= db_prepare_int($p_bug_data->task_order);
+		$c_deadline						= db_prepare_date($p_bug_data->deadline);
 
 		# Summary cannot be blank
 		if ( is_blank( $c_summary ) ) {
@@ -377,7 +384,7 @@
 			error_parameters( lang_get( 'description' ) );
 			trigger_error( ERROR_EMPTY_FIELD, ERROR );
 		}
-
+		
 		# If category is not specified and not defaulted + project has categories defined, then error.
 		if ( is_blank( $c_category ) && ( category_get_count( $c_project_id ) > 0 ) ) {
 			error_parameters( lang_get( 'category' ) );
@@ -447,7 +454,7 @@
 				      platform, version,
 				      build,
 				      profile_id, summary, view_state, sponsorship_total, sticky, fixed_in_version,
-				      target_version 
+				      target_version, task_order, deadline
 				    )
 				  VALUES
 				    ( '$c_project_id',
@@ -462,7 +469,7 @@
 				      '$c_platform', '$c_version',
 				      '$c_build',
 				      '$c_profile_id', '$c_summary', '$c_view_state', '$c_sponsorship_total', '$c_sticky', '',
-				      '$c_target_version'
+				      '$c_target_version', '$c_task_order', null 
 				    )";
 		db_query( $query );
 
@@ -527,6 +534,8 @@
 		bug_set_field( $t_new_bug_id, 'target_version', $t_bug_data->target_version );
 		bug_set_field( $t_new_bug_id, 'sponsorship_total', 0 );
 		bug_set_field( $t_new_bug_id, 'sticky', 0 );
+		bug_set_field( $t_new_bug_id, 'task_order', 0);
+		bug_set_field( $t_new_bug_id, 'deadline', $t_bug_data->deadline );
 
 		# COPY CUSTOM FIELDS
 		if ( $p_copy_custom_fields ) {
@@ -735,10 +744,13 @@
 				  WHERE id='$t_bug_text_id'";
 		db_query( $query );
 
+		
 		# Delete the bug entry
 		$query = "DELETE FROM $t_bug_table
 				  WHERE id='$c_bug_id'";
 		db_query( $query );
+		
+		
 
 		bug_clear_cache( $p_bug_id );
 		bug_text_clear_cache( $p_bug_id );
@@ -781,6 +793,12 @@
 		$c_bug_id		= db_prepare_int( $p_bug_id );
 		$c_bug_data		= bug_prepare_db( $p_bug_data );
 
+
+		$t_current_user_id = auth_get_current_user_id();
+		$t_global_level = access_get_global_level($t_current_user_id);
+		$t_local_level = project_get_local_user_access_level( $c_bug_data->project_id, $t_current_user_id );
+
+
 		# Summary cannot be blank
 		if ( is_blank( $c_bug_data->summary ) ) {
 			error_parameters( lang_get( 'summary' ) );
@@ -794,6 +812,27 @@
 				trigger_error( ERROR_EMPTY_FIELD, ERROR );
 			}
 		}
+		
+		#check deadline format
+		if ( !is_blank( $c_bug_data->deadline ) ) {
+			$t_a = explode( '-', $c_bug_data->deadline );
+			if ( !checkdate((integer) $t_a[1], (integer)$t_a[2], (integer)$t_a[0]) ) {
+				error_parameters( lang_get( 'deadline' ) );
+				trigger_error( ERROR_WRONG_DATE_FORMAT, ERROR );
+			}
+		}
+		
+		#check if the user can set the status
+		if ( $c_bug_data->status >= config_get( 'task_aproved_threshold' ) && 
+			$c_bug_data->severity == config_get( 'task_severity_threshold' ) ) {
+			if ( $t_global_level == ADMINISTRATOR || 
+			    $t_local_level >= config_get( 'task_manager_threshold' ) || 
+				$t_current_user_id == $c_bug_data->handler_id ) {
+			} else {
+				trigger_error( ERROR_ACCESS_DENIED, ERROR );
+			}
+		}
+		
 
 		if( !is_blank( $p_bug_data->duplicate_id ) && ( $p_bug_data->duplicate_id != 0 ) && ( $p_bug_id == $p_bug_data->duplicate_id ) ) {
 			trigger_error( ERROR_BUG_DUPLICATE_SELF, ERROR );  # never returns
@@ -826,24 +865,56 @@
 					platform='$c_bug_data->platform',
 					version='$c_bug_data->version',
 					build='$c_bug_data->build',
-					fixed_in_version='$c_bug_data->fixed_in_version',";
+					fixed_in_version='$c_bug_data->fixed_in_version', ";
 
 		$t_roadmap_updated = false;
 		if ( access_has_project_level( config_get( 'roadmap_update_threshold' ) ) ) {
-			$query .= "
-					target_version='$c_bug_data->target_version',";
+			$query .= "target_version='$c_bug_data->target_version',";
 			$t_roadmap_updated = true;
 		}
 
-		$query .= "
-					view_state='$c_bug_data->view_state',
+		$query .= "view_state='$c_bug_data->view_state',
 					summary='$c_bug_data->summary',
 					sponsorship_total='$c_bug_data->sponsorship_total',
-					sticky='$c_bug_data->sticky'
-				WHERE id='$c_bug_id'";
+					sticky='$c_bug_data->sticky',
+					task_order='$c_bug_data->task_order', ";
+		if ( is_blank( $c_bug_data->deadline ) ) {
+				$query .= "deadline=null ";
+		} else {
+				$query .= "deadline='$c_bug_data->deadline' ";
+		}
+		$query .= "WHERE id='$c_bug_id'";
 		db_query( $query );
 
+		# deal with tasks
+		if ( $c_bug_data->status < CLOSED ) {
+		if ( $t_old_data->severity == config_get( 'task_severity_threshold' ) ) {
+		  if ( $c_bug_data->severity != config_get( 'task_severity_threshold' ) ) {
+		  	task_remove_task ( $p_bug_id );
+		  }  else {
+		  	if ( $t_old_data->handler_id != $c_bug_data->handler_id ) {
+		  		task_remove_task( $p_bug_id );
+		  		task_add_task( $p_bug_id, $c_bug_data->handler_id );
+				history_log_event_direct( $p_bug_id, lang_get( 'task_is_task' ), lang_get( 'task_added' ), user_get_realname( $c_bug_data->handler_id) );
+		  		
+		  	}
+		  }
+		} else if ( $c_bug_data->severity == config_get( 'task_severity_threshold' ) && 
+			    $c_bug_data->status < CLOSED) {
+		  	task_add_task( $p_bug_id, $c_bug_data->handler_id );
+			history_log_event_direct( $p_bug_id, lang_get( 'task_is_task' ), lang_get( 'task_added' ), $c_bug_data->handler_id > 0 ? user_get_realname( $c_bug_data->handler_id):'' );
+		}
+		} else {
+			task_remove_task( $p_bug_id );
+			#history_log_event_direct( $p_bug_id, lang_get( 'task_is_task' ), lang_get( 'task_removed' ), user_get_realname( $c_bug_data->handler_id ) );
+		}
+		
+		
+		
+		
 		bug_clear_cache( $p_bug_id );
+		
+		 		
 
 		# log changes
 		history_log_event_direct( $p_bug_id, 'project_id', $t_old_data->project_id, $p_bug_data->project_id );
@@ -871,7 +942,8 @@
 		history_log_event_direct( $p_bug_id, 'summary', $t_old_data->summary, $p_bug_data->summary );
 		history_log_event_direct( $p_bug_id, 'sponsorship_total', $t_old_data->sponsorship_total, $p_bug_data->sponsorship_total );
 		history_log_event_direct( $p_bug_id, 'sticky', $t_old_data->sticky, $p_bug_data->sticky );
-
+		history_log_event_direct( $p_bug_id, 'deadline', $t_old_data->deadline, $p_bug_data->deadline );
+		
 		# Update extended info if requested
 		if ( $p_update_extended ) {
 			$t_bug_text_table = config_get( 'mantis_bug_text_table' );
@@ -1157,7 +1229,9 @@
 		bug_update_date( $p_bug_id );
 
 		# log changes
-		history_log_event_direct( $p_bug_id, $p_field_name, $h_status, $p_status );
+		if ( !$p_field_name === 'task_order' ) { 
+		    	
+		}
 
 		bug_clear_cache( $p_bug_id );
 
@@ -1169,11 +1243,12 @@
 	function bug_assign( $p_bug_id, $p_user_id, $p_bugnote_text='', $p_bugnote_private = false ) {
 		$c_bug_id	= db_prepare_int( $p_bug_id );
 		$c_user_id	= db_prepare_int( $p_user_id );
+		$c_task = task_is_task( $p_bug_id );
 
 		if ( ( $c_user_id != NO_USER ) && !access_has_bug_level( config_get( 'handle_bug_threshold' ), $p_bug_id, $p_user_id ) ) {
 		    trigger_error( ERROR_USER_DOES_NOT_HAVE_REQ_ACCESS );
 		}
-
+		
 		# extract current information into history variables
 		$h_status		= bug_get_field( $p_bug_id, 'status' );
 		$h_handler_id	= bug_get_field( $p_bug_id, 'handler_id' );
@@ -1206,11 +1281,22 @@
 
 			# updated the last_updated date
 			bug_update_date( $p_bug_id );
+			if ( $c_task ) {
+				task_add_task( $p_bug_id, $p_user_id );
+				if ( $p_user_id ) {
+					history_log_event_direct( $p_bug_id, lang_get( 'task_is_task' ), lang_get( 'task_added' ), user_get_realname( $p_user_id ) );
+				} else {
+					history_log_event_direct( $p_bug_id, lang_get( 'task_is_task' ), lang_get( 'task_added' ), '' );				
+				}
+			}
+			
+			
 
 			bug_clear_cache( $p_bug_id );
 
 			# send assigned to email
 			email_assign( $p_bug_id );
+			
 		}
 
 		return true;
@@ -1219,10 +1305,22 @@
 	# --------------------
 	# close the given bug
 	function bug_close( $p_bug_id, $p_bugnote_text = '', $p_bugnote_private = false, $p_time_tracking = '0:00' ) {
+	
 		$p_bugnote_text = trim( $p_bugnote_text );
 
 		bug_set_field( $p_bug_id, 'status', CLOSED );
 
+		# check if bug is a task
+		$c_task = task_is_task( $p_bug_id );
+		if ( $c_task ) {
+		    $t_user_id = bug_get_field( $p_bug_id, 'handler_id' );
+		    task_close_task( $p_bug_id );
+		    history_log_event_direct( $p_bug_id, lang_get( 'task_is_task' ), lang_get( 'task_removed' ), user_get_realname( $t_user_id ) );
+		    //info do historii
+		}
+
+		
+		
 		# Add bugnote if supplied
 		if ( !is_blank( $p_bugnote_text ) ) {
 			bugnote_add( $p_bug_id, $p_bugnote_text, $p_time_tracking, $p_bugnote_private );
@@ -1235,10 +1333,31 @@
 			email_relationship_child_closed( $p_bug_id );
 		}
 		# MASC RELATIONSHIP
+							
+		return true;
+	}
+
+	# --------------------
+	# process the given bug
+	function bug_process( $p_bug_id, $p_bugnote_text = '', $p_bugnote_private = false ) {
+		$t_status_prefix = 'email_notification_title_for_status_bug_';
+		
+		$p_bugnote_text = trim( $p_bugnote_text );
+		
+		$h_status = bug_get_field( $p_bug_id, 'status' );
+		
+		bug_set_field( $p_bug_id, 'status', PROCESSED );
 
+		# Add bugnote if supplied
+		if ( !is_blank( $p_bugnote_text ) ) {
+			bugnote_add( $p_bug_id, $p_bugnote_text, $p_bugnote_private );
+		}
+		history_log_event_direct( $p_bug_id, 'status', $h_status, PROCESSED );				
+		email_generic( $p_bug_id, 'processed', $t_status_prefix . 'processed' );
 		return true;
 	}
 
+
 	# --------------------
 	# resolve the given bug
 	function bug_resolve( $p_bug_id, $p_resolution, $p_fixed_in_version = '', $p_bugnote_text = '', $p_duplicate_id = null, $p_handler_id = null, $p_bugnote_private = false, $p_time_tracking = '0:00' ) {
@@ -1327,6 +1446,12 @@
 
 		bug_set_field( $p_bug_id, 'status', config_get( 'bug_reopen_status' ) );
 		bug_set_field( $p_bug_id, 'resolution', config_get( 'bug_reopen_resolution' ) );
+		$c_handler_id = bug_get_field( $p_bug_id, 'handler_id');
+		if ( $c_handler_id != NOUSER ) {
+		    $c_task = task_is_task( $p_bug_id );
+    		    task_add_task ( $p_bug_id, $c_handler_id );
+		}
+		
 
 		# Add bugnote if supplied
 		if ( !is_blank( $p_bugnote_text ) ) {
@@ -1448,10 +1573,13 @@
 		$t_bug_data->summary			= db_prepare_string( $p_bug_data->summary );
 		$t_bug_data->sponsorship_total	= db_prepare_int( $p_bug_data->sponsorship_total );
 		$t_bug_data->sticky				= db_prepare_int( $p_bug_data->sticky );
+		$t_bug_data->task_order			= db_prepare_int( $p_bug_data->task_order );
 
 		$t_bug_data->description		= db_prepare_string( $p_bug_data->description );
 		$t_bug_data->steps_to_reproduce	= db_prepare_string( $p_bug_data->steps_to_reproduce );
 		$t_bug_data->additional_information	= db_prepare_string( $p_bug_data->additional_information );
+		$t_bug_data->deadline			= db_prepare_date( $p_bug_data->deadline );
+		$t_bug_data->task_order			= db_prepare_int( $p_bug_data->task_order );
 
 		return $t_bug_data;
 	}
@@ -1476,6 +1604,7 @@
 		$p_bug_data->description		= string_textarea( $p_bug_data->description );
 		$p_bug_data->steps_to_reproduce	= string_textarea( $p_bug_data->steps_to_reproduce );
 		$p_bug_data->additional_information	= string_textarea( $p_bug_data->additional_information );
+		$p_bug_data->deadline 			= string_textarea( $p_bug_data->deadline );
 
 		return $p_bug_data;
 	}
@@ -1500,6 +1629,7 @@
 		$p_bug_data->description		= string_display_links( $p_bug_data->description );
 		$p_bug_data->steps_to_reproduce	= string_display_links( $p_bug_data->steps_to_reproduce );
 		$p_bug_data->additional_information	= string_display_links( $p_bug_data->additional_information );
+		$p_bug_data->deadline = 		string_display_line( $p_bug_data->deadline );
 
 		return $p_bug_data;
 	}
diff -Naur mantis-1.1.1/core/bugnote_api.php mantis/core/bugnote_api.php
--- mantis-1.1.1/core/bugnote_api.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/core/bugnote_api.php	2008-02-13 09:54:09.000000000 +0100
@@ -489,7 +489,7 @@
 
 		$t_results = array();
 
-		$query = "SELECT username, SUM(time_tracking) sum_time_tracking
+		$query = "SELECT username, SUM(time_tracking) as sum_time_tracking
 				FROM $t_user_table u, $t_bugnote_table bn
 				WHERE u.id = bn.reporter_id AND
 				bn.bug_id = '$c_bug_id'
@@ -540,7 +540,7 @@
 
 		$t_results = array();
 
-		$query = "SELECT username, summary, bn.bug_id, SUM(time_tracking) sum_time_tracking
+		$query = "SELECT username, summary, bn.bug_id, SUM(time_tracking) as sum_time_tracking
 			FROM $t_user_table u, $t_bugnote_table bn, $t_bug_table b
 			WHERE u.id = bn.reporter_id AND bn.time_tracking != 0 AND bn.bug_id = b.id
 			$t_project_where $t_from_where $t_to_where
diff -Naur mantis-1.1.1/core/columns_api.php mantis/core/columns_api.php
--- mantis-1.1.1/core/columns_api.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/core/columns_api.php	2008-02-12 11:41:55.000000000 +0100
@@ -401,7 +401,6 @@
 	function print_column_edit( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
 		if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) {
 			global $t_icon_path, $t_update_bug_threshold;
-
 			echo '<td>';
 			if ( !bug_is_readonly( $p_row['id'] )
 		  		&& access_has_bug_level( $t_update_bug_threshold, $p_row['id'] ) ) {
@@ -653,4 +652,18 @@
 		}
 		echo '</td>';
 	}
-?>
+
+	# --------------------
+	# $p_columns_target: see COLUMNS_TARGET_* in   constant_inc.php
+	function print_column_deadline( $p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
+		if ( $p_row['status'] < RESOLVED && !is_blank( $p_row['deadline']) ) {
+			echo '<td class="deadline">'.$p_row['deadline'];
+		} else if ( !is_blank( $t_row['deadline'] ) ) {
+			echo '<td>'.$t_bug->deadline;
+		} else {
+			echo '<td>';
+		}
+		echo '</td>';
+	}
+
+?> 
diff -Naur mantis-1.1.1/core/constant_inc.php mantis/core/constant_inc.php
--- mantis-1.1.1/core/constant_inc.php	2008-01-19 09:12:15.000000000 +0100
+++ mantis/core/constant_inc.php	2008-02-18 19:43:01.000000000 +0100
@@ -44,6 +44,7 @@
 	define( 'REPORTER',			25 );
 	define( 'UPDATER',			40 );
 	define( 'DEVELOPER',		55 );
+	define( 'TASK_MANAGER',		60 );
 	define( 'MANAGER',			70 );
 	define( 'ADMINISTRATOR',	90 );
 	define( 'NOBODY',			100 );
@@ -57,6 +58,7 @@
 	define( 'ACKNOWLEDGED',		30 );
 	define( 'CONFIRMED',		40 );
 	define( 'ASSIGNED',			50 );
+	define( 'PROCESSED',			60 );
 	define( 'RESOLVED',			80 );
 	define( 'CLOSED',			90 );
 
@@ -194,6 +196,8 @@
 	define( 'ERROR_FTP_CONNECT_ERROR',				16 );
 	define( 'ERROR_HANDLER_ACCESS_TOO_LOW',				17 );
 	define( 'ERROR_PAGE_REDIRECTION',				18 );
+	define( 'ERROR_WRONG_DATE_FORMAT', 				100 );
+		
 
 	# ERROR_CONFIG_*
 	define( 'ERROR_CONFIG_OPT_NOT_FOUND',			100 );
@@ -351,7 +355,8 @@
 	define( 'META_FILTER_MYSELF',	-1 );
 	define( 'META_FILTER_NONE',     -2  );
 	define( 'META_FILTER_CURRENT',	-3 );
-	define( 'META_FILTER_ANY',      0   );
+	define( 'META_FILTER_ANY',      0   ); # means all	
+	define( 'META_FILTER_BUGS',	-1  );	# bugs only
 
 	# Versions
 	define( 'VERSION_ALL',		null );
@@ -374,6 +379,7 @@
 	define( 'TOKEN_GRAPH',			2 );
 	define( 'TOKEN_LAST_VISITED',	3 );
 	define( 'TOKEN_AUTHENTICATED',	4 );
+	define( 'TOKEN_TASK_VIEW',	1001);
 	define( 'TOKEN_USER',			1000 );
 
 	# token expirations
@@ -397,7 +403,7 @@
 	define( 'CUSTOM_FIELD_DATE_ONORAFTER',	7 ) ;
 
 	# system logging
-	#  logging levels, can be OR'd together
+	#  logging levels, can be OR'd together'
 	define( 'LOG_NONE',                     0 );  # no logging
 	define( 'LOG_EMAIL',                    1 );  # all emails sent
 	define( 'LOG_EMAIL_RECIPIENT',          2 );  # details of email recipient determination
@@ -408,10 +414,19 @@
 	define( 'COLUMNS_TARGET_VIEW_PAGE',   1 );
 	define( 'COLUMNS_TARGET_PRINT_PAGE',  2 );
 	define( 'COLUMNS_TARGET_CSV_PAGE',    3 );
+	define( 'COLUMNS_TARGET_TASK_VIEW_PAGE', 10 );
 
 	# sponsorship "paid" values
 	define( 'SPONSORSHIP_UNPAID',         0 );
 	define( 'SPONSORSHIP_REQUESTED',      1 );
 	define( 'SPONSORSHIP_PAID',           2 );
+	
+	# task view pages
+	define( 'TASK_VIEW_SINGLE_USER',	1 );
+	define( 'TASK_VIEW_SINGLE_USER_ALL',	2 );
+	define( 'TASK_VIEW_PROJECT',		4 );
+	define( 'TASK_VIEW_PROJECT_ALL',	8 );
+	define( 'TASK_VIEW_GLOBAL',		16 );
+	define( 'TASK_VIEW_GLOBAL_ALL',		32 );	
 
 ?>
diff -Naur mantis-1.1.1/core/custom_function_api.php mantis/core/custom_function_api.php
--- mantis-1.1.1/core/custom_function_api.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/core/custom_function_api.php	2008-02-12 15:36:08.000000000 +0100
@@ -197,6 +197,8 @@
 			$t_columns = config_get( 'csv_columns' );
 		} else if ( $p_columns_target == COLUMNS_TARGET_VIEW_PAGE ) {
 			$t_columns = config_get( 'view_issues_page_columns' );
+		} else if ( $p_columns_target == COLUMNS_TARGET_TASK_VIEW_PAGE ) {
+			$t_columns = config_get( 'view_task_page_columns' );
 		} else {
 			$t_columns = config_get( 'print_issues_page_columns' );
 		}
@@ -210,11 +212,14 @@
 	# $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php
 	function custom_function_default_print_column_title( $p_column, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
 		global $t_sort, $t_dir;
-
+		$t_columns_target = $p_columns_target;
+		if ( $p_columns_target == COLUMNS_TARGET_TASK_VIEW_PAGE ) {
+		    $t_columns_target = COLUMNS_TARGET_VIEW_PAGE;
+		}
 		if ( strpos( $p_column, 'custom_' ) === 0 ) {
 			$t_custom_field = substr( $p_column, 7 );
 
-			if ( COLUMNS_TARGET_CSV_PAGE != $p_columns_target ) {
+			if ( COLUMNS_TARGET_CSV_PAGE != $t_columns_target ) {
 				echo '<td>';
 			}
 
@@ -226,23 +231,23 @@
 				$t_custom_field = lang_get_defaulted( $t_def['name'] );
 
 				if ( COLUMNS_TARGET_CSV_PAGE != $p_columns_target ) {
-					print_view_bug_sort_link( $t_custom_field, $p_column, $t_sort, $t_dir, $p_columns_target );
+					print_view_bug_sort_link( $t_custom_field, $p_column, $t_sort, $t_dir, $t_columns_target );
 					print_sort_icon( $t_dir, $t_sort, $p_column );
 				} else {
 					echo $t_custom_field;
 				}
 			}
 
-			if ( COLUMNS_TARGET_CSV_PAGE != $p_columns_target ) {
+			if ( COLUMNS_TARGET_CSV_PAGE != $t_columns_target ) {
 				echo '</td>';
 			}
 		} else {
 			$t_function = 'print_column_title_' . $p_column;
 			if ( function_exists( $t_function ) ) {
-				$t_function( $t_sort, $t_dir, $p_columns_target );
+				$t_function( $t_sort, $t_dir, $t_columns_target );
 			} else {
 				echo '<td>';
-				print_view_bug_sort_link( lang_get_defaulted( $p_column ), $p_column, $t_sort, $t_dir, $p_columns_target );
+				print_view_bug_sort_link( lang_get_defaulted( $p_column ), $p_column, $t_sort, $t_dir, $t_columns_target );
 				print_sort_icon( $t_dir, $t_sort, $p_column );
 				echo '</td>';
 			}
@@ -257,7 +262,11 @@
 	# $p_row: the row from the bug table that belongs to the issue that we should print the values for.
 	# $p_columns_target: see COLUMNS_TARGET_* in constant_inc.php
 	function custom_function_default_print_column_value( $p_column, $p_issue_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
-		if ( COLUMNS_TARGET_CSV_PAGE == $p_columns_target ) {
+		$t_columns_target = $p_columns_target;
+		if ( $p_columns_target == COLUMNS_TARGET_TASK_VIEW_PAGE ) {
+			$t_columns_target = COLUMNS_TARGET_VIEW_PAGE;
+		}		
+		if ( COLUMNS_TARGET_CSV_PAGE == $t_columns_target ) {
 			$t_column_start = '';
 			$t_column_end = '';
 			$t_column_empty = '';
@@ -288,15 +297,14 @@
 			}
 			echo $t_column_end;
 		} else {
-			if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) {
+			if ( $t_columns_target != COLUMNS_TARGET_CSV_PAGE ) {
 				$t_function = 'print_column_' . $p_column;
 			} else {
 				$t_function = 'csv_format_' . $p_column;
 			}
-
 			if ( function_exists( $t_function ) ) {
-				if ( $p_columns_target != COLUMNS_TARGET_CSV_PAGE ) {
-					$t_function( $p_issue_row, $p_columns_target );
+				if ( $t_columns_target != COLUMNS_TARGET_CSV_PAGE ) {
+					$t_function( $p_issue_row, $t_columns_target );
 				} else {
 					$t_function( $p_issue_row[$p_column] );
 				}
@@ -392,4 +400,4 @@
 	# html_api.php.  For each button, this function needs to generate the enclosing '<td>' and '</td>'.
 	function custom_function_default_print_bug_view_page_custom_buttons( $p_bug_id ) {
 	}
-?>
+?>
\ No newline at end of file
diff -Naur mantis-1.1.1/core/database_api.php mantis/core/database_api.php
--- mantis-1.1.1/core/database_api.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/core/database_api.php	2008-02-17 00:13:34.000000000 +0100
@@ -516,9 +516,7 @@
 		}
 
 		// Format
-		$t_formatted = $t_a[0] . '-';
-		$t_formatted .= ($t_a[1] < 10 ? "0" . $t_a[1] : $t_a[1]) . '-';
-		$t_formatted .= ($t_a[2] < 10 ? "0" . $t_a[2] : $t_a[2]);
+		$t_formatted = sprintf('%04d-%02d-%02d', $t_a[0], $t_a[1], $t_a[2]);
 
 		return $t_formatted;
 	}
diff -Naur mantis-1.1.1/core/email_api.php mantis/core/email_api.php
--- mantis-1.1.1/core/email_api.php	2008-01-19 08:43:47.000000000 +0100
+++ mantis/core/email_api.php	2008-02-20 14:28:45.000000000 +0100
@@ -34,6 +34,7 @@
 	require_once( $t_core_dir . 'relationship_api.php' );
 	require_once( $t_core_dir . 'disposable' . DIRECTORY_SEPARATOR . 'disposable.php' );
 	require_once( PHPMAILER_PATH . 'class.phpmailer.php' );
+	require_once( $t_core_dir . 'task_api.php' );
 
 	# reusable object of class SMTP
 	$g_phpMailer_smtp = null;
@@ -292,6 +293,7 @@
 		unset( $t_status_change[FEEDBACK] );
 		unset( $t_status_change[RESOLVED] );
 		unset( $t_status_change[CLOSED] );
+		unset( $t_status_change[PROCESSED] );
 
 		if ( 'owner' == $p_notify_type ) {
 			$t_pref_field = 'email_on_assigned';
@@ -318,7 +320,7 @@
 				continue;
 			}
 
-			# Eliminate users who don't exist anymore or who are disabled
+			# Eliminate users who don't exist anymore or who are disabled'
 			if ( !user_exists( $t_id ) ||
 				 !user_is_enabled( $t_id ) ) {
 				log_event( LOG_EMAIL_RECIPIENT, "bug=$p_bug_id, drop $t_id (disabled)" );
@@ -337,7 +339,6 @@
 					$t_min_sev_pref_field = $t_pref_field . '_min_severity';
 					$t_min_sev_notify     = user_pref_get_pref( $t_id, $t_min_sev_pref_field );
 					$t_bug_severity       = bug_get_field( $p_bug_id, 'severity' );
-
 					if ( $t_bug_severity < $t_min_sev_notify ) {
 						log_event( LOG_EMAIL_RECIPIENT, "bug=$p_bug_id, drop $t_id (pref threshold)" );
 						continue;
@@ -353,6 +354,7 @@
 				}
 			}
 
+
 			# Finally, let's get their emails, if they've set one
 			$t_email = user_get_email( $t_id );
 			if ( is_blank( $t_email ) ) {
@@ -361,8 +363,10 @@
 				# @@@ we could check the emails for validity again but I think
 				#   it would be too slow
 				$t_final_recipients[$t_id] = $t_email;
+
 			}
 		}
+		
 
 		return $t_final_recipients;
 	}
@@ -482,7 +486,7 @@
 	# Return false if it were problems sending email
 	function email_generic( $p_bug_id, $p_notify_type, $p_message_id = null, $p_header_optional_params = null ) {
 		$t_ok = true;
-
+	    
 		if ( ON === config_get( 'enable_email_notification' ) ) {
 			ignore_user_abort( true );
 
@@ -497,6 +501,7 @@
 
 				# send email to every recipient
 				foreach ( $t_recipients as $t_user_id => $t_user_email ) {
+					#print "<br>".$t_user_id;
 					# load (push) user language here as build_visible_bug_data assumes current language
 					lang_push( user_pref_get_language( $t_user_id, $t_project_id ) );
 
@@ -613,22 +618,22 @@
 	# --------------------
 	# send notices when a bug is RESOLVED
 	function email_resolved( $p_bug_id ) {
-		email_generic( $p_bug_id, 'resolved', 'email_notification_title_for_status_bug_resolved' );
+		    email_generic( $p_bug_id, 'resolved', 'email_notification_title_for_status_bug_resolved' );
 	}
 	# --------------------
 	# send notices when a bug is CLOSED
 	function email_close( $p_bug_id ) {
-		email_generic( $p_bug_id, 'closed', 'email_notification_title_for_status_bug_closed' );
+		    email_generic( $p_bug_id, 'closed', 'email_notification_title_for_status_bug_closed' );
 	}
 	# --------------------
 	# send notices when a bug is REOPENED
 	function email_reopen( $p_bug_id ) {
-		email_generic( $p_bug_id, 'reopened', 'email_notification_title_for_action_bug_reopened' );
+		    email_generic( $p_bug_id, 'reopened', 'email_notification_title_for_action_bug_reopened' );
 	}
 	# --------------------
 	# send notices when a bug is ASSIGNED
 	function email_assign( $p_bug_id ) {
-		email_generic( $p_bug_id, 'owner', 'email_notification_title_for_action_bug_assigned' );
+		    email_generic( $p_bug_id, 'owner', 'email_notification_title_for_action_bug_assigned' );
 	}
 	# --------------------
 	# send notices when a bug is DELETED
@@ -839,9 +844,14 @@
 		$p_subject = bug_get_field( $p_bug_id, 'summary' );
 
 		# padd the bug id with zeros
+		if ( bug_get_field( $p_bug_id, 'severity' ) == config_get( 'task_severity_threshold' ) ) {
+			$t_title = lang_get( 'email_subject_task' );
+		} else {
+			$t_title = lang_get( 'email_subject_bug' );
+		}
 		$p_bug_id = bug_format_id( $p_bug_id );
 
-		return '['.$p_project_name.' '.$p_bug_id.']: '.$p_subject;
+		return '['.$p_project_name.' '.$t_title.']: '.$p_subject;
 	}
 	# --------------------
 	# clean up LF to CRLF
diff -Naur mantis-1.1.1/core/filter_api.php mantis/core/filter_api.php
--- mantis-1.1.1/core/filter_api.php	2008-01-05 07:58:22.000000000 +0100
+++ mantis/core/filter_api.php	2008-02-20 14:29:08.000000000 +0100
@@ -362,7 +362,7 @@
 
 		$t_filter = array(
 			'show_category'		=> Array ( '0' => META_FILTER_ANY ),
-			'show_severity'		=> Array ( '0' => META_FILTER_ANY ),
+			'show_severity'		=> Array ( '0' => META_FILTER_BUGS ),
 			'show_status'		=> Array ( '0' => META_FILTER_ANY ),
 			'highlight_changed'	=> $t_default_show_changed,
 			'reporter_id'		=> Array ( '0' => META_FILTER_ANY ),
@@ -448,6 +448,7 @@
 		} else {
 			$t_filter = $p_custom_filter;
 		}
+		
 
 		$t_filter = filter_ensure_valid_filter( $t_filter );
 
@@ -713,9 +714,13 @@
 
 		# severity
 		$t_any_found = false;
+		$t_bugs = false;
 		foreach( $t_filter['show_severity'] as $t_filter_member ) {
 			if ( ( META_FILTER_ANY == $t_filter_member ) || ( 0 === $t_filter_member ) ) {
 				$t_any_found = true;
+			} else if ( META_FILTER_BUGS == $t_filter_member ) {
+				$t_any_found = true;
+				$t_bugs = true;
 			}
 		}
 		if ( count( $t_filter['show_severity'] ) == 0 ) {
@@ -734,6 +739,10 @@
 				array_push( $t_where_clauses, "( $t_bug_table.severity=$t_clauses[0] )" );
 			}
 		}
+		if ( $t_bugs ) {
+			$t_feature = config_get( 'task_severity_threshold' );
+			array_push( $t_where_clauses, "( $t_bug_table.severity > $t_feature )" ); 
+		}
 
 		# show / hide status
 		# take a list of all available statuses then remove the ones that we want hidden, then make sure
@@ -1813,7 +1822,8 @@
 								$t_output = '';
 								$t_any_found = false;
 								if ( count( $t_filter['show_severity'] ) == 0 ) {
-									PRINT lang_get( 'any' );
+									#PRINT lang_get( 'any' );
+									PRINT lang_get( 'view_bugs_link' );
 								} else {
 									$t_first_flag = true;
 									foreach( $t_filter['show_severity'] as $t_current ) {
@@ -1821,7 +1831,7 @@
 										<input type="hidden" name="show_severity[]" value="<?php echo $t_current;?>" />
 										<?php
 										$t_this_string = '';
-										if ( ( $t_current === META_FILTER_ANY ) || ( is_blank( $t_current ) ) || ( $t_current == 0 ) ) {
+										if ( ( $t_current === META_FILTER_ANY ) || ( $t_current === META_FILTER_BUGS ) || ( is_blank( $t_current ) ) || ( $t_current == 0 ) ) {
 											$t_any_found = true;
 										} else {
 											$t_this_string = get_enum_element( 'severity', $t_current );
@@ -1834,7 +1844,8 @@
 										$t_output = $t_output . $t_this_string;
 									}
 									if ( true == $t_any_found ) {
-										PRINT lang_get( 'any' );
+										#PRINT lang_get( 'any' );
+										PRINT lang_get( 'view_bugs_link' );
 									} else {
 										PRINT $t_output;
 									}
@@ -3123,6 +3134,9 @@
 		if ( !isset( $p_filter_arr['tag_select'] ) ) {
 			$p_filter_arr['tag_select'] = gpc_get_string( 'tag_select', '' );
 		}
+		if ( !isset( $p_filter_arr['show_severity'] ) ) {
+			$p_filter_arr['show_severity'] = META_FILTER_BUGS;
+		}
 
 		$t_custom_fields 		= custom_field_get_ids(); # @@@ (thraxisp) This should really be the linked ids, but we don't know the project
 		$f_custom_fields_data 	= array();
@@ -3400,7 +3414,8 @@
 		global $t_select_modifier, $t_filter;
 		?><!-- Severity -->
 			<select <?php PRINT $t_select_modifier;?> name="show_severity[]">
-				<option value="<?php echo META_FILTER_ANY ?>" <?php check_selected( $t_filter['show_severity'], META_FILTER_ANY ); ?>>[<?php echo lang_get( 'any' ) ?>]</option>
+				<option value="<?php echo META_FILTER_ANY ?>">[<?php echo lang_get( 'any' ) ?>]</option>
+				<option value="<?php echo META_FILTER_BUGS ?>" <?php check_selected( $t_filter['show_severity'], META_FILTER_BUGS ); ?>>[<?php echo lang_get( 'view_bugs_link' ) ?>]</option>
 				<?php print_enum_string_option_list( 'severity', $t_filter['show_severity'] ) ?>
 			</select>
 		<?php
diff -Naur mantis-1.1.1/core/helper_api.php mantis/core/helper_api.php
--- mantis-1.1.1/core/helper_api.php	2007-10-14 21:01:22.000000000 +0200
+++ mantis/core/helper_api.php	2008-02-04 09:53:58.000000000 +0100
@@ -341,7 +341,7 @@
 	
 	# --------------------
 	function helper_get_columns_to_view( $p_columns_target = COLUMNS_TARGET_VIEW_PAGE ) {
-		$t_columns = helper_call_custom_function( 'get_columns_to_view', array( $p_columns_target ) );
+		$t_columns = helper_call_custom_function( 'get_columns_to_view', array( $p_columns_target ) );	
 
 		$t_enable_sponsorship = config_get( 'enable_sponsorship' );
 		if ( OFF == $t_enable_sponsorship ) {
diff -Naur mantis-1.1.1/core/history_api.php mantis/core/history_api.php
--- mantis-1.1.1/core/history_api.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/core/history_api.php	2008-02-13 11:10:42.000000000 +0100
@@ -33,19 +33,21 @@
 				$p_user_id	= auth_get_current_user_id();
 			}
 
-			$c_field_name	= db_prepare_string( $p_field_name );
-			$c_old_value	= db_prepare_string( $p_old_value );
-			$c_new_value	= db_prepare_string( $p_new_value );
-			$c_bug_id		= db_prepare_int( $p_bug_id );
-			$c_user_id		= db_prepare_int( $p_user_id );
+			if ( $c_field_name != 'task_order' ) {
+			    $c_field_name	= db_prepare_string( $p_field_name );
+			    $c_old_value	= db_prepare_string( $p_old_value );
+			    $c_new_value	= db_prepare_string( $p_new_value );
+			    $c_bug_id		= db_prepare_int( $p_bug_id );
+			    $c_user_id		= db_prepare_int( $p_user_id );
 
-			$t_mantis_bug_history_table = config_get( 'mantis_bug_history_table' );
+			    $t_mantis_bug_history_table = config_get( 'mantis_bug_history_table' );
 
-			$query = "INSERT INTO $t_mantis_bug_history_table
+			    $query = "INSERT INTO $t_mantis_bug_history_table
 						( user_id, bug_id, date_modified, field_name, old_value, new_value )
 					VALUES
 						( '$c_user_id', '$c_bug_id', " . db_now() . ", '$c_field_name', '$c_old_value', '$c_new_value' )";
-			$result = db_query( $query );
+			    $result = db_query( $query );
+			}
 		}
 	}
 	# --------------------
diff -Naur mantis-1.1.1/core/html_api.php mantis/core/html_api.php
--- mantis-1.1.1/core/html_api.php	2008-01-19 09:14:32.000000000 +0100
+++ mantis/core/html_api.php	2008-02-20 15:02:19.000000000 +0100
@@ -529,6 +529,9 @@
 				if ( access_has_project_level( config_get( 'report_bug_threshold' ) ) ) {
 					$t_menu_options[] = string_get_bug_report_link();
 				}
+    
+				# Task List
+				$t_menu_options[] = '<a href="task_list_page.php">' . lang_get( 'task_list_link' ) . '</a>';
 
 				# Changelog Page
 				if ( access_has_project_level( config_get( 'view_changelog_threshold' ) ) ) {
@@ -954,17 +957,42 @@
 	}
 
 	# --------------------
+	# Print a button to update the given bug
+	function html_button_process_update( $p_bug_id ) {
+		$t_bug_current_state = bug_get_field( $p_bug_id, 'status' );
+		$t_bug_current_handler = bug_get_field( $p_bug_id, 'handler_id' );
+		$t_current_user_id = auth_get_current_user_id();		
+		if ( ($t_bug_current_state != 60) && 
+			$t_bug_current_handler == $t_current_user_id &&
+			access_has_bug_level( config_get( 'update_process_threshold' ), $p_bug_id ) ) {
+		    echo "<form method=\"post\" action=\"bug_process.php\">";
+		    $t_button_text = lang_get( 'bug_process_button' );
+		    echo "<input type=\"submit\" class=\"button\" value=\"$t_button_text\" />";
+		    $t_bug_id = string_attribute( $p_bug_id );
+		    echo "<input type=\"hidden\" name=\"bug_id\" value=\"$t_bug_id\" />\n";
+		    echo "</form>\n";
+		}
+	}
+
+
+	# --------------------
 	# Print Change Status to: button
 	#  This code is similar to print_status_option_list except
 	#   there is no masking, except for the current state
 	function html_button_bug_change_status( $p_bug_id ) {
 		$t_bug_project_id = bug_get_field( $p_bug_id, 'project_id' );
 		$t_bug_current_state = bug_get_field( $p_bug_id, 'status' );
+		$t_bug_current_severity = bug_get_field( $p_bug_id, 'severity' );
 		$t_current_access = access_get_project_level( $t_bug_project_id );
 
 		$t_enum_list = get_status_option_list( $t_current_access, $t_bug_current_state, false,
 				( bug_get_field( $p_bug_id, 'reporter_id' ) == auth_get_current_user_id() && ( ON == config_get( 'allow_reporter_close' ) ) ) );
-
+		
+		if ( ($t_bug_current_state <= $g_bug_assigned_status ) &&
+			( $t_current_access >= config_get( 'task_manager_threshold' ) ) && 
+			( $t_bug_current_severity == config_get( 'task_severity_threshold' ) ) )
+			$t_enum_list[CLOSED] = get_enum_element( 'status', CLOSED );
+		
 		if ( count( $t_enum_list ) > 0 ) {
 			# resort the list into ascending order after noting the key from the first element (the default)
 			$t_default_arr = each( $t_enum_list );
@@ -1010,6 +1038,7 @@
 
 		$t_reporter_id = bug_get_field( $p_bug_id, 'reporter_id' );
 		$t_handler_id = bug_get_field( $p_bug_id, 'handler_id' );
+		# $t_task = task_is_task( $p_bug_id );
 		$t_current_user_id = auth_get_current_user_id();
 		$t_new_status = ( ON == config_get( 'auto_set_status_to_assigned' ) ) ? config_get( 'bug_assigned_status' ) : $t_status;
 
@@ -1057,19 +1086,18 @@
 			    $t_already_selected = true;
 			}
 
-			PRINT ">$t_caption</option>";
+			PRINT ">$t_caption</option>\n";
 		}
 
 		# allow un-assigning if already assigned.
 		if ( $t_handler_id != 0 ) {
-			PRINT "<option value=\"0\"></option>";
+			PRINT "<option value=\"0\"></option>\n";
 		}
 
 		$t_project_id = bug_get_field( $p_bug_id, 'project_id' );
 		# 0 means currently selected
 		print_assign_to_option_list( 0, $t_project_id );
-		PRINT "</select>";
-
+		PRINT "</select><br>\n";
 		$t_bug_id = string_attribute( $p_bug_id );
 		PRINT "<input type=\"hidden\" name=\"bug_id\" value=\"$t_bug_id\" />\n";
 
@@ -1175,6 +1203,11 @@
 			echo '<td class="center">';
 			html_button_bug_update( $p_bug_id );
 			echo '</td>';
+			
+			# PROCESS button
+			echo '<td class="center">';
+			html_button_process_update( $p_bug_id );
+			echo '</td>';
 
 			# ASSIGN button
 			echo '<td class="center">';
diff -Naur mantis-1.1.1/core/print_api.php mantis/core/print_api.php
--- mantis-1.1.1/core/print_api.php	2008-01-16 23:16:24.000000000 +0100
+++ mantis/core/print_api.php	2008-02-21 09:31:17.000000000 +0100
@@ -1055,6 +1055,66 @@
 			PRINT "<option value=\"".$key."\">".$val."</option>";
 		}
 	}
+	
+	# --------------------
+	# @@@ preliminary support for multiple task actions.
+	function print_all_task_action_option_list() {
+		$commands = array(  
+							'CLOSE' => lang_get('actiongroup_menu_close'),
+							'UP_CATEGORY' => lang_get('actiongroup_menu_update_category'),
+							'EXT_ADD_NOTE' => lang_get( 'actiongroup_menu_add_note' ),
+							'EXT_ATTACH_TAGS' => lang_get( 'actiongroup_menu_attach_tags' ),
+					);
+
+		$t_project_id = helper_get_current_project();
+
+		if ( ALL_PROJECTS != $t_project_id ) {
+			$t_user_id = auth_get_current_user_id();
+
+			if ( access_has_project_level( config_get( 'update_bug_threshold' ), $t_project_id ) ) {
+				$commands['UP_FIXED_IN_VERSION'] = lang_get( 'actiongroup_menu_update_fixed_in_version' );
+			}
+
+			if ( access_has_project_level( config_get( 'roadmap_update_threshold' ), $t_project_id ) ) {
+				$commands['UP_TARGET_VERSION'] = lang_get( 'actiongroup_menu_update_target_version' );
+			}
+			if ( current_user_get_access_level() >= config_get( 'task_manager_threshold' ) ){
+				$commands['UP_DEADLINE'] = lang_get( 'actiongroup_menu_update_deadline' );
+			}
+
+			$t_custom_field_ids = custom_field_get_linked_ids( $t_project_id );
+
+			foreach( $t_custom_field_ids as $t_custom_field_id ) {
+				# if user has not access right to modify the field, then there is no
+				# point in showing it.
+				if ( !custom_field_has_write_access_to_project( $t_custom_field_id, $t_project_id, $t_user_id ) ) {
+					continue;
+				}
+
+				$t_custom_field_def = custom_field_get_definition( $t_custom_field_id );
+				$t_command_id = 'custom_field_' . $t_custom_field_id;
+				$t_command_caption = sprintf( lang_get( 'actiongroup_menu_update_field' ), lang_get_defaulted( $t_custom_field_def['name'] ) );
+				$commands[$t_command_id] = string_display( $t_command_caption );
+			}
+		}
+
+		$t_custom_group_actions = config_get( 'custom_group_actions' );
+
+		foreach( $t_custom_group_actions as $t_custom_group_action ) {
+			# use label if provided to get the localized text, otherwise fallback to action name.
+			if ( isset( $t_custom_group_action['label'] ) ) {
+				$commands[$t_custom_group_action['action']] = lang_get_defaulted( $t_custom_group_action['label'] );
+			} else {
+				$commands[$t_custom_group_action['action']] = lang_get_defaulted( $t_custom_group_action['action'] );
+			}
+		}
+
+		while (list ($key,$val) = each ($commands)) {
+			PRINT "<option value=\"".$key."\">".$val."</option>";
+		}
+	}
+	
+	
 	# --------------------
 	# list of users that are NOT in the specified project and that are enabled
 	# if no project is specified use the current project
diff -Naur mantis-1.1.1/core/project_api.php mantis/core/project_api.php
--- mantis-1.1.1/core/project_api.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/core/project_api.php	2008-02-17 11:07:42.000000000 +0100
@@ -546,7 +546,7 @@
 				FROM $t_user_table
 				WHERE enabled = $t_on
 					AND access_level $t_global_access_clause";
-
+		
 		$result = db_query( $query );
 		$t_row_count = db_num_rows( $result );
 		for ( $i=0 ; $i < $t_row_count ; $i++ ) {
@@ -561,7 +561,6 @@
 				WHERE l.user_id = u.id
 				AND u.enabled = $t_on
 				AND l.project_id = $c_project_id";
-
 			$result = db_query( $query );
 			$t_row_count = db_num_rows( $result );
 			for ( $i=0 ; $i < $t_row_count ; $i++ ) {
@@ -581,8 +580,7 @@
 				}
 			}
 		}
-
-		return array_values( $t_users );
+		 return array_values( $t_users );
 	}
 
 
diff -Naur mantis-1.1.1/core/task_api.php mantis/core/task_api.php
--- mantis-1.1.1/core/task_api.php	1970-01-01 01:00:00.000000000 +0100
+++ mantis/core/task_api.php	2008-02-20 19:49:07.000000000 +0100
@@ -0,0 +1,1441 @@
+<?php
+# Mantis - a php based bugtracking system
+
+# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+
+# Mantis 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.
+#
+# Mantis 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 Mantis.  If not, see <http://www.gnu.org/licenses/>.
+
+	# --------------------------------------------------------
+	# $Id: bug_api.php,v 1.111.2.1 2007-10-13 22:35:13 giallu Exp $
+	# --------------------------------------------------------
+
+	$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
+
+	require_once( $t_core_dir . 'bug_api.php' );
+	
+	function task_get_users ( $p_project_id ) {
+		$c_project_id = db_prepare_int( $p_project_id );
+		$t_user_table = config_get ( 'mantis_user_table' );
+		$t_users_in_project_table = config_get( 'mantis_project_user_list_table' ); 
+
+		$query = "SELECT distinct(user_id) as id, username
+			    FROM $t_user_table u, $t_users_in_project_table p
+			    WHERE u.id = p.user_id
+			    AND p.access_level >=".DEVELOPER;
+		if ( $p_project_id ) {
+		    $query .= " AND p.project_id = ".$c_project_id;
+		}
+		$query .= " ORDER BY u.username";
+		$db_result = db_query( $query );
+		$num_users = db_num_rows( $db_result );
+		$t_result = array();
+		for ( $i = 0; $i < $num_users; $i++ ) {
+			$t_row[] = db_fetch_array( $db_result );
+			array_push( $t_result, $t_row[$i]['id']);
+		}
+		return $t_result;
+	}
+	
+	# --------------------------
+	# Add a bug as a new task to the user
+	function task_add_task ( $p_bug_id, $p_user_id = null ) {
+		$t_bug_id = db_prepare_int ( $p_bug_id );
+		$t_current_project_id = bug_get_field( $p_bug_id, 'project_id' );
+
+		if ( $p_user_id ) {
+			//get next order number
+			$t_next_order = task_get_next_task_order( $p_user_id, $t_current_project_id );
+			$t_next_order = (integer)$t_next_order + 1; 
+		} else {
+			$t_severity = bug_get_field( $p_bug_id, 'severity' );
+			$t_next_order = task_get_next_task_order( null, $t_current_project_id, $t_severity );
+			$t_next_order = (integer)$t_next_order + 1; 
+		}
+		$temp = db_prepare_int( $t_next_order );
+		bug_set_field( $p_bug_id, 'task_order', $temp );	
+	}
+	
+	# --------------------------
+	# Removes task from a task list
+	function task_remove_task ( $p_bug_id ) {
+		bug_set_field( $p_bug_id, 'task_order', 0 );	    
+	}
+	
+
+	function task_get_next_task_order ( $p_user_id, $p_project_id, $p_status = NEW_ ) {
+		$t_status = db_prepare_int ( $p_sstatus );
+		$t_project_id = db_prepare_int ( $p_project_id );
+		$t_closed = CLOSED;
+		$t_bug_table = config_get( 'mantis_bug_table' );
+		if ( $p_user_id ) {
+			$query = "SELECT max(task_order) as next_order
+							FROM $t_bug_table
+							WHERE handler_id = $p_user_id
+							AND status < $t_closed";
+		} else {
+			$query = "SELECT max(task_order) as next_order
+							FROM $t_bug_table
+							WHERE project_id = $p_project_id
+							AND handler_id = 0
+							AND status"; 
+			# if task had status above new -> it was approved 
+			if ( $p_status >= config_get( 'task_aproved_threshold' ) ) {
+				$t_status = config_get( 'task_severity_threshold' );
+				$query .=" >= $t_status AND status < $t_closed";
+			} else {
+				$query .=" = $p_status";
+			}
+		}
+		$db_result = db_query( $query );
+		$t_result = array();
+		$t_row[] = db_fetch_array( $db_result );
+		return $t_row[0]['next_order'];
+	}
+	
+	function task_get_user_tasks( $p_user_id, $p_status = NEW_ ) {
+		$t_status = db_prepare_int ( $p_status );
+		$t_user_id = db_prepare_int ( $p_user_id );
+		$t_closed = CLOSED;
+		$t_severity = config_get( 'task_severity_threshold' );
+		$t_bug_table = config_get( 'mantis_bug_table' );
+		if ( $t_user_id ) {
+			$query = "SELECT id 
+							FROM $t_bug_table
+							WHERE handler_id = $t_user_id
+							AND severity = $t_severity
+							AND status < $t_closed"; 
+		} else {
+			$query = "SELECT id
+							FROM $t_bug_table
+							WHERE handler_id = 0
+							AND status";
+			if ( $p_status >= config_get( 'task_aproved_threshold' ) ) {
+				$t_status = config_get( 'task_severity_threshold' );
+				$query .=" >= $t_status AND status < $t_closed";
+			} else {
+				$query .=" = $p_status";
+			}						
+		}
+		$query .= " ORDER BY task_order ASC";
+		$db_result = db_query( $query );
+		$num_users = db_num_rows( $db_result );
+		$t_result = array();
+		for ( $i = 0; $i < $num_users; $i++ ) {
+			$t_row[] = db_fetch_array( $db_result );
+			array_push( $t_result, $t_row[$i]['id']);
+		}
+		return $t_result;
+		
+		
+	}
+	
+	function task_get_all_user_task ( $p_users, $p_closed = false )
+	{
+		$t_user_id = db_prepare_int ( $p_user_id );
+		$t_closed = CLOSED;
+		$t_severity = config_get( 'task_severity_threshold' );
+		$t_bug_table = config_get( 'mantis_bug_table' );
+		$query = "SELECT count(id) as count
+			FROM $t_bug_table
+			WHERE severity = $t_severity ";
+		if ( !$p_closed ) {
+			$query .= " AND status < $t_closed ";
+		}
+		$query .= "AND handler_id in ( ".implode( ',', $p_users ).")";
+		$db_result = db_query( $query );
+		$t_result = array();
+		$t_row[] = db_fetch_array( $db_result );
+		return $t_row[0]['count'];
+		
+	
+	}
+	
+	function task_get_unassigned_tasks( $p_project_id, $p_closed = false )
+	{
+		$t_bug_table = config_get( 'mantis_bug_table' );
+		$t_project_id = db_prepare_int( $p_project_id );
+		$t_closed = CLOSED;
+		$t_confirmed = config_get( 'task_aproved_threshold' );
+		$t_feature = config_get( 'task_severity_threshold' );
+		$query = "SELECT id
+						FROM $t_bug_table
+						WHERE project_id = $t_project_id
+						AND handler_id = 0
+						AND severity = $t_feature ";  
+		if ( $p_closed ) {
+				$query .= "AND status = $t_closed 
+								ORDER BY last_updated desc ";
+		} else {
+				$query .= "AND status >= $t_confirmed 
+								AND status < $t_closed 
+								ORDER BY task_order ASC";
+		}
+		$db_result = db_query( $query );
+		$num_users = db_num_rows( $db_result );
+		$t_result = array();
+		for ( $i = 0; $i < $num_users; $i++ ) {
+			$t_row[] = db_fetch_array( $db_result );
+			array_push( $t_result, $t_row[$i]['id']);
+		}
+		return $t_result;
+		
+	}
+
+	function task_get_unconfirmed_tasks( $p_project_id, $p_closed = false )
+	{
+		$t_bug_table = config_get( 'mantis_bug_table' );
+		$t_project_id = db_prepare_int( $p_project_id );
+		$t_closed = CLOSED;
+		$t_confirmed = config_get( 'task_aproved_threshold' );
+		$t_feature = config_get( 'task_severity_threshold' );
+		$query = "SELECT id
+						FROM $t_bug_table
+						WHERE project_id = $t_project_id
+						AND handler_id = 0
+						AND severity = $t_feature ";  
+		if ( $p_closed ) {
+				$query .= "AND status = $t_closed 
+								ORDER BY last_updated desc ";
+		} else {
+				$query .= "AND status < $t_confirmed 
+								AND status < $t_closed 
+								ORDER BY task_order ASC";
+		}
+		$db_result = db_query( $query );
+		$num_users = db_num_rows( $db_result );
+		$t_result = array();
+		for ( $i = 0; $i < $num_users; $i++ ) {
+			$t_row[] = db_fetch_array( $db_result );
+			array_push( $t_result, $t_row[$i]['id']);
+		}
+		return $t_result;
+		
+	}
+
+	
+/*	function task_remove_unassigned_from_project ( $p_project_id ) {
+		$t_bug_table = config_get( 'mantis_bug_table' );
+		$t_project_id = db_prepare_int( $p_project_id );
+		$query = "UPDATE $t_bug_table
+			   SET previous_task_id = 0,
+				next_task_id = 0
+			   WHERE status < ".CLOSED."
+			   AND project_id = $p_project_id";
+		$db_result = db_query( $query );				
+	}*/
+	
+	
+	function task_is_task ( $p_bug_id ) {
+		 $t_is_task = bug_get_field( $p_bug_id, 'severity' );
+		 if ( $t_is_task == config_get( 'task_severity_threshold' ) )
+		 	return true;
+		 else
+		   return false;
+	}
+/*
+	#===================================
+	# Creation / Deletion / Updating
+	#===================================
+
+	# --------------------
+	# Create a new bug and return the bug id
+	#
+	function bug_create( $p_bug_data ) {
+
+		$c_summary				= db_prepare_string( $p_bug_data->summary );
+		$c_description			= db_prepare_string( $p_bug_data->description );
+		$c_project_id			= db_prepare_int( $p_bug_data->project_id );
+		$c_reporter_id			= db_prepare_int( $p_bug_data->reporter_id );
+		$c_handler_id			= db_prepare_int( $p_bug_data->handler_id );
+		$c_priority				= db_prepare_int( $p_bug_data->priority );
+		$c_severity				= db_prepare_int( $p_bug_data->severity );
+		$c_reproducibility		= db_prepare_int( $p_bug_data->reproducibility );
+		$c_category				= db_prepare_string( $p_bug_data->category );
+		$c_os					= db_prepare_string( $p_bug_data->os );
+		$c_os_build				= db_prepare_string( $p_bug_data->os_build );
+		$c_platform				= db_prepare_string( $p_bug_data->platform );
+		$c_version				= db_prepare_string( $p_bug_data->version );
+		$c_build				= db_prepare_string( $p_bug_data->build );
+		$c_profile_id			= db_prepare_int( $p_bug_data->profile_id );
+		$c_view_state			= db_prepare_int( $p_bug_data->view_state );
+		$c_steps_to_reproduce	= db_prepare_string( $p_bug_data->steps_to_reproduce );
+		$c_additional_info		= db_prepare_string( $p_bug_data->additional_information );
+		$c_sponsorship_total 	= 0;
+		$c_sticky 				= 0;
+		$c_previous_task_id			= db_prepare_int($p_bug_data->previous_task_id);
+		$c_next_task_id				= db_prepare_int($p_bug_data->next_task_id);
+
+		# Summary cannot be blank
+		if ( is_blank( $c_summary ) ) {
+			error_parameters( lang_get( 'summary' ) );
+			trigger_error( ERROR_EMPTY_FIELD, ERROR );
+		}
+
+		# Description cannot be blank
+		if ( is_blank( $c_description ) ) {
+			error_parameters( lang_get( 'description' ) );
+			trigger_error( ERROR_EMPTY_FIELD, ERROR );
+		}
+
+		# If category is not specified and not defaulted + project has categories defined, then error.
+		if ( is_blank( $c_category ) && ( category_get_count( $c_project_id ) > 0 ) ) {
+			error_parameters( lang_get( 'category' ) );
+			trigger_error( ERROR_EMPTY_FIELD, ERROR );
+		}
+
+		# Only set target_version if user has access to do so
+		if ( access_has_project_level( config_get( 'roadmap_update_threshold' ) ) ) {
+			$c_target_version	= db_prepare_string( $p_bug_data->target_version );
+		} else { 
+			$c_target_version	= '';
+		}
+
+		$t_bug_table				= config_get( 'mantis_bug_table' );
+		$t_bug_text_table			= config_get( 'mantis_bug_text_table' );
+		$t_project_category_table	= config_get( 'mantis_project_category_table' );
+
+		# Insert text information
+		$query = "INSERT INTO $t_bug_text_table
+				    ( description, steps_to_reproduce, additional_information )
+				  VALUES
+				    ( '$c_description', '$c_steps_to_reproduce',
+				      '$c_additional_info' )";
+		db_query( $query );
+
+		# Get the id of the text information we just inserted
+		# NOTE: this is guarranteed to be the correct one.
+		# The value LAST_INSERT_ID is stored on a per connection basis.
+
+		$t_text_id = db_insert_id($t_bug_text_table);
+
+		# check to see if we want to assign this right off
+		$t_status = config_get( 'bug_submit_status' );
+
+		# if not assigned, check if it should auto-assigned.
+		if ( 0 == $c_handler_id ) {
+			# if a default user is associated with the category and we know at this point
+			# that that the bug was not assigned to somebody, then assign it automatically.
+			$query = "SELECT user_id
+					  FROM $t_project_category_table
+					  WHERE project_id='$c_project_id' AND category='$c_category'";
+			$result = db_query( $query );
+
+			if ( db_num_rows( $result ) > 0 ) {
+				$c_handler_id = $p_handler_id = db_result( $result );
+			}
+		}
+
+		# Check if bug was pre-assigned or auto-assigned.
+		if ( ( $c_handler_id != 0 ) && ( ON == config_get( 'auto_set_status_to_assigned' ) ) ) {
+			$t_status = config_get( 'bug_assigned_status' );
+		}
+
+		# Insert the rest of the data
+		$t_resolution = OPEN;
+
+		$query = "INSERT INTO $t_bug_table
+				    ( project_id,
+				      reporter_id, handler_id,
+				      duplicate_id, priority,
+				      severity, reproducibility,
+				      status, resolution,
+				      projection, category,
+				      date_submitted, last_updated,
+				      eta, bug_text_id,
+				      os, os_build,
+				      platform, version,
+				      build,
+				      profile_id, summary, view_state, sponsorship_total, sticky, fixed_in_version,
+				      target_version, previous_task_id, next_task_id
+				    )
+				  VALUES
+				    ( '$c_project_id',
+				      '$c_reporter_id', '$c_handler_id',
+				      '0', '$c_priority',
+				      '$c_severity', '$c_reproducibility',
+				      '$t_status', '$t_resolution',
+				      10, '$c_category',
+				      " . db_now() . "," . db_now() . ",
+				      10, '$t_text_id',
+				      '$c_os', '$c_os_build',
+				      '$c_platform', '$c_version',
+				      '$c_build',
+				      '$c_profile_id', '$c_summary', '$c_view_state', '$c_sponsorship_total', '$c_sticky', '',
+				      '$c_target_version', '$c_previous_task_id', '$c_next_task_id'
+				    )";
+		db_query( $query );
+
+		$t_bug_id = db_insert_id($t_bug_table);
+
+		# log new bug
+		history_log_event_special( $t_bug_id, NEW_BUG );
+
+		# log changes, if any (compare happens in history_log_event_direct)
+		history_log_event_direct( $t_bug_id, 'status', config_get( 'bug_submit_status' ), $t_status );
+		history_log_event_direct( $t_bug_id, 'handler_id', 0, $c_handler_id );
+
+		return $t_bug_id;
+	}
+
+	# --------------------
+	# Copy a bug from one project to another. Also make copies of issue notes, attachments, history,
+	# email notifications etc.
+	# @@@ Not managed FTP file upload
+	# MASC RELATIONSHIP
+	function bug_copy( $p_bug_id, $p_target_project_id = null, $p_copy_custom_fields = false, $p_copy_relationships = false,
+		$p_copy_history = false, $p_copy_attachments = false, $p_copy_bugnotes = false, $p_copy_monitoring_users = false ) {
+		global $g_db;
+
+		$t_mantis_custom_field_string_table	= config_get( 'mantis_custom_field_string_table' );
+		$t_mantis_bug_file_table			= config_get( 'mantis_bug_file_table' );
+		$t_mantis_bugnote_table				= config_get( 'mantis_bugnote_table' );
+		$t_mantis_bugnote_text_table		= config_get( 'mantis_bugnote_text_table' );
+		$t_mantis_bug_monitor_table			= config_get( 'mantis_bug_monitor_table' );
+		$t_mantis_bug_history_table			= config_get( 'mantis_bug_history_table' );
+		$t_mantis_db = $g_db;
+
+		$t_bug_id = db_prepare_int( $p_bug_id );
+		$t_target_project_id = db_prepare_int( $p_target_project_id );
+
+
+		$t_bug_data = new BugData;
+		$t_bug_data = bug_get( $t_bug_id, true );
+
+		# retrieve the project id associated with the bug
+		if ( ( $p_target_project_id == null ) || is_blank( $p_target_project_id ) ) {
+			$t_target_project_id = $t_bug_data->project_id;
+		}
+
+		$t_bug_data->project_id = $t_target_project_id;
+
+		$t_new_bug_id = bug_create( $t_bug_data );
+
+		# MASC ATTENTION: IF THE SOURCE BUG HAS TO HANDLER THE bug_create FUNCTION CAN TRY TO AUTO-ASSIGN THE BUG
+		# WE FORCE HERE TO DUPLICATE THE SAME HANDLER OF THE SOURCE BUG
+		# @@@ VB: Shouldn't we check if the handler in the source project is also a handler in the destination project?
+		bug_set_field( $t_new_bug_id, 'handler_id', $t_bug_data->handler_id );
+
+		bug_set_field( $t_new_bug_id, 'duplicate_id', $t_bug_data->duplicate_id );
+		bug_set_field( $t_new_bug_id, 'status', $t_bug_data->status );
+		bug_set_field( $t_new_bug_id, 'resolution', $t_bug_data->resolution );
+		bug_set_field( $t_new_bug_id, 'projection', $t_bug_data->projection );
+		bug_set_field( $t_new_bug_id, 'date_submitted', $t_mantis_db->DBTimeStamp( $t_bug_data->date_submitted ), false );
+		bug_set_field( $t_new_bug_id, 'last_updated', $t_mantis_db->DBTimeStamp( $t_bug_data->last_updated ), false );
+		bug_set_field( $t_new_bug_id, 'eta', $t_bug_data->eta );
+		bug_set_field( $t_new_bug_id, 'fixed_in_version', $t_bug_data->fixed_in_version );
+		bug_set_field( $t_new_bug_id, 'target_version', $t_bug_data->target_version );
+		bug_set_field( $t_new_bug_id, 'sponsorship_total', 0 );
+		bug_set_field( $t_new_bug_id, 'sticky', 0 );
+		bug_set_field( $t_new_bug_id, 'previous_task_id', $t_bug_data->previous_task_id);
+		bug_set_field( $t_new_bug_id, 'next_task_id', $t_bug_data->next_task_id);
+
+		# COPY CUSTOM FIELDS
+		if ( $p_copy_custom_fields ) {
+			$query = "SELECT field_id, bug_id, value
+					   FROM $t_mantis_custom_field_string_table
+					   WHERE bug_id = '$t_bug_id';";
+			$result = db_query( $query );
+			$t_count = db_num_rows( $result );
+
+			for ( $i = 0 ; $i < $t_count ; $i++ ) {
+				$t_bug_custom = db_fetch_array( $result );
+
+				$c_field_id = db_prepare_int( $t_bug_custom['field_id'] );
+				$c_new_bug_id = db_prepare_int( $t_new_bug_id );
+				$c_value = db_prepare_string( $t_bug_custom['value'] );
+
+				$query = "INSERT INTO $t_mantis_custom_field_string_table
+						   ( field_id, bug_id, value )
+						   VALUES ('$c_field_id', '$c_new_bug_id', '$c_value')";
+				db_query( $query );
+			}
+		}
+
+		# COPY RELATIONSHIPS
+		if ( $p_copy_relationships ) {
+			if ( ON == config_get( 'enable_relationship' ) ) {
+				relationship_copy_all( $t_bug_id,$t_new_bug_id );
+			}
+		}
+
+		# Copy bugnotes
+		if ( $p_copy_bugnotes ) {
+			$query = "SELECT *
+					  FROM $t_mantis_bugnote_table
+					  WHERE bug_id = '$t_bug_id';";
+			$result = db_query( $query );
+			$t_count = db_num_rows( $result );
+
+			for ( $i = 0; $i < $t_count; $i++ ) {
+				$t_bug_note = db_fetch_array( $result );
+				$t_bugnote_text_id = $t_bug_note['bugnote_text_id'];
+
+				$query2 = "SELECT *
+						   FROM $t_mantis_bugnote_text_table
+						   WHERE id = '$t_bugnote_text_id';";
+				$result2 = db_query( $query2 );
+				$t_count2 = db_num_rows( $result2 );
+
+				$t_bugnote_text_insert_id = -1;
+				if ( $t_count2 > 0 ) {
+					$t_bugnote_text = db_fetch_array( $result2 );
+					$t_bugnote_text['note'] = db_prepare_string( $t_bugnote_text['note'] );
+
+					$query2 = "INSERT INTO $t_mantis_bugnote_text_table
+							   ( note )
+							   VALUES ( '" . $t_bugnote_text['note'] . "' );";
+					db_query( $query2 );
+					$t_bugnote_text_insert_id = db_insert_id( $t_mantis_bugnote_text_table );
+				}
+
+				$query2 = "INSERT INTO $t_mantis_bugnote_table
+						   ( bug_id, reporter_id, bugnote_text_id, view_state, date_submitted, last_modified )
+						   VALUES ( '$t_new_bug_id',
+						   			'" . $t_bug_note['reporter_id'] . "',
+						   			'$t_bugnote_text_insert_id',
+						   			'" . $t_bug_note['view_state'] . "',
+						   			'" . $t_bug_note['date_submitted'] . "',
+						   			'" . $t_bug_note['last_modified'] . "' );";
+				db_query( $query2 );
+			}
+		}
+
+		# Copy attachments
+		if ( $p_copy_attachments ) {
+			$query = "SELECT *
+					  FROM $t_mantis_bug_file_table
+					  WHERE bug_id = '$t_bug_id';";
+			$result = db_query( $query );
+			$t_count = db_num_rows( $result );
+
+			$t_bug_file = array();
+			for ( $i = 0; $i < $t_count; $i++ ) {
+				$t_bug_file = db_fetch_array( $result );
+
+				# prepare the new diskfile name and then copy the file
+				$t_file_path = dirname( $t_bug_file['folder'] );
+				$t_new_diskfile_name = $t_file_path . file_generate_unique_name( 'bug-' . $p_file_name, $t_file_path );
+				$t_new_file_name = file_get_display_name( $t_bug_file['filename'] );
+				if ( ( config_get( 'file_upload_method' ) == DISK ) ) {
+					copy( $t_bug_file['diskfile'], $t_new_diskfile_name );
+					chmod( $t_new_diskfile_name, config_get( 'attachments_file_permissions' ) );
+				}
+
+				$query = "INSERT INTO $t_mantis_bug_file_table
+						( bug_id, title, description, diskfile, filename, folder, filesize, file_type, date_added, content )
+						VALUES ( '$t_new_bug_id',
+								 '" . db_prepare_string( $t_bug_file['title'] ) . "',
+								 '" . db_prepare_string( $t_bug_file['description'] ) . "',
+								 '" . db_prepare_string( $t_new_diskfile_name ) . "',
+								 '" . db_prepare_string( $t_new_file_name ) . "',
+								 '" . db_prepare_string( $t_bug_file['folder'] ) . "',
+								 '" . db_prepare_int( $t_bug_file['filesize'] ) . "',
+								 '" . db_prepare_string( $t_bug_file['file_type'] ) . "',
+								 '" . db_prepare_string( $t_bug_file['date_added'] ) . "',
+								 '" . db_prepare_string( $t_bug_file['content'] ) . "');";
+				db_query( $query );
+			}
+		}
+
+		# Copy users monitoring bug
+		if ( $p_copy_monitoring_users ) {
+			$query = "SELECT *
+					  FROM $t_mantis_bug_monitor_table
+					  WHERE bug_id = '$t_bug_id';";
+			$result = db_query( $query );
+			$t_count = db_num_rows( $result );
+
+			for ( $i = 0; $i < $t_count; $i++ ) {
+				$t_bug_monitor = db_fetch_array( $result );
+				$query = "INSERT INTO $t_mantis_bug_monitor_table
+						 ( user_id, bug_id )
+						 VALUES ( '" . $t_bug_monitor['user_id'] . "', '$t_new_bug_id' );";
+				db_query( $query );
+			}
+		}
+
+		# COPY HISTORY
+		history_delete( $t_new_bug_id );	# should history only be deleted inside the if statement below?
+		if ( $p_copy_history ) {
+			$query = "SELECT *
+					  FROM $t_mantis_bug_history_table
+					  WHERE bug_id = '$t_bug_id';";
+			$result = db_query( $query );
+			$t_count = db_num_rows( $result );
+
+			for ( $i = 0; $i < $t_count; $i++ ) {
+				$t_bug_history = db_fetch_array( $result );
+				$query = "INSERT INTO $t_mantis_bug_history_table
+						  ( user_id, bug_id, date_modified, field_name, old_value, new_value, type )
+						  VALUES ( '" . db_prepare_int( $t_bug_history['user_id'] ) . "',
+						  		   '$t_new_bug_id',
+						  		   '" . db_prepare_string( $t_bug_history['date_modified'] ) . "',
+						  		   '" . db_prepare_string( $t_bug_history['field_name'] ) . "',
+						  		   '" . db_prepare_string( $t_bug_history['old_value'] ) . "',
+						  		   '" . db_prepare_string( $t_bug_history['new_value'] ) . "',
+						  		   '" . db_prepare_int( $t_bug_history['type'] ) . "' );";
+				db_query( $query );
+			}
+		}
+
+		return $t_new_bug_id;
+	}
+
+	# --------------------
+	# allows bug deletion :
+	# delete the bug, bugtext, bugnote, and bugtexts selected
+	# used in bug_delete.php & mass treatments
+	function bug_delete( $p_bug_id ) {
+		$c_bug_id			= db_prepare_int( $p_bug_id );
+		$t_bug_table		= config_get( 'mantis_bug_table' );
+		$t_bug_text_table	= config_get( 'mantis_bug_text_table' );
+
+		# call pre-deletion custom function
+		helper_call_custom_function( 'issue_delete_validate', array( $p_bug_id ) );
+
+		# log deletion of bug
+		history_log_event_special( $p_bug_id, BUG_DELETED, bug_format_id( $p_bug_id ) );
+
+		email_bug_deleted( $p_bug_id );
+
+		# call post-deletion custom function.  We call this here to allow the custom function to access the details of the bug before 
+		# they are deleted from the database given it's id.  The other option would be to move this to the end of the function and
+		# provide it with bug data rather than an id, but this will break backward compatibility.
+		helper_call_custom_function( 'issue_delete_notify', array( $p_bug_id ) );
+
+		# Unmonitor bug for all users
+		bug_unmonitor( $p_bug_id, null );
+
+		# Delete custom fields
+		custom_field_delete_all_values( $p_bug_id );
+
+		# Delete bugnotes
+		bugnote_delete_all( $p_bug_id );
+
+		# Delete all sponsorships
+		sponsorship_delete( sponsorship_get_all_ids( $p_bug_id ) );
+
+		# MASC RELATIONSHIP
+		# we delete relationships even if the feature is currently off.
+		relationship_delete_all( $p_bug_id );
+		# MASC RELATIONSHIP
+
+		# Delete files
+		file_delete_attachments( $p_bug_id );
+
+		# Detach tags
+		tag_bug_detach_all( $p_bug_id, false );
+		
+		# Delete the bug history
+		history_delete( $p_bug_id );
+
+		# Delete the bugnote text
+		$t_bug_text_id = bug_get_field( $p_bug_id, 'bug_text_id' );
+
+		$query = "DELETE FROM $t_bug_text_table
+				  WHERE id='$t_bug_text_id'";
+		db_query( $query );
+
+		# Delete the bug entry
+		$query = "DELETE FROM $t_bug_table
+				  WHERE id='$c_bug_id'";
+		db_query( $query );
+
+		bug_clear_cache( $p_bug_id );
+		bug_text_clear_cache( $p_bug_id );
+
+		# db_query() errors on failure so:
+		return true;
+	}
+
+	# --------------------
+	# Delete all bugs associated with a project
+	function bug_delete_all( $p_project_id ) {
+		$c_project_id = db_prepare_int( $p_project_id );
+
+		$t_bug_table = config_get( 'mantis_bug_table' );
+
+		$query = "SELECT id
+				  FROM $t_bug_table
+				  WHERE project_id='$c_project_id'";
+		$result = db_query( $query );
+
+		$bug_count = db_num_rows( $result );
+
+		for ( $i=0 ; $i < $bug_count ; $i++ ) {
+			$row = db_fetch_array( $result );
+
+			bug_delete( $row['id'] );
+		}
+
+		# @@@ should we check the return value of each bug_delete() and
+		#  return false if any of them return false? Presumable bug_delete()
+		#  will eventually trigger an error on failure so it won't matter...
+
+		return true;
+	}
+
+	# --------------------
+	# Update a bug from the given data structure
+	#  If the third parameter is true, also update the longer strings table
+	function bug_update( $p_bug_id, $p_bug_data, $p_update_extended = false, $p_bypass_mail = false ) {
+		$c_bug_id		= db_prepare_int( $p_bug_id );
+		$c_bug_data		= bug_prepare_db( $p_bug_data );
+
+		# Summary cannot be blank
+		if ( is_blank( $c_bug_data->summary ) ) {
+			error_parameters( lang_get( 'summary' ) );
+			trigger_error( ERROR_EMPTY_FIELD, ERROR );
+		}
+
+		if ( $p_update_extended ) {
+			# Description field cannot be empty
+			if ( is_blank( $c_bug_data->description ) ) {
+				error_parameters( lang_get( 'description' ) );
+				trigger_error( ERROR_EMPTY_FIELD, ERROR );
+			}
+		}
+
+		if( !is_blank( $p_bug_data->duplicate_id ) && ( $p_bug_data->duplicate_id != 0 ) && ( $p_bug_id == $p_bug_data->duplicate_id ) ) {
+			trigger_error( ERROR_BUG_DUPLICATE_SELF, ERROR );  # never returns
+	    }
+
+		$t_old_data = bug_get( $p_bug_id, true );
+
+		$t_bug_table = config_get( 'mantis_bug_table' );
+
+		# Update all fields
+		# Ignore date_submitted and last_updated since they are pulled out
+		#  as unix timestamps which could confuse the history log and they
+		#  shouldn't get updated like this anyway.  If you really need to change
+		#  them use bug_set_field()
+		$query = "UPDATE $t_bug_table
+				SET project_id='$c_bug_data->project_id',
+					reporter_id='$c_bug_data->reporter_id',
+					handler_id='$c_bug_data->handler_id',
+					duplicate_id='$c_bug_data->duplicate_id',
+					priority='$c_bug_data->priority',
+					severity='$c_bug_data->severity',
+					reproducibility='$c_bug_data->reproducibility',
+					status='$c_bug_data->status',
+					resolution='$c_bug_data->resolution',
+					projection='$c_bug_data->projection',
+					category='$c_bug_data->category',
+					eta='$c_bug_data->eta',
+					os='$c_bug_data->os',
+					os_build='$c_bug_data->os_build',
+					platform='$c_bug_data->platform',
+					version='$c_bug_data->version',
+					build='$c_bug_data->build',
+					fixed_in_version='$c_bug_data->fixed_in_version',";
+
+		$t_roadmap_updated = false;
+		if ( access_has_project_level( config_get( 'roadmap_update_threshold' ) ) ) {
+			$query .= "
+					target_version='$c_bug_data->target_version',";
+			$t_roadmap_updated = true;
+		}
+
+		$query .= "
+					view_state='$c_bug_data->view_state',
+					summary='$c_bug_data->summary',
+					sponsorship_total='$c_bug_data->sponsorship_total',
+					sticky='$c_bug_data->sticky',
+					previous_task_id='$c_bug_data->previous_task_id',
+					next_task_id='$c_bug_data->next_task_id'
+				WHERE id='$c_bug_id'";
+		db_query( $query );
+
+		bug_clear_cache( $p_bug_id );
+
+		# log changes
+		history_log_event_direct( $p_bug_id, 'project_id', $t_old_data->project_id, $p_bug_data->project_id );
+		history_log_event_direct( $p_bug_id, 'reporter_id', $t_old_data->reporter_id, $p_bug_data->reporter_id );
+		history_log_event_direct( $p_bug_id, 'handler_id', $t_old_data->handler_id, $p_bug_data->handler_id );
+		history_log_event_direct( $p_bug_id, 'duplicate_id', $t_old_data->duplicate_id, $p_bug_data->duplicate_id );
+		history_log_event_direct( $p_bug_id, 'priority', $t_old_data->priority, $p_bug_data->priority );
+		history_log_event_direct( $p_bug_id, 'severity', $t_old_data->severity, $p_bug_data->severity );
+		history_log_event_direct( $p_bug_id, 'reproducibility', $t_old_data->reproducibility, $p_bug_data->reproducibility );
+		history_log_event_direct( $p_bug_id, 'status', $t_old_data->status, $p_bug_data->status );
+		history_log_event_direct( $p_bug_id, 'resolution', $t_old_data->resolution, $p_bug_data->resolution );
+		history_log_event_direct( $p_bug_id, 'projection', $t_old_data->projection, $p_bug_data->projection );
+		history_log_event_direct( $p_bug_id, 'category', $t_old_data->category, $p_bug_data->category );
+		history_log_event_direct( $p_bug_id, 'eta',	$t_old_data->eta, $p_bug_data->eta );
+		history_log_event_direct( $p_bug_id, 'os', $t_old_data->os, $p_bug_data->os );
+		history_log_event_direct( $p_bug_id, 'os_build', $t_old_data->os_build, $p_bug_data->os_build );
+		history_log_event_direct( $p_bug_id, 'platform', $t_old_data->platform, $p_bug_data->platform );
+		history_log_event_direct( $p_bug_id, 'version', $t_old_data->version, $p_bug_data->version );
+		history_log_event_direct( $p_bug_id, 'build', $t_old_data->build, $p_bug_data->build );
+		history_log_event_direct( $p_bug_id, 'fixed_in_version', $t_old_data->fixed_in_version, $p_bug_data->fixed_in_version );
+		if ( $t_roadmap_updated ) {
+			history_log_event_direct( $p_bug_id, 'target_version', $t_old_data->target_version, $p_bug_data->target_version );
+		}
+		history_log_event_direct( $p_bug_id, 'view_state', $t_old_data->view_state, $p_bug_data->view_state );
+		history_log_event_direct( $p_bug_id, 'summary', $t_old_data->summary, $p_bug_data->summary );
+		history_log_event_direct( $p_bug_id, 'sponsorship_total', $t_old_data->sponsorship_total, $p_bug_data->sponsorship_total );
+		history_log_event_direct( $p_bug_id, 'sticky', $t_old_data->sticky, $p_bug_data->sticky );
+		history_log_event_direct( $p_bug_id, 'previous_task_id', $t_old_data->previous_task_id, $p_bug_data->previous_task_id );
+		history_log_event_direct( $p_bug_id, 'next_task_id', $t_old_data->next_task_id, $p_bug_data->next_task_id );
+		
+		# Update extended info if requested
+		if ( $p_update_extended ) {
+			$t_bug_text_table = config_get( 'mantis_bug_text_table' );
+
+			$t_bug_text_id = bug_get_field( $p_bug_id, 'bug_text_id' );
+
+			$query = "UPDATE $t_bug_text_table
+						SET description='$c_bug_data->description',
+							steps_to_reproduce='$c_bug_data->steps_to_reproduce',
+							additional_information='$c_bug_data->additional_information'
+						WHERE id='$t_bug_text_id'";
+			db_query( $query );
+
+			bug_text_clear_cache( $p_bug_id );
+
+			if ( $t_old_data->description != $p_bug_data->description ) {
+				history_log_event_special( $p_bug_id, DESCRIPTION_UPDATED );
+			}
+			if ( $t_old_data->steps_to_reproduce != $p_bug_data->steps_to_reproduce ) {
+				history_log_event_special( $p_bug_id, STEP_TO_REPRODUCE_UPDATED );
+			}
+			if ( $t_old_data->additional_information != $p_bug_data->additional_information ) {
+				history_log_event_special( $p_bug_id, ADDITIONAL_INFO_UPDATED );
+			}
+		}
+
+		# Update the last update date
+		bug_update_date( $p_bug_id );
+
+		if ( false == $p_bypass_mail ) {		# allow bypass if user is sending mail separately
+			$t_action_prefix = 'email_notification_title_for_action_bug_';
+			$t_status_prefix = 'email_notification_title_for_status_bug_';
+
+			# status changed
+			if ( $t_old_data->status != $p_bug_data->status ) {
+				$t_status = get_enum_to_string( config_get( 'status_enum_string' ), $p_bug_data->status );
+				$t_status = str_replace( ' ', '_', $t_status );
+				email_generic( $p_bug_id, $t_status, $t_status_prefix . $t_status );
+				return true;
+			}
+
+			# bug assigned
+			if ( $t_old_data->handler_id != $p_bug_data->handler_id ) {
+				email_generic( $p_bug_id, 'owner', $t_action_prefix . 'assigned' );
+				return true;
+			}
+
+			# @@@ handle priority change if it requires special handling
+
+			# generic update notification
+			email_generic( $p_bug_id, 'updated', $t_action_prefix . 'updated' );
+		}
+
+		return true;
+	}
+
+	#===================================
+	# Data Access
+	#===================================
+
+	# --------------------
+	# Returns the extended record of the specified bug, this includes
+	# the bug text fields
+	# @@@ include reporter name and handler name, the problem is that
+	#      handler can be 0, in this case no corresponding name will be
+	#      found.  Use equivalent of (+) in Oracle.
+	function bug_get_extended_row( $p_bug_id ) {
+		$t_base = bug_cache_row( $p_bug_id );
+		$t_text = bug_text_cache_row( $p_bug_id );
+
+		# merge $t_text first so that the 'id' key has the bug id not the bug text id
+		return array_merge( $t_text, $t_base );
+	}
+
+	# --------------------
+	# Returns the record of the specified bug
+	function bug_get_row( $p_bug_id ) {
+		return bug_cache_row( $p_bug_id );
+	}
+
+	# --------------------
+	# Returns an object representing the specified bug
+	function bug_get( $p_bug_id, $p_get_extended = false ) {
+		if ( $p_get_extended ) {
+			$row = bug_get_extended_row( $p_bug_id );
+		} else {
+			$row = bug_get_row( $p_bug_id );
+		}
+
+		$t_bug_data = new BugData;
+		$t_row_keys = array_keys( $row );
+		$t_vars = get_object_vars( $t_bug_data );
+
+		# Check each variable in the class
+		foreach ( $t_vars as $var => $val ) {
+			# If we got a field from the DB with the same name
+			if ( in_array( $var, $t_row_keys, true ) ) {
+				# Store that value in the object
+				$t_bug_data->$var = $row[$var];
+			}
+		}
+
+		return $t_bug_data;
+	}
+
+	# --------------------
+	# return the specified field of the given bug
+	#  if the field does not exist, display a warning and return ''
+	function bug_get_field( $p_bug_id, $p_field_name ) {
+		$row = bug_get_row( $p_bug_id );
+
+		if ( isset( $row[$p_field_name] ) ) {
+			return $row[$p_field_name];
+		} else {
+			error_parameters( $p_field_name );
+			trigger_error( ERROR_DB_FIELD_NOT_FOUND, WARNING );
+			return '';
+		}
+	}
+
+	# --------------------
+	# return the specified text field of the given bug
+	#  if the field does not exist, display a warning and return ''
+	function bug_get_text_field( $p_bug_id, $p_field_name ) {
+		$row = bug_text_cache_row( $p_bug_id );
+
+		if ( isset( $row[$p_field_name] ) ) {
+			return $row[$p_field_name];
+		} else {
+			error_parameters( $p_field_name );
+			trigger_error( ERROR_DB_FIELD_NOT_FOUND, WARNING );
+			return '';
+		}
+	}
+
+	# --------------------
+	# return the bug summary
+	#  this is a wrapper for the custom function
+	function bug_format_summary( $p_bug_id, $p_context ) {
+		return 	helper_call_custom_function( 'format_issue_summary', array( $p_bug_id , $p_context ) );
+	}
+
+
+	# --------------------
+	# Returns the number of bugnotes for the given bug_id
+	function bug_get_bugnote_count( $p_bug_id ) {
+		$c_bug_id = db_prepare_int( $p_bug_id );
+
+		$t_project_id = bug_get_field( $p_bug_id, 'project_id' );
+
+		if ( !access_has_project_level( config_get( 'private_bugnote_threshold' ), $t_project_id ) ) {
+			$t_restriction = 'AND view_state=' . VS_PUBLIC;
+		} else {
+			$t_restriction = '';
+		}
+
+		$t_bugnote_table = config_get( 'mantis_bugnote_table' );
+		$query = "SELECT COUNT(*)
+				  FROM $t_bugnote_table
+				  WHERE bug_id ='$c_bug_id' $t_restriction";
+		$result = db_query( $query );
+
+		return db_result( $result );
+	}
+
+	# --------------------
+	# return the timestamp for the most recent time at which a bugnote
+	#  associated wiht the bug was modified
+	function bug_get_newest_bugnote_timestamp( $p_bug_id ) {
+		$c_bug_id			= db_prepare_int( $p_bug_id );
+		$t_bugnote_table	= config_get( 'mantis_bugnote_table' );
+
+		$query = "SELECT last_modified
+				  FROM $t_bugnote_table
+				  WHERE bug_id='$c_bug_id'
+				  ORDER BY last_modified DESC";
+		$result = db_query( $query, 1 );
+		$row = db_result( $result );
+
+		if ( false === $row ) {
+			return false;
+		} else {
+			return db_unixtimestamp( $row );
+		}
+	}
+
+	# --------------------
+	# return the timestamp for the most recent time at which a bugnote
+	#  associated with the bug was modified and the total bugnote
+	#  count in one db query
+	function bug_get_bugnote_stats( $p_bug_id ) {
+		global $g_cache_bug;
+		$c_bug_id			= db_prepare_int( $p_bug_id );
+
+		if( !is_null( $g_cache_bug[ $c_bug_id ]['_stats'] ) ) {
+			if( $g_cache_bug[ $c_bug_id ]['_stats'] === false ) { 
+				return false;			
+			} else {
+				$t_stats['last_modified'] = db_unixtimestamp( $g_cache_bug[ $c_bug_id ]['_stats']['last_modified'] );
+				$t_stats['count'] = $g_cache_bug[ $c_bug_id ]['_stats']['count'];
+			}
+			return $t_stats;
+		}
+
+		$t_bugnote_table	= config_get( 'mantis_bugnote_table' );
+
+		$query = "SELECT last_modified
+				  FROM $t_bugnote_table
+				  WHERE bug_id='$c_bug_id'
+				  ORDER BY last_modified DESC";
+		$result = db_query( $query );
+		$row = db_fetch_array( $result );
+
+		if ( false === $row )
+			return false;
+
+		$t_stats['last_modified'] = db_unixtimestamp( $row['last_modified'] );
+		$t_stats['count'] = db_num_rows( $result );
+
+		return $t_stats;
+	}
+
+	# --------------------
+	# Get array of attachments associated with the specified bug id.  The array will be
+	# sorted in terms of date added (ASC).  The array will include the following fields:
+	# id, title, diskfile, filename, filesize, file_type, date_added.
+	function bug_get_attachments( $p_bug_id ) {
+		if ( !file_can_view_bug_attachments( $p_bug_id ) ) {
+	        return;
+		}
+
+		$c_bug_id = db_prepare_int( $p_bug_id );
+
+		$t_bug_file_table = config_get( 'mantis_bug_file_table' );
+
+		$query = "SELECT id, title, diskfile, filename, filesize, file_type, date_added
+		                FROM $t_bug_file_table
+		                WHERE bug_id='$c_bug_id'
+		                ORDER BY date_added";
+		$db_result = db_query( $query );
+		$num_notes = db_num_rows( $db_result );
+
+		$t_result = array();
+
+		for ( $i = 0; $i < $num_notes; $i++ ) {
+			$t_result[] = db_fetch_array( $db_result );
+		}
+
+		return $t_result;
+	}
+
+	#===================================
+	# Data Modification
+	#===================================
+
+	# --------------------
+	# set the value of a bug field
+	function bug_set_field( $p_bug_id, $p_field_name, $p_status, $p_prepare = true ) {
+		$c_bug_id			= db_prepare_int( $p_bug_id );
+		$c_field_name		= db_prepare_string( $p_field_name );
+		if( $p_prepare ) {
+			$c_status		= '\'' . db_prepare_string( $p_status ) . '\''; #generic, unknown type
+		} else {
+			$c_status		=  $p_status; #generic, unknown type
+		}
+
+		$h_status = bug_get_field( $p_bug_id, $p_field_name );
+
+		# return if status is already set
+		if ( $c_status == $h_status ) {
+			return true;
+		}
+
+		$t_bug_table = config_get( 'mantis_bug_table' );
+
+		# Update fields
+		$query = "UPDATE $t_bug_table
+				  SET $c_field_name=$c_status
+				  WHERE id='$c_bug_id'";
+		db_query( $query );
+
+		# updated the last_updated date
+		bug_update_date( $p_bug_id );
+
+		# log changes
+		history_log_event_direct( $p_bug_id, $p_field_name, $h_status, $p_status );
+
+		bug_clear_cache( $p_bug_id );
+
+		return true;
+	}
+
+	# --------------------
+	# assign the bug to the given user
+	function bug_assign( $p_bug_id, $p_user_id, $p_bugnote_text='', $p_bugnote_private = false ) {
+		$c_bug_id	= db_prepare_int( $p_bug_id );
+		$c_user_id	= db_prepare_int( $p_user_id );
+
+		if ( ( $c_user_id != NO_USER ) && !access_has_bug_level( config_get( 'handle_bug_threshold' ), $p_bug_id, $p_user_id ) ) {
+		    trigger_error( ERROR_USER_DOES_NOT_HAVE_REQ_ACCESS );
+		}
+
+		# extract current information into history variables
+		$h_status		= bug_get_field( $p_bug_id, 'status' );
+		$h_handler_id	= bug_get_field( $p_bug_id, 'handler_id' );
+
+		if ( ( ON == config_get( 'auto_set_status_to_assigned' ) ) &&
+			 ( NO_USER != $p_user_id ) ) {
+			$t_ass_val = config_get( 'bug_assigned_status' );
+		} else {
+			$t_ass_val = $h_status;
+		}
+
+		$t_bug_table = config_get( 'mantis_bug_table' );
+
+		if ( ( $t_ass_val != $h_status ) || ( $p_user_id != $h_handler_id ) ) {
+
+			# get user id
+			$query = "UPDATE $t_bug_table
+					  SET handler_id='$c_user_id', status='$t_ass_val'
+					  WHERE id='$c_bug_id'";
+			db_query( $query );
+
+			# log changes
+			history_log_event_direct( $c_bug_id, 'status', $h_status, $t_ass_val );
+			history_log_event_direct( $c_bug_id, 'handler_id', $h_handler_id, $p_user_id );
+
+			# Add bugnote if supplied
+			if ( !is_blank( $p_bugnote_text ) ) {
+				bugnote_add( $p_bug_id, $p_bugnote_text, 0, $p_bugnote_private );
+			}
+
+			# updated the last_updated date
+			bug_update_date( $p_bug_id );
+
+			bug_clear_cache( $p_bug_id );
+
+			# send assigned to email
+			email_assign( $p_bug_id );
+		}
+
+		return true;
+	}
+
+	# --------------------
+	# close the given bug
+	function bug_close( $p_bug_id, $p_bugnote_text = '', $p_bugnote_private = false, $p_time_tracking = '0:00' ) {
+		$p_bugnote_text = trim( $p_bugnote_text );
+
+		bug_set_field( $p_bug_id, 'status', CLOSED );
+
+		# Add bugnote if supplied
+		if ( !is_blank( $p_bugnote_text ) ) {
+			bugnote_add( $p_bug_id, $p_bugnote_text, $p_time_tracking, $p_bugnote_private );
+		}
+
+		email_close( $p_bug_id );
+
+		# MASC RELATIONSHIP
+		if ( ON == config_get( 'enable_relationship' ) ) {
+			email_relationship_child_closed( $p_bug_id );
+		}
+		# MASC RELATIONSHIP
+
+		return true;
+	}
+
+	# --------------------
+	# process the given bug
+	function bug_process( $p_bug_id, $p_bugnote_text = '', $p_bugnote_private = false ) {*/
+		/*print $p_bugnote_text;
+		$p_bugnote_text = trim( $p_bugnote_text );
+		$p_bugnote_text = '';*/
+/*		bug_set_field( $p_bug_id, 'status', PROCESSED );
+
+		# Add bugnote if supplied*/
+		/*if ( !is_blank( $p_bugnote_text ) ) {
+			bugnote_add( $p_bug_id, $p_bugnote_text, $p_bugnote_private );
+		}*/
+/*		return true;
+	}
+
+
+	# --------------------
+	# resolve the given bug
+	function bug_resolve( $p_bug_id, $p_resolution, $p_fixed_in_version = '', $p_bugnote_text = '', $p_duplicate_id = null, $p_handler_id = null, $p_bugnote_private = false, $p_time_tracking = '0:00' ) {
+		$p_bugnote_text = trim( $p_bugnote_text );
+
+		$t_duplicate = !is_blank( $p_duplicate_id ) && ( $p_duplicate_id != 0 );
+		if ( $t_duplicate ) {
+			if ( $p_bug_id == $p_duplicate_id ) {
+			    trigger_error( ERROR_BUG_DUPLICATE_SELF, ERROR );  # never returns
+			}
+
+			# the related bug exists...
+			bug_ensure_exists( $p_duplicate_id );
+
+			if ( ON == config_get( 'enable_relationship' ) ) {
+				# check if there is other relationship between the bugs...
+				$t_id_relationship = relationship_same_type_exists( $p_bug_id, $p_duplicate_id, BUG_DUPLICATE );
+
+				if ( $t_id_relationship == -1 ) {
+					# the relationship type is already set. Nothing to do
+				}
+				else if ( $t_id_relationship > 0 ) {
+					# there is already a relationship between them -> we have to update it and not to add a new one
+					helper_ensure_confirmed( lang_get( 'replace_relationship_sure_msg' ), lang_get( 'replace_relationship_button' ) );
+
+					# Update the relationship
+					relationship_update( $t_id_relationship, $p_bug_id, $p_duplicate_id, BUG_DUPLICATE );
+
+					# Add log line to the history (both bugs)
+					history_log_event_special( $p_bug_id, BUG_REPLACE_RELATIONSHIP, BUG_DUPLICATE, $p_duplicate_id );
+					history_log_event_special( $p_duplicate_id, BUG_REPLACE_RELATIONSHIP, BUG_HAS_DUPLICATE, $p_bug_id );
+				}
+				else {
+					# Add the new relationship
+					relationship_add( $p_bug_id, $p_duplicate_id, BUG_DUPLICATE );
+
+					# Add log line to the history (both bugs)
+					history_log_event_special( $p_bug_id, BUG_ADD_RELATIONSHIP, BUG_DUPLICATE, $p_duplicate_id );
+					history_log_event_special( $p_duplicate_id, BUG_ADD_RELATIONSHIP, BUG_HAS_DUPLICATE, $p_bug_id );
+				}
+			}
+
+			bug_set_field( $p_bug_id, 'duplicate_id', (int)$p_duplicate_id );
+		}
+		
+		$c_resolution = db_prepare_int( $p_resolution );
+
+		bug_set_field( $p_bug_id, 'status', config_get( 'bug_resolved_status_threshold' ) );
+		bug_set_field( $p_bug_id, 'fixed_in_version', $p_fixed_in_version );
+		bug_set_field( $p_bug_id, 'resolution', $c_resolution );
+
+		# only set handler if specified explicitly or if bug was not assigned to a handler
+		if ( null == $p_handler_id ) {
+			if ( bug_get_field( $p_bug_id, 'handler_id' ) == 0 ) {
+				$p_handler_id = auth_get_current_user_id();
+				bug_set_field( $p_bug_id, 'handler_id', $p_handler_id );
+			}
+		} else {
+			bug_set_field( $p_bug_id, 'handler_id', $p_handler_id );
+		}
+
+		# Add bugnote if supplied
+		if ( !is_blank( $p_bugnote_text ) ) {
+			bugnote_add( $p_bug_id, $p_bugnote_text, $p_time_tracking, $p_bugnote_private );
+		}
+
+		email_resolved( $p_bug_id );
+
+		if ( $c_resolution == FIXED ) {
+			twitter_issue_resolved( $p_bug_id );
+		}
+
+		# MASC RELATIONSHIP
+		if ( ON == config_get( 'enable_relationship' ) ) {
+			email_relationship_child_resolved( $p_bug_id );
+		}
+		# MASC RELATIONSHIP
+
+		return true;
+	}
+
+	# --------------------
+	# reopen the given bug
+	function bug_reopen( $p_bug_id, $p_bugnote_text='', $p_time_tracking = '0:00', $p_bugnote_private = false ) {
+		$p_bugnote_text = trim( $p_bugnote_text );
+
+		bug_set_field( $p_bug_id, 'status', config_get( 'bug_reopen_status' ) );
+		bug_set_field( $p_bug_id, 'resolution', config_get( 'bug_reopen_resolution' ) );
+
+		# Add bugnote if supplied
+		if ( !is_blank( $p_bugnote_text ) ) {
+			bugnote_add( $p_bug_id, $p_bugnote_text, $p_time_tracking, $p_bugnote_private );
+		}
+
+		email_reopen( $p_bug_id );
+
+		return true;
+	}
+
+	# --------------------
+	# updates the last_updated field
+	function bug_update_date( $p_bug_id ) {
+		$c_bug_id = db_prepare_int( $p_bug_id );
+
+		$t_bug_table = config_get( 'mantis_bug_table' );
+
+		$query = "UPDATE $t_bug_table
+				  SET last_updated= " . db_now() . "
+				  WHERE id='$c_bug_id'";
+		db_query( $query );
+
+		bug_clear_cache( $p_bug_id );
+
+		return true;
+	}
+
+	# --------------------
+	# enable monitoring of this bug for the user
+	function bug_monitor( $p_bug_id, $p_user_id ) {
+		$c_bug_id	= db_prepare_int( $p_bug_id );
+		$c_user_id	= db_prepare_int( $p_user_id );
+
+		# Make sure we aren't already monitoring this bug
+		if ( user_is_monitoring_bug( $p_user_id, $p_bug_id ) ) {
+			return true;
+		}
+
+		$t_bug_monitor_table = config_get( 'mantis_bug_monitor_table' );
+
+		# Insert monitoring record
+		$query ="INSERT ".
+				"INTO $t_bug_monitor_table ".
+				"( user_id, bug_id ) ".
+				"VALUES ".
+				"( '$c_user_id', '$c_bug_id' )";
+		db_query( $query );
+
+		# log new monitoring action
+		history_log_event_special( $p_bug_id, BUG_MONITOR, $c_user_id );
+
+		return true;
+	}
+
+	# --------------------
+	# disable monitoring of this bug for the user
+	# if $p_user_id = null, then bug is unmonitored for all users.
+	function bug_unmonitor( $p_bug_id, $p_user_id ) {
+		$c_bug_id	= db_prepare_int( $p_bug_id );
+		$c_user_id	= db_prepare_int( $p_user_id );
+
+		$t_bug_monitor_table = config_get( 'mantis_bug_monitor_table' );
+
+		# Delete monitoring record
+		$query ="DELETE ".
+				"FROM $t_bug_monitor_table ".
+				"WHERE bug_id = '$c_bug_id'";
+
+		if ( $p_user_id !== null ) {
+			$query .= " AND user_id = '$c_user_id'";
+		}
+
+		db_query( $query );
+
+		# log new un-monitor action
+		history_log_event_special( $p_bug_id, BUG_UNMONITOR, $p_user_id );
+
+		return true;
+	}
+
+	#===================================
+	# Other
+	#===================================
+
+	# --------------------
+	# Pads the bug id with the appropriate number of zeros.
+	function bug_format_id( $p_bug_id ) {
+		$t_padding = config_get( 'display_bug_padding' );
+		return( str_pad( $p_bug_id, $t_padding, '0', STR_PAD_LEFT ) );
+	}
+
+	# --------------------
+	# Return a copy of the bug structure with all the instvars prepared for db insertion
+	function bug_prepare_db( $p_bug_data ) {
+		$t_bug_data = new BugData;
+		$t_bug_data->project_id			= db_prepare_int( $p_bug_data->project_id );
+		$t_bug_data->reporter_id		= db_prepare_int( $p_bug_data->reporter_id );
+		$t_bug_data->handler_id			= db_prepare_int( $p_bug_data->handler_id );
+		$t_bug_data->duplicate_id		= db_prepare_int( $p_bug_data->duplicate_id );
+		$t_bug_data->priority			= db_prepare_int( $p_bug_data->priority );
+		$t_bug_data->severity			= db_prepare_int( $p_bug_data->severity );
+		$t_bug_data->reproducibility	= db_prepare_int( $p_bug_data->reproducibility );
+		$t_bug_data->status				= db_prepare_int( $p_bug_data->status );
+		$t_bug_data->resolution			= db_prepare_int( $p_bug_data->resolution );
+		$t_bug_data->projection			= db_prepare_int( $p_bug_data->projection );
+		$t_bug_data->category			= db_prepare_string( $p_bug_data->category );
+		$t_bug_data->date_submitted		= db_prepare_string( $p_bug_data->date_submitted );
+		$t_bug_data->last_updated		= db_prepare_string( $p_bug_data->last_updated );
+		$t_bug_data->eta				= db_prepare_int( $p_bug_data->eta );
+		$t_bug_data->os					= db_prepare_string( $p_bug_data->os );
+		$t_bug_data->os_build			= db_prepare_string( $p_bug_data->os_build );
+		$t_bug_data->platform			= db_prepare_string( $p_bug_data->platform );
+		$t_bug_data->version			= db_prepare_string( $p_bug_data->version );
+		$t_bug_data->build				= db_prepare_string( $p_bug_data->build );
+		$t_bug_data->fixed_in_version	= db_prepare_string( $p_bug_data->fixed_in_version );
+		$t_bug_data->target_version		= db_prepare_string( $p_bug_data->target_version );
+		$t_bug_data->view_state			= db_prepare_int( $p_bug_data->view_state );
+		$t_bug_data->summary			= db_prepare_string( $p_bug_data->summary );
+		$t_bug_data->sponsorship_total	= db_prepare_int( $p_bug_data->sponsorship_total );
+		$t_bug_data->sticky				= db_prepare_int( $p_bug_data->sticky );
+		$t_bug_data->previous_task_id			= db_prepare_int( $p_bug_data->previous_task_id );
+		$t_bug_data->next_task_id				= db_prepare_int( $p_bug_data->next_task_id );
+
+		$t_bug_data->description		= db_prepare_string( $p_bug_data->description );
+		$t_bug_data->steps_to_reproduce	= db_prepare_string( $p_bug_data->steps_to_reproduce );
+		$t_bug_data->additional_information	= db_prepare_string( $p_bug_data->additional_information );
+
+		return $t_bug_data;
+	}
+
+	# --------------------
+	# Return a copy of the bug structure with all the instvars prepared for editing
+	#  in an HTML form
+	function bug_prepare_edit( $p_bug_data ) {
+		$p_bug_data->category			= string_attribute( $p_bug_data->category );
+		$p_bug_data->date_submitted		= string_attribute( $p_bug_data->date_submitted );
+		$p_bug_data->last_updated		= string_attribute( $p_bug_data->last_updated );
+		$p_bug_data->os					= string_attribute( $p_bug_data->os );
+		$p_bug_data->os_build			= string_attribute( $p_bug_data->os_build );
+		$p_bug_data->platform			= string_attribute( $p_bug_data->platform );
+		$p_bug_data->version			= string_attribute( $p_bug_data->version );
+		$p_bug_data->build				= string_attribute( $p_bug_data->build );
+		$p_bug_data->fixed_in_version	= string_attribute( $p_bug_data->fixed_in_version );
+		$p_bug_data->summary			= string_attribute( $p_bug_data->summary );
+		$p_bug_data->sponsorship_total	= string_attribute( $p_bug_data->sponsorship_total );
+		$p_bug_data->sticky				= string_attribute( $p_bug_data->sticky );
+
+		$p_bug_data->description		= string_textarea( $p_bug_data->description );
+		$p_bug_data->steps_to_reproduce	= string_textarea( $p_bug_data->steps_to_reproduce );
+		$p_bug_data->additional_information	= string_textarea( $p_bug_data->additional_information );
+
+		return $p_bug_data;
+	}
+
+	# --------------------
+	# Return a copy of the bug structure with all the instvars prepared for editing
+	#  in an HTML form
+	function bug_prepare_display( $p_bug_data ) {
+		$p_bug_data->category			= string_display_line( $p_bug_data->category );
+		$p_bug_data->date_submitted		= string_display_line( $p_bug_data->date_submitted );
+		$p_bug_data->last_updated		= string_display_line( $p_bug_data->last_updated );
+		$p_bug_data->os					= string_display_line( $p_bug_data->os );
+		$p_bug_data->os_build			= string_display_line( $p_bug_data->os_build );
+		$p_bug_data->platform			= string_display_line( $p_bug_data->platform );
+		$p_bug_data->version			= string_display_line( $p_bug_data->version );
+		$p_bug_data->build				= string_display_line( $p_bug_data->build );
+		$p_bug_data->fixed_in_version	= string_display_line( $p_bug_data->fixed_in_version );
+		$p_bug_data->summary			= string_display_line_links( $p_bug_data->summary );
+		$p_bug_data->sponsorship_total	= string_display_line( $p_bug_data->sponsorship_total );
+		$p_bug_data->sticky				= string_display_line( $p_bug_data->sticky );
+
+		$p_bug_data->description		= string_display_links( $p_bug_data->description );
+		$p_bug_data->steps_to_reproduce	= string_display_links( $p_bug_data->steps_to_reproduce );
+		$p_bug_data->additional_information	= string_display_links( $p_bug_data->additional_information );
+
+		return $p_bug_data;
+	}*/
+?>
\ No newline at end of file
diff -Naur mantis-1.1.1/core/user_api.php mantis/core/user_api.php
--- mantis-1.1.1/core/user_api.php	2007-10-15 00:35:35.000000000 +0200
+++ mantis/core/user_api.php	2008-02-18 19:24:53.000000000 +0100
@@ -966,6 +966,7 @@
 		return $t_filter;
 	}
 
+	
 	#===================================
 	# Data Modification
 	#===================================
@@ -1203,4 +1204,5 @@
 
 		return true;
 	}
+	
 ?>
diff -Naur mantis-1.1.1/core/user_pref_api.php mantis/core/user_pref_api.php
--- mantis-1.1.1/core/user_pref_api.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/core/user_pref_api.php	2008-02-19 10:46:43.000000000 +0100
@@ -50,7 +50,9 @@
 		'email_on_status_min_severity' => 'default_email_on_status_minimum_severity',
 		'email_on_priority_min_severity' => 'default_email_on_priority_minimum_severity',
 		'email_bugnote_limit' => 'default_email_bugnote_limit',
-		'language' => 'default_language'
+		'language' => 'default_language',
+		'email_on_processed'	=> 'default_email_on_processed',
+		'email_on_processed_min_severity' => 'default_email_on_processed_minimum_severity'
 		);
 
 	#===================================
@@ -85,6 +87,8 @@
 		var $email_on_priority_min_severity = NULL;
 		var $email_bugnote_limit = NULL;
 		var $language = NULL;
+		var $email_on_processed = NULL;
+		var $email_on_processed_min_severity = NULL;
 
 		function UserPreferences() {
 			$this->default_profile                   	= 0;
diff -Naur mantis-1.1.1/css/default.css mantis/css/default.css
--- mantis-1.1.1/css/default.css	2007-08-24 21:04:44.000000000 +0200
+++ mantis/css/default.css	2008-02-14 10:00:20.000000000 +0100
@@ -44,6 +44,7 @@
 td.left				{ text-align: left; }
 td.right			{ text-align: right; }
 td.category			{ background-color: #c8c8e8; color: #000000; font-weight: bold; vertical-align : top; }
+td.deadline		{ background-color: #ff0000; color: #000000; font-weight: bold; text-align: center; }
 
 td.col-1			{ background-color: #d8d8d8; color: #000000; }
 td.col-2			{ background-color: #e8e8e8; color: #000000; }
@@ -59,7 +60,7 @@
 tr.spacer			{ background-color: #ffffff; color: #000000; height: 5px; }
 tr.row-1			{ background-color: #d8d8d8; color: #000000; }
 tr.row-2			{ background-color: #e8e8e8; color: #000000; }
-tr.row-category		{ background-color: #c8c8e8; color: #000000; font-weight: bold;}
+tr.row-category		{ background-color: #dadaef; color: #000000; font-weight: bold;}
 tr.row-category td  {  text-align:center; }
 tr.row-category2	{ background-color: #c8c8e8; color: #000000; }
 tr.row-category-history { background-color: #c8c8e8; color: #000000; font-weight: bold;}
diff -Naur mantis-1.1.1/css/default.css~ mantis/css/default.css~
--- mantis-1.1.1/css/default.css~	1970-01-01 01:00:00.000000000 +0100
+++ mantis/css/default.css~	2008-02-14 10:00:20.000000000 +0100
@@ -0,0 +1,156 @@
+body {
+	background-color: #ffffff; 
+	color: #000000; 
+	font-family: Verdana, Arial, Helvetica, sans-serif; 
+	font-size: 10pt; 
+	margin: 6px 4px; 
+}
+
+p 					{ font-family: Verdana, Arial, Helvetica, sans-serif; }
+
+address 			{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt }
+
+a					{}
+a:active 			{}
+a:link    			{}
+a:visited 			{}
+a.subtle			{ color: blue; text-decoration: none; }
+
+form				{ display: inline; }
+
+input				{}
+input.button			{}
+input.button-small		{ font-size: 8pt; }
+
+textarea			{}
+select				{}
+
+span				{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; }
+span.print			{ font-size: 8pt; }
+span.required 		{ font-size: 8pt; color: #bb0000; }
+span.small 			{ font-size: 8pt; font-weight: normal; }
+span.pagetitle		{ font-size: 12pt; font-weight: bold; text-align: center }
+span.bracket-link	{ white-space: nowrap; }
+
+table				{ }
+table.hide			{ width: 100%; border: solid 0px #ffffff; }
+table.width100		{ width: 100%; border: solid 1px #000000; }
+table.width75		{ width: 75%;  border: solid 1px #000000; }
+table.width60		{ width: 60%;  border: solid 1px #000000; }
+table.width50		{ width: 50%;  border: solid 1px #000000; }
+
+td 					{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; padding: 4px; text-align: left; }
+td.center			{ text-align: center; }
+td.left				{ text-align: left; }
+td.right			{ text-align: right; }
+td.category			{ background-color: #c8c8e8; color: #000000; font-weight: bold; vertical-align : top; }
+td.deadline		{ background-color: #ff0000; color: #000000; font-weight: bold; text-align: center; }
+
+td.col-1			{ background-color: #d8d8d8; color: #000000; }
+td.col-2			{ background-color: #e8e8e8; color: #000000; }
+td.form-title		{ background-color: #ffffff; color: #000000; font-weight: bold; text-align: left; }
+td.nopad			{ padding: 0px; }
+td.small-caption	{ font-size: 8pt; }
+td.print			{ font-size: 8pt; text-align: left; padding: 2px; }
+td.print-category	{ font-size: 8pt; color: #000000; font-weight: bold; text-align: right; padding: 2px; }
+td.print-bottom		{ border-bottom: 1px solid #000000; }
+td.print-spacer		{ background-color: #ffffff; color: #000000; font-size: 1pt; line-height: 0.1; padding: 0px;}
+
+tr					{}
+tr.spacer			{ background-color: #ffffff; color: #000000; height: 5px; }
+tr.row-1			{ background-color: #d8d8d8; color: #000000; }
+tr.row-2			{ background-color: #e8e8e8; color: #000000; }
+tr.row-category		{ background-color: #ceceea; color: #000000; font-weight: bold;}
+tr.row-category td  {  text-align:center; }
+tr.row-category2	{ background-color: #c8c8e8; color: #000000; }
+tr.row-category-history { background-color: #c8c8e8; color: #000000; font-weight: bold;}
+tr.row-category-history td {  text-align: left; }
+tr.vcenter			{ vertical-align: middle; }
+tr.print			{ vertical-align: top; }
+tr.print-category	{ color: #000000; font-weight: bold; }
+
+#buglist tr			{ text-align: center; }
+
+tr.bugnote				{ vertical-align: top; }
+td.bugnote-public		{ background-color: #c8c8e8; color: #000000; font-weight: bold; width: 25%; line-height: 1.4; }
+td.bugnote-private		{ background-color: #e8e8e8; color: #000000; font-weight: bold; width: 25%; line-height: 1.4; }
+td.bugnote-note-public	{ background-color: #e8e8e8; color: #000000; width: 75%; }
+td.bugnote-note-private	{ background-color: #e8e8e8; color: #000000; width: 75%; }
+
+td.login-info-left		{ width: 33%; padding: 0px; text-align: left; }
+td.login-info-middle	{ width: 33%; padding: 0px; text-align: center; }
+td.login-info-right		{ width: 33%; padding: 0px; text-align: right; white-space: nowrap; }
+
+td.menu	
+{ 
+	background-color: #e8e8e8;
+	color: #000000;
+	text-align: center;
+	width: 100%;
+	padding: 5px;
+}
+
+td.menu a
+{
+	white-space: nowrap;
+}
+
+td.news-heading-public	{ background-color: #c8c8e8; color: #000000; text-align: left; border-bottom: 1px solid #000000; }
+td.news-heading-private	{ background-color: #d8d8d8;       color: #000000; text-align: left; border-bottom: 1px solid #000000; }
+td.news-body			{ background-color: #ffffff;         color: #000000; padding: 16px; }
+
+img						{}
+img.icon				{ width: 11px; height: 11px; }
+img.delete-icon			{ position: relative; top: 5px; border: 0; }
+
+div						{ padding: 3px; }
+div.menu				{ background-color: #e8e8e8; color: #000000; text-align: center; width: 100%; padding: 1px; }
+
+div.border-center		{ background-color: #ffffff; border: solid 1px #000000; text-align: center; width: 50%; position: relative; margin-right: auto; margin-left: auto; }
+
+div.quick-summary-left	{ width: 49%; padding: 2px; text-align: left;  float: left; }
+div.quick-summary-right	{ width: 49%; padding: 2px; text-align: right; float: right;}
+
+.center					{ text-align: center; }
+.left					{ text-align: left; }
+.right					{ text-align: right; }
+.small					{ font-size: 8pt; }
+.small-normal 			{ font-size: 8pt; font-weight: normal; }
+.small-subprojects		{ font-size: 8pt; width: 200px; }
+.bold					{ font-weight: bold; }
+.bold-small				{ font-weight: bold; font-size: 8pt; }
+.italic					{ font-style: italic; }
+.italic-small			{ font-style: italic; font-size: 8pt; }
+.underline				{ text-decoration: underline; }
+.underline-small		{ text-decoration: underline; font-size: 8pt; }
+.strike					{ text-decoration: line-through; }
+.strike-small			{ text-decoration: line-through; font-size: 8pt; }
+
+.nowrap
+{
+	white-space: nowrap;
+}
+
+.positive
+{
+	color: green;
+}
+
+.negative
+{
+	color: red;
+}
+
+.issue-status
+{
+	border-bottom: 1px dotted black;
+}
+
+.avatar
+{
+	float: right;
+	border: 0;
+}
+
+.progress400				{ position: relative; width: 400px; border: 1px solid #d7d7d7; margin-top: 1em; margin-bottom: 1em; padding: 1px; }
+.progress400 .bar			{ display: block; position: relative; background: #6bba70; text-align: center; font-weight: normal; color: #333; height: 2em; line-height: 2em; }
diff -Naur mantis-1.1.1/images/accept.png mantis/images/accept.png
--- mantis-1.1.1/images/accept.png	1970-01-01 01:00:00.000000000 +0100
+++ mantis/images/accept.png	2008-02-07 09:19:55.000000000 +0100
@@ -0,0 +1,6 @@
+PNG
+
+   
IHDR         a   gAMA  7   tEXtSoftware Adobe ImageReadyqe<  IDAT8˥KSa;vvl	dD!P{$;
ż,Kݽ6cL2r^H)-jsNm֔2qQB̽BatoL#z{q 'r=)La8,u%2Rg>ݾW ϛJ<!GA\lF$THC;
+تtxR~^^i2XCLd&3IM	_ؔ=\B@N2Ʋ9USPLB1U T!k0xpܞ#HBb1l5؄
+_1O,$O>߸Pd
makD|=G	Vn6[Įd 桚(Pm.0Q`'Fb#&ܧ6aP׏Q12[+zi; ]C17оpI9̾jD}?7ayze,hXAK^3*bk@+wQ=!}uXzq:g쯺n=:d+_GTA;ՐJƣ.!P)5!H:epր"݂"Kyw|{H2!i~3z_X;okBZK*
+^R:O(jF*^ȰS诿_gЬyc    IENDB`
\ No newline at end of file
diff -Naur mantis-1.1.1/images/arrow_down.gif mantis/images/arrow_down.gif
--- mantis-1.1.1/images/arrow_down.gif	1970-01-01 01:00:00.000000000 +0100
+++ mantis/images/arrow_down.gif	2008-02-07 11:30:07.000000000 +0100
@@ -0,0 +1,5 @@
+GIF89a       ssssstuuuuuvvvwxxxxxyyyz                                                                                                                                                      !  M ,       M()*+,-M$$4BJJE;.,@KE?@FLG/*<L89;==?,'(K579:>;&6C56:<=>GE(E8?#M	B73?"=AJ)
0A24!;<FD%!I135?Np
+
+
+b,w"$6@F!<$$bA,`a
+, ;
\ No newline at end of file
diff -Naur mantis-1.1.1/images/arrow_first.gif mantis/images/arrow_first.gif
--- mantis-1.1.1/images/arrow_first.gif	1970-01-01 01:00:00.000000000 +0100
+++ mantis/images/arrow_first.gif	2008-02-07 11:31:49.000000000 +0100
@@ -0,0 +1,2 @@
+GIF89a    sssssttttttuuuuuuvvvvvvwwwwyyyzzz                                                                                                                           !  V ,       V$!V+%9GQM:*-,NUMBAKR;/.JIHHGFR:1AUD

%2MOE FJ9V4SJFEC?><@KV5SKFF&
+I>=AN6NPG'	L?7TI@|PqqAP 9GDT"6z+'T Q!'S@15fȀb ;
\ No newline at end of file
diff -Naur mantis-1.1.1/images/arrow_last.gif mantis/images/arrow_last.gif
--- mantis-1.1.1/images/arrow_last.gif	1970-01-01 01:00:00.000000000 +0100
+++ mantis/images/arrow_last.gif	2008-02-07 11:31:59.000000000 +0100
@@ -0,0 +1,2 @@
+GIF89a    sssssttttttuuuuuuvvvvvvwwwwyyyzzz                                                                                                                           !  V ,       V+.023568V#(=KSSND7 "ITNHIOUPEUABDFFHV.TH	)U?L>I'GPN6NA=
+&5K@<>?CEFJS49JF EOM2%RF
8x&w(%Ux1(RjEB,$ʑ%V@`C
BDP  ;
\ No newline at end of file
diff -Naur mantis-1.1.1/images/arrow_up.gif mantis/images/arrow_up.gif
--- mantis-1.1.1/images/arrow_up.gif	1970-01-01 01:00:00.000000000 +0100
+++ mantis/images/arrow_up.gif	2008-02-07 11:32:08.000000000 +0100
@@ -0,0 +1,3 @@
+GIF89a    ssssstuuuuuvvvwxxxxxyyyz                                                                                                                                                         !  L ,       LL /=GC0"!DKC87AH1	%$5431J0
+'7K:88#>420H(CE;:>@/L*I@<26AL+IA >7D,DF=<;94B5
-:K>tسAC	\0]vP0H!"?|QB
+uI2n\X	  , ;
\ No newline at end of file
diff -Naur mantis-1.1.1/images/cancel.png mantis/images/cancel.png
--- mantis-1.1.1/images/cancel.png	1970-01-01 01:00:00.000000000 +0100
+++ mantis/images/cancel.png	2008-02-07 09:26:18.000000000 +0100
@@ -0,0 +1,7 @@
+PNG
+
+   
IHDR         a   gAMA  7   tEXtSoftware Adobe ImageReadyqe<  IDAT8˥kkAkH !)4^cƘ4eJKi(̇\ ĕή;OgV7U/þϙ3`
+
+Fe`
݇[:WnF{2 28dA2I>w&B;6Y$
+ZŽ=DUemӁfZ/Rm	Cz/
+tB ̛NJ	a;rdN,XX' >Kry88 x__Y7ͫʹZȋ==tajD_RA#(Uxf84ݹ9n2$b'C{M9Hj9,=ݫR,2Z˾u0(fԘycRݵt#]畸ݿ    IENDB`
\ No newline at end of file
diff -Naur mantis-1.1.1/javascript/jscalendar/calendar-win2k-1.css mantis/javascript/jscalendar/calendar-win2k-1.css
--- mantis-1.1.1/javascript/jscalendar/calendar-win2k-1.css	1970-01-01 01:00:00.000000000 +0100
+++ mantis/javascript/jscalendar/calendar-win2k-1.css	2008-02-20 14:49:53.000000000 +0100
@@ -0,0 +1,272 @@
+/* The main calendar widget.  DIV containing a table. */
+
+.calendar {
+  position: relative;
+  display: none;
+  border-top: 2px solid #fff;
+  border-right: 2px solid #000;
+  border-bottom: 2px solid #000;
+  border-left: 2px solid #fff;
+  font-size: 11px;
+  color: #000;
+  cursor: default;
+  background: #d4d0c8;
+  font-family: tahoma,verdana,sans-serif;
+}
+
+.calendar table {
+  border-top: 1px solid #000;
+  border-right: 1px solid #fff;
+  border-bottom: 1px solid #fff;
+  border-left: 1px solid #000;
+  font-size: 11px;
+  color: #000;
+  cursor: default;
+  background: #d4d0c8;
+  font-family: tahoma,verdana,sans-serif;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+  text-align: center;
+  padding: 1px;
+  border-top: 1px solid #fff;
+  border-right: 1px solid #000;
+  border-bottom: 1px solid #000;
+  border-left: 1px solid #fff;
+}
+
+.calendar .nav {
+  background: transparent url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+  font-weight: bold;
+  padding: 1px;
+  border: 1px solid #000;
+  background: #848078;
+  color: #fff;
+  text-align: center;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+  border-bottom: 1px solid #000;
+  padding: 2px;
+  text-align: center;
+  background: #f4f0e8;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+  color: #f00;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+  border-top: 2px solid #fff;
+  border-right: 2px solid #000;
+  border-bottom: 2px solid #000;
+  border-left: 2px solid #fff;
+  padding: 0px;
+  background-color: #e4e0d8;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+  padding: 2px 0px 0px 2px;
+  border-top: 1px solid #000;
+  border-right: 1px solid #fff;
+  border-bottom: 1px solid #fff;
+  border-left: 1px solid #000;
+  background-color: #c4c0b8;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+  width: 2em;
+  text-align: right;
+  padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+  font-size: 80%;
+  color: #aaa;
+}
+.calendar tbody .day.othermonth.oweekend {
+  color: #faa;
+}
+
+.calendar table .wn {
+  padding: 2px 3px 2px 2px;
+  border-right: 1px solid #000;
+  background: #f4f0e8;
+}
+
+.calendar tbody .rowhilite td {
+  background: #e4e0d8;
+}
+
+.calendar tbody .rowhilite td.wn {
+  background: #d4d0c8;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+  padding: 1px 3px 1px 1px;
+  border-top: 1px solid #fff;
+  border-right: 1px solid #000;
+  border-bottom: 1px solid #000;
+  border-left: 1px solid #fff;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+  padding: 2px 2px 0px 2px;
+  border-top: 1px solid #000;
+  border-right: 1px solid #fff;
+  border-bottom: 1px solid #fff;
+  border-left: 1px solid #000;
+}
+
+.calendar tbody td.selected { /* Cell showing selected date */
+  font-weight: bold;
+  border-top: 1px solid #000;
+  border-right: 1px solid #fff;
+  border-bottom: 1px solid #fff;
+  border-left: 1px solid #000;
+  padding: 2px 2px 0px 2px;
+  background: #e4e0d8;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+  color: #f00;
+}
+
+.calendar tbody td.today { /* Cell showing today date */
+  font-weight: bold;
+  color: #00f;
+}
+
+.calendar tbody .disabled { color: #999; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+  visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+  display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+  background: #f4f0e8;
+  padding: 1px;
+  border: 1px solid #000;
+  background: #848078;
+  color: #fff;
+  text-align: center;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+  border-top: 1px solid #fff;
+  border-right: 1px solid #000;
+  border-bottom: 1px solid #000;
+  border-left: 1px solid #fff;
+  padding: 1px;
+  background: #e4e0d8;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+  padding: 2px 0px 0px 2px;
+  border-top: 1px solid #000;
+  border-right: 1px solid #fff;
+  border-bottom: 1px solid #fff;
+  border-left: 1px solid #000;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+  position: absolute;
+  display: none;
+  width: 4em;
+  top: 0px;
+  left: 0px;
+  cursor: default;
+  border-top: 1px solid #fff;
+  border-right: 1px solid #000;
+  border-bottom: 1px solid #000;
+  border-left: 1px solid #fff;
+  background: #e4e0d8;
+  font-size: 90%;
+  padding: 1px;
+  z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+  text-align: center;
+  padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+  width: 4em;
+}
+
+.calendar .combo .active {
+  background: #c4c0b8;
+  padding: 0px;
+  border-top: 1px solid #000;
+  border-right: 1px solid #fff;
+  border-bottom: 1px solid #fff;
+  border-left: 1px solid #000;
+}
+
+.calendar .combo .hilite {
+  background: #048;
+  color: #fea;
+}
+
+.calendar td.time {
+  border-top: 1px solid #000;
+  padding: 1px 0px;
+  text-align: center;
+  background-color: #f4f0e8;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+  padding: 0px 3px 0px 4px;
+  border: 1px solid #889;
+  font-weight: bold;
+  background-color: #fff;
+}
+
+.calendar td.time .ampm {
+  text-align: center;
+}
+
+.calendar td.time .colon {
+  padding: 0px 2px 0px 3px;
+  font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+  border-color: #000;
+  background-color: #766;
+  color: #fff;
+}
+
+.calendar td.time span.active {
+  border-color: #f00;
+  background-color: #000;
+  color: #0f0;
+}
+
diff -Naur mantis-1.1.1/javascript/shifttasklist.js mantis/javascript/shifttasklist.js
--- mantis-1.1.1/javascript/shifttasklist.js	1970-01-01 01:00:00.000000000 +0100
+++ mantis/javascript/shifttasklist.js	2008-02-14 09:13:51.000000000 +0100
@@ -0,0 +1,168 @@
+
+function moveUp(e)
+{
+  var o;
+  if (window.event)
+  {
+    //alert("IE event");
+    o = event.srcElement;
+  }
+  else
+  {
+    //alert("DOM event " + arguments.length + " " + e);
+    o = e;
+  }
+
+  var currentRow = o.parentNode.parentNode;
+  var previousRow = currentRow.previousSibling;
+  var currentTable = currentRow.parentNode;
+
+  while ( previousRow ) {  
+    if ( previousRow.nodeName == "TR" ) {
+     if ( previousRow.className != "row-category" && previousRow.className != "task-row" ) {
+	currentTable.insertBefore( currentRow, previousRow );
+	return;
+     }
+     else
+        return;
+    }
+    previousRow = previousRow.previousSibling;
+  }	       
+}
+
+function moveFirst(e)
+{
+  var o;
+  if (window.event)
+  {
+    //alert("IE event");
+    o = event.srcElement;
+  }
+  else
+  {
+    //alert("DOM event " + arguments.length + " " + e);
+    o = e;
+  }
+    
+  var currentRow = o.parentNode.parentNode;
+  var movingRow = o.parentNode.parentNode;
+  var currentTable = currentRow.parentNode;
+  
+  
+  while ( currentRow ) {
+    if ( currentRow.nodeName == "TR" ) {
+     if ( currentRow.className == "row-category" ) {
+		currentTable.insertBefore( movingRow, currentRow.nextSibling );
+		return;
+     }
+    }
+    currentRow = currentRow.previousSibling;
+  }
+}
+
+
+function moveDn(e)
+{
+  var o;
+  if (window.event)
+  {
+    //alert("IE event");
+    o = event.srcElement;
+  }
+  else
+  {
+    //alert("DOM event " + arguments.length + " " + e);
+    o = e;
+  }
+
+  var currentRow = o.parentNode.parentNode;
+  var nextRow = currentRow.nextSibling;
+  var currentTable = currentRow.parentNode;
+
+
+  while ( nextRow ){
+    if ( nextRow.nodeName == "TR" ) {
+	if ( nextRow.className != "row-category" && nextRow.className != "task-row" ) {
+	    currentTable.insertBefore( nextRow, currentRow );
+	    return;
+	} else
+	    return;
+	
+    } 
+    nextRow = nextRow.nextSibling;
+  }
+}
+
+
+function moveLast(e)
+{
+  var o;
+  if (window.event)
+  {
+    //alert("IE event");
+    o = event.srcElement;
+  }
+  else
+  {
+    //alert("DOM event " + arguments.length + " " + e);
+    o = e;
+  }
+  
+  var currentRow = o.parentNode.parentNode;
+  var movingRow = o.parentNode.parentNode;
+  var currentTable = currentRow.parentNode;
+
+ while ( currentRow ) {
+     if ( currentRow.className == "row-category" || currentRow.className == "task-row" || !currentRow.nextSibling ) {
+		currentTable.insertBefore( movingRow, currentRow);
+		return;
+     }
+    currentRow = currentRow.nextSibling;
+  }
+ 
+ //currentTable.insertBefore( movingRow, currentRow.previousSibling );
+  
+}
+
+
+function updateIt(e)
+{
+  var o;
+  if (window.event)
+  {
+    //alert("IE event");
+    o = event.srcElement;
+  }
+  else
+  {
+    //alert("DOM event " + arguments.length + " " + e);
+    o = e;
+  }
+  
+  var currentRow = o.parentNode.parentNode;
+  var currentTable = currentRow.parentNode;
+  
+  var hidden = document.getElementById("ids");
+  
+  currentRow = document.getElementById(o.name).parentNode.parentNode.nextSibling;
+  
+  var lancuch = o.name;
+  while ( currentRow ) {
+    if ( currentRow.nodeName == "TR" ) {
+     if ( currentRow.className == "row-category" || currentRow.className == "task-row" ) {
+        break;
+     } else {
+     	if ( currentRow.childNodes[1].firstChild.nodeName != "#text" ) {
+     		lancuch += "#" + currentRow.childNodes[1].firstChild.firstChild.nodeValue;
+     	} else {
+     		break;
+     	}
+     }
+    }
+    currentRow = currentRow.nextSibling;  
+  }
+ hidden.value = lancuch;
+}
+
+
+
diff -Naur mantis-1.1.1/lang/custom_strings_english.inc.txt mantis/lang/custom_strings_english.inc.txt
--- mantis-1.1.1/lang/custom_strings_english.inc.txt	1970-01-01 01:00:00.000000000 +0100
+++ mantis/lang/custom_strings_english.inc.txt	2008-02-21 21:10:48.000000000 +0100
@@ -0,0 +1,91 @@
+<?php
+# Mantis - a php based bugtracking system
+
+# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+
+# Mantis 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.
+#
+# Mantis 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 Mantis.  If not, see <http://www.gnu.org/licenses/>.
+	#
+	# Polish: Adam Bienias <adam@fireworks.atomnet.pl>
+	# Polish: Jaroslaw Lewandowski <jotel@jotel.net>
+	# Polish: Kacper Kruszewski <kacper@netcetera.pl>
+	# Polish: Tomasz Czerniejewski <tomc at artifexmundi com> 2005/04/06
+	# Polish: Arkadiusz Hutta <hutta@poczta.onet.pl> 2005/08/10
+	# Polish: Marcin Ulanecki <marcin dot ulanecki at vm dot pl> 2005/09/17
+	#
+	###########################################################################
+	# Polish strings for Mantis Task List extension
+	# Based on strings_polish_8859-2.inc.txt rev. 1.???
+	# -------------------------------------------------
+	# $Revision: 1.1.2.1 $
+	# $Author: smig1o $
+	# $Date: 2008-02-20 $
+	#
+	# $Id: custom_strings_polish_english.inc.txt,v 1.0 2008-02-20 smig1o Exp $
+	###########################################################################
+
+?>
+
+<?php
+
+$MANTIS_ERROR[ERRPR_WRONG_DATE_FORMAT] = 'Bad date format';
+$s_access_levels_enum_string = '10:viewer,25:reporter,40:updater,55:developer,60:task_manager,70:manager,90:administrator';
+$s_severity_enum_string = '10:task,20:trivial,30:text,40:tweak,50:minor,60:major,70:crash,80:block';
+$s_status_enum_string = '10:new,20:feedback,30:acknowledged,40:confirmed,50:assigned,60:processed,80:resolved,90:closed';
+
+
+$s_email_notification_title_for_status_bug_processed = 'The following issue has started PROCESSED.'; 
+
+$s_email_subject_bug = 'Bug';
+$s_email_subject_task = 'Task';
+$s_task_manager = 'Task manager';
+$s_email_on_processed = 'Email on PROCESSED';
+$s_processed_bug_title = 'Start working on this issue';
+$s_processed_bug_button = 'Start';
+$s_deadline = 'Deadline';
+$s_view_bugs_link = 'Bugs';
+$s_task_list_link = 'Tasks';
+
+$s_my_view_title_opened = 'Opened';
+$s_my_view_title_idea = 'Tasks';
+
+#task_view_page.php
+$s_task_is_task = 'Task';
+$s_task_move = 'Move';
+$s_task_removed = 'Removed from task list';
+$s_task_added = 'Added to task list';
+$s_task_shifted = 'Task moved: ';
+$s_task_moveUp = 'Move one up';
+$s_task_moveDown = 'Move one down';
+$s_task_moveTop = 'Move on top';
+$s_task_moveBottom = 'Mov on bottom';
+$s_task_view_all = 'All tasks';
+$s_task_view_active = 'Active tasks';
+$s_task_view_user = 'User tasks';
+$s_task_view_project = 'Project tasks';
+$s_task_view_global = 'All tasks';
+$s_task_view_header_user = 'User active tasks';
+$s_task_view_header_user_all = 'All user tasks';
+$s_task_view_header_project = 'Active project tasks';
+$s_task_view_header_project_all = 'All project tasks';
+$s_task_view_header_global = 'Active system tasks';
+$s_task_view_header_global_all = 'All tasks';
+$s_task_view_unassigned = 'Not assigned';
+$s_task_view_unconfirmed = 'Not approved';
+ 
+$s_bug_process_button = 'In process...';
+$s_deadline_task_conf_msg = 'Pick new deadline';
+$s_actiongroup_menu_update_deadline = 'Update deadline';
+
+?>
diff -Naur mantis-1.1.1/lang/custom_strings_polish_8859-2.inc.txt mantis/lang/custom_strings_polish_8859-2.inc.txt
--- mantis-1.1.1/lang/custom_strings_polish_8859-2.inc.txt	1970-01-01 01:00:00.000000000 +0100
+++ mantis/lang/custom_strings_polish_8859-2.inc.txt	2008-02-21 10:24:38.000000000 +0100
@@ -0,0 +1,102 @@
+<?php
+# Mantis - a php based bugtracking system
+
+# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+
+# Mantis 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.
+#
+# Mantis 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 Mantis.  If not, see <http://www.gnu.org/licenses/>.
+	#
+	# Polish: Adam Bienias <adam@fireworks.atomnet.pl>
+	# Polish: Jaroslaw Lewandowski <jotel@jotel.net>
+	# Polish: Kacper Kruszewski <kacper@netcetera.pl>
+	# Polish: Tomasz Czerniejewski <tomc at artifexmundi com> 2005/04/06
+	# Polish: Arkadiusz Hutta <hutta@poczta.onet.pl> 2005/08/10
+	# Polish: Marcin Ulanecki <marcin dot ulanecki at vm dot pl> 2005/09/17
+	#
+	###########################################################################
+	# Polish strings for Mantis Task List extension
+	# Based on strings_polish_8859-2.txt rev. 1.???
+	# -------------------------------------------------
+	# $Revision: 1.1.2.1 $
+	# $Author: smig1o $
+	# $Date: 2008-02-20 $
+	#
+	# $Id: custom_strings_polish_8859-2.inc.txt,v 1.0 2008-02-20 smig1o Exp $
+	###########################################################################
+
+?>
+<?php
+$s_actiongroup_menu_update_target_version = 'Aktualizuj Wersja docelowa';
+$s_actiongroup_menu_update_fixed_in_version = 'Aktualizuj Poprawiono w wersji';
+$s_actiongroup_menu_add_note = 'Dodaj not';
+$s_actiongroup_menu_attach_tags = 'Docz tag';
+$s_actiongroup_menu_update_deadline = 'Aktualizuj Termin realizacji';
+$s_fixed_in_version_bugs_conf_msg = 'Wybierz Poprawione w Wersji';
+$s_target_version_bugs_conf_msg = 'Wybierz wersj docelow';
+$s_fixed_in_version_group_bugs_button = 'Aktualizuj Poprawione w Wersji';
+$s_target_version_group_bugs_button = 'Aktualizuj wersj docelow';
+$s_deadline_task_conf_msg = 'Wybierz nowy termin realizacji';
+
+$MANTIS_ERROR[ERRPR_WRONG_DATE_FORMAT] = 'Bdny format daty';
+$s_access_levels_enum_string      = '10:obserwator,25:zgaszajcy,40:aktualizujcy,55:wykonawca,60:zarzdca zada,70:zarzdca,90:administrator';
+$s_severity_enum_string           = '10:zadanie,20:bahy,30:tekst,40:poprawka,50:drobny,60:wany,70:upadek';
+
+$s_status_enum_string             = '10:nowy,20:zwrcony,30:uznany,40:potwierdzony,50:przypisany,60:w trakcie realizacji,80:rozwizany,90:zamknity';
+
+$s_eta_enum_string                = '10:nieokrelona,11: 1 godzina,15: 2 godziny,19: 3 godziny,21: 4 godziny,24: 1 dzie,26: 2 dni,30: 3 dni,34: 4 dni,40: 1 tydzie,44: 10 dni,48: 2 tygodnie,52: 3 tygodnie,56: 1 miesic,60: 5 tygodni,54: 6 tygodni,58: 7 tygodni,72: 2 miesice,76: 9 tygodni,80: 10 tygodni,84: 3 miesice,88: 4 miesice,92: 5 miesicy,96: p roku';
+$s_eta = 'Pracochonno';
+
+$s_email_notification_title_for_status_bug_processed = 'Nastpujce zagadnienie zaczto PRZETWARZA.'; 
+$s_email_target_version = 'Wersja docelowa';
+
+$s_email_subject_bug = 'Bd';
+$s_email_subject_task = 'Zadanie';
+$s_task_manager = 'Zarzdca zada:';
+$s_email_on_processed = 'List gdy REALIZOWANE';
+$s_processed_bug_title = 'Zacznij prac nad zagadnieniem';
+$s_processed_bug_button = 'Zacznij';
+$s_target_version = 'Wersja docelowa';
+$s_deadline = 'Termin realizacji';
+$s_view_bugs_link = 'Bdy';
+$s_task_list_link = 'Zadania';
+
+$s_my_view_title_opened = 'Otwarte';
+$s_my_view_title_idea = 'Zadania';
+
+#task_view_page.php
+$s_task_is_task = 'Zadanie';
+$s_task_move = 'Przesu';
+$s_task_removed = 'Usunito z listy zada';
+$s_task_added = 'Dodano do listy zada';
+$s_task_shifted = 'Przesunito zadanie: ';
+$s_task_moveUp = 'Przesu zadanie o jedn pozycj do gry';
+$s_task_moveDown = 'Przesu zadanie o jedn pozycj na d';
+$s_task_moveTop = 'Zadanie na pocztek';
+$s_task_moveBottom = 'Zadanie na koniec';
+$s_task_view_all = 'Wszystkie zadania';
+$s_task_view_active = 'Aktywne zadania';
+$s_task_view_user = 'Uzytkownika';
+$s_task_view_project = 'Projektu';
+$s_task_view_global = 'Wszystkie';
+$s_task_view_header_user = 'Aktywne zadania uzytkownika';
+$s_task_view_header_user_all = 'Wszystkie zadania uzytkownika';
+$s_task_view_header_project = 'Aktywne zadania w projekcie';
+$s_task_view_header_project_all = 'Wszystkie zadania w projekcie';
+$s_task_view_header_global = 'Aktywne zadania w systemie';
+$s_task_view_header_global_all = 'Wszystkie zadania w systemie';
+$s_task_view_unassigned = 'Nieprzypisane';
+$s_task_view_unconfirmed = 'Niezatwierdzone';
+ 
+$s_bug_process_button = 'W trakcie realizacji...';
+?>
diff -Naur mantis-1.1.1/lang/custom_strings_polish_utf-8.inc.txt mantis/lang/custom_strings_polish_utf-8.inc.txt
--- mantis-1.1.1/lang/custom_strings_polish_utf-8.inc.txt	1970-01-01 01:00:00.000000000 +0100
+++ mantis/lang/custom_strings_polish_utf-8.inc.txt	2008-02-21 10:24:17.000000000 +0100
@@ -0,0 +1,103 @@
+<?php
+# Mantis - a php based bugtracking system
+
+# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+
+# Mantis 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.
+#
+# Mantis 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 Mantis.  If not, see <http://www.gnu.org/licenses/>.
+	#
+	# Polish: Adam Bienias <adam@fireworks.atomnet.pl>
+	# Polish: Jaroslaw Lewandowski <jotel@jotel.net>
+	# Polish: Kacper Kruszewski <kacper@netcetera.pl>
+	# Polish: Tomasz Czerniejewski <tomc at artifexmundi com> 2005/04/06
+	# Polish: Arkadiusz Hutta <hutta@poczta.onet.pl> 2005/08/10
+	# Polish: Marcin Ulanecki <marcin dot ulanecki at vm dot pl> 2005/09/17
+	#
+	###########################################################################
+	# Polish strings for Mantis Task List extension
+	# Based on strings_polish_8859-2.txt rev. 1.???
+	# -------------------------------------------------
+	# $Revision: 1.1.2.1 $
+	# $Author: smig1o $
+	# $Date: 2008-02-20 $
+	#
+	# $Id: custom_strings_polish_utf-8.inc.txt,v 1.0 2008-02-20 smig1o Exp $
+	###########################################################################
+
+?>
+<?php
+$s_actiongroup_menu_update_target_version = 'Aktualizuj Wersja docelowa';
+$s_actiongroup_menu_update_fixed_in_version = 'Aktualizuj Poprawiono w wersji';
+$s_actiongroup_menu_add_note = 'Dodaj notę';
+$s_actiongroup_menu_attach_tags = 'Dołącz tag';
+$s_actiongroup_menu_update_deadline = 'Aktualizuj Termin realizacji';
+$s_fixed_in_version_bugs_conf_msg = 'Wybierz Poprawione w Wersji';
+$s_target_version_bugs_conf_msg = 'Wybierz wersję docelową';
+$s_fixed_in_version_group_bugs_button = 'Aktualizuj Poprawione w Wersji';
+$s_target_version_group_bugs_button = 'Aktualizuj wersję docelową';
+$s_deadline_task_conf_msg = 'Wybierz nowy Termin realizacji';
+$s_deadline_group_task_button = 'Aktualizuj Termin realizacji';
+
+$MANTIS_ERROR[ERRPR_WRONG_DATE_FORMAT] = 'Błędny format daty';
+$s_access_levels_enum_string      = '10:obserwator,25:zgłaszający,40:aktualizujący,55:wykonawca,60:zarządca zadań,70:zarządca,90:administrator';
+$s_severity_enum_string           = '10:zadanie,20:błahy,30:tekst,40:poprawka,50:drobny,60:ważny,70:upadek';
+
+$s_status_enum_string             = '10:nowy,20:zwrócony,30:uznany,40:potwierdzony,50:przypisany,60:w trakcie realizacji,80:rozwiązany,90:zamknięty';
+
+$s_eta_enum_string                = '10:nieokreślona,11: 1 godzina,15: 2 godziny,19: 3 godziny,21: 4 godziny,24: 1 dzień,26: 2 dni,30: 3 dni,34: 4 dni,40: 1 tydzień,44: 10 dni,48: 2 tygodnie,52: 3 tygodnie,56: 1 miesiąc,60: 5 tygodni,54: 6 tygodni,58: 7 tygodni,72: 2 miesiące,76: 9 tygodni,80: 10 tygodni,84: 3 miesiące,88: 4 miesiące,92: 5 miesięcy,96: pół roku';
+$s_eta = 'Pracochłonność';
+
+$s_email_notification_title_for_status_bug_processed = 'Następujące zagadnienie zaczęto PRZETWARZAĆ.'; 
+$s_email_target_version = 'Wersja docelowa';
+
+$s_email_subject_bug = 'Błąd';
+$s_email_subject_task = 'Zadanie';
+$s_task_manager = 'Zarządca zadań:';
+$s_email_on_processed = 'List gdy REALIZOWANE';
+$s_processed_bug_title = 'Zacznij pracę nad zagadnieniem';
+$s_processed_bug_button = 'Zacznij';
+$s_target_version = 'Wersja docelowa';
+$s_deadline = 'Termin realizacji';
+$s_view_bugs_link = 'Błędy';
+$s_task_list_link = 'Zadania';
+
+$s_my_view_title_opened = 'Otwarte';
+$s_my_view_title_idea = 'Zadania';
+
+#task_view_page.php
+$s_task_is_task = 'Zadanie';
+$s_task_move = 'Przesuń';
+$s_task_removed = 'Usunięto z listy zadań';
+$s_task_added = 'Dodano do listy zadań';
+$s_task_shifted = 'Przesunięto zadanie: ';
+$s_task_moveUp = 'Przesuń zadanie o jedną pozycję do góry';
+$s_task_moveDown = 'Przesuń zadanie o jedną pozycję na dół';
+$s_task_moveTop = 'Zadanie na początek';
+$s_task_moveBottom = 'Zadanie na koniec';
+$s_task_view_all = 'Wszystkie zadania';
+$s_task_view_active = 'Aktywne zadania';
+$s_task_view_user = 'Uzytkownika';
+$s_task_view_project = 'Projektu';
+$s_task_view_global = 'Wszystkie';
+$s_task_view_header_user = 'Aktywne zadania uzytkownika';
+$s_task_view_header_user_all = 'Wszystkie zadania uzytkownika';
+$s_task_view_header_project = 'Aktywne zadania w projekcie';
+$s_task_view_header_project_all = 'Wszystkie zadania w projekcie';
+$s_task_view_header_global = 'Aktywne zadania w systemie';
+$s_task_view_header_global_all = 'Wszystkie zadania w systemie';
+$s_task_view_unassigned = 'Nieprzypisane';
+$s_task_view_unconfirmed = 'Niezatwierdzone';
+ 
+$s_bug_process_button = 'W trakcie realizacji...';
+?>
diff -Naur mantis-1.1.1/lang/string_polish.txt mantis/lang/string_polish.txt
--- mantis-1.1.1/lang/string_polish.txt	1970-01-01 01:00:00.000000000 +0100
+++ mantis/lang/string_polish.txt	2008-02-18 19:15:49.000000000 +0100
@@ -0,0 +1,1369 @@
+<?php
+	# Mantis - a php based bugtracking system
+	# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+	# Copyright (C) 2002 - 2006  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+	# This program is distributed under the terms and conditions of the GPL
+	# See the README and LICENSE files for details
+	#
+	# Polish: Adam Bienias <adam@fireworks.atomnet.pl>
+	# Polish: Jaroslaw Lewandowski <jotel@jotel.net>
+	# Polish: Kacper Kruszewski <kacper@netcetera.pl>
+	# Polish: Tomasz Czerniejewski <tomc at artifexmundi com> 2005/04/06
+	# Polish: Arkadiusz Hutta <hutta@poczta.onet.pl> 2005/08/10
+	# Polish: Marcin Ulanecki <marcin dot ulanecki at vm dot pl> 2005/09/17
+	#
+	###########################################################################
+	# Polish strings for Mantis
+	# Based on strings_english.txt rev. 1.???
+	# -------------------------------------------------
+	# $Revision: 1.8.2.2 $
+	# $Author: vboctor $
+	# $Date: 2006/10/23 07:14:53 $
+	#
+	# $Id: strings_polish_utf8.txt,v 1.8.2.2 2006/10/23 07:14:53 vboctor Exp $
+	###########################################################################
+
+?>
+<?php
+# Charset
+$s_charset = 'utf-8';
+
+# Group commands menuitems
+$s_actiongroup_menu_move = 'Przenieś';
+$s_actiongroup_menu_copy = 'Kopiuj';
+$s_actiongroup_menu_assign = 'Przypisz';
+$s_actiongroup_menu_close = 'Zamknij';
+$s_actiongroup_menu_delete = 'Usuń';
+$s_actiongroup_menu_resolve = 'Rozwiąż';
+$s_actiongroup_menu_update_priority = 'Aktualizuj priorytet';
+$s_actiongroup_menu_update_status = 'Aktualizuj stan';
+$s_actiongroup_menu_update_view_status = 'Aktualizuj widoczność';
+$s_actiongroup_menu_update_category = 'Aktualizuj kategorię';
+$s_actiongroup_menu_set_sticky = 'Przyklej/odklej';
+$s_actiongroup_menu_update_field = 'Aktualizuj %s';
+$s_actiongroup_menu_update_target_version = 'Aktualizuj Wersja docelowa';
+$s_actiongroup_menu_update_fixed_in_version = 'Aktualizuj Poprawiono w wersji';
+$s_actiongroup_menu_add_note = 'Dodaj notę';
+$s_actiongroup_menu_attach_tags = 'Dołącz tag';
+$s_actiongroup_bugs = 'Wybrane zagadnienia';
+
+# new strings:
+$s_all_projects = 'Wszystkie projekty';
+$s_move_bugs = 'Przenieś zagadnienia';
+$s_operation_successful = 'Operacja została zakończona pomyślnie.';
+$s_date_order = 'Sortowanie wg daty';
+$s_print_all_bug_page_link = 'Drukuj zgłoszenia';
+$s_csv_export = 'Eksport CSV';
+$s_login_anonymously = 'Logowanie anonimowe';
+$s_anonymous = 'Anonimowy';
+$s_jump_to_bugnotes = 'Przejdź do komentarzy';
+$s_public_project_msg = 'Ten projekt jest PUBLICZNY. Wszyscy użytkownicy posiadają do niego dostęp.';
+$s_private_project_msg = 'Ten projekt jest PRYWATNY. Jedynie administratorzy i ręcznie dodani użytkownicy mają do niego dostęp.';
+$s_access_level_project = 'Poziom dostępu';
+$s_view_submitted_bug_link = 'Zobacz zgłoszone zagadnienie';
+$s_assigned_projects = 'Projekty przypisane';
+$s_unassigned_projects = 'Projekty nieprzypisane';
+$s_print = 'Drukuj';
+$s_jump = 'Skocz do';
+$s_copy_users = 'Kopiuj użytkowników';
+$s_copy_categories_from = 'Kopiuj kategorie z';
+$s_copy_categories_to = 'Kopiuj kategorie do';
+$s_copy_users_from = 'Kopiuj użytkowników z';
+$s_copy_users_to = 'Kopiuj użytkowników do';
+$s_bug_history = 'Historia zagadnienia';
+$s_field = 'Pole';
+$s_old_value = 'Stara wartość';
+$s_new_value = 'Nowa wartość';
+$s_date_modified = 'Data modyfikacji';
+$s_bugnote = 'Komentarz';
+$s_change = 'Zmiana';
+$s_bugnote_view_state = 'Widoczność komentarza';
+$s_bug_monitor = 'Zagadnienie monitorowane przez';
+$s_bug_end_monitor = 'Zakończenie monitorowania przez';
+$s_announcement = 'Ogłoszenie';
+$s_stays_on_top = 'Pozostaje pierwsze na liście';
+$s_delete_bugnote_button = 'Usuń komentarz';
+$s_delete_bugnote_sure_msg = 'Czy na pewno chcesz usunąć ten komentarz?';
+$s_bug_relationships = 'Powiązania';
+$s_empty_password_sure_msg = 'Użytkownik ma puste hasło. Czy na pewno tego chcesz?';
+$s_empty_password_button = 'Użyj pustego hasła';
+
+$s_duplicate_of = 'duplikat';
+$s_has_duplicate = 'ma duplikat';
+$s_related_to = 'związane z';
+$s_dependant_on = 'blokowane przez';
+$s_blocks = 'blokuje';
+
+$s_new_bug = 'Nowe Zagadnienie';
+$s_bugnote_added = 'Dodano komentarz';
+$s_bugnote_edited = 'Edycja komentarza';
+$s_bugnote_deleted = 'Usunięto komentarz';
+$s_summary_updated = 'Zaktualizowano temat';
+$s_description_updated = 'Zaktualizowano opis';
+$s_additional_information_updated = 'Zaktualizowano informacje dodatkowe';
+$s_steps_to_reproduce_updated = 'Zaktualizowano kroki, by powtórzyć';
+$s_file_added = 'Dodano plik ';
+$s_file_deleted = 'Usunięto plik ';
+$s_bug_deleted = 'Usunięto zagadnienie';
+
+$s_make_private = 'Zmień stan na prywatny';
+$s_make_public = 'Zmień stan na publiczny';
+
+$s_create_new_project_link = 'Stwórz nowy projekt';
+
+$s_login_link = 'Zaloguj się';
+
+# bug_actiongroup_page.php : mass treatment
+$s_bug_actiongroup_failed = 'Nie masz wystarczających uprawnień by wykonać tę akcję na poniższych zagadnieniach: ';
+$s_bug_actiongroup_access = 'Nie masz wystarczających uprawnień by wykonać tę akcję.';
+$s_bug_actiongroup_status = 'Nie można ustawić temu zagadneniu żądanego stanu';
+$s_bug_actiongroup_category = 'Nie można ustawić temu zagadeniu żądanej kategorii';
+$s_close_bugs_conf_msg = 'Czy na pewno chcesz zamknąć te zagadnienia?';
+$s_delete_bugs_conf_msg = 'Czy na pewno chesz usunąć te zagadnienia?';
+$s_move_bugs_conf_msg = 'Przenieś zagadnienia do';
+$s_copy_bugs_conf_msg = 'Kopiuj zagadnienia do';
+$s_assign_bugs_conf_msg = 'Przypisz zagadnienia do';
+$s_resolve_bugs_conf_msg = 'Wybierz rozwiązanie zagadnień';
+$s_priority_bugs_conf_msg = 'Wybierz priorytet zagadnień';
+$s_status_bugs_conf_msg = 'Wybierz stan zagadnień';
+$s_view_status_bugs_conf_msg = 'Wybierz widoczność zagadnień';
+$s_category_bugs_conf_msg = 'Wybierz kategorię zagadnień';
+$s_set_sticky_bugs_conf_msg = 'Czy na pewno chesz przykleić/odkleić te zagadnienia?';
+$s_fixed_in_version_bugs_conf_msg = 'Wybierz Poprawione w Wersji';
+$s_target_version_bugs_conf_msg = 'Wybierz wersję docelową';
+$s_close_group_bugs_button = 'Zamknij zagadnienia' ;
+$s_delete_group_bugs_button = 'Usuń zagadnienia' ;
+$s_move_group_bugs_button = 'Przenieś zagadnienia' ;
+$s_copy_group_bugs_button = 'Kopiuj zagadnienia' ;
+$s_assign_group_bugs_button = 'Przypisz zagadnienia' ;
+$s_resolve_group_bugs_button = 'Rozwiąż zagadnienia' ;
+$s_priority_group_bugs_button = 'Aktualizuj priorytet' ;
+$s_status_group_bugs_button = 'Aktualizuj stan' ;
+$s_category_group_bugs_button = 'Aktualizuj kategorię';
+$s_view_status_group_bugs_button = 'Aktualizuj widoczność';
+$s_set_sticky_group_bugs_button = 'Przyklej/odklej';
+$s_fixed_in_version_group_bugs_button = 'Aktualizuj Poprawione w Wersji';
+$s_target_version_group_bugs_button = 'Aktualizuj wersję docelową';
+
+# improved JPgraphs strings
+$s_graph_imp_status_title = 'Wykres podsumowujący wg stanu' ;
+$s_graph_imp_priority_title = 'Wykres podsumowujący wg priorytetu' ;
+$s_graph_imp_severity_title = 'Wykres podsumowujący wg ważności';
+$s_graph_imp_category_title = 'Wykres podsumowujący wg kategorii';
+$s_graph_imp_resolution_title = 'Wykres podsumowujący wg rozwiązania';
+$s_by_status_pct = 'wg stanu procentowo';
+$s_by_priority_pct = 'wg priorytetu procentowo';
+$s_by_severity_pct = 'wg ważności procentowo';
+$s_by_category_pct = 'wg kategorii procentowo';
+$s_by_resolution_pct = 'wg rozwiązania procentowo';
+$s_by_severity_mix = 'wg ważności i stanu';
+$s_by_priority_mix = 'wg priorytetu i stanu';
+$s_by_resolution_mix = 'wg rozwiązania i stanu';
+$s_synthesis_link = 'Temat';
+$s_status_link = 'Wg stanu';
+$s_priority_link = 'Wg priorytetu';
+$s_severity_link = 'Wg ważności';
+$s_category_link = 'Wg kategorii';
+$s_resolution_link = 'Wg rozwiązania';
+$s_legend_still_open = 'Otwarte';
+$s_legend_resolved = 'Rozwiązane';
+$s_legend_assigned = 'Przypisane';
+$s_legend_total = 'Łącznie';
+$s_legend_opened = 'Otwarte';
+$s_legend_closed = 'Zamknięte';
+$s_legend_reported = 'Zgłoszone';
+$s_cumulative = 'Zbiorczy';
+$s_not_enough_data = 'Brak wystarczającej ilości danych do stworzenia wykresu';
+
+# print_all_bug_page.php : display selected bugs
+$s_hide_button = 'Wyświetl tylko zaznaczone';
+
+# print_all_bug_options.php : printing preferences
+$s_printing_preferences_title = 'Wybierz pola do wydruku';
+$s_printing_options_link = 'Opcje drukowania';
+
+# word and excel export
+$s_bugnote_title = 'Autor' ;
+$s_bugnote_date = 'Data komentarza';
+$s_bugnote_description = 'Treść komentarza';
+
+$s_error_no_proceed = 'Proszę użyć przycisku "Powrót" w przeglądarce by powrócić do poprzedniej strony. Tam można poprawić to co spowodowało błąd lub wybrać inną operację. Można również kliknąć opcję w górnym menu, aby przejść bezpośrednio do innej sekcji.';
+
+# ERROR strings
+$MANTIS_ERROR[ERROR_GENERIC] = 'Wystąpił błąd podczas wykonywanej operacji. Możesz zgłosić błąd Twojemu administratorowi.';
+$MANTIS_ERROR[ERROR_SQL] = 'Wykryto błąd SQL. Proszę o zgłoszenie błędu do ';
+$MANTIS_ERROR[ERROR_REPORT] = 'Wystąpił błąd w twoim zgłoszeniu.';
+$MANTIS_ERROR[ERROR_NO_FILE_SPECIFIED] = 'Nie został podany żaden plik.';
+$MANTIS_ERROR[ERROR_FILE_DISALLOWED]    = 'Typ przesyłanego pliku nie jest dozwolony.';
+$MANTIS_ERROR[ERROR_NO_DIRECTORY] = 'Podany katalog nie istnieje. Sprawdź ustawienia projektu.';
+$MANTIS_ERROR[ERROR_DUPLICATE_FILE] = 'Plik o podanej nazwie już istnieje. Usuń najpierw istniejący plik.';
+$MANTIS_ERROR[ERROR_DUPLICATE_PROJECT]  = 'Istnieje już projekt o takiej nazwie.';
+$MANTIS_ERROR[ERROR_EMPTY_FIELD] = 'Wymagane pole \'%s\' nie jest wypełnione. Sprawdź wprowadzone dane.';
+$MANTIS_ERROR[ERROR_PROTECTED_ACCOUNT] = 'To konto jest zabezpieczone. Nie masz praw dostępu do tego konta póki zabezpieczenie jest aktywne.';
+$MANTIS_ERROR[ERROR_ACCESS_DENIED]      = 'Brak dostępu.';
+$MANTIS_ERROR[ERROR_UPLOAD_FAILURE]     = 'Przesyłanie pliku nie powiodło się. Możliwość publikowania plików może być wyłączona w PHP.  Należy poprosić administratora, aby uruchomił skrypt sprawdzający konfigurację serwera.';
+$MANTIS_ERROR[ERROR_FILE_TOO_BIG]       = 'Przesyłanie pliku nie powiodło się. Prawdopodobnie jest to spowodowane rozmiarem pliku przekraczającym maksymalny dozwolony na tym serwerze.';
+$MANTIS_ERROR[ERROR_GPC_VAR_NOT_FOUND]  = 'Nie znaleziono parametru (%s) wymaganego przez stronę.';
+$MANTIS_ERROR[ERROR_USER_NAME_NOT_UNIQUE] = 'Ta nazwa użytkownika jest już używana.  Proszę wrócić i podać inną nazwę.';
+$MANTIS_ERROR[ERROR_CONFIG_OPT_NOT_FOUND] = 'Opcja konfiguracji \'%s\' nie znaleziona.';
+$MANTIS_ERROR[ERROR_CONFIG_OPT_CANT_BE_SET_IN_DB] = 'Configuration option \'%s\' can not be set in the database.  It must be set in config_inc.php.';
+$MANTIS_ERROR[ERROR_LANG_STRING_NOT_FOUND] = 'Napis \'%s\' nie znaleziony.';
+$MANTIS_ERROR[ERROR_BUGNOTE_NOT_FOUND]  = 'Nie znaleziono komentarza.';
+$MANTIS_ERROR[ERROR_PROJECT_NOT_FOUND]  = 'Nie znaleziono projektu.';
+$MANTIS_ERROR[ERROR_DB_FIELD_NOT_FOUND] = 'Nie znaleziono pola \'%s\' w bazie danych.';
+$MANTIS_ERROR[ERROR_FTP_CONNECT_ERROR]	= 'Nie można nawiązać połączenia z serwerem FTP.';
+$MANTIS_ERROR[ERROR_HANDLER_ACCESS_TOO_LOW]	 = 'Operator nie ma wystarczających praw dostępu do modyfikacji zgłoszenia z tym stanem.';
+$MANTIS_ERROR[ERROR_PROJECT_NAME_NOT_UNIQUE] = 'Projekt o tej nazwie już istnieje.  Proszę wrócić i podać inną nazwę.';
+$MANTIS_ERROR[ERROR_PROJECT_NAME_INVALID] = 'Podano nieprawidłową nazwę projektu.  Nazwa projektu nie może być pusta.';
+$MANTIS_ERROR[ERROR_USER_NOT_FOUND]	= 'Nie znaleziono użytkownika.';
+$MANTIS_ERROR[ERROR_AUTH_INVALID_COOKIE] = 'Informacja o logowaniu przechowywana przez Twoją przeglądarkę jest nieprawidłowa.  Być może twoje konto zostało usunięte.';
+$MANTIS_ERROR[ERROR_USER_PREFS_NOT_FOUND] = 'Nie można znaleźć ustawień tego użytkownika.';
+$MANTIS_ERROR[ERROR_NEWS_NOT_FOUND]	= 'Nie znaleziono wiadomości.';
+$MANTIS_ERROR[ERROR_USER_CREATE_PASSWORD_MISMATCH] = 'Hasło nie zgadza się.';
+$MANTIS_ERROR[ERROR_GPC_ARRAY_EXPECTED]	= 'Ciąg zamiast tablicy w %s.';
+$MANTIS_ERROR[ERROR_GPC_ARRAY_UNEXPECTED] = 'Tablica zamiast ciągu w %s.';
+$MANTIS_ERROR[ERROR_GPC_NOT_NUMBER] = 'Oczekiwano liczby w %s.';
+$MANTIS_ERROR[ERROR_BUG_NOT_FOUND]	= 'Nie znaleziono zagadnienia %d.';
+$MANTIS_ERROR[ERROR_FILTER_NOT_FOUND]	 = 'Nie znaleziono filtru %d.';
+$MANTIS_ERROR[ERROR_FILTER_TOO_OLD] = 'Filtr, którego próbujesz użyć jest zbyt stary, aby można go było uaktualnić. Proszę stworzyć ten filtr od nowa.';
+$MANTIS_ERROR[ERROR_EMAIL_INVALID]	= 'Nieprawidłowy email.';
+$MANTIS_ERROR[ERROR_USER_PROFILE_NOT_FOUND] = 'Nie znaleziono profilu.';
+$MANTIS_ERROR[ERROR_FILE_NOT_ALLOWED]	= 'Pliki tego typu nie mogą być przesyłane.';
+$MANTIS_ERROR[ERROR_FILE_DUPLICATE]	= 'Plik o tej nazwie już istnieje, proszę usunąć najpierw oryginalny plik.';
+$MANTIS_ERROR[ERROR_FILE_INVALID_UPLOAD_PATH] = 'Błędny katalog plików. Katalog nie istnieje lub serwer www nie ma uprawnień by do niego zapisywać';
+$MANTIS_ERROR[ERROR_FILE_NO_UPLOAD_FAILURE] = 'Żaden plik nie został przesłany. Proszę wrócić i wybrać plik przed naciśnięciem klawisza Prześlij';
+$MANTIS_ERROR[ERROR_FILE_MOVE_FAILED] = 'Przesłany plik nie został skopiowany do Katalogu dla przesyłanych plików. Katalog nie istnieje albo serwer nie ma wystarczających praw by do niego zapisywać';
+$MANTIS_ERROR[ERROR_BUG_DUPLICATE_SELF]	= 'Nie można wskazać jako duplikat zagadnienia tego samego zagadnienia.';
+$MANTIS_ERROR[ERROR_CUSTOM_FIELD_NOT_FOUND] = 'Pole własne nie znalezione';
+$MANTIS_ERROR[ERROR_CUSTOM_FIELD_NAME_NOT_UNIQUE] = 'Ta nazwa jest już używana.';
+$MANTIS_ERROR[ERROR_CUSTOM_FIELD_IN_USE] = 'Przynajmniej jeden projekt używa jeszcze tego pola.';
+$MANTIS_ERROR[ERROR_CUSTOM_FIELD_INVALID_VALUE] = 'Błędna wartość pola';
+$MANTIS_ERROR[ERROR_CUSTOM_FIELD_INVALID_DEFINITION] = 'Błędna definicja pola dodatkowego.';
+$MANTIS_ERROR[ERROR_LDAP_AUTH_FAILED]	= 'Autentykacja LDAP nie powiodła się.';
+$MANTIS_ERROR[ERROR_LDAP_SERVER_CONNECT_FAILED] = 'Komunikacja z serwerem LDAP nie powiodła się.';
+$MANTIS_ERROR[ERROR_LDAP_UPDATE_FAILED]	= 'Nie udało się uaktualnić rekordu LDAP .';
+$MANTIS_ERROR[ERROR_LDAP_USER_NOT_FOUND] = 'Rekord użytkownika LDAP nie znaleziony.';
+$MANTIS_ERROR[ERROR_DB_CONNECT_FAILED]	= 'Błąd połączenia z bazą danych: #%d: %s';
+$MANTIS_ERROR[ERROR_DB_QUERY_FAILED]	= 'Błąd bazy danych #%d: %s dla zapytania %s.';
+$MANTIS_ERROR[ERROR_DB_SELECT_FAILED]	= 'Błąd bazy danych: #%d: %s';
+$MANTIS_ERROR[ERROR_CATEGORY_DUPLICATE] = 'Podana kategoria już istnieje.';
+$MANTIS_ERROR[ERROR_CATEGORY_NO_ACTION] = 'Nie zdefiniowano możliwości kopiowania.';
+$MANTIS_ERROR[ERROR_CATEGORY_NOT_FOUND] = 'Nie znaleziono kategorii.';
+$MANTIS_ERROR[ERROR_VERSION_DUPLICATE] = 'Podana wersja już istnieje.';
+$MANTIS_ERROR[ERROR_VERSION_NOT_FOUND]  = 'Nie znaleziono wersji \'%s\'.';
+$MANTIS_ERROR[ERROR_USER_NAME_INVALID]  = 'Nieprawidłowa nazwa użytkownika. Nazwa użytkownika może zawierać tyko litery, liczby, spacje, myślniki i podkreślenia.';
+$MANTIS_ERROR[ERROR_USER_DOES_NOT_HAVE_REQ_ACCESS] = 'Użytkownik nie posiada wymaganego poziomu dostępu';
+$MANTIS_ERROR[ERROR_USER_REAL_MATCH_USER] = 'Wybrana "Prawdziwa nazwa" jest już używana jako nazwa innego użytkownika.  Proszę wybrać inną.';
+$MANTIS_ERROR[ERROR_SPONSORSHIP_NOT_ENABLED] = 'Sponsorowanie nie zostało uruchmione.';
+$MANTIS_ERROR[ERROR_SPONSORSHIP_NOT_FOUND] = 'Sponsorowanie %d nie znaleziony.';
+$MANTIS_ERROR[ERROR_SPONSORSHIP_AMOUNT_TOO_LOW] = 'Sponsorowanie (%s) jest poniżej minimalnej kwoty (%s).';
+$MANTIS_ERROR[ERROR_SPONSORSHIP_HANDLER_ACCESS_LEVEL_TOO_LOW] = 'Operator nie ma wystarczających uprawnień do obsługi sponsorowanych zagadnień.';
+$MANTIS_ERROR[ERROR_SPONSORSHIP_ASSIGNER_ACCESS_LEVEL_TOO_LOW] = 'Przypisywanie sponsorowanych zagadnień wymaga większych uprawnień.';
+$MANTIS_ERROR[ERROR_SPONSORSHIP_SPONSOR_NO_EMAIL] = 'Sponsor nie podał adresu email. Proszę zaktualizować swój profil.';
+$MANTIS_ERROR[ERROR_CONFIG_OPT_INVALID] = 'Opcja konfiguracji \'%s\' ma nieprawidłową wartość \'%s\'';
+$MANTIS_ERROR[ERROR_BUG_READ_ONLY_ACTION_DENIED] = 'Akcja nie może zostać wykonana ponieważ zgłoszenie \'%d\' jest tylko do odczytu.';
+$MANTIS_ERROR[ERROR_RELATIONSHIP_ALREADY_EXISTS] = "Istnieje już powiązanie pomiędzy tymi dwoma zgłoszeniami.";
+$MANTIS_ERROR[ERROR_RELATIONSHIP_NOT_FOUND] = "Nie znaleziono powiązania.";
+$MANTIS_ERROR[ERROR_RELATIONSHIP_ACCESS_LEVEL_TO_DEST_BUG_TOO_LOW] = "Zgłoszenie %d wymaga wyższego poziomu dostępu.";
+$MANTIS_ERROR[ERROR_RELATIONSHIP_SAME_BUG] = "Zgłoszenie nie może być powiązane z samym sobą.";
+$MANTIS_ERROR[ERROR_SIGNUP_NOT_MATCHING_CAPTCHA] = 'Potwierdzenie nie pasuje. Proszę spróbować ponownie.';
+$MANTIS_ERROR[ERROR_LOST_PASSWORD_NOT_ENABLED] = 'Funkcja \'Zapomniałem hasła\' jest niedostępna.';
+$MANTIS_ERROR[ERROR_LOST_PASSWORD_NO_EMAIL_SPECIFIED] = 'Musisz podać adres email, aby zresetować hasło.';
+$MANTIS_ERROR[ERROR_LOST_PASSWORD_NOT_MATCHING_DATA] = 'Wprowadzone dane nie pasują do żadnego zarejestrowanego konta!';
+$MANTIS_ERROR[ERROR_LOST_PASSWORD_CONFIRM_HASH_INVALID] = 'Adres potwierdzający jest nieprawidłowy lub został już użyty. Proszę zapisać się ponownie.';
+$MANTIS_ERROR[ERROR_LOST_PASSWORD_MAX_IN_PROGRESS_ATTEMPTS_REACHED] = 'Osiągnięto maksymalną liczbę oczekujących żądań. Proszę skonaktować się z administratorem.';
+$MANTIS_ERROR[ERROR_PROJECT_RECURSIVE_HIERARCHY] = 'Ta operacja spowodowałaby pętlę w hierarchii podprojektów.';
+$MANTIS_ERROR[ERROR_USER_CHANGE_LAST_ADMIN] = 'Nie możesz zmienić poziomu dostępu dla jedynego ADMINISTRATORA systemu.';
+$MANTIS_ERROR[ERROR_PAGE_REDIRECTION] = 'Page redirection error, ensure that there are no spaces outside the PHP block (&lt;?php ?&gt;) in config_inc.php or custom_*.php files.';
+$MANTIS_ERROR[ERRPR_WRONG_DATE_FORMAT] = 'Błędny format daty';
+
+$s_login_error = 'Twoje konto może być wyłączone lub nazwa użytkownika/hasło nie są poprawne.';
+$s_login_cookies_disabled = 'Twoja przeglądarka nie obsługuje plików "cookie" lub ich obsługa została wyłączona.';
+
+# General Strings
+$s_go_back = 'Powrót';
+$s_proceed = 'Kliknij aby kontynuować';
+
+$s_switch = 'Przełącz';
+$s_logged_in_as = 'Zalogowano jako';
+
+$s_prefix_for_deleted_users = 'użytkownik';
+
+$s_administrator = 'administrator';
+$s_myself = "Ja";
+$s_default_access_level = 'Domyślny poziom dostępu';
+
+$s_issue_status_percentage = 'Stan procentowy zgłoszenia';
+
+# Enum Strings
+$s_access_levels_enum_string      = '10:obserwator,25:zgłaszający,40:aktualizujący,55:wykonawca,60:zarządca zadań,70:zarządca,90:administrator';
+$s_project_status_enum_string     = '10:tworzony,30:ukończony,50:stabilny,70:zarzucony';
+$s_project_view_state_enum_string = '10:publiczny,50:prywatny';
+$s_view_state_enum_string         = '10:publiczny,50:prywatny';
+
+$s_priority_enum_string           = '10:żaden,20:niski,30:normalny,40:wysoki,50:pilny,60:natychmiastowy';
+#$s_severity_enum_string           = '10:zadanie,20:błahy,30:tekst,40:poprawka,50:drobny,60:ważny,70:upadek,80:blokada';
+$s_severity_enum_string           = '10:zadanie,20:błahy,30:tekst,40:poprawka,50:drobny,60:ważny,70:upadek';
+$s_reproducibility_enum_string    = '10:zawsze,30:czasami,50:losowo,70:nie próbowano,90:nie do powtórzenia,100:nie dotyczy';
+$s_status_enum_string             = '10:nowy,20:zwrócony,30:uznany,40:potwierdzony,50:przypisany,60:w trakcie realizacji,80:rozwiązany,90:zamknięty';
+$s_resolution_enum_string         = '10:otwarty,20:poprawiony,30:ponownie otwarty,40:nie do powtórzenia,50:nie naprawialny,60:duplikat,70:to nie Zagadnienie,80:zawieszony,90:nie zostanie naprawiony';
+$s_projection_enum_string         = '10:brak,30:poprawka,50:większa poprawka,70:duży nakład pracy,90:przeprojektowanie';
+$s_eta_enum_string                = '10:nieokreślona,11: 1 godzina,15: 2 godziny,19: 3 godziny,21: 4 godziny,24: 1 dzień,26: 2 dni,30: 3 dni,34: 4 dni,40: 1 tydzień,44: 10 dni,48: 2 tygodnie,52: 3 tygodnie,56: 1 miesiąc,60: 5 tygodni,54: 6 tygodni,58: 7 tygodni,72: 2 miesiące,76: 9 tygodni,80: 10 tygodni,84: 3 miesiące,88: 4 miesiące,92: 5 miesięcy,96: pół roku';
+$s_sponsorship_enum_string        = '0:Nieopłacony,1:Żądanie zapłaty,2:Opłacony';
+
+# Email Strings
+$s_new_account_subject = 'Rejestracja konta';
+$s_new_account_greeting = 'Dziękujemy za zapisanie. Masz konto o nazwie \'';
+$s_new_account_greeting2 = '\'. Aby zakończyć rejestrację, odwiedź podany adres (upewnij się, że jest wprowadzony w jednej linii) i ustaw swoje hasło dostępu:';
+$s_new_account_username = 'Nazwa użytkownika: ';
+$s_new_account_message = 'Jeśli to nie twoje zgłoszenie, zignoruj tę wiadomość. Nic się nie stanie.' . "\n\n";
+$s_new_account_do_not_reply = 'NIE ODPOWIADAJ NA TĘ WIADOMOŚĆ';
+$s_new_account_email = 'Email: ';
+$s_new_account_IP = 'Zdalny adres IP: ';
+$s_new_account_signup_msg = 'Następujące konto zostało założone:';
+
+$s_reset_request_msg = 'Ktoś (prawdopodobnie Ty) zażądał zmiany hasła przez weryfikację emailem. Jeśli to nie Ty, zignoruj tę wiadomość.' . "\n\n" . 'Jeśli prosiłeś o to, odwiedź poniższy adres aby zmienić hasło:';
+$s_reset_request_in_progress_msg = 'Jeśli nazwa użytkownika i adres email dla twojego konta są prawidłowe to prześlemy teraz wiadomość potwierdzającą na podany adres. Gdy otrzymasz wiadomość, postępuj zgodnie z podanymi w niej instrukcjami i zmień hasło.';
+
+$s_email_notification_title_for_status_bug_new = 'Następujące zagadnienie ma ustawiony stan NOWE (ponownie)';
+$s_email_notification_title_for_status_bug_feedback = 'Następujące zagadnienie zostało ZWRÓCONE.';
+$s_email_notification_title_for_status_bug_acknowledged = 'Następujące zagadnienie zostało UZNANE.';
+$s_email_notification_title_for_status_bug_confirmed = 'Następujące zagadnienie zostało POTWIERDZONE.';
+$s_email_notification_title_for_status_bug_assigned = 'Następujące zagadnienie zostało PRZYPISANE.';
+$s_email_notification_title_for_status_bug_processed = 'Następujące zagadnienie zaczęto PRZETWARZAĆ.'; 
+$s_email_notification_title_for_status_bug_resolved = 'Następujące zagadnienie zostało ROZWIĄZANE.';
+$s_email_notification_title_for_status_bug_closed = 'Następujące zagadnienie zostało ZAMKNIĘTE.';
+
+$s_email_notification_title_for_action_bug_submitted = 'Następujące zagadnienie zostało DODANE.';
+$s_email_notification_title_for_action_bug_assigned = 'Następujące zagadnienie zostało PRZYPISANE.';
+$s_email_notification_title_for_action_bug_reopened = 'Następujące zagadnienie zostało PONOWNIE OTWARTE.';
+$s_email_notification_title_for_action_bug_deleted = 'Następujące zagadnienie zostało SKASOWANE.';
+$s_email_notification_title_for_action_bug_updated = 'Następujące zagadnienie zostało ZAKTUALIZOWANE.';
+$s_email_notification_title_for_action_sponsorship_added = 'Następujące zagadnienie zostało ZASPONSOROWANE.';
+$s_email_notification_title_for_action_sponsorship_updated = 'Sponsorowanie następującego zagadnienia zostało zmodyfikowane.';
+$s_email_notification_title_for_action_sponsorship_deleted = 'Sponsorowanie następującego zagadnienia zostało wycofane.';
+
+$s_email_notification_title_for_action_bugnote_submitted = 'Do następującego Zagadnienia DODANO KOMENTARZ.';
+$s_email_notification_title_for_action_duplicate_of_relationship_added = "Następujące zagadnienie zostało ustawione jako DUPLIKAT zagadniena %s.";
+$s_email_notification_title_for_action_has_duplicate_relationship_added = "Zagadnienie %s zostało ustawione jako DUPLIKAT nastepującego zagadnienia.";
+$s_email_notification_title_for_action_related_to_relationship_added = "Następujące zagadnienie ustawiono jako ZWIĄZANE z zagadnieniem %s.";
+$s_email_notification_title_for_action_dependant_on_relationship_added = "Następujące zagadnienie ustawiono jako BLOKOWANY przez zagadnienie %s.";
+$s_email_notification_title_for_action_blocks_relationship_added = "Następujące zagadnienie ustawiono jako BLOKUJE zagadnienie %s.";
+$s_email_notification_title_for_action_duplicate_of_relationship_deleted = "Następującemu zagadnieniu usunięto DUPLIKAT zagadnienia %s.";
+$s_email_notification_title_for_action_has_duplicate_relationship_deleted = "Zagadnieniu %s usunięto DUPLIKAT następującego zagadnienia.";
+$s_email_notification_title_for_action_related_to_relationship_deleted = "Następującemu zagadnieniu usunieto ZWIĄZANE z zagadnieniem %s.";
+$s_email_notification_title_for_action_dependant_on_relationship_deleted = "Następującemu zagadnieniu usunieto BLOKOWANY przez zagadnienie %s.";
+$s_email_notification_title_for_action_blocks_relationship_deleted = 'Następującemu zagadnieniu usunieto BLOKUJE zagadnienie %s.';
+$s_email_notification_title_for_action_relationship_child_resolved = "BLOKUJĄCE zagadnienie %s zostało ROZWIĄZANE.";
+$s_email_notification_title_for_action_relationship_child_closed = "BLOKUJĄCE zgadnienie %s zostało ZAMKNIĘTE.";
+
+$s_email_reporter = 'Zgłaszający';
+$s_email_handler = 'Operator';
+$s_email_project = 'Projekt';
+$s_email_bug = 'Indentyfikator Zagadnienia';
+$s_email_category = 'Kategoria';
+$s_email_reproducibility = 'Powtarzalność';
+$s_email_severity = 'Ważność';
+$s_email_priority = 'Priorytet';
+$s_email_status = 'Stan';
+$s_email_resolution = 'Rozwiązanie';
+$s_email_duplicate = 'Duplikat Zagadnienia';
+$s_email_fixed_in_version = 'Rozwiązane w wersji';
+$s_email_target_version = 'Wersja docelowa';
+$s_email_date_submitted = 'Data zgłoszenia';
+$s_email_last_modified = 'Data modyfikacji';
+$s_email_summary =  'Temat';
+$s_email_description = 'Opis';
+$s_email_subject_bug = 'Błąd';
+$s_email_subject_task = 'Zadanie';
+
+# account_delete.php
+$s_account_protected_msg = 'Konto zostało zabezpieczone. Nie można zmienić ustawień...';
+$s_account_removed_msg = 'Twoje konto zostało usunięte...';
+
+# account_delete_page.php
+$s_confirm_delete_msg = 'Czy na pewno chcesz usunąć swoje konto?';
+$s_delete_account_button = 'Usuń Konto';
+
+# account_page.php
+$s_manage_profiles_link = 'Profile';
+$s_change_preferences_link = 'Preferencje';
+$s_edit_account_title = 'Edytycja konta';
+$s_username = 'Nazwa użytkownika';
+$s_realname = 'Prawdziwa nazwa';
+$s_email = 'Email';
+$s_password = 'Hasło';
+$s_no_password_change = 'Hasło jest kontrolowane przez inny system, nie może być edytowane tutaj.';
+$s_confirm_password  = 'Potwierdź hasło';
+$s_access_level = 'Poziom dostępu';
+$s_update_user_button = 'Aktualizuj';
+$s_verify_warning = 'Informacja o Twoim koncie została zweryfikowana. Wiadomość potwierdzająca, którą otrzymałeś jest już niepoprawna.';
+$s_verify_change_password = 'Musisz ustawić swoje hasło tutaj, aby móc się zalogować ponownie.';
+$s_task_manager = 'Zarządca zadań:';
+
+# account_prefs_page.php
+$s_default_account_preferences_title = 'Preferencje konta';
+$s_default_project = 'Domyślny projekt';
+$s_advanced_report = 'Zgłoszenie zaawansowane';
+$s_advanced_view = 'Widok zaawansowany';
+$s_advanced_update = 'Aktualizacja zaawansowana';
+$s_refresh_delay = 'Opóźnienie odświeżania';
+$s_redirect_delay = 'Opóźnienie przekierowania';
+$s_with_minimum_severity = 'Z minimalną ważnością ';
+$s_bugnote_order = 'Kolejność sortowania komentarzy';
+$s_bugnote_order_asc = 'Rosnąco';
+$s_bugnote_order_desc = 'Malejąco';
+$s_email_on_new = 'List gdy NOWE';
+$s_email_on_assigned = 'List gdy PRZYPISANE';
+$s_email_on_feedback = 'List gdy ZWRÓCONE';
+$s_email_on_resolved = 'List gdy ROZWIĄZANE';
+$s_email_on_closed = 'List gdy ZAMKNIĘTE';
+$s_email_on_reopened = 'List gdy PONOWNIE OTWARTE';
+$s_email_on_bugnote_added = 'List gdy DODANO KOMENTARZ';
+$s_email_on_status_change = 'List gdy ZMIENIONO STAN';
+$s_email_on_priority_change = 'List gdy ZMIENIONO PRIORYTET';
+$s_email_on_processed = 'List gdy REALIZOWANE';
+$s_email_bugnote_limit = 'Limit emaili z komentarzami';
+$s_language = 'Język';
+$s_update_prefs_button = 'Aktualizuj';
+$s_reset_prefs_button = 'Przywróć ustawienia';
+
+# account_prefs_reset.php
+$s_prefs_reset_msg = 'Preferencje zostały przywrócone...';
+
+# account_prefs_update.php
+$s_prefs_updated_msg = 'Preferencje zostały zaktualizowane...';
+
+# account_profile_add.php
+$s_profile_added_msg = 'Profil został dodany...';
+
+# account_profile_delete.php
+$s_profile_deleted_msg = 'Profil został usunięty...';
+
+# account_profile_edit_page.php
+$s_edit_profile_title = 'Edycja profilu';
+$s_platform = 'Platforma';
+$s_operating_system = 'System operacyjny';
+$s_additional_description = 'Dodatkowy opis';
+$s_update_profile_button = 'Zaktualizuj';
+
+# account_profile_make_default.php
+$s_profile_defaulted_msg = 'Standardowy profil został zaktualizowany...';
+
+# account_profile_manage_page.php
+$s_add_profile_title = 'Dodanie profilu';
+$s_add_profile_button = 'Dodaj profil';
+$s_edit_or_delete_profiles_title = 'Edycja lub usunięcie profilu';
+$s_edit_profile = 'Edytuj profil';
+$s_make_default = 'Ustaw jako domyślny';
+$s_delete_profile = 'Usuń profil';
+$s_select_profile = 'Wybierz profil';
+$s_submit_button = 'Wyślij';
+
+# account_profile_update.php
+$s_profile_updated_msg = 'Profil został zaktualizowany...';
+
+# account_sponsor_page.php
+$s_my_sponsorship = 'Moje sponsorowanie';
+$s_update_sponsorship_button = 'Zmień stan płatności';
+$s_no_sponsored = 'Nie znaleziono sponosorowanych Zagadnień przypisanych tobie.';
+$s_own_sponsored = 'Zagadnienia, które sponsorowałeś:';
+$s_issues_handled = 'Zagadnienia sponsorowane, które są przypisane tobie:';
+$s_no_own_sponsored = 'Nie sponsorowałeś żadnych zagadnień.';
+$s_sponsor = 'Sponsor';		# like in 'The sponsor of...'
+$s_sponsor_verb = 'Sponsor';	# like in 'Sponsor it!'
+$s_amount = 'Kwota';
+$s_total_owing = 'Łącznie zaległych';
+$s_total_paid = 'Łącznie opłaconych';
+$s_sponsor_hide = 'Ukryj rozwiązane i opłacone';
+$s_sponsor_show = 'Pokaż wszystkie';
+
+# account_sponsor_update.php
+$s_payment_updated = 'Informacja o płatności została uaktualniona.';
+
+# account_update.php
+$s_account_updated_msg = 'Twoje konto zostało zaktualizowane...';
+$s_email_updated = 'Adres email został zaktualizowany';
+$s_realname_duplicated = 'Prawdziwa nazwa jest używana przez innego użytkownika';
+$s_realname_updated = 'Prawdziwa nazwa zaktualizowana';
+$s_password_updated = 'Hasło zostało zaktualizowane';
+
+# adm_permission_report.php
+
+# bug_action_group_page
+$s_multiple_projects = 'Zagadnienia wybrane przez ciebie należą do różnych projektów. Poniższe parametry pokazują ustawienia dla wszystkich projektów. Jeśli jest to niepoprawne, spróbuj z mniejszą ilością wybranych zagadnień.';
+
+# bug_assign.php
+$s_bug_assign_msg       = 'Zagadnienie zostało pomyślnie przypisane...';
+
+# bug_change_status_page.php
+$s_new_bug_title = 'Nowe zagadnienie';
+$s_feedback_bug_title = 'Zwróć zagadnienie';
+$s_acknowledged_bug_title = 'Uznaj zagadnienie';
+$s_confirmed_bug_title = 'Potwierdź zagadnienie';
+$s_assigned_bug_title = 'Przypisz zagadnienie';
+$s_processed_bug_title = 'Zacznij pracę nad zagadnieniem';
+$s_new_bug_button = 'Nowe';
+$s_feedback_bug_button = 'Zwróć';
+$s_acknowledged_bug_button = 'Uznaj';
+$s_confirmed_bug_button = 'Potwierdź';
+$s_assigned_bug_button = 'Przypisz';
+$s_processed_bug_button = 'Zacznij';
+
+# bug_close.php
+$s_bug_close_msg       = 'Zagadnienie zostało zamknięte...';
+$s_close_immediately   = 'Zamknij natychmiast:';
+
+# bug_close_page.php
+$s_closed_bug_title = 'Zamykanie zagadnienia';
+
+# bug_delete.php
+$s_bug_deleted_msg = 'Zagadnienie zostało usunięte...';
+
+# bug_delete_page.php
+$s_delete_bug_sure_msg = 'Czy na pewno chcesz usunąć to zagadnienie?';
+$s_delete_bug_button = 'Usuń zagadnienie';
+
+# bug_monitor.php
+$s_monitor_bug_button = 'Monitoruj zagadnienie';
+$s_unmonitor_bug_button = 'Zakończ monitorowanie zagadnienia';
+
+# bug_file_add.php
+$s_file_upload_msg = 'Plik został pomyślnie przesłany';
+
+# bug_file_upload_inc.php
+$s_upload_file = 'Prześlij plik';
+$s_select_file = 'Wybierz plik';
+$s_upload_file_button = 'Prześlij plik';
+$s_max_file_size = 'Maksymalny rozmiar';
+
+# bug_reopen.php
+$s_bug_reopened_msg = 'Zagadnienie zostało ponownie otwarte...';
+$s_reopen_add_bugnote_title = 'Dodaj komentarz z wyjaśnieniem powodu ponownego otwarcia zagadnienia';
+$s_bugnote_add_reopen_button = 'Dodaj komentarz i ponownie otwórz zagadnienie';
+
+# bug_resolve_page.php
+$s_resolved_bug_title = 'Rozwiązanie zagadnienia';
+$s_resolved_bug_button = 'Rozwiąż zagadnienie';
+
+# bug_resolve_page2.php
+$s_bug_resolved_msg = 'Zagadnienie zostało rozwiązane. Poniżej wprowadź komentarz...';
+$s_resolve_add_bugnote_title = 'Dodawanie komentarza z wyjaśnieniem rozwiązania zagadnienia';
+$s_bugnote_add_resolve_button = 'Dodaj komentarz';
+
+# bug_reminder_page.php
+$s_from = 'Od';
+$s_to = 'Do';
+$s_on = 'Dnia';
+$s_sent_you_this_reminder_about = 'wysłał ci przypomnienie o';
+$s_bug_reminder = 'Wyślij przypomnienie';
+$s_reminder_sent_to = 'Przypomnienie wysłane do';
+$s_bug_send_button = 'Wyślij';
+$s_reminder = 'Przypomnienie';
+$s_reminder_explain = 'Ten komentarz zostanie wysłany do osób monitorujących zagadnienie.';
+$s_reminder_monitor = 'Ci odbiorcy zaczną monitorować zagadnienie. Mogą zrezygnować za pomocą przycisku Nie monitoruj.';
+$s_reminder_store = 'Ten komentarz zostanie zachowany z zagadnieniem.';
+
+# bug_set_sponsorship.php
+$s_confirm_sponsorship = 'Proszę potwierdzić chęć sponsorowania zagadnienia %d na kwotę %s.';
+
+# bug_update.php
+$s_bug_updated_msg = 'Zagadnienie zostało pomyślnie zaktualizowane...';
+
+# bug_update_advanced_page.php
+$s_back_to_bug_link = 'Powrót do Zagadnienia';
+$s_update_simple_link = 'Aktualizacja prosta';
+$s_updating_bug_advanced_title = 'Aktualizacja informacji o Zagadnieniu';
+$s_id = 'Identyfikator';
+$s_category = 'Kategoria';
+$s_severity = 'Ważność';
+$s_reproducibility = 'Powtarzalność';
+$s_date_submitted = 'Data zgłoszenia';
+$s_last_update = 'Data modyfikacji';
+$s_reporter = 'Zgłaszający';
+$s_assigned_to = 'Przypisany do';
+$s_priority = 'Priorytet';
+$s_resolution = 'Rozwiązanie';
+$s_status = 'Stan';
+$s_duplicate_id = 'Identyfikator duplikatu';
+$s_os = 'System operacyjny';
+$s_projection = 'Przewidywana trudność';
+$s_os_version = 'Wersja systemu';
+#$s_eta = 'Szacowany czas rozwiązania';
+$s_eta = 'Pracochłonność';
+$s_product_version = 'Wersja produktu';
+$s_build = 'Kompilacja';
+$s_fixed_in_version = 'Poprawione w wersji';
+$s_target_version = 'Wersja docelowa';
+$s_votes = 'Głosy';
+$s_summary = 'Temat';
+$s_description = 'Opis';
+$s_steps_to_reproduce = 'Kroki, by powtórzyć';
+$s_update_information_button = 'Aktualizuj informację';
+$s_sticky_issue = 'Zagadnienie przyklejone';
+$s_profile = 'Profil';
+$s_deadline = 'Termin realizacji';
+
+# bug_update_page.php
+$s_update_advanced_link = 'Aktualizacja Zaawansowana';
+$s_updating_bug_simple_title = 'Aktualizacja Informacji o Zagadnieniu';
+
+# bug_vote_add.php
+$s_vote_added_msg = 'Głos został dodany..';
+
+# bugnote_add.php
+$s_bugnote_added_msg = 'Komentarz został dodany...';
+
+# bugnote_delete.php
+$s_bugnote_deleted_msg = 'Komentarz został pomyślnie usunięty...';
+$s_bug_notes_title = 'Komentarze';
+
+# bugnote_edit_page.php
+$s_edit_bugnote_title = 'Edytuj Komentarz';
+
+# bugnote_inc.php
+$s_no_bugnotes_msg = 'Brak komentarzy do tego Zagadnienia.';
+$s_delete_link = 'Usuń';
+$s_add_bugnote_title = 'Dodawanie komentarza';
+$s_add_bugnote_button = 'Dodaj komentarz';
+$s_bugnote_edit_link = 'Edytuj';
+$s_closed_bug_button = 'Zamknij Zagadnienie';
+
+# bugnote_update.php
+$s_bugnote_updated_msg = 'Komentarz został pomyślnie zaktualizowany...';
+$s_edited_on = 'edytowano: ';
+
+# file_api.php
+$s_show_content ='Show Content';
+
+# index.php
+$s_click_to_login = 'Kilknij tutaj, aby się zalogować';
+
+# login.php
+
+# login_page.php
+#@@@ should the following string be related to $g_window_title?
+$s_login_page_info = 'Witaj w programie do zarządzania i rozwiązywania Zagadnień.';
+$s_login_title = 'Logowanie';
+$s_save_login = 'Zapamiętaj hasło';
+$s_choose_project = 'Wybierz projekt';
+$s_login_button = 'Zaloguj się';
+$s_signup_link = 'Załóż nowe konto';
+$s_lost_password_link = 'Zapomniałem hasła';
+
+# login_select_proj_page.php
+$s_select_project_button = 'Wybierz projekt';
+
+# logout_page.php
+$s_logged_out_title = 'Wylogowany...';
+$s_redirecting = '...Przekierowuję';
+$s_here = 'Tutaj';
+
+# lost_pwd_page.php
+$s_lost_password_title = "Resetowanie hasła";
+$s_lost_password_done_title = "Wiadomość o haśle wysłana";
+$s_lost_password_subject = "Resetowanie hasła";
+$s_lost_password_info = "Aby zmienić zapomniane hasło, proszę podać nazwe użytkownika i adres email dla konta.<br/><br/>Jeśli podane dane odpowiadają poprawnemu kontu, otrzymasz w wiadomości email specjalny adres URL zawierający kod weryfikujący dla twojego konta. Proszę otworzyć podany adres aby zmienić hasło.";
+$s_lost_password_confirm_hash_OK = "Twoje potwierdzenie zostało zaakceptowane. Proszę zmienić hasło.";
+
+# main_page.php
+$s_open_and_assigned_to_me = 'Otwarte i przypisane do mnie';
+$s_open_and_reported_to_me = 'Otwarte i zgłoszone przeze mnie';
+$s_newer_news_link = 'Nowsze wiadomości';
+$s_older_news_link = 'Starsze wiadomości';
+$s_archives = 'Archiwum';
+$s_rss = 'RSS';
+
+# manage_create_new_user.php
+$s_created_user_part1 = 'Stworzono użytkownika użytkownika';
+$s_created_user_part2 = 'z poziomem dostępu';
+
+# manage_create_user_page.php
+$s_create_new_account_title = 'Tworzenie nowego konta';
+$s_verify_password = 'Potwierdź hasło';
+$s_enabled = 'Włączone';
+$s_protected = 'Zabezpieczone';
+$s_create_user_button = 'Stwórz użytkownika';
+
+# manage_page.php
+$s_hide_disabled = 'Ukryj wyłączone';
+$s_filter_button = 'Filtruj';
+$s_manage_users_link = 'Zarządzanie użytkownikami';
+$s_manage_projects_link = 'Zarządzanie projektami';
+$s_manage_custom_field_link = 'Zarządzanie polami dodatkowymi';
+$s_manage_global_profiles_link = 'Zarządzaj globalnymi profilami';
+$s_permissions_summary_report = 'Raport praw dostępu';
+$s_manage_config_link = 'Zarządzaj konfiguracją';
+$s_manage_threshold_config = 'Progi przepływu pracy';
+$s_manage_email_config = 'Powiadomienia email';
+$s_manage_workflow_config = 'Przepływ pracy';
+$s_create_new_account_link = 'Stwórz konto';
+$s_projects_link = 'Projekty';
+$s_documentation_link = 'Dokumentacja';
+$s_new_accounts_title = 'Nowe konta';
+$s_1_week_title = '1 tydzień';
+$s_never_logged_in_title = 'Nigdy nie zalogowani';
+$s_prune_accounts = 'Usuń konta';
+$s_hide_inactive = 'Ukryj nieaktywne';
+$s_manage_accounts_title = 'Zarządzanie kontami';
+$s_p = 'z';
+$s_date_created = 'Stworzone';
+$s_last_visit = 'Ostatnia wizyta';
+$s_edit_user_link = 'Edytuj dane';
+
+# manage_config_email_page
+$s_config_all_projects = 'Uwaga: Ta konfiguracja dotyczy WSZYSTKICH PROJEKTÓW.';
+$s_config_project = 'Uwaga: Ta konfiguracja dotyczy tylko projektu %s.';
+$s_colour_coding = 'W tabeli oznaczono poniższymi kolorami, które ustawienia będą stosowane:';
+$s_colour_project = 'Ustawienia dla projektu zastępują pozostałe.';
+$s_colour_global = 'Wszystkie ustawienia projektu zastępują domyślną konfigurację.';
+$s_issue_reporter = 'Użytkownik który zgłosił zagadnienie';
+$s_issue_handler = 'Użytkownik który obsługuje zagadnienie';
+$s_users_added_bugnote = 'Użytkownik który dodał komentarz.';
+$s_change_configuration = 'Aktualizuj konfigurację';
+$s_message = 'Wiadomość';
+$s_default_notify = 'Ustawia domyślną flagę powiadomienia na';
+$s_action_notify = 'Ustawia flagi powiadomienia o działaniu na';
+$s_notify_defaults_change_access = 'Zmień użytkowników ktorzy mogą zmienić domyślne powiadomienia na';
+$s_notify_actions_change_access = 'Zmień użytkowników którzy mogą zmienić powiadomienia na';
+$s_revert_to_system = 'Usuń ustawienia wszystkich projektów';
+$s_revert_to_all_project = 'Usuń ustawienia dla tego projektu';
+
+# manage_config_workflow_page
+$s_non_existent = 'nie istnieje';
+$s_current_status = 'Bieżący stan';
+$s_next_status = 'Następny stan';
+$s_workflow = 'PRZEPŁYW PRACY';
+$s_workflow_thresholds = 'PROGI WPŁYWAJĄCE NA PRZEPŁYW PRACY';
+$s_threshold = 'Próg';
+$s_status_level = 'Stan';
+$s_alter_level = 'Kto może zmienić tę wartość';
+$s_validation = 'Weryfikacja przepływu pracy';
+$s_comment = 'Komentarz weryfikacji';
+$s_superfluous = 'Ze stanu wynika zapętlenie i nie musi być podany wprost';
+$s_unreachable = 'Nie możesz przenieść zagadnienia na ten stan';
+$s_no_exit = 'Nie możesz przenieść zagadnienia z tego stanu';
+$s_access_levels = 'POZIOMY DOSTĘPU';
+$s_access_change = 'Minimalny poziom dostępu, aby zmienić ten stan';
+$s_desc_bug_submit_status = 'Stan ustawiany nowym zagadnieniom';
+$s_desc_bug_reopen_status = 'Stan ustawiany ponownie otwartym zagadnieniom';
+$s_desc_bug_resolved_status_threshold = 'Stan dla którego zagadnienie zostaje uznane za rozwiązane';
+$s_workflow_change_access = 'Kto może modyfikować przepływ pracy';
+$s_access_change_access = 'Kto może modyfikować poziomy dostępu do stanów';
+
+# manage_config_workflow_set
+$s_default_not_in_flow = 'Domyślna wartość \'%s\' nie jest zaznaczona wśród następnych stanów dla stanu \'%s\'. To ustawienie zostanie zignorowanie.';
+
+# manage_config_work_threshold_page
+$s_assign_issue = 'Przypisz zagadnienie';
+$s_allow_close_immediate = 'Zezwól na zamknięcie zagadnienia przy rozwiązywaniu';
+$s_allow_reporter_close = 'Zezwól zgłaszającemu na zamknięcie zagadnienia';
+$s_allow_reporter_reopen = 'Zezwól zgłaszającemu na ponowne otwarcie zagadnienia';
+$s_set_status_assigned = 'Ustaw stan przy przypisaniu operatora';
+$s_allow_user_edit = 'Zezwól użytkownikom na edycję ich komentarzy';
+$s_limit_access = 'Ogranicz dostęp zgłaszających tylko do ich zagadnień';
+$s_submit_status = 'Stan na który jest ustawiany nowe zgłoszenie';
+$s_assigned_status = 'Stan na który ustawić automatycznie przypisane zagadnienia';
+$s_resolved_status = 'Stan dla którego zagadnienie zostaje uznane za rozwiązane';
+$s_readonly_status = 'Stan dla którego zagadnienie staje się tylko do odczytu';
+$s_reopen_status = 'Stan na który jest ustawiane ponownie otwarte zagadnienie';
+$s_reopen_resolution = 'Rozwiązanie na które jest ustawiane ponownie otwarte zagadnienie';
+
+# manage_config_revert_page
+$s_config_delete_sure = 'Jesteś pewien, że chcesz usunąć ustawienia dla';
+$s_in_project = 'w projekcie';
+$s_delete_config_button = 'Usuń ustawienia';
+
+# adm_config_report.php
+$s_configuration_report = 'Configuration Report';
+$s_database_configuration = 'Database Configuration';
+$s_configuration_option = 'Configuration Option';
+$s_configuration_option_type = 'Type';
+$s_configuration_option_value = 'Value';
+$s_all_users = 'All Users';
+$s_set_configuration_option = 'Set Configuration Option';
+$s_delete_config_sure_msg = 'Are you sure you wish to delete this configuration option?';
+
+# manage_proj_add.php
+$s_project_added_msg = 'Projekt został pomyślnie dodany...';
+
+# manage_proj_category_add.php
+$s_category_added_msg = 'Kategoria została pomyślnie dodana...';
+
+# manage_proj_category_delete.php
+$s_category_deleted_msg = 'Kategoria została pomyślnie usunięta...';
+
+# manage_proj_category_delete_page.php
+$s_category_delete_sure_msg = 'Czy na pewno chcesz usunąć tą kategorię? Wszystkie przypisane do niej Zagadnienia zostaną usunięte.';
+$s_delete_category_button = 'Usuń kategorię';
+
+# manage_proj_category_edit_page.php
+$s_edit_project_category_title = 'Edycja kategorii';
+$s_update_category_button = 'Aktualizuj Kategorię';
+
+# manage_proj_category_update.php
+$s_category_updated_msg = 'Kategoria została pomyślnie zaktualizowana...';
+
+# manage_proj_create_page.php
+$s_add_subproject_title = 'Dodaj podprojekt';
+
+# manage_proj_delete.php
+$s_project_deleted_msg = 'Projekt został usunięty...';
+
+# manage_proj_delete_page.php
+$s_project_delete_msg = 'Czy na pewno chcesz usunąć ten projekt i wszystkie zgłoszone do tego projektu zagadnienia?';
+$s_project_delete_button = 'Usuń projekt';
+
+# manage_proj_edit_page.php
+$s_edit_project_title = 'Edycja projektu';
+$s_project_name = 'Nazwa projektu';
+$s_view_status = 'Widoczność';
+$s_public = 'publiczny';
+$s_private = 'prywatny';
+$s_update_project_button = 'Aktualizuj projekt';
+$s_delete_project_button = 'Usuń projekt';
+$s_categories_and_version_title = 'Kategorie i wersje';
+$s_categories = 'Kategorie';
+$s_add_category_button = 'Dodaj kategorię';
+$s_versions = 'Wersje';
+$s_add_version_button = 'Dodaj wersję';
+$s_add_and_edit_version_button = 'Dodaj i edytuj wersję';
+$s_edit_link = 'Edytuj';
+$s_actions = 'Akcje';
+$s_version = 'Wersja/kompilacja';
+$s_timestamp = 'Data/godzina';
+$s_update = 'Aktualizuj';
+$s_subprojects = 'Podprojety';
+$s_add_subproject = 'Dodaj jako podprojekt';
+$s_create_new_subproject_link = 'Stwórz nowy podprojekt';
+$s_unlink_link = 'Odłącz';
+
+# manage_proj_menu_page.php
+$s_add_project_title = 'Dodawanie projektu';
+$s_upload_file_path = 'Katalog dla przesyłanych plików';
+$s_add_project_button = 'Dodaj projekt';
+$s_projects_title = 'Projekty';
+$s_name = 'Nazwa';
+
+# manage_proj_update.php
+$s_project_updated_msg = 'Projekt został zaktualizowany...';
+
+# manage_proj_version_add.php
+$s_version_added_msg = 'Nowa wersja została pomyślnie dodana...';
+
+# manage_proj_version_delete.php
+$s_version_deleted_msg = 'Wersja została pomyślnie usunięta...';
+
+# manage_proj_version_delete_page.php
+$s_version_delete_sure = 'Czy na pewno chcesz usunąć tą wersję? Wszystkie zgłoszone do tej wersji Zagadnienia zostaną usunięte.';
+$s_delete_version_button = 'Usuń wersję';
+
+# manage_proj_version_edit_page.php
+$s_edit_project_version_title = 'Edycja wersji projektu';
+$s_update_version_button = 'Aktualizuj wersję';
+$s_released = 'Opublikowana';
+
+# manage_proj_version_update.php
+$s_version_updated_msg = 'Wersja została pomyślnie zaktualizowana...';
+
+# manage_user_delete.php
+$s_account_delete_protected_msg = 'Konto jest zabezpieczone. Nie można usunąć tego konta.';
+$s_account_deleted_msg = 'Konto zostało usunięte...';
+
+# manage_user_delete_page.php
+$s_delete_account_sure_msg = 'Czy na pewno chcesz usunąć to konto?';
+
+# manage_user_prune.php
+$s_accounts_pruned_msg = 'Wszystkie konta na które nikt się nie logował i starsze niż tydzień zostały usunięte.';
+$s_prune_accounts_button = 'Usuń';
+$s_confirm_account_pruning = 'Czy jesteś pewien, że chcesz usunąć stare konta na które nikt nigdy się nie logował?';
+
+# manage_user_page.php
+$s_edit_user_title = 'Edycja Użytkownika';
+$s_reset_password_button = 'Nowe hasło';
+$s_delete_user_button = 'Usuń Użytkownika';
+$s_reset_password_msg = 'Resetowanie hasła wysyła potwierdzający adres URL za pomocą emaila.';
+$s_reset_password_msg2 = 'Po operacji \'Nowe hasło\' użytkownik nie będzie musiał podawać hasła przy logowaniu.';
+$s_show_all_users = 'WSZYSCY';
+
+# manage_user_reset.php
+$s_account_reset_protected_msg = 'Konto zostało zabezpieczone. Nie można przypisać nowego hasła.';
+$s_account_reset_msg = 'Wiadomość potwierdzającą wysłano na twój adres email...';
+$s_account_reset_msg2 = 'Konto nie wymaga podawania hasła...';
+
+# manage_user_update.php
+$s_manage_user_protected_msg = 'Konto zostało zabezpieczone. Za wyjątkiem Poziomu dostępu i Włączenia dane zostały zatualizowane...';
+$s_manage_user_updated_msg = 'Konto zostało zaktualizowane...';
+
+# menu_inc.php
+$s_main_link = 'Główna';
+$s_view_bugs_link = 'Błędy';
+$s_report_bug_link = 'Dodaj';
+$s_changelog_link = 'Lista zmian';
+$s_summary_link = 'Statystyki';
+$s_account_link = 'Moje konto';
+$s_users_link = 'Użytkownicy';
+$s_manage_link = 'Zarządzanie';
+$s_edit_news_link = 'Wiadomości';
+$s_docs_link = 'Dokumentacja';
+$s_logout_link = 'Wyloguj';
+$s_my_view_link = 'Mój widok';
+$s_task_list_link = 'Zadania';
+
+
+# meta_inc.php
+
+# my_view_page.php
+$s_my_view_title_unassigned = 'Nieprzypisane';
+$s_my_view_title_recent_mod = 'Ostatnio zmodyfikowane';
+$s_my_view_title_reported = 'Zgłoszone przeze mnie';
+$s_my_view_title_assigned = 'Przypisane do mnie (nierozwiązane)';
+$s_my_view_title_resolved = 'Rozwiązane';
+$s_my_view_title_monitored = 'Monitorowane przeze mnie';
+$s_my_view_title_feedback = 'Oczekuje na moją odpowiedź';
+$s_my_view_title_verify = 'Oczekuje na moje potwierdzenie rozwiązania';
+$s_my_view_title_opened = 'Otwarte';
+$s_my_view_title_idea = 'Propozycje';
+
+# news_add.php
+$s_news_added_msg = 'Nowa wiadomość została dodana...';
+
+# news_delete.php
+$s_news_deleted_msg = 'Wiadomość została usunięta...';
+
+# news_delete_page.php
+$s_delete_news_sure_msg = 'Czy na pewno chcesz usunąć wiadomość?';
+$s_delete_news_item_button = 'Usuń wiadomość';
+
+# news_edit_page.php
+$s_edit_news_title = 'Edycja wiadomości';
+$s_headline = 'Nagłówek';
+$s_body = 'Treść';
+$s_update_news_button = 'Aktualizuj Wiadomość';
+
+# news_menu_page.php
+$s_add_news_title = 'Dodawanie wiadomości';
+$s_post_to = 'Wyślij do';
+$s_post_news_button = 'Wyślij wiadomość';
+$s_edit_or_delete_news_title = 'Edycja lub usuwanie wiadomości';
+$s_edit_post = 'Edytuj wiadomość';
+$s_delete_post = 'Usuń wiadomość';
+$s_select_post = 'Wybierz wiadomość';
+
+# news_update.php
+$s_news_updated_msg = 'Wiadomość została zaktualizowana...';
+
+# news_view_page.php
+$s_back_link = 'Powrót';
+
+# proj_doc_add.php
+$s_file_uploaded_msg = 'Plik został pomyślnie przesłany';
+
+# proj_doc_add_page.php
+$s_upload_file_title = 'Przesyłanie pliku';
+$s_title = 'Tytuł';
+
+# proj_doc_delete.php
+$s_project_file_deleted_msg = 'Plik projektu został usunięty';
+
+# proj_doc_delete_page.php
+$s_confirm_file_delete_msg = 'Czy na pewno chcesz usunąć ten plik?';
+
+# proj_doc_edit_page.php
+$s_filename = 'Nazwa pliku';
+$s_file_update_button = 'Aktualizuj plik';
+$s_file_delete_button = 'Usuń plik';
+
+# proj_doc_page.php
+$s_project_documentation_title = 'Dokumentacja projektu';
+$s_user_documentation = 'Dokumentacja użytkownika';
+$s_project_documentation = 'Dokumentacja projektu';
+$s_add_file = 'Dodaj plik';
+
+# proj_doc_update.php
+$s_project_document_updated = 'Projekt został pomyślnie zaktualizowany';
+
+# proj_user_add.php
+$s_project_user_added_msg = 'Użytkownik został pomyślnie dodany do projektu';
+
+# proj_user_delete.php
+$s_project_removed_user_msg = 'Użytkownik został pomyślnie usunięty z projektu';
+
+# proj_user_delete_page.php
+$s_remove_user_sure_msg = 'Czy na pewno chcesz usunąć tego użytkownika?';
+$s_remove_user_button = 'Usuń użytkownika';
+$s_remove_all_users_sure_msg = 'Czy na pewno chcesz usunąć wszystkich użytkowników z tego projektu?';
+$s_remove_all_users_button = 'Usuń wszystkich użytkowników';
+
+# proj_user_menu_page.php
+$s_add_user_title = 'Dodawanie użytkownika do projektu';
+$s_add_user_button = 'Dodaj użytkownika';
+$s_project_selection_title = 'Wybór projektu';
+$s_remove_link = 'Usuń';
+$s_remove_all_link = 'Usuń wszystkich';
+
+# proj_user_update.php
+$s_updated_user_msg = 'Użytkownik został pomyślnie zaktualizowany';
+
+# report_add.php
+$s_must_enter_category = 'Należy wybrać kategorię';
+$s_must_enter_severity = 'Należy wybrać ważność zagadnienia';
+$s_must_enter_reproducibility = 'Należy wybrać powtarzalność zagadnienia';
+$s_must_enter_summary = 'Należy wpisać temat zagadnienia';
+$s_must_enter_description = 'Należy wpisać opis zagadnienia';
+$s_report_more_bugs = 'Kontynuuj zgłaszanie';
+$s_submission_thanks_msg = 'Dziękujemy za zgłoszenie zagadnienia';
+
+# report_bug_advanced_page.php
+$s_simple_report_link = 'Zgłoszenie proste';
+$s_enter_report_details_title = 'Wprowadzanie szczegółów zgłoszenia';
+$s_required = 'wymagane';
+$s_select_category = 'Wybierz kategorię';
+$s_select_reproducibility = 'Wybierz powtarzalność zagadnienia';
+$s_select_severity = 'Wybierz ważność zagadnienia';
+$s_or_fill_in = 'Lub wypełnij';
+$s_assign_to = 'Przypisz do';
+$s_additional_information = 'Dodatkowe informacje';
+$s_submit_report_button = 'Wyślij zgłoszenie';
+$s_check_report_more_bugs = 'Kontynuuj zgłaszanie';
+
+# report_bug_page.php
+$s_advanced_report_link = 'Zgłoszenie zaawansowane';
+$s_report_stay = 'Pozostań w zgłoszeniu';
+
+# set_project.php
+$s_selected_project = 'Wybrany projekt';
+$s_valid_project_msg = 'Musisz wybrać prawidłowy projekt';
+
+# signup.php
+$s_signup_done_title = 'Rejestracja konta';
+$s_password_emailed_msg = 'Gratuluję pomyślnej rejestracji. Wysłana została właśnie wiadomość weryfikująca podany adres email. Odwiedzając adres podany w tej wiadomości aktywujesz swoje konto.';
+$s_no_reponse_msg = 'Masz siedem dni na dokończenie procesu potwierdzania konta. Jeśli nie potwierdzisz go w tym okresie, konto zostanie usunięte.';
+
+# signup_page.php
+$s_signup_captcha_request = 'Wprowadź kod widoczny w ramce po prawej stronie.';
+$s_signup_info = 'Po wypełnieniu formularza i sprawdzeniu twoich odpowiedzi, otrzymasz na podany adres email wiadomość potwierdzającą.<br/>Wiadomość ta umożliwi pełną aktywację konta. Jeśli nie aktywujesz go w ciągu 7 dni, konto zostanie usunięte.<br/>Musisz podać poprawny adres email aby otrzymać wiadomość potwiedzającą.';
+$s_signup_title = 'Zapisywanie się';
+$s_signup_button = 'Zapisz się';
+$s_no_password_request = 'Twoje hasło jest zarządzane przez inny system. Skontaktuj się z administratorem.';
+
+# site_settings_edit_page.php
+$s_edit_site_settings_title = 'Edycja ustawień strony';
+$s_save_settings_button = 'Zapisz ustawienia';
+
+# site_settings_page.php
+$s_site_settings_title = 'Ustawienia strony';
+$s_system_info_link = 'Informacja o systemie';
+$s_site_settings_link = 'Ustawienia strony';
+
+# site_settings_update.php
+$s_site_settings_updated_msg = 'Ustawienia strony zostały zaktualizowane';
+
+# summary_page.php
+$s_summary_title = 'Statystyki';
+$s_summary_jpgraph_link = 'Zaawansowane statystyki';
+$s_by_project = 'wg projektu';
+$s_by_status = 'wg stanu';
+$s_by_date = 'wg daty (dni)';
+$s_by_severity = 'wg ważności';
+$s_by_resolution = 'wg rozwiązania';
+$s_by_category = 'wg kategorii';
+$s_by_priority = 'wg priorytetu';
+$s_by_developer = 'wg wykonawcy';
+$s_by_reporter ='wg zgłaszającego';
+$s_reporter_by_resolution = 'zgłaszający wg rozwiązania';
+$s_reporter_effectiveness = 'efaktywność zgłaszającego';
+$s_developer_by_resolution = 'efektywność rozwiązującego';
+$s_percentage_fixed = '% Naprawionych';
+$s_percentage_errors = '% Błędnych';
+$s_errors = 'Błędne';
+$s_total = 'Łącznie';
+$s_time_stats = 'statystyki rozwiązanych Zagadnień (w dniach)';
+$s_longest_open_bug = 'najdłużej otwarte Zagadnienie';
+$s_longest_open = 'czas najdłuższego otwarcia';
+$s_average_time = 'przeciętna długość';
+$s_total_time = 'ogólna długość';
+$s_developer_stats = 'statystyki wykonawców';
+$s_reporter_stats = 'statystyki zgłaszających';
+$s_orct = '(otwarty/rozwiązany/zamknięty/łącznie)';
+
+#task_view_page.php
+$s_task_is_task = 'Zadanie';
+$s_task_move = 'Przesuń';
+$s_task_removed = 'Usunięto z listy zadań';
+$s_task_added = 'Dodano do listy zadań';
+$s_task_shifted = 'Przesunięto zadanie: ';
+$s_task_moveUp = 'Przesuń zadanie o jedną pozycję do góry';
+$s_task_moveDown = 'Przesuń zadanie o jedną pozycję na dół';
+$s_task_moveTop = 'Zadanie na początek';
+$s_task_moveBottom = 'Zadanie na koniec';
+$s_task_view_all = 'Wszystkie zadania';
+$s_task_view_active = 'Aktywne zadania';
+$s_task_view_user = 'Uzytkownika';
+$s_task_view_project = 'Projektu';
+$s_task_view_global = 'Wszystkie';
+$s_task_view_header_user = 'Aktywne zadania uzytkownika';
+$s_task_view_header_user_all = 'Wszystkie zadania uzytkownika';
+$s_task_view_header_project = 'Aktywne zadania w projekcie';
+$s_task_view_header_project_all = 'Wszystkie zadania w projekcie';
+$s_task_view_header_global = 'Aktywne zadania w systemie';
+$s_task_view_header_global_all = 'Wszystkie zadania w systemie';
+$s_task_view_unassigned = 'Nieprzypisane';
+$s_task_view_unconfirmed = 'Niezatwierdzone';
+
+# view_all_bug_page.php
+$s_any = 'dowolny';
+$s_show = 'Pokaż';
+$s_changed = 'Zmienione (w godzinach)';
+$s_viewing_bugs_title = 'Przeglądanie Zagadnień';
+$s_updated = 'Aktualizacja';
+$s_sticky = 'Pokazuj przyklejone zagadnienia';
+$s_sort = 'Sortuj według';
+$s_issue_id = 'Issue #';
+$s_recently_visited = 'Recently Visited';
+
+# view_all_inc.php
+$s_none = 'żadne';
+$s_current = 'current';
+$s_search ='Szukaj';
+$s_view_prev_link = 'Poprzednie';
+$s_view_next_link = 'Następne';
+$s_prev = 'Poprzednie';
+$s_next = 'Następne';
+$s_first = 'Pierwsze';
+$s_last = 'Ostatnie';
+$s_start_date = 'Data początkowa';
+$s_end_date = 'Data końcowa';
+$s_use_date_filters = 'Używaj filtrów daty';
+$s_yes = 'Tak';
+$s_no = 'Nie';
+$s_open_filters = 'Zmień filtr';
+$s_or_unassigned = 'lub nieprzypisane';
+$s_ok = 'OK';
+$s_select_all = 'Wybierz wszystkie';
+
+# stored query strings
+$s_use_query = 'Użyj filtru';
+$s_delete_query = 'Skasuj filtr';
+$s_query_deleted = 'Filtr skasowany';
+$s_save_query = 'Zachowaj aktualny filtr';
+$s_reset_query = 'Wyczyść filtr';
+$s_query_name = 'Nazwa filtru';
+$s_query_exists = 'Taki filtr prawdopodobnie już istnieje.';
+$s_query_dupe_name = 'Inny filtr o tej samej nazwie już istnieje. Proszę wybrać inną nazwę.';
+$s_query_blank_name = 'Nie można zapisać filtru z pustą nazwą. Prosżę podac nazwę filtru przed jego zapisaniem.';
+$s_query_store_error = 'Wystąpił błąd w trakcie zachowywania filtru.';
+$s_open_queries = 'Zarządzaj filtrami';
+$s_query_delete_msg = 'Czy na pewno chcesz usunąć ten filtr?';
+
+# view_bug_advanced_page.php
+$s_view_simple_link = 'Widok prosty';
+$s_viewing_bug_advanced_details_title = 'Widok zaawansowany';
+$s_product_build = 'Kompilacja produktu';
+$s_system_profile = 'Opis systemu';
+$s_update_bug_button = 'Aktualizuj zagadnienie';
+$s_bug_assign_to_button = 'Przypisz do:';
+$s_bug_status_to_button = 'Zmień stan na:';
+$s_reopen_bug_button = 'Otwórz ponownie zagadnienie';
+$s_move_bug_button = 'Przenieś zagadnienie';
+$s_attached_files = 'Dołączone pliki';
+$s_publish = 'Opublikuj';
+$s_cached = 'Przechowywany';
+$s_bug_process_button = 'W trakcie realizacji...';
+
+# view_bug_inc.php
+
+# view_bug_page.php
+$s_view_advanced_link = 'Widok zaawansowany';
+$s_viewing_bug_simple_details_title = 'Widok prosty';
+
+# bug_monitor_list_view_inc.php
+$s_no_users_monitoring_bug = 'Nikt nie monitoruje tego zagadnienia.';
+$s_users_monitoring_bug = 'Użytkownicy monitorujący to zagadnienie';
+$s_monitoring_user_list = 'Lista użytkowników';
+
+# bug_sponsorship_list_view_inc.php
+$s_no_users_sponsoring_bug = 'Nikt nie sponsoruje tych zagadnień.';
+$s_users_sponsoring_bug = 'Użytkownicy sponsorujący te zagadnienie:';
+$s_sponsors_list = 'Lista sponsorów';
+$s_total_sponsorship_amount = 'Łączna kwota = %s';
+
+# custom field strings
+$s_add_custom_field_button = 'Nowe \'Dodatkowe pole\'';
+$s_delete_custom_field_button = 'Usuń \'Dodatkowe pole\'';
+$s_delete_custom_field_everywhere = 'Usuń \'Dodatkowe pole\' wszędzie';
+$s_update_custom_field_button = 'Aktualizuj \'Dodatkowe pole\'';
+$s_add_existing_custom_field = 'Dodaj istniejące \'Dodatkowe pole\'';
+$s_edit_custom_field_title = 'Edytuj \'Dodatkowe pole\'';
+$s_custom_field = 'Pole';
+$s_custom_fields_setup = 'Dodatkowe pola';
+$s_custom_field_name = 'Nazwa';
+$s_custom_field_project_count = 'Liczba projektów';
+$s_custom_field_type = 'Typ';
+$s_custom_field_possible_values = 'Możliwe wartości';
+$s_custom_field_default_value = 'Wartość domyślna';
+$s_custom_field_valid_regexp = 'Wyrażenie regularne';
+$s_custom_field_access_level_r = 'Prawo odczytu';
+$s_custom_field_access_level_rw = 'Prawo zapisu';
+$s_custom_field_length_min = 'Min. długość';
+$s_custom_field_length_max = 'Maks. długość';
+$s_custom_field_advanced = 'Zaawansowane';
+$s_custom_field_display_report = 'Wyświetlaj przy zgłaszaniu zagadnienia';
+$s_custom_field_display_update = 'Wyświetlaj przy aktualizacji zagadnienia';
+$s_custom_field_display_resolved = 'Wyświetlaj przy rozwiązywaniu zagadnienia';
+$s_custom_field_display_closed = 'Wyświetlaj przy zamykaniu zagadnienia';
+$s_custom_field_require_report = 'Wymagane przy zgłaszaniu';
+$s_custom_field_require_update = 'Wymagane przy aktualizacji';
+$s_custom_field_require_resolved = 'Wymagane przy rozwiązywaniu';
+$s_custom_field_require_closed = 'Wymagane przy zamykaniu';
+
+$s_custom_field_sequence = 'Sekwencja';
+$s_custom_field_type_enum_string = '0:Łańcuch znaków,1:Liczba całkowita,2:Liczba zmiennoprzecinkowa,3:Wyliczenie,4:Email,5:Zaznaczenie,6:Lista,7:Lista wielokotnego wyboru,8:Data';
+
+$s_confirm_used_custom_field_deletion = 'To pole jest obecnie połączone co najmniej z jednym projektem. Jeżeli je usuniesz, wszystkie wartości zostaną skasowane. Nie będzie też możliwe odzyskanie danych. Jeżeli nie chcesz usunąć tego pola, kliknij Wstecz w przeglądarce. kliknij przycisk poniżej aby kontynuwać';
+$s_confirm_custom_field_deletion = 'Czy na pewno chcesz usunąć dodatkowe pole i wszystkie powiązane z nim wartości?';
+$s_field_delete_button = 'Usuń pole';
+
+$s_confirm_custom_field_unlinking = 'Czy na pewno chcesz usunąć (odłączyć) dodatkowe pole z projektu i skasować wszystkie powiązane z nim wartości?';
+$s_field_remove_button = 'Usuń pole';
+
+$s_hide_status = 'Ukryj stan';
+$s_filter_closed = "Zamknięte";
+$s_filter_resolved = "Rozwiązane";
+$s_hide_closed = "Ukryj Zamknięte";
+$s_hide_resolved = "Ukryj Rozwiązane";
+$s_and_above = 'i wyższe';
+$s_advanced_filters = 'Zaawansowane filtry';
+$s_simple_filters = 'Proste filtry';
+$s_monitored_by = 'Monitorowane przez';
+
+$s_attachments = "ZAŁĄCZNIKI";
+$s_attachment_alt = "A";
+
+# PHPMailer
+$s_phpmailer_language = 'pl';
+
+# Sponsorship Strings
+$s_sponsors = '%d sponsor(ów)';
+$s_sponsorship_added = 'Sponsorowanie dodane';
+$s_sponsorship_updated = 'Sponsorowanie zaktualizowane';
+$s_sponsorship_deleted = 'Sponsorowanie usunięte';
+$s_sponsorship_paid = 'Sponsorowanie opłacone';
+$s_sponsorship_more_info = 'Więcej informacji o sponsorowaniu';
+$s_sponsorship_total = 'Łączna kwota';
+
+# URL explaining the process of sponsoring an issue.  This is defined here rather than
+# in the config to allow for a URL per language.  This can be set to an empty string if there
+# is not need to provide such process information.
+$s_sponsorship_process_url = '';
+
+# Changelog
+$s_changelog = 'Lista zmian';
+
+# Http auth
+$s_http_auth_realm = "Logowanie do Mantisa";
+
+$s_bug = "zagadnienie";
+$s_add_new_relationship = "Nowe powiązanie";
+$s_add_new_relationship_button = "Dodaj";
+$s_this_bug = "Bieżące zagadnienie";
+$s_relationship_added = "Powiązanie dodane";
+$s_relationship_deleted = "Powiązanie usunięte";
+$s_no_relationship = "brak powiązań";
+$s_relationship_replaced = "Powiązanie zastąpione";
+$s_replace_relationship_button = "Zastąp";
+$s_replace_relationship_sure_msg = "Istnieje już powiązanie między tymi zagadnieniami. Czy na pewno chcesz zastąpić?";
+$s_relationship_with_parent = "Powiązanie z zagadnieniem źródłowym";
+$s_delete_relationship_button = "Usuń";
+$s_delete_relationship_sure_msg = "Czy na pewno chcesz usunąć powiązanie?";
+$s_relationship_warning_blocking_bugs_not_resolved = "Nie wszyskie zagadnienia blokujące są rozwiązane lub zamknięte.";
+$s_relationship_warning_blocking_bugs_not_resolved_2 = "<b>UWAGA</b>. Nie wszystkie zagadnienia blokujące są rozwiązane lub zamknięte.<br>Przed <b>rozwiązaniem/zamknięciem</b> tego zagadnienia wszystkie zagadnienia blokujące powinny być rozwiązane/zamknięte.";
+$s_create_child_bug_button = "Klonuj";
+$s_bug_cloned_to = "Zagadnienie sklonowane";
+$s_bug_created_from = "Zagadnienie wygenerowane z";
+
+# Relationship Graphs
+$s_viewing_bug_relationship_graph_title = "Graf powiązań";
+$s_relation_graph = "Graf powiązań";
+$s_dependency_graph = "Graf zależności";
+$s_vertical = "Pionowy";
+$s_horizontal = "Poziomy";
+$s_view_issue = "Zobacz zagadnienie";
+
+# Source Control Integration
+$s_checkin = 'Oddanie';
+
+# Pemissions report
+$s_perm_rpt_capability = 'Uprawnienie';
+$s_view = 'Zobacz';
+$s_issues = 'ZAGADNIENIA';
+$s_report_issue = 'Zgłoś zagadnienie';
+$s_update_issue = 'Aktualizuj zagadnienie';
+$s_monitor_issue = 'Monitoruj zgadnienie';
+$s_handle_issue = 'Zajmij się zagadnieniem';
+$s_move_issue = 'Przenieś zagadnienie';
+$s_delete_issue = 'Usuń zagadnienie';
+$s_reopen_issue = 'Otwórz ponownie zagadnie';
+$s_view_private_issues = 'Obejrzyj prywatne zagadnienia';
+$s_update_readonly_issues = 'Aktualizuj zagadnienia tylko do odczytu';
+$s_update_issue_status = 'Aktualizuj stan zagadnienia';
+$s_set_view_status = 'Ustaw widoczność zagadnienia';
+$s_update_view_status = 'Aktualizuj widoczność zagadnienia';
+$s_show_list_of_users_monitoring_issue = 'Pokaż listę użytkowników monitorujących zagadnienie';
+$s_notes = 'KOMENTARZE';
+$s_add_notes = 'Dodaj komentarz';
+$s_update_notes = 'Aktualizuj komentarz';
+$s_delete_note = 'Usuń komentarz';
+$s_view_private_notes = 'Obejrzyj prywatne komentarze';
+$s_news = 'AKTUALNOŚCI';
+$s_view_private_news = 'Obejrzyj prywatne aktualności';
+$s_manage_news = 'Zarządzaj aktualnościami';
+$s_view_list_of_attachments = 'Obejrzyj listę załączników';
+$s_download_attachments = 'Ściągaj załączniki';
+$s_delete_attachments = 'Usuń załączniki';
+$s_delete_attachment_button = "Usuń";
+$s_delete_attachment_sure_msg = "Czy na pewno chcesz usunąć ten załącznik?";
+$s_upload_issue_attachments = 'Załaduj załącznik';
+$s_filters = 'filtry';
+$s_save_filters = 'Zapisz filtry';
+$s_save_filters_as_shared = 'Zapisz filtry jako współdzielone';
+$s_use_saved_filters = 'Użyj zapisanych filtrów';
+$s_create_project = 'Stwórz projekt';
+$s_delete_project = 'Usuń projekt';
+$s_manage_project = 'Zarządzaj projektem';
+$s_manage_user_access_to_project = 'Zarządzaj dostępem użytkowników do projektu';
+$s_automatically_included_in_private_projects = 'Automatycznie dołączony do prywatnych projektów';
+$s_project_documents = 'DOKUMENTY PROJEKTÓW';
+$s_view_project_documents = 'Przejrzyj dokumenty';
+$s_upload_project_documents = 'Załaduj dokumenty';
+$s_link_custom_fields_to_projects = 'Podpinaj własne pola do projektów';
+$s_sponsorships = 'SPONSOROWANIE';
+$s_view_sponsorship_details = 'Przejrzyj sponsorowania';
+$s_view_sponsorship_total = 'Sprawdź łączną kwotę sponsorowania';
+$s_sponsor_issue = 'Sponsoruj zagadnienie';
+$s_assign_sponsored_issue = 'Przypisz sponsorowane zagadnienie';
+$s_handle_sponsored_issue = 'Wykonaj sponsorowane zagadnienie';
+$s_others = 'INNE';
+$s_see_email_addresses_of_other_users = 'Pokazuj adresy email innych użytkowników';
+$s_send_reminders = 'Wysyłaj przypomnienia';
+$s_add_profiles = 'Dodawaj profile';
+$s_notify_of_new_user_created = 'Informuj o nowych użytkownikach';
+$s_email_notification = 'POWIADOMIENIA EMAIL';
+$s_status_changed_to = 'Stan zmieniony na';
+$s_email_on_deleted = 'Email przy usunięciu';
+$s_email_on_sponsorship_changed = 'Email przy zmianie sponsorowania';
+$s_email_on_relationship_changed = 'Email przy zmianie powiązania';
+
+# DHTML filters
+$s_loading = 'Ładuję...';
+
+# filter_api.php
+$s_between = 'Pomiędzy' ;
+$s_on_or_before = 'W lub przed' ;
+$s_before = 'Przed' ;
+$s_after = 'Po' ;
+$s_on_or_after = 'W lub po' ;
+
+# wiki related strings
+$s_wiki = 'Wiki';
+?>
diff -Naur mantis-1.1.1/lang/strings_polish.txt mantis/lang/strings_polish.txt
--- mantis-1.1.1/lang/strings_polish.txt	2007-12-04 12:24:34.000000000 +0100
+++ mantis/lang/strings_polish.txt	2008-02-21 10:00:31.000000000 +0100
@@ -1328,4 +1328,7 @@
 
 # wiki related strings
 $s_wiki = 'Wiki';
+
+include ('custom_strings_polish_utf-8.inc.txt');
+
 ?>
diff -Naur mantis-1.1.1/lang/strings_polish_8859-2.txt mantis/lang/strings_polish_8859-2.txt
--- mantis-1.1.1/lang/strings_polish_8859-2.txt	2007-10-14 00:36:41.000000000 +0200
+++ mantis/lang/strings_polish_8859-2.txt	2008-02-21 10:00:52.000000000 +0100
@@ -53,8 +53,13 @@
 $s_actiongroup_menu_update_category = 'Aktualizuj kategori';
 $s_actiongroup_menu_set_sticky = 'Przyklej/odklej';
 $s_actiongroup_menu_update_field = 'Aktualizuj %s';
+$s_actiongroup_menu_update_target_version = 'Aktualizuj Wersja docelowa';
+$s_actiongroup_menu_update_fixed_in_version = 'Aktualizuj Poprawiono w wersji';
+$s_actiongroup_menu_add_note = 'Dodaj not';
+$s_actiongroup_menu_attach_tags = 'Doacz tag';
 $s_actiongroup_bugs = 'Wybrane zagadnienia';
 
+
 # new strings:
 $s_all_projects = 'Wszystkie projekty';
 $s_move_bugs = 'Przenie zagadnienia';
@@ -1328,4 +1333,6 @@
 
 # wiki related strings
 $s_wiki = 'Wiki';
+
+include ('custom_strings_polish_8859-2.inc.txt');
 ?>
diff -Naur mantis-1.1.1/manage_config_email_page.php mantis/manage_config_email_page.php
--- mantis-1.1.1/manage_config_email_page.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/manage_config_email_page.php	2008-02-19 10:38:23.000000000 +0100
@@ -258,6 +258,7 @@
 		get_capability_row_for_email( lang_get( 'email_on_reopened' ), 'reopened' );
 		get_capability_row_for_email( lang_get( 'email_on_deleted' ), 'deleted' );
 		get_capability_row_for_email( lang_get( 'email_on_bugnote_added' ), 'bugnote' );
+		get_capability_row_for_email( lang_get( 'email_on_processed' ), 'processed' );
 		if( config_get( 'enable_sponsorship' ) == ON ) {
 			get_capability_row_for_email( lang_get( 'email_on_sponsorship_changed' ), 'sponsor' );
 		}
diff -Naur mantis-1.1.1/mantisserver.php mantis/mantisserver.php
--- mantis-1.1.1/mantisserver.php	1970-01-01 01:00:00.000000000 +0100
+++ mantis/mantisserver.php	2008-01-28 21:13:36.000000000 +0100
@@ -0,0 +1,167 @@
+<?php
+# Change this to point to the PHPXMLRPC server.php
+require_once("../XMLRPC/PHPXMLRPC/server.php");
+
+
+#Include core mantis files
+$mantis_dir = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR;
+$g_bypass_headers = true;
+require_once($mantis_dir . 'core.php');
+
+#Include helper functions
+require_once("mantishelper.php");
+
+# Convert this file into an XMLRPC server
+$mantis_server = new PHPXMLRPCServer();
+$mantis_server->addFunction("MantisRPC", "MantisRPC");
+$mantis_server->startServer();
+
+
+function MantisRPC($args){
+	
+	//print_r($args);
+	
+	$args_count = $args->getNumParams();
+	
+	$username = $args->getParam(0);
+	$password = $args->getParam(1);
+	$function = $args->getParam(2);
+	
+	$func_args = array();
+
+	for($i = 3; $i < $args_count; $i++){
+		$temp = $args->getParam($i);
+		$func_args[] = $temp->scalarval();
+	}
+	
+	if(!MantisLogin($username->scalarval(), $password->scalarval())){
+		return XMLRPCError("Invalid user and pass");
+	}
+
+	if(!in_array($function->scalarval(), getRemoteFunctions())){
+		return XMLRPCError("Function not found in Remote List");	
+	}
+	
+	$result = call_user_func_array($function->scalarval(), $func_args);
+	
+	return new xmlrpcresp(processResult($result));
+	
+}
+
+function XMLRPCError($msg){
+	global $xmlrpcerruser;
+	
+	return new xmlrpcresp(0, $xmlrpcerruser, $msg);
+}
+
+
+function MantisLogin($username, $password){
+	
+	$offline_file = dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'mantis_offline.php';
+	if(file_exists( $offline_file )){
+		return false;
+	}
+
+	# if no user name supplied, then attempt to login as anonymous user.
+	if(is_blank($username)){
+		
+		$anon_allowed = config_get('allow_anonymous_login');
+		
+		if($anon_allowed == "OFF"){
+			return false;
+		}
+
+		$username = config_get('anonymous_account');
+
+		# do not use password validation.
+		$password = null;
+	}
+
+	if(auth_attempt_script_login($username, $password) === false){
+		return false;
+	}
+
+	return true;
+}
+
+function is_associative_array($array) {
+	if(!is_array($array) || empty($array)){
+		return false;
+	}
+
+	$keys = array_keys($array);
+	return array_keys($keys) !== $keys;
+	
+}
+
+function getRemoteFunctions(){
+	$func = array();
+	
+	#mantis native core functions
+	$func[] = "user_get_accessible_projects";
+	$func[] = "bug_get_field";
+	$func[] = "bug_exists";
+	$func[] = "bug_get";
+	$func[] = "bug_create";
+	$func[] = "project_get_id_by_name";
+	$func[] = "filter_get_bug_rows";
+	$func[] = "project_create";
+	
+	#mantis helper functions
+	$func[] = "getMantisBugByProjectID";
+	$func[] = "getMantisBugByProjectName";
+	$func[] = "updateMantisBugStatusById";
+	$func[] = "getMantisBugById";
+	$func[] = "addExtraBugData";
+	$func[] = "bugCreateHelper";
+	
+	return $func;
+}
+
+function processResult($result){
+	
+	$ret = new xmlrpcval();
+
+	if(is_object($result)){
+		$result = get_object_vars($result);
+	}
+	
+	if(is_associative_array($result)){
+		
+		$ar = array();
+		
+		$keys = array_keys($result);
+
+		foreach($keys as $k){
+
+			$tmp = new xmlrpcval(array($k => new xmlrpcval($result[$k])), 'struct');	
+			$ar[] = $tmp;			
+		}
+		
+		$ret->addArray($ar);
+	}
+	else if(is_array($result)){
+		foreach($result as $key => $value){
+			
+			if(!is_string($value)){
+				$tmp = processResult($value);
+			}
+			else {
+				$tmp = new xmlrpcval();
+				$tmp->addScalar($value);
+			}
+			
+			$result[$key] = $tmp;
+		}
+		
+		$ret->addArray($result);
+	}
+	else if(is_bool($result)){
+		$ret->addScalar($result, "boolean");
+	}
+	else {
+		$ret->addScalar($result);
+	}
+	
+	return $ret;
+}	
diff -Naur mantis-1.1.1/task_actiongroup.php mantis/task_actiongroup.php
--- mantis-1.1.1/task_actiongroup.php	1970-01-01 01:00:00.000000000 +0100
+++ mantis/task_actiongroup.php	2008-02-21 10:18:37.000000000 +0100
@@ -0,0 +1,315 @@
+<?php
+# Mantis - a php based bugtracking system
+
+# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+
+# Mantis 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.
+#
+# Mantis 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 Mantis.  If not, see <http://www.gnu.org/licenses/>.
+
+	# --------------------------------------------------------
+	# $Id: bug_actiongroup.php,v 1.52.2.1 2007-10-13 22:32:30 giallu Exp $
+	# --------------------------------------------------------
+?>
+<?php
+	# This page allows actions to be performed an an array of bugs
+?>
+<?php
+	require_once( 'core.php' );
+
+	$t_core_path = config_get( 'core_path' );
+
+	require_once( $t_core_path.'bug_api.php' );
+?>
+<?php auth_ensure_user_authenticated() ?>
+<?php
+	helper_begin_long_process();
+	
+	$f_action	= gpc_get_string( 'action' );
+	$f_custom_field_id = gpc_get_int( 'custom_field_id', 0 );
+	$f_bug_arr	= gpc_get_int_array( 'bug_arr', array() );
+
+	$t_custom_group_actions = config_get( 'custom_group_actions' );
+
+	foreach( $t_custom_group_actions as $t_custom_group_action ) {
+		if ( $f_action == $t_custom_group_action['action'] ) {
+			require_once( $t_custom_group_action['action_page'] );
+			exit;
+		}
+	}
+
+	$t_failed_ids = array();
+
+	if ( 0 != $f_custom_field_id ) {
+		$t_custom_field_def = custom_field_get_definition( $f_custom_field_id );
+	}
+
+	foreach( $f_bug_arr as $t_bug_id ) {
+		bug_ensure_exists( $t_bug_id );
+		$t_bug = bug_get( $t_bug_id, true );
+
+		if( $t_bug->project_id != helper_get_current_project() ) {
+			# in case the current project is not the same project of the bug we are viewing...
+			# ... override the current project. This to avoid problems with categories and handlers lists etc.
+			$g_project_override = $t_bug->project_id;
+			# @@@ (thraxisp) the next line goes away if the cache was smarter and used project
+			config_flush_cache(); # flush the config cache so that configs are refetched
+		}
+
+		$t_status = $t_bug->status;
+
+		switch ( $f_action ) {
+
+		case 'CLOSE':
+			if ( access_can_close_bug( $t_bug_id ) &&
+					( $t_status < CLOSED ) &&
+					bug_check_workflow($t_status, CLOSED) ) {
+
+				# @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $f_bug_id, $t_bug_data, $f_bugnote_text ) );
+				bug_close( $t_bug_id );
+				helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+			} else {
+				if ( ! access_can_close_bug( $t_bug_id ) ) {
+					$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+				} else {
+					$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_status' );
+				}
+			}
+			break;
+
+		case 'DELETE':
+			if ( access_has_bug_level( config_get( 'delete_bug_threshold' ), $t_bug_id ) ) {
+				bug_delete( $t_bug_id );
+			} else {
+				$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+			}
+			break;
+
+		case 'MOVE':
+			if ( access_has_bug_level( config_get( 'move_bug_threshold' ), $t_bug_id ) ) {
+				# @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) );
+				$f_project_id = gpc_get_int( 'project_id' );
+				bug_set_field( $t_bug_id, 'project_id', $f_project_id );
+				helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+			} else {
+				$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+			}
+			break;
+
+		case 'COPY':
+			$f_project_id = gpc_get_int( 'project_id' );
+
+			if ( access_has_project_level( config_get( 'report_bug_threshold' ), $f_project_id ) ) {
+				bug_copy( $t_bug_id, $f_project_id, true, true, true, true, true, true );
+			} else {
+				$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+			}
+			break;
+
+		case 'ASSIGN':
+			$f_assign = gpc_get_int( 'assign' );
+			if ( ON == config_get( 'auto_set_status_to_assigned' ) ) {
+				$t_assign_status = config_get( 'bug_assigned_status' );
+			} else {
+				$t_assign_status = $t_status;
+			}
+			# check that new handler has rights to handle the issue, and
+			#  that current user has rights to assign the issue
+			$t_threshold = access_get_status_threshold( $t_assign_status, bug_get_field( $t_bug_id, 'project_id' ) );
+			if ( access_has_bug_level( $t_threshold , $t_bug_id, $f_assign ) &&
+				 access_has_bug_level( config_get( 'update_bug_assign_threshold', config_get( 'update_bug_threshold' ) ), $t_bug_id ) &&
+					bug_check_workflow($t_status, $t_assign_status )	) {
+				# @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) );
+				bug_assign( $t_bug_id, $f_assign );
+				helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+			} else {
+				if ( bug_check_workflow($t_status, $t_assign_status ) ) {
+					$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+				} else {
+					$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_status' );
+				}
+			}
+			break;
+
+		case 'RESOLVE':
+			$t_resolved_status = config_get( 'bug_resolved_status_threshold' );
+			if ( access_has_bug_level( access_get_status_threshold( $t_resolved_status, bug_get_field( $t_bug_id, 'project_id' ) ), $t_bug_id ) &&
+				 		( $t_status < $t_resolved_status ) &&
+						bug_check_workflow($t_status, $t_resolved_status ) ) {
+				$f_resolution = gpc_get_int( 'resolution' );
+				$f_fixed_in_version = gpc_get_string( 'fixed_in_version', '' );
+				# @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) );
+				bug_resolve( $t_bug_id, $f_resolution, $f_fixed_in_version );
+				helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+			} else {
+				if ( ( $t_status < $t_resolved_status ) &&
+						bug_check_workflow($t_status, $t_resolved_status ) ) {
+					$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+				} else {
+					$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_status' );
+				}
+			}
+			break;
+
+		case 'UP_PRIOR':
+			if ( access_has_bug_level( config_get( 'update_bug_threshold' ), $t_bug_id ) ) {
+				$f_priority = gpc_get_int( 'priority' );
+				# @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) );
+				bug_set_field( $t_bug_id, 'priority', $f_priority );
+				helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+			} else {
+				$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+			}
+			break;
+
+		case 'UP_STATUS':
+			$f_status = gpc_get_int( 'status' );
+			$t_project = bug_get_field( $t_bug_id, 'project_id' );
+			if ( access_has_bug_level( access_get_status_threshold( $f_status, $t_project ), $t_bug_id ) ) {
+				if ( TRUE == bug_check_workflow($t_status, $f_status ) ) {
+					# @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) );
+					bug_set_field( $t_bug_id, 'status', $f_status );
+					helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+				} else {
+					$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_status' );
+				}
+			} else {
+				$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+			}
+			break;
+
+		case 'UP_CATEGORY':
+			$f_category = gpc_get_string( 'category' );
+			$t_project = bug_get_field( $t_bug_id, 'project_id' );
+			if ( access_has_bug_level( config_get( 'update_bug_threshold' ), $t_bug_id ) ) {
+				if ( category_exists( $t_project, $f_category ) ) {
+					# @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) );
+					bug_set_field( $t_bug_id, 'category', $f_category );
+					helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+				} else {
+					$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_category' );
+				}
+			} else {
+				$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+			}
+			break;
+		
+		case 'UP_FIXED_IN_VERSION':
+			$f_fixed_in_version = gpc_get_string( 'fixed_in_version' );
+			$t_project_id = bug_get_field( $t_bug_id, 'project_id' );
+			$t_success = false;
+
+			if ( access_has_bug_level( config_get( 'update_bug_threshold' ), $t_bug_id ) ) {
+				if ( version_get_id( $f_fixed_in_version, $t_project_id ) !== false ) {
+					# @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) );
+					bug_set_field( $t_bug_id, 'fixed_in_version', $f_fixed_in_version );
+					helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+					$t_success = true;
+				}
+			}
+
+			if ( !$t_success ) {
+				$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+			}
+			break;
+
+		case 'UP_TARGET_VERSION':
+			$f_target_version = gpc_get_string( 'target_version' );
+			$t_project_id = bug_get_field( $t_bug_id, 'project_id' );
+			$t_success = false;
+
+			if ( access_has_bug_level( config_get( 'roadmap_update_threshold' ), $t_bug_id ) ) {
+				if ( version_get_id( $f_target_version, $t_project_id ) !== false ) {
+					# @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) );
+					bug_set_field( $t_bug_id, 'target_version', $f_target_version );
+					helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+					$t_success = true;
+				}
+			}
+
+			if ( !$t_success ) {
+				$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+			}
+			break;
+
+		case 'VIEW_STATUS':
+			if ( access_has_bug_level( config_get( 'change_view_status_threshold' ), $t_bug_id ) ) {
+				$f_view_status = gpc_get_int( 'view_status' );
+				# @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) );
+				bug_set_field( $t_bug_id, 'view_state', $f_view_status );
+				helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+			} else {
+				$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+			}
+			break;
+
+		case 'SET_STICKY':
+			if ( access_has_bug_level( config_get( 'set_bug_sticky_threshold' ), $t_bug_id ) ) {
+				$f_sticky = bug_get_field( $t_bug_id, 'sticky' );
+				// The new value is the inverted old value
+				# @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) );
+				bug_set_field( $t_bug_id, 'sticky', intval( !$f_sticky ) );
+				helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+			} else {
+				$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
+			}
+			break;
+
+		case 'UP_DEADLINE':
+			$f_deadline = gpc_get_string( 'deadline' );
+			if ( !is_blank( $_deadline ) ) {
+			    $t_a = explode( '-', $f_deadline );
+			    if ( !chekckdate((integer) $t_a[1], (integer) $t_a[2], (integer) $t_a[0] ) ) {
+				error_parameters( lang_get( 'deadline' ) );
+				trigger_error( ERROR_WRONG_DATE_FORMAT, ERROR );
+			    }
+			}
+			bug_set_field( $t_bug_id, 'deadline', $f_deadline );
+			break;
+		case 'CUSTOM':
+			if ( 0 === $f_custom_field_id ) {
+				trigger_error( ERROR_GENERIC, ERROR );
+			}
+
+			# @@@ we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) );
+			$t_form_var = "custom_field_$f_custom_field_id";
+			$t_custom_field_value = gpc_get_custom_field( $t_form_var, $t_custom_field_def['type'], null );
+			custom_field_set_value( $f_custom_field_id, $t_bug_id, $t_custom_field_value );
+			helper_call_custom_function( 'issue_update_notify', array( $t_bug_id ) );
+			break;
+
+		default:
+			trigger_error( ERROR_GENERIC, ERROR );
+		}
+	}
+
+	$t_redirect_url = 'task_list_page.php';
+
+	if ( count( $t_failed_ids ) > 0 ) {
+		html_page_top1();
+		html_page_top2();
+
+		echo '<div align="center"><br />';
+		echo '<table class="width75">';
+		foreach( $t_failed_ids as $t_id => $t_reason ) {
+			printf( "<tr><td width=\"50%%\">%s: %s</td><td>%s</td></tr>\n", string_get_bug_view_link( $t_id ), bug_get_field( $t_id, 'summary' ), $t_reason );
+		}
+		echo '</table><br />';
+		print_bracket_link( $t_redirect_url, lang_get( 'proceed' ) );
+		echo '</div>';
+
+		html_page_bottom1( __FILE__ );
+	} else {
+		print_header_redirect( $t_redirect_url );
+	}
+?>
diff -Naur mantis-1.1.1/task_actiongroup_page.php mantis/task_actiongroup_page.php
--- mantis-1.1.1/task_actiongroup_page.php	1970-01-01 01:00:00.000000000 +0100
+++ mantis/task_actiongroup_page.php	2008-02-21 10:13:12.000000000 +0100
@@ -0,0 +1,379 @@
+<?php
+# Mantis - a php based bugtracking system
+
+# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+
+# Mantis 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.
+#
+# Mantis 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 Mantis.  If not, see <http://www.gnu.org/licenses/>.
+
+	# --------------------------------------------------------
+	# $Id: bug_actiongroup_page.php,v 1.55.2.1 2007-10-13 22:32:34 giallu Exp $
+	# --------------------------------------------------------
+?>
+<?php
+	# This page allows actions to be performed on an array of bugs
+
+	require_once( 'core.php' );
+
+	require_once( $t_core_path.'bug_group_action_api.php' );
+
+	auth_ensure_user_authenticated();
+
+	$f_action = gpc_get_string( 'action', '' );
+	$f_bug_arr = gpc_get_int_array( 'bug_arr', array() );
+	$f_ids = gpc_get_string ( 'ids', '' );
+	$f_task_view_type = gpc_get_int( 'task_view_type' );
+	$t_current_user_id = auth_get_current_user_id();
+	
+	# redirects to all_bug_page if nothing is selected
+	if ( (is_blank( $f_action ) || ( 0 == sizeof( $f_bug_arr ) ) ) && is_blank( $f_ids ) ) {
+		$t_link = 'task_list_page.php?task_view_type='.token_get_value( TOKEN_TASK_VIEW, $t_current_user_id );
+		print_header_redirect( $t_link );
+	}
+
+	if ( !is_blank( $f_ids ) ) {
+	    $t_ids_arr = array();
+	    $t_tasks_arr = array();
+	    $t_ids_arr = split( '#', $f_ids );
+	    $t_user_id = $t_ids_arr[0];
+	    if ( is_blank( $t_user_id ) )
+	    	$t_user_id = 0;
+	    $t_tasks_arr = array_slice ( $t_ids_arr, 1 );
+	    # task_remove_all_from_user( $t_user_id );
+	    $t_order = 1;
+	    foreach ( $t_tasks_arr as $t_task_id ) {
+	    	$t_old_order = bug_get_field( $t_task_id, 'task_order' );
+	    	bug_set_field( $t_task_id, 'task_order', $t_order );
+			$t_order++;
+			$t_info = lang_get( 'task_shifted' ).$t_old_order;
+			history_log_event_direct( $p_task_id, lang_get( 'task_is_task' ), $t_info, $t_order );
+	    }
+	    $t_link = 'task_list_page.php?task_view_type='.token_get_value( TOKEN_TASK_VIEW, $t_current_user_id );
+	    print_successful_redirect( $t_link );
+	} else {
+
+	# run through the issues to see if they are all from one project
+	$t_project_id = ALL_PROJECTS;
+	$t_multiple_projects = false;
+	foreach( $f_bug_arr as $t_bug_id ) {
+		$t_bug = bug_get( $t_bug_id );
+		if ( $t_project_id != $t_bug->project_id ) {
+			if ( ( $t_project_id != ALL_PROJECTS ) && !$t_multiple_projects ) {
+				$t_multiple_projects = true;
+			} else {
+				$t_project_id = $t_bug->project_id;
+			}
+		}
+	}
+	if ( $t_multiple_projects ) {
+		$t_project_id = ALL_PROJECTS;
+	}
+	# override the project if necessary
+	if( $t_project_id != helper_get_current_project() ) {
+		# in case the current project is not the same project of the bug we are viewing...
+		# ... override the current project. This to avoid problems with categories and handlers lists etc.
+		$g_project_override = $t_project_id;
+	}
+
+	$t_finished = false;
+	$t_request = '';
+
+	$t_external_action_prefix = 'EXT_';
+	if ( strpos( $f_action, $t_external_action_prefix ) === 0 ) {
+		$t_form_page = 'bug_actiongroup_ext_page.php';
+		require_once( $t_form_page );
+		exit;
+	}
+
+	$t_custom_group_actions = config_get( 'custom_group_actions' );
+	
+	foreach( $t_custom_group_actions as $t_custom_group_action ) {
+		if ( $f_action == $t_custom_group_action['action'] ) {
+			require_once( $t_custom_group_action['form_page'] );
+			exit;
+		}
+	}
+
+	# Check if user selected to update a custom field.
+	$t_custom_fields_prefix = 'custom_field_';
+	if ( strpos( $f_action, $t_custom_fields_prefix ) === 0 ) {
+		$t_custom_field_id = (int)substr( $f_action, strlen( $t_custom_fields_prefix ) );
+		$f_action = 'CUSTOM';
+	}
+
+	switch ( $f_action )  {
+		# Use a simple confirmation page, if close or delete...
+		case 'CLOSE' :
+			$t_finished 			= true;
+			$t_question_title 		= lang_get( 'close_bugs_conf_msg' );
+			$t_button_title 		= lang_get( 'close_group_bugs_button' );
+			break;
+
+		case 'DELETE' :
+			$t_finished 			= true;
+			$t_question_title		= lang_get( 'delete_bugs_conf_msg' );
+			$t_button_title 		= lang_get( 'delete_group_bugs_button' );
+			break;
+
+		case 'SET_STICKY' :
+			$t_finished 			= true;
+			$t_question_title		= lang_get( 'set_sticky_bugs_conf_msg' );
+			$t_button_title 		= lang_get( 'set_sticky_group_bugs_button' );
+			break;
+
+		# ...else we define the variables used in the form
+		case 'MOVE' :
+			$t_question_title 		= lang_get( 'move_bugs_conf_msg' );
+			$t_button_title 		= lang_get( 'move_group_bugs_button' );
+			$t_form					= 'project_id';
+			break;
+
+		case 'COPY' :
+			$t_question_title 		= lang_get( 'copy_bugs_conf_msg' );
+			$t_button_title 		= lang_get( 'copy_group_bugs_button' );
+			$t_form					= 'project_id';
+			break;
+
+		case 'ASSIGN' :
+			$t_question_title 		= lang_get( 'assign_bugs_conf_msg' );
+			$t_button_title 		= lang_get( 'assign_group_bugs_button' );
+			$t_form 				= 'assign';
+			break;
+
+		case 'RESOLVE' :
+			$t_question_title 		= lang_get( 'resolve_bugs_conf_msg' );
+			$t_button_title 		= lang_get( 'resolve_group_bugs_button' );
+			$t_form 				= 'resolution';
+			$t_request 				= 'resolution'; # the "request" vars allow to display the adequate list
+			if ( ALL_PROJECTS != $t_project_id ) {
+				$t_question_title2 = lang_get( 'fixed_in_version' );
+				$t_form2 = 'fixed_in_version';
+			}
+			break;
+
+		case 'UP_PRIOR' :
+			$t_question_title 		= lang_get( 'priority_bugs_conf_msg' );
+			$t_button_title 		= lang_get( 'priority_group_bugs_button' );
+			$t_form 				= 'priority';
+			$t_request 				= 'priority';
+			break;
+
+		case 'UP_STATUS' :
+			$t_question_title 		= lang_get( 'status_bugs_conf_msg' );
+			$t_button_title 		= lang_get( 'status_group_bugs_button' );
+			$t_form 				= 'status';
+			$t_request 				= 'status';
+			break;
+
+		case 'UP_CATEGORY' :
+			$t_question_title		= lang_get( 'category_bugs_conf_msg' );
+			$t_button_title			= lang_get( 'category_group_bugs_button' );
+			$t_form					= 'category';
+			$t_request				= 'category';
+			break;
+
+		case 'VIEW_STATUS' :
+			$t_question_title		= lang_get( 'view_status_bugs_conf_msg' );
+			$t_button_title			= lang_get( 'view_status_group_bugs_button' );
+			$t_form				= 'view_status';
+			$t_request			= 'view_status';
+			break;
+		
+		case 'UP_FIXED_IN_VERSION':
+			$t_question_title		= lang_get( 'fixed_in_version_bugs_conf_msg' );
+			$t_button_title			= lang_get( 'fixed_in_version_group_bugs_button' );
+			$t_form					= 'fixed_in_version';
+			$t_request				= 'fixed_in_version';
+			break;
+
+		case 'UP_TARGET_VERSION':
+			$t_question_title		= lang_get( 'target_version_bugs_conf_msg' );
+			$t_button_title			= lang_get( 'target_version_group_bugs_button' );
+			$t_form					= 'target_version';
+			$t_request				= 'target_version';
+			break;
+		
+		case 'UP_DEADLINE':
+			$t_question_title		= lang_get( 'deadline_task_conf_msg' );
+			$t_button_title			= lang_get( 'deadline_group_task_button' );
+			$t_form				= 'deadline';
+			$t_request			= 'deadline';
+			break;
+			
+		case 'CUSTOM' :
+			$t_custom_field_def = custom_field_get_definition( $t_custom_field_id );
+			$t_question_title = sprintf( lang_get( 'actiongroup_menu_update_field' ), lang_get_defaulted( $t_custom_field_def['name'] ) );
+			$t_button_title = $t_question_title;
+			$t_form = "custom_field_$t_custom_field_id";
+			break;
+
+		default:
+			trigger_error( ERROR_GENERIC, ERROR );
+	}
+
+	bug_group_action_print_top();
+	
+	if ( $t_multiple_projects ) {
+		echo '<p class="bold">' . lang_get( 'multiple_projects' ) . '</p>';
+	}
+?>
+
+<br />
+
+<div align="center">
+<form method="post" action="task_actiongroup.php">
+<input type="hidden" name="action" value="<?php echo string_attribute( $f_action ) ?>" />
+<?php
+	bug_group_action_print_hidden_fields( $f_bug_arr );
+
+	if ( $f_action === 'CUSTOM' ) {
+		echo "<input type=\"hidden\" name=\"custom_field_id\" value=\"$t_custom_field_id\" />";
+	}
+?>
+<table class="width75" cellspacing="1">
+<?php
+if ( !$t_finished ) {
+?>
+<tr class="row-1">
+	<td class="category">
+		<?php echo $t_question_title ?>
+	</td>
+	<td>
+	<?php
+		if ( $f_action === 'CUSTOM' ) {
+			$t_custom_field_def = custom_field_get_definition( $t_custom_field_id );
+
+			$t_bug_id = null;
+
+			# if there is only one issue, use its current value as default, otherwise,
+			# use the default value specified in custom field definition.
+			if ( sizeof( $f_bug_arr ) == 1 ) {
+				$t_bug_id = $f_bug_arr[0];
+			}
+
+			print_custom_field_input( $t_custom_field_def, $t_bug_id );
+		} else if ( $f_action === 'UP_DEADLINE' ) {
+		
+		# @@@ (thraxisp) this may want a browser check  ( MS IE >= 5.0, Mozilla >= 1.0, Safari >=1.2, ...)
+    		    if ( ( ON == config_get( 'dhtml_filters' ) ) && ( ON == config_get( 'use_javascript' ) ) ){
+	                echo "<style type=\"text/css\">@import url(javascript/jscalendar/calendar-blue.css);</style>";
+		        echo "<script type=\"text/javascript\" src=\"javascript/jscalendar/calendar.js\"></script>\n";
+		        echo "<script type=\"text/javascript\" src=\"javascript/jscalendar/lang/calendar-en.js\"></script>\n";
+		        echo "<script type=\"text/javascript\" src=\"javascript/jscalendar/calendar-setup.js\"></script>\n";
+		    }
+		    $t_icon_path = config_get( 'icon_path' );
+		    $cal_icon = $t_icon_path ."calendar-img.gif";
+		    print "<input ".helper_get_tab_index()." type=\"text\" id=\"deadline\" name=\"deadline\" size=\"20\" maxlength=\"10\" value=\"".$t_bug->deadline."\">";
+		    ?><input type="image" class="button" id="trigger" SRC="
+        		<?php print $cal_icon;?> " onClick="return showCalendar ('sel1', '%Y-%m-%d', 24, true)" /><?php
+		} else {
+			echo "<select name=\"$t_form\">";
+
+			switch ( $f_action ) {
+				case 'COPY':
+				case 'MOVE':
+					print_project_option_list( null, false );
+					break;
+				case 'ASSIGN':
+					print_assign_to_option_list( 0, $t_project_id );
+					break;
+				case 'VIEW_STATUS':
+					print_enum_string_option_list( 'view_state', config_get( 'default_bug_view_status' ) );
+					break;
+				case 'UP_CATEGORY':
+					print_category_option_list();
+					break;
+				case 'UP_TARGET_VERSION':
+				case 'UP_FIXED_IN_VERSION':
+					print_version_option_list( '', $t_project_id, VERSION_ALL );
+					break;
+			}
+
+			# other forms use the same function to display the list
+			if ( $t_request > '' ) {
+				print_enum_string_option_list( $t_request, FIXED );
+			}
+
+			echo '</select>';
+		}
+		?>
+	</td>
+</tr>
+	<?php
+	if ( isset( $t_question_title2 ) ) {
+		switch ( $f_action ) {
+			case 'RESOLVE':
+				$t_show_version = ( ON == config_get( 'show_product_version' ) )
+					|| ( ( AUTO == config_get( 'show_product_version' ) )
+								&& ( count( version_get_all_rows( $t_project_id ) ) > 0 ) );
+				if ( $t_show_version ) {
+	?>
+		<tr class="row-2">
+			<td class="category">
+				<?php echo $t_question_title2 ?>
+			</td>
+			<td>
+				<select name="<?php echo $t_form2 ?>">
+					<?php print_version_option_list( '', null, VERSION_ALL );?>
+				</select>
+			</td>
+		</tr>
+	<?php
+				}
+				break;
+		}
+	}
+	?>
+<?php
+} else {
+?>
+
+<tr class="row-1">
+	<td class="category" colspan="2">
+		<?php echo $t_question_title; ?>
+	</td>
+</tr>
+<?php
+}
+?>
+
+<tr>
+	<td class="center" colspan="2">
+		<input type="submit" class="button" value="<?php echo $t_button_title ?>" />
+	</td>
+</tr>
+</table>
+<br />
+
+<?php
+	bug_group_action_print_bug_list( $f_bug_arr );
+?>
+</form>
+<?php if ( $f_action === 'UP_DEADLINE' ) { ?>
+        <script type="text/javascript">
+    	    Calendar.setup (
+                {
+                    inputField     : "deadline",
+            	    ifFormat       : "%Y-%m-%d",
+            	    button         : "trigger"
+               }
+	   );
+       </script>
+<?php } ?>
+</div>
+
+<?php
+	bug_group_action_print_bottom();
+}
+?>
diff -Naur mantis-1.1.1/task_list_page.php mantis/task_list_page.php
--- mantis-1.1.1/task_list_page.php	1970-01-01 01:00:00.000000000 +0100
+++ mantis/task_list_page.php	2008-02-21 10:35:52.000000000 +0100
@@ -0,0 +1,528 @@
+<?php
+# Mantis - a php based bugtracking system
+
+# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
+# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
+
+# Mantis 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.
+#
+# Mantis 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 Mantis.  If not, see <http://www.gnu.org/licenses/>.
+
+	# --------------------------------------------------------
+	# $Revision: 1.62.2.1 $
+	# $Author: giallu $
+	# $Date: 2007-10-13 22:34:48 $
+	#
+	# $Id: view_all_bug_page.php,v 1.62.2.1 2007-10-13 22:34:48 giallu Exp $
+	# --------------------------------------------------------
+
+
+# sys manager	project manager can
+# 0 0 see own(all) tasks | see project(all) tasks | dont see global tasks
+# 0 1 dont see own tasks | modify project(all) task | see global tasks
+# 1 0 dont see own tasks | see project(all) tasks | see global tasks
+
+# default view for manager see project tasks, non manager see own tasks
+
+?>
+<?php
+	require_once( 'core.php' );
+
+	$t_core_path = config_get( 'core_path' );
+
+	require_once( $t_core_path.'compress_api.php' );
+	require_once( $t_core_path.'task_api.php' );
+	require_once( $t_core_path.'user_api.php' );
+	require_once( $t_core_path.'last_visited_api.php' );
+	require_once( $t_core_path.'icon_api.php' );
+	require_once( $t_core_path.'columns_api.php' );
+        require_once( $t_core_path.'current_user_api.php' );
+        require_once( $t_core_path.'bug_api.php' );
+        require_once( $t_core_path.'string_api.php' );
+        require_once( $t_core_path.'date_api.php' );
+        require_once( $t_core_path.'tokens_api.php' );
+        require_once( $t_core_path.'helper_api.php' );
+						
+
+    auth_ensure_user_authenticated();
+
+	global $t_icon_path;
+	$f_page_number		= gpc_get_int( 'page_number', 1 );
+	# 1 means active
+	# 2 means full
+	$t_view_type		= gpc_get_int( 'task_view_type', 1);
+	$t_per_page = null;
+	$t_bug_count = null;
+	$t_page_count = null;
+
+	$t_icon_path = config_get( 'icon_path' );
+        $t_update_bug_threshold = config_get( 'update_bug_threshold' );
+	
+	$t_icon_Up = $t_icon_path . 'arrow_up.gif';
+	$t_icon_Dn = $t_icon_path . 'arrow_down.gif';
+	$t_icon_Ft = $t_icon_path . 'arrow_first.gif';
+	$t_icon_Lt = $t_icon_path . 'arrow_last.gif';
+	$t_icon_Ok = $t_icon_path . 'accept.png';
+	$t_icon_Cn = $t_icon_path . 'cancel.png';
+	
+	$t_current_user_id = auth_get_current_user_id();
+	$t_current_project_id = helper_get_current_project();
+	
+
+	$t_system_level = access_get_global_level();
+	
+	$t_token = gpc_get_int ( 'task_view_type', 0 );
+   
+
+	if ( !$t_token )
+		$t_token = token_get_value ( TOKEN_TASK_VIEW, $t_current_user_id );
+	
+	if ( $t_current_project_id > 0 )
+	    $t_current_project_level = project_get_local_user_access_level( $t_current_project_id, $t_current_user_id );
+	else {
+	    $t_project_level = ANYBODY;
+	    if ( $t_token <= TASK_VIEW_PROJECT_ALL ) {
+			$t_token = TASK_VIEW_PROJECT;
+	    } else if ( $t_token >= TASK_VIEW_PROJECT ) {
+			$t_token = TASK_VIEW_SINGLE_USER;
+		 }
+	    token_set( TOKEN_TASK_VIEW, TASK_VIEW_GLOBAL, TOKEN_EXPIRY, $t_current_user_id );
+	}
+
+	if ( $t_system_level == ADMINISTRATOR )
+	    $t_current_project_level = ADMINISTRATOR;
+	    
+	if ( $t_current_project_level >= config_get( 'task_manager_threshold' ) ) {
+	    $t_can_reorder = true;
+	}
+	else
+	    $t_can_reorder = false;
+
+
+
+	if ( $t_token == 0 ) {
+	# setting default view 
+	    $t_token = TASK_VIEW_SINGLE_USER;
+	    if ( $t_current_project_level >= config_get( 'task_manager_threshold' ) || 
+		$t_system_level >= config_get( 'task_manager_threshold' ) ){
+		$t_token = TASK_VIEW_PROJECT;
+	    }	    
+	}
+
+	token_set( TOKEN_TASK_VIEW, $t_token, TOKEN_EXPIRY, $t_current_user_id );	
+	compress_enable();
+
+	html_page_top1( lang_get( 'view_bugs_link' ) );
+
+	if ( current_user_get_pref( 'refresh_delay' ) > 0 ) {
+		html_meta_redirect( 'view_all_bug_page.php?page_number='.$f_page_number, current_user_get_pref( 'refresh_delay' )*60 );
+	}
+
+	html_page_top2();
+
+	print_recently_visited();
+	
+	
+	$t_link_text = '';
+
+
+	#global / project list link
+	if ( ( $t_token & TASK_VIEW_SINGLE_USER ) || ( $t_token & TASK_VIEW_PROJECT  ) ||
+	    ( $t_token & TASK_VIEW_GLOBAL ) ) {
+	    $t_switch_token = $t_token << 1;
+	    $t_link_text = lang_get( 'task_view_all' );
+	    $t_all_view = false;
+
+	} else {
+	    $t_link_text = lang_get( 'task_view_active' );
+	    $t_switch_token = $t_token >> 1;
+	    $t_all_view = true;
+	}
+	print "<table style=\"width:100%\"><tr>";
+	$t_link_file = 'task_list_page.php?task_view_type='.$t_switch_token;
+	$t_link = "<a href=\"";
+	$t_link .= config_get( 'path' );
+	$t_link .= $t_link_file;
+	$t_link .= "\">[ ".$t_link_text." ]</a>";
+	print "<td colspan=2 style=\"text-align:right\">".$t_link."</td></tr>";	
+//zrobic linki dla usera / projektu / globalne
+	
+	if ( $t_current_project_level >= config_get( 'task_manager_threshold' ) || 
+		$t_system_level >= config_get( 'task_manager_threshold' ) ){
+	    if ( $t_all_view ) {
+		$t_left_link = TASK_VIEW_GLOBAL_ALL;
+		$t_left_link_text = lang_get( 'task_view_global' );
+		$t_right_link = TASK_VIEW_PROJECT_ALL;
+		$t_right_link_text = lang_get( 'task_view_project' );
+	    } else {
+		$t_left_link = TASK_VIEW_GLOBAL;
+		$t_left_link_text = lang_get( 'task_view_global' );
+		$t_right_link = TASK_VIEW_PROJECT;
+		$t_right_link_text = lang_get( 'task_view_project' );
+	    }
+	} else {
+	    if ( $t_all_view ) {
+		$t_right_link = TASK_VIEW_SINGLE_USER_ALL;
+		$t_right_link_text = lang_get( 'task_view_user' );
+		$t_left_link = TASK_VIEW_PROJECT_ALL;
+		$t_left_link_text = lang_get( 'task_view_project' );
+	    } else {
+		$t_right_link = TASK_VIEW_SINGLE_USER;
+		$t_right_link_text = lang_get( 'task_view_user' );
+		$t_left_link = TASK_VIEW_PROJECT;
+		$t_left_link_text = lang_get( 'task_view_project' );
+	    }
+	}
+	print "<tr>";
+	if  ( $t_token == TASK_VIEW_SINGLE_USER ) {
+		$t_header = lang_get( 'task_view_header_user' );
+	} else if ( $t_token == TASK_VIEW_SINGLE_USER_ALL ) {
+		$t_header = lang_get( 'task_view_header_user_all' );
+	} else if ( $t_token == TASK_VIEW_PROJECT ) {
+		$t_header = lang_get( 'task_view_header_project' );
+	} else if ( $t_token == TASK_VIEW_PROJECT_ALL ) {
+		$t_header = lang_get( 'task_view_header_project_all' );
+	} else if ( $t_token == TASK_VIEW_GLOBAL ) {
+		$t_header = lang_get( 'task_view_header_global' );
+	} else {
+		$t_header = lang_get( 'task_view_header_global_all' );
+	}
+	print "<th style=\"text-align:left\">".$t_header."</td>";
+	$t_link_file = 'task_list_page.php?task_view_type='.$t_left_link;
+	$t_link = "[ <a href=\"";
+	$t_link .= config_get( 'path' );
+	$t_link .= $t_link_file;
+	$t_link .= "\">".$t_left_link_text."</a> ]";
+	
+	$t_link_file = 'task_list_page.php?task_view_type='.$t_right_link;
+	$t_link .= "[ <a href=\"";
+	$t_link .= config_get( 'path' );
+	$t_link .= $t_link_file;
+	$t_link .= "\">".$t_right_link_text."</a> ]";	
+	print "<td style=\"text-align:right\">".$t_link."</td></tr></table>";
+	print "</div>";
+	
+	if ( $t_token <= TASK_VIEW_SINGLE_USER_ALL ) {
+	    $users[0] = $t_current_user_id;
+	} else if ( $t_token == TASK_VIEW_PROJECT || $t_token == TASK_VIEW_PROJECT_ALL ) {
+	    $users = task_get_users( $t_current_project_id );
+	} else {
+	    $users = task_get_users(null);
+	}
+	$t_users_count = sizeof( $users );
+
+# ======================================
+# counting tasks
+# ======================================
+	
+	$t_user_task_count = task_get_all_user_task( $users, $t_all_view );
+	$t_unassigned_rows = task_get_unassigned_tasks( $t_current_project_id );
+	$t_unconfirmed_rows = task_get_unconfirmed_tasks( $t_current_project_id );
+	$t_opened_count = $t_user_task_count + sizeof( $t_unassigned_rows ) + sizeof( $t_unconfirmed_rows );
+	$t_closed_count = 0;
+	if ( $t_all_view ) {
+	    $t_unassigned_closed_rows = task_get_unassigned_tasks( $t_current_project_id, true );
+	    $t_unconfirmed_closed_rows = task_get_unconfirmed_tasks( $t_current_project_id, true );
+	    $t_closed_count = sizeof( $t_unassigned_closed_rows ) + sizeof( $t_unconfirmed_closed_rows );			
+	}
+
+
+	 $t_status_legend_position = config_get( 'status_legend_position' );
+
+
+ 
+         if ( $t_status_legend_position == STATUS_LEGEND_POSITION_TOP || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) {
+                 html_status_legend();
+         }
+				 
+        mark_time( 'begin loop' );
+
+# @@@ (thraxisp) this may want a browser check  ( MS IE >= 5.0, Mozilla >= 1.0, Safari >=1.2, ...)
+        if ( ( ON == config_get( 'dhtml_filters' ) ) && ( ON == config_get( 'use_javascript' ) ) ){
+                ?>
+                <script type="text/javascript" language="JavaScript" src="javascript/shifttasklist.js"></script>
+                <?php
+	}
+
+
+?>
+    <form name="bug_action" method="get" action="task_actiongroup_page.php">
+    <input type="hidden" name="ids" id="ids" value="">
+    <input type="hidden" name="task_view_type" value="<?php print $t_view_type;?>">
+    <table id="buglist" class="width100" cellspacing="1">
+<?php # -- Bug list column header row -- ?>
+<tr class="row-category">
+<?php
+	$t_columns = helper_get_columns_to_view( COLUMNS_TARGET_TASK_VIEW_PAGE );
+	
+	$col_count = sizeof( $t_columns );
+
+            foreach( $t_columns as $t_column ) {
+                    $t_title_function = 'print_column_title';
+                    helper_call_custom_function( $t_title_function, array( $t_column ) );
+                }
+		
+	if ( $t_can_reorder && $t_token <= TASK_VIEW_PROJECT_ALL ) { 
+	    #print "<td align=\"center\">".lang_get( 'task_move' )."</td>";
+	    print "<td></td>";
+	}
+	
+?>
+
+</tr>
+										
+
+<?php
+
+	
+	for ( $i=0; $i < $t_users_count; $i++) {
+		$t_user_name = user_get_realname( $users[$i] );
+
+
+?>
+<tr class="row-category">
+<td colspan=" <?php print $col_count ?> ">
+<?php
+	 $rows = task_get_user_tasks( $users[$i] );
+    print $t_user_name." (".sizeof($rows).")</td>"; 
+    
+    if ( $t_can_reorder && $t_token <= TASK_VIEW_PROJECT_ALL ) {?>
+     <td> <input type="hidden" id="<?php print $users[$i] ?>">
+     <input type="image" class="button" SRC="<?php print $t_icon_Ok;?>" value="Uaktualnij"  name="<?php print $users[$i] ?>" onClick="updateIt(this)" >
+     <input type="image" class="button" SRC="<?php print $t_icon_Cn;?>" value="Uaktualnij"  name="<?php print $users[$i] ?>" onClick="window.location.reload( false ); return false;" ></td>
+<?php #"
+    }
+    print "</tr>\n";
+
+
+		for ( $j=0; $j < sizeof($rows); $j++ )
+		{
+		    $t_bug_id = $rows[$j];
+		    $t_bug_row = bug_cache_row( $t_bug_id );
+                    # choose color based on status
+                    $status_color = get_status_color( $t_bug_row['status'] );
+                    echo '<tr bgcolor="', $status_color, '" border="1">';
+		    write_bug_row ($t_bug_row, false);
+		    if ( $t_can_reorder && $t_token <= TASK_VIEW_PROJECT_ALL ) {
+?>
+		<td align="center">
+		<input type="image" class="button" ALT="<?php print lang_get( 'task_moveTop'  );?>" SRC="<?php print $t_icon_Ft; ?>"value="UP" onClick="moveFirst(this); return false;"/>
+		<input type="image" class="button" ALT="<?php print lang_get( 'task_moveUp'  );?>" SRC="<?php print $t_icon_Up; ?>"value="UP" onClick="moveUp(this); return false;"/>
+		<input type="image" class="button" ALT="<?php print lang_get( 'task_moveDown'  );?>" SRC="<?php print $t_icon_Dn;?>" value="DOWN" onClick="moveDn(this); return false;"/>
+		<input type="image" class="button" ALT="<?php print lang_get( 'task_moveBottom'  );?>" SRC="<?php print $t_icon_Lt;?>" value="DOWN" onClick="moveLast(this); return false;"/>
+		</td>
+<?php #"
+		    }
+		    print "</tr>\n";
+		}
+		
+    if ( $t_all_view ) {
+	$t_full_filter = array(
+    	    'show_category'         => Array ( '0' => META_FILTER_ANY ),
+    	    'show_severity'         => Array ( '0' => config_get( 'task_severity_threshold' ) ),
+    	    'show_status'           => Array ( '0' => $g_hide_status_default ),
+    	    'highlight_changed'     => Array ( '0' => META_FILTER_ANY ),
+    	    'reporter_id'           => Array ( '0' => META_FILTER_ANY ),
+    	    'handler_id'            => Array ( '0' => $users[$i] ),
+    	    'show_resolution'       => Array ( '0' => META_FILTER_ANY ),
+    	    'show_build'            => Array ( '0' => META_FILTER_ANY ),
+    	    'show_version'          => Array ( '0' => META_FILTER_ANY ),
+    	    'hide_status'           => Array ( '0' => META_FILTER_ANY ),
+    	    'user_monitor'          => Array ( '0' => META_FILTER_ANY ),
+    	    'sort'		    => Array ( '0' => 'task_order', '1' => 'last_updated' ),
+    	    'dir'		    => Array ( '0' => 'ASC', '1' => 'DESC' )
+	);
+	
+	$f_page_number = 1;
+	$t_per_page = null;
+	$t_bug_count = null;
+	$t_page_count = null;
+	$t_rows = filter_get_bug_rows( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, $t_full_filter, null, null, false);
+	
+	for ( $j=0; $j < count ($t_rows); $j++ ) {
+            # choose color based on status
+            $status_color = get_status_color( $t_rows[$j]['status'] );
+            echo '<tr bgcolor="', $status_color, '" border="1" class="task-row">';
+	    write_bug_row( $t_rows[$j] );
+	    if ( $t_can_reorder ) {
+		print "<td></td>";
+	    }
+	    print "</tr>\n";
+	}
+    
+    }
+ }
+?>
+<tr class="row-category">
+<td colspan=" <?php print $col_count ?> ">
+<?php
+
+print lang_get( 'task_view_unassigned' )." (".sizeof($t_unassigned_rows).")</td>";
+
+   if ( $t_can_reorder && $t_token <= TASK_VIEW_PROJECT_ALL ) {?>
+     <td> <input type="hidden" id="0">
+     <input type="image" class="button" SRC="<?php print $t_icon_Ok;?>" value="Uaktualnij"  name="0" onClick="updateIt(this)" >
+     <input type="image" class="button" SRC="<?php print $t_icon_Cn;?>" value="Uaktualnij"  name="0" onClick="window.location.reload( false ); return false;" ></td>
+<?php #"
+	}
+		
+		for ( $j=0; $j < sizeof( $t_unassigned_rows ); $j++ )
+		{
+		    $t_bug_id = $t_unassigned_rows[$j];
+		    $t_bug_row = bug_cache_row( $t_bug_id );
+                    # choose color based on status
+                    $status_color = get_status_color( $t_bug_row['status'] );
+                    echo '<tr bgcolor="', $status_color, '" border="1">';
+		    write_bug_row ($t_bug_row, false);
+		    if ( $t_can_reorder && $t_token <= TASK_VIEW_PROJECT_ALL ) {
+?>
+		<td align="center">
+		<input type="image" class="button" ALT="<?php print lang_get( 'task_moveTop'  );?>" SRC="<?php print $t_icon_Ft; ?>"value="UP" onClick="moveFirst(this); return false;"/>
+		<input type="image" class="button" ALT="<?php print lang_get( 'task_moveUp'  );?>" SRC="<?php print $t_icon_Up; ?>"value="UP" onClick="moveUp(this); return false;"/>
+		<input type="image" class="button" ALT="<?php print lang_get( 'task_moveDown'  );?>" SRC="<?php print $t_icon_Dn;?>" value="DOWN" onClick="moveDn(this); return false;"/>
+		<input type="image" class="button" ALT="<?php print lang_get( 'task_moveBottom'  );?>" SRC="<?php print $t_icon_Lt;?>" value="DOWN" onClick="moveLast(this); return false;"/>
+		</td>
+<?php #"
+		    }
+		    print "</tr>\n";
+		}
+
+	if ( $t_all_view ) {
+		for ( $j=0; $j < count ($t_unassigned_closed_rows); $j++ ) {
+				$t_bug_row = bug_cache_row( $t_unassigned_closed_rows[$j] );
+            # choose color based on status
+            $status_color = get_status_color( $t_bug_row['status'] );
+            echo '<tr bgcolor="', $status_color, '" border="1" class="task-row">';
+	    		write_bug_row( $t_bug_row );
+	    		if ( $t_can_reorder ) {
+					print "<td></td>";
+	    		}
+	    		print "</tr>\n";
+		} # for
+	} # if 
+
+?>
+<tr class="row-category">
+<td colspan=" <?php print $col_count ?> ">
+<?php
+print lang_get( 'task_view_unconfirmed' )." (".sizeof( $t_unconfirmed_rows ).")</td>";
+
+   if ( $t_can_reorder && $t_token <= TASK_VIEW_PROJECT_ALL ) {?>
+     <td> <input type="hidden" id="-1">
+     <input type="image" class="button" SRC="<?php print $t_icon_Ok;?>" value="Uaktualnij"  name="-1" onClick="updateIt(this)" >
+     <input type="image" class="button" SRC="<?php print $t_icon_Cn;?>" value="Uaktualnij"  name="-1" onClick="window.location.reload( false ); return false;" ></td>
+<?php #"
+	}
+		
+		for ( $j=0; $j < sizeof( $t_unconfirmed_rows ); $j++ )
+		{
+		    $t_bug_id = $t_unconfirmed_rows[$j];
+		    $t_bug_row = bug_cache_row( $t_bug_id );
+                    # choose color based on status
+                    $status_color = get_status_color( $t_bug_row['status'] );
+                    echo '<tr bgcolor="', $status_color, '" border="1">';
+		    write_bug_row ($t_bug_row, false);
+		    if ( $t_can_reorder && $t_token <= TASK_VIEW_PROJECT_ALL ) {
+?>
+		<td align="center">
+		<input type="image" class="button" ALT="<?php print lang_get( 'task_moveTop'  );?>" SRC="<?php print $t_icon_Ft; ?>"value="UP" onClick="moveFirst(this); return false;"/>
+		<input type="image" class="button" ALT="<?php print lang_get( 'task_moveUp'  );?>" SRC="<?php print $t_icon_Up; ?>"value="UP" onClick="moveUp(this); return false;"/>
+		<input type="image" class="button" ALT="<?php print lang_get( 'task_moveDown'  );?>" SRC="<?php print $t_icon_Dn;?>" value="DOWN" onClick="moveDn(this); return false;"/>
+		<input type="image" class="button" ALT="<?php print lang_get( 'task_moveBottom'  );?>" SRC="<?php print $t_icon_Lt;?>" value="DOWN" onClick="moveLast(this); return false;"/>
+		</td>
+<?php #"
+		    }
+		    print "</tr>\n";
+		}
+	if ( $t_all_view ) {
+		for ( $j=0; $j < count ( $t_unconfirmed_closed_rows ); $j++ ) {
+				$t_bug_row = bug_cache_row( $t_unconfirmed_closed_rows[$j] );
+            # choose color based on status
+            $status_color = get_status_color( $t_bug_row['status'] );
+            echo '<tr bgcolor="', $status_color, '" border="1" class="task-row">';
+	    		write_bug_row( $t_bug_row );
+	    		if ( $t_can_reorder ) {
+					print "<td></td>";
+	    		}
+	    		print "</tr>\n";
+		} # for
+	} # if 
+
+
+	# -- ====================== MASS BUG MANIPULATION =================== --
+?>
+	<tr>
+		<td class="left" colspan="<?php echo $col_count-2; ?>">
+<?php
+		if ( $t_checkboxes_exist && ON == config_get( 'use_javascript' ) ) {
+			echo "<input type=\"checkbox\" name=\"all_bugs\" value=\"all\" onclick=\"checkall('bug_action', this.form.all_bugs.checked)\" /><span class=\"small\">" . lang_get( 'select_all' ) . '</span>';
+		}
+
+		if ( $t_checkboxes_exist ) {
+?>
+			<select name="action">
+				<?php print_all_task_action_option_list() ?>
+			</select>
+			<input type="submit" class="button" value="<?php echo lang_get( 'ok' ); ?>" />
+<?php
+		} else {
+			echo '&nbsp;';
+		}
+?>
+
+    </table></form><br>
+    
+<?php
+
+	 $t_status_legend_position = config_get( 'status_legend_position' );
+
+ 
+         if ( $t_status_legend_position == STATUS_LEGEND_POSITION_BOTTOM || $t_status_legend_position == STATUS_LEGEND_POSITION_BOTH ) {
+                 html_status_legend();
+         }
+
+	mark_time( 'end loop' );
+
+
+	html_page_bottom1( __FILE__ );
+?>
+
+
+
+<?php
+        function write_bug_row ( $p_row, $p_no_mass = true )
+        {
+                global $t_columns, $t_filter;
+
+					$t_print_columns = $t_columns;
+					
+                mark_time( 'begin loop' );
+
+                # -- Loop over bug rows --
+
+		{
+                        $t_row = $p_row;
+
+                        foreach( $t_print_columns as $t_column ) {
+                        		  if ( $p_no_mass && $t_column == 'selection' ) {
+                        		  	echo '<td></td>';
+                        		  } else {
+                                $t_column_value_function = 'print_column_value';
+                                helper_call_custom_function( $t_column_value_function, array( $t_column, $t_row ) );
+                                }
+                        }
+
+#                        echo '</tr>';
+                }
+        }
+
+?>
diff -Naur mantis-1.1.1/view_all_bug_page.php mantis/view_all_bug_page.php
--- mantis-1.1.1/view_all_bug_page.php	2007-10-14 00:36:41.000000000 +0200
+++ mantis/view_all_bug_page.php	2008-02-14 12:12:07.000000000 +0100
@@ -24,6 +24,7 @@
 	#
 	# $Id: view_all_bug_page.php,v 1.62.2.1 2007-10-13 22:34:48 giallu Exp $
 	# --------------------------------------------------------
+	
 ?>
 <?php
 	require_once( 'core.php' );
