15 $cookie_domain = $_SERVER[
'SERVER_NAME'];
16 $cookie_path = dirname( $_SERVER[
'PHP_SELF'] );
23 $cookie_path .= (!preg_match(
"/[\/|\\\\]$/", $cookie_path)) ?
"/" :
"";
25 if($cookie_path ==
"\\") $cookie_path =
'/';
29 setcookie(
"ilClientId",
$_GET[
"client_id"], 0, $cookie_path, $cookie_domain);
34 require_once(
"Services/Init/classes/class.ilInitialisation.php");
45 if (!isset($_SERVER[
'PHP_AUTH_PW']) || !isset($_SERVER[
'PHP_AUTH_USER']))
47 Header(
"WWW-Authenticate: Basic realm=\"ILIAS Newsfeed\"");
48 Header(
"HTTP/1.0 401 Unauthorized");
59 include_once(
"./Services/Feeds/classes/class.ilUserFeedWriter.php");
67 include_once(
"./Services/Feeds/classes/class.ilObjectFeedWriter.php");
73 include_once(
"./Services/Feeds/classes/class.ilFeedItem.php");
74 include_once(
"./Services/Feeds/classes/class.ilFeedWriter.php");
78 $lng->loadLanguageModule(
"news");
80 if ($ilSetting->get(
'short_inst_name') !=
"")
82 $blankFeedWriter->setChannelTitle($ilSetting->get(
'short_inst_name'));
86 $blankFeedWriter->setChannelTitle(
"ILIAS");
92 if (!
$feed_set->get(
"enable_private_feed"))
94 $blankFeedWriter->setChannelAbout(ILIAS_HTTP_PATH);
95 $blankFeedWriter->setChannelLink(ILIAS_HTTP_PATH);
97 $feed_item->setTitle($lng->txt(
"priv_feed_no_access_title"));
100 $feed_item->setDescription($lng->txt(
"priv_feed_no_access_body"));
101 $feed_item->setLink(ILIAS_HTTP_PATH);
105 $blankFeedWriter->setChannelAbout(ILIAS_HTTP_PATH);
106 $blankFeedWriter->setChannelLink(ILIAS_HTTP_PATH);
108 $feed_item->setTitle($lng->txt(
"priv_feed_no_auth_title"));
111 $feed_item->setDescription($lng->txt(
"priv_feed_no_auth_body"));
112 $feed_item->setLink(ILIAS_HTTP_PATH);
114 $blankFeedWriter->addItem($feed_item);
115 $blankFeedWriter->showFeed();