Révision d0ed0aa6
Ajouté par Assos Assos il y a presque 4 ans
drupal7/sites/all/modules/webform_validation/webform_validation.rules.inc | ||
---|---|---|
7 | 7 |
|
8 | 8 |
/** |
9 | 9 |
* Get a rule entry. |
10 |
* |
|
11 |
* @deprecated in webform_validation:7.x-1.18 and is removed from webform_validation:7.x-2.0. Use webform_validation_rule_load(). |
|
12 |
* @see https://www.drupal.org/project/webform_validation/issues/3104320 |
|
10 | 13 |
*/ |
11 | 14 |
function webform_validation_get_rule($ruleid) { |
12 |
$result = db_query("SELECT ruleid, rulename, nid, validator, data, error_message, negate, weight FROM {webform_validation_rule} WHERE ruleid = :ruleid", array(':ruleid' => $ruleid), array('fetch' => PDO::FETCH_ASSOC)); |
|
13 |
$rule = $result->fetchAssoc(); |
|
14 |
$rule['components'] = webform_validation_get_rule_components($ruleid, $rule['nid']); |
|
15 |
$rule['negate'] = (bool) $rule['negate']; |
|
16 |
return $rule; |
|
15 |
return webform_validation_rule_load($ruleid); |
|
17 | 16 |
} |
18 | 17 |
|
19 | 18 |
/** |
... | ... | |
124 | 123 |
* The ruleid of the rule to delete. |
125 | 124 |
*/ |
126 | 125 |
function webform_dynamic_delete_rule($ruleid) { |
126 |
$transaction = db_transaction(); |
|
127 | 127 |
// Delete rule. |
128 | 128 |
db_delete('webform_validation_rule') |
129 | 129 |
->condition('ruleid', $ruleid) |
Formats disponibles : Unified diff
Weekly update of contrib modules