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");
78 Header(
"WWW-Authenticate: Basic realm=\"ILIAS Newsfeed\"");
79 Header(
"HTTP/1.0 401 Unauthorized");
83 include_once(
"./Services/Feeds/classes/class.ilFeedItem.php");
84 include_once(
"./Services/Feeds/classes/class.ilFeedWriter.php");
88 $lng->loadLanguageModule(
"news");
90 if ($ilSetting->get(
'short_inst_name') !=
"")
92 $blankFeedWriter->setChannelTitle($ilSetting->get(
'short_inst_name'));
96 $blankFeedWriter->setChannelTitle(
"ILIAS");
102 if (!
$feed_set->get(
"enable_private_feed"))
104 $blankFeedWriter->setChannelAbout(ILIAS_HTTP_PATH);
105 $blankFeedWriter->setChannelLink(ILIAS_HTTP_PATH);
107 $feed_item->setTitle($lng->txt(
"priv_feed_no_access_title"));
110 $feed_item->setDescription($lng->txt(
"priv_feed_no_access_body"));
111 $feed_item->setLink(ILIAS_HTTP_PATH);
115 $blankFeedWriter->setChannelAbout(ILIAS_HTTP_PATH);
116 $blankFeedWriter->setChannelLink(ILIAS_HTTP_PATH);
118 $feed_item->setTitle($lng->txt(
"priv_feed_no_auth_title"));
121 $feed_item->setDescription($lng->txt(
"priv_feed_no_auth_body"));
122 $feed_item->setLink(ILIAS_HTTP_PATH);
124 $blankFeedWriter->addItem($feed_item);
125 $blankFeedWriter->showFeed();