diff -r 94af07c8f2f3 -r 88c954d2846c plugins/gallery/upload.php --- a/plugins/gallery/upload.php Wed Jul 25 16:43:47 2007 -0400 +++ b/plugins/gallery/upload.php Wed Jul 25 18:15:14 2007 -0400 @@ -41,6 +41,26 @@ $template->add_header(''); $template->add_header(''); + $max_size = @ini_get('upload_max_filesize'); + $max_size_field = ''; + if ( $max_size ) + { + if ( preg_match('/M$/i', $max_size) ) + { + $max_size = intval($max_size) * 1048576; + } + else if ( preg_match('/K$/i', $max_size) ) + { + $max_size = intval($max_size) * 1024; + } + else if ( preg_match('/G$/i', $max_size) ) + { + $max_size = intval($max_size) * 1048576 * 1024; + } + $max_size = intval($max_size); + $max_size_field = "\n" . '' . "\n"; + } + if ( isset($_GET['edit_img']) ) { $edit_parms = $_GET['edit_img']; @@ -284,6 +304,8 @@ echo '