security updates

have to check views and entityreference for custom patches
This commit is contained in:
Bachir Soussi Chiadmi
2015-04-19 20:45:16 +02:00
parent 802ec0c6f3
commit b3221c71e2
516 changed files with 14267 additions and 7349 deletions

View File

@@ -214,7 +214,12 @@ function ctools_plugin_api_get_hook($owner, $api) {
function ctools_get_plugins($module, $type, $id = NULL) {
// Store local caches of plugins and plugin info so we don't have to do full
// lookups everytime.
$plugins = &drupal_static('ctools_plugins', array());
static $drupal_static_fast;
if (!isset($drupal_static_fast)) {
$drupal_static_fast['plugins'] = &drupal_static('ctools_plugins', array());
}
$plugins = &$drupal_static_fast['plugins'];
$info = ctools_plugin_get_plugin_type_info();
// Bail out noisily if an invalid module/type combination is requested.
@@ -343,8 +348,13 @@ function ctools_get_plugins($module, $type, $id = NULL) {
* name and each inner array keyed on plugin type name.
*/
function ctools_plugin_get_plugin_type_info($flush = FALSE) {
$info_loaded = &drupal_static('ctools_plugin_type_info_loaded', FALSE);
$all_type_info = &drupal_static('ctools_plugin_type_info', array());
static $drupal_static_fast;
if (!isset($drupal_static_fast)) {
$drupal_static_fast['info_loaded'] = &drupal_static('ctools_plugin_type_info_loaded', FALSE);
$drupal_static_fast['all_type_info'] = &drupal_static('ctools_plugin_type_info', array());
}
$info_loaded = &$drupal_static_fast['info_loaded'];
$all_type_info = &$drupal_static_fast['all_type_info'];
// Only trigger info loading once.
if ($info_loaded && !$flush) {
@@ -418,25 +428,15 @@ function ctools_plugin_load_includes($info, $filename = NULL) {
// store static of plugin arrays for reference because they can't be reincluded.
static $plugin_arrays = array();
// If we're being asked for all plugins of a type, skip any caching
// we may have done because this is an admin task and it's ok to
// spend the extra time.
if (!isset($filename)) {
$all_files[$info['module']][$info['type']] = NULL;
}
if (!isset($all_files[$info['module']][$info['type']])) {
// If a filename was set, we will try to load our list of files from
// cache. This is considered normal operation and we try to reduce
// the time spent finding files.
if (isset($filename)) {
$cache = cache_get("ctools_plugin_files:$info[module]:$info[type]");
if ($cache) {
$all_files[$info['module']][$info['type']] = $cache->data;
}
$cache = cache_get("ctools_plugin_files:$info[module]:$info[type]");
if ($cache) {
$all_files[$info['module']][$info['type']] = $cache->data;
}
if (!isset($all_files[$info['module']][$info['type']])) {
// Do not attempt any file scan even if the cached entry was empty.
// A NULL entry here would mean the plugin just does not exists, and we
// cannot afford to run file scan on production sites normal run.
elseif (!isset($all_files[$info['module']][$info['type']])) {
$all_files[$info['module']][$info['type']] = array();
// Load all our plugins.
$directories = ctools_plugin_get_directories($info);
@@ -678,7 +678,7 @@ function ctools_plugin_process($info, $module, $identifier, $path, $file = NULL,
if (!function_exists($function)) {
return NULL;
}
$result = $function();
$result = $function($info);
if (!isset($result) || !is_array($result)) {
return NULL;
}