From 17c28c8161e8c551ce4e4a1345e525cbb785fb59 Mon Sep 17 00:00:00 2001 From: Sem Date: Sun, 8 Jul 2012 09:48:50 +0200 Subject: Fixes #3646. Added suport for Repository, Bugtracker and Donations in manifest. --- mod/blog/manifest.xml | 1 + mod/bookmarks/manifest.xml | 1 + mod/categories/manifest.xml | 1 + mod/custom_index/manifest.xml | 1 + mod/dashboard/manifest.xml | 1 + mod/developers/manifest.xml | 3 +++ mod/diagnostics/manifest.xml | 1 + mod/embed/manifest.xml | 1 + mod/externalpages/manifest.xml | 1 + mod/file/manifest.xml | 1 + mod/garbagecollector/manifest.xml | 1 + mod/groups/manifest.xml | 1 + mod/htmlawed/manifest.xml | 1 + mod/invitefriends/manifest.xml | 1 + mod/likes/manifest.xml | 1 + mod/logbrowser/manifest.xml | 1 + mod/logrotate/manifest.xml | 1 + mod/members/manifest.xml | 1 + mod/messageboard/manifest.xml | 1 + mod/messages/manifest.xml | 3 ++- mod/notifications/manifest.xml | 1 + mod/oauth_api/manifest.xml | 1 + mod/pages/manifest.xml | 1 + mod/profile/manifest.xml | 1 + mod/reportedcontent/manifest.xml | 1 + mod/search/manifest.xml | 1 + mod/tagcloud/manifest.xml | 1 + mod/thewire/manifest.xml | 1 + mod/tinymce/manifest.xml | 1 + mod/twitter/manifest.xml | 1 + mod/twitter_api/manifest.xml | 1 + mod/uservalidationbyemail/manifest.xml | 1 + mod/zaudio/manifest.xml | 1 + 33 files changed, 36 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/blog/manifest.xml b/mod/blog/manifest.xml index 29ee1bfc8..a68c30969 100644 --- a/mod/blog/manifest.xml +++ b/mod/blog/manifest.xml @@ -9,6 +9,7 @@ Blog plugin Adds simple blogging capabilities to your Elgg installation. http://elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/bookmarks/manifest.xml b/mod/bookmarks/manifest.xml index b95af87f8..ebe8704a6 100644 --- a/mod/bookmarks/manifest.xml +++ b/mod/bookmarks/manifest.xml @@ -9,6 +9,7 @@ Add and comment on bookmarks. Adds the ability for users to bookmark internal and external sites. Other users can then comment on the bookmarks. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/categories/manifest.xml b/mod/categories/manifest.xml index 4a6bd0864..dbc84bed0 100644 --- a/mod/categories/manifest.xml +++ b/mod/categories/manifest.xml @@ -8,6 +8,7 @@ Add site-wide categories Site-wide Categories lets administrators define categories that users across the site can add content to. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/custom_index/manifest.xml b/mod/custom_index/manifest.xml index 80187efbc..3bdcbd333 100644 --- a/mod/custom_index/manifest.xml +++ b/mod/custom_index/manifest.xml @@ -6,6 +6,7 @@ bundled A demonstration of how to create a front page plugin. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/dashboard/manifest.xml b/mod/dashboard/manifest.xml index cbbc1044c..20ed074a7 100644 --- a/mod/dashboard/manifest.xml +++ b/mod/dashboard/manifest.xml @@ -6,6 +6,7 @@ bundled A widget-based dashboard for your users http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/developers/manifest.xml b/mod/developers/manifest.xml index 93a12945d..58e8e24f0 100644 --- a/mod/developers/manifest.xml +++ b/mod/developers/manifest.xml @@ -8,6 +8,9 @@ Developer tools for Elgg A set of tools for writing plugins and themes. It is recommended that you have this plugin at the top of the plugin list. http://www.elgg.org/ + https://github.com/Elgg/Elgg + http://trac.elgg.org + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/diagnostics/manifest.xml b/mod/diagnostics/manifest.xml index 21e847d22..df4a81b02 100644 --- a/mod/diagnostics/manifest.xml +++ b/mod/diagnostics/manifest.xml @@ -8,6 +8,7 @@ admin Elgg diagnostics tool http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/embed/manifest.xml b/mod/embed/manifest.xml index 81ca9194e..546471647 100644 --- a/mod/embed/manifest.xml +++ b/mod/embed/manifest.xml @@ -7,6 +7,7 @@ enhancement Allows users to easily upload and embed media into text areas. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/externalpages/manifest.xml b/mod/externalpages/manifest.xml index f2aef09f3..8c474ddab 100644 --- a/mod/externalpages/manifest.xml +++ b/mod/externalpages/manifest.xml @@ -6,6 +6,7 @@ bundled Create simple web pages for about, contact, privacy, and terms. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/file/manifest.xml b/mod/file/manifest.xml index 26282a8e3..7d69f4280 100644 --- a/mod/file/manifest.xml +++ b/mod/file/manifest.xml @@ -8,6 +8,7 @@ widget File browser plugin http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/garbagecollector/manifest.xml b/mod/garbagecollector/manifest.xml index 5aafebf38..ddf15656a 100644 --- a/mod/garbagecollector/manifest.xml +++ b/mod/garbagecollector/manifest.xml @@ -7,6 +7,7 @@ admin Perform some database cleanup tasks http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/groups/manifest.xml b/mod/groups/manifest.xml index fd28360d0..574ba1985 100644 --- a/mod/groups/manifest.xml +++ b/mod/groups/manifest.xml @@ -8,6 +8,7 @@ widget Provides group support for elgg http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/htmlawed/manifest.xml b/mod/htmlawed/manifest.xml index 6807e96a4..e4d8fa145 100644 --- a/mod/htmlawed/manifest.xml +++ b/mod/htmlawed/manifest.xml @@ -7,6 +7,7 @@ security Provides security filtering. Running a site with this plugin disabled is extremely insecure. DO NOT DISABLE. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/invitefriends/manifest.xml b/mod/invitefriends/manifest.xml index b36238a05..220948c30 100644 --- a/mod/invitefriends/manifest.xml +++ b/mod/invitefriends/manifest.xml @@ -7,6 +7,7 @@ social Invite friends via email invites. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/likes/manifest.xml b/mod/likes/manifest.xml index 62835fcf5..e0a9b10f2 100644 --- a/mod/likes/manifest.xml +++ b/mod/likes/manifest.xml @@ -7,6 +7,7 @@ social Enables users to like content on the site. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/logbrowser/manifest.xml b/mod/logbrowser/manifest.xml index 4527e2cbb..17b08803c 100644 --- a/mod/logbrowser/manifest.xml +++ b/mod/logbrowser/manifest.xml @@ -7,6 +7,7 @@ admin Browse the system event log http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/logrotate/manifest.xml b/mod/logrotate/manifest.xml index 1aa62e2e7..79b37dbbc 100644 --- a/mod/logrotate/manifest.xml +++ b/mod/logrotate/manifest.xml @@ -7,6 +7,7 @@ admin Rotate the system log at specific intervals http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/members/manifest.xml b/mod/members/manifest.xml index 8b18c9f91..40a05892c 100644 --- a/mod/members/manifest.xml +++ b/mod/members/manifest.xml @@ -6,6 +6,7 @@ bundled Lists the members of your site http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/messageboard/manifest.xml b/mod/messageboard/manifest.xml index 617813725..b4188ab31 100644 --- a/mod/messageboard/manifest.xml +++ b/mod/messageboard/manifest.xml @@ -7,6 +7,7 @@ widget This plugin allows users to put a message board on their profile for other users to post comments. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/messages/manifest.xml b/mod/messages/manifest.xml index 73a58d9d4..83f7bba64 100644 --- a/mod/messages/manifest.xml +++ b/mod/messages/manifest.xml @@ -6,8 +6,9 @@ bundled communication Elgg internal messages plugin. This plugin lets user send each other messages. - See COPYRIGHT.txt http://www.elgg.org/ + http://elgg.org/supporter.php + See COPYRIGHT.txt GNU General Public License version 2 elgg_release diff --git a/mod/notifications/manifest.xml b/mod/notifications/manifest.xml index 205476881..d961ce138 100644 --- a/mod/notifications/manifest.xml +++ b/mod/notifications/manifest.xml @@ -6,6 +6,7 @@ bundled Elgg notifications plugin http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/oauth_api/manifest.xml b/mod/oauth_api/manifest.xml index 991be6a22..96b9c7280 100644 --- a/mod/oauth_api/manifest.xml +++ b/mod/oauth_api/manifest.xml @@ -7,6 +7,7 @@ bundled api http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/pages/manifest.xml b/mod/pages/manifest.xml index 4cf999f45..a764171b4 100644 --- a/mod/pages/manifest.xml +++ b/mod/pages/manifest.xml @@ -8,6 +8,7 @@ widget Collaborative editing tool. Enables users to create pages similar to a wiki without having to know wiki syntax. http://www.elgg.org + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/profile/manifest.xml b/mod/profile/manifest.xml index 86fbc7b7b..b7ad5185e 100644 --- a/mod/profile/manifest.xml +++ b/mod/profile/manifest.xml @@ -7,6 +7,7 @@ bundled social http://elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License Version 2 true diff --git a/mod/reportedcontent/manifest.xml b/mod/reportedcontent/manifest.xml index e96620b01..d98ff383b 100644 --- a/mod/reportedcontent/manifest.xml +++ b/mod/reportedcontent/manifest.xml @@ -6,6 +6,7 @@ bundled Adds the option for users to report content and for admins to check it out. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/search/manifest.xml b/mod/search/manifest.xml index 513d3a6b9..1bc974729 100644 --- a/mod/search/manifest.xml +++ b/mod/search/manifest.xml @@ -6,6 +6,7 @@ bundled Allow search across entities of the site http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/tagcloud/manifest.xml b/mod/tagcloud/manifest.xml index c0f89f35e..fd91d92b8 100644 --- a/mod/tagcloud/manifest.xml +++ b/mod/tagcloud/manifest.xml @@ -7,6 +7,7 @@ widget Widget-based tag clouds. http://cashcostello.com/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/thewire/manifest.xml b/mod/thewire/manifest.xml index 962ed12f1..950ecfbed 100644 --- a/mod/thewire/manifest.xml +++ b/mod/thewire/manifest.xml @@ -7,6 +7,7 @@ content Microblogging for Elgg http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/tinymce/manifest.xml b/mod/tinymce/manifest.xml index 61bf0c22c..fb36c4141 100644 --- a/mod/tinymce/manifest.xml +++ b/mod/tinymce/manifest.xml @@ -7,6 +7,7 @@ enhancement TinyMCE plugin. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/twitter/manifest.xml b/mod/twitter/manifest.xml index 18fa8c957..18031deec 100644 --- a/mod/twitter/manifest.xml +++ b/mod/twitter/manifest.xml @@ -7,6 +7,7 @@ widget Elgg simple twitter widget http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/twitter_api/manifest.xml b/mod/twitter_api/manifest.xml index 86bba4b50..88d43aa5e 100644 --- a/mod/twitter_api/manifest.xml +++ b/mod/twitter_api/manifest.xml @@ -7,6 +7,7 @@ api bundled http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/uservalidationbyemail/manifest.xml b/mod/uservalidationbyemail/manifest.xml index 800dd2641..6a15fd0cf 100644 --- a/mod/uservalidationbyemail/manifest.xml +++ b/mod/uservalidationbyemail/manifest.xml @@ -7,6 +7,7 @@ security Simple user account validation via email. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/zaudio/manifest.xml b/mod/zaudio/manifest.xml index 54f819658..a103052aa 100644 --- a/mod/zaudio/manifest.xml +++ b/mod/zaudio/manifest.xml @@ -8,6 +8,7 @@ multimedia This simple plugin lets users play mp3's in the page. http://www.elgg.org/ + http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 -- cgit v1.2.3 From 8c0897d92395d897a8e40a2d1b97e5f838520296 Mon Sep 17 00:00:00 2001 From: Sem Date: Sun, 8 Jul 2012 12:21:19 +0200 Subject: Fixes #1792. Added pluggin setting in groups to set who can create groups, logged in users or only admins. --- mod/groups/actions/groups/edit.php | 6 +++++- mod/groups/languages/en.php | 4 +++- mod/groups/lib/groups.php | 10 ++++++++-- mod/groups/views/default/plugins/groups/settings.php | 18 ++++++++++++++++++ 4 files changed, 34 insertions(+), 4 deletions(-) (limited to 'mod') diff --git a/mod/groups/actions/groups/edit.php b/mod/groups/actions/groups/edit.php index b513a6098..a76bde0ac 100644 --- a/mod/groups/actions/groups/edit.php +++ b/mod/groups/actions/groups/edit.php @@ -39,10 +39,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); } 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/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 '
'; echo elgg_echo('groups:allowhiddengroups'); echo ' '; @@ -20,3 +25,16 @@ echo elgg_view('input/dropdown', array( 'value' => $vars['entity']->hidden_groups, )); echo '
'; + +echo '
'; +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 '
'; -- cgit v1.2.3 From 84666d49fcc1191075f45b75a164ed0383c2c375 Mon Sep 17 00:00:00 2001 From: Sem Date: Wed, 11 Jul 2012 01:24:57 +0200 Subject: Fixes #4381. Group edit form made sticky. --- mod/groups/actions/groups/edit.php | 5 +++++ mod/groups/views/default/forms/groups/edit.php | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/groups/actions/groups/edit.php b/mod/groups/actions/groups/edit.php index b513a6098..a3ad91622 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) { @@ -106,6 +108,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/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'])) {
'name', - 'value' => $vars['entity']->name, + 'value' => isset($sticky_values['name']) ? $sticky_values['name'] : $vars['entity']->name, )); ?> @@ -45,7 +53,7 @@ if ($group_profile_fields > 0) { echo "$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 ''; } -- cgit v1.2.3 From d6953c9955b2b9e3c245936e448e7be41058bb9b Mon Sep 17 00:00:00 2001 From: Sem Date: Fri, 13 Jul 2012 09:53:15 +0200 Subject: Fixes #4687. Handle URLs on plugins that include only handler name. --- mod/bookmarks/start.php | 5 +++++ mod/groups/start.php | 8 ++++++++ mod/profile/start.php | 2 ++ 3 files changed, 15 insertions(+) (limited to 'mod') 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/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/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 -- cgit v1.2.3 From 2d986f9f35167ee66d0f084d3de6e70c78b69f7b Mon Sep 17 00:00:00 2001 From: Matt Beckett Date: Sat, 14 Jul 2012 01:37:05 -0600 Subject: Fixes #3240 - makes categories sticky --- mod/categories/views/default/input/categories.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mod') 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(); -- cgit v1.2.3 From d7a5c24dd7c31318cf2e4405337919b7fd5ec304 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 14 Jul 2012 07:12:12 -0400 Subject: Fixes #4691 not passing name to the form since not valid --- mod/blog/lib/blog.php | 1 - mod/blog/views/default/js/blog/save_draft.php | 6 +++--- views/default/page/elements/comments.php | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'mod') 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/views/default/page/elements/comments.php b/views/default/page/elements/comments.php index cf9b5f08b..97cb9574e 100644 --- a/views/default/page/elements/comments.php +++ b/views/default/page/elements/comments.php @@ -36,8 +36,7 @@ if ($html) { } if ($show_add_form) { - $form_vars = array('name' => 'elgg_add_comment'); - echo elgg_view_form('comments/add', $form_vars, $vars); + echo elgg_view_form('comments/add', array(), $vars); } echo ''; -- cgit v1.2.3 From 037eacc4a5015dc048c4fff080349aa96a9b918e Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Mon, 16 Jul 2012 22:10:53 -0400 Subject: don't want to go overboard in asking for donations --- mod/blog/manifest.xml | 1 - mod/bookmarks/manifest.xml | 1 - mod/categories/manifest.xml | 1 - mod/custom_index/manifest.xml | 1 - mod/dashboard/manifest.xml | 1 - mod/developers/manifest.xml | 2 -- mod/diagnostics/manifest.xml | 1 - mod/embed/manifest.xml | 1 - mod/externalpages/manifest.xml | 1 - mod/file/manifest.xml | 1 - mod/garbagecollector/manifest.xml | 1 - mod/groups/manifest.xml | 1 - mod/htmlawed/manifest.xml | 1 - mod/invitefriends/manifest.xml | 1 - mod/likes/manifest.xml | 1 - mod/logbrowser/manifest.xml | 1 - mod/logrotate/manifest.xml | 1 - mod/members/manifest.xml | 1 - mod/messageboard/manifest.xml | 1 - mod/messages/manifest.xml | 1 - mod/notifications/manifest.xml | 1 - mod/oauth_api/manifest.xml | 1 - mod/pages/manifest.xml | 1 - mod/profile/manifest.xml | 1 - mod/reportedcontent/manifest.xml | 1 - mod/search/manifest.xml | 1 - mod/tagcloud/manifest.xml | 1 - mod/thewire/manifest.xml | 1 - mod/tinymce/manifest.xml | 1 - mod/twitter/manifest.xml | 1 - mod/twitter_api/manifest.xml | 1 - mod/uservalidationbyemail/manifest.xml | 1 - mod/zaudio/manifest.xml | 1 - 33 files changed, 34 deletions(-) (limited to 'mod') diff --git a/mod/blog/manifest.xml b/mod/blog/manifest.xml index a68c30969..29ee1bfc8 100644 --- a/mod/blog/manifest.xml +++ b/mod/blog/manifest.xml @@ -9,7 +9,6 @@ Blog plugin Adds simple blogging capabilities to your Elgg installation. http://elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/bookmarks/manifest.xml b/mod/bookmarks/manifest.xml index ebe8704a6..b95af87f8 100644 --- a/mod/bookmarks/manifest.xml +++ b/mod/bookmarks/manifest.xml @@ -9,7 +9,6 @@ Add and comment on bookmarks. Adds the ability for users to bookmark internal and external sites. Other users can then comment on the bookmarks. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/categories/manifest.xml b/mod/categories/manifest.xml index dbc84bed0..4a6bd0864 100644 --- a/mod/categories/manifest.xml +++ b/mod/categories/manifest.xml @@ -8,7 +8,6 @@ Add site-wide categories Site-wide Categories lets administrators define categories that users across the site can add content to. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/custom_index/manifest.xml b/mod/custom_index/manifest.xml index 3bdcbd333..80187efbc 100644 --- a/mod/custom_index/manifest.xml +++ b/mod/custom_index/manifest.xml @@ -6,7 +6,6 @@ bundled A demonstration of how to create a front page plugin. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/dashboard/manifest.xml b/mod/dashboard/manifest.xml index 20ed074a7..cbbc1044c 100644 --- a/mod/dashboard/manifest.xml +++ b/mod/dashboard/manifest.xml @@ -6,7 +6,6 @@ bundled A widget-based dashboard for your users http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/developers/manifest.xml b/mod/developers/manifest.xml index 58e8e24f0..e31998872 100644 --- a/mod/developers/manifest.xml +++ b/mod/developers/manifest.xml @@ -8,9 +8,7 @@ Developer tools for Elgg A set of tools for writing plugins and themes. It is recommended that you have this plugin at the top of the plugin list. http://www.elgg.org/ - https://github.com/Elgg/Elgg http://trac.elgg.org - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/diagnostics/manifest.xml b/mod/diagnostics/manifest.xml index df4a81b02..21e847d22 100644 --- a/mod/diagnostics/manifest.xml +++ b/mod/diagnostics/manifest.xml @@ -8,7 +8,6 @@ admin Elgg diagnostics tool http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/embed/manifest.xml b/mod/embed/manifest.xml index 546471647..81ca9194e 100644 --- a/mod/embed/manifest.xml +++ b/mod/embed/manifest.xml @@ -7,7 +7,6 @@ enhancement Allows users to easily upload and embed media into text areas. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/externalpages/manifest.xml b/mod/externalpages/manifest.xml index 8c474ddab..f2aef09f3 100644 --- a/mod/externalpages/manifest.xml +++ b/mod/externalpages/manifest.xml @@ -6,7 +6,6 @@ bundled Create simple web pages for about, contact, privacy, and terms. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/file/manifest.xml b/mod/file/manifest.xml index 7d69f4280..26282a8e3 100644 --- a/mod/file/manifest.xml +++ b/mod/file/manifest.xml @@ -8,7 +8,6 @@ widget File browser plugin http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/garbagecollector/manifest.xml b/mod/garbagecollector/manifest.xml index ddf15656a..5aafebf38 100644 --- a/mod/garbagecollector/manifest.xml +++ b/mod/garbagecollector/manifest.xml @@ -7,7 +7,6 @@ admin Perform some database cleanup tasks http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/groups/manifest.xml b/mod/groups/manifest.xml index 574ba1985..fd28360d0 100644 --- a/mod/groups/manifest.xml +++ b/mod/groups/manifest.xml @@ -8,7 +8,6 @@ widget Provides group support for elgg http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/htmlawed/manifest.xml b/mod/htmlawed/manifest.xml index e4d8fa145..6807e96a4 100644 --- a/mod/htmlawed/manifest.xml +++ b/mod/htmlawed/manifest.xml @@ -7,7 +7,6 @@ security Provides security filtering. Running a site with this plugin disabled is extremely insecure. DO NOT DISABLE. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/invitefriends/manifest.xml b/mod/invitefriends/manifest.xml index 220948c30..b36238a05 100644 --- a/mod/invitefriends/manifest.xml +++ b/mod/invitefriends/manifest.xml @@ -7,7 +7,6 @@ social Invite friends via email invites. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/likes/manifest.xml b/mod/likes/manifest.xml index e0a9b10f2..62835fcf5 100644 --- a/mod/likes/manifest.xml +++ b/mod/likes/manifest.xml @@ -7,7 +7,6 @@ social Enables users to like content on the site. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/logbrowser/manifest.xml b/mod/logbrowser/manifest.xml index 17b08803c..4527e2cbb 100644 --- a/mod/logbrowser/manifest.xml +++ b/mod/logbrowser/manifest.xml @@ -7,7 +7,6 @@ admin Browse the system event log http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/logrotate/manifest.xml b/mod/logrotate/manifest.xml index 79b37dbbc..1aa62e2e7 100644 --- a/mod/logrotate/manifest.xml +++ b/mod/logrotate/manifest.xml @@ -7,7 +7,6 @@ admin Rotate the system log at specific intervals http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/members/manifest.xml b/mod/members/manifest.xml index 40a05892c..8b18c9f91 100644 --- a/mod/members/manifest.xml +++ b/mod/members/manifest.xml @@ -6,7 +6,6 @@ bundled Lists the members of your site http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/messageboard/manifest.xml b/mod/messageboard/manifest.xml index b4188ab31..617813725 100644 --- a/mod/messageboard/manifest.xml +++ b/mod/messageboard/manifest.xml @@ -7,7 +7,6 @@ widget This plugin allows users to put a message board on their profile for other users to post comments. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/messages/manifest.xml b/mod/messages/manifest.xml index 83f7bba64..6e3462901 100644 --- a/mod/messages/manifest.xml +++ b/mod/messages/manifest.xml @@ -7,7 +7,6 @@ communication Elgg internal messages plugin. This plugin lets user send each other messages. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/notifications/manifest.xml b/mod/notifications/manifest.xml index d961ce138..205476881 100644 --- a/mod/notifications/manifest.xml +++ b/mod/notifications/manifest.xml @@ -6,7 +6,6 @@ bundled Elgg notifications plugin http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/oauth_api/manifest.xml b/mod/oauth_api/manifest.xml index 96b9c7280..991be6a22 100644 --- a/mod/oauth_api/manifest.xml +++ b/mod/oauth_api/manifest.xml @@ -7,7 +7,6 @@ bundled api http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/pages/manifest.xml b/mod/pages/manifest.xml index a764171b4..4cf999f45 100644 --- a/mod/pages/manifest.xml +++ b/mod/pages/manifest.xml @@ -8,7 +8,6 @@ widget Collaborative editing tool. Enables users to create pages similar to a wiki without having to know wiki syntax. http://www.elgg.org - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/profile/manifest.xml b/mod/profile/manifest.xml index b7ad5185e..86fbc7b7b 100644 --- a/mod/profile/manifest.xml +++ b/mod/profile/manifest.xml @@ -7,7 +7,6 @@ bundled social http://elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License Version 2 true diff --git a/mod/reportedcontent/manifest.xml b/mod/reportedcontent/manifest.xml index d98ff383b..e96620b01 100644 --- a/mod/reportedcontent/manifest.xml +++ b/mod/reportedcontent/manifest.xml @@ -6,7 +6,6 @@ bundled Adds the option for users to report content and for admins to check it out. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/search/manifest.xml b/mod/search/manifest.xml index 1bc974729..513d3a6b9 100644 --- a/mod/search/manifest.xml +++ b/mod/search/manifest.xml @@ -6,7 +6,6 @@ bundled Allow search across entities of the site http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/tagcloud/manifest.xml b/mod/tagcloud/manifest.xml index fd91d92b8..c0f89f35e 100644 --- a/mod/tagcloud/manifest.xml +++ b/mod/tagcloud/manifest.xml @@ -7,7 +7,6 @@ widget Widget-based tag clouds. http://cashcostello.com/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/thewire/manifest.xml b/mod/thewire/manifest.xml index 950ecfbed..962ed12f1 100644 --- a/mod/thewire/manifest.xml +++ b/mod/thewire/manifest.xml @@ -7,7 +7,6 @@ content Microblogging for Elgg http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/tinymce/manifest.xml b/mod/tinymce/manifest.xml index fb36c4141..61bf0c22c 100644 --- a/mod/tinymce/manifest.xml +++ b/mod/tinymce/manifest.xml @@ -7,7 +7,6 @@ enhancement TinyMCE plugin. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/twitter/manifest.xml b/mod/twitter/manifest.xml index 18031deec..18fa8c957 100644 --- a/mod/twitter/manifest.xml +++ b/mod/twitter/manifest.xml @@ -7,7 +7,6 @@ widget Elgg simple twitter widget http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/twitter_api/manifest.xml b/mod/twitter_api/manifest.xml index 88d43aa5e..86bba4b50 100644 --- a/mod/twitter_api/manifest.xml +++ b/mod/twitter_api/manifest.xml @@ -7,7 +7,6 @@ api bundled http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/uservalidationbyemail/manifest.xml b/mod/uservalidationbyemail/manifest.xml index 6a15fd0cf..800dd2641 100644 --- a/mod/uservalidationbyemail/manifest.xml +++ b/mod/uservalidationbyemail/manifest.xml @@ -7,7 +7,6 @@ security Simple user account validation via email. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 diff --git a/mod/zaudio/manifest.xml b/mod/zaudio/manifest.xml index a103052aa..54f819658 100644 --- a/mod/zaudio/manifest.xml +++ b/mod/zaudio/manifest.xml @@ -8,7 +8,6 @@ multimedia This simple plugin lets users play mp3's in the page. http://www.elgg.org/ - http://elgg.org/supporter.php See COPYRIGHT.txt GNU General Public License version 2 -- cgit v1.2.3 From 3cb2ce976fc024dfc700ef4500e5cddd01163e9c Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Sat, 21 Jul 2012 15:23:42 -0700 Subject: Revert "Fixes #4606 made unlike code consistent and functional" This reverts commit e3222535a07e39ffe506eb9688db515798ebf2a4. --- mod/likes/actions/likes/delete.php | 17 +++++++++++------ mod/likes/languages/en.php | 1 - mod/likes/views/default/annotation/likes.php | 4 ++-- mod/likes/views/default/likes/button.php | 8 +------- 4 files changed, 14 insertions(+), 16 deletions(-) (limited to 'mod') diff --git a/mod/likes/actions/likes/delete.php b/mod/likes/actions/likes/delete.php index 88cb84467..db3036bb4 100644 --- a/mod/likes/actions/likes/delete.php +++ b/mod/likes/actions/likes/delete.php @@ -4,12 +4,17 @@ * */ -$id = (int) get_input('id'); -$like = elgg_get_annotation_from_id($id); -if ($like && $like->canEdit()) { - $like->delete(); - system_message(elgg_echo("likes:deleted")); - forward(REFERER); +$likes = elgg_get_annotations(array( + 'guid' => (int) get_input('guid'), + 'annotation_owner_guid' => elgg_get_logged_in_user_guid(), + 'annotation_name' => 'likes', +)); +if ($likes) { + if ($likes[0]->canEdit()) { + $likes[0]->delete(); + system_message(elgg_echo("likes:deleted")); + forward(REFERER); + } } register_error(elgg_echo("likes:notdeleted")); diff --git a/mod/likes/languages/en.php b/mod/likes/languages/en.php index b9460aa10..4a98d7cfe 100644 --- a/mod/likes/languages/en.php +++ b/mod/likes/languages/en.php @@ -17,7 +17,6 @@ $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?', '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..d41522fc4 100644 --- a/mod/likes/views/default/annotation/likes.php +++ b/mod/likes/views/default/annotation/likes.php @@ -29,9 +29,9 @@ $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}", + 'href' => "action/likes/delete?annotation_id={$like->id}", 'text' => "", - 'confirm' => elgg_echo('likes:delete:confirm'), + 'confirm' => elgg_echo('deleteconfirm'), 'encode_text' => false, )); } 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'), -- cgit v1.2.3 From 55e11c0675508b4ccc2cb88ed2238a0c0a38cc17 Mon Sep 17 00:00:00 2001 From: Evan Winslow Date: Sat, 21 Jul 2012 15:49:31 -0700 Subject: Fixes #4750: Supporting both id and guid arguments for likes/delete --- mod/likes/actions/likes/delete.php | 32 ++++++++++++++++++---------- mod/likes/languages/en.php | 1 + mod/likes/views/default/annotation/likes.php | 10 ++++----- 3 files changed, 27 insertions(+), 16 deletions(-) (limited to 'mod') diff --git a/mod/likes/actions/likes/delete.php b/mod/likes/actions/likes/delete.php index db3036bb4..322d512e8 100644 --- a/mod/likes/actions/likes/delete.php +++ b/mod/likes/actions/likes/delete.php @@ -4,17 +4,27 @@ * */ -$likes = elgg_get_annotations(array( - 'guid' => (int) get_input('guid'), - 'annotation_owner_guid' => elgg_get_logged_in_user_guid(), - 'annotation_name' => 'likes', -)); -if ($likes) { - if ($likes[0]->canEdit()) { - $likes[0]->delete(); - system_message(elgg_echo("likes:deleted")); - forward(REFERER); - } +// Support deleting by id in case we're deleting another user's likes +$id = (int) get_input('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")); + forward(REFERER); } register_error(elgg_echo("likes:notdeleted")); diff --git a/mod/likes/languages/en.php b/mod/likes/languages/en.php index 4a98d7cfe..bdbd2a963 100644 --- a/mod/likes/languages/en.php +++ b/mod/likes/languages/en.php @@ -17,6 +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 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 d41522fc4..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?annotation_id={$like->id}", - 'text' => "", - 'confirm' => elgg_echo('deleteconfirm'), - 'encode_text' => false, - )); + 'href' => "action/likes/delete?id={$like->id}", + 'text' => "", + 'confirm' => elgg_echo('likes:delete:confirm'), + 'encode_text' => false, + )); } $body = << Date: Tue, 24 Jul 2012 09:34:06 -0700 Subject: Better grid preview --- .../views/default/theme_preview/grid.php | 134 +++++++++++++-------- 1 file changed, 86 insertions(+), 48 deletions(-) (limited to 'mod') diff --git a/mod/developers/views/default/theme_preview/grid.php b/mod/developers/views/default/theme_preview/grid.php index 030e752e7..0c4cbb251 100644 --- a/mod/developers/views/default/theme_preview/grid.php +++ b/mod/developers/views/default/theme_preview/grid.php @@ -4,73 +4,111 @@ */ ?> - - -
-
-

1/5

-

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.

-

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.

-

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.

-
+
+

1/1

-
-
-

3/5

-
-
-

1/2

-

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.

-
-
-
-
-

1/2

-

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.

-
-
-
-
-

1/3

-

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.

-

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.

-
+
+

1/2

+

1/2

+
+
+

1/3

+

2/3

+
+
+

3/4

+

1/4

+
+
+

1/5

+

4/5

+
+
+

3/5

+

2/5

+
+
+

1/6

+

5/6

+
+
+ +
+
+

1/5

+

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.

+

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.

+

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.

-
-
-

2/3

+
+
+
+

3/5

+

1/2

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.

-
+

1/2

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.

-
+
+
+
-

1

+

1/3

+

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.

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.

+
+
+

2/3

+
+
+
+

1/2

+

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.

+
+
+
+
+

1/2

+

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.

+
+
+
+
+
+
+

1

+

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.

+
+
+
+
+
-
-
-
-

1/5

-

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.

-

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.

-

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.

+
+
+

1/5

+

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.

+

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.

+

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.

+
- -
-- cgit v1.2.3