diff -r facff435cdaa -r 95d0d8596c87 includes/namespaces/file.php --- a/includes/namespaces/file.php Wed Apr 15 14:23:48 2009 -0400 +++ b/includes/namespaces/file.php Wed Apr 15 16:20:33 2009 -0400 @@ -38,6 +38,8 @@ global $db, $session, $paths, $template, $plugins; // Common objects global $lang; + require_once(ENANO_ROOT . '/includes/log.php'); + $local_page_id = $this->page_id; $local_namespace = $this->namespace; $html = ''; @@ -128,9 +130,15 @@ if ( !$q ) $db->_die(); + $log = new LogDisplay(); + $log->add_criterion('page', $paths->nslist['File'] . $this->page_id); + $log->add_criterion('action', 'reupload'); + $data = $log->get_data(); + $i = -1; + $html .= '

' . $lang->get('onpage_filebox_heading_history') . '

'; $last_rollback_id = false; - while ( $r = $db->fetchrow() ) + while ( $r = $db->fetchrow($q) ) { $html .= '(' . $lang->get('onpage_filebox_btn_this_version') . ') '; if ( $session->get_permissions('history_rollback') && $last_rollback_id ) @@ -138,10 +146,8 @@ else if ( $session->get_permissions('history_rollback') && !$last_rollback_id ) $html .= ' (' . $lang->get('onpage_filebox_btn_current') . ') '; $last_rollback_id = $r['log_id']; - $mimetype = $r['mimetype']; - $datestring = enano_date('F d, Y h:i a', (int)$r['time_id']); - $html .= $datestring.': '.$r['mimetype'].', '; + $html .= $r['mimetype'].', '; $fs = $r['size']; $fs = (int)$fs; @@ -163,6 +169,8 @@ } $html .= $size; + if ( isset($data[++$i]) ) + $html .= ': ' . LogDisplay::render_row($data[$i], false, false); $html .= '
'; }