updated drupal core to 7.43

This commit is contained in:
Bachir Soussi Chiadmi
2016-03-16 16:41:44 +01:00
parent 8fb9c70e42
commit b27aabe359
230 changed files with 4138 additions and 2075 deletions

View File

@@ -6,8 +6,8 @@ core = 7.x
files[] = statistics.test
configure = admin/config/system/statistics
; Information added by Drupal.org packaging script on 2015-08-19
version = "7.39"
; Information added by Drupal.org packaging script on 2016-02-24
version = "7.43"
project = "drupal"
datestamp = "1440020197"
datestamp = "1456343506"

View File

@@ -118,10 +118,9 @@ function statistics_node_view($node, $view_mode) {
// Attach Ajax node count statistics if configured.
if (variable_get('statistics_count_content_views', 0) && variable_get('statistics_count_content_views_ajax', 0)) {
if (!empty($node->nid) && $view_mode == 'full' && node_is_page($node) && empty($node->in_preview)) {
$node->content['#attached']['js'] = array(
drupal_get_path('module', 'statistics') . '/statistics.js' => array(
'scope' => 'footer'
),
$statistics = drupal_get_path('module', 'statistics') . '/statistics.js';
$node->content['#attached']['js'][$statistics] = array(
'scope' => 'footer',
);
$settings = array('data' => array('nid' => $node->nid), 'url' => url(drupal_get_path('module', 'statistics') . '/statistics.php'));
$node->content['#attached']['js'][] = array(

View File

@@ -15,17 +15,19 @@ chdir(DRUPAL_ROOT);
include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES);
if (variable_get('statistics_count_content_views', 0) && variable_get('statistics_count_content_views_ajax', 0)) {
$nid = $_POST['nid'];
if (is_numeric($nid)) {
db_merge('node_counter')
->key(array('nid' => $nid))
->fields(array(
'daycount' => 1,
'totalcount' => 1,
'timestamp' => REQUEST_TIME,
))
->expression('daycount', 'daycount + 1')
->expression('totalcount', 'totalcount + 1')
->execute();
if (isset($_POST['nid'])) {
$nid = $_POST['nid'];
if (is_numeric($nid)) {
db_merge('node_counter')
->key(array('nid' => $nid))
->fields(array(
'daycount' => 1,
'totalcount' => 1,
'timestamp' => REQUEST_TIME,
))
->expression('daycount', 'daycount + 1')
->expression('totalcount', 'totalcount + 1')
->execute();
}
}
}