ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
feed.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
12// this should bring us all session data of the desired
13// client
14if (isset($_GET["client_id"]))
15{
16 $cookie_domain = $_SERVER['SERVER_NAME'];
17 $cookie_path = dirname( $_SERVER['PHP_SELF'] );
18
19 /* if ilias is called directly within the docroot $cookie_path
20 is set to '/' expecting on servers running under windows..
21 here it is set to '\'.
22 in both cases a further '/' won't be appended due to the following regex
23 */
24 $cookie_path .= (!preg_match("/[\/|\\\\]$/", $cookie_path)) ? "/" : "";
25
26 if($cookie_path == "\\") $cookie_path = '/';
27
28 $cookie_domain = ''; // Temporary Fix
29
30 setcookie("ilClientId", $_GET["client_id"], 0, $cookie_path, $cookie_domain);
31
32 $_COOKIE["ilClientId"] = $_GET["client_id"];
33}
34
35include_once "Services/Context/classes/class.ilContext.php";
37
38require_once("Services/Init/classes/class.ilInitialisation.php");
40
41if ($_GET["user_id"] != "")
42{
43 include_once("./Services/Feeds/classes/class.ilUserFeedWriter.php");
44 $writer = new ilUserFeedWriter($_GET["user_id"], $_GET["hash"]);
45 $writer->showFeed();
46}
47else if ($_GET["ref_id"] != "")
48{
49 include_once("./Services/Feeds/classes/class.ilObjectFeedWriter.php");
50 $writer = new ilObjectFeedWriter($_GET["ref_id"], false, $_GET["purpose"]);
51 $writer->showFeed();
52}
53else if ($_GET["blog_id"] != "")
54{
55 include_once("Modules/Blog/classes/class.ilObjBlog.php");
56 ilObjBlog::deliverRSS($_GET["blog_id"]);
57}
58?>
$_GET["client_id"]
static init($a_type)
Init context by type.
const CONTEXT_RSS
static initILIAS()
ilias initialisation
static deliverRSS($a_wsp_id)
Deliver blog as rss feed.
Feed writer for objects.
Feed writer for personal user feeds.
$_COOKIE["ilClientId"]
Definition: cron.php:11