@@ -214,6 +214,8 @@ |
||
| 214 | 214 | |
| 215 | 215 | /** |
| 216 | 216 | * Initialize the global pager variables for use in a mongodb_watchdog event list. |
| 217 | + * @param integer $element |
|
| 218 | + * @param integer $limit |
|
| 217 | 219 | */ |
| 218 | 220 | function mongodb_watchdog_pager_init($element, $limit, $total) { |
| 219 | 221 | global $pager_page_array, $pager_total, $pager_total_items; |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | ->find(mongodb_watchdog_build_filter_query()) |
| 97 | 97 | ->count(); |
| 98 | 98 | $pager_total[0] = ceil($pager_total_items[0] / $per_page); |
| 99 | - $pager_page_array[0] = max(0, min((int) $pager_page_array[0], ((int)$pager_total[0]) - 1)); |
|
| 99 | + $pager_page_array[0] = max(0, min((int) $pager_page_array[0], ((int) $pager_total[0]) - 1)); |
|
| 100 | 100 | $pager_limits[0] = $per_page; |
| 101 | 101 | $build['pager'] = array( |
| 102 | 102 | '#theme' => 'pager', |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | } |
| 227 | 227 | $pager_total_items[$element] = $total; |
| 228 | 228 | $pager_total[$element] = ceil($pager_total_items[$element] / $limit); |
| 229 | - $pager_page_array[$element] = max(0, min((int)$pager_page_array[$element], ((int)$pager_total[$element]) - 1)); |
|
| 229 | + $pager_page_array[$element] = max(0, min((int) $pager_page_array[$element], ((int) $pager_total[$element]) - 1)); |
|
| 230 | 230 | return isset($pager_page_array[$element]) ? $pager_page_array[$element] : 0; |
| 231 | 231 | } |
| 232 | 232 | |
@@ -10,9 +10,7 @@ |
||
| 10 | 10 | use Drupal\Component\Utility\Unicode; |
| 11 | 11 | use Drupal\Core\DependencyInjection\ContainerInjectionInterface; |
| 12 | 12 | use Drupal\Core\Url; |
| 13 | -use Drupal\mongodb\Connection; |
|
| 14 | 13 | use Drupal\mongodb_watchdog\Logger; |
| 15 | -use Psr\Log\LoggerInterface; |
|
| 16 | 14 | use Symfony\Component\DependencyInjection\ContainerInterface; |
| 17 | 15 | |
| 18 | 16 | /** |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | if (!function_exists('configure_mongodb')) { |
| 10 | - function configure_mongodb(\Drupal\Core\Site\Settings &$settings) { |
|
| 10 | + function configure_mongodb(\Drupal\Core\Site\Settings & $settings) { |
|
| 11 | 11 | $settings['mongodb'] = [ |
| 12 | 12 | 'clients' => [ |
| 13 | 13 | // Client alias => constructor parameters. |