aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/lib/blog.php1
-rw-r--r--mod/blog/views/default/js/blog/save_draft.php6
-rw-r--r--mod/bookmarks/start.php5
-rw-r--r--mod/categories/views/default/input/categories.php6
-rw-r--r--mod/developers/manifest.xml1
-rw-r--r--mod/developers/views/default/theme_preview/grid.php114
-rw-r--r--mod/groups/actions/groups/edit.php11
-rw-r--r--mod/groups/languages/en.php4
-rw-r--r--mod/groups/lib/groups.php10
-rw-r--r--mod/groups/start.php8
-rw-r--r--mod/groups/views/default/forms/groups/edit.php14
-rw-r--r--mod/groups/views/default/plugins/groups/settings.php18
-rw-r--r--mod/likes/actions/likes/delete.php17
-rw-r--r--mod/likes/languages/en.php2
-rw-r--r--mod/likes/views/default/annotation/likes.php10
-rw-r--r--mod/likes/views/default/likes/button.php8
-rw-r--r--mod/messages/manifest.xml2
-rw-r--r--mod/profile/start.php2
18 files changed, 213 insertions, 26 deletions
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php
index 9a02a8cc3..4622a9e7e 100644
--- a/mod/blog/lib/blog.php
+++ b/mod/blog/lib/blog.php
@@ -272,7 +272,6 @@ function blog_get_page_content_edit($page, $guid = 0, $revision = NULL) {
$vars = array();
$vars['id'] = 'blog-post-edit';
- $vars['name'] = 'blog_post';
$vars['class'] = 'elgg-form-alt';
if ($page == 'edit') {
diff --git a/mod/blog/views/default/js/blog/save_draft.php b/mod/blog/views/default/js/blog/save_draft.php
index 8a994ffb0..8cd07ff5d 100644
--- a/mod/blog/views/default/js/blog/save_draft.php
+++ b/mod/blog/views/default/js/blog/save_draft.php
@@ -12,7 +12,7 @@ elgg.provide('elgg.blog');
*/
elgg.blog.saveDraftCallback = function(data, textStatus, XHR) {
if (textStatus == 'success' && data.success == true) {
- var form = $('form[name=blog_post]');
+ var form = $('form[id=blog-post-edit]');
// update the guid input element for new posts that now have a guid
form.find('input[name=guid]').val(data.guid);
@@ -36,7 +36,7 @@ elgg.blog.saveDraft = function() {
}
// only save on changed content
- var form = $('form[name=blog_post]');
+ var form = $('form[id=blog-post-edit]');
var description = form.find('textarea[name=description]').val();
var title = form.find('input[name=title]').val();
@@ -59,7 +59,7 @@ elgg.blog.saveDraft = function() {
elgg.blog.init = function() {
// get a copy of the body to compare for auto save
- oldDescription = $('form[name=blog_post]').find('textarea[name=description]').val();
+ oldDescription = $('form[id=blog-post-edit]').find('textarea[name=description]').val();
setInterval(elgg.blog.saveDraft, 60000);
};
diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php
index 56bac984a..66e22b565 100644
--- a/mod/bookmarks/start.php
+++ b/mod/bookmarks/start.php
@@ -86,8 +86,13 @@ function bookmarks_init() {
* @return bool
*/
function bookmarks_page_handler($page) {
+
elgg_load_library('elgg:bookmarks');
+ if (!isset($page[0])) {
+ $page[0] = 'all';
+ }
+
elgg_push_breadcrumb(elgg_echo('bookmarks'), 'bookmarks/all');
// old group usernames
diff --git a/mod/categories/views/default/input/categories.php b/mod/categories/views/default/input/categories.php
index 75960d257..b543cde45 100644
--- a/mod/categories/views/default/input/categories.php
+++ b/mod/categories/views/default/input/categories.php
@@ -10,6 +10,12 @@
if (isset($vars['entity']) && $vars['entity'] instanceof ElggEntity) {
$selected_categories = $vars['entity']->universal_categories;
}
+
+// use sticky values if set
+if (isset($vars['universal_categories_list'])) {
+ $selected_categories = $vars['universal_categories_list'];
+}
+
$categories = elgg_get_site_entity()->categories;
if (empty($categories)) {
$categories = array();
diff --git a/mod/developers/manifest.xml b/mod/developers/manifest.xml
index 93a12945d..e31998872 100644
--- a/mod/developers/manifest.xml
+++ b/mod/developers/manifest.xml
@@ -8,6 +8,7 @@
<blurb>Developer tools for Elgg</blurb>
<description>A set of tools for writing plugins and themes. It is recommended that you have this plugin at the top of the plugin list.</description>
<website>http://www.elgg.org/</website>
+ <bugtracker>http://trac.elgg.org</bugtracker>
<copyright>See COPYRIGHT.txt</copyright>
<license>GNU General Public License version 2</license>
diff --git a/mod/developers/views/default/theme_preview/grid.php b/mod/developers/views/default/theme_preview/grid.php
new file mode 100644
index 000000000..0c4cbb251
--- /dev/null
+++ b/mod/developers/views/default/theme_preview/grid.php
@@ -0,0 +1,114 @@
+<?php
+/**
+ * Grid CSS
+ */
+
+?>
+<div class="elgg-grid">
+ <div class="elgg-col elgg-col-1of1"><div class="elgg-inner"><h3>1/1</h3></div></div>
+</div>
+<div class="elgg-grid">
+ <div class="elgg-col elgg-col-1of2"><div class="elgg-inner"><h3>1/2</h3></div></div>
+ <div class="elgg-col elgg-col-1of2"><div class="elgg-inner"><h3>1/2</h3></div></div>
+</div>
+<div class="elgg-grid">
+ <div class="elgg-col elgg-col-1of3"><div class="elgg-inner"><h3>1/3</h3></div></div>
+ <div class="elgg-col elgg-col-2of3"><div class="elgg-inner"><h3>2/3</h3></div></div>
+</div>
+<div class="elgg-grid">
+ <div class="elgg-col elgg-col-3of4"><div class="elgg-inner"><h3>3/4</h3></div></div>
+ <div class="elgg-col elgg-col-1of4"><div class="elgg-inner"><h3>1/4</h3></div></div>
+</div>
+<div class="elgg-grid">
+ <div class="elgg-col elgg-col-1of5"><div class="elgg-inner"><h3>1/5</h3></div></div>
+ <div class="elgg-col elgg-col-4of5"><div class="elgg-inner"><h3>4/5</h3></div></div>
+</div>
+<div class="elgg-grid">
+ <div class="elgg-col elgg-col-3of5"><div class="elgg-inner"><h3>3/5</h3></div></div>
+ <div class="elgg-col elgg-col-2of5"><div class="elgg-inner"><h3>2/5</h3></div></div>
+</div>
+<div class="elgg-grid">
+ <div class="elgg-col elgg-col-1of6"><div class="elgg-inner"><h3>1/6</h3></div></div>
+ <div class="elgg-col elgg-col-5of6"><div class="elgg-inner"><h3>5/6</h3></div></div>
+</div>
+<div class="elgg-grid">
+ <style>
+ h3 { text-align: center; }
+ .elgg-col > .elgg-inner {
+ border: 1px solid #cccccc;
+ border-radius: 5px;
+ padding: 5px;
+ }
+ </style>
+ <div class="elgg-col elgg-col-1of5">
+ <div class="elgg-inner">
+ <h3>1/5</h3>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div>
+ </div>
+ <div class="elgg-col elgg-col-3of5">
+ <div class="elgg-inner clearfix">
+ <h3>3/5</h3>
+ <div class="elgg-grid">
+ <div class="elgg-col elgg-col-1of2">
+ <div class="elgg-inner">
+ <h3>1/2</h3>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div>
+ </div>
+ <div class="elgg-col elgg-col-1of2 elgg-col-last">
+ <div class="elgg-inner">
+ <h3>1/2</h3>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div>
+ </div>
+ </div>
+ <div class="elgg-grid">
+ <div class="elgg-col elgg-col-1of3">
+ <div class="elgg-inner">
+ <h3>1/3</h3>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div>
+ </div>
+ <div class="elgg-col elgg-col-2of3 elgg-col-last">
+ <div class="elgg-inner">
+ <h3>2/3</h3>
+ <div class="elgg-grid">
+ <div class="elgg-col elgg-col-1of2">
+ <div class="elgg-inner">
+ <h3>1/2</h3>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div>
+ </div>
+ <div class="elgg-col elgg-col-1of2 elgg-col-last">
+ <div class="elgg-inner">
+ <h3>1/2</h3>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div>
+ </div>
+ </div>
+ <div class="elgg-grid">
+ <div class="elgg-col elgg-col-1of1">
+ <div class="elgg-inner">
+ <h3>1</h3>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="elgg-col elgg-col-1of5 elgg-col-last">
+ <div class="elgg-inner">
+ <h3>1/5</h3>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+ </div>
+ </div>
+</div>
diff --git a/mod/groups/actions/groups/edit.php b/mod/groups/actions/groups/edit.php
index b513a6098..df2464a65 100644
--- a/mod/groups/actions/groups/edit.php
+++ b/mod/groups/actions/groups/edit.php
@@ -15,6 +15,8 @@ function profile_array_decoder(&$v) {
$v = html_entity_decode($v, ENT_COMPAT, 'UTF-8');
}
+elgg_make_sticky_form('groups');
+
// Get group fields
$input = array();
foreach ($CONFIG->group as $shortname => $valuetype) {
@@ -39,10 +41,14 @@ $user = elgg_get_logged_in_user_entity();
$group_guid = (int)get_input('group_guid');
$new_group_flag = $group_guid == 0;
+if ($new_group_flag && elgg_get_plugin_setting('limited_groups', 'groups') == 'yes' && !elgg_is_admin_logged_in()) {
+ register_error(elgg_echo("groups:cantcreate"));
+ forward(REFERER);
+}
+
$group = new ElggGroup($group_guid); // load if present, if not create a new group
if (($group_guid) && (!$group->canEdit())) {
register_error(elgg_echo("groups:cantedit"));
-
forward(REFERER);
}
@@ -106,6 +112,9 @@ if (elgg_get_plugin_setting('hidden_groups', 'groups') == 'yes') {
$group->save();
+// group saved so clear sticky form
+elgg_clear_sticky_form('groups');
+
// group creator needs to be member of new group and river entry created
if ($new_group_flag) {
elgg_set_page_owner_guid($group->guid);
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
index 4868aa334..0ca980108 100644
--- a/mod/groups/languages/en.php
+++ b/mod/groups/languages/en.php
@@ -41,6 +41,7 @@ $english = array(
'groups:noaccess' => 'No access to group',
'groups:permissions:error' => 'You do not have the permissions for this',
'groups:ingroup' => 'in the group',
+ 'groups:cantcreate' => 'You can not create a group. Only admins can.',
'groups:cantedit' => 'You can not edit this group',
'groups:saved' => 'Group saved',
'groups:featured' => 'Featured groups',
@@ -259,6 +260,7 @@ or click below to view the group's join requests:
'groups:forumtopic:edited' => 'Forum topic successfully edited.',
'groups:allowhiddengroups' => 'Do you want to allow private (invisible) groups?',
+ 'groups:whocancreate' => 'Who can create new groups?',
/**
* Action messages
@@ -285,4 +287,4 @@ or click below to view the group's join requests:
);
-add_translation("en", $english); \ No newline at end of file
+add_translation("en", $english);
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php
index 51ae89a87..dfbb1154b 100644
--- a/mod/groups/lib/groups.php
+++ b/mod/groups/lib/groups.php
@@ -12,7 +12,9 @@ function groups_handle_all_page() {
elgg_pop_breadcrumb();
elgg_push_breadcrumb(elgg_echo('groups'));
- elgg_register_title_button();
+ if (elgg_get_plugin_setting('limited_groups', 'groups') != 'yes' || elgg_is_admin_logged_in()) {
+ elgg_register_title_button();
+ }
$selected_tab = get_input('filter', 'newest');
@@ -184,7 +186,11 @@ function groups_handle_edit_page($page, $guid = 0) {
elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
$title = elgg_echo('groups:add');
elgg_push_breadcrumb($title);
- $content = elgg_view('groups/edit');
+ if (elgg_get_plugin_setting('limited_groups', 'groups') != 'yes' || elgg_is_admin_logged_in()) {
+ $content = elgg_view('groups/edit');
+ } else {
+ $content = elgg_echo('groups:cantcreate');
+ }
} else {
$title = elgg_echo("groups:edit");
$group = get_entity($guid);
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 48df338c0..c591410c5 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -196,6 +196,10 @@ function groups_page_handler($page) {
elgg_load_library('elgg:groups');
+ if (!isset($page[0])) {
+ $page[0] = 'all';
+ }
+
elgg_push_breadcrumb(elgg_echo('groups'), "groups/all");
switch ($page[0]) {
@@ -785,6 +789,10 @@ function discussion_page_handler($page) {
elgg_load_library('elgg:discussion');
+ if (!isset($page[0])) {
+ $page[0] = 'all';
+ }
+
elgg_push_breadcrumb(elgg_echo('discussion'), 'discussion/all');
switch ($page[0]) {
diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php
index 8055b6430..7540d1bf9 100644
--- a/mod/groups/views/default/forms/groups/edit.php
+++ b/mod/groups/views/default/forms/groups/edit.php
@@ -5,8 +5,16 @@
* @package ElggGroups
*/
+if (elgg_is_sticky_form('groups')) {
+ $sticky_values = elgg_get_sticky_values('groups');
+ elgg_clear_sticky_form('groups');
+}
+
// new groups default to open membership
-if (isset($vars['entity'])) {
+if (isset($sticky_values)) {
+ $membership = $sticky_values['membership'];
+ $access = $sticky_values['access_id'];
+} elseif (isset($vars['entity'])) {
$membership = $vars['entity']->membership;
$access = $vars['entity']->access_id;
if ($access != ACCESS_PUBLIC && $access != ACCESS_LOGGED_IN) {
@@ -27,7 +35,7 @@ if (isset($vars['entity'])) {
<label><?php echo elgg_echo("groups:name"); ?></label><br />
<?php echo elgg_view("input/text", array(
'name' => 'name',
- 'value' => $vars['entity']->name,
+ 'value' => isset($sticky_values['name']) ? $sticky_values['name'] : $vars['entity']->name,
));
?>
</div>
@@ -45,7 +53,7 @@ if ($group_profile_fields > 0) {
echo "</label>$line_break";
echo elgg_view("input/{$valtype}", array(
'name' => $shortname,
- 'value' => $vars['entity']->$shortname,
+ 'value' => isset($sticky_values[$shortname]) ? $sticky_values[$shortname] : $vars['entity']->$shortname,
));
echo '</div>';
}
diff --git a/mod/groups/views/default/plugins/groups/settings.php b/mod/groups/views/default/plugins/groups/settings.php
index 7197dcb37..41ea146db 100644
--- a/mod/groups/views/default/plugins/groups/settings.php
+++ b/mod/groups/views/default/plugins/groups/settings.php
@@ -8,6 +8,11 @@ if (!isset($vars['entity']->hidden_groups)) {
$vars['entity']->hidden_groups = 'no';
}
+// set default value
+if (!isset($vars['entity']->limited_groups)) {
+ $vars['entity']->limited_groups = 'no';
+}
+
echo '<div>';
echo elgg_echo('groups:allowhiddengroups');
echo ' ';
@@ -20,3 +25,16 @@ echo elgg_view('input/dropdown', array(
'value' => $vars['entity']->hidden_groups,
));
echo '</div>';
+
+echo '<div>';
+echo elgg_echo('groups:whocancreate');
+echo ' ';
+echo elgg_view('input/dropdown', array(
+ 'name' => 'params[limited_groups]',
+ 'options_values' => array(
+ 'no' => elgg_echo('LOGGED_IN'),
+ 'yes' => elgg_echo('admin')
+ ),
+ 'value' => $vars['entity']->limited_groups,
+));
+echo '</div>';
diff --git a/mod/likes/actions/likes/delete.php b/mod/likes/actions/likes/delete.php
index 88cb84467..322d512e8 100644
--- a/mod/likes/actions/likes/delete.php
+++ b/mod/likes/actions/likes/delete.php
@@ -4,8 +4,23 @@
*
*/
+// Support deleting by id in case we're deleting another user's likes
$id = (int) get_input('id');
-$like = elgg_get_annotation_from_id($id);
+
+$like = NULL;
+if ($id) {
+ $like = elgg_get_annotation_from_id($id);
+}
+
+if (!$like) {
+ $likes = elgg_get_annotations(array(
+ 'guid' => (int) get_input('guid'),
+ 'annotation_owner_guid' => elgg_get_logged_in_user_guid(),
+ 'annotation_name' => 'likes',
+ ));
+ $like = $likes[0];
+}
+
if ($like && $like->canEdit()) {
$like->delete();
system_message(elgg_echo("likes:deleted"));
diff --git a/mod/likes/languages/en.php b/mod/likes/languages/en.php
index b9460aa10..bdbd2a963 100644
--- a/mod/likes/languages/en.php
+++ b/mod/likes/languages/en.php
@@ -17,7 +17,7 @@ $english = array(
'likes:userlikedthis' => '%s like',
'likes:userslikedthis' => '%s likes',
'likes:river:annotate' => 'likes',
- 'likes:delete:confirm' => 'Are you sure you want to unlike this?',
+ 'likes:delete:confirm' => 'Are you sure you want to delete this like?',
'river:likes' => 'likes %s %s',
diff --git a/mod/likes/views/default/annotation/likes.php b/mod/likes/views/default/annotation/likes.php
index abd4df823..2b5acc520 100644
--- a/mod/likes/views/default/annotation/likes.php
+++ b/mod/likes/views/default/annotation/likes.php
@@ -29,11 +29,11 @@ $friendlytime = elgg_view_friendly_time($like->time_created);
if ($like->canEdit()) {
$delete_button = elgg_view("output/confirmlink",array(
- 'href' => "action/likes/delete?id={$like->id}",
- 'text' => "<span class=\"elgg-icon elgg-icon-delete float-alt\"></span>",
- 'confirm' => elgg_echo('likes:delete:confirm'),
- 'encode_text' => false,
- ));
+ 'href' => "action/likes/delete?id={$like->id}",
+ 'text' => "<span class=\"elgg-icon elgg-icon-delete float-alt\"></span>",
+ 'confirm' => elgg_echo('likes:delete:confirm'),
+ 'encode_text' => false,
+ ));
}
$body = <<<HTML
diff --git a/mod/likes/views/default/likes/button.php b/mod/likes/views/default/likes/button.php
index 956bbcb19..bc7c8fd8a 100644
--- a/mod/likes/views/default/likes/button.php
+++ b/mod/likes/views/default/likes/button.php
@@ -24,13 +24,7 @@ if (elgg_is_logged_in() && $vars['entity']->canAnnotate(0, 'likes')) {
);
$likes_button = elgg_view('output/url', $params);
} else {
- $like = elgg_get_annotations(array(
- 'guid' => $guid,
- 'annotation_owner_guid' => elgg_get_logged_in_user_guid(),
- 'annotation_name' => 'likes',
- ));
- $like = $like[0];
- $url = elgg_get_site_url() . "action/likes/delete?id={$like->id}";
+ $url = elgg_get_site_url() . "action/likes/delete?guid={$guid}";
$params = array(
'href' => $url,
'text' => elgg_view_icon('thumbs-up-alt'),
diff --git a/mod/messages/manifest.xml b/mod/messages/manifest.xml
index 73a58d9d4..6e3462901 100644
--- a/mod/messages/manifest.xml
+++ b/mod/messages/manifest.xml
@@ -6,8 +6,8 @@
<category>bundled</category>
<category>communication</category>
<description>Elgg internal messages plugin. This plugin lets user send each other messages.</description>
- <copyright>See COPYRIGHT.txt</copyright>
<website>http://www.elgg.org/</website>
+ <copyright>See COPYRIGHT.txt</copyright>
<license>GNU General Public License version 2</license>
<requires>
<type>elgg_release</type>
diff --git a/mod/profile/start.php b/mod/profile/start.php
index abe044632..ab596f235 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -56,6 +56,8 @@ function profile_page_handler($page) {
$username = $page[0];
$user = get_user_by_username($username);
elgg_set_page_owner_guid($user->guid);
+ } elseif (elgg_is_logged_in()) {
+ forward(elgg_get_logged_in_user_entity()->getURL());
}
// short circuit if invalid or banned username