From 2a2fe1667eeef4095b3847cc42b78fe82bf4b0ac Mon Sep 17 00:00:00 2001 From: Florent Torregrosa Date: Thu, 24 Aug 2017 14:36:10 +0200 Subject: [PATCH 1/5] Update metatag to 7.x-1.22 --- .../all/modules/contrib/metatag/CHANGELOG.txt | 16 ++++++++++++++++ .../sites/all/modules/contrib/metatag/README.txt | 6 +++++- .../all/modules/contrib/metatag/metatag.info | 11 +++++------ .../all/modules/contrib/metatag/metatag.install | 11 ++++++----- .../modules/contrib/metatag/metatag.metatag.inc | 2 +- .../metatag_app_links/metatag_app_links.info | 6 +++--- .../metatag_context/metatag_context.i18n.inc | 11 ++++++++--- .../metatag/metatag_context/metatag_context.info | 6 +++--- .../tests/metatag_context_tests.info | 6 +++--- .../contrib/metatag/metatag_dc/metatag_dc.info | 6 +++--- .../metatag_dc_advanced/metatag_dc_advanced.info | 6 +++--- .../metatag/metatag_devel/metatag_devel.info | 6 +++--- .../metatag_facebook/metatag_facebook.info | 6 +++--- .../metatag_favicons/metatag_favicons.info | 6 +++--- .../metatag_google_cse/metatag_google_cse.info | 6 +++--- .../metatag_google_plus/metatag_google_plus.info | 6 +++--- .../metatag_hreflang/metatag_hreflang.info | 6 +++--- .../metatag_hreflang/metatag_hreflang.tokens.inc | 3 +-- ...metatag_hreflang.with_entity_translation.test | 4 ++-- .../metatag_importer/metatag_importer.info | 6 +++--- .../metatag/metatag_mobile/metatag_mobile.info | 6 +++--- .../metatag_opengraph/metatag_opengraph.info | 6 +++--- .../metatag_opengraph_products.info | 6 +++--- .../metatag_panels/metatag_panels.i18n.inc | 11 ++++++++--- .../metatag/metatag_panels/metatag_panels.info | 6 +++--- .../metatag/metatag_panels/metatag_panels.module | 12 +++++++----- .../metatag_panels/tests/metatag_panels.test | 5 +++++ .../tests/metatag_panels_tests.info | 6 +++--- .../tests/metatag_panels_tests.pages_default.inc | 14 +++++++++++++- .../metatag_twitter_cards.info | 6 +++--- .../metatag_verification.info | 6 +++--- .../metatag/metatag_views/metatag_views.i18n.inc | 11 ++++++++--- .../metatag/metatag_views/metatag_views.info | 6 +++--- .../metatag/metatag_views/metatag_views.install | 15 +++++++++++++++ .../metatag_views/tests/metatag_views_tests.info | 6 +++--- .../metatag/tests/metatag_search_test.info | 6 +++--- .../contrib/metatag/tests/metatag_test.info | 6 +++--- 37 files changed, 169 insertions(+), 101 deletions(-) create mode 100644 www7/sites/all/modules/contrib/metatag/metatag_views/metatag_views.install diff --git a/www7/sites/all/modules/contrib/metatag/CHANGELOG.txt b/www7/sites/all/modules/contrib/metatag/CHANGELOG.txt index ad38e6370..a81e291af 100644 --- a/www7/sites/all/modules/contrib/metatag/CHANGELOG.txt +++ b/www7/sites/all/modules/contrib/metatag/CHANGELOG.txt @@ -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. diff --git a/www7/sites/all/modules/contrib/metatag/README.txt b/www7/sites/all/modules/contrib/metatag/README.txt index 9312b3bdb..730fe5973 100644 --- a/www7/sites/all/modules/contrib/metatag/README.txt +++ b/www7/sites/all/modules/contrib/metatag/README.txt @@ -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 @@ -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 -------------------------------------------------------------------------------- diff --git a/www7/sites/all/modules/contrib/metatag/metatag.info b/www7/sites/all/modules/contrib/metatag/metatag.info index bf1da27ff..5d00c548c 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag.info +++ b/www7/sites/all/modules/contrib/metatag/metatag.info @@ -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 @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag.install b/www7/sites/all/modules/contrib/metatag/metatag.install index 7e969d2fd..6906c24b4 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag.install +++ b/www7/sites/all/modules/contrib/metatag/metatag.install @@ -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."), ); } @@ -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.')); } /** diff --git a/www7/sites/all/modules/contrib/metatag/metatag.metatag.inc b/www7/sites/all/modules/contrib/metatag/metatag.metatag.inc index bea0bf7cd..325026f33 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag.metatag.inc +++ b/www7/sites/all/modules/contrib/metatag/metatag.metatag.inc @@ -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 no longer supported by major search engines."), 'class' => 'DrupalTextMetaTag', 'group' => 'basic', 'weight' => ++$weight, diff --git a/www7/sites/all/modules/contrib/metatag/metatag_app_links/metatag_app_links.info b/www7/sites/all/modules/contrib/metatag/metatag_app_links/metatag_app_links.info index e8a169626..551fa1891 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_app_links/metatag_app_links.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_app_links/metatag_app_links.info @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_context/metatag_context.i18n.inc b/www7/sites/all/modules/contrib/metatag/metatag_context/metatag_context.i18n.inc index 676b78de8..bc238fa5f 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_context/metatag_context.i18n.inc +++ b/www7/sites/all/modules/contrib/metatag/metatag_context/metatag_context.i18n.inc @@ -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", ); } diff --git a/www7/sites/all/modules/contrib/metatag/metatag_context/metatag_context.info b/www7/sites/all/modules/contrib/metatag/metatag_context/metatag_context.info index 28758f713..928a7055a 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_context/metatag_context.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_context/metatag_context.info @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_context/tests/metatag_context_tests.info b/www7/sites/all/modules/contrib/metatag/metatag_context/tests/metatag_context_tests.info index 14a3a3edb..c7ab5fd44 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_context/tests/metatag_context_tests.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_context/tests/metatag_context_tests.info @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_dc/metatag_dc.info b/www7/sites/all/modules/contrib/metatag/metatag_dc/metatag_dc.info index 43b22a3a5..106ed7e80 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_dc/metatag_dc.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_dc/metatag_dc.info @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_dc_advanced/metatag_dc_advanced.info b/www7/sites/all/modules/contrib/metatag/metatag_dc_advanced/metatag_dc_advanced.info index eb9f8fd0c..5fe1a90df 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_dc_advanced/metatag_dc_advanced.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_dc_advanced/metatag_dc_advanced.info @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_devel/metatag_devel.info b/www7/sites/all/modules/contrib/metatag/metatag_devel/metatag_devel.info index 38c290e45..a3577ce2d 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_devel/metatag_devel.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_devel/metatag_devel.info @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_facebook/metatag_facebook.info b/www7/sites/all/modules/contrib/metatag/metatag_facebook/metatag_facebook.info index 29a738548..e91a5c601 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_facebook/metatag_facebook.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_facebook/metatag_facebook.info @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_favicons/metatag_favicons.info b/www7/sites/all/modules/contrib/metatag/metatag_favicons/metatag_favicons.info index 126bb8743..8ccb56b52 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_favicons/metatag_favicons.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_favicons/metatag_favicons.info @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_google_cse/metatag_google_cse.info b/www7/sites/all/modules/contrib/metatag/metatag_google_cse/metatag_google_cse.info index d23e4aa20..81f1ab673 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_google_cse/metatag_google_cse.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_google_cse/metatag_google_cse.info @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_google_plus/metatag_google_plus.info b/www7/sites/all/modules/contrib/metatag/metatag_google_plus/metatag_google_plus.info index 3d405f015..2fd928945 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_google_plus/metatag_google_plus.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_google_plus/metatag_google_plus.info @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_hreflang/metatag_hreflang.info b/www7/sites/all/modules/contrib/metatag/metatag_hreflang/metatag_hreflang.info index 5eb15ba04..0d133a159 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_hreflang/metatag_hreflang.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_hreflang/metatag_hreflang.info @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_hreflang/metatag_hreflang.tokens.inc b/www7/sites/all/modules/contrib/metatag/metatag_hreflang/metatag_hreflang.tokens.inc index a7a84e605..943db64f1 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_hreflang/metatag_hreflang.tokens.inc +++ b/www7/sites/all/modules/contrib/metatag/metatag_hreflang/metatag_hreflang.tokens.inc @@ -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; } diff --git a/www7/sites/all/modules/contrib/metatag/metatag_hreflang/tests/metatag_hreflang.with_entity_translation.test b/www7/sites/all/modules/contrib/metatag/metatag_hreflang/tests/metatag_hreflang.with_entity_translation.test index 735256dd4..1ee39e329 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_hreflang/tests/metatag_hreflang.with_entity_translation.test +++ b/www7/sites/all/modules/contrib/metatag/metatag_hreflang/tests/metatag_hreflang.with_entity_translation.test @@ -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))); } } @@ -127,7 +127,7 @@ class MetatagHreflangWithEntityTranslationTest extends MetatagTestHelper { $this->assertResponse(200); // Confirm the fields exist. - $this->assertHreflangFields(); + $this->assertHreflangFields('en'); } /** diff --git a/www7/sites/all/modules/contrib/metatag/metatag_importer/metatag_importer.info b/www7/sites/all/modules/contrib/metatag/metatag_importer/metatag_importer.info index 63a1fc5d2..43538f836 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_importer/metatag_importer.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_importer/metatag_importer.info @@ -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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_mobile/metatag_mobile.info b/www7/sites/all/modules/contrib/metatag/metatag_mobile/metatag_mobile.info index 87029b66f..418a60d57 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_mobile/metatag_mobile.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_mobile/metatag_mobile.info @@ -8,9 +8,9 @@ dependencies[] = metatag:metatag files[] = tests/metatag_mobile.test files[] = tests/metatag_mobile.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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_opengraph/metatag_opengraph.info b/www7/sites/all/modules/contrib/metatag/metatag_opengraph/metatag_opengraph.info index 579140553..11e046f30 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_opengraph/metatag_opengraph.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_opengraph/metatag_opengraph.info @@ -8,9 +8,9 @@ dependencies[] = metatag:metatag files[] = tests/metatag_opengraph.test files[] = tests/metatag_opengraph.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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_opengraph_products/metatag_opengraph_products.info b/www7/sites/all/modules/contrib/metatag/metatag_opengraph_products/metatag_opengraph_products.info index 67c290f28..f51151852 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_opengraph_products/metatag_opengraph_products.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_opengraph_products/metatag_opengraph_products.info @@ -9,9 +9,9 @@ dependencies[] = metatag:metatag_opengraph files[] = tests/metatag_opengraph_products.test files[] = tests/metatag_opengraph_products.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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_panels/metatag_panels.i18n.inc b/www7/sites/all/modules/contrib/metatag/metatag_panels/metatag_panels.i18n.inc index c2eaa4272..e76b8be6c 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_panels/metatag_panels.i18n.inc +++ b/www7/sites/all/modules/contrib/metatag/metatag_panels/metatag_panels.i18n.inc @@ -27,10 +27,15 @@ function metatag_panels_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; + } + $properties[$tag_name] = array( - 'title' => $group_label . ': ' . $tag_info['label'], + 'title' => $title, 'field' => "conf.metatag_panels.metatags.{$tag_name}.value", ); } diff --git a/www7/sites/all/modules/contrib/metatag/metatag_panels/metatag_panels.info b/www7/sites/all/modules/contrib/metatag/metatag_panels/metatag_panels.info index 0ed19662e..c8c90ea83 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_panels/metatag_panels.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_panels/metatag_panels.info @@ -10,9 +10,9 @@ dependencies[] = panels:panels files[] = tests/metatag_panels.test files[] = tests/metatag_panels.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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_panels/metatag_panels.module b/www7/sites/all/modules/contrib/metatag/metatag_panels/metatag_panels.module index 72ca8f5c2..df7a53591 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_panels/metatag_panels.module +++ b/www7/sites/all/modules/contrib/metatag/metatag_panels/metatag_panels.module @@ -30,7 +30,7 @@ function metatag_panels_page_manager_variant_operations_alter(&$operations, $han function metatag_panels_form($form, $form_state) { $handler = $form_state['handler']; - // Load available contexts + // Load available contexts. ctools_include('context-task-handler'); $contexts = ctools_context_handler_get_all_contexts($form_state['task'], $form_state['subtask'], $handler); @@ -85,7 +85,9 @@ function metatag_panels_form($form, $form_state) { '#collapsed' => TRUE, ); $header = array(t('Keyword'), t('Value')); - $form['contexts']['context'] = array('#markup' => theme('table', array('header' => $header, 'rows' => $rows))); + $form['contexts']['context'] = array( + '#markup' => theme('table', array('header' => $header, 'rows' => $rows)), + ); $form['contexts']['#states'] = array( 'visible' => array( ':input[name="metatags_enabled"]' => array('checked' => TRUE), @@ -175,8 +177,8 @@ function metatag_panels_ctools_render_alter($info, $page, $context) { // Substitute Panels context variables. foreach ($metatags as $metatag => $data) { - if (is_string($data['value']) && strpos($data['value'], '%') !== FALSE) { - $metatags[$metatag]['value'] = ctools_context_keyword_substitute($data['value'], array(), $context['handler']->conf['display']->context); + if (is_string($data['value']) && strpos(urldecode($data['value']), '%') !== FALSE) { + $metatags[$metatag]['value'] = check_plain(ctools_context_keyword_substitute(urldecode($data['value']), array(), $context['handler']->conf['display']->context)); } } @@ -210,7 +212,7 @@ function metatag_panels_ctools_render_alter($info, $page, $context) { // Render CTools context substitution values prior to rendering the meta // tag. if (is_string($data['value'])) { - $data['value'] = ctools_context_keyword_substitute(trim($data['value']), array(), $task_contexts); + $data['value'] = check_plain(ctools_context_keyword_substitute(trim(urldecode($data['value'])), array(), $task_contexts)); } $metatag_instance = metatag_get_instance($metatag, $data); diff --git a/www7/sites/all/modules/contrib/metatag/metatag_panels/tests/metatag_panels.test b/www7/sites/all/modules/contrib/metatag/metatag_panels/tests/metatag_panels.test index b7961dc64..32389caa8 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_panels/tests/metatag_panels.test +++ b/www7/sites/all/modules/contrib/metatag/metatag_panels/tests/metatag_panels.test @@ -51,6 +51,11 @@ class MetatagPanelsTest extends MetatagTestHelper { $xpath = $this->xpath("//meta[@name='keywords']"); $this->assertEqual(count($xpath), 1, 'Exactly one keywords meta tag found.'); $this->assertEqual($xpath[0]['content'], 'Test, page, keywords'); + + // Test the abstract meta tag. + $xpath = $this->xpath("//meta[@name='abstract']"); + $this->assertEqual(count($xpath), 1, 'Exactly one abstract meta tag found.'); + $this->assertEqual($xpath[0]['content'], 'http://www.example.com/user/1/full-bio-(1).pdf'); } // @todo Test an in-db page. diff --git a/www7/sites/all/modules/contrib/metatag/metatag_panels/tests/metatag_panels_tests.info b/www7/sites/all/modules/contrib/metatag/metatag_panels/tests/metatag_panels_tests.info index ea1fce506..1da0c8d90 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_panels/tests/metatag_panels_tests.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_panels/tests/metatag_panels_tests.info @@ -10,9 +10,9 @@ dependencies[] = ctools:page_manager dependencies[] = metatag:metatag dependencies[] = metatag:metatag_panels -; 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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_panels/tests/metatag_panels_tests.pages_default.inc b/www7/sites/all/modules/contrib/metatag/metatag_panels/tests/metatag_panels_tests.pages_default.inc index 55e76a080..9c1dee693 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_panels/tests/metatag_panels_tests.pages_default.inc +++ b/www7/sites/all/modules/contrib/metatag/metatag_panels/tests/metatag_panels_tests.pages_default.inc @@ -50,7 +50,16 @@ function metatag_panels_tests_default_page_manager_pages() { 'body_classes_to_add' => '', 'css_id' => '', 'css' => '', - 'contexts' => array(), + 'contexts' => array( + 0 => array( + 'identifier' => 'User', + 'keyword' => 'user', + 'name' => 'user', + 'type' => 'select', + 'uid' => '1', + 'id' => 1, + ), + ), 'relationships' => array(), 'name' => '', 'metatag_panels' => array( @@ -65,6 +74,9 @@ function metatag_panels_tests_default_page_manager_pages() { 'keywords' => array( 'value' => 'Test, page, keywords', ), + 'abstract' => array( + 'value' => 'http://www.example.com/user/%user:uid/full-bio-%281%29.pdf', + ), ), ), ); diff --git a/www7/sites/all/modules/contrib/metatag/metatag_twitter_cards/metatag_twitter_cards.info b/www7/sites/all/modules/contrib/metatag/metatag_twitter_cards/metatag_twitter_cards.info index c661c7a0b..15b7e22b7 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_twitter_cards/metatag_twitter_cards.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_twitter_cards/metatag_twitter_cards.info @@ -8,9 +8,9 @@ dependencies[] = metatag:metatag files[] = tests/metatag_twitter_cards.test files[] = tests/metatag_twitter_cards.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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_verification/metatag_verification.info b/www7/sites/all/modules/contrib/metatag/metatag_verification/metatag_verification.info index 6cf49efd7..f4cefc61e 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_verification/metatag_verification.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_verification/metatag_verification.info @@ -8,9 +8,9 @@ dependencies[] = metatag:metatag files[] = tests/metatag_verification.test files[] = tests/metatag_verification.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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_views/metatag_views.i18n.inc b/www7/sites/all/modules/contrib/metatag/metatag_views/metatag_views.i18n.inc index 752753ac4..2de4352aa 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_views/metatag_views.i18n.inc +++ b/www7/sites/all/modules/contrib/metatag/metatag_views/metatag_views.i18n.inc @@ -66,10 +66,15 @@ function metatag_views_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_views']['string translation']['properties'][$tag_name] = array( - 'title' => $group_label . ': ' . $tag_info['label'], + 'title' => $title, 'field' => "display_options.metatags.und.{$tag_name}.value", ); } diff --git a/www7/sites/all/modules/contrib/metatag/metatag_views/metatag_views.info b/www7/sites/all/modules/contrib/metatag/metatag_views/metatag_views.info index 5a8f70d35..280808bd2 100644 --- a/www7/sites/all/modules/contrib/metatag/metatag_views/metatag_views.info +++ b/www7/sites/all/modules/contrib/metatag/metatag_views/metatag_views.info @@ -13,9 +13,9 @@ files[] = metatag_views_plugin_display_extender_metatags.inc files[] = tests/metatag_views.test files[] = tests/metatag_views.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" diff --git a/www7/sites/all/modules/contrib/metatag/metatag_views/metatag_views.install b/www7/sites/all/modules/contrib/metatag/metatag_views/metatag_views.install new file mode 100644 index 000000000..77733c103 --- /dev/null +++ b/www7/sites/all/modules/contrib/metatag/metatag_views/metatag_views.install @@ -0,0 +1,15 @@ + Date: Thu, 24 Aug 2017 14:36:42 +0200 Subject: [PATCH 2/5] Update scald_file to 7.x-1.4 --- ...fficedocument.presentationml.slideshow.png | Bin 0 -> 2201 bytes .../icons/application_vnd.sun.xml.writer.png | Bin 0 -> 2461 bytes .../scald_file/includes/scald_file.views.inc | 2 +- ...cald_file_views_handler_field_filesize.inc | 11 ++- .../scald_file/scald-file-render.tpl.php | 2 +- .../contrib/scald_file/scald_file.info | 7 +- .../contrib/scald_file/scald_file.install | 2 +- .../modules/contrib/scald_file/scald_file.js | 5 ++ .../contrib/scald_file/scald_file.module | 71 +++++++++++------- .../scald_file/scald_file_edit_form.js | 5 ++ 10 files changed, 69 insertions(+), 36 deletions(-) create mode 100644 www7/sites/all/modules/contrib/scald_file/icons/application_vnd.openxmlformats_officedocument.presentationml.slideshow.png create mode 100644 www7/sites/all/modules/contrib/scald_file/icons/application_vnd.sun.xml.writer.png diff --git a/www7/sites/all/modules/contrib/scald_file/icons/application_vnd.openxmlformats_officedocument.presentationml.slideshow.png b/www7/sites/all/modules/contrib/scald_file/icons/application_vnd.openxmlformats_officedocument.presentationml.slideshow.png new file mode 100644 index 0000000000000000000000000000000000000000..6512f005654b558756b3ea5262c4d3033e95d762 GIT binary patch literal 2201 zcmV;K2xj+*P)5VZd$!J3rS6tn zFP`!AOe9Jw`gQl4_r7}dRn>cK{HAHre~AX6_ejhQfci-VuHzE0-f8a(e&9;unuHzM zoCZLG&<1Es-oGEh;1{4X&=t1{nhG8%ms13?#J3uuBxN}w8o{Vt%L>0X11J}GR z@Tvhht^`rqD%kv9QtjBJ0RolYB@#3>^@x(Z*_GR2{4K zvii9VD98vE8+4->P{-DF-38Jc@cc$-#d|1=~@k;xN6Ji()C`ehd*({BXjnTm1pp0Y5 z#)jZ`ngpq{; z)+|aD0e*vQmPb5#KqxdmK2ArD9(B9`AjN=Jj8F_HWg4xmtK)!^0ZafxL%@vm^wRWS z54kPdIqm8;$3=ejWPhqeX`K-mMzpbF-af1c|*^iKbNs&byaFf z`fh4!vNM(UEHw7=C4F-27zzI^1Hy<4|KcL)sT7&3tE2<$)`kX(gu@h{ou%e8XXp?N z^aTQ5GnG*H$&)A4-rnxH4oDWNuBzg;i~nK2kCJ!qIxFVm{+QJ0>!WNUA>au{78C5d zcI~2v4~3@QD=|bUgtm)T5!~1B+b093ZrySUlnJej$9d&TmZ_lLgLocXeTkye0t!K# zATA3>$Pda8f=u7Lm$b8INrL$1P4aG5Fov%phYk@942S`%*n)I)c2XL_o=qkx4bLR-t{O&;-@8W%WUerh zKyqnGGE^4r6cR!uJQ^PyqDG`zOT1?xp%AiAOKYnuh;^)-+12Ih>r`u9cQTa*&_00I z0G41#Z0lAE!Qd)hal}XvfH{67b`Bq=wYfP;jEqp_r=KZl)pH>Og=`NvbzlizF+Tbj z6T5gTRG9}*?h_1@(cO13XjFIl zG|~3$WFq})$opBuMHLaHf}zp`@f%R+#fulz*4Cz^QdOMiPNov$pFWk~)i_Srcz8$y z-^+IFAZ_PPBEul!U`ATjQK>a}C|nVxlronG1L~~3kbqxTB^6O8l1!y-+eTVrqkz3R^h5_#^VAs%f$~X9b#bMy@@_fn$2XGvrIEPVc=25-qe}4ZrTHLOrghLD*1hAFn#R0LTI! zMtCy-;--*HrhX?PcZ%irIWkrLBw&lrqNHU+2DeGJsh}8`Ltz;Og-+lctmQ8(%IB8? z!LN@ci#}Q2(wp7g-M=uSp{pij(-f*h(1AjQ9Qg{$R6;f0P9&2I*v>lQ#V|6_{{0{F z;lI1Hv-4+kpMV+#7czX8XN37cJM^job#NGw{k)c^b^y2>nif$T$`RO+NQ7dsm}IiI zD11FVJtJ4HT=@}QN1*cgqFOD%UY^9e5`#;wl)kX7C*CozB*;9F3Y0h|pG@Yk+g`)+o2_AwDn*;&W40mwow3MpXo%Z5iv7$DvW zg+c-zTa@Wbmo8lg_`iv061t*-&u@Tft7i(S9#9Rkwh4$AS^bfbkO!~N&Zo%+3+?cTfR~?@Q9gxO|`K>gxLS!i5Vzq1z~Q0l1Sze^xOen1s{T zEGGPlL%>y-ixwxgR-rS{SI~q~VT<&@GIZ1$T>l^c?}K6SJyX)Z5AbTh3-6RwFRhp? bR08=IxA&PwkqZGs00000NkvXXu0mjf-@p11 literal 0 HcmV?d00001 diff --git a/www7/sites/all/modules/contrib/scald_file/icons/application_vnd.sun.xml.writer.png b/www7/sites/all/modules/contrib/scald_file/icons/application_vnd.sun.xml.writer.png new file mode 100644 index 0000000000000000000000000000000000000000..544256fc0c263dc3c821e9f11ad6410589d5a6e8 GIT binary patch literal 2461 zcmV;O31aq%P)_f9KZis;=rDkK2x)Nd$o;1}hJRBnSmUh(Z!6j>UqA1uRe&D4W0n z%-_HQ{sdTn5GxiCMT)XA2qhppaxgf75IH7*ZR{D_(>>kQU5|S&i+W7;JbT8LKqw`Z zx~itC`aAc0-#OpCJ@C=?-`!-ri;sThemQ;S&wGHm{}G(=v(G+z{q@&h&u0n%(7*cm z4}X7PSNh1@T$|qh!&o$jj(inoa}cQ?cFmW`s@FN!{Nu{yReuw}Ial1%xL)1Y@_j^P z4j8Thx$0Z(o_(6;n_IzxD$H`k1g#WanI+|Uc;&7=53l5S^SW2w?|B|3&(T`roI`sa0LGY&DLP9A0FpE#UXBrw zVw6R=v9v^zBxtS4jUjBeae&D(bgM<0Wd#^(NzxQgDLS1FqtS>k42k0y&-1WlHUx_M zM97UHH->Jvi&Bd2+}zCt5cn-n3Pj-t0sDerTD(o_tdnjj>EN8B)9nHOd@c^OYBk~BqYjWLFHyN$CJV{HM*^KjOpJddnFr8G?u zrD(U?q-lz?mZ04xjuSi&vMeJ@Q|9L8a6lA>XuUZ^y>+V=9961?Fbok9!YINRQwvS| zK2nOX+S4>82m(X|V+?)}6k;udt_ncD^eT4uGjzLMy4^0;+NnNpQ)RRrXxisx&eZL;13V4zv_`XkCQlO=EE#4_TDK*_`rG=ISu$LJOZll-h)!J${z?&|k zIE!;|@ZiCzv`VuXt&{Hcf@n6lQ@{BsckR<0*fZwrd;ehHzT4=Qm1@&xw^M}zzeT4T z0g&f;QEjZPt4>udLnw3Y}d02{#t|Wbq~J@NEWz<(2Bwc<)VR zfRaKY5XUib9Ft`kN-3&o8S!+dEp+SXiiW)XKfZLEdeyLST+ zhGF4dN?}&VNs^VG!#PKqres-06h)+Ix-xT*W0sef z84ib2V!kDP08xb-wU#IhNs^=pBF_;K2K_$qXoT`pUao#WvCU4&s_r;GQwwJQ%BEMTn%y17jz6C9c>cjN|=G+!yXC6!zm=q<6+B5T)p zWDAg+HM7Zh$Pd1sA;bNI2k++XQ)7}eul-a-A5rSo*y$;ds}`#2g{>_z&=jaBjrET+ zX-x?9Ax6A|wFXmWpc1rAk_}lo^QuIr8)4nX6mhfqm&OW(r(2ltAx4vBc83QTxqsta z0lE^iF@{mmowJ+j#BoWXS>~x*nz%9m5w%A0)>`sBuRC%a$6UO4@pr&@M~zICcG_)X z%60<2@J1z-MCuswJZCbQFdPoKdi5&(e*fxo&pr2z#~ynu-*x~>34c3(h0B+((TUn? z^jU#fwTe6w_-drJSI(U&MtnFNG8hb)jK>HJo_YG|&wu%;r~dWkn{V!*j2g$icOT@? zp}l-?;mW3MeU>1ayS0|lXvEiE_sMZJ zJF7ynVy7M8$`vBH3GP>;Z>_Dpf79f}qY;Y>3+Z=HoOl8_clPXAd&}%Ju3W?4plQhl z)k&PgR^_(}!kD7#mKmwQU%!4m`QC{WPgv*PI(7QAy`^?~P2pJ;j9YIVr}94y>NGP^ zgC7oAT3Q-^`{kFv=-|xBlPB#g*k)gy7PYy*S;slL#%B$@1Ya!zq)9?N9MWG}8hrD` z7r)?~d*{@tQ+8HnY-@G8(!w^#ztVlnAgr~x^3&6r<-vfZet+@U@#Bwf7yOn1h`_?N zWhRq^I9~BWl`VF&3b>+A!(HZijuK&EVd3IK4?q0bd+xpW{q2IEi9%X?wVhs%GH#>D z8 file type icon diff --git a/www7/sites/all/modules/contrib/scald_file/scald_file.info b/www7/sites/all/modules/contrib/scald_file/scald_file.info index 68b68a834..1cdf28420 100644 --- a/www7/sites/all/modules/contrib/scald_file/scald_file.info +++ b/www7/sites/all/modules/contrib/scald_file/scald_file.info @@ -7,10 +7,9 @@ dependencies[] = scald stylesheets[all][] = scald_file.css files[] = includes/scald_file_views_handler_field_filesize.inc - -; Information added by Drupal.org packaging script on 2016-03-01 -version = "7.x-1.3" +; Information added by Drupal.org packaging script on 2017-08-01 +version = "7.x-1.4" core = "7.x" project = "scald_file" -datestamp = "1456846564" +datestamp = "1501617845" diff --git a/www7/sites/all/modules/contrib/scald_file/scald_file.install b/www7/sites/all/modules/contrib/scald_file/scald_file.install index e5b536610..50e301ad3 100644 --- a/www7/sites/all/modules/contrib/scald_file/scald_file.install +++ b/www7/sites/all/modules/contrib/scald_file/scald_file.install @@ -2,7 +2,7 @@ /** * @file - * Scald Files Installation + * Scald Files Installation. */ /** diff --git a/www7/sites/all/modules/contrib/scald_file/scald_file.js b/www7/sites/all/modules/contrib/scald_file/scald_file.js index 1065c89dc..bb43f990d 100644 --- a/www7/sites/all/modules/contrib/scald_file/scald_file.js +++ b/www7/sites/all/modules/contrib/scald_file/scald_file.js @@ -1,3 +1,8 @@ +/** + * @file + * File: scald_file.js. + */ + (function ($) { Drupal.behaviors.scaldFile = { attach: function (context, settings) { diff --git a/www7/sites/all/modules/contrib/scald_file/scald_file.module b/www7/sites/all/modules/contrib/scald_file/scald_file.module index c0fe453f2..504b83bbf 100644 --- a/www7/sites/all/modules/contrib/scald_file/scald_file.module +++ b/www7/sites/all/modules/contrib/scald_file/scald_file.module @@ -127,7 +127,7 @@ function scald_file_form_scald_atom_add_form_options_alter(&$form, &$form_state, if ($type !== 'file') { return; } - foreach($form as $key => $data) { + foreach ($form as $key => $data) { if (strpos($key, 'atom') === 0) { $index = intval(substr($key, 4)); if (isset($scald['atoms'][$index]->data['scald_thumbnail_default'])) { @@ -158,7 +158,7 @@ function scald_file_form_scald_atom_add_form_options_alter(&$form, &$form_state, * Handler to store the default thumbnail generation option in the atom Entity. */ function scald_file_default_thumbnail_handler(&$form, &$form_state) { - foreach($form as $key => $data) { + foreach ($form as $key => $data) { if (strpos($key, 'atom') === 0) { $index = intval(substr($key, 4)); $form_state['scald']['atoms'][$index]->data['scald_thumbnail_default'] = $form_state['values'][$key]['scald_thumbnail_default']; @@ -170,7 +170,7 @@ function scald_file_default_thumbnail_handler(&$form, &$form_state) { * Generate a thumbnail for a pdf file. */ function _scald_file_pdf_thumbnail($atom, $file) { - if ($file->filemime === 'application/pdf'){ + if ($file->filemime === 'application/pdf') { $uri = drupal_realpath($file->uri); if (file_exists($uri)) { $temp = file_directory_temp() . '/pdf_thumb.png'; @@ -426,17 +426,24 @@ function scald_file_scald_contexts() { */ function scald_file_scald_render($atom, $context, $options = array()) { if ($context == 'file_representation') { - return theme('scald_file_render', - array( - 'vars' => array( - 'context' => $context, - 'file_source' => $atom->file_source, - 'file_size' => format_size($atom->base_entity->filesize), - 'thumbnail_source' => ($atom->type == 'image' ? drupal_get_path('module', 'scald_file') . '/icons/image_jpeg2000.png' : $atom->thumbnail_source), - 'file_title' => check_plain($atom->title), - ), - ) - ); + $config = scald_context_config_load($context); + + if ('default' != $config->player['file']['*']) { + return $atom->rendered->player; + } + else { + return theme('scald_file_render', + array( + 'vars' => array( + 'context' => $context, + 'file_source' => $atom->file_source, + 'file_size' => format_size($atom->base_entity->filesize), + 'thumbnail_source' => ($atom->type == 'image' ? drupal_get_path('module', 'scald_file') . '/icons/image_jpeg2000.png' : $atom->thumbnail_source), + 'file_title' => check_plain($atom->title), + ), + ) + ); + } } } @@ -466,26 +473,35 @@ function scald_file_generate_thumbnail($entity, $context) { } /** - * Determines if a command exists on the current environment + * Determines if a command exists on the current environment. * - * @param string $command The command to check - * @return bool True if the command has been found ; otherwise, false. + * @param string $command + * The command to check. + * + * @return bool + * True if the command has been found ; otherwise, false. + * + * @codingStandardsIgnoreStart * * Source: http://stackoverflow.com/questions/12424787/how-to-check-if-a-shell-command-exists-from-php */ function scald_file_command_exists ($command) { $whereIsCommand = (PHP_OS == 'WINNT') ? 'where' : 'which'; + // @codingStandardsIgnoreEnd $process = proc_open( "$whereIsCommand $command", array( - 0 => array("pipe", "r"), //STDIN - 1 => array("pipe", "w"), //STDOUT - 2 => array("pipe", "w"), //STDERR + // STDIN. + 0 => array("pipe", "r"), + // STDOUT. + 1 => array("pipe", "w"), + // STDERR. + 2 => array("pipe", "w"), ), $pipes ); - if ($process !== false) { + if ($process !== FALSE) { $stdout = stream_get_contents($pipes[1]); $stderr = stream_get_contents($pipes[2]); fclose($pipes[1]); @@ -495,28 +511,29 @@ function scald_file_command_exists ($command) { return $stdout != ''; } - return false; + return FALSE; } /** * Determines if exec is available. * - * Source: http://stackoverflow.com/questions/3938120/check-if-exec-is-disabled + * Source: http://stackoverflow.com/questions/3938120/check-if-exec-is-disabled. */ function scald_file_is_exec_available() { static $available; if (!isset($available)) { - $available = true; + $available = TRUE; if (ini_get('safe_mode')) { - $available = false; - } else { + $available = FALSE; + } + else { $d = ini_get('disable_functions'); $s = ini_get('suhosin.executor.func.blacklist'); if ("$d$s") { $array = preg_split('/,\s*/', "$d,$s"); if (in_array('exec', $array)) { - $available = false; + $available = FALSE; } } } diff --git a/www7/sites/all/modules/contrib/scald_file/scald_file_edit_form.js b/www7/sites/all/modules/contrib/scald_file/scald_file_edit_form.js index 97a10c383..1c2330c1a 100644 --- a/www7/sites/all/modules/contrib/scald_file/scald_file_edit_form.js +++ b/www7/sites/all/modules/contrib/scald_file/scald_file_edit_form.js @@ -1,3 +1,8 @@ +/** + * @file + * File: scald_file_edit_form.js. + */ + (function ($) { Drupal.behaviors.scaldFileEditForm = { attach: function (context, settings) { From 83a0ed1b7c1c864425f5c8138c04f1e0c2727d9e Mon Sep 17 00:00:00 2001 From: Florent Torregrosa Date: Thu, 24 Aug 2017 14:37:10 +0200 Subject: [PATCH 3/5] Update search_api to 7.x-1.22 --- .../modules/contrib/search_api/CHANGELOG.txt | 17 ++++++ .../all/modules/contrib/search_api/README.txt | 6 +- .../search_api_facetapi.info | 6 +- .../includes/handler_filter_fulltext.inc | 7 ++- .../search_api_views/includes/query.inc | 6 +- .../search_api_views/search_api_views.info | 6 +- .../includes/callback_add_aggregation.inc | 34 ++++++++++- .../includes/callback_add_hierarchy.inc | 2 +- .../includes/callback_user_content.inc | 57 +++++++++++++++++++ .../search_api/includes/processor_stemmer.inc | 5 +- .../contrib/search_api/search_api.info | 7 ++- .../contrib/search_api/search_api.module | 5 ++ .../search_api/tests/search_api_test.info | 6 +- 13 files changed, 139 insertions(+), 25 deletions(-) create mode 100644 www7/sites/all/modules/contrib/search_api/includes/callback_user_content.inc diff --git a/www7/sites/all/modules/contrib/search_api/CHANGELOG.txt b/www7/sites/all/modules/contrib/search_api/CHANGELOG.txt index 0084fe0dd..5415ddbd8 100644 --- a/www7/sites/all/modules/contrib/search_api/CHANGELOG.txt +++ b/www7/sites/all/modules/contrib/search_api/CHANGELOG.txt @@ -1,3 +1,20 @@ +Search API 1.22 (2017-07-18): +----------------------------- +- #1710212 by drunken monkey: Added a data alteration for indexing a user's + content. +- #2879892 by blacklabel_tom, drunken monkey: Fixed link in description of + "Stemmer" processor. +- #2788593 by drunken monkey: Fixed error in Views query settings for specific + setups. +- #2749963 by drunken monkey: Fixed "Index hierarchy" not having values + numerically indexed. +- #2875793 by drunken monkey: Fixed buggy error handling in Views. +- #2860624 by drunken monkey: Fixed problem with empty words in Views fulltext + filter. +- #2855447 by mparker17, drunken monkey: Added "Separator" option for + aggregated fields of type "Fulltext". +- #2863445 by dbjpanda, drunken monkey: Fixed phrasing in README.txt. + Search API 1.21 (2017-02-23): ----------------------------- - #2780341 by Berdir: Fixed passing of custom ranges to date facets. diff --git a/www7/sites/all/modules/contrib/search_api/README.txt b/www7/sites/all/modules/contrib/search_api/README.txt index 3943ceec5..a6264e97b 100644 --- a/www7/sites/all/modules/contrib/search_api/README.txt +++ b/www7/sites/all/modules/contrib/search_api/README.txt @@ -31,9 +31,9 @@ Terms as used in this module. Sphinx or any other professional or simple indexing mechanism. Takes care of the details of all operations, especially indexing or searching content. - Server: - One specific place for indexing data, using a set service class. Can - e.g. be some tables in a database, a connection to a Solr server or other - external services, etc. + One specific place for indexing data, using a specific service class. For + example this could be some tables in a database, a connection to a Solr server + or other external services, etc. - Index: A configuration object for indexing data of a specific type. What and how data is indexed is determined by its settings. Also keeps track of which items diff --git a/www7/sites/all/modules/contrib/search_api/contrib/search_api_facetapi/search_api_facetapi.info b/www7/sites/all/modules/contrib/search_api/contrib/search_api_facetapi/search_api_facetapi.info index 022eefc0e..c8238c146 100644 --- a/www7/sites/all/modules/contrib/search_api/contrib/search_api_facetapi/search_api_facetapi.info +++ b/www7/sites/all/modules/contrib/search_api/contrib/search_api_facetapi/search_api_facetapi.info @@ -9,9 +9,9 @@ files[] = plugins/facetapi/adapter.inc files[] = plugins/facetapi/query_type_term.inc files[] = plugins/facetapi/query_type_date.inc -; Information added by Drupal.org packaging script on 2017-02-23 -version = "7.x-1.21" +; Information added by Drupal.org packaging script on 2017-07-18 +version = "7.x-1.22" core = "7.x" project = "search_api" -datestamp = "1487844493" +datestamp = "1500368049" diff --git a/www7/sites/all/modules/contrib/search_api/contrib/search_api_views/includes/handler_filter_fulltext.inc b/www7/sites/all/modules/contrib/search_api/contrib/search_api_views/includes/handler_filter_fulltext.inc index 320adc363..dcb3e263d 100644 --- a/www7/sites/all/modules/contrib/search_api/contrib/search_api_views/includes/handler_filter_fulltext.inc +++ b/www7/sites/all/modules/contrib/search_api/contrib/search_api_views/includes/handler_filter_fulltext.inc @@ -121,6 +121,11 @@ class SearchApiViewsHandlerFilterFulltext extends SearchApiViewsHandlerFilterTex $words = preg_split('/\s+/', $input); $quoted = FALSE; foreach ($words as $i => $word) { + $word_length = drupal_strlen($word); + if (!$word_length) { + unset($words[$i]); + continue; + } // Protect quoted strings. if ($quoted && $word[strlen($word) - 1] === '"') { $quoted = FALSE; @@ -130,7 +135,7 @@ class SearchApiViewsHandlerFilterFulltext extends SearchApiViewsHandlerFilterTex $quoted = TRUE; continue; } - if (drupal_strlen($word) < $this->options['min_length']) { + if ($word_length < $this->options['min_length']) { unset($words[$i]); } } diff --git a/www7/sites/all/modules/contrib/search_api/contrib/search_api_views/includes/query.inc b/www7/sites/all/modules/contrib/search_api/contrib/search_api_views/includes/query.inc index 4394c5f33..ae58b9a72 100644 --- a/www7/sites/all/modules/contrib/search_api/contrib/search_api_views/includes/query.inc +++ b/www7/sites/all/modules/contrib/search_api/contrib/search_api_views/includes/query.inc @@ -135,7 +135,9 @@ class SearchApiViewsQuery extends views_plugin_query { * The order to sort items in - either 'ASC' or 'DESC'. Defaults to 'ASC'. */ public function add_selector_orderby($selector, $order = 'ASC') { - $this->query->sort($selector, $order); + if (!$this->errors) { + $this->query->sort($selector, $order); + } } /** @@ -213,7 +215,7 @@ class SearchApiViewsQuery extends views_plugin_query { '#default_value' => $this->options['search_api_bypass_access'], ); - if ($this->index->getEntityType()) { + if ($this->index && $this->index->getEntityType()) { $form['entity_access'] = array( '#type' => 'checkbox', '#title' => t('Additional access checks on result entities'), diff --git a/www7/sites/all/modules/contrib/search_api/contrib/search_api_views/search_api_views.info b/www7/sites/all/modules/contrib/search_api/contrib/search_api_views/search_api_views.info index 2ba7ccaa2..7dc38c115 100644 --- a/www7/sites/all/modules/contrib/search_api/contrib/search_api_views/search_api_views.info +++ b/www7/sites/all/modules/contrib/search_api/contrib/search_api_views/search_api_views.info @@ -27,9 +27,9 @@ files[] = includes/handler_sort.inc files[] = includes/plugin_cache.inc files[] = includes/query.inc -; Information added by Drupal.org packaging script on 2017-02-23 -version = "7.x-1.21" +; Information added by Drupal.org packaging script on 2017-07-18 +version = "7.x-1.22" core = "7.x" project = "search_api" -datestamp = "1487844493" +datestamp = "1500368049" diff --git a/www7/sites/all/modules/contrib/search_api/includes/callback_add_aggregation.inc b/www7/sites/all/modules/contrib/search_api/includes/callback_add_aggregation.inc index 069c41073..2e744f60f 100644 --- a/www7/sites/all/modules/contrib/search_api/includes/callback_add_aggregation.inc +++ b/www7/sites/all/modules/contrib/search_api/includes/callback_add_aggregation.inc @@ -20,11 +20,23 @@ class SearchApiAlterAddAggregation extends SearchApiAbstractAlterCallback { */ protected $reductionType; + /** + * A separator to use when the aggregation type is 'fulltext'. + * + * Used to temporarily store a string separator when the aggregation type is + * "fulltext", for use in SearchApiAlterAddAggregation::reduce() with + * array_reduce(). + * + * @var string + */ + protected $fulltextReductionSeparator; + public function configurationForm() { $form['#attached']['css'][] = drupal_get_path('module', 'search_api') . '/search_api.admin.css'; $fields = $this->index->getFields(FALSE); $field_options = array(); + $field_properties = array(); foreach ($fields as $name => $field) { $field_options[$name] = check_plain($field['name']); $field_properties[$name] = array( @@ -79,9 +91,23 @@ class SearchApiAlterAddAggregation extends SearchApiAbstractAlterCallback { '#required' => TRUE, ); $form['fields'][$name]['type_descriptions'] = $type_descriptions; + $type_selector = ':input[name="callbacks[search_api_alter_add_aggregation][settings][fields][' . $name . '][type]"]'; foreach (array_keys($types) as $type) { - $form['fields'][$name]['type_descriptions'][$type]['#states']['visible'][':input[name="callbacks[search_api_alter_add_aggregation][settings][fields][' . $name . '][type]"]']['value'] = $type; + $form['fields'][$name]['type_descriptions'][$type]['#states']['visible'][$type_selector]['value'] = $type; } + $form['fields'][$name]['separator'] = array( + '#type' => 'textfield', + '#title' => t('Fulltext separator'), + '#description' => t('For aggregation type "Fulltext", set the text that should be used to separate the aggregated field values. Use "\t" for tabs and "\n" for newline characters.'), + '#default_value' => addcslashes(isset($field['separator']) ? $field['separator'] : "\n\n", "\0..\37\\"), + '#states' => array( + 'visible' => array( + $type_selector => array( + 'value' => 'fulltext', + ), + ), + ), + ); $form['fields'][$name]['fields'] = array_merge($field_properties, array( '#type' => 'checkboxes', '#title' => t('Contained fields'), @@ -125,11 +151,12 @@ class SearchApiAlterAddAggregation extends SearchApiAbstractAlterCallback { return; } foreach ($values['fields'] as $name => $field) { - $fields = $values['fields'][$name]['fields'] = array_values(array_filter($field['fields'])); unset($values['fields'][$name]['actions']); + $fields = $values['fields'][$name]['fields'] = array_values(array_filter($field['fields'])); if ($field['name'] && !$fields) { form_error($form['fields'][$name]['fields'], t('You have to select at least one field to aggregate. If you want to remove an aggregated field, please delete its name.')); } + $values['fields'][$name]['separator'] = stripcslashes($field['separator']); } } @@ -176,6 +203,7 @@ class SearchApiAlterAddAggregation extends SearchApiAbstractAlterCallback { $values = $this->flattenArray($values); $this->reductionType = $field['type']; + $this->fulltextReductionSeparator = isset($field['separator']) ? $field['separator'] : "\n\n"; $item->$name = array_reduce($values, array($this, 'reduce'), NULL); if ($field['type'] == 'count' && !$item->$name) { $item->$name = 0; @@ -192,7 +220,7 @@ class SearchApiAlterAddAggregation extends SearchApiAbstractAlterCallback { public function reduce($a, $b) { switch ($this->reductionType) { case 'fulltext': - return isset($a) ? $a . "\n\n" . $b : $b; + return isset($a) ? $a . $this->fulltextReductionSeparator . $b : $b; case 'sum': return $a + $b; case 'count': diff --git a/www7/sites/all/modules/contrib/search_api/includes/callback_add_hierarchy.inc b/www7/sites/all/modules/contrib/search_api/includes/callback_add_hierarchy.inc index d69badb61..b9aada53a 100644 --- a/www7/sites/all/modules/contrib/search_api/includes/callback_add_hierarchy.inc +++ b/www7/sites/all/modules/contrib/search_api/includes/callback_add_hierarchy.inc @@ -108,7 +108,7 @@ class SearchApiAlterAddHierarchy extends SearchApiAbstractAlterCallback { $this->extractHierarchy($child, $prop, $values[$key]); } foreach ($values as $key => $value) { - $item->$key = $value; + $item->$key = array_values($value); } } } diff --git a/www7/sites/all/modules/contrib/search_api/includes/callback_user_content.inc b/www7/sites/all/modules/contrib/search_api/includes/callback_user_content.inc new file mode 100644 index 000000000..168f3ae1c --- /dev/null +++ b/www7/sites/all/modules/contrib/search_api/includes/callback_user_content.inc @@ -0,0 +1,57 @@ +getEntityType() === 'user'; + } + + /** + * {@inheritdoc} + */ + public function propertyInfo() { + return array( + 'search_api_user_content' => array( + 'label' => t('User content'), + 'description' => t('The nodes created by this user'), + 'type' => 'list', + ), + ); + } + + /** + * {@inheritdoc} + */ + public function alterItems(array &$items) { + $uids = array(); + foreach ($items as $item) { + $uids[] = $item->uid; + } + + $sql = 'SELECT nid, uid FROM {node} WHERE uid IN (:uids)'; + $nids = db_query($sql, array(':uids' => $uids)); + $user_nodes = array(); + foreach ($nids as $row) { + $user_nodes[$row->uid][] = $row->nid; + } + + foreach ($items as $item) { + $item->search_api_user_content = array(); + if (!empty($user_nodes[$item->uid])) { + $item->search_api_user_content = $user_nodes[$item->uid]; + } + } + } + +} diff --git a/www7/sites/all/modules/contrib/search_api/includes/processor_stemmer.inc b/www7/sites/all/modules/contrib/search_api/includes/processor_stemmer.inc index a6c05489e..ebb1a9ce3 100644 --- a/www7/sites/all/modules/contrib/search_api/includes/processor_stemmer.inc +++ b/www7/sites/all/modules/contrib/search_api/includes/processor_stemmer.inc @@ -24,12 +24,11 @@ class SearchApiPorterStemmer extends SearchApiAbstractProcessor { $form = parent::configurationForm(); $args = array( - '!algorithm' => url('https://github.com/markfullmer/porter2'), - '!exclusions' => url('https://github.com/markfullmer/porter2#user-content-custom-exclusions'), + '@algorithm' => url('http://snowball.tartarus.org/algorithms/english/stemmer.html'), ); $form += array( 'help' => array( - '#markup' => '

