Guest User

Untitled

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