From d5f0d44d4ddf33db2248ef0bdd44633d57c31683 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 8 Oct 2011 08:22:08 -0400 Subject: Fixes #3411 output/url now has a is_trusted parameter - defaults to false --- mod/thewire/views/default/object/thewire.php | 1 + mod/thewire/views/default/river/object/thewire/create.php | 2 ++ mod/thewire/views/default/thewire/profile_status.php | 1 + mod/thewire/views/default/widgets/thewire/content.php | 1 + 4 files changed, 5 insertions(+) (limited to 'mod/thewire') diff --git a/mod/thewire/views/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php index 2727df60d..134c87243 100644 --- a/mod/thewire/views/default/object/thewire.php +++ b/mod/thewire/views/default/object/thewire.php @@ -26,6 +26,7 @@ $owner_icon = elgg_view_entity_icon($owner, 'tiny'); $owner_link = elgg_view('output/url', array( 'href' => "thewire/owner/$owner->username", 'text' => $owner->name, + 'is_trusted' => true, )); $author_text = elgg_echo('byline', array($owner_link)); $date = elgg_view_friendly_time($post->time_created); diff --git a/mod/thewire/views/default/river/object/thewire/create.php b/mod/thewire/views/default/river/object/thewire/create.php index c3c434858..fbf592664 100644 --- a/mod/thewire/views/default/river/object/thewire/create.php +++ b/mod/thewire/views/default/river/object/thewire/create.php @@ -12,12 +12,14 @@ $subject_link = elgg_view('output/url', array( 'href' => $subject->getURL(), 'text' => $subject->name, 'class' => 'elgg-river-subject', + 'is_trusted' => true, )); $object_link = elgg_view('output/url', array( 'href' => "thewire/owner/$subject->username", 'text' => elgg_echo('thewire:wire'), 'class' => 'elgg-river-object', + 'is_trusted' => true, )); $summary = elgg_echo("river:create:object:thewire", array($subject_link, $object_link)); diff --git a/mod/thewire/views/default/thewire/profile_status.php b/mod/thewire/views/default/thewire/profile_status.php index 6ab47bccb..ab20b5341 100644 --- a/mod/thewire/views/default/thewire/profile_status.php +++ b/mod/thewire/views/default/thewire/profile_status.php @@ -28,6 +28,7 @@ if ($latest_wire && count($latest_wire) > 0) { 'text' => elgg_echo('thewire:update'), 'href' => $url_to_wire, 'class' => 'elgg-button elgg-button-action right', + 'is_trusted' => true, )); } diff --git a/mod/thewire/views/default/widgets/thewire/content.php b/mod/thewire/views/default/widgets/thewire/content.php index 835a328b0..7212d4397 100644 --- a/mod/thewire/views/default/widgets/thewire/content.php +++ b/mod/thewire/views/default/widgets/thewire/content.php @@ -22,6 +22,7 @@ if ($content) { $more_link = elgg_view('output/url', array( 'href' => $owner_url, 'text' => elgg_echo('thewire:moreposts'), + 'is_trusted' => true, )); echo "$more_link"; } else { -- cgit v1.2.3 From ff75f99e734b6b99da77ba946e953f08a6e81a5b Mon Sep 17 00:00:00 2001 From: cash Date: Mon, 10 Oct 2011 20:25:20 -0400 Subject: Refs #3916 added checks to all content plugins in master for page owner in mine and friends pages --- mod/blog/lib/blog.php | 3 +++ mod/bookmarks/pages/bookmarks/friends.php | 3 +++ mod/bookmarks/pages/bookmarks/owner.php | 3 +++ mod/file/pages/file/friends.php | 3 +++ mod/file/pages/file/owner.php | 3 +++ mod/pages/pages/pages/friends.php | 2 +- mod/pages/pages/pages/owner.php | 2 +- mod/thewire/pages/thewire/friends.php | 3 +++ mod/thewire/pages/thewire/owner.php | 3 +++ 9 files changed, 23 insertions(+), 2 deletions(-) (limited to 'mod/thewire') diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index f24e6f58d..41924f336 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -124,6 +124,9 @@ function blog_get_page_content_list($container_guid = NULL) { function blog_get_page_content_friends($user_guid) { $user = get_user($user_guid); + if (!$user) { + forward('blog/all'); + } $return = array(); diff --git a/mod/bookmarks/pages/bookmarks/friends.php b/mod/bookmarks/pages/bookmarks/friends.php index 3491090a5..be164fcec 100644 --- a/mod/bookmarks/pages/bookmarks/friends.php +++ b/mod/bookmarks/pages/bookmarks/friends.php @@ -6,6 +6,9 @@ */ $owner = elgg_get_page_owner_entity(); +if (!$page_owner) { + forward('bookmarks/all'); +} elgg_push_breadcrumb($owner->name, "bookmarks/owner/$owner->username"); elgg_push_breadcrumb(elgg_echo('friends')); diff --git a/mod/bookmarks/pages/bookmarks/owner.php b/mod/bookmarks/pages/bookmarks/owner.php index 679c986be..7f55e08de 100644 --- a/mod/bookmarks/pages/bookmarks/owner.php +++ b/mod/bookmarks/pages/bookmarks/owner.php @@ -6,6 +6,9 @@ */ $page_owner = elgg_get_page_owner_entity(); +if (!$page_owner) { + forward('bookmarks/all'); +} elgg_push_breadcrumb($page_owner->name); diff --git a/mod/file/pages/file/friends.php b/mod/file/pages/file/friends.php index 0b351efaf..f504bdc1f 100644 --- a/mod/file/pages/file/friends.php +++ b/mod/file/pages/file/friends.php @@ -6,6 +6,9 @@ */ $owner = elgg_get_page_owner_entity(); +if (!$owner) { + forward('file/all'); +} elgg_push_breadcrumb(elgg_echo('file'), "file/all"); elgg_push_breadcrumb($owner->name, "file/owner/$owner->username"); diff --git a/mod/file/pages/file/owner.php b/mod/file/pages/file/owner.php index 4e2ec89d4..fb87af1b2 100644 --- a/mod/file/pages/file/owner.php +++ b/mod/file/pages/file/owner.php @@ -9,6 +9,9 @@ group_gatekeeper(); $owner = elgg_get_page_owner_entity(); +if (!$owner) { + forward('file/all'); +} elgg_push_breadcrumb(elgg_echo('file'), "file/all"); elgg_push_breadcrumb($owner->name); diff --git a/mod/pages/pages/pages/friends.php b/mod/pages/pages/pages/friends.php index c55b27466..87ac631c2 100644 --- a/mod/pages/pages/pages/friends.php +++ b/mod/pages/pages/pages/friends.php @@ -7,7 +7,7 @@ $owner = elgg_get_page_owner_entity(); if (!$owner) { - + forward('pages/all'); } elgg_push_breadcrumb($owner->name, "pages/owner/$owner->username"); diff --git a/mod/pages/pages/pages/owner.php b/mod/pages/pages/pages/owner.php index 2ff310ac8..2ff45ae0c 100644 --- a/mod/pages/pages/pages/owner.php +++ b/mod/pages/pages/pages/owner.php @@ -7,7 +7,7 @@ $owner = elgg_get_page_owner_entity(); if (!$owner) { - + forward('pages/all'); } // access check for closed groups diff --git a/mod/thewire/pages/thewire/friends.php b/mod/thewire/pages/thewire/friends.php index 265b73eab..26ad03da6 100644 --- a/mod/thewire/pages/thewire/friends.php +++ b/mod/thewire/pages/thewire/friends.php @@ -4,6 +4,9 @@ */ $owner = elgg_get_page_owner_entity(); +if (!$owner) { + forward('thewire/all'); +} $title = elgg_echo('thewire:friends'); diff --git a/mod/thewire/pages/thewire/owner.php b/mod/thewire/pages/thewire/owner.php index b6449b217..a95786b0a 100644 --- a/mod/thewire/pages/thewire/owner.php +++ b/mod/thewire/pages/thewire/owner.php @@ -5,6 +5,9 @@ */ $owner = elgg_get_page_owner_entity(); +if (!$owner) { + forward('thewire/all'); +} $title = elgg_echo('thewire:user', array($owner->name)); -- cgit v1.2.3 From 96604b6836edc0ee2f9bfc58fdbaedf19a6f099c Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Thu, 13 Oct 2011 22:08:26 -0700 Subject: Fixes #3917. Removed uses of admin interface in manifests. Removed related code. --- actions/admin/plugins/simple_update_states.php | 48 -------------------------- documentation/examples/plugins/manifest.xml | 4 --- engine/classes/ElggPluginManifest.php | 18 ---------- engine/classes/ElggPluginManifestParser18.php | 3 +- engine/lib/admin.php | 2 -- engine/tests/api/plugins.php | 5 --- engine/tests/test_files/plugin_18/manifest.xml | 1 - languages/en.php | 5 --- 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 | 3 +- 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 | 3 +- mod/logbrowser/manifest.xml | 1 - mod/logrotate/manifest.xml | 1 - mod/members/manifest.xml | 3 +- mod/messageboard/manifest.xml | 1 - mod/messages/manifest.xml | 1 - mod/notifications/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/uservalidationbyemail/manifest.xml | 1 - mod/zaudio/manifest.xml | 1 - 39 files changed, 4 insertions(+), 121 deletions(-) delete mode 100644 actions/admin/plugins/simple_update_states.php (limited to 'mod/thewire') diff --git a/actions/admin/plugins/simple_update_states.php b/actions/admin/plugins/simple_update_states.php deleted file mode 100644 index 7601013a7..000000000 --- a/actions/admin/plugins/simple_update_states.php +++ /dev/null @@ -1,48 +0,0 @@ -getManifest()->getAdminInterface() != 'simple') { - continue; - } - - // only effect changes to plugins not already in that state. - if ($plugin->isActive() && !in_array($plugin->guid, $active_plugin_guids)) { - $success = $success && $plugin->deactivate(); - } elseif (!$plugin->isActive() && in_array($plugin->guid, $active_plugin_guids)) { - $success = $success && $plugin->activate(); - } -} - -if ($success) { - //system_message(elgg_echo('admin:plugins:simple_simple_success')); -} else { - register_error(elgg_echo('admin:plugins:simple_simple_fail')); -} - -// don't regenerate the simplecache because the plugin won't be -// loaded until next run. Just invalidate and let it regnerate as needed -elgg_invalidate_simplecache(); -elgg_filepath_cache_reset(); - -forward(REFERER); \ No newline at end of file diff --git a/documentation/examples/plugins/manifest.xml b/documentation/examples/plugins/manifest.xml index 1602a7358..2a8a2bd5c 100644 --- a/documentation/examples/plugins/manifest.xml +++ b/documentation/examples/plugins/manifest.xml @@ -32,10 +32,6 @@ admin api - setup_function - teardown_function - simple - php_extension gd diff --git a/engine/classes/ElggPluginManifest.php b/engine/classes/ElggPluginManifest.php index 0e47f388d..eacc16455 100644 --- a/engine/classes/ElggPluginManifest.php +++ b/engine/classes/ElggPluginManifest.php @@ -552,24 +552,6 @@ class ElggPluginManifest { return $normalized; } - /** - * Returns the admin interface to use. - * - * @return string simple or advanced - */ - public function getAdminInterface() { - $interface = $this->parser->getAttribute('admin_interface'); - - switch ($interface) { - case 'simple': - case 'advanced': - return $interface; - - default: - return 'advanced'; - } - } - /** * Returns the admin interface to use. * diff --git a/engine/classes/ElggPluginManifestParser18.php b/engine/classes/ElggPluginManifestParser18.php index db8b3dc6a..554e28c02 100644 --- a/engine/classes/ElggPluginManifestParser18.php +++ b/engine/classes/ElggPluginManifestParser18.php @@ -16,7 +16,7 @@ class ElggPluginManifestParser18 extends ElggPluginManifestParser { 'name', 'author', 'version', 'blurb', 'description', 'website', 'copyright', 'license', 'requires', 'suggests', 'screenshot', 'category', 'conflicts', 'provides', - 'admin_interface', 'activate_on_install' + 'activate_on_install' ); /** @@ -46,7 +46,6 @@ class ElggPluginManifestParser18 extends ElggPluginManifestParser { case 'website': case 'copyright': case 'license': - case 'admin_interface': case 'activate_on_install': $parsed[$element->name] = $element->content; break; diff --git a/engine/lib/admin.php b/engine/lib/admin.php index d12baed50..ae6429baf 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -230,8 +230,6 @@ function admin_init() { elgg_register_action('admin/delete_admin_notice', '', 'admin'); - elgg_register_action('admin/plugins/simple_update_states', '', 'admin'); - elgg_register_action('profile/fields/reset', '', 'admin'); elgg_register_action('profile/fields/add', '', 'admin'); elgg_register_action('profile/fields/edit', '', 'admin'); diff --git a/engine/tests/api/plugins.php b/engine/tests/api/plugins.php index 72092b688..8f5f5dd1e 100644 --- a/engine/tests/api/plugins.php +++ b/engine/tests/api/plugins.php @@ -105,7 +105,6 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { array('type' => 'plugin', 'name' => 'facebook_connect', 'version' => 1.0), ), - 'admin_interface' => 'simple', 'activate_on_install' => true ); @@ -265,10 +264,6 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { $this->assertEqual($this->manifest17->getConflicts(), array()); } - public function testElggPluginManifestGetAdminInterface() { - $this->assertEqual($this->manifest18->getAdminInterface(), 'simple'); - } - public function testElggPluginManifestGetActivateOnInstall() { $this->assertEqual($this->manifest18->getActivateOnInstall(), true); } diff --git a/engine/tests/test_files/plugin_18/manifest.xml b/engine/tests/test_files/plugin_18/manifest.xml index 23f0fa0bf..445a41c2e 100644 --- a/engine/tests/test_files/plugin_18/manifest.xml +++ b/engine/tests/test_files/plugin_18/manifest.xml @@ -34,7 +34,6 @@ ServiceAPI - simple true diff --git a/languages/en.php b/languages/en.php index 9967bc34d..67e447901 100644 --- a/languages/en.php +++ b/languages/en.php @@ -686,12 +686,7 @@ $english = array( 'admin:plugins:plugin_website' => 'Plugin website', 'admin:plugins:author' => '%s', 'admin:plugins:version' => 'Version %s', - 'admin:plugins:simple' => 'Simple', - 'admin:plugins:advanced' => 'Advanced', 'admin:plugin_settings' => 'Plugin Settings', - 'admin:plugins:simple_simple_fail' => 'Could not save settings.', - 'admin:plugins:simple_simple_success' => 'Settings saved.', - 'admin:plugins:simple:cannot_activate' => 'Cannot activate this plugin. Check the advanced plugin admin area for more information.', 'admin:plugins:warning:unmet_dependencies_active' => 'This plugin is active but has unmet dependencies. You may encounter problems. See "more info" below for details.', 'admin:plugins:dependencies:type' => 'Type', diff --git a/mod/blog/manifest.xml b/mod/blog/manifest.xml index 991462060..dfbd7a1a6 100644 --- a/mod/blog/manifest.xml +++ b/mod/blog/manifest.xml @@ -15,6 +15,5 @@ elgg_version 2010030101 - simple true diff --git a/mod/bookmarks/manifest.xml b/mod/bookmarks/manifest.xml index 72e9af9b0..24969b837 100644 --- a/mod/bookmarks/manifest.xml +++ b/mod/bookmarks/manifest.xml @@ -16,5 +16,4 @@ 2010030101 true - simple diff --git a/mod/categories/manifest.xml b/mod/categories/manifest.xml index 15d7192c1..db6f0324f 100644 --- a/mod/categories/manifest.xml +++ b/mod/categories/manifest.xml @@ -14,5 +14,4 @@ elgg_version 2010030101 - advanced diff --git a/mod/custom_index/manifest.xml b/mod/custom_index/manifest.xml index 7bb2a2543..dd00f2c49 100644 --- a/mod/custom_index/manifest.xml +++ b/mod/custom_index/manifest.xml @@ -12,5 +12,4 @@ elgg_version 2009030702 - advanced diff --git a/mod/dashboard/manifest.xml b/mod/dashboard/manifest.xml index b5e9cff2e..7096fc86a 100644 --- a/mod/dashboard/manifest.xml +++ b/mod/dashboard/manifest.xml @@ -12,5 +12,4 @@ elgg_version 2010030101 - advanced - \ No newline at end of file + diff --git a/mod/developers/manifest.xml b/mod/developers/manifest.xml index 4a7ed82bd..25840e164 100644 --- a/mod/developers/manifest.xml +++ b/mod/developers/manifest.xml @@ -15,7 +15,4 @@ elgg_version 2009030802 - - advanced - diff --git a/mod/diagnostics/manifest.xml b/mod/diagnostics/manifest.xml index e85b19aef..5ebd7cf55 100644 --- a/mod/diagnostics/manifest.xml +++ b/mod/diagnostics/manifest.xml @@ -14,5 +14,4 @@ elgg_version 2010030101 - advanced diff --git a/mod/embed/manifest.xml b/mod/embed/manifest.xml index 02c012330..27e9b9ada 100644 --- a/mod/embed/manifest.xml +++ b/mod/embed/manifest.xml @@ -18,5 +18,4 @@ file true - advanced diff --git a/mod/externalpages/manifest.xml b/mod/externalpages/manifest.xml index 32528585d..4064ea602 100644 --- a/mod/externalpages/manifest.xml +++ b/mod/externalpages/manifest.xml @@ -12,5 +12,4 @@ elgg_version 2010030101 - advanced diff --git a/mod/file/manifest.xml b/mod/file/manifest.xml index aac9c3f6b..8a80e38dc 100644 --- a/mod/file/manifest.xml +++ b/mod/file/manifest.xml @@ -14,6 +14,5 @@ elgg_version 2010030101 - simple true diff --git a/mod/garbagecollector/manifest.xml b/mod/garbagecollector/manifest.xml index 466e49d61..0da71cd6b 100644 --- a/mod/garbagecollector/manifest.xml +++ b/mod/garbagecollector/manifest.xml @@ -14,5 +14,4 @@ 2009030702 true - advanced diff --git a/mod/groups/manifest.xml b/mod/groups/manifest.xml index 4188aa861..542e9de01 100644 --- a/mod/groups/manifest.xml +++ b/mod/groups/manifest.xml @@ -15,5 +15,4 @@ 2010030101 true - simple diff --git a/mod/htmlawed/manifest.xml b/mod/htmlawed/manifest.xml index 0c48bbd28..b176834e5 100644 --- a/mod/htmlawed/manifest.xml +++ b/mod/htmlawed/manifest.xml @@ -14,5 +14,4 @@ 2009041701 true - advanced diff --git a/mod/invitefriends/manifest.xml b/mod/invitefriends/manifest.xml index e02c19c36..75a2d17f2 100644 --- a/mod/invitefriends/manifest.xml +++ b/mod/invitefriends/manifest.xml @@ -13,6 +13,5 @@ elgg_version 2010030101 - advanced true diff --git a/mod/likes/manifest.xml b/mod/likes/manifest.xml index f63c643a6..946cfd86b 100644 --- a/mod/likes/manifest.xml +++ b/mod/likes/manifest.xml @@ -14,5 +14,4 @@ 2010030101 true - advanced - \ No newline at end of file + diff --git a/mod/logbrowser/manifest.xml b/mod/logbrowser/manifest.xml index 585288912..846ad155a 100644 --- a/mod/logbrowser/manifest.xml +++ b/mod/logbrowser/manifest.xml @@ -14,5 +14,4 @@ 2009030702 true - advanced diff --git a/mod/logrotate/manifest.xml b/mod/logrotate/manifest.xml index ab6250ac0..503bf6cd1 100644 --- a/mod/logrotate/manifest.xml +++ b/mod/logrotate/manifest.xml @@ -14,5 +14,4 @@ 2009030702 true - advanced diff --git a/mod/members/manifest.xml b/mod/members/manifest.xml index b96684198..f5e95eb41 100644 --- a/mod/members/manifest.xml +++ b/mod/members/manifest.xml @@ -13,5 +13,4 @@ 2010030101 true - advanced - \ No newline at end of file + diff --git a/mod/messageboard/manifest.xml b/mod/messageboard/manifest.xml index 25c42ee93..5881c4e46 100644 --- a/mod/messageboard/manifest.xml +++ b/mod/messageboard/manifest.xml @@ -14,5 +14,4 @@ 2010030101 true - simple diff --git a/mod/messages/manifest.xml b/mod/messages/manifest.xml index 66ca4b444..30acc240d 100644 --- a/mod/messages/manifest.xml +++ b/mod/messages/manifest.xml @@ -14,5 +14,4 @@ 2010030101 true - simple diff --git a/mod/notifications/manifest.xml b/mod/notifications/manifest.xml index 16a67cb00..97b88fb75 100644 --- a/mod/notifications/manifest.xml +++ b/mod/notifications/manifest.xml @@ -12,6 +12,5 @@ elgg_version 2010030101 - advanced true diff --git a/mod/pages/manifest.xml b/mod/pages/manifest.xml index 4b5e5c747..a91881cab 100644 --- a/mod/pages/manifest.xml +++ b/mod/pages/manifest.xml @@ -14,6 +14,5 @@ elgg_version 2010030101 - simple true diff --git a/mod/profile/manifest.xml b/mod/profile/manifest.xml index d811e373b..a1cff4dc2 100644 --- a/mod/profile/manifest.xml +++ b/mod/profile/manifest.xml @@ -10,7 +10,6 @@ See COPYRIGHT.txt GNU Public License Version 2 true - advanced elgg_version 2011010401 diff --git a/mod/reportedcontent/manifest.xml b/mod/reportedcontent/manifest.xml index c51134608..d65b55ca3 100644 --- a/mod/reportedcontent/manifest.xml +++ b/mod/reportedcontent/manifest.xml @@ -13,5 +13,4 @@ 2010030101 true - advanced diff --git a/mod/search/manifest.xml b/mod/search/manifest.xml index 053e22178..b13e127d0 100644 --- a/mod/search/manifest.xml +++ b/mod/search/manifest.xml @@ -13,5 +13,4 @@ 2009030702 true - advanced diff --git a/mod/tagcloud/manifest.xml b/mod/tagcloud/manifest.xml index 6fcad14e2..7c64829fc 100644 --- a/mod/tagcloud/manifest.xml +++ b/mod/tagcloud/manifest.xml @@ -13,5 +13,4 @@ elgg_version 2010030101 - advanced diff --git a/mod/thewire/manifest.xml b/mod/thewire/manifest.xml index 27dd5732d..74e811bed 100644 --- a/mod/thewire/manifest.xml +++ b/mod/thewire/manifest.xml @@ -13,6 +13,5 @@ elgg_version 2010030101 - simple true diff --git a/mod/tinymce/manifest.xml b/mod/tinymce/manifest.xml index 5e69055d8..2d062d399 100644 --- a/mod/tinymce/manifest.xml +++ b/mod/tinymce/manifest.xml @@ -14,5 +14,4 @@ 2010030101 true - advanced diff --git a/mod/twitter/manifest.xml b/mod/twitter/manifest.xml index bd7176620..ffb6ccc05 100644 --- a/mod/twitter/manifest.xml +++ b/mod/twitter/manifest.xml @@ -13,5 +13,4 @@ elgg_version 2010030101 - advanced diff --git a/mod/uservalidationbyemail/manifest.xml b/mod/uservalidationbyemail/manifest.xml index df0a7cb58..3358e1119 100644 --- a/mod/uservalidationbyemail/manifest.xml +++ b/mod/uservalidationbyemail/manifest.xml @@ -14,5 +14,4 @@ 2009033101 true - advanced diff --git a/mod/zaudio/manifest.xml b/mod/zaudio/manifest.xml index ecbff85fe..423a7e863 100644 --- a/mod/zaudio/manifest.xml +++ b/mod/zaudio/manifest.xml @@ -15,5 +15,4 @@ 2010111501 true - advanced -- cgit v1.2.3 From f1be73852439f5eb7a9f6fdf1e9587f7b2346f69 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Sun, 23 Oct 2011 10:52:28 -0700 Subject: Fixes #3959. Using elgg_release in core plugins. --- mod/blog/manifest.xml | 4 ++-- mod/bookmarks/manifest.xml | 4 ++-- mod/categories/manifest.xml | 4 ++-- mod/custom_index/manifest.xml | 4 ++-- mod/dashboard/manifest.xml | 4 ++-- mod/developers/manifest.xml | 4 ++-- mod/diagnostics/manifest.xml | 4 ++-- mod/embed/manifest.xml | 6 +++--- mod/externalpages/manifest.xml | 4 ++-- mod/file/manifest.xml | 6 +++--- mod/garbagecollector/manifest.xml | 4 ++-- mod/groups/manifest.xml | 4 ++-- mod/htmlawed/manifest.xml | 4 ++-- mod/invitefriends/manifest.xml | 4 ++-- mod/likes/manifest.xml | 4 ++-- mod/logbrowser/manifest.xml | 4 ++-- mod/logrotate/manifest.xml | 4 ++-- mod/members/manifest.xml | 4 ++-- mod/messageboard/manifest.xml | 4 ++-- mod/messages/manifest.xml | 4 ++-- mod/notifications/manifest.xml | 4 ++-- mod/oauth_api/manifest.xml | 4 ++-- mod/pages/manifest.xml | 4 ++-- mod/profile/manifest.xml | 4 ++-- mod/reportedcontent/manifest.xml | 4 ++-- mod/search/manifest.xml | 4 ++-- mod/tagcloud/manifest.xml | 4 ++-- mod/thewire/manifest.xml | 4 ++-- mod/tinymce/manifest.xml | 4 ++-- mod/twitter/manifest.xml | 4 ++-- mod/twitter_api/manifest.xml | 4 ++-- mod/uservalidationbyemail/manifest.xml | 4 ++-- mod/zaudio/manifest.xml | 4 ++-- 33 files changed, 68 insertions(+), 68 deletions(-) (limited to 'mod/thewire') diff --git a/mod/blog/manifest.xml b/mod/blog/manifest.xml index dfbd7a1a6..bd5f9c396 100644 --- a/mod/blog/manifest.xml +++ b/mod/blog/manifest.xml @@ -12,8 +12,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/bookmarks/manifest.xml b/mod/bookmarks/manifest.xml index 24969b837..679d3f1d8 100644 --- a/mod/bookmarks/manifest.xml +++ b/mod/bookmarks/manifest.xml @@ -12,8 +12,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/categories/manifest.xml b/mod/categories/manifest.xml index db6f0324f..a2f4d97fc 100644 --- a/mod/categories/manifest.xml +++ b/mod/categories/manifest.xml @@ -11,7 +11,7 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 diff --git a/mod/custom_index/manifest.xml b/mod/custom_index/manifest.xml index dd00f2c49..f93251214 100644 --- a/mod/custom_index/manifest.xml +++ b/mod/custom_index/manifest.xml @@ -9,7 +9,7 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2009030702 + elgg_release + 1.8 diff --git a/mod/dashboard/manifest.xml b/mod/dashboard/manifest.xml index 7096fc86a..14a620268 100644 --- a/mod/dashboard/manifest.xml +++ b/mod/dashboard/manifest.xml @@ -9,7 +9,7 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 diff --git a/mod/developers/manifest.xml b/mod/developers/manifest.xml index 25840e164..6b672e231 100644 --- a/mod/developers/manifest.xml +++ b/mod/developers/manifest.xml @@ -12,7 +12,7 @@ GNU Public License version 2 - elgg_version - 2009030802 + elgg_release + 1.8 diff --git a/mod/diagnostics/manifest.xml b/mod/diagnostics/manifest.xml index 5ebd7cf55..a9034d695 100644 --- a/mod/diagnostics/manifest.xml +++ b/mod/diagnostics/manifest.xml @@ -11,7 +11,7 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 diff --git a/mod/embed/manifest.xml b/mod/embed/manifest.xml index 27e9b9ada..c33c8b40a 100644 --- a/mod/embed/manifest.xml +++ b/mod/embed/manifest.xml @@ -2,7 +2,7 @@ Embed Core developers - 1.8 + 1.8.1 bundled enhancement Allows users to easily upload and embed media into text areas. @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 plugin diff --git a/mod/externalpages/manifest.xml b/mod/externalpages/manifest.xml index 4064ea602..389ad6960 100644 --- a/mod/externalpages/manifest.xml +++ b/mod/externalpages/manifest.xml @@ -9,7 +9,7 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 diff --git a/mod/file/manifest.xml b/mod/file/manifest.xml index 8a80e38dc..85ff76b41 100644 --- a/mod/file/manifest.xml +++ b/mod/file/manifest.xml @@ -2,7 +2,7 @@ File Core developers - 1.8 + 1.8.1 bundled content widget @@ -11,8 +11,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/garbagecollector/manifest.xml b/mod/garbagecollector/manifest.xml index 0da71cd6b..1cbf33592 100644 --- a/mod/garbagecollector/manifest.xml +++ b/mod/garbagecollector/manifest.xml @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2009030702 + elgg_release + 1.8 true diff --git a/mod/groups/manifest.xml b/mod/groups/manifest.xml index 542e9de01..b8fd92de7 100644 --- a/mod/groups/manifest.xml +++ b/mod/groups/manifest.xml @@ -11,8 +11,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/htmlawed/manifest.xml b/mod/htmlawed/manifest.xml index b176834e5..aac599dee 100644 --- a/mod/htmlawed/manifest.xml +++ b/mod/htmlawed/manifest.xml @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 3 - elgg_version - 2009041701 + elgg_release + 1.8 true diff --git a/mod/invitefriends/manifest.xml b/mod/invitefriends/manifest.xml index 75a2d17f2..0a1ed2012 100644 --- a/mod/invitefriends/manifest.xml +++ b/mod/invitefriends/manifest.xml @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/likes/manifest.xml b/mod/likes/manifest.xml index 946cfd86b..5a18b8862 100644 --- a/mod/likes/manifest.xml +++ b/mod/likes/manifest.xml @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/logbrowser/manifest.xml b/mod/logbrowser/manifest.xml index 846ad155a..d3b76ee8c 100644 --- a/mod/logbrowser/manifest.xml +++ b/mod/logbrowser/manifest.xml @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2009030702 + elgg_release + 1.8 true diff --git a/mod/logrotate/manifest.xml b/mod/logrotate/manifest.xml index 503bf6cd1..db04e762f 100644 --- a/mod/logrotate/manifest.xml +++ b/mod/logrotate/manifest.xml @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2009030702 + elgg_release + 1.8 true diff --git a/mod/members/manifest.xml b/mod/members/manifest.xml index f5e95eb41..efd1ede5e 100644 --- a/mod/members/manifest.xml +++ b/mod/members/manifest.xml @@ -9,8 +9,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/messageboard/manifest.xml b/mod/messageboard/manifest.xml index 5881c4e46..b4f74c7d0 100644 --- a/mod/messageboard/manifest.xml +++ b/mod/messageboard/manifest.xml @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/messages/manifest.xml b/mod/messages/manifest.xml index 30acc240d..238ccf42b 100644 --- a/mod/messages/manifest.xml +++ b/mod/messages/manifest.xml @@ -10,8 +10,8 @@ http://www.elgg.org/ GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/notifications/manifest.xml b/mod/notifications/manifest.xml index 97b88fb75..a07486331 100644 --- a/mod/notifications/manifest.xml +++ b/mod/notifications/manifest.xml @@ -9,8 +9,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/oauth_api/manifest.xml b/mod/oauth_api/manifest.xml index a0e3c4fda..62111e258 100644 --- a/mod/oauth_api/manifest.xml +++ b/mod/oauth_api/manifest.xml @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010040201 + elgg_release + 1.8 diff --git a/mod/pages/manifest.xml b/mod/pages/manifest.xml index a91881cab..dfc521e11 100644 --- a/mod/pages/manifest.xml +++ b/mod/pages/manifest.xml @@ -11,8 +11,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/profile/manifest.xml b/mod/profile/manifest.xml index a1cff4dc2..f56604c7e 100644 --- a/mod/profile/manifest.xml +++ b/mod/profile/manifest.xml @@ -11,7 +11,7 @@ GNU Public License Version 2 true - elgg_version - 2011010401 + elgg_release + 1.8 diff --git a/mod/reportedcontent/manifest.xml b/mod/reportedcontent/manifest.xml index d65b55ca3..aea8f8114 100644 --- a/mod/reportedcontent/manifest.xml +++ b/mod/reportedcontent/manifest.xml @@ -9,8 +9,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/search/manifest.xml b/mod/search/manifest.xml index b13e127d0..9a952d3d8 100644 --- a/mod/search/manifest.xml +++ b/mod/search/manifest.xml @@ -9,8 +9,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2009030702 + elgg_release + 1.8 true diff --git a/mod/tagcloud/manifest.xml b/mod/tagcloud/manifest.xml index 7c64829fc..1127e9559 100644 --- a/mod/tagcloud/manifest.xml +++ b/mod/tagcloud/manifest.xml @@ -10,7 +10,7 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 diff --git a/mod/thewire/manifest.xml b/mod/thewire/manifest.xml index 74e811bed..9f6b0eaa9 100644 --- a/mod/thewire/manifest.xml +++ b/mod/thewire/manifest.xml @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/tinymce/manifest.xml b/mod/tinymce/manifest.xml index 2d062d399..ac7b23b29 100644 --- a/mod/tinymce/manifest.xml +++ b/mod/tinymce/manifest.xml @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 true diff --git a/mod/twitter/manifest.xml b/mod/twitter/manifest.xml index ffb6ccc05..38380a2ba 100644 --- a/mod/twitter/manifest.xml +++ b/mod/twitter/manifest.xml @@ -10,7 +10,7 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010030101 + elgg_release + 1.8 diff --git a/mod/twitter_api/manifest.xml b/mod/twitter_api/manifest.xml index 38b1dc9a7..51ad0dcb4 100644 --- a/mod/twitter_api/manifest.xml +++ b/mod/twitter_api/manifest.xml @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010040201 + elgg_release + 1.8 plugin diff --git a/mod/uservalidationbyemail/manifest.xml b/mod/uservalidationbyemail/manifest.xml index 3358e1119..232ba71ca 100644 --- a/mod/uservalidationbyemail/manifest.xml +++ b/mod/uservalidationbyemail/manifest.xml @@ -10,8 +10,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2009033101 + elgg_release + 1.8 true diff --git a/mod/zaudio/manifest.xml b/mod/zaudio/manifest.xml index 423a7e863..767637a56 100644 --- a/mod/zaudio/manifest.xml +++ b/mod/zaudio/manifest.xml @@ -11,8 +11,8 @@ See COPYRIGHT.txt GNU Public License version 2 - elgg_version - 2010111501 + elgg_release + 1.8 true -- cgit v1.2.3 From 82da6bff73a99d18bbe2363c7e30aaf6d3fc949f Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 29 Oct 2011 12:33:10 -0400 Subject: adds a river layout view that all river views should use --- engine/lib/views.php | 2 +- .../views/default/river/object/blog/create.php | 2 +- .../default/river/object/bookmarks/create.php | 2 +- .../views/default/river/object/file/create.php | 2 +- .../river/annotation/group_topic_post/reply.php | 2 +- mod/groups/views/default/river/group/create.php | 2 +- .../river/object/groupforumtopic/create.php | 2 +- .../default/river/relationship/member/create.php | 2 +- .../default/river/object/messageboard/create.php | 2 +- .../views/default/river/object/page/create.php | 2 +- .../views/default/river/object/thewire/create.php | 2 +- .../river/annotation/generic_comment/create.php | 2 +- views/default/river/elements/layout.php | 14 +++++++++++ views/default/river/item.php | 28 +++++++++++++++++----- views/default/river/relationship/friend/create.php | 2 +- .../river/user/default/profileiconupdate.php | 3 +-- views/default/river/user/default/profileupdate.php | 2 +- 17 files changed, 51 insertions(+), 22 deletions(-) create mode 100644 views/default/river/elements/layout.php (limited to 'mod/thewire') diff --git a/engine/lib/views.php b/engine/lib/views.php index e8cb20232..3b26fb169 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -1225,7 +1225,7 @@ function elgg_view_river_item($item, array $vars = array()) { $vars['item'] = $item; - return elgg_view($item->getView(), $vars); + return elgg_view('river/item', $vars); } /** diff --git a/mod/blog/views/default/river/object/blog/create.php b/mod/blog/views/default/river/object/blog/create.php index 613cbb165..a054c1061 100644 --- a/mod/blog/views/default/river/object/blog/create.php +++ b/mod/blog/views/default/river/object/blog/create.php @@ -7,7 +7,7 @@ $object = $vars['item']->getObjectEntity(); $excerpt = strip_tags($object->excerpt); $excerpt = elgg_get_excerpt($excerpt); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'message' => $excerpt, )); \ No newline at end of file diff --git a/mod/bookmarks/views/default/river/object/bookmarks/create.php b/mod/bookmarks/views/default/river/object/bookmarks/create.php index 984d109be..388f54ac9 100644 --- a/mod/bookmarks/views/default/river/object/bookmarks/create.php +++ b/mod/bookmarks/views/default/river/object/bookmarks/create.php @@ -8,7 +8,7 @@ $object = $vars['item']->getObjectEntity(); $excerpt = elgg_get_excerpt($object->description); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'message' => $excerpt, 'attachments' => elgg_view('output/url', array('href' => $object->address)), diff --git a/mod/file/views/default/river/object/file/create.php b/mod/file/views/default/river/object/file/create.php index dad629120..e8e6142e0 100644 --- a/mod/file/views/default/river/object/file/create.php +++ b/mod/file/views/default/river/object/file/create.php @@ -7,7 +7,7 @@ $object = $vars['item']->getObjectEntity(); $excerpt = strip_tags($object->description); $excerpt = elgg_get_excerpt($excerpt); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'message' => $excerpt, )); \ No newline at end of file diff --git a/mod/groups/views/default/river/annotation/group_topic_post/reply.php b/mod/groups/views/default/river/annotation/group_topic_post/reply.php index cc94fbd43..afc823bde 100644 --- a/mod/groups/views/default/river/annotation/group_topic_post/reply.php +++ b/mod/groups/views/default/river/annotation/group_topic_post/reply.php @@ -6,7 +6,7 @@ $object = $vars['item']->getObjectEntity(); $reply = $vars['item']->getAnnotation(); $excerpt = elgg_get_excerpt($reply->value); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'message' => $excerpt, )); \ No newline at end of file diff --git a/mod/groups/views/default/river/group/create.php b/mod/groups/views/default/river/group/create.php index cacb5ad3f..ea42b5b00 100644 --- a/mod/groups/views/default/river/group/create.php +++ b/mod/groups/views/default/river/group/create.php @@ -7,7 +7,7 @@ $object = $vars['item']->getObjectEntity(); $excerpt = strip_tags($object->description); $excerpt = elgg_get_excerpt($excerpt); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'message' => $excerpt, )); \ No newline at end of file diff --git a/mod/groups/views/default/river/object/groupforumtopic/create.php b/mod/groups/views/default/river/object/groupforumtopic/create.php index 80e7b09aa..e7d92bc08 100644 --- a/mod/groups/views/default/river/object/groupforumtopic/create.php +++ b/mod/groups/views/default/river/object/groupforumtopic/create.php @@ -15,7 +15,7 @@ if (elgg_is_logged_in() && $object->canAnnotate(0, 'group_topic_post')) { $responses = elgg_view_form('discussion/reply/save', $form_vars, $body_vars); } -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'message' => $excerpt, 'responses' => $responses, diff --git a/mod/groups/views/default/river/relationship/member/create.php b/mod/groups/views/default/river/relationship/member/create.php index d1c4c3ed3..0afd87e4b 100644 --- a/mod/groups/views/default/river/relationship/member/create.php +++ b/mod/groups/views/default/river/relationship/member/create.php @@ -3,6 +3,6 @@ * Group join river view. */ -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], )); diff --git a/mod/messageboard/views/default/river/object/messageboard/create.php b/mod/messageboard/views/default/river/object/messageboard/create.php index 975598805..7ce7f6b4e 100644 --- a/mod/messageboard/views/default/river/object/messageboard/create.php +++ b/mod/messageboard/views/default/river/object/messageboard/create.php @@ -5,7 +5,7 @@ $messageboard = $vars['item']->getAnnotation(); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'message' => $messageboard->value, )); diff --git a/mod/pages/views/default/river/object/page/create.php b/mod/pages/views/default/river/object/page/create.php index ca15ddea7..4c31def33 100644 --- a/mod/pages/views/default/river/object/page/create.php +++ b/mod/pages/views/default/river/object/page/create.php @@ -7,7 +7,7 @@ $object = $vars['item']->getObjectEntity(); $excerpt = strip_tags($object->description); $excerpt = elgg_get_excerpt($excerpt); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'message' => $excerpt, )); \ No newline at end of file diff --git a/mod/thewire/views/default/river/object/thewire/create.php b/mod/thewire/views/default/river/object/thewire/create.php index fbf592664..c75a42b3f 100644 --- a/mod/thewire/views/default/river/object/thewire/create.php +++ b/mod/thewire/views/default/river/object/thewire/create.php @@ -24,7 +24,7 @@ $object_link = elgg_view('output/url', array( $summary = elgg_echo("river:create:object:thewire", array($subject_link, $object_link)); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'message' => $excerpt, 'summary' => $summary, diff --git a/views/default/river/annotation/generic_comment/create.php b/views/default/river/annotation/generic_comment/create.php index d3db68e41..7d586450d 100644 --- a/views/default/river/annotation/generic_comment/create.php +++ b/views/default/river/annotation/generic_comment/create.php @@ -5,7 +5,7 @@ $object = $vars['item']->getObjectEntity(); $comment = $vars['item']->getAnnotation(); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'message' => elgg_get_excerpt($comment->value), )); diff --git a/views/default/river/elements/layout.php b/views/default/river/elements/layout.php new file mode 100644 index 000000000..94622e272 --- /dev/null +++ b/views/default/river/elements/layout.php @@ -0,0 +1,14 @@ + elgg_view('river/elements/image', $vars), + 'body' => elgg_view('river/elements/body', $vars), + 'class' => 'elgg-river-item', +)); diff --git a/views/default/river/item.php b/views/default/river/item.php index 94622e272..75767e08d 100644 --- a/views/default/river/item.php +++ b/views/default/river/item.php @@ -1,14 +1,30 @@ elgg_view('river/elements/image', $vars), - 'body' => elgg_view('river/elements/body', $vars), - 'class' => 'elgg-river-item', -)); +echo elgg_view($item->getView(), $vars); + + +$_elgg_special_river_catch = false; diff --git a/views/default/river/relationship/friend/create.php b/views/default/river/relationship/friend/create.php index a191e7b1e..0408d79e1 100644 --- a/views/default/river/relationship/friend/create.php +++ b/views/default/river/relationship/friend/create.php @@ -8,7 +8,7 @@ $object = $vars['item']->getObjectEntity(); $subject_icon = elgg_view_entity_icon($subject, 'tiny'); $object_icon = elgg_view_entity_icon($object, 'tiny'); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'attachments' => $subject_icon . elgg_view_icon('arrow-right') . $object_icon, )); diff --git a/views/default/river/user/default/profileiconupdate.php b/views/default/river/user/default/profileiconupdate.php index 90daab1a7..160ffd252 100644 --- a/views/default/river/user/default/profileiconupdate.php +++ b/views/default/river/user/default/profileiconupdate.php @@ -3,7 +3,6 @@ * Update avatar river view */ - $subject = $vars['item']->getSubjectEntity(); $subject_link = elgg_view('output/url', array( @@ -15,7 +14,7 @@ $subject_link = elgg_view('output/url', array( $string = elgg_echo('river:update:user:avatar', array($subject_link)); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'summary' => $string, 'attachments' => elgg_view_entity_icon($subject, 'tiny', array('hover' => false)), diff --git a/views/default/river/user/default/profileupdate.php b/views/default/river/user/default/profileupdate.php index 69b69b106..ce72970d6 100644 --- a/views/default/river/user/default/profileupdate.php +++ b/views/default/river/user/default/profileupdate.php @@ -14,7 +14,7 @@ $subject_link = elgg_view('output/url', array( $string = elgg_echo('river:update:user:profile', array($subject_link)); -echo elgg_view('river/item', array( +echo elgg_view('river/elements/layout', array( 'item' => $vars['item'], 'summary' => $string, )); -- cgit v1.2.3 From ef0d4ab9c2b037eb76c4f9af0a9220be1fdd72b4 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Sat, 29 Oct 2011 17:47:55 -0700 Subject: Refs #3859. Added elgg_register_simplecache_view() to core plugins' js. --- mod/blog/lib/blog.php | 3 --- mod/blog/start.php | 1 + mod/notifications/index.php | 4 ---- mod/thewire/start.php | 1 + mod/tinymce/start.php | 1 + 5 files changed, 3 insertions(+), 7 deletions(-) (limited to 'mod/thewire') diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 41924f336..792f32c42 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -317,9 +317,6 @@ function blog_get_page_content_edit($page, $guid = 0, $revision = NULL) { $title = elgg_echo('blog:add'); $content = elgg_view_form('blog/save', $vars, $body_vars); - - $blog_js = elgg_get_simplecache_url('js', 'blog/save_draft'); - elgg_register_js('elgg.blog', $blog_js); } $return['title'] = $title; diff --git a/mod/blog/start.php b/mod/blog/start.php index 2d8f75ed2..9e77b0a93 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -32,6 +32,7 @@ function blog_init() { // register the blog's JavaScript $blog_js = elgg_get_simplecache_url('js', 'blog/save_draft'); + elgg_register_simplecache_view('js/blog/save_draft'); elgg_register_js('elgg.blog', $blog_js); // routing of urls diff --git a/mod/notifications/index.php b/mod/notifications/index.php index b54677681..e56042b73 100644 --- a/mod/notifications/index.php +++ b/mod/notifications/index.php @@ -14,10 +14,6 @@ gatekeeper(); elgg_set_page_owner_guid(elgg_get_logged_in_user_guid()); $user = elgg_get_page_owner_guid(); -$js_url = elgg_get_simplecache_url('js', 'friendsPickerv1'); -elgg_register_js('friendsPickerv1', $js_url); -elgg_load_js('friendsPickerv1'); - // Set the context to settings elgg_set_context('settings'); diff --git a/mod/thewire/start.php b/mod/thewire/start.php index 9d3993b6f..d5e995359 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -26,6 +26,7 @@ function thewire_init() { // register the wire's JavaScript $thewire_js = elgg_get_simplecache_url('js', 'thewire'); + elgg_register_simplecache_view('js/thewire'); elgg_register_js('elgg.thewire', $thewire_js, 'footer'); // add a site navigation item diff --git a/mod/tinymce/start.php b/mod/tinymce/start.php index ee7154d22..48625f456 100644 --- a/mod/tinymce/start.php +++ b/mod/tinymce/start.php @@ -13,6 +13,7 @@ function tinymce_init() { elgg_register_js('tinymce', 'mod/tinymce/vendor/tinymce/jscripts/tiny_mce/tiny_mce.js'); elgg_register_js('elgg.tinymce', elgg_get_simplecache_url('js', 'tinymce')); + elgg_register_simplecache_view('js/tinymce'); elgg_extend_view('input/longtext', 'tinymce/init'); -- cgit v1.2.3 From 5c0bd8a19a294f178ddd6607dd3f624ca34fa5b7 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 1 Nov 2011 19:36:27 -0400 Subject: added semi-colons after function expressions --- .../coding_standards/javascript_coding_standards.txt | 11 +++++++++++ js/lib/avatar_cropper.js | 6 +++--- js/lib/configuration.js | 2 +- js/lib/elgglib.js | 8 ++++---- js/lib/hooks.js | 8 ++++---- js/lib/ui.js | 14 +++++++------- js/lib/ui.widgets.js | 12 ++++++------ js/lib/userpicker.js | 10 +++++----- mod/blog/views/default/js/blog/save_draft.php | 4 ++-- mod/bookmarks/views/default/bookmarks/js.php | 2 +- mod/developers/views/default/js/developers/developers.php | 4 ++-- mod/embed/views/default/js/embed/embed.php | 8 ++++---- mod/messageboard/views/default/messageboard/js.php | 6 +++--- mod/thewire/views/default/js/thewire.php | 6 +++--- mod/tinymce/views/default/js/tinymce.php | 4 ++-- .../views/default/uservalidationbyemail/js.php | 2 +- 16 files changed, 59 insertions(+), 48 deletions(-) (limited to 'mod/thewire') diff --git a/documentation/coding_standards/javascript_coding_standards.txt b/documentation/coding_standards/javascript_coding_standards.txt index 7d3b842ec..9939e80ab 100644 --- a/documentation/coding_standards/javascript_coding_standards.txt +++ b/documentation/coding_standards/javascript_coding_standards.txt @@ -1,2 +1,13 @@ *** JAVASCRIPT CODING STANDARDS *** +* Same formatting standards as PHP. + +* All functions should be in the elgg namespace. + +* Function expressions should end with a semi-colon: + + elgg.ui.toggles = function(event) { + event.preventDefault(); + $(target).slideToggle('medium'); + }; + diff --git a/js/lib/avatar_cropper.js b/js/lib/avatar_cropper.js index df6ba7866..fc32a0832 100644 --- a/js/lib/avatar_cropper.js +++ b/js/lib/avatar_cropper.js @@ -32,7 +32,7 @@ elgg.avatarCropper.init = function() { var selection = ias.getSelection(); elgg.avatarCropper.preview($('#user-avatar-cropper'), selection); } -} +}; /** * Handler for changing select area. @@ -57,7 +57,7 @@ elgg.avatarCropper.preview = function(img, selection) { marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px', marginTop: '-' + Math.round(scaleY * selection.y1) + 'px' }); -} +}; /** * Handler for updating the form inputs after select ends @@ -71,6 +71,6 @@ elgg.avatarCropper.selectChange = function(img, selection) { $('input[name=x2]').val(selection.x2); $('input[name=y1]').val(selection.y1); $('input[name=y2]').val(selection.y2); -} +}; elgg.register_hook_handler('init', 'system', elgg.avatarCropper.init); \ No newline at end of file diff --git a/js/lib/configuration.js b/js/lib/configuration.js index f724a2f01..6e221c957 100644 --- a/js/lib/configuration.js +++ b/js/lib/configuration.js @@ -7,4 +7,4 @@ elgg.provide('elgg.config'); */ elgg.get_site_url = function() { return elgg.config.wwwroot; -} \ No newline at end of file +}; \ No newline at end of file diff --git a/js/lib/elgglib.js b/js/lib/elgglib.js index 628adccfc..d963a62be 100644 --- a/js/lib/elgglib.js +++ b/js/lib/elgglib.js @@ -467,7 +467,7 @@ elgg.parse_url = function(url, component, expand) { } } return results; -} +}; /** * Returns an object with key/values of the parsed query string. @@ -540,7 +540,7 @@ elgg.push_to_object_array = function(object, parent, value) { } return false; -} +}; /** * Tests if object[parent] contains child @@ -554,7 +554,7 @@ elgg.is_in_object_array = function(object, parent, value) { elgg.assertTypeOf('string', parent); return typeof(object[parent]) != 'undefined' && object[parent].indexOf(value) >= 0; -} +}; /** * Triggers the init hook when the library is ready @@ -569,4 +569,4 @@ elgg.initWhenReady = function() { elgg.trigger_hook('init', 'system'); elgg.trigger_hook('ready', 'system'); } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/js/lib/hooks.js b/js/lib/hooks.js index edfd28f24..7bac471f6 100644 --- a/js/lib/hooks.js +++ b/js/lib/hooks.js @@ -136,7 +136,7 @@ elgg.register_instant_hook = function(name, type) { elgg.assertTypeOf('string', type); return elgg.push_to_object_array(elgg.config.instant_hooks, name, type); -} +}; /** * Is this hook registered as an instant hook? @@ -146,7 +146,7 @@ elgg.register_instant_hook = function(name, type) { */ elgg.is_instant_hook = function(name, type) { return elgg.is_in_object_array(elgg.config.instant_hooks, name, type); -} +}; /** * Records that a hook has been triggered. @@ -156,7 +156,7 @@ elgg.is_instant_hook = function(name, type) { */ elgg.set_triggered_hook = function(name, type) { return elgg.push_to_object_array(elgg.config.triggered_hooks, name, type); -} +}; /** * Has this hook been triggered yet? @@ -166,7 +166,7 @@ elgg.set_triggered_hook = function(name, type) { */ elgg.is_triggered_hook = function(name, type) { return elgg.is_in_object_array(elgg.config.triggered_hooks, name, type); -} +}; elgg.register_instant_hook('init', 'system'); elgg.register_instant_hook('ready', 'system'); diff --git a/js/lib/ui.js b/js/lib/ui.js index 6cc1bc78a..16ef2dc96 100644 --- a/js/lib/ui.js +++ b/js/lib/ui.js @@ -25,7 +25,7 @@ elgg.ui.init = function () { if ($('.elgg-input-date').length) { elgg.ui.initDatePicker(); } -} +}; /** * Toggles an element based on clicking a separate element @@ -43,7 +43,7 @@ elgg.ui.toggles = function(event) { var target = $(this).toggleClass('elgg-state-active').attr('href'); $(target).slideToggle('medium'); -} +}; /** * Pops up an element based on clicking a separate element @@ -105,7 +105,7 @@ elgg.ui.popsUp = function(event) { $('body') .die('click', elgg.ui.popupClose) .live('click', elgg.ui.popupClose); -} +}; /** * Catches clicks that aren't in a popup and closes all popups. @@ -143,7 +143,7 @@ elgg.ui.popupClose = function(event) { $('body').die('click', elgg.ui.popClose); } -} +}; /** * Toggles a child menu when the parent is clicked @@ -155,7 +155,7 @@ elgg.ui.toggleMenu = function(event) { $(this).siblings().slideToggle('medium'); $(this).toggleClass('elgg-menu-closed elgg-menu-opened'); event.preventDefault(); -} +}; /** * Initialize the hover menu @@ -215,7 +215,7 @@ elgg.ui.initHoverMenu = function(parent) { $(".elgg-menu-hover").fadeOut(); } }); -} +}; /** * Calls a confirm() and prevents default if denied. @@ -276,7 +276,7 @@ elgg.ui.initDatePicker = function() { } } }); -} +}; elgg.register_hook_handler('init', 'system', elgg.ui.init); elgg.register_hook_handler('getOptions', 'ui.popup', elgg.ui.LoginHandler); \ No newline at end of file diff --git a/js/lib/ui.widgets.js b/js/lib/ui.widgets.js index fb256672a..6435d2147 100644 --- a/js/lib/ui.widgets.js +++ b/js/lib/ui.widgets.js @@ -65,7 +65,7 @@ elgg.ui.widgets.add = function(event) { } }); event.preventDefault(); -} +}; /** * Persist the widget's new position @@ -96,7 +96,7 @@ elgg.ui.widgets.move = function(event, ui) { // @hack fixes jquery-ui/opera bug where draggable elements jump ui.item.css('top', 0); ui.item.css('left', 0); -} +}; /** * Removes a widget from the layout @@ -134,7 +134,7 @@ elgg.ui.widgets.remove = function(event) { } }); event.preventDefault(); -} +}; /** * Toggle the collapse state of the widget @@ -146,7 +146,7 @@ elgg.ui.widgets.collapseToggle = function(event) { $(this).toggleClass('elgg-widget-collapsed'); $(this).parent().parent().find('.elgg-body').slideToggle('medium'); event.preventDefault(); -} +}; /** * Save a widget's settings @@ -178,7 +178,7 @@ elgg.ui.widgets.saveSettings = function(event) { } }); event.preventDefault(); -} +}; /** * Make all elements have the same min-height @@ -197,6 +197,6 @@ elgg.ui.widgets.equalHeight = function(selector) { } }) $(selector).css('min-height', maxHeight); -} +}; elgg.register_hook_handler('init', 'system', elgg.ui.widgets.init); diff --git a/js/lib/userpicker.js b/js/lib/userpicker.js index ae2add53f..8287ba91c 100644 --- a/js/lib/userpicker.js +++ b/js/lib/userpicker.js @@ -34,7 +34,7 @@ elgg.userpicker.init = function() { }); $('.elgg-userpicker-remove').live('click', elgg.userpicker.removeUser); -} +}; /** * Adds a user to the select user list @@ -59,7 +59,7 @@ elgg.userpicker.addUser = function(event, ui) { $(this).val(''); event.preventDefault(); -} +}; /** * Remove a user from the selected user list @@ -75,7 +75,7 @@ elgg.userpicker.removeUser = function(event) { item.remove(); event.preventDefault(); -} +}; /** * Render the list item for insertion into the selected user list @@ -96,7 +96,7 @@ elgg.userpicker.viewUser = function(info) { html += " Date: Thu, 3 Nov 2011 08:24:19 -0400 Subject: Refs #4027 updated all rss views except for groups --- mod/bookmarks/languages/en.php | 4 +- mod/bookmarks/views/rss/object/bookmarks.php | 36 +++++++++++------ mod/file/start.php | 3 ++ mod/file/views/rss/file/enclosure.php | 16 ++++++++ mod/file/views/rss/object/file.php | 21 ---------- mod/search/views/rss/search/list.php | 25 ++++++++++++ mod/search/views/rss/search/listing.php | 25 ------------ mod/thewire/languages/en.php | 1 + mod/thewire/views/rss/object/thewire.php | 59 +++++++++++----------------- views/rss/annotation/generic_comment.php | 2 +- views/rss/group/default.php | 2 +- views/rss/object/default.php | 6 ++- views/rss/user/default.php | 2 +- 13 files changed, 103 insertions(+), 99 deletions(-) create mode 100644 mod/file/views/rss/file/enclosure.php delete mode 100644 mod/file/views/rss/object/file.php create mode 100644 mod/search/views/rss/search/list.php delete mode 100644 mod/search/views/rss/search/listing.php (limited to 'mod/thewire') diff --git a/mod/bookmarks/languages/en.php b/mod/bookmarks/languages/en.php index 0478e292f..2c589c207 100644 --- a/mod/bookmarks/languages/en.php +++ b/mod/bookmarks/languages/en.php @@ -68,14 +68,14 @@ $english = array( */ 'bookmarks:save:success' => "Your item was successfully bookmarked.", - 'bookmarks:delete:success' => "Your bookmarked item was successfully deleted.", + 'bookmarks:delete:success' => "Your bookmark was deleted.", /** * Error messages */ 'bookmarks:save:failed' => "Your bookmark could not be saved. Make sure you've entered a title and address and then try again.", - 'bookmarks:save:invalid' => "The address of the bookmark is invalid and could nto be saved.", + 'bookmarks:save:invalid' => "The address of the bookmark is invalid and could not be saved.", 'bookmarks:delete:failed' => "Your bookmark could not be deleted. Please try again.", ); diff --git a/mod/bookmarks/views/rss/object/bookmarks.php b/mod/bookmarks/views/rss/object/bookmarks.php index 8e88485f1..1abda4710 100644 --- a/mod/bookmarks/views/rss/object/bookmarks.php +++ b/mod/bookmarks/views/rss/object/bookmarks.php @@ -1,23 +1,37 @@ title; if (empty($title)) { - $title = substr($vars['entity']->description,0,32); - if (strlen($vars['entity']->description) > 32) - $title .= " ..."; + $title = strip_tags($vars['entity']->description); + $title = elgg_get_excerpt($title, 32); } -?> +$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8'); +$pubdate = date('r', $vars['entity']->getTimeCreated()); +$url_text = elgg_echo('bookmarks:address'); +$link = elgg_view('output/url', array('href' => $vars['entity']->address)); +$description = $vars['entity']->description . "

