"Fossies" - the Fresh Open Source Software Archive  

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

storagemanagementpage.class.php  (fogproject-1.5.5):storagemanagementpage.class.php  (fogproject-1.5.6)
skipping to change at line 314 skipping to change at line 314
if (!$storagegroupID) { if (!$storagegroupID) {
$storagegroupID = @min( $storagegroupID = @min(
self::getSubObjectIDs('StorageGroup') self::getSubObjectIDs('StorageGroup')
); );
} }
$path = filter_input(INPUT_POST, 'path') ?: '/images/'; $path = filter_input(INPUT_POST, 'path') ?: '/images/';
$ftppath = filter_input(INPUT_POST, 'ftppath') ?: '/images/'; $ftppath = filter_input(INPUT_POST, 'ftppath') ?: '/images/';
$snapinpath = filter_input(INPUT_POST, 'snapinpath') ?: '/opt/fog/snapin s/'; $snapinpath = filter_input(INPUT_POST, 'snapinpath') ?: '/opt/fog/snapin s/';
$sslpath = filter_input(INPUT_POST, 'sslpath') ?: '/opt/fog/snapins/ssl/ '; $sslpath = filter_input(INPUT_POST, 'sslpath') ?: '/opt/fog/snapins/ssl/ ';
$bitrate = filter_input(INPUT_POST, 'bitrate'); $bitrate = filter_input(INPUT_POST, 'bitrate');
$helloInterval = filter_input(INPUT_POST, 'helloInterval');
$interface = filter_input(INPUT_POST, 'interface') ?: 'eth0'; $interface = filter_input(INPUT_POST, 'interface') ?: 'eth0';
$user = filter_input(INPUT_POST, 'user'); $user = filter_input(INPUT_POST, 'user');
$pass = filter_input(INPUT_POST, 'pass'); $pass = filter_input(INPUT_POST, 'pass');
$fields = array( $fields = array(
'<label for="name">' '<label for="name">'
. self::$foglang['SNName'] . self::$foglang['SNName']
. '</label>' => '<div class="input-group">' . '</label>' => '<div class="input-group">'
. '<input type="text" name="name" id="name" value="' . '<input type="text" name="name" id="name" value="'
. $name . $name
. '" autocomplete="off" class="form-control" required/>' . '" autocomplete="off" class="form-control" required/>'
skipping to change at line 420 skipping to change at line 421
. $sslpath . $sslpath
. '" autocomplete="off" class="form-control"/>' . '" autocomplete="off" class="form-control"/>'
. '</div>', . '</div>',
'<label for="bitrate">' '<label for="bitrate">'
. _('Bitrate') . _('Bitrate')
. '</label>' => '<div class="input-group">' . '</label>' => '<div class="input-group">'
. '<input type="text" name="bitrate" id="bitrate" value="' . '<input type="text" name="bitrate" id="bitrate" value="'
. $bitrate . $bitrate
. '" autocomplete="off" class="form-control"/>' . '" autocomplete="off" class="form-control"/>'
. '</div>', . '</div>',
'<label for="helloInterval">'
. _('Rexmit Hello Interval')
. '</label>' => '<div class="input-group">'
. '<input type="text" name="helloInterval" id="helloInterval" value=
"'
. $helloInterval
. '" autocomplete="off" class="form-control"/>'
. '</div>',
'<label for="interface">' '<label for="interface">'
. self::$foglang['Interface'] . self::$foglang['Interface']
. '</label>' => '<div class="input-group">' . '</label>' => '<div class="input-group">'
. '<input type="text" name="interface" id="interface" value="' . '<input type="text" name="interface" id="interface" value="'
. $interface . $interface
. '" autocomplete="off" class="form-control"/>' . '" autocomplete="off" class="form-control"/>'
. '</div>', . '</div>',
'<label for="isen">' '<label for="isen">'
. self::$foglang['IsEnabled'] . self::$foglang['IsEnabled']
. '</label>' => '<input type="checkbox" name="isEnabled" id="isen" ' . '</label>' => '<input type="checkbox" name="isEnabled" id="isen" '
skipping to change at line 516 skipping to change at line 524
$webroot = filter_input(INPUT_POST, 'webroot'); $webroot = filter_input(INPUT_POST, 'webroot');
$isen = (int)isset($_POST['isEnabled']); $isen = (int)isset($_POST['isEnabled']);
$isgren = (int)isset($_POST['isGraphEnabled']); $isgren = (int)isset($_POST['isGraphEnabled']);
$isMaster = (int)isset($_POST['isMaster']); $isMaster = (int)isset($_POST['isMaster']);
$storagegroupID = filter_input(INPUT_POST, 'storagegroupID'); $storagegroupID = filter_input(INPUT_POST, 'storagegroupID');
$path = filter_input(INPUT_POST, 'path'); $path = filter_input(INPUT_POST, 'path');
$ftppath = filter_input(INPUT_POST, 'ftppath'); $ftppath = filter_input(INPUT_POST, 'ftppath');
$snapinpath = filter_input(INPUT_POST, 'snapinpath'); $snapinpath = filter_input(INPUT_POST, 'snapinpath');
$sslpath = filter_input(INPUT_POST, 'sslpath'); $sslpath = filter_input(INPUT_POST, 'sslpath');
$bitrate = filter_input(INPUT_POST, 'bitrate'); $bitrate = filter_input(INPUT_POST, 'bitrate');
$helloInterval = filter_input(INPUT_POST, 'helloInterval');
self::$HookManager->processEvent('STORAGE_NODE_ADD_POST'); self::$HookManager->processEvent('STORAGE_NODE_ADD_POST');
try { try {
if (empty($name)) { if (empty($name)) {
throw new Exception(self::$foglang['StorageNameRequired']); throw new Exception(self::$foglang['StorageNameRequired']);
} }
if (self::getClass('StorageNodeManager')->exists($name)) { if (self::getClass('StorageNodeManager')->exists($name)) {
throw new Exception(self::$foglang['StorageNameExists']); throw new Exception(self::$foglang['StorageNameExists']);
} }
if (empty($ip)) { if (empty($ip)) {
throw new Exception(self::$foglang['StorageIPRequired']); throw new Exception(self::$foglang['StorageIPRequired']);
skipping to change at line 561 skipping to change at line 570
->set('ip', $ip) ->set('ip', $ip)
->set('webroot', $webroot) ->set('webroot', $webroot)
->set('maxClients', $maxClients) ->set('maxClients', $maxClients)
->set('isMaster', $isMaster) ->set('isMaster', $isMaster)
->set('storagegroupID', $storagegroupID) ->set('storagegroupID', $storagegroupID)
->set('path', $path) ->set('path', $path)
->set('ftppath', $ftppath) ->set('ftppath', $ftppath)
->set('snapinpath', $snapinpath) ->set('snapinpath', $snapinpath)
->set('sslpath', $sslpath) ->set('sslpath', $sslpath)
->set('bitrate', $bitrate) ->set('bitrate', $bitrate)
->set('helloInterval', $helloInterval)
->set('interface', $interface) ->set('interface', $interface)
->set('isGraphEnabled', $isgren) ->set('isGraphEnabled', $isgren)
->set('isEnabled', $isen) ->set('isEnabled', $isen)
->set('user', $user) ->set('user', $user)
->set('pass', $pass) ->set('pass', $pass)
->set('bandwidth', $bandwidth); ->set('bandwidth', $bandwidth);
if (!$StorageNode->save()) { if (!$StorageNode->save()) {
throw new Exception(_('Add storage node failed!')); throw new Exception(_('Add storage node failed!'));
} }
if ($StorageNode->get('isMaster')) { if ($StorageNode->get('isMaster')) {
skipping to change at line 653 skipping to change at line 663
$path = filter_input(INPUT_POST, 'path') ?: $path = filter_input(INPUT_POST, 'path') ?:
$this->obj->get('path'); $this->obj->get('path');
$ftppath = filter_input(INPUT_POST, 'ftppath') ?: $ftppath = filter_input(INPUT_POST, 'ftppath') ?:
$this->obj->get('ftppath'); $this->obj->get('ftppath');
$snapinpath = filter_input(INPUT_POST, 'snapinpath') ?: $snapinpath = filter_input(INPUT_POST, 'snapinpath') ?:
$this->obj->get('snapinpath'); $this->obj->get('snapinpath');
$sslpath = filter_input(INPUT_POST, 'sslpath') ?: $sslpath = filter_input(INPUT_POST, 'sslpath') ?:
$this->obj->get('sslpath'); $this->obj->get('sslpath');
$bitrate = filter_input(INPUT_POST, 'bitrate') ?: $bitrate = filter_input(INPUT_POST, 'bitrate') ?:
$this->obj->get('bitrate'); $this->obj->get('bitrate');
$helloInterval = filter_input(INPUT_POST, 'helloInterval') ?:
$this->obj->get('helloInterval');
$interface = filter_input(INPUT_POST, 'interface') ?: $interface = filter_input(INPUT_POST, 'interface') ?:
$this->obj->get('interface'); $this->obj->get('interface');
$user = filter_input(INPUT_POST, 'user') ?: $user = filter_input(INPUT_POST, 'user') ?:
$this->obj->get('user'); $this->obj->get('user');
$pass = filter_input(INPUT_POST, 'pass') ?: $pass = filter_input(INPUT_POST, 'pass') ?:
$this->obj->get('pass'); $this->obj->get('pass');
$isgren = isset($_POST['isGraphEnabled']) ?: $isgren = isset($_POST['isGraphEnabled']) ?:
$this->obj->get('isGraphEnabled'); $this->obj->get('isGraphEnabled');
$isen = isset($_POST['isEnabled']) ?: $isen = isset($_POST['isEnabled']) ?:
$this->obj->get('isEnabled'); $this->obj->get('isEnabled');
skipping to change at line 786 skipping to change at line 798
. $sslpath . $sslpath
. '" autocomplete="off" class="form-control"/>' . '" autocomplete="off" class="form-control"/>'
. '</div>', . '</div>',
'<label for="bitrate">' '<label for="bitrate">'
. _('Bitrate') . _('Bitrate')
. '</label>' => '<div class="input-group">' . '</label>' => '<div class="input-group">'
. '<input type="text" name="bitrate" id="bitrate" value="' . '<input type="text" name="bitrate" id="bitrate" value="'
. $bitrate . $bitrate
. '" autocomplete="off" class="form-control"/>' . '" autocomplete="off" class="form-control"/>'
. '</div>', . '</div>',
'<label for="helloInterval">'
. _('Remit Hello Interval')
. '</label>' => '<div class="input-group">'
. '<input type="text" name="helloInterval" id="helloInterval" value=
"'
. $helloInterval
. '" autocomplete="off" class="form-control"/>'
. '</div>',
'<label for="interface">' '<label for="interface">'
. self::$foglang['Interface'] . self::$foglang['Interface']
. '</label>' => '<div class="input-group">' . '</label>' => '<div class="input-group">'
. '<input type="text" name="interface" id="interface" value="' . '<input type="text" name="interface" id="interface" value="'
. $interface . $interface
. '" autocomplete="off" class="form-control"/>' . '" autocomplete="off" class="form-control"/>'
. '</div>', . '</div>',
'<label for="isen">' '<label for="isen">'
. self::$foglang['IsEnabled'] . self::$foglang['IsEnabled']
. '</label>' => '<input type="checkbox" name="isEnabled" id="isen" ' . '</label>' => '<input type="checkbox" name="isEnabled" id="isen" '
skipping to change at line 887 skipping to change at line 906
$webroot = filter_input(INPUT_POST, 'webroot'); $webroot = filter_input(INPUT_POST, 'webroot');
$isen = (int)isset($_POST['isEnabled']); $isen = (int)isset($_POST['isEnabled']);
$isgren = (int)isset($_POST['isGraphEnabled']); $isgren = (int)isset($_POST['isGraphEnabled']);
$isMaster = (int)isset($_POST['isMaster']); $isMaster = (int)isset($_POST['isMaster']);
$storagegroupID = filter_input(INPUT_POST, 'storagegroupID'); $storagegroupID = filter_input(INPUT_POST, 'storagegroupID');
$path = filter_input(INPUT_POST, 'path'); $path = filter_input(INPUT_POST, 'path');
$ftppath = filter_input(INPUT_POST, 'ftppath'); $ftppath = filter_input(INPUT_POST, 'ftppath');
$snapinpath = filter_input(INPUT_POST, 'snapinpath'); $snapinpath = filter_input(INPUT_POST, 'snapinpath');
$sslpath = filter_input(INPUT_POST, 'sslpath'); $sslpath = filter_input(INPUT_POST, 'sslpath');
$bitrate = filter_input(INPUT_POST, 'bitrate'); $bitrate = filter_input(INPUT_POST, 'bitrate');
$helloInterval = filter_input(INPUT_POST, 'helloInterval');
self::$HookManager self::$HookManager
->processEvent( ->processEvent(
'STORAGE_NODE_EDIT_POST', 'STORAGE_NODE_EDIT_POST',
array('StorageNode' => &$this->obj) array('StorageNode' => &$this->obj)
); );
try { try {
if (!$name) { if (!$name) {
throw new Exception(self::$foglang['StorageNameRequired']); throw new Exception(self::$foglang['StorageNameRequired']);
} }
$exists = self::getClass('StorageNodeManager') $exists = self::getClass('StorageNodeManager')
skipping to change at line 940 skipping to change at line 960
->set('ip', $ip) ->set('ip', $ip)
->set('webroot', $webroot) ->set('webroot', $webroot)
->set('maxClients', $maxClients) ->set('maxClients', $maxClients)
->set('isMaster', $isMaster) ->set('isMaster', $isMaster)
->set('storagegroupID', $storagegroupID) ->set('storagegroupID', $storagegroupID)
->set('path', $path) ->set('path', $path)
->set('ftppath', $ftppath) ->set('ftppath', $ftppath)
->set('snapinpath', $snapinpath) ->set('snapinpath', $snapinpath)
->set('sslpath', $sslpath) ->set('sslpath', $sslpath)
->set('bitrate', $bitrate) ->set('bitrate', $bitrate)
->set('helloInterval', $helloInterval)
->set('interface', $interface) ->set('interface', $interface)
->set('isGraphEnabled', $isgren) ->set('isGraphEnabled', $isgren)
->set('isEnabled', $isen) ->set('isEnabled', $isen)
->set('user', $user) ->set('user', $user)
->set('pass', $pass) ->set('pass', $pass)
->set('bandwidth', $bandwidth); ->set('bandwidth', $bandwidth);
if (!$this->obj->save()) { if (!$this->obj->save()) {
throw new Exception(_('Storage Node update failed!')); throw new Exception(_('Storage Node update failed!'));
} }
if ($this->obj->get('isMaster')) { if ($this->obj->get('isMaster')) {
 End of changes. 8 change blocks. 
0 lines changed or deleted 23 lines changed or added

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