Révision a2baadd1
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/webform_validation/webform_validation.install | ||
---|---|---|
58 | 58 |
'not null' => TRUE, |
59 | 59 |
'default' => 0, |
60 | 60 |
), |
61 |
'weight' => array( |
|
62 |
'description' => 'Weight of the rule order.', |
|
63 |
'type' => 'int', |
|
64 |
'not null' => TRUE, |
|
65 |
'unsigned' => FALSE, |
|
66 |
'default' => 0, |
|
67 |
), |
|
61 | 68 |
), |
62 | 69 |
'primary key' => array('ruleid'), |
63 | 70 |
'indexes' => array( |
... | ... | |
104 | 111 |
$range = $row->data; |
105 | 112 |
$range = _webform_validation_update_range_syntax($range); |
106 | 113 |
db_update('webform_validation_rule') |
107 |
->fields(array( |
|
108 |
'data' => $range, |
|
109 |
)) |
|
110 |
->condition('ruleid', $row->ruleid, '=') |
|
111 |
->execute(); |
|
114 |
->fields(array(
|
|
115 |
'data' => $range,
|
|
116 |
))
|
|
117 |
->condition('ruleid', $row->ruleid, '=')
|
|
118 |
->execute();
|
|
112 | 119 |
} |
113 | 120 |
if ($has_numeric_validator) { |
114 |
$warning_message = t('The numeric validation rule range syntax has changed with this release. Existing numeric validation rules were found and updated. Please verify that they still work as expected!'); |
|
115 |
drupal_set_message($warning_message, 'warning'); |
|
121 |
drupal_set_message(t('The numeric validation rule range syntax has changed with this release. Existing numeric validation rules were found and updated. Please verify that they still work as expected!'), 'warning'); |
|
116 | 122 |
} |
117 | 123 |
return $ret; |
118 | 124 |
} |
... | ... | |
177 | 183 |
} |
178 | 184 |
} |
179 | 185 |
} |
186 |
|
|
187 |
/** |
|
188 |
* Rename oneoftwo and oneofseveral to someofseveral and default data to 1. |
|
189 |
*/ |
|
190 |
function webform_validation_update_7104() { |
|
191 |
db_update('webform_validation_rule') |
|
192 |
->fields(array( |
|
193 |
'validator' => 'someofseveral', |
|
194 |
'data' => 1, |
|
195 |
)) |
|
196 |
->condition('validator', array('oneoftwo', 'oneofseveral'), 'IN') |
|
197 |
->execute(); |
|
198 |
} |
|
199 |
|
|
200 |
/** |
|
201 |
* Add a weight field to webform_validation rules, so they can be sorted. |
|
202 |
*/ |
|
203 |
function webform_validation_update_7105() { |
|
204 |
$spec = array( |
|
205 |
'description' => 'Weight of the rule order.', |
|
206 |
'type' => 'int', |
|
207 |
'not null' => TRUE, |
|
208 |
'unsigned' => FALSE, |
|
209 |
'default' => 0, |
|
210 |
); |
|
211 |
db_add_field('webform_validation_rule', 'weight', $spec); |
|
212 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules