aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file/views/default')
-rw-r--r--mod/file/views/default/icon/object/file.php11
-rw-r--r--mod/file/views/default/object/file.php1
2 files changed, 9 insertions, 3 deletions
diff --git a/mod/file/views/default/icon/object/file.php b/mod/file/views/default/icon/object/file.php
index ff729da94..a3190310b 100644
--- a/mod/file/views/default/icon/object/file.php
+++ b/mod/file/views/default/icon/object/file.php
@@ -5,7 +5,8 @@
* @uses $vars['entity'] The entity the icon represents - uses getIconURL() method
* @uses $vars['size'] topbar, tiny, small, medium (default), large, master
* @uses $vars['href'] Optional override for link
- * @uses $vars['link_class'] Optional CSS class added to img
+ * @uses $vars['img_class'] Optional CSS class added to img
+ * @uses $vars['link_class'] Optional CSS class added to link
*/
$entity = $vars['entity'];
@@ -17,6 +18,7 @@ if (!in_array($vars['size'], $sizes)) {
}
$title = $entity->title;
+$title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8', false);
$url = $entity->getURL();
if (isset($vars['href'])) {
@@ -24,8 +26,13 @@ if (isset($vars['href'])) {
}
$class = '';
+if (isset($vars['img_class'])) {
+ $class = $vars['img_class'];
+}
if ($entity->thumbnail) {
- $class = 'class="elgg-photo"';
+ $class = "class=\"elgg-photo $class\"";
+} else if ($class) {
+ $class = "class=\"$class\"";
}
$img_src = $entity->getIconURL($vars['size']);
diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php
index 81421133f..1db9863c9 100644
--- a/mod/file/views/default/object/file.php
+++ b/mod/file/views/default/object/file.php
@@ -69,7 +69,6 @@ if ($full && !elgg_in_context('gallery')) {
$params = array(
'entity' => $file,
- 'title' => false,
'metadata' => $metadata,
'subtitle' => $subtitle,
'tags' => $tags,