diff --git a/core/lib/Drupal/Core/EventSubscriber/SlaveDatabaseIgnoreSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/SlaveDatabaseIgnoreSubscriber.php index 86354ad..dc800b5 100644 --- a/core/lib/Drupal/Core/EventSubscriber/SlaveDatabaseIgnoreSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/SlaveDatabaseIgnoreSubscriber.php @@ -23,17 +23,19 @@ class SlaveDatabaseIgnoreSubscriber implements EventSubscriberInterface { public function checkSlaveServer(GetResponseEvent $event) { // Ignore slave database servers for this request. // - // In Drupal's distributed database structure, new data is written to the master - // and then propagated to the slave servers. This means there is a lag - // between when data is written to the master and when it is available on the slave. - // At these times, we will want to avoid using a slave server temporarily. - // For example, if a user posts a new node then we want to disable the slave - // server for that user temporarily to allow the slave server to catch up. + // In Drupal's distributed database structure, new data is written to the + // master and then propagated to the slave servers. This means there is a + // lag between when data is written to the master and when it is available + // on the slave. At these times, we will want to avoid using a slave server + // temporarily. For example, if a user posts a new node then we want to + // disable the slave server for that user temporarily to allow the slave + // server to catch up. // That way, that user will see their changes immediately while for other - // users we still get the benefits of having a slave server, just with slightly - // stale data. Code that wants to disable the slave server should use the - // db_set_ignore_slave() function to set $_SESSION['ignore_slave_server'] to - // the timestamp after which the slave can be re-enabled. + // users we still get the benefits of having a slave server, just with + // slightly stale data. Code that wants to disable the slave server should + // use the db_set_ignore_slave() function to set + // $_SESSION['ignore_slave_server'] to the timestamp after which the slave + // can be re-enabled. if (isset($_SESSION['ignore_slave_server'])) { if ($_SESSION['ignore_slave_server'] >= REQUEST_TIME) { Database::ignoreTarget('default', 'slave'); diff --git a/core/modules/overlay/lib/Drupal/overlay/EventSubscriber/OverlaySubscriber.php b/core/modules/overlay/lib/Drupal/overlay/EventSubscriber/OverlaySubscriber.php index 4936eaa..320aa52 100644 --- a/core/modules/overlay/lib/Drupal/overlay/EventSubscriber/OverlaySubscriber.php +++ b/core/modules/overlay/lib/Drupal/overlay/EventSubscriber/OverlaySubscriber.php @@ -58,7 +58,7 @@ public function __construct(ContentNegotiation $negotiation, UserData $user_data public function onRequest(GetResponseEvent $event) { $request = $event->getRequest(); if ($this->negotiation->getContentType($request) != 'html') { - // Only act on Html pages. + // Only act on html pages. return; } global $user; @@ -86,8 +86,8 @@ public function onRequest(GetResponseEvent $event) { call_user_func_array('overlay_close_dialog', $_SESSION['overlay_close_dialog']); unset($_SESSION['overlay_close_dialog']); } - // If this page shouldn't be rendered inside the overlay, redirect to the - // parent. + // If this page shouldn't be rendered inside the overlay, redirect to + // the parent. elseif (!path_is_admin($current_path)) { overlay_close_dialog($current_path, array('query' => drupal_get_query_parameters(NULL, array('render')))); } @@ -95,7 +95,8 @@ public function onRequest(GetResponseEvent $event) { // Indicate that we are viewing an overlay child page. overlay_set_mode('child'); - // Unset the render parameter to avoid it being included in URLs on the page. + // Unset the render parameter to avoid it being included in URLs on the + // page. unset($_GET['render']); } // Do not enable the overlay if we already are on an admin page.