This repository has been archived by the owner on Jan 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rss.php
50 lines (43 loc) · 1.15 KB
/
rss.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
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* Gate - Wiki engine and web-interface for WebTester Server
*
* RSS feeder
*
* Copyright (c) 2008-2009 Sergey I. Sharybin <[email protected]>
*
* This program can be distributed under the terms of the GNU GPL.
* See the file COPYING.
*/
include 'globals.php';
include $DOCUMENT_ROOT.'/inc/include.php';
db_connect (config_get ('check-database'));
content_initialize ();
wiki_initialize ();
manage_initialize ();
security_initialize ();
ipc_initialize ();
service_initialize ();
editor_initialize ();
$c = service_by_classname ('CSCRSS');
if (count ($c) <= 0) {
/* Service not found */
die;
}
/* Get service */
/* Assume needed service is firct in list */
$c = $c[0];
$s = $c->GetService ();
header ('content-type: application/xhtml+xml');
print ('<?xml version="1.0" encoding="utf-8"?>');
?>
<rss version="2.0">
<channel>
<link><?=$s->GetURL ();?></link>
<language>ru</language>
<title><?=$s->GetTitle ();?></title>
<description><?=$s->GetDescription ();?></description>
<pubDate><?=FullLocalTime (time ());?></pubDate>
</channel>
<?=$s->GetRSSData (); ?>
</rss>