$url_text: $link

"; + +$creator = elgg_view('page/components/creator', $vars); +$georss = elgg_view('page/components/georss', $vars); +$extension = elgg_view('extensions/item'); + +$item = <<<__HTML - getURL(); ?> - time_created) ?> - address; ?> - <![CDATA[<?php echo $title; ?>]]> - description)); ?>]]> + $permalink + $pubdate + $permalink + <![CDATA[$title]]> + + $creator$georss$extension + +__HTML; + +echo $item; diff --git a/mod/file/start.php b/mod/file/start.php index 843ae0794..9007fc9ba 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -22,6 +22,9 @@ function file_init() { // Extend CSS elgg_extend_view('css/elgg', 'file/css'); + // add enclosure to rss item + elgg_extend_view('extensions/item', 'file/enclosure'); + // extend group main page elgg_extend_view('groups/tool_latest', 'file/group_module'); diff --git a/mod/file/views/rss/file/enclosure.php b/mod/file/views/rss/file/enclosure.php new file mode 100644 index 000000000..600d287ef --- /dev/null +++ b/mod/file/views/rss/file/enclosure.php @@ -0,0 +1,16 @@ +getGUID(); + $size = $vars['entity']->size(); + $mime_type = $vars['entity']->getMimeType(); + echo <<"; +END; +} diff --git a/mod/file/views/rss/object/file.php b/mod/file/views/rss/object/file.php deleted file mode 100644 index a0660d6c8..000000000 --- a/mod/file/views/rss/object/file.php +++ /dev/null @@ -1,21 +0,0 @@ -title; -if (empty($title)) { - $title = elgg_get_excerpt($vars['entity']->description, 32); -} -?> - - - getURL(); ?> - time_created) ?> - getURL(); ?> - <![CDATA[<?php echo $title; ?>]]> - description)); ?>]]> - - diff --git a/mod/search/views/rss/search/list.php b/mod/search/views/rss/search/list.php new file mode 100644 index 000000000..32082fd31 --- /dev/null +++ b/mod/search/views/rss/search/list.php @@ -0,0 +1,25 @@ + $entity, + 'params' => $vars['params'], + 'results' => $vars['results'] + )); + } +} + +echo $body; \ No newline at end of file diff --git a/mod/search/views/rss/search/listing.php b/mod/search/views/rss/search/listing.php deleted file mode 100644 index 32082fd31..000000000 --- a/mod/search/views/rss/search/listing.php +++ /dev/null @@ -1,25 +0,0 @@ - $entity, - 'params' => $vars['params'], - 'results' => $vars['results'] - )); - } -} - -echo $body; \ No newline at end of file diff --git a/mod/thewire/languages/en.php b/mod/thewire/languages/en.php index 9716fc060..3c83d145f 100644 --- a/mod/thewire/languages/en.php +++ b/mod/thewire/languages/en.php @@ -20,6 +20,7 @@ $english = array( 'thewire:noposts' => "No wire posts yet", 'item:object:thewire' => "Wire posts", 'thewire:update' => 'Update', + 'thewire:by' => 'Wire post by %s', 'thewire:previous' => "Previous", 'thewire:hide' => "Hide", diff --git a/mod/thewire/views/rss/object/thewire.php b/mod/thewire/views/rss/object/thewire.php index 8229f46f1..494c2c8dc 100644 --- a/mod/thewire/views/rss/object/thewire.php +++ b/mod/thewire/views/rss/object/thewire.php @@ -2,46 +2,35 @@ /** * Elgg thewire rss view * - * @package Elgg - * @subpackage Core + * @package ElggTheWire */ $owner = $vars['entity']->getOwnerEntity(); -if ($owner) { - $title = elgg_echo('thewire:by', array($owner->name)); -} else { - $subtitle = strip_tags($vars['entity']->description); - $title = elgg_get_excerpt($subtitle, 32); +if (!$owner) { + return true; } -?> +$title = elgg_echo('thewire:by', array($owner->name)); +$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8'); +$pubdate = date('r', $vars['entity']->getTimeCreated()); + +$description = autop($vars['entity']->description); + +$creator = elgg_view('page/components/creator', $vars); +$georss = elgg_view('page/components/georss', $vars); +$extension = elgg_view('extensions/item', $vars); + +$item = <<<__HTML -getGUID(); ?> -time_created) ?> -getURL()); ?> -<![CDATA[<?php echo $title; ?>]]> -description)); ?>]]> -getOwnerEntity(); -if ($owner) { - ?> - name; ?> - -getLongitude()) && - ($vars['entity']->getLatitude()) -) { - ?> - - getLatitude(); ?> getLongitude(); ?> - - - + $permalink + $pubdate + $permalink + <![CDATA[$title]]> + + $creator$georss$extension + +__HTML; + +echo $item; diff --git a/views/rss/annotation/generic_comment.php b/views/rss/annotation/generic_comment.php index 9e9107568..de652fc8e 100644 --- a/views/rss/annotation/generic_comment.php +++ b/views/rss/annotation/generic_comment.php @@ -16,7 +16,7 @@ $permalink = $annotation->getURL(); $title = elgg_echo('generic_comment:title', array($poster_name)); $creator = elgg_view('page/components/creator', array('entity' => $annotation)); -$extensions = elgg_view('extensions/item'); +$extensions = elgg_view('extensions/item', $vars); $item = <<<__HTML diff --git a/views/rss/group/default.php b/views/rss/group/default.php index 1276ab8f1..f57c7f82c 100644 --- a/views/rss/group/default.php +++ b/views/rss/group/default.php @@ -20,7 +20,7 @@ if ($vars['entity']->description) { $creator = elgg_view('page/components/creator', $vars); $georss = elgg_view('page/components/georss', $vars); -$extension = elgg_view('extensions/item'); +$extension = elgg_view('extensions/item', $vars); $item = <<<__HTML diff --git a/views/rss/object/default.php b/views/rss/object/default.php index b5d269ac7..be8025953 100644 --- a/views/rss/object/default.php +++ b/views/rss/object/default.php @@ -15,9 +15,11 @@ if (empty($title)) { $permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8'); $pubdate = date('r', $vars['entity']->getTimeCreated()); +$description = autop($vars['entity']->description); + $creator = elgg_view('page/components/creator', $vars); $georss = elgg_view('page/components/georss', $vars); -$extension = elgg_view('extensions/item'); +$extension = elgg_view('extensions/item', $vars); $item = <<<__HTML @@ -25,7 +27,7 @@ $item = <<<__HTML $pubdate $permalink <![CDATA[$title]]> - description}]]> + $creator$georss$extension diff --git a/views/rss/user/default.php b/views/rss/user/default.php index 1500881f8..1c7bf75e7 100644 --- a/views/rss/user/default.php +++ b/views/rss/user/default.php @@ -17,7 +17,7 @@ if ($vars['entity']->description) { } $georss = elgg_view('page/components/georss', $vars); -$extension = elgg_view('extensions/item'); +$extension = elgg_view('extensions/item', $vars); $item = <<<__HTML -- cgit v1.2.3 From 54773892f88f53231b85d08d86d11557121d9609 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 4 Nov 2011 22:40:06 -0400 Subject: Fixes #4059 page handlers all return nothing --- engine/lib/admin.php | 9 ++-- engine/lib/deprecated-1.8.php | 37 +++++++++++++++ engine/lib/elgglib.php | 14 +++--- engine/lib/pagehandler.php | 64 +++----------------------- engine/lib/river.php | 1 + engine/lib/tags.php | 27 +++++------ engine/lib/user_settings.php | 7 +-- engine/lib/users.php | 4 +- mod/blog/start.php | 12 ++--- mod/bookmarks/start.php | 6 +-- mod/categories/start.php | 5 +-- mod/dashboard/start.php | 4 ++ mod/developers/start.php | 1 + mod/diagnostics/start.php | 3 -- mod/externalpages/start.php | 1 + mod/file/start.php | 11 +++-- mod/groups/start.php | 5 ++- mod/invitefriends/start.php | 1 + mod/members/start.php | 1 + mod/messageboard/start.php | 4 +- mod/messages/start.php | 6 +-- mod/notifications/start.php | 4 +- mod/pages/start.php | 4 +- mod/profile/start.php | 1 + mod/reportedcontent/start.php | 1 + mod/search/start.php | 5 ++- mod/thewire/start.php | 89 ++++++++++++++++++------------------- mod/twitter_api/start.php | 9 ++-- mod/uservalidationbyemail/start.php | 6 ++- 29 files changed, 161 insertions(+), 181 deletions(-) (limited to 'mod/thewire') diff --git a/engine/lib/admin.php b/engine/lib/admin.php index ae6429baf..c0a5c0995 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -314,7 +314,7 @@ function admin_init() { // automatic adding of widgets for admin elgg_register_event_handler('make_admin', 'user', 'elgg_add_admin_widgets'); - elgg_register_page_handler('admin', 'admin_settings_page_handler'); + elgg_register_page_handler('admin', 'admin_page_handler'); elgg_register_page_handler('admin_plugin_screenshot', 'admin_plugin_screenshot_page_handler'); elgg_register_page_handler('admin_plugin_text_file', 'admin_markdown_page_handler'); } @@ -430,7 +430,7 @@ function admin_pagesetup() { * @return void * @access private */ -function admin_settings_page_handler($page) { +function admin_page_handler($page) { admin_gatekeeper(); elgg_admin_add_plugin_settings_menu(); @@ -485,7 +485,7 @@ function admin_settings_page_handler($page) { * admin_plugin_screenshot///. * * @param array $pages The pages array - * @return true + * @return void * @access private */ function admin_plugin_screenshot_page_handler($pages) { @@ -524,8 +524,6 @@ function admin_plugin_screenshot_page_handler($pages) { echo file_get_contents($file); break; } - - return true; } /** @@ -541,6 +539,7 @@ function admin_plugin_screenshot_page_handler($pages) { * * LICENSE.txt * * @param type $page + * @return void * @access private */ function admin_markdown_page_handler($pages) { diff --git a/engine/lib/deprecated-1.8.php b/engine/lib/deprecated-1.8.php index beba7d2b7..e1866498b 100644 --- a/engine/lib/deprecated-1.8.php +++ b/engine/lib/deprecated-1.8.php @@ -4735,3 +4735,40 @@ function remove_from_river_by_id($id) { return elgg_delete_river(array('id' => $id)); } + +/** + * A default page handler + * Tries to locate a suitable file to include. Only works for core pages, not plugins. + * + * @param array $page The page URL elements + * @param string $handler The base handler + * + * @return true|false Depending on success + * @deprecated 1.8 + */ +function default_page_handler($page, $handler) { + global $CONFIG; + + elgg_deprecated_notice("default_page_handler is deprecated", "1.8"); + + $page = implode('/', $page); + + // protect against including arbitary files + $page = str_replace("..", "", $page); + + $callpath = $CONFIG->path . $handler . "/" . $page; + if (is_dir($callpath)) { + $callpath = sanitise_filepath($callpath); + $callpath .= "index.php"; + if (file_exists($callpath)) { + if (include($callpath)) { + return TRUE; + } + } + } else if (file_exists($callpath)) { + include($callpath); + return TRUE; + } + + return FALSE; +} diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index a6f5fbc6f..03774deb4 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1745,7 +1745,7 @@ function _elgg_shutdown_hook() { * @access private */ function elgg_js_page_handler($page) { - return elgg_cacheable_view_page_handler($page, 'js'); + elgg_cacheable_view_page_handler($page, 'js'); } /** @@ -1777,8 +1777,6 @@ function elgg_ajax_page_handler($page) { echo elgg_view($view, $vars); } - - return true; } /** @@ -1798,7 +1796,7 @@ function elgg_css_page_handler($page) { $page[0] = 'elgg'; } - return elgg_cacheable_view_page_handler($page, 'css'); + elgg_cacheable_view_page_handler($page, 'css'); } /** @@ -1809,7 +1807,7 @@ function elgg_css_page_handler($page) { * @param array $page The page array * @param string $type The type: js or css * - * @return mixed + * @return void * @access private */ function elgg_cacheable_view_page_handler($page, $type) { @@ -1824,7 +1822,7 @@ function elgg_cacheable_view_page_handler($page, $type) { break; default: - return false; + return; break; } @@ -1851,8 +1849,6 @@ function elgg_cacheable_view_page_handler($page, $type) { echo $return; } - - return true; } /** @@ -1886,6 +1882,8 @@ function elgg_sql_reverse_order_by_clause($order_by) { * * Used as a callback for ElggBatch. * + * @todo why aren't these static methods on ElggBatch? + * * @param object $object The object to enable * @return bool * @access private diff --git a/engine/lib/pagehandler.php b/engine/lib/pagehandler.php index 0d5e5f89b..91e568c1d 100644 --- a/engine/lib/pagehandler.php +++ b/engine/lib/pagehandler.php @@ -9,12 +9,10 @@ /** * Turns the current page over to the page handler, allowing registered handlers to take over. * - * If a page handler returns FALSE, the request is handed over to the default_page_handler. - * * @param string $handler The name of the handler type (eg 'blog') * @param array $page The parameters to the page, as an array (exploded by '/' slashes) * - * @return true|false Depending on whether a registered page handler was found + * @return bool * @access private */ function page_handler($handler, $page) { @@ -42,26 +40,12 @@ function page_handler($handler, $page) { $handler = $params['handler']; $page = $params['segments']; - if (!isset($CONFIG->pagehandler) || empty($handler)) { - $result = false; - } else if (isset($CONFIG->pagehandler[$handler]) && is_callable($CONFIG->pagehandler[$handler])) { + if (isset($CONFIG->pagehandler) && !empty($handler) && isset($CONFIG->pagehandler[$handler])) { $function = $CONFIG->pagehandler[$handler]; - $result = call_user_func($function, $page, $handler); - if ($result !== false) { - $result = true; - } - } else { - $result = false; + call_user_func($function, $page, $handler); } - if (!$result) { - $result = default_page_handler($page, $handler); - } - if ($result !== false) { - $result = true; - } - - return $result; + return headers_sent(); } /** @@ -74,14 +58,15 @@ function page_handler($handler, $page) { * For example, the URL http://yoururl/blog/username/friends/ would result in the call: * blog_page_handler(array('username','friends'), blog); * - * Page handler functions should return true or the default page handler will be called. - * * A request to register a page handler with the same identifier as previously registered * handler will replace the previous one. * * The context is set to the page handler identifier before the registered * page handler function is called. For the above example, the context is set to 'blog'. * + * Requests not handled are forwarded to the front page with a reason of 404. + * Plugins can register for the 'forward', '404' plugin hook. @see forward() + * * @param string $handler The page type to handle * @param string $function Your function name * @@ -119,38 +104,3 @@ function elgg_unregister_page_handler($handler) { unset($CONFIG->pagehandler[$handler]); } - -/** - * A default page handler - * Tries to locate a suitable file to include. Only works for core pages, not plugins. - * - * @param array $page The page URL elements - * @param string $handler The base handler - * - * @return true|false Depending on success - * @access private - */ -function default_page_handler($page, $handler) { - global $CONFIG; - - $page = implode('/', $page); - - // protect against including arbitary files - $page = str_replace("..", "", $page); - - $callpath = $CONFIG->path . $handler . "/" . $page; - if (is_dir($callpath)) { - $callpath = sanitise_filepath($callpath); - $callpath .= "index.php"; - if (file_exists($callpath)) { - if (include($callpath)) { - return TRUE; - } - } - } else if (file_exists($callpath)) { - include($callpath); - return TRUE; - } - - return FALSE; -} diff --git a/engine/lib/river.php b/engine/lib/river.php index f430eb224..b2fead824 100644 --- a/engine/lib/river.php +++ b/engine/lib/river.php @@ -586,6 +586,7 @@ function update_river_access_by_object($object_guid, $access_id) { * Page handler for activiy * * @param array $page + * @return void * @access private */ function elgg_river_page_handler($page) { diff --git a/engine/lib/tags.php b/engine/lib/tags.php index 6275d653c..b2c9a672f 100644 --- a/engine/lib/tags.php +++ b/engine/lib/tags.php @@ -325,21 +325,18 @@ function elgg_get_registered_tag_metadata_names() { * @access private */ function elgg_tagcloud_page_handler($page) { - switch ($page[0]) { - default: - $title = elgg_view_title(elgg_echo('tags:site_cloud')); - $options = array( - 'threshold' => 0, - 'limit' => 100, - 'tag_name' => 'tags', - ); - $tags = elgg_view_tagcloud($options); - $content = $title . $tags; - $body = elgg_view_layout('one_sidebar', array('content' => $content)); - - echo elgg_view_page(elgg_echo('tags:site_cloud'), $body); - break; - } + + $title = elgg_view_title(elgg_echo('tags:site_cloud')); + $options = array( + 'threshold' => 0, + 'limit' => 100, + 'tag_name' => 'tags', + ); + $tags = elgg_view_tagcloud($options); + $content = $title . $tags; + $body = elgg_view_layout('one_sidebar', array('content' => $content)); + + echo elgg_view_page(elgg_echo('tags:site_cloud'), $body); } /** diff --git a/engine/lib/user_settings.php b/engine/lib/user_settings.php index bb5d8d6c4..12084662b 100644 --- a/engine/lib/user_settings.php +++ b/engine/lib/user_settings.php @@ -304,7 +304,7 @@ function usersettings_page_handler($page) { $page[0] = 'user'; } - if ($page[1]) { + if (isset($page[1])) { $user = get_user_by_username($page[1]); elgg_set_page_owner_guid($user->guid); } else { @@ -324,12 +324,13 @@ function usersettings_page_handler($page) { $path = $CONFIG->path . "pages/settings/tools.php"; break; case 'user': - default: $path = $CONFIG->path . "pages/settings/account.php"; break; } - require($path); + if (isset($path)) { + require $path; + } } /** diff --git a/engine/lib/users.php b/engine/lib/users.php index 843b897e9..3001a2ac6 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1072,7 +1072,7 @@ function friends_page_handler($page_elements) { function friends_of_page_handler($page_elements) { elgg_set_context('friends'); if (isset($page_elements[0]) && $user = get_user_by_username($page_elements[0])) { - set_page_owner($user->getGUID()); + elgg_set_page_owner_guid($user->getGUID()); } if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) { collections_submenu_items(); @@ -1404,6 +1404,7 @@ function elgg_profile_fields_setup() { * /avatar/view/// * * @param array $page + * @return void * @access private */ function elgg_avatar_page_handler($page) { @@ -1426,6 +1427,7 @@ function elgg_avatar_page_handler($page) { * Profile page handler * * @param array $page + * @return void * @access private */ function elgg_profile_page_handler($page) { diff --git a/mod/blog/start.php b/mod/blog/start.php index 81837c48e..b2da00bc7 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -93,7 +93,7 @@ function blog_init() { * @todo no archives for all blogs or friends * * @param array $page - * @return NULL + * @return void */ function blog_page_handler($page) { @@ -139,17 +139,17 @@ function blog_page_handler($page) { $params = blog_get_page_content_list($page[1]); break; case 'all': - default: - $title = elgg_echo('blog:title:all_blogs'); $params = blog_get_page_content_list(); break; } - $params['sidebar'] .= elgg_view('blog/sidebar', array('page' => $page_type)); + if (isset($params)) { + $params['sidebar'] .= elgg_view('blog/sidebar', array('page' => $page_type)); - $body = elgg_view_layout('content', $params); + $body = elgg_view_layout('content', $params); - echo elgg_view_page($params['title'], $body); + echo elgg_view_page($params['title'], $body); + } } /** diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php index 2a7b44e97..6d9dc9b3d 100644 --- a/mod/bookmarks/start.php +++ b/mod/bookmarks/start.php @@ -83,6 +83,7 @@ function bookmarks_init() { * Title is ignored * * @param array $page + * @return void */ function bookmarks_page_handler($page) { elgg_load_library('elgg:bookmarks'); @@ -145,14 +146,9 @@ function bookmarks_page_handler($page) { set_input('container_guid', $page[1]); include "$pages/bookmarklet.php"; break; - - default: - return false; } elgg_pop_context(); - - return true; } /** diff --git a/mod/categories/start.php b/mod/categories/start.php index b6bc4a55c..3cec516f1 100644 --- a/mod/categories/start.php +++ b/mod/categories/start.php @@ -27,12 +27,11 @@ function categories_init() { /** - * Page handler - * + * Category page handler + * @return void */ function categories_page_handler() { include(dirname(__FILE__) . "/pages/categories/listing.php"); - return TRUE; } /** diff --git a/mod/dashboard/start.php b/mod/dashboard/start.php index 5635ead57..0197ee64f 100644 --- a/mod/dashboard/start.php +++ b/mod/dashboard/start.php @@ -29,6 +29,10 @@ function dashboard_init() { elgg_register_plugin_hook_handler('get_list', 'default_widgets', 'dashboard_default_widgets'); } +/** + * Dashboard page handler + * @return void + */ function dashboard_page_handler() { // Ensure that only logged-in users can see this page gatekeeper(); diff --git a/mod/developers/start.php b/mod/developers/start.php index ab9a174a4..c89e3d36f 100644 --- a/mod/developers/start.php +++ b/mod/developers/start.php @@ -157,6 +157,7 @@ function developers_log_events($name, $type) { * Serve the theme preview pages * * @param array $page + * @return void */ function developers_theme_preview_controller($page) { if (!isset($page[0])) { diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php index 735e15042..0bcc08bd9 100644 --- a/mod/diagnostics/start.php +++ b/mod/diagnostics/start.php @@ -12,9 +12,6 @@ elgg_register_event_handler('init', 'system', 'diagnostics_init'); */ function diagnostics_init() { - // Register a page handler, so we can have nice URLs - elgg_register_page_handler('diagnostics','diagnostics_page_handler'); - // Add admin menu item elgg_register_admin_menu_item('develop', 'diagnostics', 'develop_utilities'); diff --git a/mod/externalpages/start.php b/mod/externalpages/start.php index 3169503be..271051ba9 100644 --- a/mod/externalpages/start.php +++ b/mod/externalpages/start.php @@ -53,6 +53,7 @@ function expages_setup_footer_menu() { * * @param array $page URL segements * @param string $handler Handler identifier + * @return void */ function expages_page_handler($page, $handler) { if ($handler == 'expages') { diff --git a/mod/file/start.php b/mod/file/start.php index 9007fc9ba..bb20fc7ba 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -100,7 +100,7 @@ function file_init() { * Title is ignored * * @param array $page - * @return NULL + * @return void */ function file_page_handler($page) { @@ -136,7 +136,6 @@ function file_page_handler($page) { include "$file_dir/owner.php"; break; case 'all': - default: include "$file_dir/world.php"; break; } @@ -145,10 +144,10 @@ function file_page_handler($page) { /** * Creates the notification message body * - * @param unknown_type $hook - * @param unknown_type $entity_type - * @param unknown_type $returnvalue - * @param unknown_type $params + * @param string $hook + * @param string $entity_type + * @param string $returnvalue + * @param array $params */ function file_notify_message($hook, $entity_type, $returnvalue, $params) { $entity = $params['entity']; diff --git a/mod/groups/start.php b/mod/groups/start.php index 1b5b03ce7..710ccc0b2 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -192,6 +192,7 @@ function groups_setup_sidebar_menus() { * Group members: groups/members/ * * @param array $page Array of url segments for routing + * @return void */ function groups_page_handler($page) { @@ -244,7 +245,8 @@ function groups_page_handler($page) { /** * Handle group icons. * - * @param unknown_type $page + * @param array $page + * @return void */ function groups_icon_handler($page) { @@ -750,6 +752,7 @@ function discussion_init() { * Edit discussion topic: discussion/edit/ * * @param array $page Array of url segments for routing + * @return void */ function discussion_page_handler($page) { diff --git a/mod/invitefriends/start.php b/mod/invitefriends/start.php index f39d25f4b..61cfed96c 100644 --- a/mod/invitefriends/start.php +++ b/mod/invitefriends/start.php @@ -27,6 +27,7 @@ function invitefriends_init() { * Page handler function * * @param array $page Page URL segments + * @return void */ function invitefriends_page_handler($page) { gatekeeper(); diff --git a/mod/members/start.php b/mod/members/start.php index 2c1793c17..1d734da17 100644 --- a/mod/members/start.php +++ b/mod/members/start.php @@ -19,6 +19,7 @@ function members_init() { * Members page handler * * @param array $page url segments + * @return void */ function members_page_handler($page) { $base = elgg_get_plugins_path() . 'members/pages/members'; diff --git a/mod/messageboard/start.php b/mod/messageboard/start.php index 0b0155069..9db16cf3b 100644 --- a/mod/messageboard/start.php +++ b/mod/messageboard/start.php @@ -42,7 +42,7 @@ function messageboard_init() { * Group messageboard: messageboard/group//all (not implemented) * * @param array $page Array of page elements - * @return bool + * @return void */ function messageboard_page_handler($page) { $new_section_one = array('owner', 'add', 'group'); @@ -85,8 +85,6 @@ function messageboard_page_handler($page) { include "$pages/owner.php"; break; } - - return true; } /** diff --git a/mod/messages/start.php b/mod/messages/start.php index 4a3b0b250..631a5f731 100644 --- a/mod/messages/start.php +++ b/mod/messages/start.php @@ -70,7 +70,7 @@ function messages_init() { * Messages page handler * * @param array $page Array of URL components for routing - * @return bool + * @return void */ function messages_page_handler($page) { @@ -112,11 +112,7 @@ function messages_page_handler($page) { case 'add': include("$base_dir/send.php"); break; - default: - return false; } - - return true; } /** diff --git a/mod/notifications/start.php b/mod/notifications/start.php index c6701cc3e..7ec82cfc9 100644 --- a/mod/notifications/start.php +++ b/mod/notifications/start.php @@ -36,6 +36,7 @@ function notifications_plugin_init() { * Route page requests * * @param array $page Array of url parameters + * @return void */ function notifications_page_handler($page) { @@ -51,12 +52,9 @@ function notifications_page_handler($page) { require "$base/groups.php"; break; case 'personal': - default: require "$base/index.php"; break; } - - return TRUE; } /** diff --git a/mod/pages/start.php b/mod/pages/start.php index 744306649..fd1d7df47 100644 --- a/mod/pages/start.php +++ b/mod/pages/start.php @@ -100,6 +100,7 @@ function pages_init() { * Title is ignored * * @param array $page + * @return void */ function pages_page_handler($page) { @@ -149,12 +150,9 @@ function pages_page_handler($page) { include "$base_dir/revision.php"; break; case 'all': - default: include "$base_dir/world.php"; break; } - - return; } /** diff --git a/mod/profile/start.php b/mod/profile/start.php index 0f13ad844..1c82d55f5 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -48,6 +48,7 @@ function profile_init() { * Profile page handler * * @param array $page Array of URL segments passed by the page handling mechanism + * @return void */ function profile_page_handler($page) { diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php index 66a1248d9..0638feb52 100644 --- a/mod/reportedcontent/start.php +++ b/mod/reportedcontent/start.php @@ -60,6 +60,7 @@ function reportedcontent_init() { * Serves the add report page * * @param array $page Array of page routing elements + * @return void */ function reportedcontent_page_handler($page) { // only logged in users can report things diff --git a/mod/search/start.php b/mod/search/start.php index 9ab14f42f..a88c6ec03 100644 --- a/mod/search/start.php +++ b/mod/search/start.php @@ -14,7 +14,7 @@ function search_init() { require_once 'search_hooks.php'; // page handler for search actions and results - elgg_register_page_handler('search','search_page_handler'); + elgg_register_page_handler('search', 'search_page_handler'); // register some default search hooks elgg_register_plugin_hook_handler('search', 'object', 'search_objects_hook'); @@ -55,7 +55,8 @@ function search_init() { /** * Page handler for search * - * @param array $page Page elements from pain page handler + * @param array $page Page elements from core page handler + * @return void */ function search_page_handler($page) { diff --git a/mod/thewire/start.php b/mod/thewire/start.php index d5e995359..f46d9ec75 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -84,58 +84,57 @@ function thewire_init() { * thewire/tag/ View wire posts tagged with * * @param array $page From the page_handler function - * @return true|false Depending on success + * @return void */ function thewire_page_handler($page) { $base_dir = elgg_get_plugins_path() . 'thewire/pages/thewire'; - // if just /thewire go to global view in the else statement - if (isset($page[0]) && $page[0]) { - - switch ($page[0]) { - case "all": - include "$base_dir/everyone.php"; - break; - - case "friends": - include "$base_dir/friends.php"; - break; - - case "owner": - include "$base_dir/owner.php"; - break; - - case "thread": - if (isset($page[1])) { - set_input('thread_id', $page[1]); - } - include "$base_dir/thread.php"; - break; - case "reply": - if (isset($page[1])) { - set_input('guid', $page[1]); - } - include "$base_dir/reply.php"; - break; - case "tag": - if (isset($page[1])) { - set_input('tag', $page[1]); - } - include "$base_dir/tag.php"; - break; - case "previous": - if (isset($page[1])) { - set_input('guid', $page[1]); - } - include "$base_dir/previous.php"; - break; - } - } else { - include "$base_dir/everyone.php"; + if (!isset($page[0])) { + $page = array('all'); } - return true; + switch ($page[0]) { + case "all": + include "$base_dir/everyone.php"; + break; + + case "friends": + include "$base_dir/friends.php"; + break; + + case "owner": + include "$base_dir/owner.php"; + break; + + case "thread": + if (isset($page[1])) { + set_input('thread_id', $page[1]); + } + include "$base_dir/thread.php"; + break; + + case "reply": + if (isset($page[1])) { + set_input('guid', $page[1]); + } + include "$base_dir/reply.php"; + break; + + case "tag": + if (isset($page[1])) { + set_input('tag', $page[1]); + } + include "$base_dir/tag.php"; + break; + + case "previous": + if (isset($page[1])) { + set_input('guid', $page[1]); + } + include "$base_dir/previous.php"; + break; + } } /** diff --git a/mod/twitter_api/start.php b/mod/twitter_api/start.php index b17643c8c..fd2ff6493 100644 --- a/mod/twitter_api/start.php +++ b/mod/twitter_api/start.php @@ -45,13 +45,14 @@ function twitter_api_init() { * Handles old pg/twitterservice/ handler * * @param array $page + * @return void */ function twitter_api_pagehandler_deprecated($page) { $url = elgg_get_site_url() . 'pg/twitter_api/authorize'; $msg = elgg_echo('twitter_api:deprecated_callback_url', array($url)); register_error($msg); - return twitter_api_pagehandler($page); + twitter_api_pagehandler($page); } @@ -59,10 +60,11 @@ function twitter_api_pagehandler_deprecated($page) { * Serves pages for twitter. * * @param array $page + * @return void */ function twitter_api_pagehandler($page) { if (!isset($page[0])) { - forward(); + return; } switch ($page[0]) { @@ -90,9 +92,6 @@ function twitter_api_pagehandler($page) { $pages = dirname(__FILE__) . '/pages/twitter_api'; include "$pages/interstitial.php"; break; - default: - forward(); - break; } } diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php index d3d0c3488..a674511cf 100644 --- a/mod/uservalidationbyemail/start.php +++ b/mod/uservalidationbyemail/start.php @@ -149,6 +149,7 @@ function uservalidationbyemail_check_auth_attempt($credentials) { * Checks sent passed validation code and user guids and validates the user. * * @param array $page + * @return void */ function uservalidationbyemail_page_handler($page) { @@ -162,7 +163,7 @@ function uservalidationbyemail_page_handler($page) { $user = get_entity($user_guid); - if (($code) && ($user)) { + if ($code && $user) { if (uservalidationbyemail_validate_email($user_guid, $code)) { elgg_push_context('uservalidationbyemail_validate_user'); @@ -184,7 +185,8 @@ function uservalidationbyemail_page_handler($page) { register_error(elgg_echo('email:confirm:fail')); } - forward(); + // forward to front page + forward(''); } /** -- cgit v1.2.3 From 0759c227bf7b73254cf6eb5e8502463875f2469f Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 4 Nov 2011 23:29:54 -0400 Subject: Fixes #4059 returning true when handling a page --- engine/lib/admin.php | 9 ++++++--- engine/lib/cron.php | 3 ++- engine/lib/elgglib.php | 15 +++++++++------ engine/lib/entities.php | 4 +++- engine/lib/pagehandler.php | 6 ++++-- engine/lib/river.php | 3 ++- engine/lib/tags.php | 3 ++- engine/lib/user_settings.php | 3 ++- engine/lib/users.php | 30 ++++++++++++++++++++++-------- mod/blog/start.php | 13 +++++++------ mod/bookmarks/start.php | 6 +++++- mod/categories/start.php | 3 ++- mod/dashboard/start.php | 3 ++- mod/developers/start.php | 3 ++- mod/externalpages/start.php | 3 ++- mod/file/start.php | 5 ++++- mod/groups/start.php | 10 ++++++++-- mod/invitefriends/start.php | 3 ++- mod/members/start.php | 3 ++- mod/messageboard/start.php | 6 +++++- mod/messages/start.php | 5 ++++- mod/notifications/start.php | 5 ++++- mod/pages/start.php | 5 ++++- mod/profile/start.php | 3 ++- mod/reportedcontent/start.php | 3 ++- mod/search/start.php | 3 ++- mod/thewire/start.php | 6 +++++- mod/twitter_api/start.php | 9 ++++++--- mod/uservalidationbyemail/start.php | 2 +- 29 files changed, 123 insertions(+), 52 deletions(-) (limited to 'mod/thewire') diff --git a/engine/lib/admin.php b/engine/lib/admin.php index c0a5c0995..3baf2ff61 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -427,7 +427,7 @@ function admin_pagesetup() { * * @param array $page Array of pages * - * @return void + * @return bool * @access private */ function admin_page_handler($page) { @@ -478,6 +478,7 @@ function admin_page_handler($page) { $body = elgg_view_layout('admin', array('content' => $content, 'title' => $title)); echo elgg_view_page($title, $body, 'admin'); + return true; } /** @@ -485,7 +486,7 @@ function admin_page_handler($page) { * admin_plugin_screenshot///. * * @param array $pages The pages array - * @return void + * @return bool * @access private */ function admin_plugin_screenshot_page_handler($pages) { @@ -524,6 +525,7 @@ function admin_plugin_screenshot_page_handler($pages) { echo file_get_contents($file); break; } + return true; } /** @@ -539,7 +541,7 @@ function admin_plugin_screenshot_page_handler($pages) { * * LICENSE.txt * * @param type $page - * @return void + * @return bool * @access private */ function admin_markdown_page_handler($pages) { @@ -595,6 +597,7 @@ function admin_markdown_page_handler($pages) { )); echo elgg_view_page($title, $body, 'admin'); + return true; } /** diff --git a/engine/lib/cron.php b/engine/lib/cron.php index 8c0b62a53..8af640396 100644 --- a/engine/lib/cron.php +++ b/engine/lib/cron.php @@ -25,7 +25,7 @@ function cron_init() { * * @param array $page Pages * - * @return void + * @return bool * @access private */ function cron_page_handler($page) { @@ -63,6 +63,7 @@ function cron_page_handler($page) { $std_out = ob_get_clean(); echo $std_out . $old_stdout; + return true; } /** diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 03774deb4..10804fdca 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1740,12 +1740,12 @@ function _elgg_shutdown_hook() { * * @param array $page The page array * - * @return void + * @return bool * @elgg_pagehandler js * @access private */ function elgg_js_page_handler($page) { - elgg_cacheable_view_page_handler($page, 'js'); + return elgg_cacheable_view_page_handler($page, 'js'); } /** @@ -1755,7 +1755,7 @@ function elgg_js_page_handler($page) { * * @param array $page The page array * - * @return void + * @return bool * @elgg_pagehandler ajax * @access private */ @@ -1776,7 +1776,9 @@ function elgg_ajax_page_handler($page) { } echo elgg_view($view, $vars); + return true; } + return false; } /** @@ -1796,7 +1798,7 @@ function elgg_css_page_handler($page) { $page[0] = 'elgg'; } - elgg_cacheable_view_page_handler($page, 'css'); + return elgg_cacheable_view_page_handler($page, 'css'); } /** @@ -1807,7 +1809,7 @@ function elgg_css_page_handler($page) { * @param array $page The page array * @param string $type The type: js or css * - * @return void + * @return bool * @access private */ function elgg_cacheable_view_page_handler($page, $type) { @@ -1822,7 +1824,7 @@ function elgg_cacheable_view_page_handler($page, $type) { break; default: - return; + return false; break; } @@ -1848,6 +1850,7 @@ function elgg_cacheable_view_page_handler($page, $type) { //header("Content-Length: " . strlen($return)); echo $return; + return true; } } diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 98e48641a..4b8b6694f 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -2071,7 +2071,7 @@ function is_registered_entity_type($type, $subtype = null) { * * @param array $page Page elements from pain page handler * - * @return void + * @return bool * @elgg_page_handler view * @access private */ @@ -2080,7 +2080,9 @@ function entities_page_handler($page) { global $CONFIG; set_input('guid', $page[0]); include($CONFIG->path . "pages/entities/index.php"); + return true; } + return false; } /** diff --git a/engine/lib/pagehandler.php b/engine/lib/pagehandler.php index 91e568c1d..f331e2aae 100644 --- a/engine/lib/pagehandler.php +++ b/engine/lib/pagehandler.php @@ -40,12 +40,13 @@ function page_handler($handler, $page) { $handler = $params['handler']; $page = $params['segments']; + $result = false; if (isset($CONFIG->pagehandler) && !empty($handler) && isset($CONFIG->pagehandler[$handler])) { $function = $CONFIG->pagehandler[$handler]; - call_user_func($function, $page, $handler); + $result = call_user_func($function, $page, $handler); } - return headers_sent(); + return $result || headers_sent(); } /** @@ -64,6 +65,7 @@ function page_handler($handler, $page) { * The context is set to the page handler identifier before the registered * page handler function is called. For the above example, the context is set to 'blog'. * + * Page handlers should return true to indicate that they handled the request. * Requests not handled are forwarded to the front page with a reason of 404. * Plugins can register for the 'forward', '404' plugin hook. @see forward() * diff --git a/engine/lib/river.php b/engine/lib/river.php index b2fead824..466eca253 100644 --- a/engine/lib/river.php +++ b/engine/lib/river.php @@ -586,7 +586,7 @@ function update_river_access_by_object($object_guid, $access_id) { * Page handler for activiy * * @param array $page - * @return void + * @return bool * @access private */ function elgg_river_page_handler($page) { @@ -607,6 +607,7 @@ function elgg_river_page_handler($page) { $entity_subtype = ''; require_once("{$CONFIG->path}pages/river.php"); + return true; } /** diff --git a/engine/lib/tags.php b/engine/lib/tags.php index b2c9a672f..a0887d0f3 100644 --- a/engine/lib/tags.php +++ b/engine/lib/tags.php @@ -321,7 +321,7 @@ function elgg_get_registered_tag_metadata_names() { * * @param array $page Page array * - * @return void + * @return bool * @access private */ function elgg_tagcloud_page_handler($page) { @@ -337,6 +337,7 @@ function elgg_tagcloud_page_handler($page) { $body = elgg_view_layout('one_sidebar', array('content' => $content)); echo elgg_view_page(elgg_echo('tags:site_cloud'), $body); + return true; } /** diff --git a/engine/lib/user_settings.php b/engine/lib/user_settings.php index 12084662b..1e2d6db10 100644 --- a/engine/lib/user_settings.php +++ b/engine/lib/user_settings.php @@ -294,7 +294,7 @@ function usersettings_pagesetup() { * * @param array $page Pages array * - * @return void + * @return bool * @access private */ function usersettings_page_handler($page) { @@ -330,6 +330,7 @@ function usersettings_page_handler($page) { if (isset($path)) { require $path; + return true; } } diff --git a/engine/lib/users.php b/engine/lib/users.php index 3001a2ac6..3aff2ca9d 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1048,7 +1048,7 @@ function collections_submenu_items() { * * @param array $page_elements Page elements * - * @return void + * @return bool * @access private */ function friends_page_handler($page_elements) { @@ -1059,6 +1059,7 @@ function friends_page_handler($page_elements) { collections_submenu_items(); } require_once(dirname(dirname(dirname(__FILE__))) . "/pages/friends/index.php"); + return true; } /** @@ -1066,7 +1067,7 @@ function friends_page_handler($page_elements) { * * @param array $page_elements Page elements * - * @return void + * @return bool * @access private */ function friends_of_page_handler($page_elements) { @@ -1078,6 +1079,7 @@ function friends_of_page_handler($page_elements) { collections_submenu_items(); } require_once(dirname(dirname(dirname(__FILE__))) . "/pages/friends/of.php"); + return true; } /** @@ -1085,7 +1087,7 @@ function friends_of_page_handler($page_elements) { * * @param array $page_elements Page elements * - * @return void + * @return bool * @access private */ function collections_page_handler($page_elements) { @@ -1096,6 +1098,7 @@ function collections_page_handler($page_elements) { set_page_owner(elgg_get_logged_in_user_guid()); collections_submenu_items(); require_once "{$base}pages/friends/collections/add.php"; + return true; } else { $user = get_user_by_username($page_elements[0]); if ($user) { @@ -1104,9 +1107,11 @@ function collections_page_handler($page_elements) { collections_submenu_items(); } require_once "{$base}pages/friends/collections/view.php"; + return true; } } } + return false; } /** @@ -1115,7 +1120,7 @@ function collections_page_handler($page_elements) { * @param array $page_elements Page elements * @param string $handler The handler string * - * @return void + * @return bool * @access private */ function elgg_user_account_page_handler($page_elements, $handler) { @@ -1131,7 +1136,10 @@ function elgg_user_account_page_handler($page_elements, $handler) { case 'register': require_once("$base_dir/register.php"); break; + default: + return false; } + return true; } /** @@ -1140,17 +1148,18 @@ function elgg_user_account_page_handler($page_elements, $handler) { * This is a fallback for non-JS users who click on the * dropdown login link. * - * @return void + * @return bool * @access private */ function elgg_user_login_page_handler() { if (elgg_is_logged_in()) { - forward(); + forward(''); } $login_box = elgg_view('core/account/login_box'); $content = elgg_view_layout('one_column', array('content' => $login_box)); echo elgg_view_page(elgg_echo('login'), $content); + return true; } /** @@ -1404,7 +1413,7 @@ function elgg_profile_fields_setup() { * /avatar/view/// * * @param array $page - * @return void + * @return bool * @access private */ function elgg_avatar_page_handler($page) { @@ -1417,17 +1426,20 @@ function elgg_avatar_page_handler($page) { if ($page[0] == 'edit') { require_once("{$CONFIG->path}pages/avatar/edit.php"); + return true; } else { set_input('size', $page[2]); require_once("{$CONFIG->path}pages/avatar/view.php"); + return true; } + return false; } /** * Profile page handler * * @param array $page - * @return void + * @return bool * @access private */ function elgg_profile_page_handler($page) { @@ -1438,7 +1450,9 @@ function elgg_profile_page_handler($page) { if ($page[1] == 'edit') { require_once("{$CONFIG->path}pages/profile/edit.php"); + return true; } + return false; } /** diff --git a/mod/blog/start.php b/mod/blog/start.php index b2da00bc7..052c63651 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -93,7 +93,7 @@ function blog_init() { * @todo no archives for all blogs or friends * * @param array $page - * @return void + * @return bool */ function blog_page_handler($page) { @@ -141,15 +141,16 @@ function blog_page_handler($page) { case 'all': $params = blog_get_page_content_list(); break; + default: + return false; } - if (isset($params)) { - $params['sidebar'] .= elgg_view('blog/sidebar', array('page' => $page_type)); + $params['sidebar'] .= elgg_view('blog/sidebar', array('page' => $page_type)); - $body = elgg_view_layout('content', $params); + $body = elgg_view_layout('content', $params); - echo elgg_view_page($params['title'], $body); - } + echo elgg_view_page($params['title'], $body); + return true; } /** diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php index 6d9dc9b3d..21a2d8940 100644 --- a/mod/bookmarks/start.php +++ b/mod/bookmarks/start.php @@ -83,7 +83,7 @@ function bookmarks_init() { * Title is ignored * * @param array $page - * @return void + * @return bool */ function bookmarks_page_handler($page) { elgg_load_library('elgg:bookmarks'); @@ -146,9 +146,13 @@ function bookmarks_page_handler($page) { set_input('container_guid', $page[1]); include "$pages/bookmarklet.php"; break; + + default: + return false; } elgg_pop_context(); + return true; } /** diff --git a/mod/categories/start.php b/mod/categories/start.php index 3cec516f1..0aacf11e7 100644 --- a/mod/categories/start.php +++ b/mod/categories/start.php @@ -28,10 +28,11 @@ function categories_init() { /** * Category page handler - * @return void + * @return bool */ function categories_page_handler() { include(dirname(__FILE__) . "/pages/categories/listing.php"); + return true; } /** diff --git a/mod/dashboard/start.php b/mod/dashboard/start.php index 0197ee64f..65007d1a8 100644 --- a/mod/dashboard/start.php +++ b/mod/dashboard/start.php @@ -31,7 +31,7 @@ function dashboard_init() { /** * Dashboard page handler - * @return void + * @return bool */ function dashboard_page_handler() { // Ensure that only logged-in users can see this page @@ -55,6 +55,7 @@ function dashboard_page_handler() { $body = elgg_view_layout('one_column', array('content' => $widgets)); echo elgg_view_page($title, $body); + return true; } diff --git a/mod/developers/start.php b/mod/developers/start.php index c89e3d36f..2e3df7663 100644 --- a/mod/developers/start.php +++ b/mod/developers/start.php @@ -157,7 +157,7 @@ function developers_log_events($name, $type) { * Serve the theme preview pages * * @param array $page - * @return void + * @return bool */ function developers_theme_preview_controller($page) { if (!isset($page[0])) { @@ -192,4 +192,5 @@ function developers_theme_preview_controller($page) { )); echo elgg_view_page($title, $layout, 'theme_preview'); + return true; } diff --git a/mod/externalpages/start.php b/mod/externalpages/start.php index 271051ba9..13235af53 100644 --- a/mod/externalpages/start.php +++ b/mod/externalpages/start.php @@ -53,7 +53,7 @@ function expages_setup_footer_menu() { * * @param array $page URL segements * @param string $handler Handler identifier - * @return void + * @return bool */ function expages_page_handler($page, $handler) { if ($handler == 'expages') { @@ -77,6 +77,7 @@ function expages_page_handler($page, $handler) { $body = elgg_view_layout("one_sidebar", array('content' => $content)); echo elgg_view_page($title, $body); + return true; } /** diff --git a/mod/file/start.php b/mod/file/start.php index bb20fc7ba..f8b7fa423 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -100,7 +100,7 @@ function file_init() { * Title is ignored * * @param array $page - * @return void + * @return bool */ function file_page_handler($page) { @@ -138,7 +138,10 @@ function file_page_handler($page) { case 'all': include "$file_dir/world.php"; break; + default: + return false; } + return true; } /** diff --git a/mod/groups/start.php b/mod/groups/start.php index 710ccc0b2..5469da013 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -192,7 +192,7 @@ function groups_setup_sidebar_menus() { * Group members: groups/members/ * * @param array $page Array of url segments for routing - * @return void + * @return bool */ function groups_page_handler($page) { @@ -239,7 +239,10 @@ function groups_page_handler($page) { case 'requests': groups_handle_requests_page($page[1]); break; + default: + return false; } + return true; } /** @@ -752,7 +755,7 @@ function discussion_init() { * Edit discussion topic: discussion/edit/ * * @param array $page Array of url segments for routing - * @return void + * @return bool */ function discussion_page_handler($page) { @@ -776,7 +779,10 @@ function discussion_page_handler($page) { case 'view': discussion_handle_view_page($page[1]); break; + default: + return false; } + return true; } /** diff --git a/mod/invitefriends/start.php b/mod/invitefriends/start.php index 61cfed96c..be853f2ce 100644 --- a/mod/invitefriends/start.php +++ b/mod/invitefriends/start.php @@ -27,7 +27,7 @@ function invitefriends_init() { * Page handler function * * @param array $page Page URL segments - * @return void + * @return bool */ function invitefriends_page_handler($page) { gatekeeper(); @@ -46,4 +46,5 @@ function invitefriends_page_handler($page) { $body = elgg_view_layout('one_sidebar', $params); echo elgg_view_page($title, $body); + return true; } diff --git a/mod/members/start.php b/mod/members/start.php index 1d734da17..54787cd16 100644 --- a/mod/members/start.php +++ b/mod/members/start.php @@ -19,7 +19,7 @@ function members_init() { * Members page handler * * @param array $page url segments - * @return void + * @return bool */ function members_page_handler($page) { $base = elgg_get_plugins_path() . 'members/pages/members'; @@ -37,4 +37,5 @@ function members_page_handler($page) { } else { require_once "$base/index.php"; } + return true; } diff --git a/mod/messageboard/start.php b/mod/messageboard/start.php index 9db16cf3b..0c65edc4f 100644 --- a/mod/messageboard/start.php +++ b/mod/messageboard/start.php @@ -42,7 +42,7 @@ function messageboard_init() { * Group messageboard: messageboard/group//all (not implemented) * * @param array $page Array of page elements - * @return void + * @return bool */ function messageboard_page_handler($page) { $new_section_one = array('owner', 'add', 'group'); @@ -84,7 +84,11 @@ function messageboard_page_handler($page) { set_input('page_owner_guid', $owner_guid); include "$pages/owner.php"; break; + + default: + return false; } + return true; } /** diff --git a/mod/messages/start.php b/mod/messages/start.php index 631a5f731..e4ef4d43a 100644 --- a/mod/messages/start.php +++ b/mod/messages/start.php @@ -70,7 +70,7 @@ function messages_init() { * Messages page handler * * @param array $page Array of URL components for routing - * @return void + * @return bool */ function messages_page_handler($page) { @@ -112,7 +112,10 @@ function messages_page_handler($page) { case 'add': include("$base_dir/send.php"); break; + default: + return false; } + return true; } /** diff --git a/mod/notifications/start.php b/mod/notifications/start.php index 7ec82cfc9..761f17e40 100644 --- a/mod/notifications/start.php +++ b/mod/notifications/start.php @@ -36,7 +36,7 @@ function notifications_plugin_init() { * Route page requests * * @param array $page Array of url parameters - * @return void + * @return bool */ function notifications_page_handler($page) { @@ -54,7 +54,10 @@ function notifications_page_handler($page) { case 'personal': require "$base/index.php"; break; + default: + return false; } + return true; } /** diff --git a/mod/pages/start.php b/mod/pages/start.php index fd1d7df47..b2f26c719 100644 --- a/mod/pages/start.php +++ b/mod/pages/start.php @@ -100,7 +100,7 @@ function pages_init() { * Title is ignored * * @param array $page - * @return void + * @return bool */ function pages_page_handler($page) { @@ -152,7 +152,10 @@ function pages_page_handler($page) { case 'all': include "$base_dir/world.php"; break; + default: + return false; } + return true; } /** diff --git a/mod/profile/start.php b/mod/profile/start.php index 1c82d55f5..0ee2d0152 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -48,7 +48,7 @@ function profile_init() { * Profile page handler * * @param array $page Array of URL segments passed by the page handling mechanism - * @return void + * @return bool */ function profile_page_handler($page) { @@ -85,6 +85,7 @@ function profile_page_handler($page) { $body = elgg_view_layout('one_column', array('content' => $content)); echo elgg_view_page($title, $body); + return true; } /** diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php index 0638feb52..8b18a4d64 100644 --- a/mod/reportedcontent/start.php +++ b/mod/reportedcontent/start.php @@ -60,7 +60,7 @@ function reportedcontent_init() { * Serves the add report page * * @param array $page Array of page routing elements - * @return void + * @return bool */ function reportedcontent_page_handler($page) { // only logged in users can report things @@ -77,6 +77,7 @@ function reportedcontent_page_handler($page) { $body = elgg_view_layout('one_sidebar', $params); echo elgg_view_page(elgg_echo('reportedcontent:this'), $body); + return true; } /** diff --git a/mod/search/start.php b/mod/search/start.php index a88c6ec03..73a96dc0a 100644 --- a/mod/search/start.php +++ b/mod/search/start.php @@ -56,7 +56,7 @@ function search_init() { * Page handler for search * * @param array $page Page elements from core page handler - * @return void + * @return bool */ function search_page_handler($page) { @@ -72,6 +72,7 @@ function search_page_handler($page) { $base_dir = elgg_get_plugins_path() . 'search/pages/search'; include_once("$base_dir/index.php"); + return true; } /** diff --git a/mod/thewire/start.php b/mod/thewire/start.php index f46d9ec75..2ed0f0b4d 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -84,7 +84,7 @@ function thewire_init() { * thewire/tag/ View wire posts tagged with * * @param array $page From the page_handler function - * @return void + * @return bool */ function thewire_page_handler($page) { @@ -134,7 +134,11 @@ function thewire_page_handler($page) { } include "$base_dir/previous.php"; break; + + default: + return false; } + return true; } /** diff --git a/mod/twitter_api/start.php b/mod/twitter_api/start.php index fd2ff6493..08bce5479 100644 --- a/mod/twitter_api/start.php +++ b/mod/twitter_api/start.php @@ -45,14 +45,14 @@ function twitter_api_init() { * Handles old pg/twitterservice/ handler * * @param array $page - * @return void + * @return bool */ function twitter_api_pagehandler_deprecated($page) { $url = elgg_get_site_url() . 'pg/twitter_api/authorize'; $msg = elgg_echo('twitter_api:deprecated_callback_url', array($url)); register_error($msg); - twitter_api_pagehandler($page); + return twitter_api_pagehandler($page); } @@ -64,7 +64,7 @@ function twitter_api_pagehandler_deprecated($page) { */ function twitter_api_pagehandler($page) { if (!isset($page[0])) { - return; + return false; } switch ($page[0]) { @@ -92,7 +92,10 @@ function twitter_api_pagehandler($page) { $pages = dirname(__FILE__) . '/pages/twitter_api'; include "$pages/interstitial.php"; break; + default: + return false; } + return true; } /** diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php index a674511cf..6904ce9e2 100644 --- a/mod/uservalidationbyemail/start.php +++ b/mod/uservalidationbyemail/start.php @@ -149,7 +149,7 @@ function uservalidationbyemail_check_auth_attempt($credentials) { * Checks sent passed validation code and user guids and validates the user. * * @param array $page - * @return void + * @return bool */ function uservalidationbyemail_page_handler($page) { -- cgit v1.2.3 From 61d24f4b7b4fd4d5e960593a25a0d96b11891ff0 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 5 Nov 2011 19:15:42 -0400 Subject: Fixes #4024 fixed a lot of notices - enough for this release - found a few bugs --- engine/classes/ElggMenuItem.php | 3 +++ engine/lib/elgglib.php | 8 ++++++-- engine/lib/navigation.php | 8 ++++++-- engine/lib/views.php | 9 +++++++-- mod/blog/start.php | 6 +++++- mod/file/start.php | 2 +- mod/groups/lib/discussion.php | 2 +- mod/groups/lib/groups.php | 2 +- mod/groups/views/default/object/groupforumtopic.php | 3 +-- mod/notifications/groups.php | 2 +- mod/notifications/index.php | 10 ++++++++-- mod/profile/start.php | 2 +- mod/thewire/pages/thewire/everyone.php | 2 +- pages/settings/account.php | 2 +- views/default/forms/login.php | 2 +- views/default/input/button.php | 2 +- views/default/output/access.php | 2 +- views/default/page/components/gallery.php | 1 + views/default/page/components/list.php | 8 ++++---- views/default/page/components/module.php | 2 +- views/default/page/layouts/one_column.php | 4 +++- views/default/page/layouts/widgets.php | 8 ++++++-- 22 files changed, 61 insertions(+), 29 deletions(-) (limited to 'mod/thewire') diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php index 8ddb1ecd8..289919a8e 100644 --- a/engine/classes/ElggMenuItem.php +++ b/engine/classes/ElggMenuItem.php @@ -100,6 +100,9 @@ class ElggMenuItem { if (!isset($options['name']) || !isset($options['text'])) { return NULL; } + if (!isset($options['href'])) { + $options['href'] = ''; + } $item = new ElggMenuItem($options['name'], $options['text'], $options['href']); unset($options['name']); diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 10804fdca..47ca157e1 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1475,8 +1475,12 @@ function elgg_http_url_is_identical($url1, $url2, $ignore_params = array('offset $url1_info = parse_url($url1); $url2_info = parse_url($url2); - $url1_info['path'] = trim($url1_info['path'], '/'); - $url2_info['path'] = trim($url2_info['path'], '/'); + if (isset($url1_info['path'])) { + $url1_info['path'] = trim($url1_info['path'], '/'); + } + if (isset($url2_info['path'])) { + $url2_info['path'] = trim($url2_info['path'], '/'); + } // compare basic bits $parts = array('scheme', 'host', 'path'); diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index aaf9fb544..176790188 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -207,7 +207,7 @@ function elgg_register_title_button($handler = null, $name = 'add') { */ function elgg_push_breadcrumb($title, $link = NULL) { global $CONFIG; - if (!is_array($CONFIG->breadcrumbs)) { + if (!isset($CONFIG->breadcrumbs)) { $CONFIG->breadcrumbs = array(); } @@ -242,7 +242,11 @@ function elgg_pop_breadcrumb() { function elgg_get_breadcrumbs() { global $CONFIG; - return (is_array($CONFIG->breadcrumbs)) ? $CONFIG->breadcrumbs : array(); + if (isset($CONFIG->breadcrumbs) && is_array($CONFIG->breadcrumbs)) { + return $CONFIG->breadcrumbs; + } + + return array(); } /** diff --git a/engine/lib/views.php b/engine/lib/views.php index 6ca68ac8c..0f806b8be 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -743,7 +743,11 @@ function elgg_view_menu($menu_name, array $vars = array()) { $sort_by = elgg_extract('sort_by', $vars, 'text'); - $menu = $CONFIG->menus[$menu_name]; + if (isset($CONFIG->menus[$menu_name])) { + $menu = $CONFIG->menus[$menu_name]; + } else { + $menu = array(); + } // Give plugins a chance to add menu items just before creation. // This supports dynamic menus (example: user_hover). @@ -1198,7 +1202,8 @@ function elgg_view_image_block($image, $body, $vars = array()) { * @since 1.8.0 */ function elgg_view_module($type, $title, $body, $vars = array()) { - $vars['class'] .= " elgg-module-$type"; + + $vars['class'] = elgg_extract('class', $vars, '') . " elgg-module-$type"; $vars['title'] = $title; $vars['body'] = $body; return elgg_view('page/components/module', $vars); diff --git a/mod/blog/start.php b/mod/blog/start.php index 052c63651..fa57e7b96 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -145,7 +145,11 @@ function blog_page_handler($page) { return false; } - $params['sidebar'] .= elgg_view('blog/sidebar', array('page' => $page_type)); + if (isset($params['sidebar'])) { + $params['sidebar'] .= elgg_view('blog/sidebar', array('page' => $page_type)); + } else { + $params['sidebar'] = elgg_view('blog/sidebar', array('page' => $page_type)); + } $body = elgg_view_layout('content', $params); diff --git a/mod/file/start.php b/mod/file/start.php index d6e17cc4b..e15a9ad61 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -389,7 +389,7 @@ function file_icon_url_override($hook, $type, $returnvalue, $params) { if ($size == 'large') { $ext = '_lrg'; } else { - $exit = ''; + $ext = ''; } $url = "mod/file/graphics/icons/{$type}{$ext}.gif"; diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php index 68e5e4884..2bda4678e 100644 --- a/mod/groups/lib/discussion.php +++ b/mod/groups/lib/discussion.php @@ -192,7 +192,7 @@ function discussion_handle_view_page($guid) { ); $body = elgg_view_layout('content', $params); - echo elgg_view_page($title, $body); + echo elgg_view_page($topic->title, $body); } /** diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 590ba2b35..7798e5dc3 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -447,7 +447,7 @@ function groups_register_profile_buttons($group) { } // group members - if ($group->isMember($user)) { + if ($group->isMember(elgg_get_logged_in_user_entity())) { if ($group->getOwnerGUID() != elgg_get_logged_in_user_guid()) { // leave $url = elgg_get_site_url() . "action/groups/leave?group_guid={$group->getGUID()}"; diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php index a579d89a4..34e0ee3cc 100644 --- a/mod/groups/views/default/object/groupforumtopic.php +++ b/mod/groups/views/default/object/groupforumtopic.php @@ -28,7 +28,7 @@ $tags = elgg_view('output/tags', array('tags' => $topic->tags)); $date = elgg_view_friendly_time($topic->time_created); $replies_link = ''; -$replies_text = ''; +$reply_text = ''; $num_replies = elgg_get_annotations(array( 'annotation_name' => 'group_topic_post', 'guid' => $topic->getGUID(), @@ -76,7 +76,6 @@ if ($full) { $body = elgg_view('output/longtext', array('value' => $topic->description)); echo << 'notify', 'relationship_guid' => elgg_get_logged_in_user_guid(), 'types' => 'user', 'limit' => 99999))) { +if ($people_ents = elgg_get_entities_from_relationship(array( + 'relationship' => 'notify', + 'relationship_guid' => elgg_get_logged_in_user_guid(), + 'types' => 'user', + 'limit' => 99999, + ))) { + foreach($people_ents as $ent) { $people[] = $ent->guid; } diff --git a/mod/profile/start.php b/mod/profile/start.php index 0ee2d0152..adee838fc 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -84,7 +84,7 @@ function profile_page_handler($page) { $content = elgg_view_layout('widgets', $params); $body = elgg_view_layout('one_column', array('content' => $content)); - echo elgg_view_page($title, $body); + echo elgg_view_page($user->name, $body); return true; } diff --git a/mod/thewire/pages/thewire/everyone.php b/mod/thewire/pages/thewire/everyone.php index e78395c31..4e88d17af 100644 --- a/mod/thewire/pages/thewire/everyone.php +++ b/mod/thewire/pages/thewire/everyone.php @@ -14,7 +14,7 @@ if (elgg_is_logged_in()) { $content .= elgg_view('input/urlshortener'); } -$content .= elgg_list_entities(array( +$content = elgg_list_entities(array( 'type' => 'object', 'subtype' => 'thewire', 'limit' => 15, diff --git a/pages/settings/account.php b/pages/settings/account.php index e6a5da97b..1a57f89d8 100644 --- a/pages/settings/account.php +++ b/pages/settings/account.php @@ -16,7 +16,7 @@ if ((!elgg_get_page_owner_entity()) || (!elgg_get_page_owner_entity()->canEdit() $title = elgg_echo('usersettings:user'); -$content .= elgg_view('core/settings/account'); +$content = elgg_view('core/settings/account'); $params = array( 'content' => $content, diff --git a/views/default/forms/login.php b/views/default/forms/login.php index 9536bb439..6f6cc9906 100644 --- a/views/default/forms/login.php +++ b/views/default/forms/login.php @@ -31,7 +31,7 @@ elgg_echo('login'))); ?> 'returntoreferer', 'value' => 'true')); } ?> diff --git a/views/default/input/button.php b/views/default/input/button.php index c21989919..9957fdc54 100644 --- a/views/default/input/button.php +++ b/views/default/input/button.php @@ -33,7 +33,7 @@ switch ($vars['type']) { } // blank src if trying to access an offsite image. @todo why? -if (strpos($vars['src'], elgg_get_site_url()) === false) { +if (isset($vars['src']) && strpos($vars['src'], elgg_get_site_url()) === false) { $vars['src'] = ""; } ?> diff --git a/views/default/output/access.php b/views/default/output/access.php index f312608d5..811948323 100644 --- a/views/default/output/access.php +++ b/views/default/output/access.php @@ -20,7 +20,7 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) { // we decided to show that the item is in a group, rather than its actual access level // not required. Group ACLs are prepended with "Group: " when written. //$access_id_string = elgg_echo('groups:group') . $container->name; - $membership = $is_group->membership; + $membership = $container->membership; if ($membership == ACCESS_PUBLIC) { $access_class .= ' elgg-access-group-open'; diff --git a/views/default/page/components/gallery.php b/views/default/page/components/gallery.php index f03eb1109..149ceeaf8 100644 --- a/views/default/page/components/gallery.php +++ b/views/default/page/components/gallery.php @@ -39,6 +39,7 @@ if (isset($vars['item_class'])) { $item_class = "$item_class {$vars['item_class']}"; } +$nav = ''; if ($pagination && $count) { $nav .= elgg_view('navigation/pagination', array( 'offset' => $offset, diff --git a/views/default/page/components/list.php b/views/default/page/components/list.php index c83fa0966..c0db50bc5 100644 --- a/views/default/page/components/list.php +++ b/views/default/page/components/list.php @@ -17,10 +17,10 @@ */ $items = $vars['items']; -$offset = $vars['offset']; -$limit = $vars['limit']; -$count = $vars['count']; -$base_url = $vars['base_url']; +$offset = elgg_extract('offset', $vars); +$limit = elgg_extract('limit', $vars); +$count = elgg_extract('count', $vars); +$base_url = elgg_extract('base_url', $vars, ''); $pagination = elgg_extract('pagination', $vars, true); $offset_key = elgg_extract('offset_key', $vars, 'offset'); $position = elgg_extract('position', $vars, 'after'); diff --git a/views/default/page/components/module.php b/views/default/page/components/module.php index 0a2f1c35a..7e1eaff20 100644 --- a/views/default/page/components/module.php +++ b/views/default/page/components/module.php @@ -28,7 +28,7 @@ if (isset($vars['id'])) { $id = "id=\"{$vars['id']}\""; } -if ($vars['header']) { +if (isset($vars['header'])) { $header = "
$header
"; } elseif ($title) { $header = "

