From ada8737fa50d1aeaa33db8a1c1d740a6da449829 Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Mon, 19 Dec 2011 13:58:37 -0500 Subject: Solves issue 4222: incorrectly nested lists in Firefox --- mod/tinymce/views/default/js/tinymce.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/tinymce/views/default/js/tinymce.php b/mod/tinymce/views/default/js/tinymce.php index 20236d657..e6e2865a5 100644 --- a/mod/tinymce/views/default/js/tinymce.php +++ b/mod/tinymce/views/default/js/tinymce.php @@ -38,7 +38,7 @@ elgg.tinymce.init = function() { mode : "specific_textareas", editor_selector : "elgg-input-longtext", theme : "advanced", - plugins : "spellchecker,autosave,fullscreen,paste", + plugins : "lists,spellchecker,autosave,fullscreen,paste", relative_urls : false, remove_script_host : false, document_base_url : elgg.config.wwwroot, -- cgit v1.2.3 From 1b657e860b966260ca88a0b0e91ee3d058a78a6a Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 23 Dec 2011 14:24:04 -0500 Subject: Fixes #4240 not showing draft blog posts in group module --- mod/blog/views/default/blog/group_module.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/blog/views/default/blog/group_module.php b/mod/blog/views/default/blog/group_module.php index 028827178..6082cdafd 100644 --- a/mod/blog/views/default/blog/group_module.php +++ b/mod/blog/views/default/blog/group_module.php @@ -20,11 +20,12 @@ $options = array( 'type' => 'object', 'subtype' => 'blog', 'container_guid' => elgg_get_page_owner_guid(), + 'metadata_name_value_pairs' => array('name' => 'status', 'value' => 'published'), 'limit' => 6, 'full_view' => false, 'pagination' => false, ); -$content = elgg_list_entities($options); +$content = elgg_list_entities_from_metadata($options); elgg_pop_context(); if (!$content) { -- cgit v1.2.3 From 23a912aa6678bb16f866b01c175b8e73e7bf417d Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 23 Dec 2011 15:07:49 -0500 Subject: Refs #4239 fixed upgrade scripts with bad limits --- .../2011030700-1.8_svn-blog_status_metadata-4645225d7b440876.php | 3 ++- .../2011061200-1.8b1-sites_need_a_site_guid-6d9dcbf46c0826cc.php | 1 + mod/blog/start.php | 3 ++- mod/groups/upgrades/2011030101.php | 6 +++++- 4 files changed, 10 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/engine/lib/upgrades/2011030700-1.8_svn-blog_status_metadata-4645225d7b440876.php b/engine/lib/upgrades/2011030700-1.8_svn-blog_status_metadata-4645225d7b440876.php index e4ab9c137..fe2af9928 100644 --- a/engine/lib/upgrades/2011030700-1.8_svn-blog_status_metadata-4645225d7b440876.php +++ b/engine/lib/upgrades/2011030700-1.8_svn-blog_status_metadata-4645225d7b440876.php @@ -9,7 +9,8 @@ $ia = elgg_set_ignore_access(true); $options = array( 'type' => 'object', - 'subtype' => 'blog' + 'subtype' => 'blog', + 'limit' => 0, ); $batch = new ElggBatch('elgg_get_entities', $options); diff --git a/engine/lib/upgrades/2011061200-1.8b1-sites_need_a_site_guid-6d9dcbf46c0826cc.php b/engine/lib/upgrades/2011061200-1.8b1-sites_need_a_site_guid-6d9dcbf46c0826cc.php index 4fc59ac41..41ab29998 100644 --- a/engine/lib/upgrades/2011061200-1.8b1-sites_need_a_site_guid-6d9dcbf46c0826cc.php +++ b/engine/lib/upgrades/2011061200-1.8b1-sites_need_a_site_guid-6d9dcbf46c0826cc.php @@ -16,6 +16,7 @@ access_show_hidden_entities(true); $options = array( 'type' => 'site', 'site_guid' => 0, + 'limit' => 0, ); $batch = new ElggBatch('elgg_get_entities', $options); diff --git a/mod/blog/start.php b/mod/blog/start.php index fa57e7b96..4b825fc1f 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -248,7 +248,8 @@ function blog_run_upgrades($event, $type, $details) { $ia = elgg_set_ignore_access(true); $options = array( 'type' => 'object', - 'subtype' => 'blog' + 'subtype' => 'blog', + 'limit' => 0, ); $blogs = new ElggBatch('elgg_get_entities', $options); diff --git a/mod/groups/upgrades/2011030101.php b/mod/groups/upgrades/2011030101.php index c2a80c08c..666ae3736 100644 --- a/mod/groups/upgrades/2011030101.php +++ b/mod/groups/upgrades/2011030101.php @@ -43,7 +43,11 @@ function groups_2011030101($topic) { return $annotation[0]->delete(); } -$options = array('type' => 'object', 'subtype' => 'groupforumtopic'); +$options = array( + 'type' => 'object', + 'subtype' => 'groupforumtopic', + 'limit' => 0, +); $batch = new ElggBatch('elgg_get_entities', $options, 'groups_2011030101', 100); if ($batch->callbackResult) { -- cgit v1.2.3 From c0f3b8d03f260c5ab83289bdf4c7cf6a6c5aa6a6 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 23 Dec 2011 15:20:57 -0500 Subject: Fixes #4179 not setting excerpt if none set --- mod/blog/actions/blog/save.php | 6 +----- mod/blog/start.php | 20 +------------------- mod/blog/views/default/object/blog.php | 3 +++ 3 files changed, 5 insertions(+), 24 deletions(-) (limited to 'mod') diff --git a/mod/blog/actions/blog/save.php b/mod/blog/actions/blog/save.php index 8ca8ce846..8923cd0d2 100644 --- a/mod/blog/actions/blog/save.php +++ b/mod/blog/actions/blog/save.php @@ -78,11 +78,8 @@ foreach ($values as $name => $default) { case 'excerpt': if ($value) { - $value = elgg_get_excerpt($value); - } else { - $value = elgg_get_excerpt($values['description']); + $values[$name] = elgg_get_excerpt($value); } - $values[$name] = $value; break; case 'container_guid': @@ -144,7 +141,6 @@ if (!$error) { system_message(elgg_echo('blog:message:saved')); $status = $blog->status; - $db_prefix = elgg_get_config('dbprefix'); // add to river if changing status or published, regardless of new post // because we remove it for drafts. diff --git a/mod/blog/start.php b/mod/blog/start.php index 4b825fc1f..53a4dcadf 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -234,7 +234,7 @@ function blog_ecml_views_hook($hook, $entity_type, $return_value, $params) { * Upgrade from 1.7 to 1.8. */ function blog_run_upgrades($event, $type, $details) { - $blog_upgrade_version = get_plugin_setting('upgrade_version', 'blogs'); + $blog_upgrade_version = elgg_get_plugin_setting('upgrade_version', 'blogs'); if (!$blog_upgrade_version) { // When upgrading, check if the ElggBlog class has been registered as this @@ -243,24 +243,6 @@ function blog_run_upgrades($event, $type, $details) { add_subtype('object', 'blog', 'ElggBlog'); } - // only run this on the first migration to 1.8 - // add excerpt to all blogs that don't have it. - $ia = elgg_set_ignore_access(true); - $options = array( - 'type' => 'object', - 'subtype' => 'blog', - 'limit' => 0, - ); - - $blogs = new ElggBatch('elgg_get_entities', $options); - foreach ($blogs as $blog) { - if (!$blog->excerpt) { - $blog->excerpt = elgg_get_excerpt($blog->description); - } - } - - elgg_set_ignore_access($ia); - elgg_set_plugin_setting('upgrade_version', 1, 'blogs'); } } diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index 3525b3d48..aa8074a69 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -16,6 +16,9 @@ $owner = $blog->getOwnerEntity(); $container = $blog->getContainerEntity(); $categories = elgg_view('output/categories', $vars); $excerpt = $blog->excerpt; +if (!$excerpt) { + $excerpt = elgg_get_excerpt($blog->description); +} $owner_icon = elgg_view_entity_icon($owner, 'tiny'); $owner_link = elgg_view('output/url', array( -- cgit v1.2.3 From 74f3f133432cfd4100b04db66b57dcc19ab09a20 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 23 Dec 2011 15:32:15 -0500 Subject: added access override to the forum upgrade --- mod/groups/upgrades/2011030101.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/groups/upgrades/2011030101.php b/mod/groups/upgrades/2011030101.php index 666ae3736..9ed5b321b 100644 --- a/mod/groups/upgrades/2011030101.php +++ b/mod/groups/upgrades/2011030101.php @@ -25,7 +25,7 @@ foreach ($topics as $topic) { /** - * Condense annotation into object + * Condense first annotation into object * * @param ElggObject $topic */ @@ -43,12 +43,14 @@ function groups_2011030101($topic) { return $annotation[0]->delete(); } +$previous_access = elgg_set_ignore_access(true); $options = array( 'type' => 'object', 'subtype' => 'groupforumtopic', 'limit' => 0, ); $batch = new ElggBatch('elgg_get_entities', $options, 'groups_2011030101', 100); +elgg_set_ignore_access($previous_access); if ($batch->callbackResult) { error_log("Elgg Groups upgrade (2011030101) succeeded"); -- cgit v1.2.3 From 926e11996080ee84c6c405910c06615b8db55ff5 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 23 Dec 2011 19:48:36 -0500 Subject: Fixes #4069 reusing the previous ElggObject for external pages --- mod/externalpages/actions/edit.php | 24 +++++++++++++++------- mod/externalpages/views/default/expages/menu.php | 4 ++-- .../views/default/forms/expages/edit.php | 4 ++-- 3 files changed, 21 insertions(+), 11 deletions(-) (limited to 'mod') diff --git a/mod/externalpages/actions/edit.php b/mod/externalpages/actions/edit.php index edfffe168..184aa3d82 100644 --- a/mod/externalpages/actions/edit.php +++ b/mod/externalpages/actions/edit.php @@ -1,18 +1,28 @@ subtype = $type; -$expages->owner_guid = get_loggedin_userid(); +if ($guid) { + // update + $expages = get_entity($guid); + if (!$expages) { + register_error(elgg_echo("expages:error")); + forward(REFERER); + } +} else { + // create + $expages = new ElggObject(); + $expages->subtype = $type; +} + +$expages->owner_guid = elgg_get_logged_in_user_guid(); $expages->access_id = ACCESS_PUBLIC; $expages->title = $type; $expages->description = $contents; diff --git a/mod/externalpages/views/default/expages/menu.php b/mod/externalpages/views/default/expages/menu.php index 6ed521629..831be9125 100644 --- a/mod/externalpages/views/default/expages/menu.php +++ b/mod/externalpages/views/default/expages/menu.php @@ -7,8 +7,8 @@ $type = $vars['type']; - //set the url - $url = $vars['url'] . "admin/site/expages?type="; +//set the url +$url = $vars['url'] . "admin/site/expages?type="; $pages = array('about', 'terms', 'privacy'); $tabs = array(); diff --git a/mod/externalpages/views/default/forms/expages/edit.php b/mod/externalpages/views/default/forms/expages/edit.php index ca83ea7df..a15f2a7aa 100644 --- a/mod/externalpages/views/default/forms/expages/edit.php +++ b/mod/externalpages/views/default/forms/expages/edit.php @@ -50,9 +50,9 @@ echo <<
-$hidden_value +$hidden_guid $hidden_type $submit_input -
+
EOT; -- cgit v1.2.3 From 2c4e77c49fc43add737daaa76aef710de8d01d30 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 23 Dec 2011 19:58:27 -0500 Subject: Fixes #1922 can now delete invites to invisible groups --- mod/groups/actions/groups/membership/delete_invite.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mod') diff --git a/mod/groups/actions/groups/membership/delete_invite.php b/mod/groups/actions/groups/membership/delete_invite.php index 4b654f0b6..d21aa0309 100644 --- a/mod/groups/actions/groups/membership/delete_invite.php +++ b/mod/groups/actions/groups/membership/delete_invite.php @@ -9,7 +9,11 @@ $user_guid = get_input('user_guid', elgg_get_logged_in_user_guid()); $group_guid = get_input('group_guid'); $user = get_entity($user_guid); + +// invisible groups require overriding access to delete invite +$old_access = elgg_set_ignore_access(true); $group = get_entity($group_guid); +elgg_set_ignore_access($old_access); // If join request made if (check_entity_relationship($group->guid, 'invited', $user->guid)) { -- cgit v1.2.3 From a9394e1035147e3910b2dc3cf156b0361ea791cc Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 23 Dec 2011 20:43:48 -0500 Subject: Fixes #2074 adds group search --- mod/groups/languages/en.php | 1 + mod/groups/lib/groups.php | 8 +++++++- mod/groups/views/default/forms/groups/find.php | 16 ++++++++++++++++ mod/groups/views/default/forms/groups/search.php | 14 +++++++++----- mod/groups/views/default/groups/sidebar/find.php | 2 +- mod/groups/views/default/groups/sidebar/search.php | 15 +++++++++++++++ 6 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 mod/groups/views/default/forms/groups/find.php create mode 100644 mod/groups/views/default/groups/sidebar/search.php (limited to 'mod') diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php index 09feaf8d1..3623c95fc 100644 --- a/mod/groups/languages/en.php +++ b/mod/groups/languages/en.php @@ -61,6 +61,7 @@ $english = array( 'groups:search:tags' => "tag", 'groups:search:title' => "Search for groups tagged with '%s'", 'groups:search:none' => "No matching groups were found", + 'groups:search_in_group' => "Search in this group", 'groups:activity' => "Group activity", 'groups:enableactivity' => 'Enable group activity', diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 7798e5dc3..5d6083077 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -234,6 +234,8 @@ function groups_handle_invitations_page() { function groups_handle_profile_page($guid) { elgg_set_page_owner_guid($guid); + elgg_push_context('group_profile'); + // turn this into a core function global $autofeed; $autofeed = true; @@ -247,7 +249,11 @@ function groups_handle_profile_page($guid) { $content = elgg_view('groups/profile/layout', array('entity' => $group)); if (group_gatekeeper(false)) { - $sidebar = elgg_view('groups/sidebar/members', array('entity' => $group)); + $sidebar = ''; + if (elgg_is_active_plugin('search')) { + $sidebar .= elgg_view('groups/sidebar/search', array('entity' => $group)); + } + $sidebar .= elgg_view('groups/sidebar/members', array('entity' => $group)); } else { $sidebar = ''; } diff --git a/mod/groups/views/default/forms/groups/find.php b/mod/groups/views/default/forms/groups/find.php new file mode 100644 index 000000000..ddf639b74 --- /dev/null +++ b/mod/groups/views/default/forms/groups/find.php @@ -0,0 +1,16 @@ + 'tag', + 'class' => 'elgg-input-search mbm', + 'value' => $tag_string, + 'onclick' => "if (this.value=='$tag_string') { this.value='' }", +); +echo elgg_view('input/text', $params); + +echo elgg_view('input/submit', array('value' => elgg_echo('search:go'))); diff --git a/mod/groups/views/default/forms/groups/search.php b/mod/groups/views/default/forms/groups/search.php index ddf639b74..850b6088e 100644 --- a/mod/groups/views/default/forms/groups/search.php +++ b/mod/groups/views/default/forms/groups/search.php @@ -1,16 +1,20 @@ 'tag', + 'name' => 'q', 'class' => 'elgg-input-search mbm', 'value' => $tag_string, - 'onclick' => "if (this.value=='$tag_string') { this.value='' }", ); echo elgg_view('input/text', $params); +echo elgg_view('input/hidden', array( + 'name' => 'container_guid', + 'value' => $vars['entity']->getGUID(), +)); + echo elgg_view('input/submit', array('value' => elgg_echo('search:go'))); diff --git a/mod/groups/views/default/groups/sidebar/find.php b/mod/groups/views/default/groups/sidebar/find.php index c5c986759..c1a8da3c2 100644 --- a/mod/groups/views/default/groups/sidebar/find.php +++ b/mod/groups/views/default/groups/sidebar/find.php @@ -5,7 +5,7 @@ * @package ElggGroups */ $url = elgg_get_site_url() . 'groups/search'; -$body = elgg_view_form('groups/search', array( +$body = elgg_view_form('groups/find', array( 'action' => $url, 'method' => 'get', 'disable_security' => true, diff --git a/mod/groups/views/default/groups/sidebar/search.php b/mod/groups/views/default/groups/sidebar/search.php new file mode 100644 index 000000000..226835715 --- /dev/null +++ b/mod/groups/views/default/groups/sidebar/search.php @@ -0,0 +1,15 @@ + $url, + 'method' => 'get', + 'disable_security' => true, +), $vars); + +echo elgg_view_module('aside', elgg_echo('groups:search_in_group'), $body); \ No newline at end of file -- cgit v1.2.3 From b18e603a928801d5a3d9f2847e03a96307937e19 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 23 Dec 2011 23:01:08 -0500 Subject: Fixes #3751 adds a group blog archive page --- mod/blog/lib/blog.php | 13 +++++++++---- mod/blog/start.php | 6 +++++- mod/blog/views/default/blog/sidebar.php | 2 +- mod/blog/views/default/blog/sidebar/archives.php | 10 ++++++++-- 4 files changed, 23 insertions(+), 8 deletions(-) (limited to 'mod') diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 590547a8c..286fe1832 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -187,11 +187,16 @@ function blog_get_page_content_archive($owner_guid, $lower = 0, $upper = 0) { $now = time(); - $user = get_user($owner_guid); + $owner = get_entity($owner_guid); elgg_set_page_owner_guid($owner_guid); - $crumbs_title = $user->name; - elgg_push_breadcrumb($crumbs_title, "blog/owner/{$user->username}"); + $crumbs_title = $owner->name; + if (elgg_instanceof($owner, 'user')) { + $url = "blog/owner/{$owner->username}"; + } else { + $url = "blog/group/$owner->guid/all"; + } + elgg_push_breadcrumb($crumbs_title, $url); elgg_push_breadcrumb(elgg_echo('blog:archives')); if ($lower) { @@ -209,7 +214,7 @@ function blog_get_page_content_archive($owner_guid, $lower = 0, $upper = 0) { ); if ($owner_guid) { - $options['owner_guid'] = $owner_guid; + $options['container_guid'] = $owner_guid; } // admin / owners can see any posts diff --git a/mod/blog/start.php b/mod/blog/start.php index 53a4dcadf..90a800799 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -136,7 +136,11 @@ function blog_page_handler($page) { $params = blog_get_page_content_edit($page_type, $page[1], $page[2]); break; case 'group': - $params = blog_get_page_content_list($page[1]); + if ($page[2] == 'all') { + $params = blog_get_page_content_list($page[1]); + } else { + $params = blog_get_page_content_archive($page[1], $page[3], $page[4]); + } break; case 'all': $params = blog_get_page_content_list(); diff --git a/mod/blog/views/default/blog/sidebar.php b/mod/blog/views/default/blog/sidebar.php index 97a23c17e..0ae2b431c 100644 --- a/mod/blog/views/default/blog/sidebar.php +++ b/mod/blog/views/default/blog/sidebar.php @@ -18,7 +18,7 @@ if ($vars['page'] == 'all') { } // only users can have archives at present -if (elgg_instanceof(elgg_get_page_owner_entity(), 'user')) { +if ($vars['page'] == 'owner' || $vars['page'] == 'group') { echo elgg_view('blog/sidebar/archives', $vars); } diff --git a/mod/blog/views/default/blog/sidebar/archives.php b/mod/blog/views/default/blog/sidebar/archives.php index 3aa3db44f..3d8f28ca4 100644 --- a/mod/blog/views/default/blog/sidebar/archives.php +++ b/mod/blog/views/default/blog/sidebar/archives.php @@ -6,6 +6,12 @@ $loggedin_user = elgg_get_logged_in_user_entity(); $page_owner = elgg_get_page_owner_entity(); +if (elgg_instanceof($page_owner, 'user')) { + $url_segment = 'blog/archive/' . $page_owner->username; +} else { + $url_segment = 'blog/group/' . $page_owner->getGUID() . '/archive'; +} + // This is a limitation of the URL schema. if ($page_owner && $vars['page'] != 'friends') { $dates = get_entity_dates('object', 'blog', $page_owner->getGUID()); @@ -13,11 +19,11 @@ if ($page_owner && $vars['page'] != 'friends') { if ($dates) { $title = elgg_echo('blog:archives'); $content = '
    '; - foreach($dates as $date) { + foreach ($dates as $date) { $timestamplow = mktime(0, 0, 0, substr($date,4,2) , 1, substr($date, 0, 4)); $timestamphigh = mktime(0, 0, 0, ((int) substr($date, 4, 2)) + 1, 1, substr($date, 0, 4)); - $link = elgg_get_site_url() . 'blog/archive/' . $page_owner->username . '/' . $timestamplow . '/' . $timestamphigh; + $link = elgg_get_site_url() . $url_segment . '/' . $timestamplow . '/' . $timestamphigh; $month = elgg_echo('date:month:' . substr($date, 4, 2), array(substr($date, 0, 4))); $content .= "
  • $month
  • "; } -- cgit v1.2.3 From ccd4b6e48010cfc62c2ee6c942836c1ab9c9c7fd Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 31 Dec 2011 08:52:24 -0500 Subject: Fixes #4253 added backward compatibility for blog read url --- mod/blog/start.php | 1 + 1 file changed, 1 insertion(+) (limited to 'mod') diff --git a/mod/blog/start.php b/mod/blog/start.php index 90a800799..a8553b4b8 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -125,6 +125,7 @@ function blog_page_handler($page) { $params = blog_get_page_content_archive($user->guid, $page[2], $page[3]); break; case 'view': + case 'read': // Elgg 1.7 compatibility $params = blog_get_page_content_read($page[1]); break; case 'add': -- cgit v1.2.3 From 6dc5a90146595b78f5fd0d9b10b628a78ca2dac7 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 31 Dec 2011 10:18:01 -0500 Subject: Fixes #4256 reruns the forum topic upgrade by checking the 5 oldest topics --- mod/groups/upgrades/2011030101.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mod') diff --git a/mod/groups/upgrades/2011030101.php b/mod/groups/upgrades/2011030101.php index 9ed5b321b..55edb1a16 100644 --- a/mod/groups/upgrades/2011030101.php +++ b/mod/groups/upgrades/2011030101.php @@ -9,6 +9,7 @@ $topics = elgg_get_entities(array( 'type' => 'object', 'subtype' => 'groupforumtopic', 'limit' => 5, + 'order_by' => 'e.time_created asc', )); // if not topics, no upgrade required @@ -31,6 +32,11 @@ foreach ($topics as $topic) { */ function groups_2011030101($topic) { + // do not upgrade topics that have already been upgraded + if ($topic->description) { + return true; + } + $annotation = $topic->getAnnotations('group_topic_post', 1); if (!$annotation) { // no text for this forum post so we delete (probably caused by #2624) -- cgit v1.2.3 From c49f6d145700c878851ed6b548674d7693238841 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 31 Dec 2011 10:47:06 -0500 Subject: Fixes #4228 group sort menu view accepts selected menu item from page handler --- mod/groups/views/default/groups/group_sort_menu.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mod') diff --git a/mod/groups/views/default/groups/group_sort_menu.php b/mod/groups/views/default/groups/group_sort_menu.php index c53b49c8e..f5631a31f 100644 --- a/mod/groups/views/default/groups/group_sort_menu.php +++ b/mod/groups/views/default/groups/group_sort_menu.php @@ -2,6 +2,7 @@ /** * All groups listing page navigation * + * @uses $vars['selected'] Name of the tab that has been selected */ $tabs = array( @@ -22,14 +23,13 @@ $tabs = array( ), ); -// sets default selected item -if (strpos(full_url(), 'filter') === false) { - $tabs['newest']['selected'] = true; -} - foreach ($tabs as $name => $tab) { $tab['name'] = $name; + if ($vars['selected'] == $name) { + $tab['selected'] = true; + } + elgg_register_menu_item('filter', $tab); } -- cgit v1.2.3 From 63dfdab76fef0e44fac550b0bb1a15780470f6c6 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 31 Dec 2011 11:13:01 -0500 Subject: Fixes #4152 setting access on group creation river item --- mod/groups/actions/groups/edit.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'mod') diff --git a/mod/groups/actions/groups/edit.php b/mod/groups/actions/groups/edit.php index c4cf6667e..b513a6098 100644 --- a/mod/groups/actions/groups/edit.php +++ b/mod/groups/actions/groups/edit.php @@ -89,14 +89,10 @@ if ($new_group_flag) { $group->save(); -// group creator needs to be member of new group and river entry created -if ($new_group_flag) { - elgg_set_page_owner_guid($group->guid); - $group->join($user); - add_to_river('river/group/create', 'create', $user->guid, $group->guid); -} - // Invisible group support +// @todo this requires save to be called to create the acl for the group. This +// is an odd requirement and should be removed. Either the acl creation happens +// in the action or the visibility moves to a plugin hook if (elgg_get_plugin_setting('hidden_groups', 'groups') == 'yes') { $visibility = (int)get_input('vis', '', false); if ($visibility != ACCESS_PUBLIC && $visibility != ACCESS_LOGGED_IN) { @@ -105,10 +101,18 @@ if (elgg_get_plugin_setting('hidden_groups', 'groups') == 'yes') { if ($group->access_id != $visibility) { $group->access_id = $visibility; - $group->save(); } } +$group->save(); + +// group creator needs to be member of new group and river entry created +if ($new_group_flag) { + elgg_set_page_owner_guid($group->guid); + $group->join($user); + add_to_river('river/group/create', 'create', $user->guid, $group->guid, $group->access_id); +} + // Now see if we have a file icon if ((isset($_FILES['icon'])) && (substr_count($_FILES['icon']['type'],'image/'))) { -- cgit v1.2.3 From 51229ebc6691f8edb17a5f15328aa626eabc09fc Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 1 Jan 2012 14:05:31 -0500 Subject: Fixes #4137 moves test UI to developers plugin --- mod/developers/languages/en.php | 6 ++ mod/developers/start.php | 9 +-- .../default/admin/develop_tools/unit_tests.php | 17 ++++++ mod/diagnostics/languages/en.php | 66 +++++++--------------- .../admin/develop_utilities/diagnostics.php | 21 ------- 5 files changed, 48 insertions(+), 71 deletions(-) create mode 100644 mod/developers/views/default/admin/develop_tools/unit_tests.php (limited to 'mod') diff --git a/mod/developers/languages/en.php b/mod/developers/languages/en.php index a2682363c..812f779fa 100644 --- a/mod/developers/languages/en.php +++ b/mod/developers/languages/en.php @@ -9,6 +9,7 @@ $english = array( 'admin:develop_tools' => 'Tools', 'admin:develop_tools:preview' => 'Theming Sandbox', 'admin:develop_tools:inspect' => 'Inspect', + 'admin:develop_tools:unit_tests' => 'Unit Tests', 'admin:developers' => 'Developers', 'admin:developers:settings' => 'Settings', @@ -54,6 +55,11 @@ $english = array( 'theme_preview:navigation' => 'Navigation', 'theme_preview:typography' => 'Typography', + // unit tests + 'developers:unit_tests:description' => 'Elgg has unit and integration tests for detecting bugs in its core classes and functions.', + 'developers:unit_tests:warning' => 'Warning: Do Not Run These Tests on a Production Site. They can corrupt your database.', + 'developers:unit_tests:run' => 'Run', + // status messages 'developers:settings:success' => 'Settings saved', ); diff --git a/mod/developers/start.php b/mod/developers/start.php index 79ec0655a..d77a96b36 100644 --- a/mod/developers/start.php +++ b/mod/developers/start.php @@ -63,6 +63,7 @@ function developers_setup_menu() { if (elgg_in_context('admin')) { elgg_register_admin_menu_item('develop', 'inspect', 'develop_tools'); elgg_register_admin_menu_item('develop', 'preview', 'develop_tools'); + elgg_register_admin_menu_item('develop', 'unit_tests', 'develop_tools'); elgg_register_menu_item('page', array( 'name' => 'dev_settings', @@ -76,8 +77,8 @@ function developers_setup_menu() { } /** -* Clear all the strings so the raw descriptor strings are displayed -*/ + * Clear all the strings so the raw descriptor strings are displayed + */ function developers_clear_strings() { global $CONFIG; @@ -121,8 +122,8 @@ function developers_wrap_views($hook, $type, $result, $params) { } /** -* Log the events and plugin hooks -*/ + * Log the events and plugin hooks + */ function developers_log_events($name, $type) { // filter out some very common events diff --git a/mod/developers/views/default/admin/develop_tools/unit_tests.php b/mod/developers/views/default/admin/develop_tools/unit_tests.php new file mode 100644 index 000000000..81658e88b --- /dev/null +++ b/mod/developers/views/default/admin/develop_tools/unit_tests.php @@ -0,0 +1,17 @@ +' . elgg_echo('developers:unit_tests:description') . '

    '; +echo '

    ' . elgg_echo('developers:unit_tests:warning') . '

    '; + +// create a button to run tests +$params = array( + 'text' => elgg_echo('developers:unit_tests:run'), + 'href' => 'engine/tests/suite.php', + 'class' => 'elgg-button elgg-button-submit', + 'is_trusted' => true, +); +echo '

    ' . elgg_view('output/url', $params) . '

    '; diff --git a/mod/diagnostics/languages/en.php b/mod/diagnostics/languages/en.php index c4e337b50..3619b2ee1 100644 --- a/mod/diagnostics/languages/en.php +++ b/mod/diagnostics/languages/en.php @@ -1,71 +1,45 @@ 'System Diagnostics', - 'diagnostics' => 'System diagnostics', - 'diagnostics:report' => 'Diagnostics Report', - 'diagnostics:unittester' => 'Unit Tests', - - 'diagnostics:description' => 'The following diagnostic report is useful for diagnosing any problems with Elgg, and should be attached to any bug reports you file.', - 'diagnostics:unittester:description' => 'The following are diagnostic tests which are registered by plugins and may be performed in order to debug parts of the Elgg framework.', - - 'diagnostics:unittester:description' => 'Unit tests check Elgg Core for broken or buggy APIs.', - 'diagnostics:unittester:debug' => 'The site must be in debug mode to run unit tests.', - 'diagnostics:unittester:warning' => 'WARNING: These tests can leave behind debugging objects in your database.
    DO NOT USE ON A PRODUCTION SITE!', - - 'diagnostics:test:executetest' => 'Execute test', - 'diagnostics:test:executeall' => 'Execute All', - 'diagnostics:unittester:notests' => 'Sorry, there are no unit test modules currently installed.', - 'diagnostics:unittester:testnotfound' => 'Sorry, the report could not be generated because that test was not found', - - 'diagnostics:unittester:testresult:nottestclass' => 'FAIL - Result not a test class', - 'diagnostics:unittester:testresult:fail' => 'FAIL', - 'diagnostics:unittester:testresult:success' => 'SUCCESS', - - 'diagnostics:unittest:example' => 'Example unit test, only available in debug mode.', - - 'diagnostics:unittester:report' => 'Test report for %s', - - 'diagnostics:download' => 'Download', - - - 'diagnostics:header' => '======================================================================== +/** + * Elgg diagnostics language pack. + * + * @package ElggDiagnostics + */ + +$english = array( + 'admin:develop_utilities:diagnostics' => 'System Diagnostics', + 'diagnostics' => 'System diagnostics', + 'diagnostics:report' => 'Diagnostics Report', + 'diagnostics:description' => 'The following diagnostic report is useful for diagnosing any problems with Elgg, and should be attached to any bug reports you file.', + 'diagnostics:download' => 'Download', + 'diagnostics:header' => '======================================================================== Elgg Diagnostic Report Generated %s by %s ======================================================================== ', - 'diagnostics:report:basic' => ' + 'diagnostics:report:basic' => ' Elgg Release %s, version %s ------------------------------------------------------------------------', - 'diagnostics:report:php' => ' + 'diagnostics:report:php' => ' PHP info: %s ------------------------------------------------------------------------', - 'diagnostics:report:plugins' => ' + 'diagnostics:report:plugins' => ' Installed plugins and details: %s ------------------------------------------------------------------------', - 'diagnostics:report:md5' => ' + 'diagnostics:report:md5' => ' Installed files and checksums: %s ------------------------------------------------------------------------', - 'diagnostics:report:globals' => ' + 'diagnostics:report:globals' => ' Global variables: %s ------------------------------------------------------------------------', +); - ); - - add_translation("en",$english); -?> \ No newline at end of file +add_translation("en", $english); diff --git a/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php b/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php index 89e235279..c7ff3d5fc 100644 --- a/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php +++ b/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php @@ -14,25 +14,4 @@ $params = array( ); $diagnostics .= '

    ' . elgg_view('output/url', $params) . '

    '; -// unit tests -$unit_tests_title = elgg_echo('diagnostics:unittester'); -$unit_tests .= '

    ' . elgg_echo('diagnostics:unittester:description') . '

    '; -$unit_tests .= '

    ' . elgg_echo('diagnostics:unittester:warning') . '

    '; - -if (elgg_get_config('debug')) { - // create a button to run tests - $params = array( - '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 { - // no tests when not in debug mode - $unit_tests .= elgg_echo('diagnostics:unittester:debug'); -} - -// display admin body echo elgg_view_module('inline', $diagnostics_title, $diagnostics, array('class' => 'elgg-form-settings')); -echo elgg_view_module('inline', $unit_tests_title, $unit_tests, array('class' => 'elgg-form-settings')); -- cgit v1.2.3 From ce691dd8c560abc48aaf578928d13dea6ef31565 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 1 Jan 2012 18:30:17 -0500 Subject: Fixes #3209 finished adding class properties documentation --- engine/classes/ElggExtender.php | 11 +++++++++-- engine/classes/ElggObject.php | 1 + engine/classes/ElggRelationship.php | 6 ++++++ engine/classes/ElggRiverItem.php | 11 +++++++++++ mod/blog/classes/ElggBlog.php | 4 ++++ mod/thewire/classes/ElggWire.php | 4 ++++ 6 files changed, 35 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/engine/classes/ElggExtender.php b/engine/classes/ElggExtender.php index d6f79d18d..bc2d67ae2 100644 --- a/engine/classes/ElggExtender.php +++ b/engine/classes/ElggExtender.php @@ -3,8 +3,7 @@ * The base class for ElggEntity extenders. * * Extenders allow you to attach extended information to an - * ElggEntity. Core supports two: ElggAnnotation, ElggMetadata, - * and ElggRelationship + * ElggEntity. Core supports two: ElggAnnotation and ElggMetadata. * * Saving the extender data to database is handled by the child class. * @@ -16,6 +15,14 @@ * @link http://docs.elgg.org/DataModel/Extenders * @see ElggAnnotation * @see ElggMetadata + * + * @property string $type annotation or metadata (read-only after save) + * @property int $id The unique identifier (read-only) + * @property int $entity_guid The GUID of the entity that this extender describes + * @property int $access_id Specifies the visibility level of this extender + * @property string $name The name of this extender + * @property mixed $value The value of the extender (int or string) + * @property int $time_created A UNIX timestamp of when the extender was created (read-only, set on first save) */ abstract class ElggExtender extends ElggData { diff --git a/engine/classes/ElggObject.php b/engine/classes/ElggObject.php index 582308f28..649e32490 100644 --- a/engine/classes/ElggObject.php +++ b/engine/classes/ElggObject.php @@ -17,6 +17,7 @@ * * @property string $title The title, name, or summary of this object * @property string $description The body, description, or content of the object + * @property array $tags Array of tags that describe the object */ class ElggObject extends ElggEntity { diff --git a/engine/classes/ElggRelationship.php b/engine/classes/ElggRelationship.php index 2d9a32cbd..efc0f7eff 100644 --- a/engine/classes/ElggRelationship.php +++ b/engine/classes/ElggRelationship.php @@ -4,6 +4,12 @@ * * @package Elgg.Core * @subpackage Core + * + * @property int $id The unique identifier (read-only) + * @property int $guid_one The GUID of the subject of the relationship + * @property string $relationship The name of the relationship + * @property int $guid_two The GUID of the object of the relationship + * @property int $time_created A UNIX timestamp of when the relationship was created (read-only, set on first save) */ class ElggRelationship extends ElggData implements Importable diff --git a/engine/classes/ElggRiverItem.php b/engine/classes/ElggRiverItem.php index fcc8f9c85..8fef6bb9d 100644 --- a/engine/classes/ElggRiverItem.php +++ b/engine/classes/ElggRiverItem.php @@ -4,6 +4,17 @@ * * @package Elgg.Core * @subpackage Core + * + * @property int $id The unique identifier (read-only) + * @property int $subject_guid The GUID of the actor + * @property int $object_guid The GUID of the object + * @property int $annotation_id The ID of the annotation involved in the action + * @property string $type The type of one of the entities involved in the action + * @property string $subtype The subtype of one of the entities involved in the action + * @property string $action_type The name of the action + * @property string $view The view for displaying this river item + * @property int $access_id The visibility of the river item + * @property int $posted UNIX timestamp when the action occurred */ class ElggRiverItem { diff --git a/mod/blog/classes/ElggBlog.php b/mod/blog/classes/ElggBlog.php index ee2ec73ef..8d4401c57 100644 --- a/mod/blog/classes/ElggBlog.php +++ b/mod/blog/classes/ElggBlog.php @@ -1,6 +1,10 @@ Date: Sun, 1 Jan 2012 19:35:23 -0500 Subject: Fixes #2230 group acl names are not i18n friendly --- mod/groups/languages/en.php | 1 + mod/groups/start.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php index 3623c95fc..a4a9e2b2b 100644 --- a/mod/groups/languages/en.php +++ b/mod/groups/languages/en.php @@ -62,6 +62,7 @@ $english = array( 'groups:search:title' => "Search for groups tagged with '%s'", 'groups:search:none' => "No matching groups were found", 'groups:search_in_group' => "Search in this group", + 'groups:acl' => "Group: %s", 'groups:activity' => "Group activity", 'groups:enableactivity' => 'Enable group activity', diff --git a/mod/groups/start.php b/mod/groups/start.php index 09362cbbc..86a1da279 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -663,7 +663,7 @@ function group_access_options($group) { ACCESS_PRIVATE => 'private', ACCESS_LOGGED_IN => 'logged in users', ACCESS_PUBLIC => 'public', - $group->group_acl => 'Group: ' . $group->name, + $group->group_acl => elgg_echo('groups:acl', array($group->name)), ); return $access_array; } -- cgit v1.2.3 From 25d11f6cdcc200ae00332197c9bd86858e3620b8 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 1 Jan 2012 19:42:53 -0500 Subject: moved diagnostics to administer utilities menu area rather than developers --- mod/diagnostics/languages/en.php | 4 ++-- mod/diagnostics/start.php | 2 +- .../default/admin/administer_utilities/diagnostics.php | 17 +++++++++++++++++ .../default/admin/develop_utilities/diagnostics.php | 17 ----------------- 4 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 mod/diagnostics/views/default/admin/administer_utilities/diagnostics.php delete mode 100644 mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php (limited to 'mod') diff --git a/mod/diagnostics/languages/en.php b/mod/diagnostics/languages/en.php index 3619b2ee1..54859941d 100644 --- a/mod/diagnostics/languages/en.php +++ b/mod/diagnostics/languages/en.php @@ -6,10 +6,10 @@ */ $english = array( - 'admin:develop_utilities:diagnostics' => 'System Diagnostics', + 'admin:administer_utilities:diagnostics' => 'System Diagnostics', 'diagnostics' => 'System diagnostics', 'diagnostics:report' => 'Diagnostics Report', - 'diagnostics:description' => 'The following diagnostic report is useful for diagnosing any problems with Elgg, and should be attached to any bug reports you file.', + 'diagnostics:description' => 'The following diagnostic report can be useful for diagnosing problems with Elgg. The developers of Elgg may request that you attach it to a bug report.', 'diagnostics:download' => 'Download', 'diagnostics:header' => '======================================================================== Elgg Diagnostic Report diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php index 0bcc08bd9..55842800a 100644 --- a/mod/diagnostics/start.php +++ b/mod/diagnostics/start.php @@ -13,7 +13,7 @@ elgg_register_event_handler('init', 'system', 'diagnostics_init'); function diagnostics_init() { // Add admin menu item - elgg_register_admin_menu_item('develop', 'diagnostics', 'develop_utilities'); + elgg_register_admin_menu_item('administer', 'diagnostics', 'administer_utilities'); // Register some actions $file = elgg_get_plugins_path() . "diagnostics/actions/download.php"; diff --git a/mod/diagnostics/views/default/admin/administer_utilities/diagnostics.php b/mod/diagnostics/views/default/admin/administer_utilities/diagnostics.php new file mode 100644 index 000000000..c7ff3d5fc --- /dev/null +++ b/mod/diagnostics/views/default/admin/administer_utilities/diagnostics.php @@ -0,0 +1,17 @@ +' . elgg_echo('diagnostics:description') .'

    '; +$params = array( + 'text' => elgg_echo('diagnostics:download'), + 'href' => 'action/diagnostics/download', + 'class' => 'elgg-button elgg-button-submit', + 'is_action' => true, + 'is_trusted' => true, +); +$diagnostics .= '

    ' . elgg_view('output/url', $params) . '

    '; + +echo elgg_view_module('inline', $diagnostics_title, $diagnostics, array('class' => 'elgg-form-settings')); diff --git a/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php b/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php deleted file mode 100644 index c7ff3d5fc..000000000 --- a/mod/diagnostics/views/default/admin/develop_utilities/diagnostics.php +++ /dev/null @@ -1,17 +0,0 @@ -' . elgg_echo('diagnostics:description') .'

    '; -$params = array( - 'text' => elgg_echo('diagnostics:download'), - 'href' => 'action/diagnostics/download', - 'class' => 'elgg-button elgg-button-submit', - 'is_action' => true, - 'is_trusted' => true, -); -$diagnostics .= '

    ' . elgg_view('output/url', $params) . '

    '; - -echo elgg_view_module('inline', $diagnostics_title, $diagnostics, array('class' => 'elgg-form-settings')); -- cgit v1.2.3 From 1bd4a6e422e17043b6fd05b1dfcc7f6f71bd2fcc Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 4 Jan 2012 21:31:53 -0500 Subject: updated options on navigation/tabs --- mod/embed/views/default/navigation/menu/embed.php | 2 +- views/default/navigation/tabs.php | 24 +++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'mod') diff --git a/mod/embed/views/default/navigation/menu/embed.php b/mod/embed/views/default/navigation/menu/embed.php index 1a6a18f05..bca673f59 100644 --- a/mod/embed/views/default/navigation/menu/embed.php +++ b/mod/embed/views/default/navigation/menu/embed.php @@ -10,7 +10,7 @@ foreach ($vars['menu']['default'] as $menu_item) { $tabs[] = array( 'title' => $menu_item->getText(), 'url' => 'embed/tab/' . $menu_item->getName(), - 'url_class' => 'embed-section', + 'link_class' => 'embed-section', 'selected' => $menu_item->getSelected(), ); } diff --git a/views/default/navigation/tabs.php b/views/default/navigation/tabs.php index 6159fbfa5..95e3f2669 100644 --- a/views/default/navigation/tabs.php +++ b/views/default/navigation/tabs.php @@ -5,13 +5,13 @@ * @uses string $vars['type'] horizontal || vertical - Defaults to horizontal * @uses string $vars['class'] Additional class to add to ul * @uses array $vars['tabs'] A multi-dimensional array of tab entries in the format array( - * 'text' => string, // The string between the tags. If not set, 'title' parameter will be used instead + * 'text' => string, // The string between the tags * 'href' => string, // URL for the link * 'class' => string // Class of the li element * 'id' => string, // ID of the li element - * 'selected' => bool // if this li element is currently selected - * 'url_class' => string, // Class to pass to the link - * 'url_id' => string, // ID to pass to the link + * 'selected' => bool // if this tab is currently selected (applied to li element) + * 'link_class' => string, // Class to pass to the link + * 'link_id' => string, // ID to pass to the link * ) */ $options = elgg_clean_vars($vars); @@ -30,11 +30,11 @@ if (isset($vars['class'])) { unset($options['tabs']); unset($options['type']); -$options = elgg_format_attributes($options); +$attributes = elgg_format_attributes($options); if (isset($vars['tabs']) && is_array($vars['tabs']) && !empty($vars['tabs'])) { ?> -
      > +
        > Date: Wed, 4 Jan 2012 21:43:35 -0500 Subject: Fixes #4266 fixed limit bugs with pages plugin --- mod/pages/lib/pages.php | 2 ++ mod/pages/pages/pages/owner.php | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/pages/lib/pages.php b/mod/pages/lib/pages.php index 0a6f3a620..5c5323d6f 100644 --- a/mod/pages/lib/pages.php +++ b/mod/pages/lib/pages.php @@ -78,6 +78,7 @@ function pages_register_navigation_tree($container) { 'type' => 'object', 'subtype' => 'page_top', 'container_guid' => $container->getGUID(), + 'limit' => 0, )); foreach ($top_pages as $page) { @@ -96,6 +97,7 @@ function pages_register_navigation_tree($container) { 'subtype' => 'page', 'metadata_name' => 'parent_guid', 'metadata_value' => $parent->getGUID(), + 'limit' => 0, )); foreach ($children as $child) { diff --git a/mod/pages/pages/pages/owner.php b/mod/pages/pages/pages/owner.php index 2ff45ae0c..b29332ee1 100644 --- a/mod/pages/pages/pages/owner.php +++ b/mod/pages/pages/pages/owner.php @@ -23,7 +23,6 @@ $content = elgg_list_entities(array( 'types' => 'object', 'subtypes' => 'page_top', 'container_guid' => elgg_get_page_owner_guid(), - 'limit' => $limit, 'full_view' => false, )); if (!$content) { -- cgit v1.2.3 From 1973a28f46d8678c79721aeca63b007f2b20bdcb Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 7 Jan 2012 11:38:00 -0500 Subject: Refs #3209 fixed spacing and added options for wire method --- engine/classes/ElggRiverItem.php | 23 +++++++++++------------ mod/thewire/classes/ElggWire.php | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'mod') diff --git a/engine/classes/ElggRiverItem.php b/engine/classes/ElggRiverItem.php index 8fef6bb9d..d3d09cd91 100644 --- a/engine/classes/ElggRiverItem.php +++ b/engine/classes/ElggRiverItem.php @@ -5,19 +5,18 @@ * @package Elgg.Core * @subpackage Core * - * @property int $id The unique identifier (read-only) - * @property int $subject_guid The GUID of the actor - * @property int $object_guid The GUID of the object - * @property int $annotation_id The ID of the annotation involved in the action - * @property string $type The type of one of the entities involved in the action - * @property string $subtype The subtype of one of the entities involved in the action - * @property string $action_type The name of the action - * @property string $view The view for displaying this river item - * @property int $access_id The visibility of the river item - * @property int $posted UNIX timestamp when the action occurred + * @property int $id The unique identifier (read-only) + * @property int $subject_guid The GUID of the actor + * @property int $object_guid The GUID of the object + * @property int $annotation_id The ID of the annotation involved in the action + * @property string $type The type of one of the entities involved in the action + * @property string $subtype The subtype of one of the entities involved in the action + * @property string $action_type The name of the action + * @property string $view The view for displaying this river item + * @property int $access_id The visibility of the river item + * @property int $posted UNIX timestamp when the action occurred */ -class ElggRiverItem -{ +class ElggRiverItem { public $id; public $subject_guid; public $object_guid; diff --git a/mod/thewire/classes/ElggWire.php b/mod/thewire/classes/ElggWire.php index 5155a7f97..9c92dd8f2 100644 --- a/mod/thewire/classes/ElggWire.php +++ b/mod/thewire/classes/ElggWire.php @@ -2,7 +2,7 @@ /** * ElggWire Class * - * @property string $method The method used to create the wire post + * @property string $method The method used to create the wire post (site, sms, api) * @property bool $reply Whether this wire post was a reply to another post * @property int $wire_thread The identifier of the thread for this wire post */ -- cgit v1.2.3 From ef71ffca08b91f514208adfdd67249dd52fc1aa3 Mon Sep 17 00:00:00 2001 From: Sem Date: Tue, 3 Jan 2012 16:13:57 +0100 Subject: Refs #4142. Added ETag header support for user avatars. --- mod/profile/icondirect.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mod') diff --git a/mod/profile/icondirect.php b/mod/profile/icondirect.php index f7188455e..1680d8fce 100644 --- a/mod/profile/icondirect.php +++ b/mod/profile/icondirect.php @@ -12,8 +12,16 @@ require_once(dirname(dirname(dirname(__FILE__))). '/engine/settings.php'); global $CONFIG; $join_date = (int)$_GET['joindate']; +$last_cache = (int)$_GET['lastcache']; // icontime $guid = (int)$_GET['guid']; +// If is the same eTag, content didn't changed. +$eTag = $last_cache . $guid; +if (trim($_SERVER['HTTP_IF_NONE_MATCH']) == $eTag) { + header("HTTP/1.1 304 Not Modified"); + exit; +} + $size = strtolower($_GET['size']); if (!in_array($size, array('large', 'medium', 'small', 'tiny', 'master', 'topbar'))) { $size = "medium"; @@ -48,6 +56,7 @@ if ($mysql_dblink) { header("Pragma: public"); header("Cache-Control: public"); header("Content-Length: " . strlen($contents)); + header("ETag: $eTag"); // this chunking is done for supposedly better performance $split_string = str_split($contents, 1024); foreach ($split_string as $chunk) { -- cgit v1.2.3 From 946a1229a126b91de9b64d2def672c628a77e6c6 Mon Sep 17 00:00:00 2001 From: Sem Date: Tue, 3 Jan 2012 16:14:31 +0100 Subject: Refs #4142. Also added ETag in group icon. --- mod/groups/icon.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mod') diff --git a/mod/groups/icon.php b/mod/groups/icon.php index f4c0f8010..607f38939 100644 --- a/mod/groups/icon.php +++ b/mod/groups/icon.php @@ -10,6 +10,13 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); $group_guid = get_input('group_guid'); $group = get_entity($group_guid); +// If is the same eTag, content didn't changed. +$eTag = $group->icontime . $group_guid; +if (trim($_SERVER['HTTP_IF_NONE_MATCH']) == $eTag) { + header("HTTP/1.1 304 Not Modified"); + exit; +} + $size = strtolower(get_input('size')); if (!in_array($size,array('large','medium','small','tiny','master','topbar'))) $size = "medium"; @@ -37,4 +44,5 @@ header('Expires: ' . date('r',time() + 864000)); header("Pragma: public"); header("Cache-Control: public"); header("Content-Length: " . strlen($contents)); +header("ETag: $eTag"); echo $contents; -- cgit v1.2.3 From 6b8301f6433ec22b065d734e9fc26d09f723b07d Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 7 Jan 2012 12:32:46 -0500 Subject: added check for existance of IF-NONE-MATCH header in request --- mod/groups/icon.php | 10 +++++----- mod/profile/icondirect.php | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'mod') diff --git a/mod/groups/icon.php b/mod/groups/icon.php index 607f38939..104da4b41 100644 --- a/mod/groups/icon.php +++ b/mod/groups/icon.php @@ -10,15 +10,15 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); $group_guid = get_input('group_guid'); $group = get_entity($group_guid); -// If is the same eTag, content didn't changed. -$eTag = $group->icontime . $group_guid; -if (trim($_SERVER['HTTP_IF_NONE_MATCH']) == $eTag) { +// If is the same ETag, content didn't changed. +$etag = $group->icontime . $group_guid; +if (isset($_SERVER['HTTP_IF_NONE_MATCH']) && trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) { header("HTTP/1.1 304 Not Modified"); exit; } $size = strtolower(get_input('size')); -if (!in_array($size,array('large','medium','small','tiny','master','topbar'))) +if (!in_array($size, array('large', 'medium', 'small', 'tiny', 'master', 'topbar'))) $size = "medium"; $success = false; @@ -44,5 +44,5 @@ header('Expires: ' . date('r',time() + 864000)); header("Pragma: public"); header("Cache-Control: public"); header("Content-Length: " . strlen($contents)); -header("ETag: $eTag"); +header("ETag: $etag"); echo $contents; diff --git a/mod/profile/icondirect.php b/mod/profile/icondirect.php index 1680d8fce..6c3148f2b 100644 --- a/mod/profile/icondirect.php +++ b/mod/profile/icondirect.php @@ -15,9 +15,9 @@ $join_date = (int)$_GET['joindate']; $last_cache = (int)$_GET['lastcache']; // icontime $guid = (int)$_GET['guid']; -// If is the same eTag, content didn't changed. -$eTag = $last_cache . $guid; -if (trim($_SERVER['HTTP_IF_NONE_MATCH']) == $eTag) { +// If is the same ETag, content didn't changed. +$etag = $last_cache . $guid; +if (isset($_SERVER['HTTP_IF_NONE_MATCH']) && trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) { header("HTTP/1.1 304 Not Modified"); exit; } @@ -56,7 +56,7 @@ if ($mysql_dblink) { header("Pragma: public"); header("Cache-Control: public"); header("Content-Length: " . strlen($contents)); - header("ETag: $eTag"); + header("ETag: $etag"); // this chunking is done for supposedly better performance $split_string = str_split($contents, 1024); foreach ($split_string as $chunk) { -- cgit v1.2.3 From 855de1b33e1ba1753ac1a5088e640e5fcff09f79 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 8 Jan 2012 14:07:58 -0500 Subject: Fixes #4192 making the bottom of widget columns equal rather than height --- js/lib/ui.widgets.js | 23 +++++++++++++++-------- mod/profile/views/default/profile/js.php | 5 ++++- 2 files changed, 19 insertions(+), 9 deletions(-) (limited to 'mod') diff --git a/js/lib/ui.widgets.js b/js/lib/ui.widgets.js index 6114aeacd..d897564b4 100644 --- a/js/lib/ui.widgets.js +++ b/js/lib/ui.widgets.js @@ -29,7 +29,7 @@ elgg.ui.widgets.init = function() { $('.elgg-widget-edit > form ').live('submit', elgg.ui.widgets.saveSettings); $('a.elgg-widget-collapse-button').live('click', elgg.ui.widgets.collapseToggle); - elgg.ui.widgets.equalHeight(".elgg-widgets"); + elgg.ui.widgets.setMinHeight(".elgg-widgets"); }; /** @@ -175,22 +175,29 @@ elgg.ui.widgets.saveSettings = function(event) { }; /** - * Make all elements have the same min-height + * Set the min-height so that all widget column bottoms are the same * * This addresses the issue of trying to drag a widget into a column that does - * not have any widgets. + * not have any widgets or many fewer widgets than other columns. * * @param {String} selector * @return void */ -elgg.ui.widgets.equalHeight = function(selector) { - var maxHeight = 0; +elgg.ui.widgets.setMinHeight = function(selector) { + var maxBottom = 0; $(selector).each(function() { - if ($(this).height() > maxHeight) { - maxHeight = $(this).height(); + var bottom = parseInt($(this).offset().top + $(this).height()); + if (bottom > maxBottom) { + maxBottom = bottom; + } + }) + $(selector).each(function() { + var bottom = parseInt($(this).offset().top + $(this).height()); + if (bottom < maxBottom) { + var newMinHeight = parseInt($(this).height() + (maxBottom - bottom)); + $(this).css('min-height', newMinHeight + 'px'); } }) - $(selector).css('min-height', maxHeight + 'px'); }; elgg.register_hook_handler('init', 'system', elgg.ui.widgets.init); diff --git a/mod/profile/views/default/profile/js.php b/mod/profile/views/default/profile/js.php index 16dec59df..5a08a90bd 100644 --- a/mod/profile/views/default/profile/js.php +++ b/mod/profile/views/default/profile/js.php @@ -1,6 +1,9 @@ + +// force the first column to at least be as large as the profile box in cols 2 and 3 +// we also want to run before the widget init happens so priority is < 500 elgg.register_hook_handler('init', 'system', function() { // only do this on the profile page's widget canvas. if ($('.profile').length) { $('#elgg-widget-col-1').css('min-height', $('.profile').outerHeight(true) + 1); } -}); \ No newline at end of file +}, 400); -- cgit v1.2.3 From cfcf985b803e2ce4187d1dad30905a30e4c937b8 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 8 Jan 2012 14:24:09 -0500 Subject: updated groups js to use new JS hook system --- mod/groups/views/default/groups/js.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/groups/views/default/groups/js.php b/mod/groups/views/default/groups/js.php index ad742445b..1b4d33f32 100644 --- a/mod/groups/views/default/groups/js.php +++ b/mod/groups/views/default/groups/js.php @@ -1,5 +1,6 @@ -$(function() { +// this adds a class to support IE8 and older +elgg.register_hook_handler('init', 'system', function() { // jQuery uses 0-based indexing $('#groups-tools').children('li:even').addClass('odd'); }); -- cgit v1.2.3 From 229a0cc6091e11ca8431d96d022898b778a9e951 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 8 Jan 2012 14:31:42 -0500 Subject: updated the messages plugin to use 1.8's JS hook system --- mod/messages/views/default/messages/js.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/messages/views/default/messages/js.php b/mod/messages/views/default/messages/js.php index 39f93e645..60cf36b92 100644 --- a/mod/messages/views/default/messages/js.php +++ b/mod/messages/views/default/messages/js.php @@ -1,5 +1,6 @@ -$(function() { +// messages plugin toggle +elgg.register_hook_handler('init', 'system', function() { $("#messages-toggle").click(function() { $('input[type=checkbox]').click(); }); -- cgit v1.2.3 From 62b03cd61f5b3c837a97e71260790c15be7e4ea2 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 8 Jan 2012 15:04:50 -0500 Subject: Fixes #2404 not using full set of query parameters for custom search types --- mod/search/pages/search/index.php | 4 ---- 1 file changed, 4 deletions(-) (limited to 'mod') diff --git a/mod/search/pages/search/index.php b/mod/search/pages/search/index.php index efa3ec037..782c2bae9 100644 --- a/mod/search/pages/search/index.php +++ b/mod/search/pages/search/index.php @@ -145,11 +145,7 @@ foreach ($custom_types as $type) { $data = htmlspecialchars(http_build_query(array( 'q' => $query, - 'entity_subtype' => $entity_subtype, - 'entity_type' => $entity_type, - 'owner_guid' => $owner_guid, 'search_type' => $type, - 'friends' => $friends ))); $url = elgg_get_site_url()."search?$data"; -- cgit v1.2.3 From 3cba074d0597d36627500607ca4a0d7cd6a79b6e Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 8 Jan 2012 15:23:36 -0500 Subject: Fixes #2421 added icontime to files with thumbnails --- mod/file/actions/file/upload.php | 8 +++++--- mod/file/start.php | 3 ++- mod/file/views/default/file/specialcontent/image/default.php | 10 +++++++--- 3 files changed, 14 insertions(+), 7 deletions(-) (limited to 'mod') diff --git a/mod/file/actions/file/upload.php b/mod/file/actions/file/upload.php index 3edc87952..5242cbda2 100644 --- a/mod/file/actions/file/upload.php +++ b/mod/file/actions/file/upload.php @@ -109,7 +109,9 @@ if (isset($_FILES['upload']['name']) && !empty($_FILES['upload']['name'])) { // if image, we need to create thumbnails (this should be moved into a function) if ($guid && $file->simpletype == "image") { - $thumbnail = get_resized_image_from_existing_file($file->getFilenameOnFilestore(),60,60, true); + $file->icontime = time(); + + $thumbnail = get_resized_image_from_existing_file($file->getFilenameOnFilestore(), 60, 60, true); if ($thumbnail) { $thumb = new ElggFile(); $thumb->setMimeType($_FILES['upload']['type']); @@ -123,7 +125,7 @@ if (isset($_FILES['upload']['name']) && !empty($_FILES['upload']['name'])) { unset($thumbnail); } - $thumbsmall = get_resized_image_from_existing_file($file->getFilenameOnFilestore(),153,153, true); + $thumbsmall = get_resized_image_from_existing_file($file->getFilenameOnFilestore(), 153, 153, true); if ($thumbsmall) { $thumb->setFilename($prefix."smallthumb".$filestorename); $thumb->open("write"); @@ -133,7 +135,7 @@ if (isset($_FILES['upload']['name']) && !empty($_FILES['upload']['name'])) { unset($thumbsmall); } - $thumblarge = get_resized_image_from_existing_file($file->getFilenameOnFilestore(),600,600, false); + $thumblarge = get_resized_image_from_existing_file($file->getFilenameOnFilestore(), 600, 600, false); if ($thumblarge) { $thumb->setFilename($prefix."largethumb".$filestorename); $thumb->open("write"); diff --git a/mod/file/start.php b/mod/file/start.php index e15a9ad61..36142533f 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -345,7 +345,8 @@ function file_icon_url_override($hook, $type, $returnvalue, $params) { // thumbnails get first priority if ($file->thumbnail) { - return "mod/file/thumbnail.php?file_guid=$file->guid&size=$size"; + $ts = (int)$file->icontime; + return "mod/file/thumbnail.php?file_guid=$file->guid&size=$size&icontime=$ts"; } $mapping = array( diff --git a/mod/file/views/default/file/specialcontent/image/default.php b/mod/file/views/default/file/specialcontent/image/default.php index fbd994a0b..431ac9f4f 100644 --- a/mod/file/views/default/file/specialcontent/image/default.php +++ b/mod/file/views/default/file/specialcontent/image/default.php @@ -1,13 +1,17 @@ getGUID()}&size=large"; +$file = $vars['entity']; + +$image_url = $file->getIconURL('large'); $image_url = elgg_format_url($image_url); -$download_url = elgg_get_site_url() . "mod/file/download.php?file_guid={$vars['entity']->getGUID()}"; +$download_url = elgg_get_site_url() . "file/download/{$file->getGUID()}"; -if ($vars['full_view'] && $smallthumb = $vars['entity']->smallthumb) { +if ($vars['full_view']) { echo << -- cgit v1.2.3 From aaeed5d0c3ec561ea691cddeee20563c2b946acd Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 8 Jan 2012 15:51:19 -0500 Subject: Fixes #2199 can now pass entity type/subtype to tag search --- mod/search/pages/search/index.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'mod') diff --git a/mod/search/pages/search/index.php b/mod/search/pages/search/index.php index 782c2bae9..91817096b 100644 --- a/mod/search/pages/search/index.php +++ b/mod/search/pages/search/index.php @@ -236,8 +236,6 @@ if ($search_type != 'entities' || $search_type == 'all') { $current_params = $params; $current_params['search_type'] = $type; - // custom search types have no subtype. - unset($current_params['subtype']); $results = elgg_trigger_plugin_hook('search', $type, $current_params, array()); -- cgit v1.2.3 From 4f4f5a8be736c36ca8af0cd65731dd7c64da3b1a Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 8 Jan 2012 16:09:14 -0500 Subject: Fixes #3216 passing type/subtype for group discussions --- mod/groups/actions/discussion/reply/save.php | 6 ++---- mod/groups/actions/discussion/save.php | 2 +- mod/groups/lib/discussion.php | 6 +++--- 3 files changed, 6 insertions(+), 8 deletions(-) (limited to 'mod') diff --git a/mod/groups/actions/discussion/reply/save.php b/mod/groups/actions/discussion/reply/save.php index a1ed036b6..f8be8aa2c 100644 --- a/mod/groups/actions/discussion/reply/save.php +++ b/mod/groups/actions/discussion/reply/save.php @@ -4,8 +4,6 @@ * */ -gatekeeper(); - // Get input $entity_guid = (int) get_input('entity_guid'); $text = get_input('group_topic_post'); @@ -23,10 +21,10 @@ if (!$topic) { forward(REFERER); } -$user = get_loggedin_user(); +$user = elgg_get_logged_in_user_entity(); $group = $topic->getContainerEntity(); -if (!$group->canWriteToContainer($user)) { +if (!$group->canWriteToContainer()) { register_error(elgg_echo('groups:notmember')); forward(REFERER); } diff --git a/mod/groups/actions/discussion/save.php b/mod/groups/actions/discussion/save.php index a51775cd6..de4afadfb 100644 --- a/mod/groups/actions/discussion/save.php +++ b/mod/groups/actions/discussion/save.php @@ -21,7 +21,7 @@ if (!$title || !$desc) { } $container = get_entity($container_guid); -if (!$container || !$container->canWriteToContainer()) { +if (!$container || !$container->canWriteToContainer(0, 'object', 'groupforumtopic')) { register_error(elgg_echo('discussion:error:permissions')); forward(REFERER); } diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php index 2bda4678e..55642644d 100644 --- a/mod/groups/lib/discussion.php +++ b/mod/groups/lib/discussion.php @@ -92,8 +92,8 @@ function discussion_handle_edit_page($type, $guid) { forward(); } - // make sure user has permissions to write to container - if (!$group->canWriteToContainer()) { + // make sure user has permissions to add a topic to container + if (!$group->canWriteToContainer(0, 'object', 'groupforumtopic')) { register_error(elgg_echo('groups:permissions:error')); forward($group->getURL()); } @@ -173,7 +173,7 @@ function discussion_handle_view_page($guid) { 'show_add_form' => false, )); $content .= elgg_view('discussion/closed'); - } elseif ($group->canWriteToContainer() || elgg_is_admin_logged_in()) { + } elseif ($group->canWriteToContainer(0, 'object', 'groupforumtopic') || elgg_is_admin_logged_in()) { $content .= elgg_view('discussion/replies', array( 'entity' => $topic, 'show_add_form' => true, -- cgit v1.2.3 From 0c1ee36d6aa220376537324d427741861e00138a Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 11 Jan 2012 22:39:59 -0500 Subject: Fixes #4292 added a white list for ajax views --- engine/lib/elgglib.php | 6 ++++++ engine/lib/views.php | 33 +++++++++++++++++++++++++++++++++ mod/thewire/start.php | 2 ++ 3 files changed, 41 insertions(+) (limited to 'mod') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index b044d230f..9035d95f2 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1777,6 +1777,12 @@ function elgg_ajax_page_handler($page) { unset($page[0]); $view = implode('/', $page); + $allowed_views = elgg_get_config('allowed_ajax_views'); + if (!array_key_exists($view, $allowed_views)) { + header('HTTP/1.1 403 Forbidden'); + exit; + } + // pull out GET parameters through filter $vars = array(); foreach ($_GET as $name => $value) { diff --git a/engine/lib/views.php b/engine/lib/views.php index 85319b2d7..e59edac96 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -196,6 +196,37 @@ function elgg_does_viewtype_fallback($viewtype) { return FALSE; } +/** + * Register a view to be available for ajax calls + * + * @param string $view The view name + * @return void + * @since 1.8.3 + */ +function elgg_register_ajax_view($view) { + global $CONFIG; + + if (!isset($CONFIG->allowed_ajax_views)) { + $CONFIG->allowed_ajax_views = array(); + } + + $CONFIG->allowed_ajax_views[$view] = true; +} + +/** + * Unregister a view for ajax calls + * + * @param string $view The view name + * @return void + * @since 1.8.3 + */ +function elgg_unregister_ajax_view($view) { + global $CONFIG; + + if (isset($CONFIG->allowed_ajax_views[$view])) { + unset($CONFIG->allowed_ajax_views[$view]); + } +} /** * Returns the file location for a view. @@ -1610,6 +1641,8 @@ function elgg_views_boot() { elgg_register_css('elgg', $elgg_css_url); elgg_load_css('elgg'); + elgg_register_ajax_view('js/languages'); + elgg_register_plugin_hook_handler('output:before', 'layout', 'elgg_views_add_rss_link'); // discover the built-in view types diff --git a/mod/thewire/start.php b/mod/thewire/start.php index 328e5d46c..202e3d1d6 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -30,6 +30,8 @@ function thewire_init() { elgg_register_simplecache_view('js/thewire'); elgg_register_js('elgg.thewire', $thewire_js, 'footer'); + elgg_register_ajax_view('thewire/previous'); + // add a site navigation item $item = new ElggMenuItem('thewire', elgg_echo('thewire'), 'thewire/all'); elgg_register_menu_item('site', $item); -- cgit v1.2.3