"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/web/lib/pages/snapinmanagementpage.class.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.

snapinmanagementpage.class.php  (fogproject-1.5.7):snapinmanagementpage.class.php  (fogproject-1.5.8)
skipping to change at line 727 skipping to change at line 727
); );
$uploadfile = basename( $uploadfile = basename(
$_FILES['snapin']['name'] $_FILES['snapin']['name']
); );
if ($uploadfile) { if ($uploadfile) {
$snapinfile = $uploadfile; $snapinfile = $uploadfile;
} }
$isEnabled = (int)isset($_POST['isEnabled']); $isEnabled = (int)isset($_POST['isEnabled']);
$toReplicate = (int)isset($_POST['toReplicate']); $toReplicate = (int)isset($_POST['toReplicate']);
$hide = (int)isset($_POST['isHidden']); $hide = (int)isset($_POST['isHidden']);
$tiemout = (int)filter_input(INPUT_POST, 'timeout'); $timeout = (int)filter_input(INPUT_POST, 'timeout');
$action = filter_input(INPUT_POST, 'action'); $action = filter_input(INPUT_POST, 'action');
$args = filter_input(INPUT_POST, 'args'); $args = filter_input(INPUT_POST, 'args');
try { try {
$phpPostMaxSize = ini_get('post_max_size');
switch (strtolower(substr($phpPostMaxSize, -1))) {
case 'g':
$phpPostMaxSize = ((int)$phpPostMaxSize) * 1024;
// no break
case 'm':
$phpPostMaxSize = ((int)$phpPostMaxSize) * 1024;
// no break
case 'k':
$phpPostMaxSize = ((int)$phpPostMaxSize) * 1024;
}
if (isset($_SERVER['CONTENT_LENGTH']) && $phpPostMaxSize > 0 &&
$_SERVER['CONTENT_LENGTH'] > $phpPostMaxSize) {
throw new Exception(
_('Snapin file is too big, increase post_max_size in php.ini
.')
);
}
if (empty($_POST) && isset($_SERVER['CONTENT_LENGTH']) &&
$_SERVER['CONTENT_LENGTH'] > 0) {
throw new Exception(
_('$_POST variable is empty, check apache error log.')
);
}
if (!$name) { if (!$name) {
throw new Exception( throw new Exception(
_('A snapin name is required!') _('A snapin name is required!')
); );
} }
if (self::getClass('SnapinManager')->exists($name)) { if (self::getClass('SnapinManager')->exists($name)) {
throw new Exception( throw new Exception(
_('A snapin already exists with this name!') _('A snapin already exists with this name!')
); );
} }
skipping to change at line 1275 skipping to change at line 1298
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 _('Snapin Storage Groups'); echo _('Snapin Storage Groups');
echo '</h4>'; echo '</h4>';
echo '</div>'; echo '</div>';
echo '<div class="panel-body">'; echo '<div class="panel-body">';
echo '<form class="form-horizontal" method="post" action="' echo '<form class="form-horizontal" method="post" action="'
. $this->formAction . $this->formAction
. '&tab=snap-storage" enctype="multipart/form-data">'; . '&tab=snap-storage" enctype="multipart/form-data">';
if (count($this->data)) { if (is_array($this->data) && count($this->data)) {
echo '<div class="text-center">'; echo '<div class="text-center">';
echo '<div class="checkbox">'; echo '<div class="checkbox">';
echo '<label for="groupMeShow">'; echo '<label for="groupMeShow">';
echo '<input type="checkbox" name="groupMeShow" ' echo '<input type="checkbox" name="groupMeShow" '
. 'id="groupMeShow"/>'; . 'id="groupMeShow"/>';
echo _('Check here to see what storage groups can be added'); echo _('Check here to see what storage groups can be added');
echo '</label>'; echo '</label>';
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
echo '<br/>'; echo '<br/>';
skipping to change at line 1370 skipping to change at line 1393
'storageGroup_id' => $StorageGroup->id, 'storageGroup_id' => $StorageGroup->id,
'storageGroup_name' => $StorageGroup->name, 'storageGroup_name' => $StorageGroup->name,
'is_primary' => ( 'is_primary' => (
$this->obj->getPrimaryGroup($StorageGroup->id) ? $this->obj->getPrimaryGroup($StorageGroup->id) ?
' checked' : ' checked' :
'' ''
) )
); );
unset($StorageGroup); unset($StorageGroup);
} }
if (count($this->data) > 0) { if (is_array($this->data) && count($this->data) > 0) {
self::$HookManager->processEvent( self::$HookManager->processEvent(
'SNAPIN_EDIT_STORAGE_GROUP', 'SNAPIN_EDIT_STORAGE_GROUP',
array( array(
'data' => &$this->data, 'data' => &$this->data,
'headerData' => &$this->headerData, 'headerData' => &$this->headerData,
'templates' => &$this->templates, 'templates' => &$this->templates,
'attributes' => &$this->attributes 'attributes' => &$this->attributes
) )
); );
echo '<div class="panel panel-info">'; echo '<div class="panel panel-info">';
skipping to change at line 1465 skipping to change at line 1488
if ($uploadfile) { if ($uploadfile) {
$snapinfile = $uploadfile; $snapinfile = $uploadfile;
} }
$protected = (int)isset($_POST['protected_snapin']); $protected = (int)isset($_POST['protected_snapin']);
$isEnabled = (int)isset($_POST['isEnabled']); $isEnabled = (int)isset($_POST['isEnabled']);
$toReplicate = (int)isset($_POST['toReplicate']); $toReplicate = (int)isset($_POST['toReplicate']);
$hide = (int)isset($_POST['isHidden']); $hide = (int)isset($_POST['isHidden']);
$timeout = (int)filter_input(INPUT_POST, 'timeout'); $timeout = (int)filter_input(INPUT_POST, 'timeout');
$action = filter_input(INPUT_POST, 'action'); $action = filter_input(INPUT_POST, 'action');
$args = filter_input(INPUT_POST, 'args'); $args = filter_input(INPUT_POST, 'args');
$phpPostMaxSize = ini_get('post_max_size');
switch (strtolower(substr($phpPostMaxSize, -1))) {
case 'g':
$phpPostMaxSize = ((int)$phpPostMaxSize) * 1024;
// no break
case 'm':
$phpPostMaxSize = ((int)$phpPostMaxSize) * 1024;
// no break
case 'k':
$phpPostMaxSize = ((int)$phpPostMaxSize) * 1024;
}
if (isset($_SERVER['CONTENT_LENGTH']) && $phpPostMaxSize > 0 &&
$_SERVER['CONTENT_LENGTH'] > $phpPostMaxSize) {
throw new Exception(
_('Snapin file is too big, increase post_max_size in php.ini.')
);
}
if (empty($_POST) && isset($_SERVER['CONTENT_LENGTH']) &&
$_SERVER['CONTENT_LENGTH'] > 0) {
throw new Exception(
_('$_POST variable is empty, check apache error log.')
);
}
if (!$name) { if (!$name) {
throw new Exception( throw new Exception(
_('A snapin name is required!') _('A snapin name is required!')
); );
} }
if ($this->obj->get('name') != $name if ($this->obj->get('name') != $name
&& self::getClass('SnapinManager')->exists( && self::getClass('SnapinManager')->exists(
$name, $name,
$this->obj->get('id') $this->obj->get('id')
) )
 End of changes. 5 change blocks. 
3 lines changed or deleted 50 lines changed or added

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