$title

"; diff --git a/views/default/page/layouts/one_column.php b/views/default/page/layouts/one_column.php index 7546a4cdf..491d5b459 100644 --- a/views/default/page/layouts/one_column.php +++ b/views/default/page/layouts/one_column.php @@ -30,7 +30,9 @@ $nav = elgg_extract('nav', $vars, elgg_view('navigation/breadcrumbs')); echo $vars['content']; // @deprecated 1.8 - echo $vars['area1']; + if (isset($vars['area1'])) { + echo $vars['area1']; + } ?> \ No newline at end of file diff --git a/views/default/page/layouts/widgets.php b/views/default/page/layouts/widgets.php index b2c54e854..e3819cc20 100644 --- a/views/default/page/layouts/widgets.php +++ b/views/default/page/layouts/widgets.php @@ -39,10 +39,14 @@ echo $vars['content']; $widget_class = "elgg-col-1of{$num_columns}"; for ($column_index = 1; $column_index <= $num_columns; $column_index++) { - $column_widgets = $widgets[$column_index]; + if (isset($widgets[$column_index])) { + $column_widgets = $widgets[$column_index]; + } else { + $column_widgets = array(); + } echo "
"; - if (is_array($column_widgets) && sizeof($column_widgets) > 0) { + if (sizeof($column_widgets) > 0) { foreach ($column_widgets as $widget) { if (array_key_exists($widget->handler, $widget_types)) { echo elgg_view_entity($widget, array('show_access' => $show_access)); -- cgit v1.2.3 From 2615252b460c01dd54170fed510516a1c50e3a42 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 6 Nov 2011 07:55:11 -0500 Subject: Fixes #4067 adds activate/deactivate scripts --- mod/blog/activate.php | 6 ++++++ mod/blog/deactivate.php | 6 ++++++ mod/search/README.txt | 5 ----- mod/thewire/activate.php | 6 ++++++ mod/thewire/deactivate.php | 6 ++++++ mod/thewire/start.php | 1 + 6 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 mod/blog/activate.php create mode 100644 mod/blog/deactivate.php create mode 100644 mod/thewire/activate.php create mode 100644 mod/thewire/deactivate.php (limited to 'mod/thewire') diff --git a/mod/blog/activate.php b/mod/blog/activate.php new file mode 100644 index 000000000..5f67ffbed --- /dev/null +++ b/mod/blog/activate.php @@ -0,0 +1,6 @@ + Date: Sun, 6 Nov 2011 16:44:05 -0500 Subject: Fixes #4068 not forcing update on adds when the subtype exists Refs #4058 --- engine/lib/entities.php | 2 -- mod/blog/activate.php | 6 +++++- mod/thewire/activate.php | 6 +++++- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'mod/thewire') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 711fcbbd7..fd2b0e9f9 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -306,8 +306,6 @@ function add_subtype($type, $subtype, $class = "") { if ($id == 0) { return insert_data("insert into {$CONFIG->dbprefix}entity_subtypes" . " (type, subtype, class) values ('$type','$subtype','$class')"); - } else { - update_subtype($type, $subtype, $class); } return $id; diff --git a/mod/blog/activate.php b/mod/blog/activate.php index 5f67ffbed..a90525291 100644 --- a/mod/blog/activate.php +++ b/mod/blog/activate.php @@ -3,4 +3,8 @@ * Register the ElggBlog class for the object/blog subtype */ -add_subtype('object', 'blog', 'ElggBlog'); +if (get_subtype_id('object', 'blog')) { + update_subtype('object', 'blog', 'ElggBlog'); +} else { + add_subtype('object', 'blog', 'ElggBlog'); +} diff --git a/mod/thewire/activate.php b/mod/thewire/activate.php index 1db83f7be..1cc64ceb1 100644 --- a/mod/thewire/activate.php +++ b/mod/thewire/activate.php @@ -3,4 +3,8 @@ * Register the ElggWire class for the object/thewire subtype */ -add_subtype('object', 'thewire', 'ElggWire'); +if (get_subtype_id('object', 'thewire')) { + update_subtype('object', 'thewire', 'ElggWire'); +} else { + add_subtype('object', 'thewire', 'ElggWire'); +} -- cgit v1.2.3 From 1101c234b508089cbf4cdb81758336d574f02576 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 6 Nov 2011 17:51:59 -0500 Subject: removed uses of CSS class .right from plugins --- mod/embed/views/default/js/embed/embed.php | 3 +-- mod/likes/views/default/annotation/likes.php | 2 +- mod/messages/views/default/object/messages.php | 2 +- mod/thewire/views/default/thewire/profile_status.php | 2 +- .../views/default/forms/twitter_api/interstitial_settings.php | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) (limited to 'mod/thewire') diff --git a/mod/embed/views/default/js/embed/embed.php b/mod/embed/views/default/js/embed/embed.php index 8e543ac37..8a8f0290c 100644 --- a/mod/embed/views/default/js/embed/embed.php +++ b/mod/embed/views/default/js/embed/embed.php @@ -41,10 +41,9 @@ elgg.embed.insert = function(event) { - $.fancybox.close(); event.preventDefault(); diff --git a/mod/likes/views/default/annotation/likes.php b/mod/likes/views/default/annotation/likes.php index 314d0790d..d41522fc4 100644 --- a/mod/likes/views/default/annotation/likes.php +++ b/mod/likes/views/default/annotation/likes.php @@ -30,7 +30,7 @@ $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' => "", + 'text' => "", 'confirm' => elgg_echo('deleteconfirm'), 'encode_text' => false, )); diff --git a/mod/messages/views/default/object/messages.php b/mod/messages/views/default/object/messages.php index e8e745e94..b12f98522 100644 --- a/mod/messages/views/default/object/messages.php +++ b/mod/messages/views/default/object/messages.php @@ -66,7 +66,7 @@ $subject_info .= elgg_view('output/url', array( $delete_link = elgg_view("output/confirmlink", array( 'href' => "action/messages/delete?guid=" . $message->getGUID(), - 'text' => "", + 'text' => "", 'confirm' => elgg_echo('deleteconfirm'), 'encode_text' => false, )); diff --git a/mod/thewire/views/default/thewire/profile_status.php b/mod/thewire/views/default/thewire/profile_status.php index ab20b5341..b5d9dbd80 100644 --- a/mod/thewire/views/default/thewire/profile_status.php +++ b/mod/thewire/views/default/thewire/profile_status.php @@ -27,7 +27,7 @@ if ($latest_wire && count($latest_wire) > 0) { $button = elgg_view('output/url', array( 'text' => elgg_echo('thewire:update'), 'href' => $url_to_wire, - 'class' => 'elgg-button elgg-button-action right', + 'class' => 'elgg-button elgg-button-action float-alt', 'is_trusted' => true, )); } diff --git a/mod/twitter_api/views/default/forms/twitter_api/interstitial_settings.php b/mod/twitter_api/views/default/forms/twitter_api/interstitial_settings.php index 2592013c6..cad2be345 100644 --- a/mod/twitter_api/views/default/forms/twitter_api/interstitial_settings.php +++ b/mod/twitter_api/views/default/forms/twitter_api/interstitial_settings.php @@ -55,7 +55,7 @@ echo elgg_view('input/submit', array( )); echo elgg_view('output/url', array( - 'class' => 'right', + 'class' => 'float-alt', 'text' => elgg_echo('twitter_api:interstitial:no_thanks'), 'href' => '/', 'is_trusted' => true, -- cgit v1.2.3 From 77b53f716a9043b89a7ad128eec34c910006fe24 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Tue, 8 Nov 2011 06:45:18 -0500 Subject: it is GPL General Public License not GPL Public License --- .../examples/plugins/manifest_options/manifest.xml | 4 ++-- documentation/examples/plugins/skeleton/manifest.xml | 2 +- engine/tests/api/plugins.php | 16 ++++++++-------- engine/tests/test_files/plugin_17/manifest.xml | 4 ++-- engine/tests/test_files/plugin_18/manifest.xml | 4 ++-- mod/blog/manifest.xml | 2 +- mod/bookmarks/manifest.xml | 2 +- mod/categories/manifest.xml | 2 +- mod/custom_index/manifest.xml | 2 +- mod/dashboard/manifest.xml | 2 +- mod/developers/manifest.xml | 2 +- mod/diagnostics/manifest.xml | 2 +- mod/embed/manifest.xml | 2 +- mod/externalpages/manifest.xml | 2 +- mod/file/manifest.xml | 2 +- mod/garbagecollector/manifest.xml | 2 +- mod/groups/manifest.xml | 2 +- mod/htmlawed/manifest.xml | 2 +- mod/invitefriends/manifest.xml | 2 +- mod/likes/manifest.xml | 2 +- mod/logbrowser/manifest.xml | 2 +- mod/logrotate/manifest.xml | 2 +- mod/members/manifest.xml | 2 +- mod/messageboard/manifest.xml | 2 +- mod/messages/manifest.xml | 2 +- mod/notifications/manifest.xml | 2 +- mod/oauth_api/manifest.xml | 2 +- mod/pages/manifest.xml | 2 +- mod/profile/manifest.xml | 2 +- mod/reportedcontent/manifest.xml | 2 +- mod/search/manifest.xml | 2 +- mod/tagcloud/manifest.xml | 2 +- mod/thewire/manifest.xml | 2 +- mod/tinymce/manifest.xml | 2 +- mod/twitter/manifest.xml | 2 +- mod/twitter_api/manifest.xml | 2 +- mod/uservalidationbyemail/manifest.xml | 2 +- mod/zaudio/manifest.xml | 2 +- 38 files changed, 48 insertions(+), 48 deletions(-) (limited to 'mod/thewire') diff --git a/documentation/examples/plugins/manifest_options/manifest.xml b/documentation/examples/plugins/manifest_options/manifest.xml index 48a5a9558..baa6cc3fa 100644 --- a/documentation/examples/plugins/manifest_options/manifest.xml +++ b/documentation/examples/plugins/manifest_options/manifest.xml @@ -6,8 +6,8 @@ A concise description. This is a longer, more interesting description of my plugin, its features, and other important information. http://www.elgg.org/ - (C) Elgg 2010 - GNU Public License version 2 + (C) Elgg 2011 + GNU General Public License version 2 elgg_version diff --git a/documentation/examples/plugins/skeleton/manifest.xml b/documentation/examples/plugins/skeleton/manifest.xml index febe71999..e31624432 100644 --- a/documentation/examples/plugins/skeleton/manifest.xml +++ b/documentation/examples/plugins/skeleton/manifest.xml @@ -6,7 +6,7 @@ This is a description of my plugin and its features. http://www.elgg.org/ (C) My Name or Company 2012 - GNU Public License version 2 + GNU General Public License version 2 elgg_release diff --git a/engine/tests/api/plugins.php b/engine/tests/api/plugins.php index 8f5f5dd1e..a0faaff0e 100644 --- a/engine/tests/api/plugins.php +++ b/engine/tests/api/plugins.php @@ -68,8 +68,8 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { 'blurb' => 'A concise description.', 'description' => 'A longer, more interesting description.', 'website' => 'http://www.elgg.org/', - 'copyright' => '(C) Elgg 2010', - 'license' => 'GNU Public License version 2', + 'copyright' => '(C) Elgg Foundation 2011', + 'license' => 'GNU General Public License version 2', 'requires' => array( array('type' => 'elgg_version', 'version' => '3009030802', 'comparison' => 'lt'), @@ -117,8 +117,8 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { 'version' => '1.0', 'description' => 'A 1.7-style manifest.', 'website' => 'http://www.elgg.org/', - 'copyright' => '(C) Elgg 2010', - 'license' => 'GNU Public License version 2', + 'copyright' => '(C) Elgg Foundation 2011', + 'license' => 'GNU General Public License version 2', 'elgg_version' => '2009030702', 'name' => 'Plugin Test 17', ); @@ -165,13 +165,13 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { } public function testElggPluginManifestGetCopyright() { - $this->assertEqual($this->manifest18->getCopyright(), '(C) Elgg 2010'); - $this->assertEqual($this->manifest18->getCopyright(), '(C) Elgg 2010'); + $this->assertEqual($this->manifest18->getCopyright(), '(C) Elgg Foundation 2011'); + $this->assertEqual($this->manifest18->getCopyright(), '(C) Elgg Foundation 2011'); } public function testElggPluginManifestGetLicense() { - $this->assertEqual($this->manifest18->getLicense(), 'GNU Public License version 2'); - $this->assertEqual($this->manifest17->getLicense(), 'GNU Public License version 2'); + $this->assertEqual($this->manifest18->getLicense(), 'GNU General Public License version 2'); + $this->assertEqual($this->manifest17->getLicense(), 'GNU General Public License version 2'); } diff --git a/engine/tests/test_files/plugin_17/manifest.xml b/engine/tests/test_files/plugin_17/manifest.xml index bb178ab93..706734265 100644 --- a/engine/tests/test_files/plugin_17/manifest.xml +++ b/engine/tests/test_files/plugin_17/manifest.xml @@ -4,7 +4,7 @@ - - + + \ No newline at end of file diff --git a/engine/tests/test_files/plugin_18/manifest.xml b/engine/tests/test_files/plugin_18/manifest.xml index 445a41c2e..e0776ffc1 100644 --- a/engine/tests/test_files/plugin_18/manifest.xml +++ b/engine/tests/test_files/plugin_18/manifest.xml @@ -6,8 +6,8 @@ A concise description. A longer, more interesting description. http://www.elgg.org/ - (C) Elgg 2010 - GNU Public License version 2 + (C) Elgg Foundation 2011 + GNU General Public License version 2 elgg_version diff --git a/mod/blog/manifest.xml b/mod/blog/manifest.xml index bd5f9c396..29ee1bfc8 100644 --- a/mod/blog/manifest.xml +++ b/mod/blog/manifest.xml @@ -10,7 +10,7 @@ Adds simple blogging capabilities to your Elgg installation. http://elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/bookmarks/manifest.xml b/mod/bookmarks/manifest.xml index 679d3f1d8..b95af87f8 100644 --- a/mod/bookmarks/manifest.xml +++ b/mod/bookmarks/manifest.xml @@ -10,7 +10,7 @@ Adds the ability for users to bookmark internal and external sites. Other users can then comment on the bookmarks. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/categories/manifest.xml b/mod/categories/manifest.xml index a2f4d97fc..4a6bd0864 100644 --- a/mod/categories/manifest.xml +++ b/mod/categories/manifest.xml @@ -9,7 +9,7 @@ Site-wide Categories lets administrators define categories that users across the site can add content to. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/custom_index/manifest.xml b/mod/custom_index/manifest.xml index f93251214..80187efbc 100644 --- a/mod/custom_index/manifest.xml +++ b/mod/custom_index/manifest.xml @@ -7,7 +7,7 @@ A demonstration of how to create a front page plugin. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/dashboard/manifest.xml b/mod/dashboard/manifest.xml index 14a620268..cbbc1044c 100644 --- a/mod/dashboard/manifest.xml +++ b/mod/dashboard/manifest.xml @@ -7,7 +7,7 @@ A widget-based dashboard for your users http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/developers/manifest.xml b/mod/developers/manifest.xml index 6b672e231..93a12945d 100644 --- a/mod/developers/manifest.xml +++ b/mod/developers/manifest.xml @@ -9,7 +9,7 @@ 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/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release diff --git a/mod/diagnostics/manifest.xml b/mod/diagnostics/manifest.xml index a9034d695..21e847d22 100644 --- a/mod/diagnostics/manifest.xml +++ b/mod/diagnostics/manifest.xml @@ -9,7 +9,7 @@ Elgg diagnostics tool http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/embed/manifest.xml b/mod/embed/manifest.xml index c33c8b40a..7ffbc23a4 100644 --- a/mod/embed/manifest.xml +++ b/mod/embed/manifest.xml @@ -8,7 +8,7 @@ Allows users to easily upload and embed media into text areas. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/externalpages/manifest.xml b/mod/externalpages/manifest.xml index 389ad6960..f2aef09f3 100644 --- a/mod/externalpages/manifest.xml +++ b/mod/externalpages/manifest.xml @@ -7,7 +7,7 @@ Create simple web pages for about, contact, privacy, and terms. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/file/manifest.xml b/mod/file/manifest.xml index 85ff76b41..26282a8e3 100644 --- a/mod/file/manifest.xml +++ b/mod/file/manifest.xml @@ -9,7 +9,7 @@ File browser plugin http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/garbagecollector/manifest.xml b/mod/garbagecollector/manifest.xml index 1cbf33592..5aafebf38 100644 --- a/mod/garbagecollector/manifest.xml +++ b/mod/garbagecollector/manifest.xml @@ -8,7 +8,7 @@ Perform some database cleanup tasks http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/groups/manifest.xml b/mod/groups/manifest.xml index b8fd92de7..fd28360d0 100644 --- a/mod/groups/manifest.xml +++ b/mod/groups/manifest.xml @@ -9,7 +9,7 @@ Provides group support for elgg http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/htmlawed/manifest.xml b/mod/htmlawed/manifest.xml index aac599dee..5c1f14cb5 100644 --- a/mod/htmlawed/manifest.xml +++ b/mod/htmlawed/manifest.xml @@ -8,7 +8,7 @@ Provides security filtering. Disabling this plugin is extremely insecure. DO NOT DISABLE. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 3 + GNU General Public License version 3 elgg_release 1.8 diff --git a/mod/invitefriends/manifest.xml b/mod/invitefriends/manifest.xml index 0a1ed2012..b36238a05 100644 --- a/mod/invitefriends/manifest.xml +++ b/mod/invitefriends/manifest.xml @@ -8,7 +8,7 @@ Invite friends via email invites. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/likes/manifest.xml b/mod/likes/manifest.xml index 5a18b8862..62835fcf5 100644 --- a/mod/likes/manifest.xml +++ b/mod/likes/manifest.xml @@ -8,7 +8,7 @@ Enables users to like content on the site. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/logbrowser/manifest.xml b/mod/logbrowser/manifest.xml index d3b76ee8c..4527e2cbb 100644 --- a/mod/logbrowser/manifest.xml +++ b/mod/logbrowser/manifest.xml @@ -8,7 +8,7 @@ Browse the system event log http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/logrotate/manifest.xml b/mod/logrotate/manifest.xml index db04e762f..1aa62e2e7 100644 --- a/mod/logrotate/manifest.xml +++ b/mod/logrotate/manifest.xml @@ -8,7 +8,7 @@ Rotate the system log at specific intervals http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/members/manifest.xml b/mod/members/manifest.xml index efd1ede5e..8b18c9f91 100644 --- a/mod/members/manifest.xml +++ b/mod/members/manifest.xml @@ -7,7 +7,7 @@ Lists the members of your site http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/messageboard/manifest.xml b/mod/messageboard/manifest.xml index b4f74c7d0..617813725 100644 --- a/mod/messageboard/manifest.xml +++ b/mod/messageboard/manifest.xml @@ -8,7 +8,7 @@ This plugin allows users to put a message board on their profile for other users to post comments. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/messages/manifest.xml b/mod/messages/manifest.xml index 238ccf42b..73a58d9d4 100644 --- a/mod/messages/manifest.xml +++ b/mod/messages/manifest.xml @@ -8,7 +8,7 @@ Elgg internal messages plugin. This plugin lets user send each other messages. See COPYRIGHT.txt http://www.elgg.org/ - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/notifications/manifest.xml b/mod/notifications/manifest.xml index a07486331..205476881 100644 --- a/mod/notifications/manifest.xml +++ b/mod/notifications/manifest.xml @@ -7,7 +7,7 @@ Elgg notifications plugin http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/oauth_api/manifest.xml b/mod/oauth_api/manifest.xml index 62111e258..efd3d944f 100644 --- a/mod/oauth_api/manifest.xml +++ b/mod/oauth_api/manifest.xml @@ -8,7 +8,7 @@ api http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/pages/manifest.xml b/mod/pages/manifest.xml index dfc521e11..6990bd6b0 100644 --- a/mod/pages/manifest.xml +++ b/mod/pages/manifest.xml @@ -9,7 +9,7 @@ Elgg Pages http://www.elgg.org See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/profile/manifest.xml b/mod/profile/manifest.xml index f56604c7e..86fbc7b7b 100644 --- a/mod/profile/manifest.xml +++ b/mod/profile/manifest.xml @@ -8,7 +8,7 @@ social http://elgg.org/ See COPYRIGHT.txt - GNU Public License Version 2 + GNU General Public License Version 2 true elgg_release diff --git a/mod/reportedcontent/manifest.xml b/mod/reportedcontent/manifest.xml index aea8f8114..e96620b01 100644 --- a/mod/reportedcontent/manifest.xml +++ b/mod/reportedcontent/manifest.xml @@ -7,7 +7,7 @@ Adds the option for users to report content and for admins to check it out. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/search/manifest.xml b/mod/search/manifest.xml index 9a952d3d8..513d3a6b9 100644 --- a/mod/search/manifest.xml +++ b/mod/search/manifest.xml @@ -7,7 +7,7 @@ Allow search across entities of the site http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/tagcloud/manifest.xml b/mod/tagcloud/manifest.xml index 1127e9559..c0f89f35e 100644 --- a/mod/tagcloud/manifest.xml +++ b/mod/tagcloud/manifest.xml @@ -8,7 +8,7 @@ Widget-based tag clouds. http://cashcostello.com/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/thewire/manifest.xml b/mod/thewire/manifest.xml index 9f6b0eaa9..962ed12f1 100644 --- a/mod/thewire/manifest.xml +++ b/mod/thewire/manifest.xml @@ -8,7 +8,7 @@ Microblogging for Elgg http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/tinymce/manifest.xml b/mod/tinymce/manifest.xml index ac7b23b29..61bf0c22c 100644 --- a/mod/tinymce/manifest.xml +++ b/mod/tinymce/manifest.xml @@ -8,7 +8,7 @@ TinyMCE plugin. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/twitter/manifest.xml b/mod/twitter/manifest.xml index 38380a2ba..18fa8c957 100644 --- a/mod/twitter/manifest.xml +++ b/mod/twitter/manifest.xml @@ -8,7 +8,7 @@ Elgg simple twitter widget http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/twitter_api/manifest.xml b/mod/twitter_api/manifest.xml index 51ad0dcb4..86bba4b50 100644 --- a/mod/twitter_api/manifest.xml +++ b/mod/twitter_api/manifest.xml @@ -8,7 +8,7 @@ bundled http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/uservalidationbyemail/manifest.xml b/mod/uservalidationbyemail/manifest.xml index 232ba71ca..800dd2641 100644 --- a/mod/uservalidationbyemail/manifest.xml +++ b/mod/uservalidationbyemail/manifest.xml @@ -8,7 +8,7 @@ Simple user account validation via email. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 diff --git a/mod/zaudio/manifest.xml b/mod/zaudio/manifest.xml index 767637a56..54f819658 100644 --- a/mod/zaudio/manifest.xml +++ b/mod/zaudio/manifest.xml @@ -9,7 +9,7 @@ This simple plugin lets users play mp3's in the page. http://www.elgg.org/ See COPYRIGHT.txt - GNU Public License version 2 + GNU General Public License version 2 elgg_release 1.8 -- cgit v1.2.3