tiki-file_galleries_rss.php 1.25 KB
Newer Older
1
<?php
changi67's avatar
changi67 committed
2 3 4
/**
 * @package tikiwiki
 */
5
// (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project
6
//
7 8
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
changi67's avatar
changi67 committed
9
// $Id$
10

11
require_once ('tiki-setup.php');
12
$rsslib = TikiLib::lib('rss');
13

14
$access->check_feature('feature_file_galleries');
15

16
if ($prefs['feed_file_galleries'] != 'y') {
17 18
        $errmsg=tra("rss feed disabled");
        require_once ('tiki-rss_error.php');
19 20
}

21 22
$filegallib = TikiLib::lib('filegal');

ohertel's avatar
ohertel committed
23
$feed = "filegals";
mose's avatar
mose committed
24
$uniqueid = $feed;
25 26 27
$output = $rsslib->get_from_cache($uniqueid);

if ($output["data"]=="EMPTY") {
28 29
	$title = $prefs['feed_file_galleries_title'];
	$desc = $prefs['feed_file_galleries_desc'];
30 31
	$id = "fileId";
	$descId = "description";
32
	$dateId = "lastModif";
33
	$authorId = "lastModifUser";
34 35 36
	$titleId = "filename";
	$readrepl = "tiki-download_file.php?$id=%s";

37
	$changes = $filegallib->list_files(0, $prefs['feed_file_galleries_max'], $dateId.'_desc', '');
38 39
	$output = $rsslib->generate_feed($feed, $uniqueid, '', $changes, $readrepl, '', $id, $title, $titleId, $desc, $descId, $dateId, $authorId);
}
40 41
header("Content-type: ".$output["content-type"]);
print $output["data"];