Révision a45e4bc1
Ajouté par Assos Assos il y a environ 9 ans
drupal7/sites/all/modules/webform/views/webform_handler_field_submission_count.inc | ||
---|---|---|
37 | 37 |
global $user; |
38 | 38 |
|
39 | 39 |
$output = NULL; |
40 |
if ($this->count_type == 'node' && in_array($values->{$this->aliases['type']}, webform_variable_get('webform_node_types'))) {
|
|
40 |
if ($this->count_type == 'node' && variable_get('webform_node_' . $values->{$this->aliases['type']}, FALSE)) {
|
|
41 | 41 |
module_load_include('inc', 'webform', 'includes/webform.submissions'); |
42 | 42 |
$node = node_load($values->{$this->aliases['nid']}); |
43 | 43 |
if (webform_results_access($node, $user)) { |
44 | 44 |
$count = webform_get_submission_count($node->nid); |
45 | 45 |
$output = l($count, "node/$node->nid/webform-results"); |
46 | 46 |
} |
47 |
else { |
|
47 |
elseif (webform_submission_access($node, NULL, 'list', $user)) {
|
|
48 | 48 |
$count = webform_get_submission_count($node->nid, $user->uid); |
49 | 49 |
$output = l($count, "node/$node->nid/submissions"); |
50 | 50 |
} |
51 |
else { |
|
52 |
$output = webform_get_submission_count($node->nid); |
|
53 |
} |
|
51 | 54 |
} |
52 | 55 |
elseif ($this->count_type == 'users') { |
53 | 56 |
$output = db_select('webform_submissions') |
Formats disponibles : Unified diff
Update webform to 4.10