' . t('Optionally, provide an exclusion list to override the stemmer algorithm. Read about the algorithm and exclusions.', $args) . '

', + '#markup' => '

' . t('Optionally, provide an exclusion list to override the stemmer algorithm. (Read about the algorithm.)', $args) . '

', ), 'exceptions' => array( '#type' => 'textarea', diff --git a/www7/sites/all/modules/contrib/search_api/search_api.info b/www7/sites/all/modules/contrib/search_api/search_api.info index e7317531c..5883eba9a 100644 --- a/www7/sites/all/modules/contrib/search_api/search_api.info +++ b/www7/sites/all/modules/contrib/search_api/search_api.info @@ -16,6 +16,7 @@ files[] = includes/callback_language_control.inc files[] = includes/callback_node_access.inc files[] = includes/callback_node_status.inc files[] = includes/callback_role_filter.inc +files[] = includes/callback_user_content.inc files[] = includes/callback_user_status.inc files[] = includes/datasource.inc files[] = includes/datasource_entity.inc @@ -37,9 +38,9 @@ files[] = includes/service.inc configure = admin/config/search/search_api -; Information added by Drupal.org packaging script on 2017-02-23 -version = "7.x-1.21" +; Information added by Drupal.org packaging script on 2017-07-18 +version = "7.x-1.22" core = "7.x" project = "search_api" -datestamp = "1487844493" +datestamp = "1500368049" diff --git a/www7/sites/all/modules/contrib/search_api/search_api.module b/www7/sites/all/modules/contrib/search_api/search_api.module index 61385c5d3..3a955fe7c 100644 --- a/www7/sites/all/modules/contrib/search_api/search_api.module +++ b/www7/sites/all/modules/contrib/search_api/search_api.module @@ -1103,6 +1103,11 @@ function search_api_search_api_alter_callback_info() { 'description' => t('Exclude unpublished nodes from the index. Caution: This only affects the indexed nodes themselves. If an enabled node has references to disabled nodes, those will still be indexed (or displayed) normally.'), 'class' => 'SearchApiAlterNodeStatus', ); + $callbacks['search_api_alter_user_content'] = array( + 'name' => t('Add user content'), + 'description' => t('Allows indexing of nodes (and their fields) created by the indexed user. (Caution: This might lead to performance problems, or even errors during indexing, on larger sites.)'), + 'class' => 'SearchApiAlterAddUserContent', + ); $callbacks['search_api_alter_user_status'] = array( 'name' => t('Exclude blocked users'), 'description' => t('Exclude blocked users from the index. Caution: This only affects the indexed users themselves. If an active user account includes a reference to a disabled user, that reference will still be indexed (or displayed) normally.'), diff --git a/www7/sites/all/modules/contrib/search_api/tests/search_api_test.info b/www7/sites/all/modules/contrib/search_api/tests/search_api_test.info index 95c999ab7..b8f249677 100644 --- a/www7/sites/all/modules/contrib/search_api/tests/search_api_test.info +++ b/www7/sites/all/modules/contrib/search_api/tests/search_api_test.info @@ -10,9 +10,9 @@ files[] = search_api_test.module hidden = TRUE -; Information added by Drupal.org packaging script on 2017-02-23 -version = "7.x-1.21" +; Information added by Drupal.org packaging script on 2017-07-18 +version = "7.x-1.22" core = "7.x" project = "search_api" -datestamp = "1487844493" +datestamp = "1500368049" From ea70692ee9f5c4045f6eeac6c696984b0710efda Mon Sep 17 00:00:00 2001 From: Florent Torregrosa Date: Thu, 24 Aug 2017 14:37:33 +0200 Subject: [PATCH 4/5] Update views to 7.x-3.18 --- .../all/modules/contrib/views/README.txt | 53 ++++-- .../modules/contrib/views/includes/ajax.inc | 2 +- .../contrib/views/includes/handlers.inc | 12 ++ .../contrib/views/modules/node.views.inc | 2 +- .../node/views_plugin_row_node_view.inc | 2 +- .../contrib/views/modules/search.views.inc | 4 +- .../views_handler_filter_term_node_tid.inc | 2 +- .../views/plugins/views_plugin_display.inc | 54 +++++- .../views/plugins/views_plugin_pager_full.inc | 2 +- .../contrib/views/tests/views_ajax.test | 109 ++++++++++++ .../contrib/views/tests/views_test.info | 6 +- .../views/tests/views_test.views_default.inc | 52 ++++++ .../contrib/views/tests/views_view.test | 7 + .../contrib/views/theme/views-more.tpl.php | 5 +- .../all/modules/contrib/views/views.info | 7 +- .../all/modules/contrib/views/views.install | 11 +- .../all/modules/contrib/views/views.module | 26 +++ .../modules/contrib/views/views.tokens.inc | 1 - .../all/modules/contrib/views/views_ui.info | 7 +- .../all/modules/contrib/views/views_ui.module | 166 +++++++++++++----- 20 files changed, 444 insertions(+), 86 deletions(-) create mode 100644 www7/sites/all/modules/contrib/views/tests/views_ajax.test diff --git a/www7/sites/all/modules/contrib/views/README.txt b/www7/sites/all/modules/contrib/views/README.txt index 8097eb453..3e361c5d1 100644 --- a/www7/sites/all/modules/contrib/views/README.txt +++ b/www7/sites/all/modules/contrib/views/README.txt @@ -1,19 +1,50 @@ +CONTENTS OF THIS FILE +--------------------- + + * Introduction + * Requirements + * Installation + * Configuration + * Recommended + + +INTRODUCTION +------------ Welcome to Views 3. Please see the advanced help for more information. -If you're having trouble installing this module, please ensure that your -tar program is not flattening the directory tree, truncating filenames -or losing files. +If you're having trouble installing this module, please ensure that your tar +program is not flattening the directory tree, truncating filenames or losing +files. + + +REQUIREMENTS +------------ + +This module requires the following modules: + + * Chaos tool suite (ctools) (https://drupal.org/project/ctools) + + +INSTALLATION +------------ + +Install as you would normally install a contributed Drupal module. See: +https://drupal.org/documentation/install/modules-themes/modules-7 for further +information. + +Navigate to administer >> modules. Enable Views and Views UI. -Installing Views: -Place the entirety of this directory in sites/all/modules/views -You must also install the CTools module (http://www.drupal.org/project/ctools) to use Views. +RECOMMENDED +----------- -Navigate to administer >> build >> modules. Enable Views and Views UI. + * SimpleViews (https://www.drupal.org/project/simpleviews): + If you're new to Views, try the Simple Views which can create some often used + Views for you, this might save you some time. -If you're new to Views, try the Simple Views module which can create some -often used Views for you, this might save you some time. + * Advanced help (https://www.drupal.org/project/advanced_help): + If you enable the advanced help, Views will provide more and better help. -Here you can find many modules extending the functionality of Views: - http://drupal.org/taxonomy/term/89 + * Here you can find many modules extending the functionality of Views: + http://drupal.org/taxonomy/term/89 diff --git a/www7/sites/all/modules/contrib/views/includes/ajax.inc b/www7/sites/all/modules/contrib/views/includes/ajax.inc index 4b8825a6d..90e4ca9b1 100644 --- a/www7/sites/all/modules/contrib/views/includes/ajax.inc +++ b/www7/sites/all/modules/contrib/views/includes/ajax.inc @@ -40,7 +40,7 @@ function views_ajax() { // Load the view. $view = views_get_view($name); - if ($view && $view->access($display_id)) { + if ($view && $view->access($display_id) && $view->set_display($display_id) && $view->display_handler->use_ajax()) { // Fix 'q' for paging. if (!empty($path)) { $_GET['q'] = $path; diff --git a/www7/sites/all/modules/contrib/views/includes/handlers.inc b/www7/sites/all/modules/contrib/views/includes/handlers.inc index b1ce1a315..c8fd3b034 100644 --- a/www7/sites/all/modules/contrib/views/includes/handlers.inc +++ b/www7/sites/all/modules/contrib/views/includes/handlers.inc @@ -1544,6 +1544,12 @@ class views_join { // Tack on the extra. if (isset($this->extra)) { + // If extra has been provided as string instead of an array, convert it + // to an array. + if (!is_array($this->extra)) { + $this->extra = array($this->extra); + } + $extras = array(); foreach ($this->extra as $info) { if (is_array($info)) { @@ -1658,6 +1664,12 @@ class views_join_subquery extends views_join { // This is just copied verbatim from the parent class, which itself has a // bug: http://drupal.org/node/1118100 if (isset($this->extra)) { + // If extra has been provided as string instead of an array, convert it + // to an array. + if (!is_array($this->extra)) { + $this->extra = array($this->extra); + } + $extras = array(); foreach ($this->extra as $info) { if (is_array($info)) { diff --git a/www7/sites/all/modules/contrib/views/modules/node.views.inc b/www7/sites/all/modules/contrib/views/modules/node.views.inc index 9e80c1109..57e6b28fc 100644 --- a/www7/sites/all/modules/contrib/views/modules/node.views.inc +++ b/www7/sites/all/modules/contrib/views/modules/node.views.inc @@ -733,7 +733,7 @@ function node_row_node_view_preprocess_node(&$vars) { unset($vars['content']['links']); } - if (module_exists('comments') && !empty($options['comments']) && user_access('access comments') && $node->comment) { + if (module_exists('comment') && !empty($options['comments']) && user_access('access comments') && $node->comment) { $vars['content']['comments'] = comment_node_page_additions($node); } } diff --git a/www7/sites/all/modules/contrib/views/modules/node/views_plugin_row_node_view.inc b/www7/sites/all/modules/contrib/views/modules/node/views_plugin_row_node_view.inc index 26761a491..70e49234d 100644 --- a/www7/sites/all/modules/contrib/views/modules/node/views_plugin_row_node_view.inc +++ b/www7/sites/all/modules/contrib/views/modules/node/views_plugin_row_node_view.inc @@ -61,7 +61,7 @@ class views_plugin_row_node_view extends views_plugin_row { '#type' => 'checkbox', '#title' => t('Display comments'), '#default_value' => $this->options['comments'], - '#access' => module_exists('comments'), + '#access' => module_exists('comment'), ); } diff --git a/www7/sites/all/modules/contrib/views/modules/search.views.inc b/www7/sites/all/modules/contrib/views/modules/search.views.inc index dad84bb7c..a956ec22a 100644 --- a/www7/sites/all/modules/contrib/views/modules/search.views.inc +++ b/www7/sites/all/modules/contrib/views/modules/search.views.inc @@ -43,14 +43,14 @@ function search_views_data() { 'left_table' => 'search_index', 'left_field' => 'sid', 'field' => 'sid', - 'extra' => 'search_index.type = search_dataset.type', + 'extra' => array('search_index.type = search_dataset.type'), 'type' => 'INNER', ), 'users' => array( 'left_table' => 'search_index', 'left_field' => 'sid', 'field' => 'sid', - 'extra' => 'search_index.type = search_dataset.type', + 'extra' => array('search_index.type = search_dataset.type'), 'type' => 'INNER', ), ); diff --git a/www7/sites/all/modules/contrib/views/modules/taxonomy/views_handler_filter_term_node_tid.inc b/www7/sites/all/modules/contrib/views/modules/taxonomy/views_handler_filter_term_node_tid.inc index 574617a10..6c3339296 100644 --- a/www7/sites/all/modules/contrib/views/modules/taxonomy/views_handler_filter_term_node_tid.inc +++ b/www7/sites/all/modules/contrib/views/modules/taxonomy/views_handler_filter_term_node_tid.inc @@ -275,7 +275,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on // We only validate if they've chosen the text field style. if ($this->options['type'] != 'textfield') { - if ($form_state['values'][$identifier] != 'All') { + if (isset($form_state['values'][$identifier]) && $form_state['values'][$identifier] != 'All') { $this->validated_exposed_input = (array) $form_state['values'][$identifier]; } return; diff --git a/www7/sites/all/modules/contrib/views/plugins/views_plugin_display.inc b/www7/sites/all/modules/contrib/views/plugins/views_plugin_display.inc index b7aa6cee2..0750fa835 100644 --- a/www7/sites/all/modules/contrib/views/plugins/views_plugin_display.inc +++ b/www7/sites/all/modules/contrib/views/plugins/views_plugin_display.inc @@ -365,6 +365,19 @@ class views_plugin_display extends views_plugin { return FALSE; } + /** + * Should the enabled display more link being opened in an new window? + * + * @codingStandardsIgnoreStart + */ + function use_more_open_new_window() { + // @codingStandardsIgnoreEnd + if (!empty($this->definition['use more'])) { + return $this->get_option('open_new_window'); + } + return FALSE; + } + /** * Does the display have custom link text? */ @@ -414,9 +427,29 @@ class views_plugin_display extends views_plugin { 'hide_admin_links' => array('hide_admin_links'), 'group_by' => array('group_by'), 'query' => array('query'), - 'use_more' => array('use_more', 'use_more_always', 'use_more_text'), - 'use_more_always' => array('use_more', 'use_more_always', 'use_more_text'), - 'use_more_text' => array('use_more', 'use_more_always', 'use_more_text'), + 'use_more' => array('use_more', + 'use_more_always', + 'open_new_window', + 'use_more_text', + ), + 'use_more_always' => array( + 'use_more', + 'use_more_always', + 'open_new_window', + 'use_more_text', + ), + 'use_more_text' => array( + 'use_more', + 'use_more_always', + 'open_new_window', + 'use_more_text', + ), + 'open_new_window' => array( + 'use_more', + 'use_more_always', + 'open_new_window', + 'use_more_text', + ), 'link_display' => array('link_display', 'link_url'), // Force these to cascade properly. @@ -481,6 +514,7 @@ class views_plugin_display extends views_plugin { 'pager_options' => TRUE, 'use_more' => TRUE, 'use_more_always' => TRUE, + 'open_new_window' => FALSE, 'use_more_text' => TRUE, 'exposed_form' => TRUE, 'exposed_form_options' => TRUE, @@ -1529,6 +1563,17 @@ class views_plugin_display extends views_plugin { 'edit-use-more' => array(TRUE), ), ); + + $form['open_new_window'] = array( + '#type' => 'checkbox', + '#title' => t("Open 'more' link in new window (target='blank')"), + '#description' => t("Leave this unchecked to open the more link in the same window."), + '#default_value' => $this->get_option('open_new_window'), + '#dependency' => array( + 'edit-use-more' => array(TRUE), + ), + ); + $form['use_more_text'] = array( '#type' => 'textfield', '#title' => t('More link text'), @@ -2386,6 +2431,7 @@ class views_plugin_display extends views_plugin { case 'use_more': $this->set_option($section, intval($form_state['values'][$section])); $this->set_option('use_more_always', !intval($form_state['values']['use_more_always'])); + $this->set_option('open_new_window', $form_state['values']['open_new_window']) == '1'; $this->set_option('use_more_text', $form_state['values']['use_more_text']); case 'distinct': $this->set_option($section, $form_state['values'][$section]); @@ -2599,7 +2645,7 @@ class views_plugin_display extends views_plugin { $path = check_url(url($path, $url_options)); - return theme($theme, array('more_url' => $path, 'link_text' => check_plain($this->use_more_text()), 'view' => $this->view)); + return theme($theme, array('more_url' => $path, 'new_window' => $this->use_more_open_new_window(), 'link_text' => check_plain($this->use_more_text()), 'view' => $this->view)); } } } diff --git a/www7/sites/all/modules/contrib/views/plugins/views_plugin_pager_full.inc b/www7/sites/all/modules/contrib/views/plugins/views_plugin_pager_full.inc index aedb2237a..084aa0a48 100644 --- a/www7/sites/all/modules/contrib/views/plugins/views_plugin_pager_full.inc +++ b/www7/sites/all/modules/contrib/views/plugins/views_plugin_pager_full.inc @@ -417,7 +417,7 @@ class views_plugin_pager_full extends views_plugin_pager { function exposed_form_validate(&$form, &$form_state) { if (!empty($form_state['values']['offset']) && trim($form_state['values']['offset'])) { if (!is_numeric($form_state['values']['offset']) || $form_state['values']['offset'] < 0) { - form_set_error('offset', t('Offset must be an number greather or equal than 0.')); + form_set_error('offset', t('Offset must be an number greater or equal than 0.')); } } } diff --git a/www7/sites/all/modules/contrib/views/tests/views_ajax.test b/www7/sites/all/modules/contrib/views/tests/views_ajax.test new file mode 100644 index 000000000..685d09ef1 --- /dev/null +++ b/www7/sites/all/modules/contrib/views/tests/views_ajax.test @@ -0,0 +1,109 @@ + 'Ajax', + 'description' => 'Test views with and without ajax enabled.', + 'group' => 'Views Handlers', + ); + } + + public function setUp() { + parent::setUp('views', 'views_test'); + // Create a second node. + $this->drupalCreateNode(array('type' => 'article', 'status' => NODE_PUBLISHED)); + } + + /** + * Perform a simple AJAX POST HTTP request. + * + * @param string $path + * Drupal path where the request should be POSTed. + * @param string $accept + * The value for the "Accept" header. Usually either 'application/json' or + * 'application/vnd.drupal-ajax'. + * @param array $post + * The POST data. When making a 'application/vnd.drupal-ajax' request, the + * Ajax page state data should be included. Use getAjaxPageStatePostData() + * for that. + * + * @return + * The content returned from the call to curl_exec(). + */ + public function simpleAjaxPost($path, $accept, $post = array()) { + $options['absolute'] = TRUE; + foreach ($post as $key => $value) { + // Encode according to application/x-www-form-urlencoded + // Both names and values needs to be urlencoded, according to + // http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1 + $post[$key] = urlencode($key) . '=' . urlencode($value); + } + $postfields = implode('&', $post); + $headers = array( + 'Accept: ' . $accept, + 'Content-Type: application/x-www-form-urlencoded', + ); + return $this->curlExec(array( + CURLOPT_URL => url($path, $options), + CURLOPT_POST => TRUE, + CURLOPT_POSTFIELDS => $postfields, + CURLOPT_HTTPHEADER => $headers, + )); + } + + /** + * Tests an ajax and non-ajax view. + */ + public function testAjaxView() { + $this->drupalCreateNode(); + $this->drupalGet('test_ajax_view'); + $drupal_settings = $this->drupalGetSettings(); + $this->assertTrue(isset($drupal_settings['views']['ajax_path']), 'The Ajax callback path is set in drupalSettings.'); + $this->assertEqual(count($drupal_settings['views']['ajaxViews']), 1); + $view_entry = current(array_keys($drupal_settings['views']['ajaxViews'])); + $this->assertEqual($drupal_settings['views']['ajaxViews'][$view_entry]['view_name'], 'test_ajax_view', 'The view\'s ajaxViews array entry has the correct \'view_name\' key.'); + $this->assertEqual($drupal_settings['views']['ajaxViews'][$view_entry]['view_display_id'], 'page_1', 'The view\'s ajaxViews array entry has the correct \'view_display_id\' key.'); + + $post = array( + 'view_name' => 'test_ajax_view', + 'view_display_id' => 'page_1', + ); + + $response = $this->simpleAjaxPost('views/ajax', 'application/json', $post); + $data = drupal_json_decode($response); + + $this->assertTrue(isset($data[0]['settings']['views']['ajaxViews'])); + + // Ensure that the view insert command is part of the result. + $this->assertEqual($data[1]['command'], 'insert'); + $this->assertTrue(strpos($data[1]['selector'], '.view-dom-id-') === 0); + + $this->drupalSetContent($data[1]['data']); + $result = $this->xpath('//div[contains(@class, "views-row")]'); + $this->assertEqual(count($result), 2, 'Ensure that two items are rendered in the HTML.'); + + $post = array( + 'view_name' => 'test_noajax_view', + 'view_display_id' => 'default', + ); + + $response = $this->simpleAjaxPost('views/ajax', 'application/json', $post); + $data = drupal_json_decode($response); + // In Drupal 7 we get an ajax response with no commands instead of a 403 if + // the view cannot be accessed. + foreach ($data as $item) { + $this->assertIdentical('settings', $item['command']); + $this->assertTrue(empty($item['data'])); + } + } + +} diff --git a/www7/sites/all/modules/contrib/views/tests/views_test.info b/www7/sites/all/modules/contrib/views/tests/views_test.info index b7864a8de..c23f6c03d 100644 --- a/www7/sites/all/modules/contrib/views/tests/views_test.info +++ b/www7/sites/all/modules/contrib/views/tests/views_test.info @@ -5,9 +5,9 @@ core = 7.x dependencies[] = views hidden = TRUE -; Information added by Drupal.org packaging script on 2017-04-02 -version = "7.x-3.16" +; Information added by Drupal.org packaging script on 2017-08-23 +version = "7.x-3.18" core = "7.x" project = "views" -datestamp = "1491158591" +datestamp = "1503495103" diff --git a/www7/sites/all/modules/contrib/views/tests/views_test.views_default.inc b/www7/sites/all/modules/contrib/views/tests/views_test.views_default.inc index 8843b26a0..fa49acb9e 100644 --- a/www7/sites/all/modules/contrib/views/tests/views_test.views_default.inc +++ b/www7/sites/all/modules/contrib/views/tests/views_test.views_default.inc @@ -274,5 +274,57 @@ function views_test_views_default_views() { $views[$view->name] = $view; + $view = new view(); + $view->name = 'test_ajax_view'; + $view->description = ''; + $view->tag = ''; + $view->base_table = 'node'; + $view->human_name = ''; + $view->core = 0; + $view->api_version = '3.0'; + $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ + + /* Display: Master */ + $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['use_ajax'] = TRUE; + $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'; + $handler->display->display_options['exposed_form']['type'] = 'basic'; + $handler->display->display_options['pager']['type'] = 'none'; + $handler->display->display_options['style_plugin'] = 'default'; + $handler->display->display_options['row_plugin'] = 'node'; + + /* Display: Page */ + $handler = $view->new_display('page', 'Page', 'page_1'); + $handler->display->display_options['path'] = 'test_ajax_view'; + + $views[$view->name] = $view; + + $view = new view(); + $view->name = 'test_noajax_view'; + $view->description = ''; + $view->tag = ''; + $view->base_table = 'node'; + $view->human_name = ''; + $view->core = 0; + $view->api_version = '3.0'; + $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ + + /* Display: Master */ + $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['use_ajax'] = FALSE; + $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'; + $handler->display->display_options['exposed_form']['type'] = 'basic'; + $handler->display->display_options['pager']['type'] = 'none'; + $handler->display->display_options['style_plugin'] = 'default'; + $handler->display->display_options['row_plugin'] = 'node'; + + $views[$view->name] = $view; + return $views; } diff --git a/www7/sites/all/modules/contrib/views/tests/views_view.test b/www7/sites/all/modules/contrib/views/tests/views_view.test index d268a0c12..e72e81118 100644 --- a/www7/sites/all/modules/contrib/views/tests/views_view.test +++ b/www7/sites/all/modules/contrib/views/tests/views_view.test @@ -7,8 +7,11 @@ /** * Views class tests. + * + * @codingStandardsIgnoreStart */ class ViewsViewTest extends ViewsSqlTest { + // @codingStandardsIgnoreEnd public static function getInfo() { return array( 'name' => 'Test the view class', @@ -227,6 +230,8 @@ class ViewsViewTest extends ViewsSqlTest { 'default' => 'default', 'page_1' => 'page_1', ); + + // @codingStandardsIgnoreLine $translatables['test_destroy'] = array( t('Master'), t('more'), @@ -272,6 +277,8 @@ class ViewsViewTest extends ViewsSqlTest { $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'fields'; + + // @codingStandardsIgnoreLine $translatables['test_view_delete'] = array( t('Defaults'), t('more'), diff --git a/www7/sites/all/modules/contrib/views/theme/views-more.tpl.php b/www7/sites/all/modules/contrib/views/theme/views-more.tpl.php index 0b7080bc5..a2e1703cb 100644 --- a/www7/sites/all/modules/contrib/views/theme/views-more.tpl.php +++ b/www7/sites/all/modules/contrib/views/theme/views-more.tpl.php @@ -7,13 +7,16 @@ * - $view: The view object. * - $more_url: the url for the more link. * - $link_text: the text for the more link. + * - $new_window: The flag that indicates if link should be opened in a new + * window. * * @ingroup views_templates */ ?> diff --git a/www7/sites/all/modules/contrib/views/views.info b/www7/sites/all/modules/contrib/views/views.info index fc903ed31..021c64e9d 100644 --- a/www7/sites/all/modules/contrib/views/views.info +++ b/www7/sites/all/modules/contrib/views/views.info @@ -301,6 +301,7 @@ files[] = tests/styles/views_plugin_style_unformatted.test files[] = tests/views_access.test files[] = tests/views_analyze.test files[] = tests/views_basic.test +files[] = tests/views_ajax.test files[] = tests/views_argument_default.test files[] = tests/views_argument_validator.test files[] = tests/views_exposed_form.test @@ -327,9 +328,9 @@ files[] = tests/views_cache.test files[] = tests/views_view.test files[] = tests/views_ui.test -; Information added by Drupal.org packaging script on 2017-04-02 -version = "7.x-3.16" +; Information added by Drupal.org packaging script on 2017-08-23 +version = "7.x-3.18" core = "7.x" project = "views" -datestamp = "1491158591" +datestamp = "1503495103" diff --git a/www7/sites/all/modules/contrib/views/views.install b/www7/sites/all/modules/contrib/views/views.install index a8eeeefd7..35c570c38 100644 --- a/www7/sites/all/modules/contrib/views/views.install +++ b/www7/sites/all/modules/contrib/views/views.install @@ -252,8 +252,7 @@ function views_schema_6000() { ), ); - // $schema['cache_views_data'] added in views_schema_6006() - + // $schema['cache_views_data'] added in views_schema_6006(). return $schema; } @@ -295,8 +294,10 @@ function views_update_6001() { update_sql("UPDATE {blocks} SET delta = CONCAT(delta, '-block_1') WHERE module = 'views'"); } -// NOTE: Update 6002 removed because it did not always work. -// Update 6004 implements the change correctly. +/* + * NOTE: Update 6002 removed because it did not always work. + * Update 6004 implements the change correctly. + */ /** * Add missing unique key. @@ -487,7 +488,7 @@ function views_update_6011() { */ function views_update_6012() { // There is only one simple query to run. - $update = db_update('blocks') + db_update('blocks') ->condition('module', 'views') ->condition('delta', db_like('-exp-') . '%', 'LIKE') ->fields(array('cache' => DRUPAL_NO_CACHE)); diff --git a/www7/sites/all/modules/contrib/views/views.module b/www7/sites/all/modules/contrib/views/views.module index d2b582b86..2093aa742 100644 --- a/www7/sites/all/modules/contrib/views/views.module +++ b/www7/sites/all/modules/contrib/views/views.module @@ -9,6 +9,32 @@ * incoming page and block requests. */ +/** + * Implements hook_help(). + */ +function views_help($path, $arg) { + switch ($path) { + case 'admin/help#views': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Views module provides a back end to fetch information from content, user accounts, taxonomy terms, and other entities from the database and present it to the user as a grid, HTML list, table, unformatted list, etc. The resulting displays are known generally as views.') . '

