Browse Source

Attachments list can (and should) use comma_format and timeformat

Signed-off-by: emanuele <[email protected]>
emanuele 12 years ago
parent
commit
1c7de3c836
2 changed files with 5 additions and 6 deletions
  1. 2 5
      Sources/ManageAttachments.php
  2. 3 1
      Sources/Profile-View.php

+ 2 - 5
Sources/ManageAttachments.php

@@ -408,11 +408,8 @@ function BrowseFiles()
 					'value' => $txt['downloads'],
 					'value' => $txt['downloads'],
 				),
 				),
 				'data' => array(
 				'data' => array(
-					'function' => create_function('$rowData','
-						global $txt;
-
-						return comma_format($rowData[\'downloads\']);
-					'),
+					'db' => 'downloads',
+					'comma_format' => true,
 				),
 				),
 				'sort' => array(
 				'sort' => array(
 					'default' => 'a.downloads',
 					'default' => 'a.downloads',

+ 3 - 1
Sources/Profile-View.php

@@ -576,6 +576,7 @@ function showAttachments($memID)
 				),
 				),
 				'data' => array(
 				'data' => array(
 					'db' => 'downloads',
 					'db' => 'downloads',
+					'comma_format' => true,
 				),
 				),
 				'sort' => array(
 				'sort' => array(
 					'default' => 'a.downloads',
 					'default' => 'a.downloads',
@@ -603,6 +604,7 @@ function showAttachments($memID)
 				),
 				),
 				'data' => array(
 				'data' => array(
 					'db' => 'posted',
 					'db' => 'posted',
+					'timeformat' => true,
 				),
 				),
 			),
 			),
 		),
 		),
@@ -651,7 +653,7 @@ function list_getAttachments($start, $items_per_page, $sort, $boardsAllowed, $me
 			'filename' => $row['filename'],
 			'filename' => $row['filename'],
 			'downloads' => $row['downloads'],
 			'downloads' => $row['downloads'],
 			'subject' => censorText($row['subject']),
 			'subject' => censorText($row['subject']),
-			'posted' => timeformat($row['poster_time']),
+			'posted' => $row['poster_time'],
 			'msg' => $row['id_msg'],
 			'msg' => $row['id_msg'],
 			'topic' => $row['id_topic'],
 			'topic' => $row['id_topic'],
 			'board' => $row['id_board'],
 			'board' => $row['id_board'],