Permalink
Browse files

feature(routing): Render site notifications page with view

  • Loading branch information...
ewinslow committed May 28, 2015
1 parent aff84bc commit 5e3cb64640bda48be5e1e5e3bd1b712f93e69383
@@ -36,8 +36,6 @@ function site_notifications_init() {
* @return boolean
*/
function site_notifications_page_handler($segments) {
- $base = elgg_get_plugins_path() . 'site_notifications/pages/site_notifications';
-
elgg_gatekeeper();
if (!isset($segments[1])) {
@@ -50,9 +48,8 @@ function site_notifications_page_handler($segments) {
}
elgg_set_page_owner_guid($user->guid);
- elgg_load_js('elgg.site_notifications');
- require "$base/view.php";
+ echo elgg_view('resources/site_notifications/view');
return true;
}
@@ -2,6 +2,8 @@
/**
* View a user's site notifications
*/
+elgg_gatekeeper();
+elgg_load_js('elgg.site_notifications');
$page_owner = elgg_get_page_owner_entity();
if (!$page_owner || !$page_owner->canEdit()) {

0 comments on commit 5e3cb64

Please sign in to comment.