'; + $output .= '

' . t('For more information, see the online documentation for the Views.', array('@views' => 'https://www.drupal.org/documentation/modules/views')) . '

'; + $output .= '

' . t('In order to create and modify your own views using the administration and configuration user interface, you will need to enable either the Views UI module in core or a contributed module that provides a user interface for Views. See the Views UI module help page for more information.') . '

'; + + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Adding functionality to administrative pages') . '
'; + $output .= '
' . t('The Views module adds functionality to some core administration pages. For example, admin/content uses Views to filter and sort content. With Views uninstalled, admin/content is more limited.') . '
'; + + $output .= '
' . t('Expanding Views functionality') . '
'; + $output .= '
' . t('Contributed projects that support the Views module can be found in the online documentation for Views-related contributed modules..', array('@views-related' => 'https://www.drupal.org/documentation/modules/views/add-ons')) . '
'; + + $output .= '
' . t('Improving table accessibility') . '
'; + $output .= '
' . t('Views tables include semantic markup to improve accessibility. Data cells are automatically associated with header cells through id and header attributes. To improve the accessibility of your tables you can add descriptive elements within the Views table settings. The caption element can introduce context for a table, making it easier to understand. The summary element can provide an overview of how the data has been organized and how to navigate the table. Both the caption and summary are visible by default and also implemented according to HTML5 guidelines.') . '
'; + return $output; + } +} + /** * Advertise the current views api version */ diff --git a/www7/sites/all/modules/contrib/views/views.tokens.inc b/www7/sites/all/modules/contrib/views/views.tokens.inc index cc45b5cba..bdd0da193 100644 --- a/www7/sites/all/modules/contrib/views/views.tokens.inc +++ b/www7/sites/all/modules/contrib/views/views.tokens.inc @@ -48,7 +48,6 @@ function views_tokens($type, $tokens, array $data = array(), array $options = ar $url_options['language'] = $options['language']; } $sanitize = !empty($options['sanitize']); - $langcode = isset($options['language']) ? $options['language']->language : NULL; $replacements = array(); diff --git a/www7/sites/all/modules/contrib/views/views_ui.info b/www7/sites/all/modules/contrib/views/views_ui.info index 3bc37d5bf..21705eae9 100644 --- a/www7/sites/all/modules/contrib/views/views_ui.info +++ b/www7/sites/all/modules/contrib/views/views_ui.info @@ -4,12 +4,13 @@ package = Views core = 7.x configure = admin/structure/views dependencies[] = views +# @codingStandardsIgnoreLine files[] = views_ui.module files[] = plugins/views_wizard/views_ui_base_views_wizard.class.php -; Information added by Drupal.org packaging script on 2017-04-02 -version = "7.x-3.16" +; Information added by Drupal.org packaging script on 2017-08-23 +version = "7.x-3.18" core = "7.x" project = "views" -datestamp = "1491158591" +datestamp = "1503495103" diff --git a/www7/sites/all/modules/contrib/views/views_ui.module b/www7/sites/all/modules/contrib/views/views_ui.module index 38fea7d67..c33526a47 100644 --- a/www7/sites/all/modules/contrib/views/views_ui.module +++ b/www7/sites/all/modules/contrib/views/views_ui.module @@ -5,6 +5,29 @@ * Provide structure for the administrative interface to Views. */ +/** + * Implements hook_help(). + */ +function views_ui_help($path, $arg) { + switch ($path) { + case 'admin/help#views_ui': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Views UI module provides an interface for managing views for the Views module. For more information, see the online documentation for the Views UI module.', array('@views' => 'https://www.drupal.org/documentation/modules/views')) . '

'; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Creating and managing views') . '
'; + $output .= '
' . t('Views can be created from the Views list page by using the "Add view" action. Existing views can be managed from the Views list page by locating the view in the "Enabled" or "Disabled" list and selecting the desired operation action, for example "Edit".') . '
'; + + $output .= '
' . t('Enabling and disabling views') . '
'; + $output .= '
' . t('Views can be enabled or disabled from the Views list page. To enable a view, find the view within the "Disabled" list and select the "Enable" operation. To disable a view find the view within the "Enabled" list and select the "Disable" operation.') . '
'; + + $output .= '
' . t('Exporting and importing views') . '
'; + $output .= '
' . t('Views can be exported and imported as configuration files by using the Configuration Manager module.') . '
'; + return $output; + } +} + /** * Implements hook_menu(). */ @@ -96,7 +119,6 @@ function views_ui_menu() { ) + $base; // Additional pages for acting on a View. - $items['admin/structure/views/view/%views_ui_cache/break-lock'] = array( 'title' => 'Break lock', 'page callback' => 'drupal_get_form', @@ -143,7 +165,7 @@ function views_ui_menu() { 'type' => MENU_CALLBACK, ) + $base; - // A page in the Reports section to show usage of fields in all views + // A page in the Reports section to show usage of fields in all views. $items['admin/reports/fields/list'] = array( 'title' => 'List', 'type' => MENU_DEFAULT_LOCAL_TASK, @@ -175,9 +197,17 @@ function views_ui_theme() { require_once DRUPAL_ROOT . "/$path/includes/admin.inc"; return array( - // edit a view + // Edit a view. 'views_ui_display_tab_setting' => array( - 'variables' => array('description' => '', 'link' => '', 'settings_links' => array(), 'overridden' => FALSE, 'defaulted' => FALSE, 'description_separator' => TRUE, 'class' => array()), + 'variables' => array( + 'description' => '', + 'link' => '', + 'settings_links' => array(), + 'overridden' => FALSE, + 'defaulted' => FALSE, + 'description_separator' => TRUE, + 'class' => array(), + ), 'template' => 'views-ui-display-tab-setting', 'path' => "$path/theme", ), @@ -198,7 +228,7 @@ function views_ui_theme() { 'file' => 'includes/admin.inc', ), - // list views + // List views. 'views_ui_view_info' => array( 'variables' => array('view' => NULL, 'base' => NULL), 'file' => "includes/admin.inc", @@ -210,7 +240,7 @@ function views_ui_theme() { 'file' => 'includes/admin.inc', ), - // tab themes + // Tab themes. 'views_tabset' => array( 'variables' => array('tabs' => NULL), ), @@ -222,15 +252,19 @@ function views_ui_theme() { 'file' => 'includes/admin.inc', ), - - // On behalf of a plugin + // On behalf of a plugin. 'views_ui_style_plugin_table' => array( 'render element' => 'form', ), // When previewing a view. 'views_ui_view_preview_section' => array( - 'variables' => array('view' => NULL, 'section' => NULL, 'content' => NULL, 'links' => ''), + 'variables' => array( + 'view' => NULL, + 'section' => NULL, + 'content' => NULL, + 'links' => '', + ), ), // Generic container wrapper, to use instead of theme_container when an id @@ -274,10 +308,10 @@ function views_ui_edit_page_title($view) { /** * Specialized menu callback to load a view and check its locked status. * - * @param $name + * @param string $name * The machine name of the view. * - * @return + * @return object * The view object, with a "locked" property indicating whether or not * someone else is already editing the view. */ @@ -315,6 +349,8 @@ function views_ui_cache_load($name) { } /** + * Cache set. + * * Specialized cache function to add a flag to our view, include an appropriate * include, and cache more easily. */ @@ -324,7 +360,8 @@ function views_ui_cache_set(&$view) { return; } ctools_include('object-cache'); - $view->changed = TRUE; // let any future object know that this view has changed. + // Let any future object know that this view has changed. + $view->changed = TRUE; if (isset($view->current_display)) { // Add the knowledge of the changed display, too. @@ -332,7 +369,7 @@ function views_ui_cache_set(&$view) { unset($view->current_display); } - // Unset handlers; we don't want to write these into the cache + // Unset handlers; we don't want to write these into the cache. unset($view->display_handler); unset($view->default_display); $view->query = NULL; @@ -343,8 +380,9 @@ function views_ui_cache_set(&$view) { ctools_object_cache_set('view', $view->name, $view); } - /** + * Default Load. + * * Specialized menu callback to load a view that is only a default * view. */ @@ -364,7 +402,21 @@ function views_ui_preprocess_views_view(&$vars) { $view = $vars['view']; if (!empty($view->views_ui_context) && module_exists('contextual')) { $view->hide_admin_links = TRUE; - foreach (array('title', 'header', 'exposed', 'rows', 'pager', 'more', 'footer', 'empty', 'attachment_after', 'attachment_before') as $section) { + + $sections = array( + 'title', + 'header', + 'exposed', + 'rows', + 'pager', + 'more', + 'footer', + 'empty', + 'attachment_after', + 'attachment_before', + ); + + foreach ($sections as $section) { if (!empty($vars[$section])) { $vars[$section] = array( '#theme' => 'views_ui_view_preview_section', @@ -392,40 +444,49 @@ function template_preprocess_views_ui_view_preview_section(&$vars) { $vars['title'] = t('Title'); $links = views_ui_view_preview_section_display_category_links($vars['view'], 'title', $vars['title']); break; + case 'header': $vars['title'] = t('Header'); $links = views_ui_view_preview_section_handler_links($vars['view'], $vars['section']); break; + case 'empty': $vars['title'] = t('No results behavior'); $links = views_ui_view_preview_section_handler_links($vars['view'], $vars['section']); break; + case 'exposed': // @todo Sorts can be exposed too, so we may need a better title. $vars['title'] = t('Exposed Filters'); $links = views_ui_view_preview_section_display_category_links($vars['view'], 'exposed_form_options', $vars['title']); break; + case 'rows': // @todo The title needs to depend on what is being viewed. $vars['title'] = t('Content'); $links = views_ui_view_preview_section_rows_links($vars['view']); break; + case 'pager': $vars['title'] = t('Pager'); $links = views_ui_view_preview_section_display_category_links($vars['view'], 'pager_options', $vars['title']); break; + case 'more': $vars['title'] = t('More'); $links = views_ui_view_preview_section_display_category_links($vars['view'], 'use_more', $vars['title']); break; + case 'footer': $vars['title'] = t('Footer'); $links = views_ui_view_preview_section_handler_links($vars['view'], $vars['section']); break; + case 'attachment_before': // @todo: Add links to the attachment configuration page. $vars['title'] = t('Attachment before'); break; + case 'attachment_after': // @todo: Add links to the attachment configuration page. $vars['title'] = t('Attachment after'); @@ -454,18 +515,18 @@ function template_preprocess_views_ui_view_preview_section(&$vars) { function theme_views_ui_view_preview_section($vars) { return '

