Subversion Repositories Applications.papyrus

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
433 ddelon 1
<?php
2
if ($user = $this->GetUser())
3
{
4
	$max = $user["changescount"];
5
}
6
else
7
{
8
	$max = 50;
9
}
10
 
11
if ($pages = $this->LoadRecentlyChanged($max))
12
{
13
	if (!($link = $this->GetParameter("link"))) $link=$this->config["root_page"];
14
	$output = "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n";
15
	$output .= "<!-- RSS v0.91 generated by Wikini -->\n";
16
	$output .= "<rdf:RDF\n";
17
	$output .= "xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n";
18
	$output .= "xmlns=\"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n";
19
 
20
	$output .= "<channel>\n";
21
	$output .= "<title> Derniers changements sur ". $this->config["wakka_name"]  . "</title>\n";
22
	$output .= "<link>" . $this->config["base_url"] . $link . "</link>\n";
23
	$output .= "<description> Derniers changements sur " . $this->config["wakka_name"] . " </description>\n";
24
	$output .= "<language>fr</language>\n";
25
	$output .= "</channel>\n";
26
 
27
	foreach ($pages as $i => $page)
28
	{
29
		list($day, $time) = explode(" ", $page["time"]);
30
		$day= preg_replace("/-/", " ", $day);
31
		list($hh,$mm,$ss) = explode(":", $time);
32
		$output .= "<item>\n";
33
		$output .= "<title>" . $page["tag"] . " --- par " .$page["user"] . " le " . $day ." - ". $hh .":". $mm . "</title>\n";
34
		$output .= "<description> Modification de " . $page["tag"] . " --- par " .$page["user"] . " le " . $day ." - ". $hh .":". $mm . "</description>\n";
35
		$output .= "<link>" . $this->config["base_url"] . $page["tag"] . "&amp;time=" . rawurlencode($page["time"]) . "</link>\n";
36
		$output .= "</item>\n";
37
	}
38
	$output .= "</rdf:RDF>\n";
39
	print($output);
40
}
41
?>