diff -r 9bcc185dc151 -r 85f91037cd4f includes/functions.php
--- a/includes/functions.php Tue Jan 29 17:29:08 2008 -0500
+++ b/includes/functions.php Tue Jan 29 23:15:44 2008 -0500
@@ -321,7 +321,11 @@
if ( $timeout == 0 && empty($_POST) )
{
header('Location: ' . $url);
+ header('Content-length: 0');
header('HTTP/1.1 307 Temporary Redirect');
+
+ // with 3xx codes HTTP clients expect a response of 0 bytes, so just die here
+ exit();
}
if ( !is_object($template) )
@@ -330,7 +334,7 @@
$template->load_theme('oxygen', 'bleu', false);
$template->tpl_strings['SITE_NAME'] = 'Enano';
$template->tpl_strings['SITE_DESC'] = 'This site is experiencing a critical error and cannot load.';
- $template->tpl_strings['COPYRIGHT'] = 'Powered by Enano CMS - © 2007 Dan Fuhry. This program is Free Software; see the GPL file included with this package for details.';
+ $template->tpl_strings['COPYRIGHT'] = 'Powered by Enano CMS - © 2006-2008 Dan Fuhry. This program is Free Software; see the GPL file included with this package for details.';
$template->tpl_strings['PAGE_NAME'] = htmlspecialchars($title);
}
@@ -435,10 +439,6 @@
// echo 'Keyname: '.$keylist[$idx] . '
'; flush(); ob_flush(); // Debugger
if($idx < 0) return $arr;
if($keylist[$idx] == '' || $keylist[$idx] < 0 || !$keylist[$idx]) {
- /* echo 'Infinite loop caught in arrayItemTop(
'; - print_r($arr); - echo '
No subcategories. | '; + echo '' . $lang->get('onpage_cat_msg_no_subcategories') . ' | '; } echo '
No subcategories. | '; + echo '' . $lang->get('onpage_cat_msg_no_subcategories') . ' | '; } echo '
No pages in this category. | '; + echo '' . $lang->get('onpage_cat_msg_no_pages') . ' | '; } echo '
' . $lang->get('onpage_filebox_msg_not_found', array('upload_link' => makeUrlNS('Special', 'UploadFile/'.$paths->page_id))) . '
+Type: '.$r['mimetype'].'
Size: ';
- $fs = $r['size'];
- echo $fs.' bytes';
- $fs = (int)$fs;
- if($fs >= 1048576)
+ echo '
' . $lang->get('onpage_filebox_lbl_type') . ' '.$r['mimetype'].'
';
+
+ $size = $r['size'] . ' ' . $lang->get('etc_unit_bytes');
+ if ( $r['size'] >= 1048576 )
+ {
+ $size .= ' (' . ( round($r['size'] / 1048576, 1) ) . ' ' . $lang->get('etc_unit_megabytes_short') . ')';
+ }
+ else if ( $r['size'] >= 1024 )
{
- $fs = round($fs / 1048576, 1);
- echo ' ('.$fs.' MB)';
- } elseif($fs >= 1024) {
- $fs = round($fs / 1024, 1);
- echo ' ('.$fs.' KB)';
+ $size .= ' (' . ( round($r['size'] / 1024, 1) ) . ' ' . $lang->get('etc_unit_kilobytes_short') . ')';
+ }
+
+ echo $lang->get('onpage_filebox_lbl_size', array('size' => $size));
+
+ echo '
' . $lang->get('onpage_filebox_lbl_uploaded') . ' ' . $datestring . '
+ + + +
'; } - if(substr($mimetype, 0, 6)=='image/') - { - echo ''; - } - echo 'Download this file'; + echo '
+ + ' . $lang->get('onpage_filebox_btn_download') . ' + '; if(!$paths->page_protected && ( $paths->wiki_mode || $session->get_permissions('upload_new_version') )) { - echo ' | Upload new version'; + echo ' | + ' . $lang->get('onpage_filebox_btn_upload_new') . ' + '; } echo '
'; - if($db->numrows() > 1) + if ( $db->numrows() > 1 ) { - echo ''; - while($r = $db->fetchrow()) + echo '
';
+ while ( $r = $db->fetchrow() )
{
- echo '(this ver) ';
- if($session->get_permissions('history_rollback'))
- echo ' (revert) ';
+ echo '(' . $lang->get('onpage_filebox_btn_this_version') . ') ';
+ if ( $session->get_permissions('history_rollback') )
+ echo ' (' . $lang->get('onpage_filebox_btn_revert') . ') ';
$mimetype = $r['mimetype'];
$datestring = enano_date('F d, Y h:i a', (int)$r['time_id']);
+
echo $datestring.': '.$r['mimetype'].', ';
+
$fs = $r['size'];
$fs = (int)$fs;
+
if($fs >= 1048576)
{
$fs = round($fs / 1048576, 1);
- echo ' '.$fs.' MB';
- } elseif($fs >= 1024) {
+ $size = $fs . ' ' . $lang->get('etc_unit_megabytes_short');
+ }
+ else
+ if ( $fs >= 1024 )
+ {
$fs = round($fs / 1024, 1);
- echo ' '.$fs.' KB';
- } else {
- echo ' '.$fs.' bytes';
+ $size = $fs . ' ' . $lang->get('etc_unit_kilobytes_short');
}
+ else
+ {
+ $size = $fs . ' ' . $lang->get('etc_unit_bytes');
+ }
+
+ echo $size;
+
echo '
';
}
echo '
You must supply a password to access this page.
Uploaded file
There are no files uploaded with this name yet. Upload a file...