contrib modules security updates

This commit is contained in:
Bachir Soussi Chiadmi
2016-10-13 12:10:40 +02:00
parent ffd758abc9
commit 747127f643
732 changed files with 67976 additions and 23207 deletions

View File

@@ -45,7 +45,7 @@ class FeaturesUserTestCase extends DrupalWebTestCase {
module_load_include('inc', 'features', 'features.export');
$components = array_filter(array(
'field' => 'field',
'field_instance' => 'field',
'filter' => 'filter',
'image' => 'image',
'node' => 'node',
@@ -85,7 +85,7 @@ class FeaturesUserTestCase extends DrupalWebTestCase {
}
}
protected function _test_field($op = 'load') {
protected function _test_field_instance($op = 'load') {
switch ($op) {
case 'load':
return field_info_instance('node', 'field_features_test', 'features_test');
@@ -218,7 +218,7 @@ class FeaturesEnableTestCase extends DrupalWebTestCase {
/**
* Tests intergration of ctools for features.
* Tests integration of ctools for features.
*/
class FeaturesCtoolsIntegrationTest extends DrupalWebTestCase {
protected $profile = 'testing';
@@ -266,6 +266,13 @@ class FeaturesCtoolsIntegrationTest extends DrupalWebTestCase {
$this->assertFalse(function_exists($function), 'Chaos tools functions for ' . $module . ' do not exist while it is disabled.');
// Module enable will trigger declaring the new functions.
module_enable(array($module));
}
// CTools hooks only created when there is an actual feature exportable
// enabled.
module_enable(array('features_test'));
foreach ($try as $module) {
if (module_exists($module)) {
$function_exists = function_exists($function);
if ($function_exists) {
@@ -280,3 +287,43 @@ class FeaturesCtoolsIntegrationTest extends DrupalWebTestCase {
}
}
}
/**
* Test detecting modules as features.
*/
class FeaturesDetectionTestCase extends DrupalWebTestCase {
protected $profile = 'testing';
/**
* Test info.
*/
public static function getInfo() {
return array(
'name' => t('Feature Detection tests'),
'description' => t('Run tests for detecting items as features.') ,
'group' => t('Features'),
);
}
/**
* Set up test.
*/
public function setUp() {
parent::setUp(array(
'features',
));
}
/**
* Run test.
*/
public function test() {
module_load_include('inc', 'features', 'features.export');
// First test that features_populate inserts the features api key.
$export = features_populate(array(), array(), 'features_test_empty_fake');
$this->assertTrue(!empty($export['features']['features_api']) && key($export['features']['features_api']) == 'api:' . FEATURES_API, 'Features API key added to new export.');
$this->assertTrue((bool)features_get_features('features_test'), 'Features test recognized as a feature.');
$this->assertFalse((bool)features_get_features('features'), 'Features module not recognized as a feature.');
}
}

View File

@@ -1,104 +0,0 @@
<?php
/**
* @file
* features_test.features.field.inc
*/
/**
* Implements hook_field_default_fields().
*/
function features_test_field_default_fields() {
$fields = array();
// Exported field: 'node-features_test-field_features_test'
$fields['node-features_test-field_features_test'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'field_features_test',
'foreign keys' => array(
'format' => array(
'columns' => array(
'format' => 'format',
),
'table' => 'filter_format',
),
),
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'module' => 'text',
'settings' => array(
'max_length' => '255',
),
'translatable' => '1',
'type' => 'text',
),
'field_instance' => array(
'bundle' => 'features_test',
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 0,
),
'full' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'print' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'rss' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_features_test',
'label' => 'Test',
'required' => 0,
'settings' => array(
'text_processing' => '0',
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'text',
'settings' => array(
'size' => '60',
),
'type' => 'text_textfield',
'weight' => '-4',
),
),
);
// Translatables
// Included for use with string extractors like potx.
t('Test');
return $fields;
}

View File

@@ -0,0 +1,43 @@
<?php
/**
* @file
* features_test.features.field_base.inc
*/
/**
* Implements hook_field_default_field_bases().
*/
function features_test_field_default_field_bases() {
$field_bases = array();
// Exported field_base: 'field_features_test'
$field_bases['field_features_test'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_features_test',
'foreign keys' => array(
'format' => array(
'columns' => array(
'format' => 'format',
),
'table' => 'filter_format',
),
),
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'locked' => 0,
'module' => 'text',
'settings' => array(
'max_length' => 255,
),
'translatable' => 1,
'type' => 'text',
);
return $field_bases;
}

View File

@@ -0,0 +1,76 @@
<?php
/**
* @file
* features_test.features.field_instance.inc
*/
/**
* Implements hook_field_default_field_instances().
*/
function features_test_field_default_field_instances() {
$field_instances = array();
// Exported field_instance: 'node-features_test-field_features_test'
$field_instances['node-features_test-field_features_test'] = array(
'bundle' => 'features_test',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 0,
),
'full' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'print' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'rss' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_features_test',
'label' => 'Test',
'required' => 0,
'settings' => array(
'text_processing' => 0,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'text',
'settings' => array(
'size' => 60,
),
'type' => 'text_textfield',
'weight' => -4,
),
);
// Translatables
// Included for use with string extractors like potx.
t('Test');
return $field_instances;
}

View File

@@ -10,22 +10,22 @@
function features_test_filter_default_formats() {
$formats = array();
// Exported format: features_test
// Exported format: features_test.
$formats['features_test'] = array(
'format' => 'features_test',
'name' => 'features_test',
'cache' => '1',
'status' => '1',
'weight' => '0',
'cache' => 1,
'status' => 1,
'weight' => 0,
'filters' => array(
'filter_autop' => array(
'weight' => '10',
'status' => '1',
'weight' => 10,
'status' => 1,
'settings' => array(),
),
'filter_html' => array(
'weight' => '10',
'status' => '1',
'weight' => 10,
'status' => 1,
'settings' => array(
'allowed_html' => '<a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>',
'filter_html_help' => 1,
@@ -33,20 +33,20 @@ function features_test_filter_default_formats() {
),
),
'filter_htmlcorrector' => array(
'weight' => '10',
'status' => '1',
'weight' => 10,
'status' => 1,
'settings' => array(),
),
'filter_html_escape' => array(
'weight' => '10',
'status' => '1',
'weight' => 10,
'status' => 1,
'settings' => array(),
),
'filter_url' => array(
'weight' => '10',
'status' => '1',
'weight' => 10,
'status' => 1,
'settings' => array(
'filter_url_length' => '72',
'filter_url_length' => 72,
),
),
),

View File

@@ -18,7 +18,7 @@ function features_test_ctools_plugin_api() {
* Implements hook_views_api().
*/
function features_test_views_api() {
return array("version" => "3.0");
return array("api" => "3.0");
}
/**
@@ -27,27 +27,20 @@ function features_test_views_api() {
function features_test_image_default_styles() {
$styles = array();
// Exported image style: features_test
// Exported image style: features_test.
$styles['features_test'] = array(
'name' => 'features_test',
'effects' => array(
2 => array(
'label' => 'Scale',
'help' => 'Scaling will maintain the aspect-ratio of the original image. If only a single dimension is specified, the other dimension will be calculated.',
'effect callback' => 'image_scale_effect',
'dimensions callback' => 'image_scale_dimensions',
'form callback' => 'image_scale_form',
'summary theme' => 'image_scale_summary',
'module' => 'image',
'name' => 'image_scale',
'data' => array(
'width' => '100',
'height' => '100',
'width' => 100,
'height' => 100,
'upscale' => 0,
),
'weight' => '1',
'weight' => 1,
),
),
'label' => 'features_test',
);
return $styles;

View File

@@ -13,9 +13,9 @@ function features_test_taxonomy_default_vocabularies() {
'name' => 'Taxonomy Features Test',
'machine_name' => 'taxonomy_features_test',
'description' => 'Taxonomy vocabulary',
'hierarchy' => '0',
'hierarchy' => 0,
'module' => 'taxonomy',
'weight' => '0',
'weight' => 0,
'rdf_mapping' => array(
'rdftype' => array(
0 => 'skos:ConceptScheme',

View File

@@ -14,8 +14,8 @@ function features_test_user_default_permissions() {
$permissions['create features_test content'] = array(
'name' => 'create features_test content',
'roles' => array(
0 => 'anonymous user',
1 => 'authenticated user',
'anonymous user' => 'anonymous user',
'authenticated user' => 'authenticated user',
),
'module' => 'node',
);

View File

@@ -10,19 +10,20 @@ dependencies[] = taxonomy
dependencies[] = views
features[ctools][] = strongarm:strongarm:1
features[ctools][] = views:views_default:3.0
features[features_api][] = api:1
features[field][] = node-features_test-field_features_test
features[features_api][] = api:2
features[field_base][] = field_features_test
features[field_instance][] = node-features_test-field_features_test
features[filter][] = features_test
features[image][] = features_test
features[node][] = features_test
features[taxonomy][] = taxonomy_features_test
features[user_permission][] = create features_test content
features[views_view][] = features_test
hidden = TRUE
hidden = 1
; Information added by drupal.org packaging script on 2012-12-08
version = "7.x-2.0-beta1+5-dev"
; Information added by Drupal.org packaging script on 2016-04-18
version = "7.x-2.10"
core = "7.x"
project = "features"
datestamp = "1354928180"
datestamp = "1461011641"

View File

@@ -10,7 +10,7 @@
function features_test_views_default_views() {
$export = array();
$view = new view;
$view = new view();
$view->name = 'features_test';
$view->description = 'Test view provided by Features testing module.';
$view->tag = 'testing';
@@ -23,6 +23,7 @@ function features_test_views_default_views() {
/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['title'] = 'Test';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';