|
Revision 453, 1.0 kB
(checked in by sven, 2 years ago)
|
fix a load of php notices and a couple of trivial bugs
files: add displaying of access perms like on blog posts
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
require_once(dirname(dirname(__FILE__)) . '/includes.php'); |
|---|
| 7 |
require_once($CFG->dirroot . 'profile/profile.class.php'); |
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
$profile_name = optional_param('profile_name', '', PARAM_ALPHANUM); |
|---|
| 11 |
if (!empty($profile_name)) { |
|---|
| 12 |
$profile_id = run("users:name_to_id", $profile_name); |
|---|
| 13 |
} |
|---|
| 14 |
if (empty($profile_id)) { |
|---|
| 15 |
$profile_id = optional_param('profile_id', -1, PARAM_INT); |
|---|
| 16 |
} |
|---|
| 17 |
|
|---|
| 18 |
$page_owner = $profile_id; |
|---|
| 19 |
|
|---|
| 20 |
define("context", "profile"); |
|---|
| 21 |
templates_page_setup(); |
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
$profile = new ElggProfile($profile_id); |
|---|
| 25 |
|
|---|
| 26 |
$title = $profile->display_name(); |
|---|
| 27 |
$body = $profile->view(); |
|---|
| 28 |
|
|---|
| 29 |
$body = templates_draw( array( |
|---|
| 30 |
'context' => 'contentholder', |
|---|
| 31 |
'title' => $title, |
|---|
| 32 |
'body' => $body |
|---|
| 33 |
)); |
|---|
| 34 |
|
|---|
| 35 |
echo templates_page_draw(array($title, $body)); |
|---|
| 36 |
|
|---|
| 37 |
?> |
|---|