Révision a5ba142b
Ajouté par Assos Assos il y a presque 6 ans
drupal7/sites/all/modules/votingapi/votingapi.module | ||
---|---|---|
191 | 191 |
// If the calling function didn't explicitly set criteria for vote deletion, |
192 | 192 |
// build up the delete queries here. |
193 | 193 |
foreach ($votes as $vote) { |
194 |
$tmp = $vote + votingapi_current_user_identifier(); |
|
194 |
$identifier_info = votingapi_current_user_identifier(); |
|
195 |
// Make sure we're dealing with an array to avoid errors. |
|
196 |
if (is_array($vote) && is_array($identifier_info)) { |
|
197 |
$tmp = $vote + $identifier_info; |
|
198 |
} |
|
195 | 199 |
if (isset($tmp['value'])) { |
196 | 200 |
unset($tmp['value']); |
197 | 201 |
} |
... | ... | |
657 | 661 |
*/ |
658 | 662 |
function _votingapi_prep_vote(&$vote) { |
659 | 663 |
global $user; |
660 |
if (empty($vote['prepped'])) { |
|
664 |
if (is_array($vote) && empty($vote['prepped'])) {
|
|
661 | 665 |
$vote += array( |
662 | 666 |
'entity_type' => 'node', |
663 | 667 |
'value_type' => 'percent', |
Formats disponibles : Unified diff
Weekly update of contrib modules