Guest User

Untitled

a guest
Jul 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. $buildApi = new BuildAPI();
  2. $builds = $buildApi->getLatestBuilds(array(),null,24,10,false);
  3.  
  4. $html = "";
  5. $events = null;
  6. echo "TEST1 ";
  7.  
  8. foreach ($builds as $build) {
  9. echo "TEST2 ";
  10.  
  11. $title = t('Recent build ');
  12. $revision = $build->product_revision;
  13. $buildId = $build->id;
  14.  
  15. if ($buildId != null) {
  16. $revision = l($revision, 'build/result/' . $buildId);
  17. }
  18.  
  19. $html .= '<div class="buildsblockbuildheader">';
  20. $html .= '<div class="type"><strong>' . $title . '&nbsp;</strong></div><div class="revision"><strong>' . $revision . '</strong></div>';
  21. $html .= '<div class="clear-block"></div>';
  22. $html .= '</div>';
  23. $html .= '<p>';
  24.  
  25. if (!is_null($events) && count($events) > 0) {
  26. echo "TEST3 ";
  27. foreach ($events as &$event) {
  28. $id = $event->Deliverable->id;
  29. $html .= $event->Deliverable->type . ': ' .
  30. l($id, 'item/' . $id, array('attributes' => array('title' => $event->Deliverable->headline))) . '<br />';
  31. }
  32. }
  33. else {
  34. echo "TEST4 ";
  35. $html .= '<em>' . t('Nothing delivered') . '</em>';
  36. }
  37. $html .= '</p>';
  38.  
  39. return $html;
  40. }
  41.  
  42. echo "TEST5 ";
  43. echo $html;
Add Comment
Please, Sign In to add comment