Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentTorregrosa committed Aug 24, 2017
2 parents 0951acb + eef217a commit ee3f2c1
Show file tree
Hide file tree
Showing 86 changed files with 839 additions and 260 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ files[] = tests/entityreference.admin.test
files[] = tests/entityreference.feeds.test
files[] = tests/entityreference.entity_translation.test

; Information added by Drupal.org packaging script on 2017-05-23
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2017-08-16
version = "7.x-1.5"
core = "7.x"
project = "entityreference"
datestamp = "1495557187"
datestamp = "1502895850"

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

define('ENTITYREFERENCE_DENIED', '- Restricted access -');

/**
* @file
* Entityreference primary module file.
Expand Down Expand Up @@ -1106,10 +1108,14 @@ function entityreference_autocomplete_callback_get_matches($type, $field, $insta
if (isset($tag_last)) {
// Get an array of matching entities.
$entity_labels = $handler->getReferencableEntities($tag_last, $instance['widget']['settings']['match_operator'], 10);

$denied_label = t(ENTITYREFERENCE_DENIED);
// Loop through the products and convert them into autocomplete output.
foreach ($entity_labels as $values) {
foreach ($values as $entity_id => $label) {
// Never autocomplete entities that aren't accessible.
if ($label == $denied_label) {
continue;
}
$key = "$label ($entity_id)";
// Strip starting/trailing white spaces, line breaks and tags.
$key = preg_replace('/\s\s+/', ' ', str_replace("\n", '', trim(decode_entities(strip_tags($key)))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ core = 7.x
package = Fields
dependencies[] = entityreference

; Information added by Drupal.org packaging script on 2017-05-23
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2017-08-16
version = "7.x-1.5"
core = "7.x"
project = "entityreference"
datestamp = "1495557187"
datestamp = "1502895850"

Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ protected function reAlterQuery(SelectQueryInterface $query, $tag, $base_table)
*/
public function getLabel($entity) {
$target_type = $this->field['settings']['target_type'];
return entity_access('view', $target_type, $entity) ? entity_label($target_type, $entity) : t('- Restricted access -');
return entity_access('view', $target_type, $entity) ? entity_label($target_type, $entity) : t(ENTITYREFERENCE_DENIED);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class EntityReferenceHandlersTestCase extends DrupalWebTestCase {
),
'result' => array(
'user' => array(
$users['admin']->uid => '- Restricted access -',
$users['admin']->uid => ENTITYREFERENCE_DENIED,
$users['non_admin']->uid => $user_labels['non_admin'],
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ dependencies[] = feeds
dependencies[] = feeds_ui
dependencies[] = entityreference

; Information added by Drupal.org packaging script on 2017-05-23
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2017-08-16
version = "7.x-1.5"
core = "7.x"
project = "entityreference"
datestamp = "1495557187"
datestamp = "1502895850"

16 changes: 16 additions & 0 deletions www7/sites/all/modules/contrib/metatag/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
Metatag 7.x-1.22, 2017-07-03
----------------------------
#2853699 by DamienMcKenna: Drupal core 7.40 is the minimum version supported.
#2857982 by arosboro: Fixed tests due to changes in Entity Translation.
#2864524 by JamesK: Improve field description for the abstract meta tag.
#2868750 by DamienMcKenna: List Metatag Cxense as a related module.
#2882048 by jyraya: i18n integration shouldn't assume a tag has a group.
#2882703 by smustgrave: module_load_include() doesn't work quite as intended if
the module is not installed.
#2864834 by DamienMcKenna: Added a note to update script 7114 to note that
output caching has been disabled.
#2297647 by greggles, DamienMcKenna: Run views_invalidate_cache() when
metatag_views is disabled.
#2857088 by arosboro: Fixed parsing of percentages in URLs in Metatag:Panels.


Metatag 7.x-1.21, 2017-02-15
----------------------------
#2844504 by DamienMcKenna: Add project names to all dependencies.
Expand Down
6 changes: 5 additions & 1 deletion www7/sites/all/modules/contrib/metatag/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ that is used within social networks when visitors link to your site,
particularly the Open Graph submodule for use with Facebook, Pinterest,
LinkedIn, etc (see below).

This version of the module only works with Drupal 7.28 and newer.
This version of the module only works with Drupal 7.40 and newer.

For additional information, see the online documentation:
https://www.drupal.org/docs/7/modules/metatag
Expand Down Expand Up @@ -382,6 +382,10 @@ functionality:
https://www.drupal.org/project/parsely
Automatically generates meta tags for the Parse.ly service.

* Metatag Cxense
https://www.drupal.org/project/metatag_cxense
Adds support for the Cxense meta tags used by their DMP and Insight services.


Credits / contact
--------------------------------------------------------------------------------
Expand Down
11 changes: 5 additions & 6 deletions www7/sites/all/modules/contrib/metatag/metatag.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ description = "Adds support and an API to implement meta tags."
package = SEO
core = 7.x

; This requires Drupal 7.28 or newer as it fixes the [node:summary] token that
; was previously broken.
dependencies[] = drupal:system (>= 7.28)
; This requires Drupal 7.40 because of the project:module dependency structure.
dependencies[] = drupal:system (>= 7.40)

; CTools is required.
dependencies[] = ctools:ctools
Expand Down Expand Up @@ -105,9 +104,9 @@ files[] = tests/metatag.with_views.test
; Other test dependencies.
test_dependencies[] = context:context

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

11 changes: 6 additions & 5 deletions www7/sites/all/modules/contrib/metatag/metatag.install
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ function metatag_requirements($phase) {
list($minor, $suffix) = explode('-', $minor);
}

// Releases of Drupal older than 7.28 did not have entity_language(), which
// is now required, and had a broken [node:summary] token.
if ($minor < 28) {
// Releases of Drupal older than 7.40 support did not project:module syntax
// for dependencies
if ($minor < 40) {
$requirements['metatag'] = array(
'severity' => REQUIREMENT_WARNING,
'title' => 'Metatag',
'value' => $t('Upgrade Drupal core to v7.28 or newer'),
'description' => $t("This older version of Drupal core is missing functionality necessary for the module's multilingual support and contains a broken [node:summary] token, it must be upgraded to version 7.28 or newer."),
'value' => $t('Upgrade Drupal core to v7.40 or newer'),
'description' => $t("This older version of Drupal core is missing functionality necessary for Metatag to work correctly, it must be upgraded to version 7.40 or newer."),
);
}

Expand Down Expand Up @@ -2575,6 +2575,7 @@ function metatag_update_7113() {
*/
function metatag_update_7114() {
variable_del('metatag_cache_output');
drupal_set_message(t('Note: Output caching of meta tags has been disabled, it may be reenabled from the Metatag settings page if needed.'));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion www7/sites/all/modules/contrib/metatag/metatag.metatag.inc
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function metatag_metatag_info() {

$info['tags']['abstract'] = array(
'label' => t('Abstract'),
'description' => t("A brief and concise summary of the page's content, preferably 150 characters or less. The abstract meta tag may be used by search engines for archiving purposes."),
'description' => t("A brief and concise summary of the page's content, preferably 150 characters or less. Where as the description meta tag may be used by search engines to display a snippet about the page in search results, the abstract tag may be used to archive a summary about the page. This meta tag is <em>no longer</em> supported by major search engines."),
'class' => 'DrupalTextMetaTag',
'group' => 'basic',
'weight' => ++$weight,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ dependencies[] = metatag:metatag
files[] = tests/metatag_app_links.test
files[] = tests/metatag_app_links.tags.test

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,15 @@ function metatag_context_i18n_object_info() {

// Build a suitable structure for this meta tag.
$tag_name = $tag_info['name'];
$tag_group = $tag_info['group'];
$group_label = isset($groups[$tag_group]['label']) ? $groups[$tag_group]['label'] : $tag_group;
$title = $tag_info['label'];
if (!empty($tag_info['group'])) {
$tag_group = $tag_info['group'];
$group_label = !empty($groups[$tag_group]['label']) ? $groups[$tag_group]['label'] : $tag_group;
$title = $group_label . ': '. $title;
}

$info['metatag_context']['string translation']['properties'][$tag_name] = array(
'title' => $group_label . ': ' . $tag_info['label'],
'title' => $title,
'field' => "reactions.metatag_context_reaction.und.{$tag_name}.value",
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ dependencies[] = context:context
files[] = tests/metatag_context.test
files[] = tests/metatag_context.i18n.test

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ dependencies[] = context:context
dependencies[] = metatag:metatag
dependencies[] = metatag:metatag_context

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ dependencies[] = metatag:metatag
files[] = tests/metatag_dc.test
files[] = tests/metatag_dc.tags.test

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ dependencies[] = metatag:metatag_dc
files[] = tests/metatag_dc_advanced.test
files[] = tests/metatag_dc_advanced.tags.test

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ dependencies[] = metatag:metatag
; Tests.
files[] = tests/metatag_devel.test

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ dependencies[] = metatag:metatag
files[] = tests/metatag_facebook.test
files[] = tests/metatag_facebook.tags.test

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ files[] = metatag_favicons.mask-icon.class.inc
files[] = tests/metatag_favicons.test
files[] = tests/metatag_favicons.tags.test

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ dependencies[] = metatag:metatag
files[] = tests/metatag_google_cse.test
files[] = tests/metatag_google_cse.tags.test

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ files[] = metatag_google_plus.inc
files[] = tests/metatag_google_plus.test
files[] = tests/metatag_google_plus.tags.test

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ test_dependencies[] = devel:devel
test_dependencies[] = entity_translation:entity_translation
files[] = tests/metatag_hreflang.with_entity_translation.test

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ function metatag_hreflang_token_info() {
if (!(module_exists('translation') || module_exists('entity_translation'))) {
return;
}

// Don't do anything if the patch was applied to Entity Translation to add
// these.
// @see https://www.drupal.org/node/2603056
if (module_load_include('tokens.inc', 'entity_translation')) {
if (module_exists('entity_translation') && module_load_include('tokens.inc', 'entity_translation')) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class MetatagHreflangWithEntityTranslationTest extends MetatagTestHelper {
// Confirm each of the support locales has its own field and the appropriate
// default value.
foreach ($this->supportedLocales() as $langcode) {
$this->assertFieldByName("metatags[{$form_langcode}][hreflang_{$langcode}][value]", "[node:url-{$langcode}]", format_string('Found the hreflang field for the "%lang" locale and it has the correct default value.', array('%lang' => $langcode)));
$this->assertFieldByName("metatags[{$form_langcode}][hreflang_{$langcode}][default]", "[node:url-{$langcode}]", format_string('Found the hreflang field for the "%lang" locale and it has the correct default value.', array('%lang' => $langcode)));
}
}

Expand All @@ -127,7 +127,7 @@ class MetatagHreflangWithEntityTranslationTest extends MetatagTestHelper {
$this->assertResponse(200);

// Confirm the fields exist.
$this->assertHreflangFields();
$this->assertHreflangFields('en');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ dependencies[] = metatag:metatag
; Tests.
files[] = tests/metatag_importer.test

; Information added by Drupal.org packaging script on 2017-02-15
version = "7.x-1.21"
; Information added by Drupal.org packaging script on 2017-07-03
version = "7.x-1.22"
core = "7.x"
project = "metatag"
datestamp = "1487171290"
datestamp = "1499110746"

Loading

0 comments on commit ee3f2c1

Please sign in to comment.