Пример #1
0
/**
* Show an RSS Feed of the latest changes on a project @ingroup pages
*/
function projViewAsRSS()
{
    require_once confGet('DIR_STREBER') . "std/class_rss.inc.php";
    global $PH;
    global $auth;
    $project_id = getOnePassedId('prj', 'projects_*');
    # aborts on failure
    if (!($project = Project::getVisibleById($project_id))) {
        echo "Project is not readable. Anonymous user active?";
        exit;
    }
    ### used cached? ###
    $filepath = "_rss/proj_{$project->id}.xml";
    if (file_exists($filepath) || getGMTString(filemtime($filepath)) . "<" . $project->modified) {
        RSS::updateRSS($project);
    }
    readfile_chunked($filepath);
    exit;
}