Permalink
Browse files

Fix #11458: Missing attachments can not be deleted

  • Loading branch information...
1 parent 3d4d79e commit bcfdfff86b4d4e6ffae5a2d02dca7d71a35949f6 @dregad dregad committed Aug 9, 2011
Showing with 129 additions and 8 deletions.
  1. +117 −0 12x
  2. +12 −8 core/print_api.php
View
117 12x
@@ -0,0 +1,117 @@
+<?php
+# MantisBT - a php based bugtracking system
+
+# Customized config_inc.php for Merck Serono Athena Bug Tracking Test environment
+
+# In general the value OFF means the feature is disabled and ON means the
+# feature is enabled. Any other cases will have an explanation.
+
+# Look in http://www.mantisbt.org/docs/ or config_defaults_inc.php for more
+# detailed comments.
+
+
+# --- Database Configuration ---
+$g_hostname = 'localhost';
+$g_db_username = 'mantis_user';
+$g_db_password = 'M4ntisB7';
+$g_database_name = 'mantis_12x';
+$g_db_type = 'mysql';
+
+# --- Anonymous Access / Signup ---
+$g_allow_signup = ON;
+$g_allow_anonymous_login = OFF;
+$g_anonymous_account = '';
+$g_login_method = MD5; # CRYPT or PLAIN or MD5 or LDAP or BASIC_AUTH
+
+# --- LDAP settings ---
+# Global directory (port must be on server, due to bug)
+$g_ldap_server = 'ldap://merckgroup.com:3268/';
+$g_ldap_root_dn = 'dc=merckgroup,dc=com';
+$g_ldap_organization = '';
+$g_ldap_uid_field = 'sAMAccountName';
+$g_ldap_realname_field = 'cn';
+$g_ldap_bind_dn = 'ssvc-oforge@eu.merckgroup.com';
+$g_ldap_bind_passwd = 'm3rck2oo8';
+$g_use_ldap_email = ON;
+$g_use_ldap_realname = ON;
+$g_ldap_protocol_version = 3;
+$g_ldap_follow_referrals = OFF;
+# Should be activated for testing purposes only
+#$g_ldap_simulation_file_path = '/app/mantis/etc/ldap.cfg';
+
+# --- Email Configuration ---
+$g_phpMailer_method = PHPMAILER_METHOD_MAIL; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
+$g_administrator_email = 'damien.regad@merckserono.net';
+$g_webmaster_email = 'Mantis Bug Tracking Admin <damien.regad@merckserono.net>';
+$g_from_name = 'MantisBT release 1.2.x';
+$g_from_email = 'noreply-athenabt@merckserono.net'; # the "From: " field in emails
+$g_return_path_email = ''; # the return address for bounced mail
+$g_email_receive_own = OFF;
+$g_email_send_using_cronjob = OFF;
+$g_allow_blank_email = OFF;
+
+# --- Attachments / File Uploads ---
+$g_allow_file_upload = ON;
+$g_file_upload_method = DISK; # or DISK
+$g_absolute_path_default_upload_folder = '/tmp/attach/'; # used with DISK, must contain trailing \ or /.
+$g_max_file_size = 5000000; # in bytes
+$g_preview_attachments_inline_max_size = 256 * 1024;
+$g_allowed_files = ''; # extensions comma separated, e.g. 'php,html,java,exe,pl'
+$g_disallowed_files = ''; # extensions comma separated
+
+# --- Branding ---
+$g_window_title = 'MantisBT release 1.2.x';
+#$g_logo_image = 'images/AthenaBT.gif';
+#$g_page_title = 'THIS IS THE TEST ENVIRONMENT';
+#$g_favicon_image = 'images/AthenaBTicon.ico';
+
+# --- Real names ---
+$g_show_realname = ON;
+$g_show_user_realname_threshold = REPORTER; # Set to access level (e.g. VIEWER, REPORTER, DEVELOPER, MANAGER, etc)
+$g_show_user_email_threshold = DEVELOPER;
+
+# --- Logging and error checking ---
+# Values below can be OR'ed
+# LOG_NONE or LOG_EMAIL LOG_EMAIL_RECIPIENT LOG_FILTERING LOG_AJAX LOG_LDAP LOG_DATABASE
+$g_log_level = LOG_LDAP | LOG_DATABASE;
+$g_log_destination = 'file:/tmp/mantis.log';
+$g_show_detailed_errors = OFF;
+
+# --- Bug Workflow ---
+$g_status_enum_workflow[NEW_] ='20:feedback,30:acknowledged,40:confirmed,50:assigned,80:resolved';
+$g_status_enum_workflow[FEEDBACK] ='30:acknowledged,40:confirmed,50:assigned,80:resolved';
+$g_status_enum_workflow[ACKNOWLEDGED] ='20:feedback,40:confirmed,50:assigned,80:resolved';
+$g_status_enum_workflow[CONFIRMED] ='20:feedback,50:assigned,80:resolved';
+$g_status_enum_workflow[ASSIGNED] ='20:feedback,80:resolved';
+$g_status_enum_workflow[RESOLVED] ='20:feedback,50:assigned,90:closed';
+$g_status_enum_workflow[CLOSED] ='20:feedback,50:assigned';
+
+
+# --- Others ---
+$g_show_timer = ON;
+$g_default_home_page = 'my_view_page.php'; # Set to name of page to go to after login
+$g_show_priority_text = ON;
+$g_status_percentage_legend = ON;
+$g_default_bugnote_order = 'DESC'; # Most recent notes first
+$g_history_order = 'DESC';
+
+$g_cookie_prefix = 'MANTIS123';
+
+$g_monitor_delete_others_bug_threshold = MANAGER;
+$g_delete_bug_threshold = ADMINISTRATOR;
+$g_roadmap_update_threshold = MANAGER;
+$g_show_version_dates_threshold = NOBODY;
+$g_show_changelog_dates = ON;
+$g_show_roadmap_dates = ON;
+$g_allow_reporter_close = ON;
+
+$g_reauthentication = OFF;
+
+$g_display_errors = array(
+ E_WARNING => 'halt',
+ E_NOTICE => 'warn',
+ E_USER_ERROR => 'halt',
+ E_USER_WARNING => 'warn',
+ E_USER_NOTICE => 'warn'
+);
+
View
@@ -1501,18 +1501,22 @@ function print_bug_attachment_header( $p_attachment ) {
}
echo lang_get( 'word_separator' ) . '(' . number_format( $p_attachment['size'] ) . lang_get( 'word_separator' ) . lang_get( 'bytes' ) . ')';
echo lang_get( 'word_separator' ) . '<span class="italic">' . date( config_get( 'normal_date_format' ), $p_attachment['date_added'] ) . '</span>';
- if ( $p_attachment['can_delete'] ) {
- echo lang_get( 'word_separator' ) . '[';
- print_link( 'bug_file_delete.php?file_id=' . $p_attachment['id'] . form_security_param( 'bug_file_delete' ), lang_get( 'delete_link' ), false, 'small' );
- echo ']';
- }
- if ( config_get( 'file_upload_method' ) == FTP ) {
- echo lang_get( 'word_separator' ) . '(' . lang_get( 'cached' ) . ')';
- }
} else {
print_file_icon( $p_attachment['display_name'] );
echo lang_get( 'word_separator' ) . '<span class="strike">' . string_display_line( $p_attachment['display_name'] ) . '</span>' . lang_get( 'word_separator' ) . '(' . lang_get( 'attachment_missing' ) . ')';
}
+
+ if ( $p_attachment['can_delete'] ) {
+ echo lang_get( 'word_separator' ) . '[';
+ print_link( 'bug_file_delete.php?file_id=' . $p_attachment['id'] . form_security_param( 'bug_file_delete' ), lang_get( 'delete_link' ), false, 'small' );
+ echo ']';
+ }
+
+ if ( $p_attachment['exists'] ) {
+ if ( config_get( 'file_upload_method' ) == FTP ) {
+ echo lang_get( 'word_separator' ) . '(' . lang_get( 'cached' ) . ')';
+ }
+ }
}
/**

0 comments on commit bcfdfff

Please sign in to comment.