aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/views/default/riverdashboard/ecml/activity.php
blob: 43148f08b0e73af55b7a17bb735445ee3454c9fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
 * ECML activity support
 *
 * @package ECML
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd
 * @copyright Curverider Ltd 2008-2010
 * @link http://elgg.org/
 */

// $vars['user'] is apparently the loggedin user.
$owner = (isset($vars['owner'])) ? $vars['owner'] : NULL;
$type = (isset($vars['type'])) ? $vars['type'] : NULL;
$subtype = (isset($vars['subtype'])) ? $vars['subtype'] : NULL;
$limit = (isset($vars['limit'])) ? $vars['limit'] : 10;

// resolve usernames to guids
if ($owner && !is_numeric($owner)) {
	if ($user_obj = get_user_by_username($owner)) {
		$owner = $user_obj->getGUID();
	}
}

$river = elgg_view_river_items($owner, NULL, NULL, $type, $subtype, '', $limit, 0, 0, true, false)  . "</div>";

// Replacing callback calls in the nav with something meaningless
$river = str_replace('callback=true','replaced=88,334', $river);

echo $river;