Update core 8.3.0

This commit is contained in:
Rob Davies 2017-04-13 15:53:35 +01:00
parent da7a7918f8
commit cd7a898e66
6144 changed files with 132297 additions and 87747 deletions

View file

@ -9,116 +9,116 @@
* Implements hook_schema().
*/
function search_schema() {
$schema['search_dataset'] = array(
$schema['search_dataset'] = [
'description' => 'Stores items that will be searched.',
'fields' => array(
'sid' => array(
'fields' => [
'sid' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'Search item ID, e.g. node ID for nodes.',
),
'langcode' => array(
],
'langcode' => [
'type' => 'varchar_ascii',
'length' => '12',
'not null' => TRUE,
'description' => 'The {languages}.langcode of the item variant.',
'default' => '',
),
'type' => array(
],
'type' => [
'type' => 'varchar_ascii',
'length' => 64,
'not null' => TRUE,
'description' => 'Type of item, e.g. node.',
),
'data' => array(
],
'data' => [
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
'description' => 'List of space-separated words from the item.',
),
'reindex' => array(
],
'reindex' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'Set to force node reindexing.',
),
),
'primary key' => array('sid', 'langcode', 'type'),
);
],
],
'primary key' => ['sid', 'langcode', 'type'],
];
$schema['search_index'] = array(
$schema['search_index'] = [
'description' => 'Stores the search index, associating words, items and scores.',
'fields' => array(
'word' => array(
'fields' => [
'word' => [
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
'default' => '',
'description' => 'The {search_total}.word that is associated with the search item.',
),
'sid' => array(
],
'sid' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'The {search_dataset}.sid of the searchable item to which the word belongs.',
),
'langcode' => array(
],
'langcode' => [
'type' => 'varchar_ascii',
'length' => '12',
'not null' => TRUE,
'description' => 'The {languages}.langcode of the item variant.',
'default' => '',
),
'type' => array(
],
'type' => [
'type' => 'varchar_ascii',
'length' => 64,
'not null' => TRUE,
'description' => 'The {search_dataset}.type of the searchable item to which the word belongs.',
),
'score' => array(
],
'score' => [
'type' => 'float',
'not null' => FALSE,
'description' => 'The numeric score of the word, higher being more important.',
),
),
'indexes' => array(
'sid_type' => array('sid', 'langcode', 'type'),
),
'foreign keys' => array(
'search_dataset' => array(
],
],
'indexes' => [
'sid_type' => ['sid', 'langcode', 'type'],
],
'foreign keys' => [
'search_dataset' => [
'table' => 'search_dataset',
'columns' => array(
'columns' => [
'sid' => 'sid',
'langcode' => 'langcode',
'type' => 'type',
),
),
),
'primary key' => array('word', 'sid', 'langcode', 'type'),
);
],
],
],
'primary key' => ['word', 'sid', 'langcode', 'type'],
];
$schema['search_total'] = array(
$schema['search_total'] = [
'description' => 'Stores search totals for words.',
'fields' => array(
'word' => array(
'fields' => [
'word' => [
'description' => 'Primary Key: Unique word in the search index.',
'type' => 'varchar',
'length' => 50,
'not null' => TRUE,
'default' => '',
),
'count' => array(
],
'count' => [
'description' => "The count of the word in the index using Zipf's law to equalize the probability distribution.",
'type' => 'float',
'not null' => FALSE,
),
),
'primary key' => array('word'),
);
],
],
'primary key' => ['word'],
];
return $schema;
}
@ -129,7 +129,7 @@ function search_schema() {
* For the Status Report, return information about search index status.
*/
function search_requirements($phase) {
$requirements = array();
$requirements = [];
if ($phase == 'runtime') {
$remaining = 0;
@ -145,11 +145,11 @@ function search_requirements($phase) {
// Use floor() to calculate the percentage, so if it is not quite 100%, it
// will show as 99%, to indicate "almost done".
$percent = ($total > 0 ? floor(100 * $done / $total) : 100);
$requirements['search_status'] = array(
$requirements['search_status'] = [
'title' => t('Search index progress'),
'value' => t('@percent% (@remaining remaining)', array('@percent' => $percent, '@remaining' => $remaining)),
'value' => t('@percent% (@remaining remaining)', ['@percent' => $percent, '@remaining' => $remaining]),
'severity' => REQUIREMENT_INFO,
);
];
}
return $requirements;