View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003266 | mantisbt | bugtracker | public | 2003-08-06 22:26 | 2004-07-07 18:21 |
| Reporter | grangeway | Assigned To | vboctor | ||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Fixed in Version | 0.19.0a1 | ||||
| Summary | 0003266: possible patches against cvs head | ||||
| Description | as commented on previously on irc. | ||||
| Tags | No tags attached. | ||||
| Attached Files | patch1.txt (4,491 bytes)
Index: csv_export.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/csv_export.php,v
retrieving revision 1.14
diff -r1.14 csv_export.php
25a26,31
> # Send headers to browser to active mime loading
> header( 'Content-Type: text/plain; name=' . config_get( 'page_title' ) . '.csv' );
> header( 'Content-Transfer-Encoding: BASE64;' );
> header( 'Content-Disposition: attachment; filename=' . config_get( 'page_title' ) . '.csv' );
>
>
57,61d62
<
< # Send headers to browser to active mime loading
< header( 'Content-Type: text/plain; name=' . config_get( 'page_title' ) . '.csv' );
< header( 'Content-Transfer-Encoding: BASE64;' );
< header( 'Content-Disposition: attachment; filename=' . config_get( 'page_title' ) . '.csv' );
Index: proj_doc_add_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/proj_doc_add_page.php,v
retrieving revision 1.24
diff -r1.24 proj_doc_add_page.php
54c54
< <?php echo lang_get( 'select_file' ) ?>
---
> <span class="required">*</span><?php echo lang_get( 'select_file' ) ?>
57d56
< <input type="hidden" name="max_file_size" value="<?php echo $g_max_file_size ?>" />
Index: core/error_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/error_api.php,v
retrieving revision 1.25
diff -r1.25 error_api.php
98c99,102
< ob_end_clean();
---
>
> if ( ob_get_length() ) {
> ob_end_clean();
> }
206,208c210,219
< for ( $i = 0 ; $i < sizeof( $t_stack ) ; $i = $i + 1 ) {
< echo '<tr ' . helper_alternate_class( $i ) . '"><td>' . htmlentities( $t_stack[$i] ) . '</td></tr>';
< }
---
> foreach ( $t_stack as $t_frame ) {
> echo '<tr ' . helper_alternate_class() . '">';
> echo '<td>' . htmlentities( $t_frame['file'] ) . "</td><td>$t_frame[line]</td><td>$t_frame[function]</td>";
>
> $t_args = array();
> if ( isset( $t_frame['params'] ) ) {
> foreach( $t_frame['params'] as $t_value ) {
> $t_args[] = error_build_parameter_string( $t_value );
> }
> }
209a221,222
> echo '<td>( ' . htmlentities( implode( $t_args, ', ' ) ) . ' )</td></tr>';
> }
Index: db_generate.sql
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/sql/db_generate.sql,v
retrieving revision 1.14
diff -r1.14 db_generate.sql
705,706c705
< INSERT INTO mantis_user_table VALUES (1,'administrator','admin','63a9f0ea7bb98050796b649e85481845','2003-02-16 02:03:48','2003-02-16 02:36:38',1,1,90,3,'MN91uSF/JIhos8bcda8acc2ead8d60749ad019e56b54fadkPGTyoBgNBQf91563');
<
---
> INSERT INTO mantis_user_table VALUES (1,'administrator','admin','63a9f0ea7bb98050796b649e85481845','2003-02-16 02:03:48','2003-02-16 02:36:38',1,1,90,3,CONCAT(MD5(DATABASE()),MD5(NOW())));
Index: core/constant_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/constant_inc.php,v
retrieving revision 1.6
diff -r1.6 constant_inc.php
229a230,232
> # ERROR_EMAIL_*
> define( 'ERROR_EMAIL_NOT_SENT', 1602 );
>
Index: core/email_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/email_api.php,v
retrieving revision 1.59
diff -r1.59 email_api.php
671,673c671
< PRINT "PROBLEMS SENDING MAIL TO: $t_recipient<br />";
< PRINT 'Mailer Error: '.$mail->ErrorInfo.'<br />';
< exit;
---
> trigger_error( ERROR_EMAIL_NOT_SENT, ERROR );
708c706
< $result = mail( $t_recipient, $t_subject, $t_message, $t_headers );
---
> $result = @mail( $t_recipient, $t_subject, $t_message, $t_headers );
710,715c708
< PRINT "PROBLEMS SENDING MAIL TO: $t_recipient<br />";
< PRINT htmlspecialchars($t_recipient).'<br />';
< PRINT htmlspecialchars($t_subject).'<br />';
< PRINT nl2br(htmlspecialchars($t_headers)).'<br />';
< PRINT nl2br(htmlspecialchars($t_message)).'<br />';
< exit;
---
> trigger_error( ERROR_EMAIL_NOT_SENT, ERROR );
Index: lang/strings_english.txt
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/lang/strings_english.txt,v
retrieving revision 1.138
diff -r1.138 strings_english.txt
201a202
> $MANTIS_ERROR[ERROR_EMAIL_NOT_SENT] = 'Unable to send mail.';
| ||||
|
Can please update the description or add a bug note to explain what does this patch achieve. |
|
|
how'd I know that was coming :)
|
|
|
Following parts of the patch were applied:
|
|
|
doh, hmm, i have a slightly different version at home to that patch - can you also apply: Index: error_api.phpRCS file: /cvsroot/mantisbt/mantisbt/core/error_api.php,v
|
|
|
Any remove a couple of notices: RCS file: /cvsroot/mantisbt/mantisbt/login_page.php,v
|
|
|
I just committed the following fixes:
Thanks! |
|
|
The following code should be added again to proj_doc_add_page.php. This is used by the browser/webserver to specify the max file size, it is not handled by Mantis code. For more details see the article below and the associated comment: |
|
|
ahh, it was changed from g to t :) |
|
|
most of this was applied already |
|