logo       
Google Custom Search
    AddThis Social Bookmark Button

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

mantisbt bug_file_upload_inc.php,1.35,1.36 bug_report_page.php,1.46,1.47 bu: msg#00084

Subject: mantisbt bug_file_upload_inc.php,1.35,1.36 bug_report_page.php,1.46,1.47 bug_report_advanced_page.php,1.44,1.45
Update of /cvsroot/mantisbt/mantisbt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21243

Modified Files:
        bug_file_upload_inc.php bug_report_page.php 
        bug_report_advanced_page.php 
Log Message:
fix for  0004749: Uploading large files fails & slogs Apache
added checks in admin/check.php to explain the other settings that may be 
required
added filesize limit to all places where bug files are uploaded
added calculation to limit upload size if PHP inis are set lower than our limit


Index: bug_file_upload_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_file_upload_inc.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- bug_file_upload_inc.php     29 Jun 2004 08:38:42 -0000      1.35
+++ bug_file_upload_inc.php     24 Oct 2004 19:04:36 -0000      1.36
@@ -21,7 +21,7 @@
                return false;
        }
 
-       $t_max_file_size = (int)config_get( 'max_file_size' );
+       $t_max_file_size = (int)min( ini_get_number( 'upload_max_filesize' ), 
ini_get_number( 'post_max_size' ), config_get( 'max_file_size' ) );
 ?>
 <br />
 
@@ -54,7 +54,7 @@
 <tr class="row-1">
        <td class="category" width="15%">
                <?php echo lang_get( 'select_file' ) ?><br />
-               <?php echo '(' . lang_get( 'max_file_size' ) . ': ' . 
number_format( $t_max_file_size/1000 ) . 'k)'?>
+               <?php echo '<span class="small">(' . lang_get( 'max_file_size' 
) . ': ' . number_format( $t_max_file_size/1000 ) . 'k)</span>'?>
        </td>
        <td width="85%">
                <input type="hidden" name="bug_id" value="<?php echo $f_bug_id 
?>" />

Index: bug_report_advanced_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_report_advanced_page.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- bug_report_advanced_page.php        5 Oct 2004 21:12:41 -0000       1.44
+++ bug_report_advanced_page.php        24 Oct 2004 19:04:36 -0000      1.45
@@ -386,13 +386,16 @@
 
 
 <!-- File Upload (if enabled) -->
-<?php if ( file_allow_bug_upload() ) { ?>
+<?php if ( file_allow_bug_upload() ) { 
+       $t_max_file_size = (int)min( ini_get_number( 'upload_max_filesize' ), 
ini_get_number( 'post_max_size' ), config_get( 'max_file_size' ) );
+?>
 <tr <?php echo helper_alternate_class() ?>>
        <td class="category">
                <?php echo lang_get( 'upload_file' ) ?>
+               <?php echo '<span class="small">(' . lang_get( 'max_file_size' 
) . ': ' . number_format( $t_max_file_size/1000 ) . 'k)</span>'?>
        </td>
        <td>
-               <input type="hidden" name="max_file_size" value="<?php echo 
config_get( 'max_file_size' ) ?>" />
+               <input type="hidden" name="max_file_size" value="<?php echo 
$t_max_file_size ?>" />
                <input tabindex="16" name="file" type="file" size="60" />
        </td>
 </tr>

Index: bug_report_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_report_page.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- bug_report_page.php 5 Oct 2004 21:12:41 -0000       1.46
+++ bug_report_page.php 24 Oct 2004 19:04:36 -0000      1.47
@@ -272,13 +272,16 @@
 
 
 <!-- File Upload (if enabled) -->
-<?php if ( file_allow_bug_upload() ) { ?>
+<?php if ( file_allow_bug_upload() ) { 
+       $t_max_file_size = (int)min( ini_get_number( 'upload_max_filesize' ), 
ini_get_number( 'post_max_size' ), config_get( 'max_file_size' ) );
+?>
 <tr <?php echo helper_alternate_class() ?>>
        <td class="category">
                <?php echo lang_get( 'upload_file' ) ?>
+               <?php echo '<span class="small">(' . lang_get( 'max_file_size' 
) . ': ' . number_format( $t_max_file_size/1000 ) . 'k)</span>'?>
        </td>
        <td>
-               <input type="hidden" name="max_file_size" value="<?php echo 
config_get( 'max_file_size' ) ?>" />
+               <input type="hidden" name="max_file_size" value="<?php 
$t_max_file_size ?>" />
                <input tabindex="8" name="file" type="file" size="60" />
        </td>
 </tr>



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>