"Fossies" - the Fresh Open Source Software Archive  

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

fogservice.class.php  (fogproject-1.5.5):fogservice.class.php  (fogproject-1.5.6)
skipping to change at line 547 skipping to change at line 547
$limitset .= "set net:limit-rate 0:$limitsend;"; $limitset .= "set net:limit-rate 0:$limitsend;";
} }
unset($limit); unset($limit);
$limit = $limitset; $limit = $limitset;
unset($limitset); unset($limitset);
unset($remItem); unset($remItem);
unset($includeFile); unset($includeFile);
$ftpstart = "ftp://$username:$encpassword@$ip"; $ftpstart = "ftp://$username:$encpassword@$ip";
if (is_file($myAdd)) { if (is_file($myAdd)) {
$remItem = dirname("$removeDir$removeFile"); $remItem = dirname("$removeDir$removeFile");
$path = $remItem;
$removeFile = basename($removeFile); $removeFile = basename($removeFile);
$opts = '-R -i'; $opts = '-R -i';
$includeFile = basename($myFile); $includeFile = basename($myFile);
if (!$myAddItem) { if (!$myAddItem) {
$myAddItem = dirname($myAdd); $myAddItem = dirname($myAdd);
} }
$localfilescheck[0] = $myAdd; $localfilescheck[0] = $myAdd;
$remotefilescheck[0] = sprintf( if (file_exists($ftpstart.$remItem."/".$removeFile)) {
'%s/%s', $remotefilescheck[0] = sprintf(
$remItem, '%s/%s',
$removeFile $remItem,
); $removeFile
);
}
} elseif (is_dir($myAdd)) { } elseif (is_dir($myAdd)) {
$remItem = "$removeDir$removeFile"; $remItem = "$removeDir$removeFile";
$path = realpath($myAdd); $path = realpath($myAdd);
$localfilescheck = self::globrecursive( $localfilescheck = self::globrecursive(
"$path/**{,.}*[!.,!..]", "$path/**{,.}*[!.,!..]",
GLOB_BRACE GLOB_BRACE
); );
$remotefilescheck = self::$FOGFTP->listrecursive($remItem); $remotefilescheck = self::$FOGFTP->listrecursive($remItem);
$opts = '-R'; $opts = '-R';
$includeFile = ''; $includeFile = '';
skipping to change at line 591 skipping to change at line 594
} }
$remotefilescheck = array_values( $remotefilescheck = array_values(
array_filter( array_filter(
array_unique($remotefilescheck) array_unique($remotefilescheck)
) )
); );
foreach ($remotefilescheck as &$rfn) { foreach ($remotefilescheck as &$rfn) {
$rfn = str_replace("$remItem/", "", $rfn); $rfn = str_replace("$remItem/", "", $rfn);
unset($rfn); unset($rfn);
} }
$filescheck = array_unique(array_merge($localfilescheck, $remote filescheck)); $filescheck = array_unique(array_merge((array)$localfilescheck, (array)$remotefilescheck));
$testavail = -1; $testavail = -1;
$allsynced = true; $allsynced = true;
foreach ($filescheck as $j => &$filename) { foreach ($filescheck as $j => &$filename) {
$filesequal = false; $filesequal = false;
$avail = true; $avail = true;
$lindex = array_search($filename, $localfilescheck); $lindex = array_search($filename, $localfilescheck);
$rindex = array_search($filename, $remotefilescheck); $rindex = array_search($filename, $remotefilescheck);
$localfilename = sprintf('%s%s%s', $path, "/", $localfilesch eck[$lindex]); $localfilename = sprintf('%s%s%s', $path, "/", $localfilesch eck[$lindex]);
$remotefilename = sprintf('%s%s%s', $remItem, "/", $remotefi lescheck[$rindex]); $remotefilename = sprintf('%s%s%s', $remItem, "/", $remotefi lescheck[$rindex]);
if (!is_int($rindex)) { if (!is_int($rindex)) {
skipping to change at line 758 skipping to change at line 761
$includeFile $includeFile
); );
$cmd .= "$includeFile "; $cmd .= "$includeFile ";
} }
$cmd .= "--ignore-time -vvv --exclude \".srvprivate\" "; $cmd .= "--ignore-time -vvv --exclude \".srvprivate\" ";
$cmd .= "$myAddItem $remItem;"; $cmd .= "$myAddItem $remItem;";
$cmd2 = sprintf( $cmd2 = sprintf(
"%s exit' -u $username,[Protected] $ip", "%s exit' -u $username,[Protected] $ip",
$cmd $cmd
); );
$cmd .= "exit' -u $username,$password $ip"; $cmd .= "exit' -u $username,'$password' $ip";
self::outall(" | CMD: $cmd2"); self::outall(" | CMD: $cmd2");
unset($includeFile, $remItem, $myAddItem); unset($includeFile, $remItem, $myAddItem);
$this->startTasking( $this->startTasking(
$cmd, $cmd,
$logname, $logname,
$randind, $randind,
$itemType, $itemType,
$name $name
); );
self::outall( self::outall(
 End of changes. 4 change blocks. 
7 lines changed or deleted 10 lines changed or added

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