aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/start.php13
-rw-r--r--mod/bookmarks/start.php6
-rw-r--r--mod/categories/start.php3
-rw-r--r--mod/dashboard/start.php3
-rw-r--r--mod/developers/start.php3
-rw-r--r--mod/externalpages/start.php3
-rw-r--r--mod/file/start.php5
-rw-r--r--mod/groups/start.php10
-rw-r--r--mod/invitefriends/start.php3
-rw-r--r--mod/members/start.php3
-rw-r--r--mod/messageboard/start.php6
-rw-r--r--mod/messages/start.php5
-rw-r--r--mod/notifications/start.php5
-rw-r--r--mod/pages/start.php5
-rw-r--r--mod/profile/start.php3
-rw-r--r--mod/reportedcontent/start.php3
-rw-r--r--mod/search/start.php3
-rw-r--r--mod/thewire/start.php6
-rw-r--r--mod/twitter_api/start.php9
-rw-r--r--mod/uservalidationbyemail/start.php2
20 files changed, 71 insertions, 28 deletions
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/<guid>
*
* @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/<guid>
*
* @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/<guid>/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/<tag> View wire posts tagged with <tag>
*
* @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) {