Example #1
0
     if (category::isValid($category) == false) {
         rss_bailout();
     }
     $channel_title = "PEAR: Latest releases in category " . $category;
     $channel_description = "The latest releases in the category " . $category;
     $items = category::getRecent(10, $category);
     break;
 case 'pepr':
     if ($argument == 'pepr') {
         $channel_title = "PEPr: Latest proposals.";
         $channel_description = "The latest PEPr proposals.";
         $obj_items = proposal::getAll($dbh, NULL, 10);
     } elseif (isset($proposalStatiMap[$argument])) {
         $channel_title = "PEPr: Latest proposals with status " . $proposalStatiMap[$argument];
         $channel_description = "The latest PEPr proposals with status " . $proposalStatiMap[$argument];
         $obj_items = proposal::getAll($dbh, $argument, 10);
     } elseif (substr($argument, 0, 6) == 'search') {
         $searchString = substr($argument, 7);
         $channel_title = "PEPr: Latest proposals containing " . $searchString;
         $channel_description = "The latest PEPr proposals containing " . $searchString;
         $obj_items = proposal::search($searchString);
     } else {
         rss_bailout();
     }
     $items = array();
     foreach ($obj_items as $id => $item) {
         $item = $item->toRSSArray();
         $items[] = array('name' => $item['title'], 'link' => $item['link'], 'releasenotes' => $item['desc'], 'releasedate' => (int) $item['date'], 'version' => '');
     }
     break;
 case 'bugs':
Example #2
0
 * @license   http://www.php.net/license/3_0.txt  PHP License
 * @version   $Id$
 */
set_include_path(dirname(dirname(__FILE__)) . '/include' . PATH_SEPARATOR . get_include_path());
// Get common settings.
require_once 'pear-prepend.php';
// Get the database class.
require_once 'DB.php';
$options = array('persistent' => false, 'portability' => DB_PORTABILITY_ALL);
$dbh =& DB::connect(PEAR_DATABASE_DSN, $options);
if (DB::isError($dbh)) {
    die("Failed to connect: {$dsn}\n");
}
// Obtain PEPr's common functions and classes.
require_once 'pepr/pepr.php';
$proposals =& proposal::getAll($dbh, 'vote');
// This checks if a proposal should automatically be finished
foreach ($proposals as $id => $proposal) {
    if ($proposal->getStatus() == 'vote') {
        $lastVoteDate = $proposal->longened_date > 0 ? $proposal->longened_date : $proposal->vote_date;
        if ($lastVoteDate + PROPOSAL_STATUS_VOTE_TIMELINE < time()) {
            if (ppVote::getCount($dbh, $proposal->id) > 4) {
                $proposals[$id]->status = 'finished';
                $proposal->sendActionEmail('change_status_finished', 'pearweb', null);
            } else {
                if ($proposal->longened_date > 0) {
                    $proposals[$id]->status = 'finished';
                    $proposal->sendActionEmail('change_status_finished', 'pearweb', null);
                } else {
                    $proposals[$id]->longened_date = time();
                    $proposal->sendActionEmail('longened_timeline_sys', 'pearweb', null);
Example #3
0
}
if (isset($_GET['filter']) && isset($proposalStatiMap[$_GET['filter']])) {
    $selectStatus = $_GET['filter'];
} else {
    $selectStatus = '';
}
if ($selectStatus != '') {
    $order = ' pkg_category ASC, pkg_name ASC';
}
if (isset($_GET['search'])) {
    $searchString = trim($_GET['search']);
    $searchString = preg_replace('/;/', '', $searchString);
    $proposals = proposal::search($searchString);
    $searchPostfix = '_search_' . urlencode($searchString);
} else {
    $proposals =& proposal::getAll($dbh, @$selectStatus, null, @$order);
    $searchPostfix = '';
}
response_header('PEPr :: Package Proposals');
echo '<h1>Package Proposals</h1>' . "\n";
if (empty($selectStatus)) {
    echo "<p>";
    echo "PEPr is PEAR's system for managing the process of submitting ";
    echo "new packages. If you would like to submit your own package, ";
    echo "please have a look at the <a href=\"/manual/en/developers-newmaint.php\">New Maintainers' Guide</a>.";
    echo "</p>";
    echo "<p>";
    echo "<a href=\"/feeds/pepr{$searchPostfix}.rss\"><img src=\"/gifs/feed.png\" width=\"16\" height=\"16\" alt=\"Aggregate this\" border=\"0\" /></a>";
    echo "</p>";
}
display_overview_nav();