forked from mjansenDatabay/StudOn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeed.php
executable file
·39 lines (32 loc) · 1.04 KB
/
feed.php
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
31
32
33
34
35
36
37
38
39
<?php
/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
/**
* News feed script.
*
* @author Alex Killing <[email protected]>
* @author Alex Killing <[email protected]>
*/
// fau: shortRssLink - process parameters from the shortened link
if ($_GET['user_id'] == '0') {
$_GET['user_id'] = '';
}
if ($_GET['ref_id'] == '0') {
$_GET['ref_id'] = '';
}
// fau.
// fau: httpPath - use defined http path for feeds
$GLOBALS['USE_ILIAS_HTTP_PATH_FROM_INI'] = true;
// fau.
include_once "Services/Context/classes/class.ilContext.php";
ilContext::init(ilContext::CONTEXT_RSS);
require_once("Services/Init/classes/class.ilInitialisation.php");
ilInitialisation::initILIAS();
if ($_GET["user_id"] != "") {
$writer = new ilUserFeedWriter($_GET["user_id"], $_GET["hash"]);
$writer->showFeed();
} elseif ($_GET["ref_id"] != "") {
$writer = new ilObjectFeedWriter($_GET["ref_id"], false, $_GET["purpose"]);
$writer->showFeed();
} elseif ($_GET["blog_id"] != "") {
ilObjBlog::deliverRSS($_GET["blog_id"]);
}