Issue #2600576 by droplet: MIME, not Mime / mime

8.1.x
Nathaniel Catchpole 2016-02-22 21:30:26 +09:00
parent 5972523090
commit c051385d7b
8 changed files with 11 additions and 11 deletions

View File

@ -535,7 +535,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
// Set the allowed protocols. // Set the allowed protocols.
UrlHelper::setAllowedProtocols($this->container->getParameter('filter_protocols')); UrlHelper::setAllowedProtocols($this->container->getParameter('filter_protocols'));
// Override of Symfony's mime type guesser singleton. // Override of Symfony's MIME type guesser singleton.
MimeTypeGuesser::registerWithSymfonyGuesser($this->container); MimeTypeGuesser::registerWithSymfonyGuesser($this->container);
$this->prepared = TRUE; $this->prepared = TRUE;

View File

@ -109,7 +109,7 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface {
} }
/** /**
* A helper function to register with Symfony's singleton mime type guesser. * A helper function to register with Symfony's singleton MIME type guesser.
* *
* Symfony's default mimetype guessers have dependencies on PHP's fileinfo * Symfony's default mimetype guessers have dependencies on PHP's fileinfo
* extension or being able to run the system command file. Drupal's guesser * extension or being able to run the system command file. Drupal's guesser

View File

@ -247,7 +247,7 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
label: 'Mime type' label: 'MIME type'
exclude: false exclude: false
alter: alter:
alter_text: false alter_text: false
@ -623,7 +623,7 @@ display:
exposed: true exposed: true
expose: expose:
operator_id: filemime_op operator_id: filemime_op
label: 'Mime type' label: 'MIME type'
description: '' description: ''
use_operator: false use_operator: false
operator: filemime_op operator: filemime_op

View File

@ -1266,7 +1266,7 @@ function template_preprocess_file_link(&$variables) {
'file', 'file',
// Add a specific class for each and every mime type. // Add a specific class for each and every mime type.
'file--mime-' . strtr($mime_type, array('/' => '-', '.' => '-')), 'file--mime-' . strtr($mime_type, array('/' => '-', '.' => '-')),
// Add a more general class for groups of well known mime types. // Add a more general class for groups of well known MIME types.
'file--' . file_icon_class($mime_type), 'file--' . file_icon_class($mime_type),
); );

View File

@ -12,11 +12,11 @@ use Drupal\Core\Field\FieldItemInterface;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
/** /**
* Formatter to render the file mime type, with an optional icon. * Formatter to render the file MIME type, with an optional icon.
* *
* @FieldFormatter( * @FieldFormatter(
* id = "file_filemime", * id = "file_filemime",
* label = @Translation("File mime"), * label = @Translation("File MIME"),
* field_types = { * field_types = {
* "string" * "string"
* } * }

View File

@ -85,7 +85,7 @@ class File extends DrupalSqlBase {
'uid' => $this->t('The {users}.uid who added the file. If set to 0, this file was added by an anonymous user.'), 'uid' => $this->t('The {users}.uid who added the file. If set to 0, this file was added by an anonymous user.'),
'filename' => $this->t('File name'), 'filename' => $this->t('File name'),
'filepath' => $this->t('File path'), 'filepath' => $this->t('File path'),
'filemime' => $this->t('File Mime Type'), 'filemime' => $this->t('File MIME Type'),
'status' => $this->t('The published status of a file.'), 'status' => $this->t('The published status of a file.'),
'timestamp' => $this->t('The time that the file was added.'), 'timestamp' => $this->t('The time that the file was added.'),
'file_directory_path' => $this->t('The Drupal files path.'), 'file_directory_path' => $this->t('The Drupal files path.'),

View File

@ -105,7 +105,7 @@ class File extends DrupalSqlBase {
'uid' => $this->t('The {users}.uid who added the file. If set to 0, this file was added by an anonymous user.'), 'uid' => $this->t('The {users}.uid who added the file. If set to 0, this file was added by an anonymous user.'),
'filename' => $this->t('File name'), 'filename' => $this->t('File name'),
'filepath' => $this->t('File path'), 'filepath' => $this->t('File path'),
'filemime' => $this->t('File Mime Type'), 'filemime' => $this->t('File MIME Type'),
'status' => $this->t('The published status of a file.'), 'status' => $this->t('The published status of a file.'),
'timestamp' => $this->t('The time that the file was added.'), 'timestamp' => $this->t('The time that the file was added.'),
); );

View File

@ -50,7 +50,7 @@ class FileDenormalizeTest extends WebTestBase {
$this->assertTrue(file_exists($denormalized->getFileUri()), 'The temporary file was found.'); $this->assertTrue(file_exists($denormalized->getFileUri()), 'The temporary file was found.');
$this->assertIdentical($file->uuid(), $denormalized->uuid(), 'The expected UUID was found'); $this->assertIdentical($file->uuid(), $denormalized->uuid(), 'The expected UUID was found');
$this->assertIdentical($file->getMimeType(), $denormalized->getMimeType(), 'The expected mime type was found.'); $this->assertIdentical($file->getMimeType(), $denormalized->getMimeType(), 'The expected MIME type was found.');
$this->assertIdentical($file->getFilename(), $denormalized->getFilename(), 'The expected filename was found.'); $this->assertIdentical($file->getFilename(), $denormalized->getFilename(), 'The expected filename was found.');
$this->assertTrue($denormalized->isPermanent(), 'The file has a permanent status.'); $this->assertTrue($denormalized->isPermanent(), 'The file has a permanent status.');
@ -72,7 +72,7 @@ class FileDenormalizeTest extends WebTestBase {
$this->assertIdentical('temporary://' . $file_name, $denormalized->getFileUri(), 'The expected file URI was found.'); $this->assertIdentical('temporary://' . $file_name, $denormalized->getFileUri(), 'The expected file URI was found.');
$this->assertTrue(file_exists($denormalized->getFileUri()), 'The temporary file was found.'); $this->assertTrue(file_exists($denormalized->getFileUri()), 'The temporary file was found.');
$this->assertIdentical('text/plain', $denormalized->getMimeType(), 'The expected mime type was found.'); $this->assertIdentical('text/plain', $denormalized->getMimeType(), 'The expected MIME type was found.');
$this->assertIdentical($file_name, $denormalized->getFilename(), 'The expected filename was found.'); $this->assertIdentical($file_name, $denormalized->getFilename(), 'The expected filename was found.');
$this->assertFalse($denormalized->isPermanent(), 'The file has a permanent status.'); $this->assertFalse($denormalized->isPermanent(), 'The file has a permanent status.');
} }