updated core to 8.6.1 via composer

This commit is contained in:
2018-09-12 13:58:26 +02:00
parent a9a219f2ed
commit ea56b9fba3
4443 changed files with 112098 additions and 40708 deletions
@@ -95,7 +95,7 @@ class StatisticsPopularBlock extends BlockBase implements ContainerFactoryPlugin
return [
'top_day_num' => 0,
'top_all_num' => 0,
'top_last_num' => 0
'top_last_num' => 0,
];
}
@@ -81,15 +81,24 @@ class NodeCounter extends DestinationBase implements ContainerFactoryPluginInter
* {@inheritdoc}
*/
public function import(Row $row, array $old_destination_id_values = []) {
$nid = $row->getDestinationProperty('nid');
$daycount = $row->getDestinationProperty('daycount');
$totalcount = $row->getDestinationProperty('totalcount');
$timestamp = $row->getDestinationProperty('timestamp');
$this->connection
->insert('node_counter')
->merge('node_counter')
->key('nid', $nid)
->fields([
'nid' => $row->getDestinationProperty('nid'),
'daycount' => $row->getDestinationProperty('daycount'),
'totalcount' => $row->getDestinationProperty('totalcount'),
'timestamp' => $row->getDestinationProperty('timestamp'),
'daycount' => $daycount,
'totalcount' => $totalcount,
'timestamp' => $timestamp,
])
->expression('daycount', 'daycount + :daycount', [':daycount' => $daycount])
->expression('totalcount', 'totalcount + :totalcount', [':totalcount' => $totalcount])
->expression('timestamp', 'CASE WHEN timestamp > :timestamp THEN timestamp ELSE :timestamp END', [':timestamp' => $timestamp])
->execute();
return [$row->getDestinationProperty('nid')];
}
@@ -23,9 +23,9 @@ class StatisticsViewsResult {
protected $timestamp;
public function __construct($total_count, $day_count, $timestamp) {
$this->totalCount = $total_count;
$this->dayCount = $day_count;
$this->timestamp = $timestamp;
$this->totalCount = (int) $total_count;
$this->dayCount = (int) $day_count;
$this->timestamp = (int) $timestamp;
}
/**
@@ -37,7 +37,6 @@ class StatisticsViewsResult {
return $this->totalCount;
}
/**
* Total number of times the entity has been viewed "today".
*
@@ -47,7 +46,6 @@ class StatisticsViewsResult {
return $this->dayCount;
}
/**
* Timestamp of when the entity was last viewed.
*