[TEP-COMMIT] [CVS admin] display the maximum file upload size allowed next to the file input form
anonymous-OfajU3CKLf1/[email protected] 3 Aug 2004 11:00:30 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit in admin/admin/includes on MAIN
functions/html_output.php +21 -1 1.31 -> 1.32
languages/english.php +2 1.114 -> 1.115
/espanol.php +2 1.109 -> 1.110
/german.php +2 1.108 -> 1.109
+27 -1
4 modified files
display the maximum file upload size allowed next to the file input form
field
----------
admin /admin /includes /functions
html_output.php 1.31 -> 1.32
diff -u -r1.31 -r1.32
--- html_output.php 2004/07/22 23:12:58 1.31
+++ html_output.php 2004/08/03 11:00:28 1.32
@@ -5,7 +5,7 @@
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
- Copyright (c) 2003 osCommerce
+ Copyright (c) 2004 osCommerce
Released under the GNU General Public License
*/
@@ -206,6 +206,26 @@
// Output a form filefield
function tep_draw_file_field($name, $required = false) {
$field = tep_draw_input_field($name, '', '', $required, 'file');
+
+ return $field;
+ }
+
+ function osc_draw_file_field($name, $max_size = true, $required = false) {
+ static $upload_max_filesize;
+
+ $field = osc_draw_input_field($name, '', '', $required, 'file');
+
+ if (is_bool($max_size) && ($max_size === true)) {
+ if (!isset($upload_max_filesize)) {
+ $upload_max_filesize = @ini_get('upload_max_filesize');
+ }
+
+ $max_size = $upload_max_filesize;
+ }
+
+ if (!empty($max_size)) {
+ $field .= ' ' . sprintf(MAXIMUM_FILE_UPLOAD_SIZE, tep_output_string($max_size));
+ }
return $field;
}
----------
admin /admin /includes /languages
english.php 1.114 -> 1.115
diff -u -r1.114 -r1.115
--- english.php 2004/07/22 23:17:19 1.114
+++ english.php 2004/08/03 11:00:28 1.115
@@ -302,4 +302,6 @@
define('SUCCESS_DB_ROWS_UPDATED', 'Success: Entry successfully updated!');
define('WARNING_DB_ROWS_NOT_UPDATED', 'Warning: Entry not updated due to the data content being the same.');
define('ERROR_DB_ROWS_NOT_UPDATED', 'Error: Entry not updated due to an error.');
+
+define('MAXIMUM_FILE_UPLOAD_SIZE', '(Max: %s)');
?>
----------
admin /admin /includes /languages
espanol.php 1.109 -> 1.110
diff -u -r1.109 -r1.110
--- espanol.php 2004/07/22 23:18:41 1.109
+++ espanol.php 2004/08/03 11:00:28 1.110
@@ -302,4 +302,6 @@
define('SUCCESS_DB_ROWS_UPDATED', 'Success: Entry successfully updated!');
define('WARNING_DB_ROWS_NOT_UPDATED', 'Warning: Entry not updated due to the data content being the same.');
define('ERROR_DB_ROWS_NOT_UPDATED', 'Error: Entry not updated due to an error.');
+
+define('MAXIMUM_FILE_UPLOAD_SIZE', '(Max: %s)');
?>
----------
admin /admin /includes /languages
german.php 1.108 -> 1.109
diff -u -r1.108 -r1.109
--- german.php 2004/07/22 23:19:56 1.108
+++ german.php 2004/08/03 11:00:29 1.109
@@ -302,4 +302,6 @@
define('SUCCESS_DB_ROWS_UPDATED', 'Success: Entry successfully updated!');
define('WARNING_DB_ROWS_NOT_UPDATED', 'Warning: Entry not updated due to the data content being the same.');
define('ERROR_DB_ROWS_NOT_UPDATED', 'Error: Entry not updated due to an error.');
+
+define('MAXIMUM_FILE_UPLOAD_SIZE', '(Max: %s)');
?>
CVSspam 0.2.8
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com