$contact = null;
// @TODO: Replace with parameter from router
if (DI::args()->getArgc() == 2 && intval(DI::args()->getArgv()[1])
- || DI::args()->getArgc() == 3 && intval(DI::args()->getArgv()[1]) && in_array(DI::args()->getArgv()[2], ['posts', 'conversations'])
+ || DI::args()->getArgc() == 3 && intval(DI::args()->getArgv()[1]) && in_array(DI::args()->getArgv()[2], ['posts', 'conversations', 'media'])
) {
$contact_id = intval(DI::args()->getArgv()[1]);
if (DBA::isResult($contact)) {
if ($contact['self']) {
// @TODO: Replace with parameter from router
- if ((DI::args()->getArgc() == 3) && intval(DI::args()->getArgv()[1]) && in_array(DI::args()->getArgv()[2], ['posts', 'conversations'])) {
+ if ((DI::args()->getArgc() == 3) && intval(DI::args()->getArgv()[1]) && in_array(DI::args()->getArgv()[2], ['posts', 'conversations', 'media'])) {
DI::baseUrl()->redirect('profile/' . $contact['nick']);
} else {
DI::baseUrl()->redirect('profile/' . $contact['nick'] . '/profile');
return self::getPostsHTML($a, $contact_id);
}
+ if ($cmd === 'media') {
+ return self::getPostsHTML($a, $contact_id); // TODO
+ }
+
if ($cmd === 'conversations') {
return self::getConversationsHMTL($a, $contact_id, $update);
}