Révision b720ea3e
Ajouté par Assos Assos il y a plus de 8 ans
drupal7/sites/all/modules/date/date.install | ||
---|---|---|
19 | 19 |
'views' => TRUE, |
20 | 20 |
); |
21 | 21 |
break; |
22 |
|
|
22 | 23 |
case 'datetime': |
23 | 24 |
$db_columns['value'] = array( |
24 | 25 |
'type' => 'datetime', |
... | ... | |
31 | 32 |
'views' => TRUE, |
32 | 33 |
); |
33 | 34 |
break; |
35 |
|
|
34 | 36 |
default: |
35 | 37 |
$db_columns['value'] = array( |
36 | 38 |
'type' => 'varchar', |
... | ... | |
66 | 68 |
'views' => FALSE, |
67 | 69 |
); |
68 | 70 |
if (!empty($field['settings']['todate'])) { |
69 |
$db_columns['offset2'] = array('type' => 'int', 'not null' => FALSE, 'sortable' => TRUE, 'views' => FALSE); |
|
71 |
$db_columns['offset2'] = array( |
|
72 |
'type' => 'int', |
|
73 |
'not null' => FALSE, |
|
74 |
'sortable' => TRUE, |
|
75 |
'views' => FALSE |
|
76 |
); |
|
70 | 77 |
} |
71 | 78 |
} |
72 | 79 |
if (isset($field['settings']['repeat']) && $field['settings']['repeat'] == 1) { |
... | ... | |
88 | 95 |
} |
89 | 96 |
|
90 | 97 |
/** |
91 |
* Get rid of the individual formatters for each format type, |
|
92 |
* these are now settings in the default formatter. |
|
98 |
* Get rid of the individual formatters for each format type. |
|
99 |
* |
|
100 |
* These are now settings in the default formatter. |
|
93 | 101 |
*/ |
94 | 102 |
function date_update_7000() { |
95 | 103 |
$instances = field_info_instances(); |
... | ... | |
115 | 123 |
} |
116 | 124 |
|
117 | 125 |
/** |
118 |
* Get rid of the separate widgets for repeating dates. The code now handles |
|
119 |
* repeating dates correctly using the regular widgets. |
|
126 |
* Get rid of the separate widgets for repeating dates. |
|
127 |
* |
|
128 |
* The code now handles repeating dates correctly using the regular widgets. |
|
120 | 129 |
*/ |
121 | 130 |
function date_update_7001() { |
122 | 131 |
$query = db_select('field_config_instance', 'fci', array('fetch' => PDO::FETCH_ASSOC)); |
... | ... | |
127 | 136 |
|
128 | 137 |
foreach ($results as $record) { |
129 | 138 |
$instance = unserialize($record['data']); |
130 |
if (in_array($instance['widget']['type'], array('date_popup_repeat', 'date_text_repeat', 'date_select_repeat'))) { |
|
139 |
if (in_array($instance['widget']['type'], array( |
|
140 |
'date_popup_repeat', |
|
141 |
'date_text_repeat', |
|
142 |
'date_select_repeat' |
|
143 |
))) { |
|
131 | 144 |
$instance['widget']['type'] = str_replace('_repeat', '', $instance['widget']['type']); |
132 | 145 |
db_update('field_config_instance') |
133 | 146 |
->fields(array( |
... | ... | |
191 | 204 |
field_cache_clear(); |
192 | 205 |
drupal_set_message(t('Date text widgets have been updated to use an increment of 1.')); |
193 | 206 |
} |
194 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules