<?php
/**
 * Upstream projects source packages reporting box.
 *
 * Not working yet. Still a mockup.
 *
 * PHP version 5
 *
 * @category Dashboard
 * @package  Buildsystem
 * @author   Romain d'Alverny <rda@mageia.org>
 * @license  MIT License, see LICENSE.txt
 * @link     http://svnweb.mageia.org/svn/soft/dashboard/
*/

/**
*/
class Report_Box_UpstreamProjects extends Report_Box
{
    /**
    */
    var $title = "Upstream Projects";
    
    /**
    */
    function _get_var_definitions() {
        return array(
            'source-packages' => '%d source packages'
        );
    }
    
    /**
    */
    function _get_links()
    {
        return 'View <a href="http://check.mageia.org/updates.html">detailed report (youri-check)</a>';
    }

    /**
     * Uses youri-check updates report.
    */
    function _fetch_upstream_updates()
    {
        $txt = file('http://check.mageia.org/updates.txt');
        return array(
            'upstream-updates'=> count($txt) - 5
        );
    }
}