|  | <?php | 
|  | /******************************************************************************* | 
|  | * Copyright (c) 2010, 2014 Eclipse Foundation and others. | 
|  | * All rights reserved. This program and the accompanying materials | 
|  | * are made available under the terms of the Eclipse Public License v1.0 | 
|  | * which accompanies this distribution, and is available at | 
|  | * http://www.eclipse.org/legal/epl-v10.html | 
|  | * | 
|  | * Contributors: | 
|  | *   Wayne Beaton - initial API and implementation | 
|  | *******************************************************************************/ | 
|  |  | 
|  | require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/common.php"); | 
|  | require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/debug.php"); | 
|  | trace_file_info(__FILE__); | 
|  |  | 
|  | require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); | 
|  | $App = new App(); | 
|  |  | 
|  | require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/Proposal.class.php"); | 
|  |  | 
|  | $proposals = get_proposals($App); | 
|  |  | 
|  | ob_start(); | 
|  |  | 
|  | function sort_by_date($proposal1, $proposal2) { | 
|  | if ($proposal1->getDate() == $proposal2->getDate()) return 0; | 
|  | return $proposal1->getDate() > $proposal2->getDate() ? -1 : 1; | 
|  | } | 
|  |  | 
|  | usort($proposals, 'sort_by_date'); | 
|  |  | 
|  | foreach($proposals as $proposal) { | 
|  | $values = array( | 
|  | $proposal->getName(), | 
|  | $proposal->getProjectId(), | 
|  | $proposal->getProposalUrl(), | 
|  | ($posted = $proposal->getProposalPosted()) ? date('Y-m-d', $posted->getDate()) : null, | 
|  | ($success = $proposal->getReviewSuccessful()) ? date('Y-m-d', $success->getDate()) : null | 
|  | ); | 
|  | echo join(',', $values); | 
|  | echo "\n"; | 
|  | } | 
|  |  | 
|  | ?> |