diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 097185731d..5df5c227f5 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -804,7 +804,7 @@ class user extends session
$db->sql_freeresult($result);
}
- function img($img, $alt = '', $width = false, $suffix = '')
+ function img($img, $alt = '', $width = false, $suffix = '', $type = 'full_tag')
{
static $imgs;
global $phpbb_root_path;
@@ -832,15 +832,31 @@ class user extends session
$imgsrc = str_replace('{SUFFIX}', $suffix, $imgsrc);
}
- $imgsrc = '"' . $phpbb_root_path . 'styles/' . $this->theme['primary']['imageset_path'] . '/imageset/' . str_replace('{LANG}', $this->img_lang, $imgsrc) . '"';
- $width = ($width) ? ' width="' . $width . '"' : '';
- $height = ($height) ? ' height="' . $height . '"' : '';
-
- $imgs[$img . $suffix] = $imgsrc . $width . $height;
+ $imgs[$img . $suffix]['src'] = $phpbb_root_path . 'styles/' . $this->theme['primary']['imageset_path'] . '/imageset/' . str_replace('{LANG}', $this->img_lang, $imgsrc);
+ $imgs[$img . $suffix]['width'] = $width;
+ $imgs[$img . $suffix]['height'] = ($height) ? ' height="' . $height . '"' : '';
}
$alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt;
- return '
';
+
+ switch ($type)
+ {
+ case 'src':
+ return $imgs[$img . $suffix]['src'];
+ break;
+
+ case 'width':
+ return $imgs[$img . $suffix]['width'];
+ break;
+
+ case 'height':
+ return $imgs[$img . $suffix]['height'];
+ break;
+
+ default:
+ return '
';
+ break;
+ }
}
// Start code for checking/setting option bit field for user table
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index b6e98a0892..0a5783aad0 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -375,7 +375,7 @@ $lang += array(
'TOPIC_MOVED' => 'Moved Topic',
'TOPIC_TITLE' => 'Topic Title',
'TOPIC_UNAPPROVED' => 'This topic has not been approved',
- 'TOTAL_ATTACHMENTS' => '%d Attachments',
+ 'TOTAL_ATTACHMENTS' => 'Attachment(s)',
'TOTAL_NO_PM' => '0 private messages in total',
'TOTAL_PM' => '1 private messages in total',
'TOTAL_PMS' => '$d private messages in total',
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 075719393c..1ea022dc00 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -446,10 +446,11 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16)
'LAST_POST_IMG' => $user->img('icon_post_latest', 'VIEW_LATEST_POST'),
'NEWEST_POST_IMG' => $newest_post_img,
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
+ 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
- 'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', sprintf($user->lang['TOTAL_ATTACHMENTS'], $row['topic_attachment'])) : '',
+ 'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
'S_TOPIC_TYPE' => $row['topic_type'],
'S_USER_POSTED' => (!empty($row['mark_type'])) ? true : false,