"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "inc/calendar_holiday.class.php" between
glpi-9.3.3.tgz and glpi-9.4.0.tgz

About: GLPI is an IT and asset management software (Information Resource Manager).

calendar_holiday.class.php  (glpi-9.3.3.tgz):calendar_holiday.class.php  (glpi-9.4.0.tgz)
skipping to change at line 76 skipping to change at line 76
$ID = $calendar->getField('id'); $ID = $calendar->getField('id');
if (!$calendar->can($ID, READ)) { if (!$calendar->can($ID, READ)) {
return false; return false;
} }
$canedit = $calendar->can($ID, UPDATE); $canedit = $calendar->can($ID, UPDATE);
$rand = mt_rand(); $rand = mt_rand();
$query = "SELECT DISTINCT `glpi_calendars_holidays`.`id` AS linkID, $iterator = $DB->request([
`glpi_holidays`.* 'SELECT DISTINCT' => 'glpi_calendars_holidays.id AS linkID',
FROM `glpi_calendars_holidays` 'FIELDS' => 'glpi_holidays.*',
LEFT JOIN `glpi_holidays` 'FROM' => 'glpi_calendars_holidays',
ON (`glpi_calendars_holidays`.`holidays_id` = `glpi_holiday 'LEFT JOIN' => [
s`.`id`) 'glpi_holidays' => [
WHERE `glpi_calendars_holidays`.`calendars_id` = '$ID' 'ON' => [
ORDER BY `glpi_holidays`.`name`"; 'glpi_calendars_holidays' => 'holidays_id',
$result = $DB->query($query); 'glpi_holidays' => 'id'
]
]
],
'WHERE' => [
'glpi_calendars_holidays.calendars_id' => $ID
],
'ORDERBY' => 'glpi_holidays.name'
]);
$numrows = count($iterator);
$holidays = []; $holidays = [];
$used = []; $used = [];
if ($numrows = $DB->numrows($result)) { while ($data = $iterator->next()) {
while ($data = $DB->fetch_assoc($result)) { $holidays[$data['id']] = $data;
$holidays[$data['id']] = $data; $used[$data['id']] = $data['id'];
$used[$data['id']] = $data['id'];
}
} }
if ($canedit) { if ($canedit) {
echo "<div class='firstbloc'>"; echo "<div class='firstbloc'>";
echo "<form name='calendarsegment_form$rand' id='calendarsegment_form$r and' method='post' echo "<form name='calendarsegment_form$rand' id='calendarsegment_form$r and' method='post'
action='"; action='";
echo Toolbox::getItemTypeFormURL(__CLASS__)."'>"; echo Toolbox::getItemTypeFormURL(__CLASS__)."'>";
echo "<table class='tab_cadre_fixe'>"; echo "<table class='tab_cadre_fixe'>";
echo "<tr class='tab_bg_1'><th colspan='7'>".__('Add a close time')."</ tr>"; echo "<tr class='tab_bg_1'><th colspan='7'>".__('Add a close time')."</ tr>";
echo "<tr class='tab_bg_2'><td class='right' colspan='4'>"; echo "<tr class='tab_bg_2'><td class='right' colspan='4'>";
 End of changes. 3 change blocks. 
14 lines changed or deleted 21 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)