From faf35b951aa039c328e5b5ffb653067e06238c2c Mon Sep 17 00:00:00 2001
From: Cash Costello
Date: Wed, 14 Sep 2011 22:06:06 -0400
Subject: Fixes #3742 not including the hover menu on the personal
notifications page
---
views/default/icon/user/default.php | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'views/default/icon')
diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php
index 6f5c6e2da..2970f1858 100644
--- a/views/default/icon/user/default.php
+++ b/views/default/icon/user/default.php
@@ -37,6 +37,10 @@ if (!$icontime) {
$js = elgg_extract('js', $vars, '');
$hover = elgg_extract('hover', $vars, true);
+if (isset($vars['override'])) {
+ elgg_deprecated_notice("Use 'hover' rather than 'override' with user avatars", 1.8);
+ $hover = false;
+}
$spacer_url = elgg_get_site_url() . '_graphics/spacer.gif';
--
cgit v1.2.3
From 1a44b71e0cd65a009c0fb54ca11825b75528a327 Mon Sep 17 00:00:00 2001
From: Brett Profitt
Date: Wed, 28 Sep 2011 22:25:24 -0700
Subject: Fixes #3879. Removed some instances of deprecated views / functions.
---
mod/groups/views/default/groups/invitationrequests.php | 2 +-
mod/groups/views/default/groups/membershiprequests.php | 2 +-
mod/profile/views/default/profile/owner_block.php | 2 +-
views/default/core/avatar/upload.php | 2 +-
views/default/forms/avatar/crop.php | 2 +-
views/default/icon/user/default.php | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
(limited to 'views/default/icon')
diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php
index 788788324..9c2df8b9c 100644
--- a/mod/groups/views/default/groups/invitationrequests.php
+++ b/mod/groups/views/default/groups/invitationrequests.php
@@ -10,7 +10,7 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) {
echo '';
foreach ($vars['invitations'] as $group) {
if ($group instanceof ElggGroup) {
- $icon = elgg_view_entity_icon($group, 'tiny', array('override' => 'true'));
+ $icon = elgg_view_entity_icon($group, 'tiny', array('hover' => 'true'));
$group_title = elgg_view('output/url', array(
'href' => $group->getURL(),
diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php
index 4d1c78c8c..7f33b83e0 100644
--- a/mod/groups/views/default/groups/membershiprequests.php
+++ b/mod/groups/views/default/groups/membershiprequests.php
@@ -11,7 +11,7 @@ if (!empty($vars['requests']) && is_array($vars['requests'])) {
echo '';
foreach ($vars['requests'] as $user) {
if ($user instanceof ElggUser) {
- $icon = elgg_view_entity_icon($user, 'tiny', array('override' => 'true'));
+ $icon = elgg_view_entity_icon($user, 'tiny', array('hover' => 'true'));
$user_title = elgg_view('output/url', array(
'href' => $user->getURL(),
diff --git a/mod/profile/views/default/profile/owner_block.php b/mod/profile/views/default/profile/owner_block.php
index 5a65a3a26..05cb41a14 100644
--- a/mod/profile/views/default/profile/owner_block.php
+++ b/mod/profile/views/default/profile/owner_block.php
@@ -11,7 +11,7 @@ if (!$user) {
return TRUE;
}
-$icon = elgg_view_entity_icon($user, 'large', array('override' => 'true'));
+$icon = elgg_view_entity_icon($user, 'large', array('hover' => 'true'));
// grab the actions and admin menu items from user hover
$menu = elgg_trigger_plugin_hook('register', "menu:user_hover", array('entity' => $user), array());
diff --git a/views/default/core/avatar/upload.php b/views/default/core/avatar/upload.php
index 6887eab5c..11902cf4a 100644
--- a/views/default/core/avatar/upload.php
+++ b/views/default/core/avatar/upload.php
@@ -5,7 +5,7 @@
* @uses $vars['entity']
*/
-$user_avatar = $vars['entity']->getIcon('medium');
+$user_avatar = $vars['entity']->getIconUrl('medium');
$current_label = elgg_echo('avatar:current');
diff --git a/views/default/forms/avatar/crop.php b/views/default/forms/avatar/crop.php
index dc5e3d77f..9fcae25c4 100644
--- a/views/default/forms/avatar/crop.php
+++ b/views/default/forms/avatar/crop.php
@@ -5,7 +5,7 @@
* @uses $vars['entity']
*/
-$master_image = $vars['entity']->getIcon('master');
+$master_image = $vars['entity']->getIconUrl('master');
?>
diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php
index 2970f1858..aca03521f 100644
--- a/views/default/icon/user/default.php
+++ b/views/default/icon/user/default.php
@@ -38,7 +38,7 @@ $js = elgg_extract('js', $vars, '');
$hover = elgg_extract('hover', $vars, true);
if (isset($vars['override'])) {
- elgg_deprecated_notice("Use 'hover' rather than 'override' with user avatars", 1.8);
+ elgg_deprecated_notice("Use 'hover' rather than 'override' with user avatars", 1.8, 5);
$hover = false;
}
--
cgit v1.2.3
From 9d5c00c78c0666a31485d870a1e657d4557b23c4 Mon Sep 17 00:00:00 2001
From: cash
Date: Mon, 3 Oct 2011 21:56:14 -0400
Subject: using better insert class
---
mod/embed/README.txt | 2 +-
mod/embed/views/default/embed/item.php | 2 +-
mod/embed/views/default/js/embed/embed.php | 2 +-
mod/file/views/default/icon/object/file.php | 15 ++++++++++-----
views/default/icon/default.php | 5 ++++-
5 files changed, 17 insertions(+), 9 deletions(-)
(limited to 'views/default/icon')
diff --git a/mod/embed/README.txt b/mod/embed/README.txt
index cecee08c0..51b120d96 100644
--- a/mod/embed/README.txt
+++ b/mod/embed/README.txt
@@ -53,7 +53,7 @@ CONTENTS:
rendered.
If creating a custom list, the - elements must have a class of .embed-item.
- The HTML content that is inserted must use the class .elgg-image.
+ The HTML content that is inserted must use the class .embed-insert.
4. Populating an Upload Tab
diff --git a/mod/embed/views/default/embed/item.php b/mod/embed/views/default/embed/item.php
index 4087b7408..3060de879 100644
--- a/mod/embed/views/default/embed/item.php
+++ b/mod/embed/views/default/embed/item.php
@@ -34,6 +34,6 @@ $params = array(
);
$body = elgg_view('object/elements/summary', $params);
-$image = elgg_view_entity_icon($entity, 'small');
+$image = elgg_view_entity_icon($entity, 'small', array('link_class' => 'embed-insert'));
echo elgg_view_image_block($image, $body);
diff --git a/mod/embed/views/default/js/embed/embed.php b/mod/embed/views/default/js/embed/embed.php
index bb80919a9..3126e12f7 100644
--- a/mod/embed/views/default/js/embed/embed.php
+++ b/mod/embed/views/default/js/embed/embed.php
@@ -34,7 +34,7 @@ elgg.embed.insert = function(event) {
var textArea = $('#' + textAreaId);
// generalize this based on a css class attached to what should be inserted
- var content = ' ' + $(this).find(".elgg-image").html() + ' ';
+ var content = ' ' + $(this).find(".embed-insert").parent().html() + ' ';
textArea.val(textArea.val() + content);
textArea.focus();
diff --git a/mod/file/views/default/icon/object/file.php b/mod/file/views/default/icon/object/file.php
index 6357d418f..7feba7af3 100644
--- a/mod/file/views/default/icon/object/file.php
+++ b/mod/file/views/default/icon/object/file.php
@@ -2,9 +2,10 @@
/**
* File icon view
*
- * @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['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
*/
$entity = $vars['entity'];
@@ -32,10 +33,14 @@ $img_src = elgg_format_url($img_src);
$img = "";
if ($url) {
- echo elgg_view('output/url', array(
+ $params = array(
'href' => $url,
'text' => $img,
- ));
+ );
+ if (isset($vars['link_class'])) {
+ $params['class'] = $vars['link_class'];
+ }
+ echo elgg_view('output/url', $params);
} else {
echo $img;
}
diff --git a/views/default/icon/default.php b/views/default/icon/default.php
index c5749ba04..3abd96b96 100644
--- a/views/default/icon/default.php
+++ b/views/default/icon/default.php
@@ -8,6 +8,7 @@
* @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['img_class'] Optional CSS class added to img
*/
$entity = $vars['entity'];
@@ -18,6 +19,8 @@ if (!in_array($vars['size'], $sizes)) {
$vars['size'] = "medium";
}
+$class = elgg_extract('img_class', $vars, '');
+
if (isset($entity->name)) {
$title = $entity->name;
} else {
@@ -30,7 +33,7 @@ if (isset($vars['href'])) {
}
$img_src = $entity->getIconURL($vars['size']);
-$img = "";
+$img = "";
if ($url) {
echo elgg_view('output/url', array(
--
cgit v1.2.3
From d5f0d44d4ddf33db2248ef0bdd44633d57c31683 Mon Sep 17 00:00:00 2001
From: Cash Costello
Date: Sat, 8 Oct 2011 08:22:08 -0400
Subject: Fixes #3411 output/url now has a is_trusted parameter - defaults to
false
---
engine/classes/ElggMenuItem.php | 4 +++
mod/blog/views/default/blog/group_module.php | 2 ++
mod/blog/views/default/blog/sidebar/revisions.php | 6 ++--
mod/blog/views/default/object/blog.php | 2 ++
mod/blog/views/default/widgets/blog/content.php | 1 +
.../views/default/bookmarks/group_module.php | 2 ++
mod/bookmarks/views/default/object/bookmarks.php | 9 +++---
.../views/default/widgets/bookmarks/content.php | 1 +
.../views/default/theme_preview/general.php | 1 +
.../admin/develop_utilities/diagnostics.php | 1 +
mod/file/views/default/file/group_module.php | 2 ++
mod/file/views/default/icon/object/file.php | 1 +
mod/file/views/default/object/file.php | 2 ++
.../views/default/widgets/filerepo/content.php | 1 +
.../views/default/discussion/group_module.php | 2 ++
.../views/default/groups/invitationrequests.php | 2 ++
.../views/default/groups/membershiprequests.php | 2 ++
.../default/groups/profile/activity_module.php | 1 +
.../views/default/groups/profile/summary.php | 1 +
.../views/default/groups/sidebar/members.php | 1 +
.../views/default/object/groupforumtopic.php | 2 ++
.../default/widgets/a_users_groups/content.php | 1 +
mod/likes/views/default/annotation/likes.php | 1 +
mod/likes/views/default/likes/button.php | 2 ++
mod/logbrowser/views/default/logbrowser/table.php | 9 ++++--
.../views/default/widgets/messageboard/content.php | 1 +
mod/messages/views/default/object/messages.php | 3 ++
mod/pages/views/default/annotation/page.php | 2 ++
mod/pages/views/default/object/page_top.php | 2 ++
mod/pages/views/default/pages/group_module.php | 2 ++
mod/pages/views/default/widgets/pages/content.php | 1 +
.../views/default/object/reported_content.php | 8 ++++--
mod/thewire/views/default/object/thewire.php | 1 +
.../views/default/river/object/thewire/create.php | 2 ++
.../views/default/thewire/profile_status.php | 1 +
.../views/default/widgets/thewire/content.php | 1 +
.../forms/twitter_api/interstitial_settings.php | 1 +
.../forms/uservalidationbyemail/bulk_action.php | 21 ++++++++------
views/default/admin/appearance/default_widgets.php | 1 +
.../admin/appearance/profile_fields/list.php | 3 +-
views/default/admin/header.php | 2 ++
views/default/icon/default.php | 1 +
views/default/icon/user/default.php | 1 +
views/default/navigation/breadcrumbs.php | 1 +
views/default/navigation/menu/user_hover.php | 1 +
views/default/navigation/pagination.php | 2 ++
views/default/navigation/tabs.php | 6 +++-
views/default/object/admin_notice.php | 3 +-
views/default/object/default.php | 1 +
views/default/object/elements/summary.php | 1 +
views/default/object/plugin/advanced.php | 33 +++++++++++++---------
views/default/object/plugin/simple.php | 3 +-
views/default/object/widget/elements/controls.php | 1 +
views/default/output/tag.php | 6 +++-
views/default/output/url.php | 15 ++++++++--
views/default/page/elements/footer.php | 1 +
views/default/page/elements/tagcloud_block.php | 1 +
views/default/page/layouts/widgets/add_button.php | 1 +
views/default/river/elements/body.php | 2 ++
views/default/river/elements/responses.php | 1 +
views/default/river/elements/summary.php | 3 ++
.../river/user/default/profileiconupdate.php | 1 +
views/default/river/user/default/profileupdate.php | 1 +
views/default/widgets/content_stats/content.php | 1 +
64 files changed, 157 insertions(+), 41 deletions(-)
(limited to 'views/default/icon')
diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php
index b9c81fd78..8ddb1ecd8 100644
--- a/engine/classes/ElggMenuItem.php
+++ b/engine/classes/ElggMenuItem.php
@@ -549,6 +549,10 @@ class ElggMenuItem {
}
}
+ if (!isset($vars['rel']) && !isset($vars['is_trusted'])) {
+ $vars['is_trusted'] = true;
+ }
+
if ($this->confirm) {
$vars['confirm'] = $this->confirm;
return elgg_view('output/confirmlink', $vars);
diff --git a/mod/blog/views/default/blog/group_module.php b/mod/blog/views/default/blog/group_module.php
index d769fbd59..028827178 100644
--- a/mod/blog/views/default/blog/group_module.php
+++ b/mod/blog/views/default/blog/group_module.php
@@ -12,6 +12,7 @@ if ($group->blog_enable == "no") {
$all_link = elgg_view('output/url', array(
'href' => "blog/group/$group->guid/all",
'text' => elgg_echo('link:view:all'),
+ 'is_trusted' => true,
));
elgg_push_context('widgets');
@@ -33,6 +34,7 @@ if (!$content) {
$new_link = elgg_view('output/url', array(
'href' => "blog/add/$group->guid",
'text' => elgg_echo('blog:write'),
+ 'is_trusted' => true,
));
echo elgg_view('groups/profile/module', array(
diff --git a/mod/blog/views/default/blog/sidebar/revisions.php b/mod/blog/views/default/blog/sidebar/revisions.php
index c23b3b052..cd2e7f3d8 100644
--- a/mod/blog/views/default/blog/sidebar/revisions.php
+++ b/mod/blog/views/default/blog/sidebar/revisions.php
@@ -39,7 +39,8 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) {
if ($blog->status == 'published') {
$load = elgg_view('output/url', array(
'href' => $load_base_url,
- 'text' => elgg_echo('blog:status:published')
+ 'text' => elgg_echo('blog:status:published'),
+ 'is_trusted' => true,
));
$time = ""
@@ -59,7 +60,8 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) {
}
$load = elgg_view('output/url', array(
'href' => "$load_base_url/$revision->id",
- 'text' => $revision_lang
+ 'text' => $revision_lang,
+ 'is_trusted' => true,
));
$text = "$load: $time";
diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php
index ba08180b1..ab75bd09b 100644
--- a/mod/blog/views/default/object/blog.php
+++ b/mod/blog/views/default/object/blog.php
@@ -21,6 +21,7 @@ $owner_icon = elgg_view_entity_icon($owner, 'tiny');
$owner_link = elgg_view('output/url', array(
'href' => "blog/owner/$owner->username",
'text' => $owner->name,
+ 'is_trusted' => true,
));
$author_text = elgg_echo('byline', array($owner_link));
$tags = elgg_view('output/tags', array('tags' => $blog->tags));
@@ -35,6 +36,7 @@ if ($blog->comments_on != 'Off') {
$comments_link = elgg_view('output/url', array(
'href' => $blog->getURL() . '#blog-comments',
'text' => $text,
+ 'is_trusted' => true,
));
} else {
$comments_link = '';
diff --git a/mod/blog/views/default/widgets/blog/content.php b/mod/blog/views/default/widgets/blog/content.php
index 7bbfc3c74..330171662 100644
--- a/mod/blog/views/default/widgets/blog/content.php
+++ b/mod/blog/views/default/widgets/blog/content.php
@@ -22,6 +22,7 @@ if ($content) {
$more_link = elgg_view('output/url', array(
'href' => $blog_url,
'text' => elgg_echo('blog:moreblogs'),
+ 'is_trusted' => true,
));
echo "$more_link";
} else {
diff --git a/mod/bookmarks/views/default/bookmarks/group_module.php b/mod/bookmarks/views/default/bookmarks/group_module.php
index 3797de010..60a727819 100644
--- a/mod/bookmarks/views/default/bookmarks/group_module.php
+++ b/mod/bookmarks/views/default/bookmarks/group_module.php
@@ -14,6 +14,7 @@ if ($group->bookmarks_enable == "no") {
$all_link = elgg_view('output/url', array(
'href' => "bookmarks/group/$group->guid/all",
'text' => elgg_echo('link:view:all'),
+ 'is_trusted' => true,
));
elgg_push_context('widgets');
@@ -35,6 +36,7 @@ if (!$content) {
$new_link = elgg_view('output/url', array(
'href' => "bookmarks/add/$group->guid",
'text' => elgg_echo('bookmarks:add'),
+ 'is_trusted' => true,
));
echo elgg_view('groups/profile/module', array(
diff --git a/mod/bookmarks/views/default/object/bookmarks.php b/mod/bookmarks/views/default/object/bookmarks.php
index ca1f5d312..784263232 100644
--- a/mod/bookmarks/views/default/object/bookmarks.php
+++ b/mod/bookmarks/views/default/object/bookmarks.php
@@ -17,12 +17,13 @@ $owner_icon = elgg_view_entity_icon($owner, 'tiny');
$container = $bookmark->getContainerEntity();
$categories = elgg_view('output/categories', $vars);
-$link = filter_tags(elgg_view('output/url', array('href' => $bookmark->address, 'rel' => 'nofollow')));
+$link = elgg_view('output/url', array('href' => $bookmark->address));
$description = elgg_view('output/longtext', array('value' => $bookmark->description, 'class' => 'pbl'));
$owner_link = elgg_view('output/url', array(
'href' => "bookmarks/owner/$owner->username",
'text' => $owner->name,
+ 'is_trusted' => true,
));
$author_text = elgg_echo('byline', array($owner_link));
@@ -36,6 +37,7 @@ if ($comments_count != 0) {
$comments_link = elgg_view('output/url', array(
'href' => $bookmark->getURL() . '#comments',
'text' => $text,
+ 'is_trusted' => true,
));
} else {
$comments_link = '';
@@ -104,11 +106,10 @@ HTML;
}
}
- $link = filter_tags(elgg_view('output/url', array(
+ $link = elgg_view('output/url', array(
'href' => $bookmark->address,
'text' => $display_text,
- 'rel' => 'nofollow',
- )));
+ ));
$content = elgg_view_icon('push-pin-alt') . "$link{$excerpt}";
diff --git a/mod/bookmarks/views/default/widgets/bookmarks/content.php b/mod/bookmarks/views/default/widgets/bookmarks/content.php
index ea7816345..0b85017fc 100644
--- a/mod/bookmarks/views/default/widgets/bookmarks/content.php
+++ b/mod/bookmarks/views/default/widgets/bookmarks/content.php
@@ -24,6 +24,7 @@ if ($content) {
$more_link = elgg_view('output/url', array(
'href' => $url,
'text' => elgg_echo('bookmarks:more'),
+ 'is_trusted' => true,
));
echo "$more_link";
} else {
diff --git a/mod/developers/views/default/theme_preview/general.php b/mod/developers/views/default/theme_preview/general.php
index 1a0b54c88..35d8ccbfd 100644
--- a/mod/developers/views/default/theme_preview/general.php
+++ b/mod/developers/views/default/theme_preview/general.php
@@ -17,6 +17,7 @@
'text' => elgg_echo('theme_preview:breakout'),
'href' => current_page_url(),
'target' => '_parent',
+ 'is_trusted' => true,
));
?>
diff --git a/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php b/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php
index 76f12b0ae..b41907da2 100644
--- a/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php
+++ b/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php
@@ -18,6 +18,7 @@ if (elgg_get_config('debug')) {
'text' => elgg_echo('diagnostics:test:executeall'),
'href' => 'engine/tests/suite.php',
'class' => 'elgg-button elgg-button-submit',
+ 'is_trusted' => true,
);
$unit_tests .= '
' . elgg_view('output/url', $params) . '
';
} else {
diff --git a/mod/file/views/default/file/group_module.php b/mod/file/views/default/file/group_module.php
index c37b13927..ad6c58dbb 100644
--- a/mod/file/views/default/file/group_module.php
+++ b/mod/file/views/default/file/group_module.php
@@ -12,6 +12,7 @@ if ($group->file_enable == "no") {
$all_link = elgg_view('output/url', array(
'href' => "file/group/$group->guid/all",
'text' => elgg_echo('link:view:all'),
+ 'is_trusted' => true,
));
elgg_push_context('widgets');
@@ -33,6 +34,7 @@ if (!$content) {
$new_link = elgg_view('output/url', array(
'href' => "file/add/$group->guid",
'text' => elgg_echo('file:add'),
+ 'is_trusted' => true,
));
echo elgg_view('groups/profile/module', array(
diff --git a/mod/file/views/default/icon/object/file.php b/mod/file/views/default/icon/object/file.php
index 7feba7af3..ff729da94 100644
--- a/mod/file/views/default/icon/object/file.php
+++ b/mod/file/views/default/icon/object/file.php
@@ -36,6 +36,7 @@ if ($url) {
$params = array(
'href' => $url,
'text' => $img,
+ 'is_trusted' => true,
);
if (isset($vars['link_class'])) {
$params['class'] = $vars['link_class'];
diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php
index 95e190d35..fbd585b8a 100644
--- a/mod/file/views/default/object/file.php
+++ b/mod/file/views/default/object/file.php
@@ -24,6 +24,7 @@ $body = elgg_view('output/longtext', array('value' => $file->description));
$owner_link = elgg_view('output/url', array(
'href' => "file/owner/$owner->username",
'text' => $owner->name,
+ 'is_trusted' => true,
));
$author_text = elgg_echo('byline', array($owner_link));
@@ -39,6 +40,7 @@ if ($comments_count != 0) {
$comments_link = elgg_view('output/url', array(
'href' => $file->getURL() . '#file-comments',
'text' => $text,
+ 'is_trusted' => true,
));
} else {
$comments_link = '';
diff --git a/mod/file/views/default/widgets/filerepo/content.php b/mod/file/views/default/widgets/filerepo/content.php
index 4288b9e56..f3e152de3 100644
--- a/mod/file/views/default/widgets/filerepo/content.php
+++ b/mod/file/views/default/widgets/filerepo/content.php
@@ -25,6 +25,7 @@ if ($content) {
$more_link = elgg_view('output/url', array(
'href' => $url,
'text' => elgg_echo('file:more'),
+ 'is_trusted' => true,
));
echo "$more_link";
} else {
diff --git a/mod/groups/views/default/discussion/group_module.php b/mod/groups/views/default/discussion/group_module.php
index 3a46e336e..3c9961f82 100644
--- a/mod/groups/views/default/discussion/group_module.php
+++ b/mod/groups/views/default/discussion/group_module.php
@@ -15,6 +15,7 @@ $group = $vars['entity'];
$all_link = elgg_view('output/url', array(
'href' => "discussion/owner/$group->guid",
'text' => elgg_echo('link:view:all'),
+ 'is_trusted' => true,
));
elgg_push_context('widgets');
@@ -36,6 +37,7 @@ if (!$content) {
$new_link = elgg_view('output/url', array(
'href' => "discussion/add/" . $group->getGUID(),
'text' => elgg_echo('groups:addtopic'),
+ 'is_trusted' => true,
));
echo elgg_view('groups/profile/module', array(
diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php
index 9c2df8b9c..e644b6bdc 100644
--- a/mod/groups/views/default/groups/invitationrequests.php
+++ b/mod/groups/views/default/groups/invitationrequests.php
@@ -15,6 +15,7 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) {
$group_title = elgg_view('output/url', array(
'href' => $group->getURL(),
'text' => $group->name,
+ 'is_trusted' => true,
));
$url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/groups/join?user_guid={$user->guid}&group_guid={$group->guid}");
@@ -22,6 +23,7 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) {
'href' => $url,
'text' => elgg_echo('accept'),
'class' => 'elgg-button elgg-button-submit',
+ 'is_trusted' => true,
));
$url = "action/groups/killinvitation?user_guid={$user->getGUID()}&group_guid={$group->getGUID()}";
diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php
index 7f33b83e0..489d6f5e3 100644
--- a/mod/groups/views/default/groups/membershiprequests.php
+++ b/mod/groups/views/default/groups/membershiprequests.php
@@ -16,6 +16,7 @@ if (!empty($vars['requests']) && is_array($vars['requests'])) {
$user_title = elgg_view('output/url', array(
'href' => $user->getURL(),
'text' => $user->name,
+ 'is_trusted' => true,
));
$url = "action/groups/addtogroup?user_guid={$user->guid}&group_guid={$vars['entity']->guid}";
@@ -24,6 +25,7 @@ if (!empty($vars['requests']) && is_array($vars['requests'])) {
'href' => $url,
'text' => elgg_echo('accept'),
'class' => 'elgg-button elgg-button-submit',
+ 'is_trusted' => true,
));
$url = 'action/groups/killrequest?user_guid=' . $user->guid . '&group_guid=' . $vars['entity']->guid;
diff --git a/mod/groups/views/default/groups/profile/activity_module.php b/mod/groups/views/default/groups/profile/activity_module.php
index 5e557b443..832ff4a4b 100644
--- a/mod/groups/views/default/groups/profile/activity_module.php
+++ b/mod/groups/views/default/groups/profile/activity_module.php
@@ -19,6 +19,7 @@ if (!$group) {
$all_link = elgg_view('output/url', array(
'href' => "groups/activity/$group->guid",
'text' => elgg_echo('link:view:all'),
+ 'is_trusted' => true,
));
diff --git a/mod/groups/views/default/groups/profile/summary.php b/mod/groups/views/default/groups/profile/summary.php
index b7ae51070..54abcb1e5 100644
--- a/mod/groups/views/default/groups/profile/summary.php
+++ b/mod/groups/views/default/groups/profile/summary.php
@@ -28,6 +28,7 @@ $owner = $group->getOwnerEntity();
echo elgg_view('output/url', array(
'text' => $owner->name,
'value' => $owner->getURL(),
+ 'is_trusted' => true,
));
?>
diff --git a/mod/groups/views/default/groups/sidebar/members.php b/mod/groups/views/default/groups/sidebar/members.php
index 7249ffbf4..49f14697c 100644
--- a/mod/groups/views/default/groups/sidebar/members.php
+++ b/mod/groups/views/default/groups/sidebar/members.php
@@ -13,6 +13,7 @@ $limit = elgg_extract('limit', $vars, 10);
$all_link = elgg_view('output/url', array(
'href' => 'groups/members/' . $vars['entity']->guid,
'text' => elgg_echo('groups:members:more'),
+ 'is_trusted' => true,
));
$body = elgg_list_entities_from_relationship(array(
diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php
index 22589b84d..f3d5f96d5 100644
--- a/mod/groups/views/default/object/groupforumtopic.php
+++ b/mod/groups/views/default/object/groupforumtopic.php
@@ -20,6 +20,7 @@ $poster_icon = elgg_view_entity_icon($poster, 'tiny');
$poster_link = elgg_view('output/url', array(
'href' => $poster->getURL(),
'text' => $poster->name,
+ 'is_trusted' => true,
));
$poster_text = elgg_echo('groups:started', array($poster->name));
@@ -42,6 +43,7 @@ if ($num_replies != 0) {
$replies_link = elgg_view('output/url', array(
'href' => $topic->getURL() . '#group-replies',
'text' => elgg_echo('group:replies') . " ($num_replies)",
+ 'is_trusted' => true,
));
}
diff --git a/mod/groups/views/default/widgets/a_users_groups/content.php b/mod/groups/views/default/widgets/a_users_groups/content.php
index 114fd7565..fe1a46e39 100644
--- a/mod/groups/views/default/widgets/a_users_groups/content.php
+++ b/mod/groups/views/default/widgets/a_users_groups/content.php
@@ -25,6 +25,7 @@ if ($content) {
$more_link = elgg_view('output/url', array(
'href' => $url,
'text' => elgg_echo('groups:more'),
+ 'is_trusted' => true,
));
echo "$more_link";
} else {
diff --git a/mod/likes/views/default/annotation/likes.php b/mod/likes/views/default/annotation/likes.php
index 2dd01b6cd..314d0790d 100644
--- a/mod/likes/views/default/annotation/likes.php
+++ b/mod/likes/views/default/annotation/likes.php
@@ -20,6 +20,7 @@ $user_icon = elgg_view_entity_icon($user, 'tiny');
$user_link = elgg_view('output/url', array(
'href' => $user->getURL(),
'text' => $user->name,
+ 'is_trusted' => true,
));
$likes_string = elgg_echo('likes:this');
diff --git a/mod/likes/views/default/likes/button.php b/mod/likes/views/default/likes/button.php
index 383e1bb63..3f2f073cc 100644
--- a/mod/likes/views/default/likes/button.php
+++ b/mod/likes/views/default/likes/button.php
@@ -20,6 +20,7 @@ if (elgg_is_logged_in() && $vars['entity']->canAnnotate(0, 'likes')) {
'text' => elgg_view_icon('thumbs-up'),
'title' => elgg_echo('likes:likethis'),
'is_action' => true,
+ 'is_trusted' => true,
);
$likes_button = elgg_view('output/url', $params);
} else {
@@ -34,6 +35,7 @@ if (elgg_is_logged_in() && $vars['entity']->canAnnotate(0, 'likes')) {
'text' => elgg_view_icon('thumbs-up-alt'),
'title' => elgg_echo('likes:remove'),
'is_action' => true,
+ 'is_trusted' => true,
);
$likes_button = elgg_view('output/url', $params);
}
diff --git a/mod/logbrowser/views/default/logbrowser/table.php b/mod/logbrowser/views/default/logbrowser/table.php
index 86c8a1423..b7f6a1f20 100644
--- a/mod/logbrowser/views/default/logbrowser/table.php
+++ b/mod/logbrowser/views/default/logbrowser/table.php
@@ -24,11 +24,13 @@ $log_entries = $vars['log_entries'];
if ($user) {
$user_link = elgg_view('output/url', array(
'href' => $user->getURL(),
- 'text' => $user->name
+ 'text' => $user->name,
+ 'is_trusted' => true,
));
$user_guid_link = elgg_view('output/url', array(
'href' => "admin/overview/logbrowser?user_guid=$user->guid",
- 'text' => $user->getGUID()
+ 'text' => $user->getGUID(),
+ 'is_trusted' => true,
));
} else {
$user_guid_link = $user_link = ' ';
@@ -38,7 +40,8 @@ $log_entries = $vars['log_entries'];
if (is_callable(array($object, 'getURL'))) {
$object_link = elgg_view('output/url', array(
'href' => $object->getURL(),
- 'text' => $entry->object_class
+ 'text' => $entry->object_class,
+ 'is_trusted' => true,
));
} else {
$object_link = $entry->object_class;
diff --git a/mod/messageboard/views/default/widgets/messageboard/content.php b/mod/messageboard/views/default/widgets/messageboard/content.php
index 63f389e6a..35954e7a3 100644
--- a/mod/messageboard/views/default/widgets/messageboard/content.php
+++ b/mod/messageboard/views/default/widgets/messageboard/content.php
@@ -31,4 +31,5 @@ if ($owner instanceof ElggGroup) {
echo elgg_view('output/url', array(
'href' => $url,
'text' => elgg_echo('messageboard:viewall'),
+ 'is_trusted' => true,
));
\ No newline at end of file
diff --git a/mod/messages/views/default/object/messages.php b/mod/messages/views/default/object/messages.php
index b6f9ed6d5..8c840dd57 100644
--- a/mod/messages/views/default/object/messages.php
+++ b/mod/messages/views/default/object/messages.php
@@ -24,6 +24,7 @@ if ($message->toId == elgg_get_page_owner_guid()) {
$user_link = elgg_view('output/url', array(
'href' => "messages/compose?send_to=$user->guid",
'text' => $user->name,
+ 'is_trusted' => true,
));
} else {
$icon = '';
@@ -45,6 +46,7 @@ if ($message->toId == elgg_get_page_owner_guid()) {
$user_link = elgg_view('output/url', array(
'href' => "messages/compose?send_to=$user->guid",
'text' => elgg_echo('messages:to_user', array($user->name)),
+ 'is_trusted' => true,
));
} else {
$icon = '';
@@ -63,6 +65,7 @@ if (!$full) {
$subject_info .= elgg_view('output/url', array(
'href' => $message->getURL(),
'text' => $message->title,
+ 'is_trusted' => true,
));
$delete_link = elgg_view("output/confirmlink", array(
diff --git a/mod/pages/views/default/annotation/page.php b/mod/pages/views/default/annotation/page.php
index f7a7a78a1..a621b9281 100644
--- a/mod/pages/views/default/annotation/page.php
+++ b/mod/pages/views/default/annotation/page.php
@@ -21,6 +21,7 @@ if (!$owner) {
$owner_link = elgg_view('output/url', array(
'href' => $owner->getURL(),
'text' => $owner->name,
+ 'is_trusted' => true,
));
$date = elgg_view_friendly_time($annotation->time_created);
@@ -28,6 +29,7 @@ $date = elgg_view_friendly_time($annotation->time_created);
$title_link = elgg_view('output/url', array(
'href' => $annotation->getURL(),
'text' => $page->title,
+ 'is_trusted' => true,
));
$subtitle = elgg_echo('pages:revision:subtitle', array($date, $owner_link));
diff --git a/mod/pages/views/default/object/page_top.php b/mod/pages/views/default/object/page_top.php
index 8ba9fc298..0f7b51a0e 100644
--- a/mod/pages/views/default/object/page_top.php
+++ b/mod/pages/views/default/object/page_top.php
@@ -40,6 +40,7 @@ $editor = get_entity($annotation->owner_guid);
$editor_link = elgg_view('output/url', array(
'href' => "pages/owner/$editor->username",
'text' => $editor->name,
+ 'is_trusted' => true,
));
$date = elgg_view_friendly_time($annotation->time_created);
@@ -53,6 +54,7 @@ if ($comments_count != 0 && !$revision) {
$comments_link = elgg_view('output/url', array(
'href' => $page->getURL() . '#page-comments',
'text' => $text,
+ 'is_trusted' => true,
));
} else {
$comments_link = '';
diff --git a/mod/pages/views/default/pages/group_module.php b/mod/pages/views/default/pages/group_module.php
index 7e2656ca3..0d7df96ac 100644
--- a/mod/pages/views/default/pages/group_module.php
+++ b/mod/pages/views/default/pages/group_module.php
@@ -15,6 +15,7 @@ if ($group->pages_enable == "no") {
$all_link = elgg_view('output/url', array(
'href' => "pages/group/$group->guid/all",
'text' => elgg_echo('link:view:all'),
+ 'is_trusted' => true,
));
@@ -37,6 +38,7 @@ if (!$content) {
$new_link = elgg_view('output/url', array(
'href' => "pages/add/$group->guid",
'text' => elgg_echo('pages:add'),
+ 'is_trusted' => true,
));
echo elgg_view('groups/profile/module', array(
diff --git a/mod/pages/views/default/widgets/pages/content.php b/mod/pages/views/default/widgets/pages/content.php
index 3ae0b8454..f63777c09 100644
--- a/mod/pages/views/default/widgets/pages/content.php
+++ b/mod/pages/views/default/widgets/pages/content.php
@@ -24,6 +24,7 @@ if ($content) {
$more_link = elgg_view('output/url', array(
'href' => $url,
'text' => elgg_echo('pages:more'),
+ 'is_trusted' => true,
));
echo "$more_link";
} else {
diff --git a/mod/reportedcontent/views/default/object/reported_content.php b/mod/reportedcontent/views/default/object/reported_content.php
index 6bcbf6e5d..0e733e154 100644
--- a/mod/reportedcontent/views/default/object/reported_content.php
+++ b/mod/reportedcontent/views/default/object/reported_content.php
@@ -29,6 +29,7 @@ if ($report->state == 'archived') {
'href' => $archive_url,
'text' => elgg_echo('reportedcontent:archive'),
'is_action' => true,
+ 'is_trusted' => true,
'class' => 'elgg-button elgg-button-action',
);
echo elgg_view('output/url', $params);
@@ -37,6 +38,7 @@ if ($report->state == 'archived') {
'href' => $delete_url,
'text' => elgg_echo('reportedcontent:delete'),
'is_action' => true,
+ 'is_trusted' => true,
'class' => 'elgg-button elgg-button-action',
);
echo elgg_view('output/url', $params);
@@ -46,7 +48,8 @@ if ($report->state == 'archived') {
:
$reporter->getURL(),
- 'text' => $reporter->name
+ 'text' => $reporter->name,
+ 'is_trusted' => true,
));
?>,
time_created); ?>
@@ -68,7 +71,8 @@ if ($report->state == 'archived') {
:
$report->address,
- 'text' => elgg_echo('reportedcontent:visit')
+ 'text' => elgg_echo('reportedcontent:visit'),
+ 'is_trusted' => true,
));
?>
diff --git a/mod/thewire/views/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php
index 2727df60d..134c87243 100644
--- a/mod/thewire/views/default/object/thewire.php
+++ b/mod/thewire/views/default/object/thewire.php
@@ -26,6 +26,7 @@ $owner_icon = elgg_view_entity_icon($owner, 'tiny');
$owner_link = elgg_view('output/url', array(
'href' => "thewire/owner/$owner->username",
'text' => $owner->name,
+ 'is_trusted' => true,
));
$author_text = elgg_echo('byline', array($owner_link));
$date = elgg_view_friendly_time($post->time_created);
diff --git a/mod/thewire/views/default/river/object/thewire/create.php b/mod/thewire/views/default/river/object/thewire/create.php
index c3c434858..fbf592664 100644
--- a/mod/thewire/views/default/river/object/thewire/create.php
+++ b/mod/thewire/views/default/river/object/thewire/create.php
@@ -12,12 +12,14 @@ $subject_link = elgg_view('output/url', array(
'href' => $subject->getURL(),
'text' => $subject->name,
'class' => 'elgg-river-subject',
+ 'is_trusted' => true,
));
$object_link = elgg_view('output/url', array(
'href' => "thewire/owner/$subject->username",
'text' => elgg_echo('thewire:wire'),
'class' => 'elgg-river-object',
+ 'is_trusted' => true,
));
$summary = elgg_echo("river:create:object:thewire", array($subject_link, $object_link));
diff --git a/mod/thewire/views/default/thewire/profile_status.php b/mod/thewire/views/default/thewire/profile_status.php
index 6ab47bccb..ab20b5341 100644
--- a/mod/thewire/views/default/thewire/profile_status.php
+++ b/mod/thewire/views/default/thewire/profile_status.php
@@ -28,6 +28,7 @@ if ($latest_wire && count($latest_wire) > 0) {
'text' => elgg_echo('thewire:update'),
'href' => $url_to_wire,
'class' => 'elgg-button elgg-button-action right',
+ 'is_trusted' => true,
));
}
diff --git a/mod/thewire/views/default/widgets/thewire/content.php b/mod/thewire/views/default/widgets/thewire/content.php
index 835a328b0..7212d4397 100644
--- a/mod/thewire/views/default/widgets/thewire/content.php
+++ b/mod/thewire/views/default/widgets/thewire/content.php
@@ -22,6 +22,7 @@ if ($content) {
$more_link = elgg_view('output/url', array(
'href' => $owner_url,
'text' => elgg_echo('thewire:moreposts'),
+ 'is_trusted' => true,
));
echo "$more_link";
} else {
diff --git a/mod/twitter_api/views/default/forms/twitter_api/interstitial_settings.php b/mod/twitter_api/views/default/forms/twitter_api/interstitial_settings.php
index fdeafd46d..2592013c6 100644
--- a/mod/twitter_api/views/default/forms/twitter_api/interstitial_settings.php
+++ b/mod/twitter_api/views/default/forms/twitter_api/interstitial_settings.php
@@ -58,4 +58,5 @@ echo elgg_view('output/url', array(
'class' => 'right',
'text' => elgg_echo('twitter_api:interstitial:no_thanks'),
'href' => '/',
+ 'is_trusted' => true,
));
\ No newline at end of file
diff --git a/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php b/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
index 2872b7a0c..0e1461058 100644
--- a/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
+++ b/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
@@ -52,27 +52,30 @@ $bulk_actions_checkbox = '
diff --git a/views/default/navigation/breadcrumbs.php b/views/default/navigation/breadcrumbs.php
index bad73c4b3..88577a8ff 100644
--- a/views/default/navigation/breadcrumbs.php
+++ b/views/default/navigation/breadcrumbs.php
@@ -30,6 +30,7 @@ if (is_array($breadcrumbs) && count($breadcrumbs) > 0) {
$crumb = elgg_view('output/url', array(
'href' => $breadcrumb['link'],
'text' => $breadcrumb['title'],
+ 'is_trusted' => true,
));
} else {
$crumb = $breadcrumb['title'];
diff --git a/views/default/navigation/menu/user_hover.php b/views/default/navigation/menu/user_hover.php
index e32e5ab57..5c89e585c 100644
--- a/views/default/navigation/menu/user_hover.php
+++ b/views/default/navigation/menu/user_hover.php
@@ -19,6 +19,7 @@ echo '
';
diff --git a/views/default/page/layouts/widgets/add_button.php b/views/default/page/layouts/widgets/add_button.php
index 89e83b096..c33a45f99 100644
--- a/views/default/page/layouts/widgets/add_button.php
+++ b/views/default/page/layouts/widgets/add_button.php
@@ -10,6 +10,7 @@
'text' => elgg_echo('widgets:add'),
'class' => 'elgg-button elgg-button-action',
'rel' => 'toggle',
+ 'is_trusted' => true,
));
?>
diff --git a/views/default/river/elements/body.php b/views/default/river/elements/body.php
index c5a525733..6894b81e2 100644
--- a/views/default/river/elements/body.php
+++ b/views/default/river/elements/body.php
@@ -27,6 +27,7 @@ if ($summary === false) {
'href' => $subject->getURL(),
'text' => $subject->name,
'class' => 'elgg-river-subject',
+ 'is_trusted' => true,
));
}
@@ -52,6 +53,7 @@ if ($container instanceof ElggGroup && $container->guid != elgg_get_page_owner_g
$group_link = elgg_view('output/url', array(
'href' => $container->getURL(),
'text' => $container->name,
+ 'is_trusted' => true,
));
$group_string = elgg_echo('river:ingroup', array($group_link));
}
diff --git a/views/default/river/elements/responses.php b/views/default/river/elements/responses.php
index 8c5be6316..f6c32e142 100644
--- a/views/default/river/elements/responses.php
+++ b/views/default/river/elements/responses.php
@@ -50,6 +50,7 @@ if ($comments) {
$params = array(
'href' => $url,
'text' => elgg_echo('river:comments:more', array($num_more_comments)),
+ 'is_trusted' => true,
);
$link = elgg_view('output/url', $params);
echo "$link
";
diff --git a/views/default/river/elements/summary.php b/views/default/river/elements/summary.php
index 4d80c29a6..84941131f 100644
--- a/views/default/river/elements/summary.php
+++ b/views/default/river/elements/summary.php
@@ -15,12 +15,14 @@ $subject_link = elgg_view('output/url', array(
'href' => $subject->getURL(),
'text' => $subject->name,
'class' => 'elgg-river-subject',
+ 'is_trusted' => true,
));
$object_link = elgg_view('output/url', array(
'href' => $object->getURL(),
'text' => $object->title ? $object->title : $object->name,
'class' => 'elgg-river-object',
+ 'is_trusted' => true,
));
$action = $item->action_type;
@@ -32,6 +34,7 @@ if ($container instanceof ElggGroup) {
$params = array(
'href' => $container->getURL(),
'text' => $container->name,
+ 'is_trusted' => true,
);
$group_link = elgg_view('output/url', $params);
$group_string = elgg_echo('river:ingroup', array($group_link));
diff --git a/views/default/river/user/default/profileiconupdate.php b/views/default/river/user/default/profileiconupdate.php
index c7f691533..5c96747bd 100644
--- a/views/default/river/user/default/profileiconupdate.php
+++ b/views/default/river/user/default/profileiconupdate.php
@@ -10,6 +10,7 @@ $subject_link = elgg_view('output/url', array(
'href' => $subject->getURL(),
'text' => $subject->name,
'class' => 'elgg-river-subject',
+ 'is_trusted' => true,
));
$string = elgg_echo('river:update:user:avatar', array($subject_link));
diff --git a/views/default/river/user/default/profileupdate.php b/views/default/river/user/default/profileupdate.php
index a344131d6..69b69b106 100644
--- a/views/default/river/user/default/profileupdate.php
+++ b/views/default/river/user/default/profileupdate.php
@@ -9,6 +9,7 @@ $subject_link = elgg_view('output/url', array(
'href' => $subject->getURL(),
'text' => $subject->name,
'class' => 'elgg-river-subject',
+ 'is_trusted' => true,
));
$string = elgg_echo('river:update:user:profile', array($subject_link));
diff --git a/views/default/widgets/content_stats/content.php b/views/default/widgets/content_stats/content.php
index 6a652166c..56772047d 100644
--- a/views/default/widgets/content_stats/content.php
+++ b/views/default/widgets/content_stats/content.php
@@ -23,5 +23,6 @@ echo '';
echo elgg_view('output/url', array(
'href' => 'admin/statistics/overview',
'text' => elgg_echo('more'),
+ 'is_trusted' => true,
));
echo '
';
--
cgit v1.2.3
From 558f03f0f84a142438de9844b2047be2f050c385 Mon Sep 17 00:00:00 2001
From: cash
Date: Sat, 5 Nov 2011 16:42:59 -0400
Subject: Fixes #4023 escaping alt and title attributes in icon views
---
mod/file/views/default/icon/object/file.php | 3 ++-
views/default/icon/default.php | 7 ++++---
views/default/icon/user/default.php | 2 +-
3 files changed, 7 insertions(+), 5 deletions(-)
(limited to 'views/default/icon')
diff --git a/mod/file/views/default/icon/object/file.php b/mod/file/views/default/icon/object/file.php
index ff729da94..51a4469e9 100644
--- a/mod/file/views/default/icon/object/file.php
+++ b/mod/file/views/default/icon/object/file.php
@@ -5,7 +5,7 @@
* @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['link_class'] Optional CSS class added to link
*/
$entity = $vars['entity'];
@@ -17,6 +17,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'])) {
diff --git a/views/default/icon/default.php b/views/default/icon/default.php
index 533b92c43..6aeef204b 100644
--- a/views/default/icon/default.php
+++ b/views/default/icon/default.php
@@ -5,9 +5,9 @@
* @package Elgg
* @subpackage Core
*
- * @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['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['img_class'] Optional CSS class added to img
*/
@@ -26,6 +26,7 @@ if (isset($entity->name)) {
} else {
$title = $entity->title;
}
+$title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8', false);
$url = $entity->getURL();
if (isset($vars['href'])) {
diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php
index 0eb3691bd..906371cf8 100644
--- a/views/default/icon/user/default.php
+++ b/views/default/icon/user/default.php
@@ -26,7 +26,7 @@ if (!($user instanceof ElggUser)) {
return true;
}
-$name = htmlspecialchars($user->name, ENT_QUOTES, 'UTF-8');
+$name = htmlspecialchars($user->name, ENT_QUOTES, 'UTF-8', false);
$username = $user->username;
$icontime = $user->icontime;
--
cgit v1.2.3
From fa0dbc7f8a34597345f7939ca9914438624c3cee Mon Sep 17 00:00:00 2001
From: cash
Date: Sat, 5 Nov 2011 17:09:34 -0400
Subject: Fixes #3567 standardized classes for icons
---
engine/lib/input.php | 12 ++---
engine/lib/views.php | 4 +-
.../views/default/theme_preview/icons/avatars.php | 4 +-
mod/file/views/default/icon/object/file.php | 8 +++-
.../views/default/groups/invitationrequests.php | 2 +-
.../views/default/groups/membershiprequests.php | 2 +-
.../notifications/subscriptions/forminternals.php | 2 +-
mod/profile/views/default/profile/owner_block.php | 2 +-
views/default/icon/default.php | 11 ++++-
views/default/icon/user/default.php | 51 ++++++++++++++++------
views/default/input/friendspicker.php | 2 +-
views/default/input/userpicker.php | 2 +-
views/default/profile/icon.php | 2 +-
.../river/user/default/profileiconupdate.php | 5 ++-
14 files changed, 75 insertions(+), 34 deletions(-)
(limited to 'views/default/icon')
diff --git a/engine/lib/input.php b/engine/lib/input.php
index 2f68195f2..57e35786f 100644
--- a/engine/lib/input.php
+++ b/engine/lib/input.php
@@ -301,12 +301,12 @@ function input_livesearch_page_handler($page) {
}
$output = elgg_view_list_item($entity, array(
- 'hover' => false,
+ 'use_hover' => false,
'class' => 'elgg-autocomplete-item',
));
$icon = elgg_view_entity_icon($entity, 'tiny', array(
- 'hover' => false,
+ 'use_hover' => false,
));
$result = array(
@@ -344,12 +344,12 @@ function input_livesearch_page_handler($page) {
}
$output = elgg_view_list_item($entity, array(
- 'hover' => false,
+ 'use_hover' => false,
'class' => 'elgg-autocomplete-item',
));
$icon = elgg_view_entity_icon($entity, 'tiny', array(
- 'hover' => false,
+ 'use_hover' => false,
));
$result = array(
@@ -391,12 +391,12 @@ function input_livesearch_page_handler($page) {
}
$output = elgg_view_list_item($entity, array(
- 'hover' => false,
+ 'use_hover' => false,
'class' => 'elgg-autocomplete-item',
));
$icon = elgg_view_entity_icon($entity, 'tiny', array(
- 'hover' => false,
+ 'use_hover' => false,
));
$result = array(
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 2ec56c97e..6ca68ac8c 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -860,7 +860,9 @@ function elgg_view_entity(ElggEntity $entity, $vars = array(), $bypass = true, $
*
* @param ElggEntity $entity The entity to display
* @param string $size The size: tiny, small, medium, large
- * @param array $vars An array of variables to pass to the view
+ * @param array $vars An array of variables to pass to the view. Some possible
+ * variables are img_class and link_class. See the
+ * specific icon view for more parameters.
*
* @return string HTML to display or false
*/
diff --git a/mod/developers/views/default/theme_preview/icons/avatars.php b/mod/developers/views/default/theme_preview/icons/avatars.php
index cbce5bc7d..f50a6b70d 100644
--- a/mod/developers/views/default/theme_preview/icons/avatars.php
+++ b/mod/developers/views/default/theme_preview/icons/avatars.php
@@ -18,7 +18,7 @@
';
- echo elgg_view_entity_icon($user, $size, array('hover' => false));
+ echo elgg_view_entity_icon($user, $size, array('use_hover' => false));
echo '';
}
?>
@@ -28,7 +28,7 @@
';
- echo elgg_view_entity_icon($group, $size, array('hover' => false));
+ echo elgg_view_entity_icon($group, $size, array('use_hover' => false));
echo '';
}
?>
diff --git a/mod/file/views/default/icon/object/file.php b/mod/file/views/default/icon/object/file.php
index 51a4469e9..a3190310b 100644
--- a/mod/file/views/default/icon/object/file.php
+++ b/mod/file/views/default/icon/object/file.php
@@ -5,6 +5,7 @@
* @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['img_class'] Optional CSS class added to img
* @uses $vars['link_class'] Optional CSS class added to link
*/
@@ -25,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/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php
index e644b6bdc..94dbdf1f2 100644
--- a/mod/groups/views/default/groups/invitationrequests.php
+++ b/mod/groups/views/default/groups/invitationrequests.php
@@ -10,7 +10,7 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) {
echo '';
foreach ($vars['invitations'] as $group) {
if ($group instanceof ElggGroup) {
- $icon = elgg_view_entity_icon($group, 'tiny', array('hover' => 'true'));
+ $icon = elgg_view_entity_icon($group, 'tiny', array('use_hover' => 'true'));
$group_title = elgg_view('output/url', array(
'href' => $group->getURL(),
diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php
index bc6d9af5a..9cd28262f 100644
--- a/mod/groups/views/default/groups/membershiprequests.php
+++ b/mod/groups/views/default/groups/membershiprequests.php
@@ -10,7 +10,7 @@ if (!empty($vars['requests']) && is_array($vars['requests'])) {
$user = elgg_get_logged_in_user_entity();
echo '';
foreach ($vars['requests'] as $user) {
- $icon = elgg_view_entity_icon($user, 'tiny', array('hover' => 'true'));
+ $icon = elgg_view_entity_icon($user, 'tiny', array('use_hover' => 'true'));
$user_title = elgg_view('output/url', array(
'href' => $user->getURL(),
diff --git a/mod/notifications/views/default/notifications/subscriptions/forminternals.php b/mod/notifications/views/default/notifications/subscriptions/forminternals.php
index a7fbec2fd..e89ce02be 100644
--- a/mod/notifications/views/default/notifications/subscriptions/forminternals.php
+++ b/mod/notifications/views/default/notifications/subscriptions/forminternals.php
@@ -234,7 +234,7 @@ END;
false));
+ echo elgg_view_entity_icon($friend, 'tiny', array('use_hover' => false));
?>
diff --git a/mod/profile/views/default/profile/owner_block.php b/mod/profile/views/default/profile/owner_block.php
index 05cb41a14..35199726a 100644
--- a/mod/profile/views/default/profile/owner_block.php
+++ b/mod/profile/views/default/profile/owner_block.php
@@ -11,7 +11,7 @@ if (!$user) {
return TRUE;
}
-$icon = elgg_view_entity_icon($user, 'large', array('hover' => 'true'));
+$icon = elgg_view_entity_icon($user, 'large', array('use_hover' => 'true'));
// grab the actions and admin menu items from user hover
$menu = elgg_trigger_plugin_hook('register', "menu:user_hover", array('entity' => $user), array());
diff --git a/views/default/icon/default.php b/views/default/icon/default.php
index 6aeef204b..ec39e59f2 100644
--- a/views/default/icon/default.php
+++ b/views/default/icon/default.php
@@ -9,6 +9,7 @@
* @uses $vars['size'] topbar, tiny, small, medium (default), large, master
* @uses $vars['href'] Optional override for link
* @uses $vars['img_class'] Optional CSS class added to img
+ * @uses $vars['link_class'] Optional CSS class for the link
*/
$entity = $vars['entity'];
@@ -37,11 +38,17 @@ $img_src = $entity->getIconURL($vars['size']);
$img = "";
if ($url) {
- echo elgg_view('output/url', array(
+ $params = array(
'href' => $url,
'text' => $img,
'is_trusted' => true,
- ));
+ );
+ $class = elgg_extract('link_class', $vars, '');
+ if ($class) {
+ $params['class'] = $class;
+ }
+
+ echo elgg_view('output/url', $params);
} else {
echo $img;
}
diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php
index 906371cf8..54885805b 100644
--- a/views/default/icon/user/default.php
+++ b/views/default/icon/user/default.php
@@ -5,10 +5,13 @@
* Rounded avatar corners - CSS3 method
* uses avatar as background image so we can clip it with border-radius in supported browsers
*
- * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
- * @uses $vars['size'] The size - tiny, small, medium or large. (medium)
- * @uses $vars['hover'] Display the hover menu? (true)
- * @uses $vars['class'] Optional class added to the .elgg-avatar div
+ * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
+ * @uses $vars['size'] The size - tiny, small, medium or large. (medium)
+ * @uses $vars['use_hover'] Display the hover menu? (true)
+ * @uses $vars['use_link'] Wrap a link around image? (true)
+ * @uses $vars['class'] Optional class added to the .elgg-avatar div
+ * @uses $vars['img_class'] Optional CSS class added to img
+ * @uses $vars['link_class'] Optional CSS class for the link
*/
$user = elgg_extract('entity', $vars, elgg_get_logged_in_user_entity());
@@ -22,6 +25,8 @@ if (isset($vars['class'])) {
$class = "$class {$vars['class']}";
}
+$use_link = elgg_extract('use_link', $vars, true);
+
if (!($user instanceof ElggUser)) {
return true;
}
@@ -35,19 +40,31 @@ if (!$icontime) {
}
$js = elgg_extract('js', $vars, '');
+if ($js) {
+ elgg_deprecated_notice("Passing 'js' to icon views is deprecated.", 1.8, 5);
+}
+
+$img_class = '';
+if (isset($vars['img_class'])) {
+ $img_class = "class=\"{$vars['img_class']}\"";
+}
-$hover = elgg_extract('hover', $vars, true);
+$use_hover = elgg_extract('use_hover', $vars, true);
if (isset($vars['override'])) {
- elgg_deprecated_notice("Use 'hover' rather than 'override' with user avatars", 1.8, 5);
- $hover = false;
+ elgg_deprecated_notice("Use 'use_hover' rather than 'override' with user avatars", 1.8, 5);
+ $use_hover = false;
+}
+if (isset($vars['hover'])) {
+ // only 1.8.0 was released with 'hover' as the key
+ $use_hover = $vars['hover'];
}
$spacer_url = elgg_get_site_url() . '_graphics/spacer.gif';
$icon_url = $user->getIconURL($size);
-$icon = "";
+$icon = "";
-$show_menu = $hover && (elgg_is_admin_logged_in() || !$user->isBanned());
+$show_menu = $use_hover && (elgg_is_admin_logged_in() || !$user->isBanned());
?>
@@ -63,10 +80,16 @@ if ($show_menu) {
echo elgg_view_menu('user_hover', $params);
}
-echo elgg_view('output/url', array(
- 'href' => $user->getURL(),
- 'text' => $icon,
- 'is_trusted' => true,
-));
+if ($use_link) {
+ $class = elgg_extract('link_class', $vars, '');
+ echo elgg_view('output/url', array(
+ 'href' => $user->getURL(),
+ 'text' => $icon,
+ 'is_trusted' => true,
+ 'class' => $class,
+ ));
+} else {
+ echo " $icon";
+}
?>
diff --git a/views/default/input/friendspicker.php b/views/default/input/friendspicker.php
index ecf468da3..b41449fbf 100644
--- a/views/default/input/friendspicker.php
+++ b/views/default/input/friendspicker.php
@@ -187,7 +187,7 @@ if (!isset($vars['replacement'])) {
}
//echo "" . $user->name . " ";
- $label = elgg_view_entity_icon($friend, 'tiny', array('hover' => false));
+ $label = elgg_view_entity_icon($friend, 'tiny', array('use_hover' => false));
$options[$label] = $friend->getGUID();
if ($vars['highlight'] == 'all'
diff --git a/views/default/input/userpicker.php b/views/default/input/userpicker.php
index 5c4b297b1..246c462da 100644
--- a/views/default/input/userpicker.php
+++ b/views/default/input/userpicker.php
@@ -27,7 +27,7 @@ function user_picker_add_user($user_id) {
return false;
}
- $icon = elgg_view_entity_icon($user, 'tiny', array('hover' => false));
+ $icon = elgg_view_entity_icon($user, 'tiny', array('use_hover' => false));
// this html must be synced with the userpicker.js library
$code = '';
diff --git a/views/default/profile/icon.php b/views/default/profile/icon.php
index a69c41f1e..5f06cfd54 100644
--- a/views/default/profile/icon.php
+++ b/views/default/profile/icon.php
@@ -12,6 +12,6 @@
elgg_deprecated_notice('The profile/icon view was deprecated. Use elgg_view_entity_icon()', 1.8);
$override = elgg_extract('override', $vars, false);
-$vars['hover'] = !$override;
+$vars['use_hover'] = !$override;
echo elgg_view('icon/user/default', $vars);
diff --git a/views/default/river/user/default/profileiconupdate.php b/views/default/river/user/default/profileiconupdate.php
index 160ffd252..271064a06 100644
--- a/views/default/river/user/default/profileiconupdate.php
+++ b/views/default/river/user/default/profileiconupdate.php
@@ -17,5 +17,8 @@ $string = elgg_echo('river:update:user:avatar', array($subject_link));
echo elgg_view('river/elements/layout', array(
'item' => $vars['item'],
'summary' => $string,
- 'attachments' => elgg_view_entity_icon($subject, 'tiny', array('hover' => false)),
+ 'attachments' => elgg_view_entity_icon($subject, 'tiny', array(
+ 'use_hover' => false,
+ 'use_link' => false,
+ )),
));
--
cgit v1.2.3
From a7b3dfa29f185c1f154ec229ba448222d6d442af Mon Sep 17 00:00:00 2001
From: Cash Costello
Date: Sun, 6 Nov 2011 07:53:28 -0500
Subject: added a href override to the user icon view
---
views/default/icon/user/default.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'views/default/icon')
diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php
index 54885805b..a208ec41a 100644
--- a/views/default/icon/user/default.php
+++ b/views/default/icon/user/default.php
@@ -12,6 +12,7 @@
* @uses $vars['class'] Optional class added to the .elgg-avatar div
* @uses $vars['img_class'] Optional CSS class added to img
* @uses $vars['link_class'] Optional CSS class for the link
+ * @uses $vars['href'] Optional override of the link href
*/
$user = elgg_extract('entity', $vars, elgg_get_logged_in_user_entity());
@@ -82,8 +83,9 @@ if ($show_menu) {
if ($use_link) {
$class = elgg_extract('link_class', $vars, '');
+ $url = elgg_extract('href', $vars, $user->getURL());
echo elgg_view('output/url', array(
- 'href' => $user->getURL(),
+ 'href' => $url,
'text' => $icon,
'is_trusted' => true,
'class' => $class,
--
cgit v1.2.3
From 5ae9e93b57bdc6744198538153b84bed4a34e960 Mon Sep 17 00:00:00 2001
From: Cash Costello
Date: Sun, 13 Nov 2011 16:22:57 -0500
Subject: Fixes #4082 adds output/img
---
engine/lib/users.php | 11 ++++++-----
mod/bookmarks/views/default/bookmarks/bookmarklet.php | 9 ++++++---
views/default/core/avatar/upload.php | 7 +++++--
views/default/forms/avatar/crop.php | 17 +++++++++++++----
views/default/icon/default.php | 7 +++++--
views/default/icon/user/default.php | 12 +++++++++---
views/default/output/img.php | 12 ++++++++++++
7 files changed, 56 insertions(+), 19 deletions(-)
create mode 100644 views/default/output/img.php
(limited to 'views/default/icon')
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 4072740f9..9cb8ddfa7 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1476,14 +1476,15 @@ function users_pagesetup() {
// topbar
if ($viewer) {
-
- $icon_url = $viewer->getIconURL('topbar');
- $class = 'elgg-border-plain elgg-transition';
- $title = elgg_echo('profile');
elgg_register_menu_item('topbar', array(
'name' => 'profile',
'href' => $viewer->getURL(),
- 'text' => "name\" title=\"$title\" class=\"$class\" />",
+ 'text' => elgg_view('output/img', array(
+ 'src' => $viewer->getIconURL('topbar'),
+ 'alt' => $viewer->name,
+ 'title' => elgg_echo('profile'),
+ 'class' => 'elgg-border-plain elgg-transition',
+ )),
'priority' => 100,
'link_class' => 'elgg-topbar-avatar',
));
diff --git a/mod/bookmarks/views/default/bookmarks/bookmarklet.php b/mod/bookmarks/views/default/bookmarks/bookmarklet.php
index 1d0b25498..b3e9737fe 100644
--- a/mod/bookmarks/views/default/bookmarks/bookmarklet.php
+++ b/mod/bookmarks/views/default/bookmarks/bookmarklet.php
@@ -20,13 +20,16 @@ if (!$name && ($user = elgg_get_logged_in_user_entity())) {
}
$url = elgg_get_site_url();
-
+$img = elgg_view('output/img', array(
+ 'src' => 'mod/bookmarks/graphics/bookmarklet.gif',
+ 'alt' => $title,
+));
$bookmarklet = ""
- . " ";
+ . $img . "";
?>
-
\ No newline at end of file
+
diff --git a/views/default/core/avatar/upload.php b/views/default/core/avatar/upload.php
index 11902cf4a..4aa86373a 100644
--- a/views/default/core/avatar/upload.php
+++ b/views/default/core/avatar/upload.php
@@ -5,7 +5,10 @@
* @uses $vars['entity']
*/
-$user_avatar = $vars['entity']->getIconUrl('medium');
+$user_avatar = elgg_view('output/img', array(
+ 'src' => $vars['entity']->getIconUrl('medium'),
+ 'alt' => elgg_echo('avatar'),
+));
$current_label = elgg_echo('avatar:current');
@@ -23,7 +26,7 @@ $upload_form = elgg_view_form('avatar/upload', $form_params, $vars);
$image = <<
-
+ $user_avatar
HTML;
diff --git a/views/default/forms/avatar/crop.php b/views/default/forms/avatar/crop.php
index f622fd60f..3e798cb27 100644
--- a/views/default/forms/avatar/crop.php
+++ b/views/default/forms/avatar/crop.php
@@ -9,14 +9,23 @@ elgg_load_js('jquery.imgareaselect');
elgg_load_js('elgg.avatar_cropper');
elgg_load_css('jquery.imgareaselect');
-$master_image = $vars['entity']->getIconUrl('master');
+$master_img = elgg_view('output/img', array(
+ 'src' => $vars['entity']->getIconUrl('master'),
+ 'alt' => elgg_echo('avatar'),
+ 'class' => 'mrl',
+ 'id' => 'user-avatar-cropper',
+));
+
+$preview_img = elgg_view('output/img', array(
+ 'src' => $vars['entity']->getIconUrl('master'),
+ 'alt' => elgg_echo('avatar'),
+));
?>
-
+
-
-
+
|