|
Revision 1604, 0.9 kB
(checked in by misja, 6 months ago)
|
#360, Commentwall: Wall-to-wall should be aware of current user - thanks justinr
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
// Load the Elgg framework |
|---|
| 5 |
|
|---|
| 6 |
require_once("../../includes.php"); |
|---|
| 7 |
global $CFG, $messages; |
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
$owner = optional_param('owner', page_owner()); |
|---|
| 14 |
|
|---|
| 15 |
$other = required_param('other'); |
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
if ($other == $_SESSION['userid']) { |
|---|
| 20 |
$other = $owner; |
|---|
| 21 |
$owner = $_SESSION['userid']; |
|---|
| 22 |
} |
|---|
| 23 |
|
|---|
| 24 |
$offset = optional_param('offset', 0); |
|---|
| 25 |
$limit = optional_param('limit', 10); |
|---|
| 26 |
|
|---|
| 27 |
$title = sprintf(__gettext("%s and %s's Wall-to-wall"), user_info("name", $owner), user_info("name", $other)); |
|---|
| 28 |
|
|---|
| 29 |
$wall = commentwall_getwalltowall($owner, $other, $limit, $offset); |
|---|
| 30 |
|
|---|
| 31 |
$html = commentwall_displaywall_html($wall, true, $other); |
|---|
| 32 |
$html.= commentwall_display_footer($owner, $limit, $offset); |
|---|
| 33 |
|
|---|
| 34 |
templates_page_output($title, $html); |
|---|
| 35 |
|
|---|
| 36 |
?> |
|---|