Révision 76e2e7c3
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/flag/includes/flag.export.inc | ||
---|---|---|
15 | 15 |
* in hook_flag_default_flags(). |
16 | 16 |
*/ |
17 | 17 |
function flag_export_flags($flags = array(), $module = '', $indent = '') { |
18 |
module_load_include('inc', 'features', 'features.export'); // For features_var_export() (optional). |
|
18 |
// For features_var_export() (optional). |
|
19 |
module_load_include('inc', 'features', 'features.export'); |
|
19 | 20 |
$output = $indent . '$flags = array();' . "\n"; |
20 | 21 |
foreach ($flags as $item) { |
21 | 22 |
if (is_object($item)) { |
... | ... | |
269 | 270 |
if (substr($class, 0, 11) == 'FlagUpdate_') { |
270 | 271 |
// @todo: change this to work with the static class when we drop support |
271 | 272 |
// for PHP 5.2: see commit d5b517. |
272 |
$update_handler = new $class; |
|
273 |
$update_handler = new $class();
|
|
273 | 274 |
// Cast to string, as decimals as array keys seem to be rounded down to |
274 | 275 |
// ints, WTF PHP? |
275 | 276 |
$version = (string) $update_handler->old_api_version; |
... | ... | |
364 | 365 |
} |
365 | 366 |
|
366 | 367 |
// Update show_on_comment and show_on_entity properties to use new view |
367 |
// mode settings. Since the old logic was to show on all view modes, do that. |
|
368 |
// mode settings. Since the old logic was to show on all view modes, do |
|
369 |
// that. |
|
368 | 370 |
if (!empty($flag->show_on_entity) || !empty($flag->show_on_comment)) { |
369 | 371 |
if ($entity_info = entity_get_info($flag->entity_type)) { |
370 | 372 |
foreach ($entity_info['view modes'] as $view_mode => $value) { |
Formats disponibles : Unified diff
Weekly update of contrib modules