"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/web/lib/reports/imaging_log.report.php" between
fogproject-1.5.7.tar.gz and fogproject-1.5.8.tar.gz

About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE.

imaging_log.report.php  (fogproject-1.5.7):imaging_log.report.php  (fogproject-1.5.8)
skipping to change at line 44 skipping to change at line 44
'${input}' '${input}'
); );
$this->attributes = array( $this->attributes = array(
array('class' => 'col-xs-4'), array('class' => 'col-xs-4'),
array('class' => 'col-xs-8 form-group') array('class' => 'col-xs-8 form-group')
); );
$userNames = self::getSubObjectIDs( $userNames = self::getSubObjectIDs(
'User', 'User',
'', '',
'name' 'name'
); );
$imageNames = self::getSubObjectIDs( $imageNames = self::getSubObjectIDs(
'Image', 'Image',
'', '',
'name' 'name'
); );
$HostNames = self::getSubObjectIDs( $HostNames = self::getSubObjectIDs(
'Host', 'Host',
'', '',
'name' 'name'
); );
$userNames = array_values( $userNames = array_values(
array_filter( array_filter(
array_unique( array_unique(
(array)$userNames (array)$userNames
) )
) )
); );
$imageNames = array_values( $imageNames = array_values(
array_filter( array_filter(
array_unique( array_unique(
(array)$imageNames (array)$imageNames
) )
) )
); );
$HostNames = array_values( $HostNames = array_values(
array_filter( array_filter(
array_unique( array_unique(
(array)$HostNames (array)$HostNames
) )
) )
); );
natcasesort($userNames); natcasesort($userNames);
natcasesort($imageNames); natcasesort($imageNames);
natcasesort($HostNames); natcasesort($HostNames);
if (count($userNames) > 0) { if (is_array($userNames) && count($userNames) > 0) {
$userSelForm = self::selectForm( $userSelForm = self::selectForm(
'usersearch', 'usersearch',
$userNames $userNames
); );
unset($userNames); unset($userNames);
} }
if (count($imageNames) > 0) { if (is_array($imageNames) && count($imageNames) > 0) {
$imageSelForm = self::selectForm( $imageSelForm = self::selectForm(
'imagesearch', 'imagesearch',
$imageNames $imageNames
); );
unset($imageNames); unset($imageNames);
} }
if (count($HostNames) > 0) { if (is_array($HostNames) && count($HostNames) > 0) {
$hostSelForm = self::selectForm( $hostSelForm = self::selectForm(
'hostsearch', 'hostsearch',
$HostNames $HostNames
); );
unset($HostNames); unset($HostNames);
} }
$fields = array( $fields = array(
'<label for="imagesearch">' '<label for="imagesearch">'
. _('Enter an image name to search for') . _('Enter an image name to search for')
. '</label>' => $imageSelForm, . '</label>' => $imageSelForm,
'<label for="usersearch">' '<label for="usersearch">'
. _('Enter an user name to search for') . _('Enter an user name to search for')
. '</label>' => $userSelForm, . '</label>' => $userSelForm,
'<label for="hostsearch">' '<label for="hostsearch">'
skipping to change at line 144 skipping to change at line 144
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
} }
public function filePost() public function filePost()
{ {
$hostsearch = filter_input( $hostsearch = filter_input(
INPUT_POST, INPUT_POST,
'hostsearch' 'hostsearch'
); );
$imagesearch = filter_input( $imagesearch = filter_input(
INPUT_POST, INPUT_POST,
'imagesearch' 'imagesearch'
); );
$usersearch = filter_input( $usersearch = filter_input(
INPUT_POST, INPUT_POST,
'usersearch' 'usersearch'
); );
if (!$hostsearch) { if (!$hostsearch) {
skipping to change at line 232 skipping to change at line 232
$this->ReportMaker->endCSVLine(); $this->ReportMaker->endCSVLine();
Route::listem( Route::listem(
'imaginglog', 'imaginglog',
'hostID', 'hostID',
'false', 'false',
array( array(
'hostID' => $hostIDs, 'hostID' => $hostIDs,
'createdBy' => $userNames, 'createdBy' => $userNames,
'image' => $imageNames 'image' => $imageNames
) )
); );
$ImagingLogs = json_decode( $ImagingLogs = json_decode(
Route::getData() Route::getData()
); );
$ImagingLogs = $ImagingLogs->imaginglogs; $ImagingLogs = $ImagingLogs->imaginglogs;
foreach ((array)$ImagingLogs as &$ImagingLog) { foreach ((array)$ImagingLogs as &$ImagingLog) {
if (!$ImagingLog->host->id) { if (!$ImagingLog->host->id) {
continue; continue;
} }
$start = $ImagingLog->start; $start = $ImagingLog->start;
$end = $ImagingLog->finish; $end = $ImagingLog->finish;
skipping to change at line 324 skipping to change at line 324
} }
$this->ReportMaker->appendHTML($this->process(12)); $this->ReportMaker->appendHTML($this->process(12));
echo '<div class="col-xs-9">'; echo '<div class="col-xs-9">';
echo '<div class="panel panel-info">'; echo '<div class="panel panel-info">';
echo '<div class="panel-heading text-center">'; echo '<div class="panel-heading text-center">';
echo '<h4 class="title">'; echo '<h4 class="title">';
echo $this->title; echo $this->title;
echo '</h4>'; echo '</h4>';
echo '</div>'; echo '</div>';
echo '<div class="panel-body">'; echo '<div class="panel-body">';
if (count($this->data) > 0) { if (is_array($this->data) && count($this->data) > 0) {
echo '<div class="text-center">'; echo '<div class="text-center">';
printf( printf(
$this->reportString, $this->reportString,
'ImagingLog', 'ImagingLog',
_('Export CSV'), _('Export CSV'),
_('Export CSV'), _('Export CSV'),
self::$csvfile, self::$csvfile,
'ImagingLog', 'ImagingLog',
_('Export PDF'), _('Export PDF'),
_('Export PDF'), _('Export PDF'),
 End of changes. 15 change blocks. 
21 lines changed or deleted 21 lines changed or added

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