You are here

function _photos_swfu_error in Album Photos 7.3

Copy file file_save_upload.

File

photos_swfu/photos_swfu.module, line 277

Code

function _photos_swfu_error($error, $source) {
  switch ($error) {
    case UPLOAD_ERR_OK:
      break;
    case UPLOAD_ERR_INI_SIZE:
    case UPLOAD_ERR_FORM_SIZE:
      return t('The file %file could not be saved, because it exceeds %maxsize, the maximum allowed size for uploads.', array(
        '%file' => $source,
        '%maxsize' => format_size(file_upload_max_size()),
      ));
    case UPLOAD_ERR_PARTIAL:
    case UPLOAD_ERR_NO_FILE:
      return t('The file %file could not be saved, because the upload did not complete.', array(
        '%file' => $source,
      ));

    // Unknown error
    default:
      return t('The file %file could not be saved. An unknown error has occurred.', array(
        '%file' => $source,
      ));
  }
}