2005-04-18 Rupert Germann <rupi@gmx.li>
- * added a condition that removes wrong default values from autoinc-lines when importing static data. (bug 416 related).
+ * Added a condition that removes wrong default values from autoinc-lines when importing static data. (bug #416 related).
2005-04-18 Michael Stucki <michael@typo3.org>
for ($a=0; $a<strlen($string); $a++) {
$out .= '&#'.ord(substr($string, $a, 1)).';';
}
- } else {
+ } else {
for ($a=0; $a<strlen($string); $a++) {
$charValue = ord(substr($string,$a,1));
$charValue+= intval($this->spamProtectEmailAddresses)*($back?-1:1);
}
/**
- * [Describe function...]
+ * Convert a size from human-readable form into bytes
*
- * @param [type] $bytes: ...
- * @return [type] ...
+ * @param string A string containing the size in bytes, kilobytes or megabytes. Example: 64M
+ * @return string The string is returned in bytes and can also hold floating values
*/
function convertByteSize($bytes) {
if (stristr($bytes,"m")) {
- $bytes=doubleval($bytes)*1024*1024;
+ $bytes=floatval($bytes)*1024*1024;
} elseif (stristr($bytes,"k")) {
- $bytes=doubleval($bytes)*1024;
+ $bytes=floatval($bytes)*1024;
}
return $bytes;
}