$xml .= add_XML_value('name', $Site->GetName() . '-' . $Site->GetSystemName() . ' (' . $lastpingtime . ' ago)'); $xml .= add_XML_value('id', $siteid); $xml .= add_XML_value('availablenow', $lastseen); // Have we seen it in the past 5 minutes if (isset($sites) && array_search($siteid, $sites) !== false) { $xml .= add_XML_value('selected', '1'); } $xml .= '</site>'; } // Libraries $Library = new ClientLibrary(); $libraryids = $Library->getAll(); foreach ($libraryids as $libraryid) { $xml .= '<library>'; $Library->Id = $libraryid; $xml .= add_XML_value('name', $Library->GetName() . '-' . $Library->GetVersion()); $xml .= add_XML_value('id', $libraryid); if (isset($libraries) && array_search($libraryid, $libraries) !== false) { $xml .= add_XML_value('selected', '1'); } $xml .= '</library>'; } $xml .= '</cdash>'; // Schedule the build if (!empty($_POST['submit']) || !empty($_POST['update'])) { $clientJobSchedule = new ClientJobSchedule(); $clientJobSchedule->UserId = $userid; $clientJobSchedule->ProjectId = $Project->Id; $clientJobSchedule->BuildNameSuffix = htmlspecialchars(pdo_real_escape_string($_POST['buildnamesuffix'])); $clientJobSchedule->BuildConfiguration = htmlspecialchars(pdo_real_escape_string($_POST['buildconfiguration'])); $clientJobSchedule->Tag = htmlspecialchars(pdo_real_escape_string($_POST['tag']));
$xml .= add_XML_value("name", $Site->GetName() . "-" . $Site->GetSystemName() . " (" . $lastpingtime . " ago)"); $xml .= add_XML_value("id", $siteid); $xml .= add_XML_value("availablenow", $lastseen); // Have we seen it in the past 5 minutes if (isset($sites) && array_search($siteid, $sites) !== false) { $xml .= add_XML_value("selected", "1"); } $xml .= '</site>'; } // Libraries $Library = new ClientLibrary(); $libraryids = $Library->getAll(); foreach ($libraryids as $libraryid) { $xml .= '<library>'; $Library->Id = $libraryid; $xml .= add_XML_value("name", $Library->GetName() . "-" . $Library->GetVersion()); $xml .= add_XML_value("id", $libraryid); if (isset($libraries) && array_search($libraryid, $libraries) !== false) { $xml .= add_XML_value("selected", "1"); } $xml .= '</library>'; } $xml .= "</cdash>"; // Schedule the build if (!empty($_POST['submit']) || !empty($_POST['update'])) { $clientJobSchedule = new ClientJobSchedule(); $clientJobSchedule->UserId = $userid; $clientJobSchedule->ProjectId = $Project->Id; $clientJobSchedule->BuildNameSuffix = htmlspecialchars(pdo_real_escape_string($_POST['buildnamesuffix'])); $clientJobSchedule->BuildConfiguration = htmlspecialchars(pdo_real_escape_string($_POST['buildconfiguration'])); $clientJobSchedule->Tag = htmlspecialchars(pdo_real_escape_string($_POST['tag']));