security update for contrib modules
This commit is contained in:
@@ -103,7 +103,6 @@ function menu_custom_features_export_render($module, $data) {
|
||||
$code[] = features_translatables_export($translatables, ' ');
|
||||
}
|
||||
|
||||
$code[] = '';
|
||||
$code[] = ' return $menus;';
|
||||
$code = implode("\n", $code);
|
||||
return array('menu_default_menu_custom' => $code);
|
||||
@@ -248,16 +247,16 @@ function menu_links_features_export_render($module, $data, $export = NULL) {
|
||||
unset($link['plid']);
|
||||
unset($link['mlid']);
|
||||
|
||||
$code[] = " // Exported menu link: {$new_identifier}";
|
||||
$code[] = " // Exported menu link: {$new_identifier}.";
|
||||
$code[] = " \$menu_links['{$new_identifier}'] = ". features_var_export($link, ' ') .";";
|
||||
$translatables[] = $link['link_title'];
|
||||
}
|
||||
}
|
||||
$code[] = '';
|
||||
if (!empty($translatables)) {
|
||||
$code[] = features_translatables_export($translatables, ' ');
|
||||
}
|
||||
|
||||
$code[] = '';
|
||||
$code[] = ' return $menu_links;';
|
||||
$code = implode("\n", $code);
|
||||
return array('menu_default_menu_links' => $code);
|
||||
@@ -316,6 +315,7 @@ function menu_links_features_rebuild_ordered($menu_links, $reset = FALSE) {
|
||||
foreach ($unordered as $link) {
|
||||
$identifier = menu_links_features_identifier($link);
|
||||
$ordered[$identifier] = 0;
|
||||
$all_links[$identifier] = $link;
|
||||
}
|
||||
asort($ordered);
|
||||
}
|
||||
@@ -420,8 +420,12 @@ function features_menu_link_load($identifier) {
|
||||
* Returns a lowercase clean string with only letters, numbers and dashes
|
||||
*/
|
||||
function features_clean_title($str) {
|
||||
return strtolower(preg_replace_callback('/(\s)|([^a-zA-Z\-0-9])/i', create_function(
|
||||
'$matches',
|
||||
'return $matches[1]?"-":"";'
|
||||
), $str));
|
||||
return strtolower(preg_replace_callback('/(\s)|([^a-zA-Z\-0-9])/i', '_features_clean_title', $str));
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function for preg_replace_callback() to clean a string.
|
||||
*/
|
||||
function _features_clean_title($matches) {
|
||||
return $matches[1] ? '-' : '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user