aboutsummaryrefslogtreecommitdiff
path: root/www/feed-new.php
blob: 9d21d5a5906bcbacd73cf444c1dfbfaeb930c4eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
/**
 * Generate an atom feed with the 10 most recently created pastes
 */
namespace phorkie;
$reqWritePermissions = false;
require_once 'www-header.php';

$db = new Database();
header('Content-Type: application/atom+xml');
render(
    'feed-new',
    array(
        'pastes'  => $db->getSearch()->listAll(0, 10, 'crdate', 'desc'),
        'url'     => Tools::fullUrl(),
        'feedurl' => Tools::fullUrl('feed/new'),
    )
);
?>