non security modules update

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-20 16:32:07 +02:00
parent 6a8d30db08
commit 37fbabab56
466 changed files with 32690 additions and 9652 deletions

View File

@@ -45,11 +45,11 @@ function features_populate($info, $module_name) {
* @return fully populated $export array.
*/
function _features_populate($pipe, &$export, $module_name = '', $reset = FALSE) {
static $processed = array();
features_include();
if ($reset) {
$processed = array();
drupal_static_reset(__FUNCTION__);
}
$processed = &drupal_static(__FUNCTION__, array());
features_include();
foreach ($pipe as $component => $data) {
// Convert already defined items to dependencies.
// _features_resolve_dependencies($data, $export, $module_name, $component);
@@ -385,10 +385,7 @@ function features_export_render($export, $module_name, $reset = FALSE) {
* Detect differences between DB and code components of a feature.
*/
function features_detect_overrides($module) {
static $cache;
if (!isset($cache)) {
$cache = array();
}
$cache = &drupal_static(__FUNCTION__, array());
if (!isset($cache[$module->name])) {
// Rebuild feature from .info file description and prepare an export from current DB state.
$export = features_populate($module->info, $module->name);
@@ -713,10 +710,10 @@ function features_semaphore($op, $component) {
* Get normal objects for a given module/component pair.
*/
function features_get_normal($component, $module_name, $reset = FALSE) {
static $cache;
if (!isset($cache) || $reset) {
$cache = array();
if ($reset) {
drupal_static_reset(__FUNCTION__);
}
$cache = &drupal_static(__FUNCTION__, array());
if (!isset($cache[$module_name][$component])) {
features_include();
$code = NULL;
@@ -746,7 +743,7 @@ function features_get_normal($component, $module_name, $reset = FALSE) {
* Get defaults for a given module/component pair.
*/
function features_get_default($component, $module_name = NULL, $alter = TRUE, $reset = FALSE) {
static $cache = array();
$cache = &drupal_static(__FUNCTION__, array());
$alter = !empty($alter); // ensure $alter is a true/false boolean
features_include();
features_include_defaults($component);
@@ -820,7 +817,7 @@ function features_get_default($component, $module_name = NULL, $alter = TRUE, $r
* Get a map of components to their providing modules.
*/
function features_get_default_map($component, $attribute = NULL, $callback = NULL, $reset = FALSE) {
static $map = array();
$map = &drupal_static(__FUNCTION__, array());
global $features_ignore_conflicts;
if ($features_ignore_conflicts) {
@@ -866,10 +863,10 @@ function features_get_default_map($component, $attribute = NULL, $callback = NUL
* Retrieve an array of features/components and their current states.
*/
function features_get_component_states($features = array(), $rebuild_only = TRUE, $reset = FALSE) {
static $cache;
if (!isset($cache) || $reset) {
$cache = array();
if ($reset) {
drupal_static_reset(__FUNCTION__);
}
$cache = &drupal_static(__FUNCTION__, array());
$all_features = features_get_features();
$features = !empty($features) ? $features : array_keys($all_features);