Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663
This commit is contained in:
parent
eb34d130a8
commit
f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions
|
@ -1,6 +1,6 @@
|
|||
ban.admin_page:
|
||||
title: 'IP address bans'
|
||||
description: 'Manage banned IP addresses.'
|
||||
description: 'Ban visits from specific IP addresses.'
|
||||
route_name: ban.admin_page
|
||||
weight: 10
|
||||
parent: user.admin_index
|
||||
|
|
|
@ -15,11 +15,11 @@ function ban_help($route_name, RouteMatchInterface $route_match) {
|
|||
case 'help.page.ban':
|
||||
$output = '';
|
||||
$output .= '<h3>' . t('About') . '</h3>';
|
||||
$output .= '<p>' . t('The Ban module allows administrators to ban visits to their site from individual IP addresses. For more information, see <a href="!url">the online documentation for the Ban module</a>.', array('!url' => 'https://www.drupal.org/documentation/modules/ban')) . '</p>';
|
||||
$output .= '<p>' . t('The Ban module allows administrators to ban visits to their site from individual IP addresses. For more information, see the <a href=":url">online documentation for the Ban module</a>.', array(':url' => 'https://www.drupal.org/documentation/modules/ban')) . '</p>';
|
||||
$output .= '<h3>' . t('Uses') . '</h3>';
|
||||
$output .= '<dl>';
|
||||
$output .= '<dt>' . t('Banning IP addresses') . '</dt>';
|
||||
$output .= '<dd>' . t('Administrators can enter IP addresses to ban on the <a href="!bans">IP address bans</a> page.', array('!bans' => \Drupal::url('ban.admin_page'))) . '</dd>';
|
||||
$output .= '<dd>' . t('Administrators can enter IP addresses to ban on the <a href=":bans">IP address bans</a> page.', array(':bans' => \Drupal::url('ban.admin_page'))) . '</dd>';
|
||||
$output .= '</dl>';
|
||||
return $output;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
id: d7_blocked_ips
|
||||
label: Drupal 7 blocked IPs
|
||||
label: Blocked IPs
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
source:
|
||||
|
|
|
@ -50,7 +50,7 @@ class BanMiddleware implements HttpKernelInterface {
|
|||
public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) {
|
||||
$ip = $request->getClientIp();
|
||||
if ($this->banIpManager->isBanned($ip)) {
|
||||
return new Response(SafeMarkup::format('Sorry @ip has been banned', ['@ip' => $ip]), 403);
|
||||
return new Response(SafeMarkup::format('@ip has been banned', ['@ip' => $ip]), 403);
|
||||
}
|
||||
return $this->httpKernel->handle($request, $type, $catch);
|
||||
}
|
||||
|
|
Reference in a new issue