"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/web/lib/fog/fogbase.class.php" between
fogproject-1.5.6.tar.gz and fogproject-1.5.7.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\PKG_DESCR_TTrsquo;t use any boot disks, or CDs; everything is done via TFTP and PXE.

fogbase.class.php  (fogproject-1.5.6):fogbase.class.php  (fogproject-1.5.7)
skipping to change at line 2301 skipping to change at line 2301
$error['message'] $error['message']
); );
} }
/** /**
* Gets the filesize in a non-arch dependent way. * Gets the filesize in a non-arch dependent way.
* *
* @param string $file the file to get size of * @param string $file the file to get size of
* *
* @return string|int|float * @return string|int|float
*/ */
public static function getFilesize($file) public static function getFilesize($path)
{ {
$size = filesize($file); $size = 0;
if (is_dir($path)) {
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterato
r($path)) as $file) {
if ($file->getFilename() != ".") {
$size += filesize($file);
}
}
} else {
$size = filesize($path);
}
return is_numeric($size) ? $size : 0; return is_numeric($size) ? $size : 0;
} }
/** /**
* Perform enmass wake on lan. * Perform enmass wake on lan.
* *
* @param array $macs The macs to send * @param array $macs The macs to send
* *
* @return void * @return void
*/ */
public static function wakeUp($macs) public static function wakeUp($macs)
 End of changes. 2 change blocks. 
2 lines changed or deleted 12 lines changed or added

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