Update to Drupal 8.0.2. For more information, see https://www.drupal.org/drupal-8.0.2-release-notes
This commit is contained in:
parent
1a0e9d9fac
commit
a6b049dd05
538 changed files with 5247 additions and 1594 deletions
|
@ -96,16 +96,16 @@ function file_requirements($phase) {
|
|||
$value = t('Not enabled');
|
||||
$description = t('Your server is not capable of displaying file upload progress. File upload progress requires PHP be run with mod_php or PHP-FPM and not as FastCGI.');
|
||||
}
|
||||
elseif (!$implementation && extension_loaded('apc')) {
|
||||
elseif (!$implementation && extension_loaded('apcu')) {
|
||||
$value = t('Not enabled');
|
||||
$description = t('Your server is capable of displaying file upload progress through APC, but it is not enabled. Add <code>apc.rfc1867 = 1</code> to your php.ini configuration. Alternatively, it is recommended to use <a href=":url">PECL uploadprogress</a>, which supports more than one simultaneous upload.', array(':url' => 'http://pecl.php.net/package/uploadprogress'));
|
||||
}
|
||||
elseif (!$implementation) {
|
||||
$value = t('Not enabled');
|
||||
$description = t('Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the <a href=":uploadprogress_url">PECL uploadprogress library</a> (preferred) or to install <a href=":apc_url">APC</a>.', array(':uploadprogress_url' => 'http://pecl.php.net/package/uploadprogress', ':apc_url' => 'http://php.net/apc'));
|
||||
$description = t('Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the <a href=":uploadprogress_url">PECL uploadprogress library</a> (preferred) or to install <a href=":apc_url">APC</a>.', array(':uploadprogress_url' => 'http://pecl.php.net/package/uploadprogress', ':apc_url' => 'http://php.net/apcu'));
|
||||
}
|
||||
elseif ($implementation == 'apc') {
|
||||
$value = t('Enabled (<a href=":url">APC RFC1867</a>)', array(':url' => 'http://php.net/manual/apc.configuration.php#ini.apc.rfc1867'));
|
||||
$value = t('Enabled (<a href=":url">APC RFC1867</a>)', array(':url' => 'http://php.net/manual/en/apcu.configuration.php#ini.apcu.rfc1867'));
|
||||
$description = t('Your server is capable of displaying file upload progress using APC RFC1867. Note that only one upload at a time is supported. It is recommended to use the <a href=":url">PECL uploadprogress library</a> if possible.', array(':url' => 'http://pecl.php.net/package/uploadprogress'));
|
||||
}
|
||||
elseif ($implementation == 'uploadprogress') {
|
||||
|
|
|
@ -913,7 +913,7 @@ function file_progress_implementation() {
|
|||
$implementation = FALSE;
|
||||
|
||||
// We prefer the PECL extension uploadprogress because it supports multiple
|
||||
// simultaneous uploads. APC only supports one at a time.
|
||||
// simultaneous uploads. APCu only supports one at a time.
|
||||
if (extension_loaded('uploadprogress')) {
|
||||
$implementation = 'uploadprogress';
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class FileWidgetAjaxController {
|
|||
}
|
||||
}
|
||||
elseif ($implementation == 'apc') {
|
||||
$status = apc_fetch('upload_' . $key);
|
||||
$status = apcu_fetch('upload_' . $key);
|
||||
if (isset($status['current']) && !empty($status['total'])) {
|
||||
$progress['message'] = t('Uploading... (@current of @total)', array('@current' => format_size($status['current']), '@total' => format_size($status['total'])));
|
||||
$progress['percentage'] = round(100 * $status['current'] / $status['total']);
|
||||
|
|
|
@ -47,7 +47,7 @@ class FileWidget extends WidgetBase implements ContainerFactoryPluginInterface {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
|
||||
return new static($plugin_id, $plugin_definition,$configuration['field_definition'], $configuration['settings'], $configuration['third_party_settings'], $container->get('element_info'));
|
||||
return new static($plugin_id, $plugin_definition, $configuration['field_definition'], $configuration['settings'], $configuration['third_party_settings'], $container->get('element_info'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -145,11 +145,11 @@ class EntityFile extends EntityContentBase {
|
|||
* Tries to move or copy a file.
|
||||
*
|
||||
* @param string $source
|
||||
* The source path or URI.
|
||||
* The source path or URI.
|
||||
* @param string $destination
|
||||
* The destination path or URI.
|
||||
* @param integer $replace
|
||||
* FILE_EXISTS_REPLACE (default) or FILE_EXISTS_RENAME.
|
||||
* The destination path or URI.
|
||||
* @param int $replace
|
||||
* (optional) FILE_EXISTS_REPLACE (default) or FILE_EXISTS_RENAME.
|
||||
*
|
||||
* @return bool
|
||||
* TRUE on success, FALSE on failure.
|
||||
|
@ -170,9 +170,9 @@ class EntityFile extends EntityContentBase {
|
|||
*
|
||||
* @param \Drupal\migrate\Row $row
|
||||
*
|
||||
* @return integer
|
||||
* Either FILE_EXISTS_REPLACE (default) or FILE_EXISTS_RENAME, depending
|
||||
* on the current configuration.
|
||||
* @return int
|
||||
* Either FILE_EXISTS_REPLACE (default) or FILE_EXISTS_RENAME, depending
|
||||
* on the current configuration.
|
||||
*/
|
||||
protected function getOverwriteMode(Row $row) {
|
||||
if (!empty($this->configuration['rename'])) {
|
||||
|
|
|
@ -22,6 +22,7 @@ class Status extends InOperator {
|
|||
if (!isset($this->valueOptions)) {
|
||||
$this->valueOptions = _views_file_status();
|
||||
}
|
||||
return $this->valueOptions;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -30,15 +30,8 @@ class FileFieldRSSContentTest extends FileFieldTestBase {
|
|||
$node_storage = $this->container->get('entity.manager')->getStorage('node');
|
||||
$field_name = strtolower($this->randomMachineName());
|
||||
$type_name = 'article';
|
||||
$field_settings = array(
|
||||
'display_field' => '1',
|
||||
'display_default' => '1',
|
||||
);
|
||||
$field_settings = array(
|
||||
'description_field' => '1',
|
||||
);
|
||||
$widget_settings = array();
|
||||
$this->createFileField($field_name, 'node', $type_name, $field_settings, $field_settings, $widget_settings);
|
||||
|
||||
$this->createFileField($field_name, 'node', $type_name);
|
||||
|
||||
// RSS display must be added manually.
|
||||
$this->drupalGet("admin/structure/types/manage/$type_name/display");
|
||||
|
|
|
@ -151,7 +151,7 @@ class FileFieldWidgetTest extends FileFieldTestBase {
|
|||
// - First remove the 2nd file.
|
||||
// - Then remove what is then the 2nd file (was originally the 3rd file).
|
||||
// - Then remove the first file.
|
||||
foreach (array(1,1,0) as $delta) {
|
||||
foreach (array(1, 1, 0) as $delta) {
|
||||
// Ensure we have the expected number of Remove buttons, and that they
|
||||
// are numbered sequentially.
|
||||
$buttons = $this->xpath('//input[@type="submit" and @value="Remove"]');
|
||||
|
|
|
@ -33,9 +33,9 @@ abstract class FileManagedTestBase extends WebTestBase {
|
|||
* Assert that all of the specified hook_file_* hooks were called once, other
|
||||
* values result in failure.
|
||||
*
|
||||
* @param array $expected
|
||||
* Array with string containing with the hook name, e.g. 'load', 'save',
|
||||
* 'insert', etc.
|
||||
* @param string[] $expected
|
||||
* An array of strings containing with the hook name; for example, 'load',
|
||||
* 'save', 'insert', etc.
|
||||
*/
|
||||
function assertFileHooksCalled($expected) {
|
||||
\Drupal::state()->resetCache();
|
||||
|
@ -66,7 +66,7 @@ abstract class FileManagedTestBase extends WebTestBase {
|
|||
* Assert that a hook_file_* hook was called a certain number of times.
|
||||
*
|
||||
* @param string $hook
|
||||
* String with the hook name, e.g. 'load', 'save', 'insert', etc.
|
||||
* String with the hook name; for instance, 'load', 'save', 'insert', etc.
|
||||
* @param int $expected_count
|
||||
* Optional integer count.
|
||||
* @param string|NULL $message
|
||||
|
|
|
@ -37,7 +37,7 @@ class EntityFileTest extends KernelTestBase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->destination = new TestEntityFile([]);
|
||||
$this->destination->streamWrapperManager = \Drupal::getContainer()->get('stream_wrapper_manager');
|
||||
|
|
|
@ -50,18 +50,18 @@ class MigrateFileTest extends MigrateDrupal6TestBase implements MigrateDumpAlter
|
|||
/**
|
||||
* Asserts a file entity.
|
||||
*
|
||||
* @param integer $fid
|
||||
* The file ID.
|
||||
* @param int $fid
|
||||
* The file ID.
|
||||
* @param string $name
|
||||
* The expected file name.
|
||||
* @param integer $size
|
||||
* The expected file size.
|
||||
* The expected file name.
|
||||
* @param int $size
|
||||
* The expected file size.
|
||||
* @param string $uri
|
||||
* The expected file URI.
|
||||
* The expected file URI.
|
||||
* @param string $type
|
||||
* The expected MIME type.
|
||||
* @param integer $uid
|
||||
* The expected file owner ID.
|
||||
* The expected MIME type.
|
||||
* @param int $uid
|
||||
* The expected file owner ID.
|
||||
*/
|
||||
protected function assertEntity($fid, $name, $size, $uri, $type, $uid) {
|
||||
/** @var \Drupal\file\FileInterface $file */
|
||||
|
|
|
@ -53,22 +53,22 @@ class MigrateFileTest extends MigrateDrupal7TestBase {
|
|||
/**
|
||||
* Tests a single file entity.
|
||||
*
|
||||
* @param integer $id
|
||||
* The file ID.
|
||||
* @param int $id
|
||||
* The file ID.
|
||||
* @param string $name
|
||||
* The expected file name.
|
||||
* The expected file name.
|
||||
* @param string $uri
|
||||
* The expected URI.
|
||||
* The expected URI.
|
||||
* @param string $mime
|
||||
* The expected MIME type.
|
||||
* @param integer $size
|
||||
* The expected file size.
|
||||
* @param integer $created
|
||||
* The expected creation time.
|
||||
* @param integer $changed
|
||||
* The expected modification time.
|
||||
* @param integer $uid
|
||||
* The expected owner ID.
|
||||
* The expected MIME type.
|
||||
* @param int $size
|
||||
* The expected file size.
|
||||
* @param int $created
|
||||
* The expected creation time.
|
||||
* @param int $changed
|
||||
* The expected modification time.
|
||||
* @param int $uid
|
||||
* The expected owner ID.
|
||||
*/
|
||||
protected function assertEntity($id, $name, $uri, $mime, $size, $created, $changed, $uid) {
|
||||
/** @var \Drupal\file\FileInterface $file */
|
||||
|
|
Reference in a new issue