' . $vars['title'] . '

' . $vars['links'] - . '
'. $vars['content'] . '
'; + . '
' . $vars['content'] . '
'; } /** * Returns contextual links for each handler of a certain section. * + * @param string $title + * Add a bolded title of this section. + * * @TODO * Bring in relationships * Refactor this function to use much stuff of views_ui_edit_form_get_bucket. - * - * @param $title - * Add a bolded title of this section. */ function views_ui_view_preview_section_handler_links($view, $type, $title = FALSE) { $display = $view->display_handler->display; @@ -516,8 +577,9 @@ function views_ui_view_preview_section_display_category_links($view, $type, $tit * Returns all contextual links for the main content part of the view. */ function views_ui_view_preview_section_rows_links($view) { - $display = $view->display_handler->display; + $links = array(); + $links = array_merge($links, views_ui_view_preview_section_handler_links($view, 'filter', TRUE)); $links = array_merge($links, views_ui_view_preview_section_handler_links($view, 'field', TRUE)); $links = array_merge($links, views_ui_view_preview_section_handler_links($view, 'sort', TRUE)); @@ -527,7 +589,6 @@ function views_ui_view_preview_section_rows_links($view) { return $links; } - /** * Implments hook_ctools_plugin_directory(). * @@ -542,10 +603,10 @@ function views_ui_ctools_plugin_directory($module, $plugin) { /** * Fetch metadata on a specific views ui wizard plugin. * - * @param $wizard_type + * @param string $wizard_type * Name of a wizard, or name of a base table. * - * @return + * @return array * An array with information about the requested wizard type. */ function views_ui_get_wizard($wizard_type) { @@ -571,14 +632,14 @@ function views_ui_get_wizard($wizard_type) { /** * Fetch metadata for all content_type plugins. * - * @return + * @return array * An array of arrays with information about all available views wizards. */ function views_ui_get_wizards() { ctools_include('plugins'); $wizard_plugins = ctools_get_plugins('views_ui', 'views_wizard'); $wizard_tables = array(); - foreach ($wizard_plugins as $name => $info) { + foreach ($wizard_plugins as $info) { $wizard_tables[$info['base_table']] = TRUE; } $base_tables = views_fetch_base_tables(); @@ -599,7 +660,7 @@ function views_ui_get_wizards() { /** * Helper function to define the default values for a Views wizard plugin. * - * @return + * @return array * An array of defaults for a views wizard. */ function views_ui_views_wizard_defaults() { @@ -607,7 +668,7 @@ function views_ui_views_wizard_defaults() { // The children may, for example, be a different variant for each node type. 'get children' => NULL, 'get child' => NULL, - // title and base table must be populated. They are empty here just + // Title and base table must be populated. They are empty here just // so they are documented. 'title' => '', 'base_table' => NULL, @@ -636,6 +697,9 @@ function views_ui_ctools_plugin_type() { ); } +/** + * Get form wizard instance. + */ function views_ui_get_form_wizard_instance($wizard) { if (isset($wizard['form_wizard_class']['class'])) { $class = $wizard['form_wizard_class']['class']; @@ -705,7 +769,7 @@ function views_ui_contextual_links_suppress($set = NULL) { * @see views_ui_contextual_links_suppress_pop() */ function views_ui_contextual_links_suppress_push() { - views_ui_contextual_links_suppress(((int) views_ui_contextual_links_suppress())+1); + views_ui_contextual_links_suppress(((int) views_ui_contextual_links_suppress()) + 1); } /** @@ -714,13 +778,16 @@ function views_ui_contextual_links_suppress_push() { * @see views_ui_contextual_links_suppress_push() */ function views_ui_contextual_links_suppress_pop() { - views_ui_contextual_links_suppress(((int) views_ui_contextual_links_suppress())-1); + views_ui_contextual_links_suppress(((int) views_ui_contextual_links_suppress()) - 1); } /** - * Menu callback; handles AJAX form submissions similar to ajax_form_callback(), but can be used for uncached forms. + * Menu callback. * - * ajax_form_callback(), the menu callback for the system/ajax path, requires + * Handles AJAX form submissions similar to ajax_form_callback(), but can be + * used for uncached forms. + * + * Ajax_form_callback(), the menu callback for the system/ajax path, requires * the form to be retrievable from the form cache, because it lacks a trusted * $form_id argument with which to call drupal_retrieve_form(). When AJAX is * wanted on a non-cacheable form, #ajax['path'] can be set to a path whose @@ -760,16 +827,18 @@ function views_ui_ajax_get_form($form_id) { return $callback($form, $form_state); } } -// @todo move these when we can +/** + * @todo move these when we can + */ /** * Helper function to get a list of paths assigned to a view. * - * @param $view + * @param object $view * The view. * - * @return + * @return array * An array of links to this view's display paths. */ function _views_ui_get_paths($view) { @@ -778,14 +847,14 @@ function _views_ui_get_paths($view) { $all_paths[] = t('Edit this view to add a display.'); } else { - $view->init_display(); // Make sure all the handlers are set up + // Make sure all the handlers are set up. + $view->init_display(); foreach ($view->display as $display) { if (!empty($display->handler) && $display->handler->has_path()) { $one_path = $display->handler->get_option('path'); - if (empty($path_sort)) { - $path_sort = strtolower($one_path); - } + if (empty($view->disabled) && strpos($one_path, '%') === FALSE) { + // @codingStandardsIgnoreLine $all_paths[] = l('/' . $one_path, $one_path); } else { @@ -801,10 +870,10 @@ function _views_ui_get_paths($view) { /** * Helper function to get a list of displays included in a view. * - * @param $view + * @param object $view * The view. * - * @return + * @return array * An array of display types that this view includes. */ function _views_ui_get_displays_list($view) { @@ -823,21 +892,22 @@ function _views_ui_get_displays_list($view) { } /** - * This is part of a patch to address a jQueryUI bug. The bug is responsible - * for the inability to scroll a page when a modal dialog is active. If the content - * of the dialog extends beyond the bottom of the viewport, the user is only able - * to scroll with a mousewheel or up/down keyboard keys. + * This is part of a patch to address a jQueryUI bug. + * + * The bug is responsible + * for the inability to scroll a page when a modal dialog is active. If the + * content of the dialog extends beyond the bottom of the viewport, the user is + * only able to scroll with a mousewheel or up/down keyboard keys. * * @see http://bugs.jqueryui.com/ticket/4671 * @see https://bugs.webkit.org/show_bug.cgi?id=19033 * @see /js/jquery.ui.dialog.patch.js * @see /js/jquery.ui.dialog.min.js * - * The javascript patch overwrites the $.ui.dialog.overlay.events object to remove - * the mousedown, mouseup and click events from the list of events that are bound - * in $.ui.dialog.overlay.create. + * The javascript patch overwrites the $.ui.dialog.overlay.events object to + * remove the mousedown, mouseup and click events from the list of events that + * are bound in $.ui.dialog.overlay.create. */ - function views_ui_library_alter(&$libraries, $module) { if ($module == 'system' && isset($libraries['ui.dialog'])) { // Only apply the fix, if we don't have an up to date jQueryUI version. From eef217a83ac5ca055e5fbdbe4b36e73327e63b55 Mon Sep 17 00:00:00 2001 From: Florent Torregrosa Date: Thu, 24 Aug 2017 14:37:55 +0200 Subject: [PATCH 5/5] Update entityreference to 7.x-1.5 --- .../modules/contrib/entityreference/entityreference.info | 6 +++--- .../contrib/entityreference/entityreference.module | 8 +++++++- .../entityreference_behavior_example.info | 6 +++--- .../EntityReference_SelectionHandler_Generic.class.php | 2 +- .../entityreference/tests/entityreference.handlers.test | 2 +- .../entityreference_feeds_test.info | 6 +++--- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/www7/sites/all/modules/contrib/entityreference/entityreference.info b/www7/sites/all/modules/contrib/entityreference/entityreference.info index 2695e4650..5b2a0f74c 100644 --- a/www7/sites/all/modules/contrib/entityreference/entityreference.info +++ b/www7/sites/all/modules/contrib/entityreference/entityreference.info @@ -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" diff --git a/www7/sites/all/modules/contrib/entityreference/entityreference.module b/www7/sites/all/modules/contrib/entityreference/entityreference.module index 42af2a302..c0c9f58f7 100644 --- a/www7/sites/all/modules/contrib/entityreference/entityreference.module +++ b/www7/sites/all/modules/contrib/entityreference/entityreference.module @@ -1,5 +1,7 @@ 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))))); diff --git a/www7/sites/all/modules/contrib/entityreference/examples/entityreference_behavior_example/entityreference_behavior_example.info b/www7/sites/all/modules/contrib/entityreference/examples/entityreference_behavior_example/entityreference_behavior_example.info index 6f21bac57..70bcc4f29 100644 --- a/www7/sites/all/modules/contrib/entityreference/examples/entityreference_behavior_example/entityreference_behavior_example.info +++ b/www7/sites/all/modules/contrib/entityreference/examples/entityreference_behavior_example/entityreference_behavior_example.info @@ -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" diff --git a/www7/sites/all/modules/contrib/entityreference/plugins/selection/EntityReference_SelectionHandler_Generic.class.php b/www7/sites/all/modules/contrib/entityreference/plugins/selection/EntityReference_SelectionHandler_Generic.class.php index e0dff00bb..6ec28a4ba 100644 --- a/www7/sites/all/modules/contrib/entityreference/plugins/selection/EntityReference_SelectionHandler_Generic.class.php +++ b/www7/sites/all/modules/contrib/entityreference/plugins/selection/EntityReference_SelectionHandler_Generic.class.php @@ -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); } /** diff --git a/www7/sites/all/modules/contrib/entityreference/tests/entityreference.handlers.test b/www7/sites/all/modules/contrib/entityreference/tests/entityreference.handlers.test index 22569324c..1367b44a2 100644 --- a/www7/sites/all/modules/contrib/entityreference/tests/entityreference.handlers.test +++ b/www7/sites/all/modules/contrib/entityreference/tests/entityreference.handlers.test @@ -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'], ), ), diff --git a/www7/sites/all/modules/contrib/entityreference/tests/modules/entityreference_feeds_test/entityreference_feeds_test.info b/www7/sites/all/modules/contrib/entityreference/tests/modules/entityreference_feeds_test/entityreference_feeds_test.info index dace68b70..5bbf9b6ff 100644 --- a/www7/sites/all/modules/contrib/entityreference/tests/modules/entityreference_feeds_test/entityreference_feeds_test.info +++ b/www7/sites/all/modules/contrib/entityreference/tests/modules/entityreference_feeds_test/entityreference_feeds_test.info @@ -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"