"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/web/lib/fog/fogpage.class.php" between
fogproject-1.5.5.tar.gz and fogproject-1.5.6.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.

fogpage.class.php  (fogproject-1.5.5):fogpage.class.php  (fogproject-1.5.6)
skipping to change at line 447 skipping to change at line 447
} }
if ($type) { if ($type) {
$data['type'] = $type; $data['type'] = $type;
} }
if ($f) { if ($f) {
$data['f'] = $f; $data['f'] = $f;
} }
if ($tab) { if ($tab) {
$tabstr = "#$tab"; $tabstr = "#$tab";
} }
if (count($data) > 0) { if (is_array($data) && count($data) > 0) {
$formstr .= http_build_query($data); $formstr .= http_build_query($data);
} }
if ($tabstr) { if ($tabstr) {
$formstr .= $tabstr; $formstr .= $tabstr;
} }
$this->formAction = $formstr; $this->formAction = $formstr;
self::$HookManager->processEvent( self::$HookManager->processEvent(
'SEARCH_PAGES', 'SEARCH_PAGES',
array('searchPages' => &self::$searchPages) array('searchPages' => &self::$searchPages)
); );
skipping to change at line 807 skipping to change at line 807
if (isset($this->form)) { if (isset($this->form)) {
printf($this->form); printf($this->form);
} }
if ($node != 'home') { if ($node != 'home') {
echo '<div class="table-holder col-xs-' echo '<div class="table-holder col-xs-'
. $colsize . $colsize
. '">'; . '">';
} }
echo '<table class="table table-responsive' echo '<table class="table table-responsive'
. ( . (
count($this->data) < 1 ? is_array($this->data) && count($this->data) < 1 ?
' noresults' : ' noresults' :
'' ''
) )
. '">'; . '">';
if (count($this->data) < 1) { if (is_array($this->data) && count($this->data) < 1) {
echo '<thead><tr class="header"></tr></thead>'; echo '<thead><tr class="header"></tr></thead>';
echo '<tbody>'; echo '<tbody>';
$tablestr = '<tr><td colspan="' $tablestr = '<tr><td colspan="'
. count($this->templates) . count($this->templates)
. '">'; . '">';
if ($this->data['error']) { if ($this->data['error']) {
$tablestr .= ( $tablestr .= (
is_array($this->data['error']) ? is_array($this->data['error']) ?
'<p>' '<p>'
. implode('</p><p>', $this->data['error']) . implode('</p><p>', $this->data['error'])
: $this->data['error'] : $this->data['error']
); );
} else { } else {
$tablestr .= self::$foglang['NoResults']; $tablestr .= self::$foglang['NoResults'];
} }
$tablestr .= '</td></tr>'; $tablestr .= '</td></tr>';
echo $tablestr; echo $tablestr;
echo '</tbody>'; echo '</tbody>';
} else { } else {
if (count($this->headerData) > 0) { if (is_array($this->headerData) && count($this->headerData) > 0) {
echo '<thead>'; echo '<thead>';
echo $this->buildHeaderRow(); echo $this->buildHeaderRow();
echo '</thead>'; echo '</thead>';
} }
echo '<tbody>'; echo '<tbody>';
$tablestr = ''; $tablestr = '';
foreach ($this->data as &$rowData) { foreach ((array)$this->data as &$rowData) {
$tablestr .= '<tr class="' $tablestr .= '<tr class="'
. strtolower($node) . strtolower($node)
. '" ' . '" '
. ( . (
isset($rowData['id']) || isset($rowData[$id_field]) ? isset($rowData['id']) || isset($rowData[$id_field]) ?
'id="' 'id="'
. $node . $node
. '-' . '-'
. ( . (
isset($rowData['id']) ? isset($rowData['id']) ?
skipping to change at line 911 skipping to change at line 911
public function buildHeaderRow() public function buildHeaderRow()
{ {
unset($this->atts); unset($this->atts);
$this->_setAtts(); $this->_setAtts();
if (count($this->headerData) < 1) { if (count($this->headerData) < 1) {
return; return;
} }
ob_start(); ob_start();
echo '<tr class="header' echo '<tr class="header'
. ( . (
count($this->data) < 1 ? is_array($this->data) && count($this->data) < 1 ?
' hiddeninitially' : ' hiddeninitially' :
'' ''
) )
. '">'; . '">';
foreach ($this->headerData as $index => &$content) { foreach ($this->headerData as $index => &$content) {
echo '<th' echo '<th'
. ( . (
$this->atts[$index] ? $this->atts[$index] ?
' ' ' '
. $this->atts[$index] . $this->atts[$index]
skipping to change at line 1817 skipping to change at line 1817
} }
} catch (Exception $e) { } catch (Exception $e) {
$error[] = sprintf( $error[] = sprintf(
'%s %s %s<br/>%s', '%s %s %s<br/>%s',
$this->obj->get('name'), $this->obj->get('name'),
_('Failed to start tasking type'), _('Failed to start tasking type'),
$TaskType->get('name'), $TaskType->get('name'),
$e->getMessage() $e->getMessage()
); );
} }
if (count($error)) { if (is_array($error) && count($error)) {
throw new Exception( throw new Exception(
sprintf( sprintf(
'<ul class="nav nav-pills nav-stacked">' '<ul class="nav nav-pills nav-stacked">'
. '<li>%s</li>' . '<li>%s</li>'
. '</ul>', . '</ul>',
implode( implode(
'</li><li>', '</li><li>',
$error $error
) )
) )
skipping to change at line 2688 skipping to change at line 2688
{ {
try { try {
if (!self::getMACLookupCount()) { if (!self::getMACLookupCount()) {
throw new Exception( throw new Exception(
sprintf( sprintf(
'<a href="?node=about&sub=maclist">%s</a>', '<a href="?node=about&sub=maclist">%s</a>',
_('Load MAC Vendors') _('Load MAC Vendors')
) )
); );
} }
$pref = filter_input(INPUT_POST, 'prefix'); $pref = filter_input(INPUT_GET, 'prefix');
$MAC = self::getClass('MACAddress', $pref); $MAC = self::getClass('MACAddress', $pref);
$prefix = $MAC->getMACPrefix(); $prefix = $MAC->getMACPrefix();
if (!$MAC->isValid() || !$prefix) { if (!$MAC->isValid() || !$prefix) {
throw new Exception(_('Unknown')); throw new Exception(_('Unknown'));
} }
$OUI = self::getClass('OUIManager')->find(array('prefix'=>$prefix)); $OUI = self::getClass('OUIManager')->find(array('prefix'=>$prefix));
$OUI = array_shift($OUI); $OUI = array_shift($OUI);
if (!(($OUI instanceof OUI) && $OUI->isValid())) { if (!(($OUI instanceof OUI) && $OUI->isValid())) {
throw new Exception(_('Not found')); throw new Exception(_('Not found'));
} }
skipping to change at line 3110 skipping to change at line 3110
true, true,
false, false,
false, false,
false, false,
self::$newService || self::$json self::$newService || self::$json
)->json(); )->json();
} }
unset($key); unset($key);
} }
//echo json_encode($array, JSON_UNESCAPED_UNICODE); //echo json_encode($array, JSON_UNESCAPED_UNICODE);
self::$HookManager->processEvent(
'REQUEST_CLIENT_INFO',
array(
'repFields' => &$array,
'Host' => self::$Host
)
);
$this->sendData( $this->sendData(
json_encode( json_encode(
$array, $array,
JSON_UNESCAPED_UNICODE JSON_UNESCAPED_UNICODE
), ),
true, true,
$array $array
); );
} catch (Exception $e) { } catch (Exception $e) {
echo $e->getMessage(); echo $e->getMessage();
 End of changes. 9 change blocks. 
8 lines changed or deleted 17 lines changed or added

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