X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/bfbbf72959faa385b97d250484be1d25e4fd22aa..17d5977bf8d24a1b0abb5f52a8453322f21a994d:/lib/functions.php?ds=sidebyside diff --git a/lib/functions.php b/lib/functions.php index 9672fe1..850386b 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -190,23 +190,23 @@ function jirafeau_ini_to_bytes($value) $modifier = substr($value, -1); $bytes = substr($value, 0, -1); switch (strtoupper($modifier)) { - default: - return intval($value); - break; - case 'P': - $bytes *= 1024; - // no break - case 'T': - $bytes *= 1024; - // no break - case 'G': - $bytes *= 1024; - // no break - case 'M': - $bytes *= 1024; - // no break - case 'K': - $bytes *= 1024; + default: + return intval($value); + break; + case 'P': + $bytes *= 1024; + // no break + case 'T': + $bytes *= 1024; + // no break + case 'G': + $bytes *= 1024; + // no break + case 'M': + $bytes *= 1024; + // no break + case 'K': + $bytes *= 1024; } return $bytes; } @@ -264,19 +264,19 @@ function jirafeau_get_max_upload_chunk_size_bytes($max_upload_chunk_size_bytes = function jirafeau_upload_errstr($code) { switch ($code) { - case UPLOAD_ERR_INI_SIZE: - case UPLOAD_ERR_FORM_SIZE: - return t('Your file exceeds the maximum authorized file size. '); - - case UPLOAD_ERR_PARTIAL: - case UPLOAD_ERR_NO_FILE: - return - t('Your file was not uploaded correctly. You may succeed in retrying. '); - - case UPLOAD_ERR_NO_TMP_DIR: - case UPLOAD_ERR_CANT_WRITE: - case UPLOAD_ERR_EXTENSION: - return t('Internal error. You may not succeed in retrying. '); + case UPLOAD_ERR_INI_SIZE: + case UPLOAD_ERR_FORM_SIZE: + return t('Your file exceeds the maximum authorized file size. '); + + case UPLOAD_ERR_PARTIAL: + case UPLOAD_ERR_NO_FILE: + return + t('Your file was not uploaded correctly. You may succeed in retrying. '); + + case UPLOAD_ERR_NO_TMP_DIR: + case UPLOAD_ERR_CANT_WRITE: + case UPLOAD_ERR_EXTENSION: + return t('Internal error. You may not succeed in retrying. '); } return t('Unknown error. '); }