diff --git a/mod/page.php b/mod/page.php index e1274fff6..51b292f37 100644 --- a/mod/page.php +++ b/mod/page.php @@ -22,6 +22,17 @@ function page_init(&$a) { function page_content(&$a) { + $observer = $a->get_observer(); + $ob_hash = (($observer) ? $observer['xchan_hash'] : ''); + + $perms = get_all_perms($a->profile['profile_uid'],$ob_hash); + + if(! $perms['view_pages']) { + notice( t('Permission denied.') . EOL); + return; + } + + if(argc() < 3) { notice( t('Invalid item.') . EOL); return; diff --git a/view/tpl/404.tpl b/view/tpl/404.tpl index 2d581ab8d..518ad1d29 100755 --- a/view/tpl/404.tpl +++ b/view/tpl/404.tpl @@ -1,6 +1 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}}

{{$message}}

diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index c373976ab..806ded24b 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -1,9 +1,3 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}} -

{{$header}}

{{$addr}}

diff --git a/view/tpl/admin_aside.tpl b/view/tpl/admin_aside.tpl index 69445d3b1..acf58668d 100755 --- a/view/tpl/admin_aside.tpl +++ b/view/tpl/admin_aside.tpl @@ -1,8 +1,3 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}} diff --git a/view/tpl/delegate.tpl b/view/tpl/delegate.tpl index 7aa85cf39..cbaa8da86 100755 --- a/view/tpl/delegate.tpl +++ b/view/tpl/delegate.tpl @@ -1,8 +1,3 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}}

{{$header}}

{{$desc}}
diff --git a/view/tpl/directory_header.tpl b/view/tpl/directory_header.tpl index 293e65be2..5d703e2dd 100755 --- a/view/tpl/directory_header.tpl +++ b/view/tpl/directory_header.tpl @@ -1,8 +1,3 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}}

{{$dirlbl}}

{{if $search}} diff --git a/view/tpl/direntry.tpl b/view/tpl/direntry.tpl index c1009efc7..a7ca15167 100755 --- a/view/tpl/direntry.tpl +++ b/view/tpl/direntry.tpl @@ -1,9 +1,3 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}} -
diff --git a/view/tpl/display-head.tpl b/view/tpl/display-head.tpl index 7750b655e..3d4e7e96a 100755 --- a/view/tpl/display-head.tpl +++ b/view/tpl/display-head.tpl @@ -1,8 +1,3 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}} diff --git a/view/tpl/events-js.tpl b/view/tpl/events-js.tpl index 5fa046f5a..c87d20529 100755 --- a/view/tpl/events-js.tpl +++ b/view/tpl/events-js.tpl @@ -1,8 +1,3 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}} {{$tabs}}

{{$title}}

diff --git a/view/tpl/events_reminder.tpl b/view/tpl/events_reminder.tpl index d8e8ceb2a..fd6a1a5c7 100755 --- a/view/tpl/events_reminder.tpl +++ b/view/tpl/events_reminder.tpl @@ -1,8 +1,3 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}} {{if $count}}