Browse Source

security update for entity module_filter genpass

Bachir Soussi Chiadmi 5 years ago
parent
commit
16996e1775
30 changed files with 297 additions and 169 deletions
  1. 23 12
      sites/all/modules/contrib/admin/module_filter/CHANGELOG.txt
  2. 2 2
      sites/all/modules/contrib/admin/module_filter/README.txt
  3. 6 0
      sites/all/modules/contrib/admin/module_filter/css/module_filter.css
  4. 0 3
      sites/all/modules/contrib/admin/module_filter/css/module_filter_tab.css
  5. 8 2
      sites/all/modules/contrib/admin/module_filter/css/modules.css
  6. BIN
      sites/all/modules/contrib/admin/module_filter/images/collapsed.png
  7. BIN
      sites/all/modules/contrib/admin/module_filter/images/expanded.png
  8. 3 0
      sites/all/modules/contrib/admin/module_filter/js/module_filter.js
  9. 9 12
      sites/all/modules/contrib/admin/module_filter/js/module_filter_tab.js
  10. 7 2
      sites/all/modules/contrib/admin/module_filter/js/modules.js
  11. 19 7
      sites/all/modules/contrib/admin/module_filter/module_filter.admin.inc
  12. 3 5
      sites/all/modules/contrib/admin/module_filter/module_filter.info
  13. 2 0
      sites/all/modules/contrib/admin/module_filter/module_filter.install
  14. 60 24
      sites/all/modules/contrib/admin/module_filter/module_filter.module
  15. 12 5
      sites/all/modules/contrib/admin/module_filter/module_filter.pages.inc
  16. 36 18
      sites/all/modules/contrib/admin/module_filter/module_filter.theme.inc
  17. 3 3
      sites/all/modules/contrib/dev/entity/entity.info
  18. 4 3
      sites/all/modules/contrib/dev/entity/entity.module
  19. 3 3
      sites/all/modules/contrib/dev/entity/entity_token.info
  20. 3 3
      sites/all/modules/contrib/dev/entity/includes/entity.wrapper.inc
  21. 1 1
      sites/all/modules/contrib/dev/entity/modules/callbacks.inc
  22. 3 3
      sites/all/modules/contrib/dev/entity/tests/entity_feature.info
  23. 3 3
      sites/all/modules/contrib/dev/entity/tests/entity_test.info
  24. 3 3
      sites/all/modules/contrib/dev/entity/tests/entity_test_i18n.info
  25. 31 1
      sites/all/modules/contrib/dev/entity/views/handlers/entity_views_handler_area_entity.inc
  26. 0 0
      sites/all/modules/contrib/users/genpass/LICENSE.txt
  27. 0 3
      sites/all/modules/contrib/users/genpass/genpass.css
  28. 3 4
      sites/all/modules/contrib/users/genpass/genpass.info
  29. 0 0
      sites/all/modules/contrib/users/genpass/genpass.install
  30. 50 47
      sites/all/modules/contrib/users/genpass/genpass.module

+ 23 - 12
sites/all/modules/contrib/admin/module_filter/CHANGELOG.txt

@@ -1,27 +1,38 @@
-Module Filter 7.x-2.x, 2015-02-20
+Module Filter 7.x-2.1, 2017-06-09
 ---------------------------------
 ---------------------------------
-Simplifying the table rows by hiding version and requirements until a
-  particular description is clicked.
+Issue #2437439 by mikhail.krainiuk, greenSkin, jayhawkfan75: Module Filter does
+  not care about anchors in permission links.
+Issue #2866236 by Munavijayalakshmi, dhruveshdtripathi: Typo error in
+  README.TXT file.
+Issue #2452067 by Madis: Option to show description expanded as default
+  not working.
+Issue #2580791 by makbul_khan8: Coding standards and few function without
+  help comments.
+Issue #2153697 by annya: Disabling option "Number of enabled modules" breaks
+  tabs functionality.
+Issue #1710230 by willvincent: On | Off buttons does not change state with
+  jquery_update module active.
+Added option to show description as expanded by default.
+Improved description field so when it is open, interacting with it's contents
+  does not make it collapse.
+Placed collapsed/expanded images inside of module for easier, more reliable
+  access.
+Added option to place version in own column.
+Issue #2113191 by joelpittet: Category tabs not working.
 
 
 
 
-Module Filter 7.x-2.x, 2014-09-01
+Module Filter 7.x-2.0, 2015-02-22
 ---------------------------------
 ---------------------------------
+Simplifying the table rows by hiding version and requirements until a
+  particular description is clicked.
 #2235553 by greenSkin: Fixed latest jquery_update breaks module filter.
 #2235553 by greenSkin: Fixed latest jquery_update breaks module filter.
 #2304687 by mpdonadio: Fixed Remove hardcoded operations.
 #2304687 by mpdonadio: Fixed Remove hardcoded operations.
 #2293029 by topsitemakers: Fixed Take header offset into account when selecting
 #2293029 by topsitemakers: Fixed Take header offset into account when selecting
   a tab.
   a tab.
 #2290213 by topsitemakers: Minor typo in description - "has no affect" -> "has
 #2290213 by topsitemakers: Minor typo in description - "has no affect" -> "has
   no effect".
   no effect".
-
-
-Module Filter 7.x-2.0-alpha2, 2013-12-06
-----------------------------------------
 #2141743, #2141743 by greenSkin: Fixed issues related to the new dynamically
 #2141743, #2141743 by greenSkin: Fixed issues related to the new dynamically
   positioned tabs and using the dynamically positioned save button.
   positioned tabs and using the dynamically positioned save button.
-
-
-Module Filter 7.x-2.0-alpha1, 2013-11-18
-----------------------------------------
 by greenSkin: Tabs now should always be visible while scrolling large lists of
 by greenSkin: Tabs now should always be visible while scrolling large lists of
   modules.
   modules.
 #1854348 by alexweber, greenSkin: Make filter textfield wider on modules page
 #1854348 by alexweber, greenSkin: Make filter textfield wider on modules page

+ 2 - 2
sites/all/modules/contrib/admin/module_filter/README.txt

@@ -17,8 +17,8 @@ visibility of modules that are disabled and depend on module(s) that are
 missing.
 missing.
 
 
 The update status report filter also contains four checkboxes: Up-to-Date,
 The update status report filter also contains four checkboxes: Up-to-Date,
-Update availabe, Security update, and Unknown. These directly affect the
-visibilty of each project; whether it is up-to-date, there is an update
+Update available, Security update, and Unknown. These directly affect the
+visibility of each project; whether it is up-to-date, there is an update
 available, a security update is available, or the status is unknown.
 available, a security update is available, or the status is unknown.
 
 
 Installation
 Installation

+ 6 - 0
sites/all/modules/contrib/admin/module_filter/css/module_filter.css

@@ -18,3 +18,9 @@
   text-transform: uppercase;
   text-transform: uppercase;
   color: #888;
   color: #888;
 }
 }
+#module-filter-modules {
+  position: relative;
+}
+#module-filter-modules table {
+  position: absolute;
+}

+ 0 - 3
sites/all/modules/contrib/admin/module_filter/css/module_filter_tab.css

@@ -167,9 +167,6 @@ html.js #module-filter-modules table td {
 .admin-version {
 .admin-version {
   white-space: nowrap;
   white-space: nowrap;
 }
 }
-.admin-operations {
-  float: right;
-}
 .admin-operations a.module-link {
 .admin-operations a.module-link {
   display: inline;
   display: inline;
 }
 }

+ 8 - 2
sites/all/modules/contrib/admin/module_filter/css/modules.css

@@ -7,6 +7,9 @@
 #system-modules th.name {
 #system-modules th.name {
   width: 25%;
   width: 25%;
 }
 }
+#system-modules th.version {
+  width: 10%;
+}
 #system-modules th.links {
 #system-modules th.links {
   width: 15%;
   width: 15%;
 }
 }
@@ -14,12 +17,12 @@
   vertical-align: top;
   vertical-align: top;
 }
 }
 #system-modules .expand.inner {
 #system-modules .expand.inner {
-  background: transparent url(/misc/menu-collapsed.png) left 0.6em no-repeat;
+  background: transparent url(../images/collapsed.png) left 0.6em no-repeat;
   margin-left: -12px;
   margin-left: -12px;
   padding-left: 12px;
   padding-left: 12px;
 }
 }
 #system-modules .expanded.expand.inner {
 #system-modules .expanded.expand.inner {
-  background: transparent url(/misc/menu-expanded.png) left 0.6em no-repeat;
+  background: transparent url(../images/expanded.png) left 0.6em no-repeat;
 }
 }
 #system-modules .description {
 #system-modules .description {
   cursor: pointer;
   cursor: pointer;
@@ -29,6 +32,9 @@
   text-overflow: ellipsis;
   text-overflow: ellipsis;
   white-space: nowrap;
   white-space: nowrap;
 }
 }
+#system-modules .description .inner.expanded > * {
+  cursor: auto;
+}
 #system-modules .description .requirements,
 #system-modules .description .requirements,
 #system-modules .description .links {
 #system-modules .description .links {
   display: none;
   display: none;

BIN
sites/all/modules/contrib/admin/module_filter/images/collapsed.png


BIN
sites/all/modules/contrib/admin/module_filter/images/expanded.png


+ 3 - 0
sites/all/modules/contrib/admin/module_filter/js/module_filter.js

@@ -265,6 +265,9 @@ $.fn.moduleFilter = function(selector, options) {
   if (Drupal.settings.moduleFilter.setFocus) {
   if (Drupal.settings.moduleFilter.setFocus) {
     filterInput.focus();
     filterInput.focus();
   }
   }
+  if (Drupal.settings.moduleFilter.expandedDescription) {
+    $('#system-modules td.description .inner.expand').addClass('expanded');
+  }
   filterInput.data('moduleFilter', new Drupal.ModuleFilter.Filter(this, selector, options));
   filterInput.data('moduleFilter', new Drupal.ModuleFilter.Filter(this, selector, options));
 };
 };
 
 

+ 9 - 12
sites/all/modules/contrib/admin/module_filter/js/module_filter_tab.js

@@ -57,7 +57,7 @@ Drupal.behaviors.moduleFilterTabs = {
         // Build tabs from package title rows.
         // Build tabs from package title rows.
         var tabs = '<ul>';
         var tabs = '<ul>';
         for (var i in Drupal.settings.moduleFilter.packageIDs) {
         for (var i in Drupal.settings.moduleFilter.packageIDs) {
-          var id = Drupal.settings.moduleFilter.packageIDs[i];
+          var id = Drupal.checkPlain(Drupal.settings.moduleFilter.packageIDs[i]);
 
 
           var name = id;
           var name = id;
           var tabClass = 'project-tab';
           var tabClass = 'project-tab';
@@ -84,9 +84,9 @@ Drupal.behaviors.moduleFilterTabs = {
                 summary += '<span>' + Drupal.t('No modules were enabled or disabled within the last week.') + '</span>';
                 summary += '<span>' + Drupal.t('No modules were enabled or disabled within the last week.') + '</span>';
               }
               }
               break;
               break;
-            default: 
-              var $row = $('#' + id + '-package');
-              name = $.trim($row.text());
+            default:
+              var $row = $('#' + id + '-package', this);
+              name = Drupal.checkPlain($.trim($row.text()));
               $row.remove();
               $row.remove();
               break;
               break;
           }
           }
@@ -233,8 +233,8 @@ Drupal.behaviors.moduleFilterTabs = {
         }
         }
 
 
         if (Drupal.settings.moduleFilter.useSwitch) {
         if (Drupal.settings.moduleFilter.useSwitch) {
-          $('td.checkbox div.form-item').hide();
-          $('td.checkbox').each(function(i) {
+          $('td.checkbox div.form-item', table).hide();
+          $('td.checkbox', table).each(function(i) {
             var $cell = $(this);
             var $cell = $(this);
             var $checkbox = $(':checkbox', $cell);
             var $checkbox = $(':checkbox', $cell);
             var $switch = $('.toggle-enable', $cell);
             var $switch = $('.toggle-enable', $cell);
@@ -242,17 +242,14 @@ Drupal.behaviors.moduleFilterTabs = {
               if (!$(this).hasClass('disabled')) {
               if (!$(this).hasClass('disabled')) {
                 if (Drupal.ModuleFilter.jQueryIsNewer()) {
                 if (Drupal.ModuleFilter.jQueryIsNewer()) {
                   $checkbox.click();
                   $checkbox.click();
+                  $switch.toggleClass('off');
                 }
                 }
                 else {
                 else {
                   $checkbox.click().change();
                   $checkbox.click().change();
+                  $switch.toggleClass('off');
                 }
                 }
               }
               }
             });
             });
-            $checkbox.click(function() {
-              if (!$switch.hasClass('disabled')) {
-                $switch.toggleClass('off');
-              }
-            });
           });
           });
         }
         }
 
 
@@ -520,7 +517,7 @@ Drupal.ModuleFilter.updateVisualAid = function(type, $row) {
   }
   }
 
 
   var tab = Drupal.ModuleFilter.tabs[id];
   var tab = Drupal.ModuleFilter.tabs[id];
-  var name = $('td:nth(1) strong', $row).text();
+  var name = Drupal.checkPlain($('td:nth(1) strong', $row).text());
   switch (type) {
   switch (type) {
     case 'enable':
     case 'enable':
       if (Drupal.ModuleFilter.disabling[id + name] != undefined) {
       if (Drupal.ModuleFilter.disabling[id + name] != undefined) {

+ 7 - 2
sites/all/modules/contrib/admin/module_filter/js/modules.js

@@ -3,8 +3,13 @@
 Drupal.behaviors.moduleFilter = {
 Drupal.behaviors.moduleFilter = {
   attach: function(context) {
   attach: function(context) {
     $('#system-modules td.description').once('description', function() {
     $('#system-modules td.description').once('description', function() {
-      $('.inner.expand', $(this)).click(function() {
-        $(this).toggleClass('expanded');
+      $(this).click(function() {
+        $('.inner.expand', $(this)).toggleClass('expanded');
+      });
+      $('.inner.expand', $(this)).children().click(function(e) {
+        if ($(this).parent().hasClass('expanded')) {
+          e.stopPropagation();
+        }
       });
       });
     });
     });
 
 

+ 19 - 7
sites/all/modules/contrib/admin/module_filter/module_filter.admin.inc

@@ -25,44 +25,44 @@ function module_filter_settings() {
     '#type' => 'checkbox',
     '#type' => 'checkbox',
     '#title' => t('Enhance the modules page with tabs'),
     '#title' => t('Enhance the modules page with tabs'),
     '#description' => t('Alternate tabbed theme that restructures packages into tabs.'),
     '#description' => t('Alternate tabbed theme that restructures packages into tabs.'),
-    '#default_value' => variable_get('module_filter_tabs', 1)
+    '#default_value' => variable_get('module_filter_tabs', 1),
   );
   );
   $form['tabs'] = array(
   $form['tabs'] = array(
     '#type' => 'fieldset',
     '#type' => 'fieldset',
     '#title' => t('Tabs'),
     '#title' => t('Tabs'),
     '#description' => t('Settings used with the tabs view of the modules page.'),
     '#description' => t('Settings used with the tabs view of the modules page.'),
     '#collapsible' => TRUE,
     '#collapsible' => TRUE,
-    '#collapsed' => FALSE
+    '#collapsed' => FALSE,
   );
   );
   $form['tabs']['module_filter_count_enabled'] = array(
   $form['tabs']['module_filter_count_enabled'] = array(
     '#type' => 'checkbox',
     '#type' => 'checkbox',
     '#title' => t('Number of enabled modules'),
     '#title' => t('Number of enabled modules'),
     '#description' => t('Display the number of enabled modules in the active tab along with the total number of modules.'),
     '#description' => t('Display the number of enabled modules in the active tab along with the total number of modules.'),
-    '#default_value' => variable_get('module_filter_count_enabled', 1)
+    '#default_value' => variable_get('module_filter_count_enabled', 1),
   );
   );
   $form['tabs']['module_filter_visual_aid'] = array(
   $form['tabs']['module_filter_visual_aid'] = array(
     '#type' => 'checkbox',
     '#type' => 'checkbox',
     '#title' => t('Visual aids'),
     '#title' => t('Visual aids'),
     '#description' => t('When enabling/disabling modules, the module name will display in the tab summary.<br />When filtering, a count of results for each tab will be presented.'),
     '#description' => t('When enabling/disabling modules, the module name will display in the tab summary.<br />When filtering, a count of results for each tab will be presented.'),
-    '#default_value' => variable_get('module_filter_visual_aid', 1)
+    '#default_value' => variable_get('module_filter_visual_aid', 1),
   );
   );
   $form['tabs']['module_filter_hide_empty_tabs'] = array(
   $form['tabs']['module_filter_hide_empty_tabs'] = array(
     '#type' => 'checkbox',
     '#type' => 'checkbox',
     '#title' => t('Hide tabs with no results'),
     '#title' => t('Hide tabs with no results'),
     '#description' => t('When a filter returns no results for a tab, the tab is hidden. This is dependent on visual aids being enabled.'),
     '#description' => t('When a filter returns no results for a tab, the tab is hidden. This is dependent on visual aids being enabled.'),
-    '#default_value' => variable_get('module_filter_hide_empty_tabs', 0)
+    '#default_value' => variable_get('module_filter_hide_empty_tabs', 0),
   );
   );
   $form['tabs']['module_filter_dynamic_save_position'] = array(
   $form['tabs']['module_filter_dynamic_save_position'] = array(
     '#type' => 'checkbox',
     '#type' => 'checkbox',
     '#title' => t('Dynamically position Save button'),
     '#title' => t('Dynamically position Save button'),
     '#description' => t("For sites with lots of tabs, enable to help keep the 'Save configuration' button more accessible."),
     '#description' => t("For sites with lots of tabs, enable to help keep the 'Save configuration' button more accessible."),
-    '#default_value' => variable_get('module_filter_dynamic_save_position', 1)
+    '#default_value' => variable_get('module_filter_dynamic_save_position', 1),
   );
   );
   $form['tabs']['module_filter_use_url_fragment'] = array(
   $form['tabs']['module_filter_use_url_fragment'] = array(
     '#type' => 'checkbox',
     '#type' => 'checkbox',
     '#title' => t('Use URL fragment'),
     '#title' => t('Use URL fragment'),
     '#description' => t('Use URL fragment when navigating between tabs. This lets you use the browsers back/forward buttons to navigate through the tabs you selected.') . '<br />' . t('When the Overlay module is enabled this functionality will not be used since overlay relies on the URL fragment.'),
     '#description' => t('Use URL fragment when navigating between tabs. This lets you use the browsers back/forward buttons to navigate through the tabs you selected.') . '<br />' . t('When the Overlay module is enabled this functionality will not be used since overlay relies on the URL fragment.'),
-    '#default_value' => variable_get('module_filter_use_url_fragment', 1)
+    '#default_value' => variable_get('module_filter_use_url_fragment', 1),
   );
   );
   $form['tabs']['module_filter_use_switch'] = array(
   $form['tabs']['module_filter_use_switch'] = array(
     '#type' => 'checkbox',
     '#type' => 'checkbox',
@@ -82,6 +82,18 @@ function module_filter_settings() {
     '#description' => t('When enabled, the active tab will be remembered.'),
     '#description' => t('When enabled, the active tab will be remembered.'),
     '#default_value' => variable_get('module_filter_remember_active_tab', 1),
     '#default_value' => variable_get('module_filter_remember_active_tab', 1),
   );
   );
+  $form['tabs']['module_filter_version_column'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Place version in own column'),
+    '#description' => t("Moves the version out of the description and into it's own column"),
+    '#default_value' => variable_get('module_filter_version_column', 0),
+  );
+  $form['tabs']['module_filter_expanded_description'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Expand description by default'),
+    '#description' => t('When enabled, the description will be expanded by default.'),
+    '#default_value' => variable_get('module_filter_expanded_description', 0),
+  );
 
 
   $form['update'] = array(
   $form['update'] = array(
     '#type' => 'fieldset',
     '#type' => 'fieldset',

+ 3 - 5
sites/all/modules/contrib/admin/module_filter/module_filter.info

@@ -4,7 +4,6 @@ core = 7.x
 package = Administration
 package = Administration
 
 
 files[] = module_filter.install
 files[] = module_filter.install
-files[] = module_filter.js
 files[] = module_filter.module
 files[] = module_filter.module
 files[] = module_filter.admin.inc
 files[] = module_filter.admin.inc
 files[] = module_filter.theme.inc
 files[] = module_filter.theme.inc
@@ -17,9 +16,8 @@ files[] = js/module_filter_tab.js
 
 
 configure = admin/config/user-interface/modulefilter
 configure = admin/config/user-interface/modulefilter
 
 
-; Information added by Drupal.org packaging script on 2015-02-22
-version = "7.x-2.0"
+; Information added by Drupal.org packaging script on 2019-03-27
+version = "7.x-2.2"
 core = "7.x"
 core = "7.x"
 project = "module_filter"
 project = "module_filter"
-datestamp = "1424631189"
-
+datestamp = "1553698385"

+ 2 - 0
sites/all/modules/contrib/admin/module_filter/module_filter.install

@@ -19,6 +19,8 @@ function module_filter_uninstall() {
   variable_del('module_filter_track_recent_modules');
   variable_del('module_filter_track_recent_modules');
   variable_del('module_filter_remember_active_tab');
   variable_del('module_filter_remember_active_tab');
   variable_del('module_filter_remember_update_state');
   variable_del('module_filter_remember_update_state');
+  variable_del('module_filter_version_column');
+  variable_del('module_filter_expanded_description');
 }
 }
 
 
 /**
 /**

+ 60 - 24
sites/all/modules/contrib/admin/module_filter/module_filter.module

@@ -18,8 +18,8 @@ function module_filter_permission() {
   return array(
   return array(
     'administer module filter' => array(
     'administer module filter' => array(
       'title' => t('Administer Module Filter'),
       'title' => t('Administer Module Filter'),
-      'description' => t('Configure how Module Filter performs.')
-    )
+      'description' => t('Configure how Module Filter performs.'),
+    ),
   );
   );
 }
 }
 
 
@@ -33,7 +33,7 @@ function module_filter_menu() {
     'access arguments' => array('administer module filter'),
     'access arguments' => array('administer module filter'),
     'page callback' => 'drupal_get_form',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('module_filter_settings'),
     'page arguments' => array('module_filter_settings'),
-    'file' => 'module_filter.admin.inc'
+    'file' => 'module_filter.admin.inc',
   );
   );
   return $items;
   return $items;
 }
 }
@@ -63,32 +63,32 @@ function module_filter_form_system_modules_alter(&$form, &$form_state, $form_id)
     '#type' => 'module_filter',
     '#type' => 'module_filter',
     '#attached' => array(
     '#attached' => array(
       'js' => array(
       'js' => array(
-        drupal_get_path('module', 'module_filter') . '/js/modules.js'
-      )
-    )
+        drupal_get_path('module', 'module_filter') . '/js/modules.js' => array('weight' => 1),
+      ),
+    ),
   );
   );
   $checkbox_defaults = array(
   $checkbox_defaults = array(
     ((isset($_GET['enabled'])) ? $_GET['enabled'] : 1) ? 'enabled' : '',
     ((isset($_GET['enabled'])) ? $_GET['enabled'] : 1) ? 'enabled' : '',
     ((isset($_GET['disabled'])) ? $_GET['disabled'] : 1) ? 'disabled' : '',
     ((isset($_GET['disabled'])) ? $_GET['disabled'] : 1) ? 'disabled' : '',
     ((isset($_GET['required'])) ? $_GET['required'] : 1) ? 'required' : '',
     ((isset($_GET['required'])) ? $_GET['required'] : 1) ? 'required' : '',
-    ((isset($_GET['unavailable'])) ? $_GET['unavailable'] : 1) ? 'unavailable' : ''
+    ((isset($_GET['unavailable'])) ? $_GET['unavailable'] : 1) ? 'unavailable' : '',
   );
   );
   $form['module_filter']['show'] = array(
   $form['module_filter']['show'] = array(
     '#type' => 'checkboxes',
     '#type' => 'checkboxes',
     '#default_value' => array_filter($checkbox_defaults),
     '#default_value' => array_filter($checkbox_defaults),
     '#options' => array('enabled' => t('Enabled'), 'disabled' => t('Disabled'), 'required' => t('Required'), 'unavailable' => t('Unavailable')),
     '#options' => array('enabled' => t('Enabled'), 'disabled' => t('Disabled'), 'required' => t('Required'), 'unavailable' => t('Unavailable')),
     '#prefix' => '<div id="module-filter-show-wrapper">',
     '#prefix' => '<div id="module-filter-show-wrapper">',
-    '#suffix' => '</div>'
+    '#suffix' => '</div>',
   );
   );
 
 
   if (variable_get('module_filter_tabs', 1)) {
   if (variable_get('module_filter_tabs', 1)) {
-    $form['module_filter']['#attached']['css'][] = drupal_get_path('module', 'module_filter') .'/css/module_filter_tab.css';
+    $form['module_filter']['#attached']['css'][] = drupal_get_path('module', 'module_filter') . '/css/module_filter_tab.css';
     $form['module_filter']['#attached']['library'][] = array('system', 'jquery.bbq');
     $form['module_filter']['#attached']['library'][] = array('system', 'jquery.bbq');
-    $form['module_filter']['#attached']['js'][] = drupal_get_path('module', 'module_filter') .'/js/module_filter_tab.js';
+    $form['module_filter']['#attached']['js'][drupal_get_path('module', 'module_filter') . '/js/module_filter_tab.js'] = array('weight' => 2);
 
 
     if (!module_exists('page_actions') && variable_get('module_filter_dynamic_save_position', 1)) {
     if (!module_exists('page_actions') && variable_get('module_filter_dynamic_save_position', 1)) {
-      $form['module_filter']['#attached']['css'][] = drupal_get_path('module', 'module_filter') .'/css/dynamic_position.css';
-      $form['module_filter']['#attached']['js'][] = drupal_get_path('module', 'module_filter') .'/js/dynamic_position.js';
+      $form['module_filter']['#attached']['css'][] = drupal_get_path('module', 'module_filter') . '/css/dynamic_position.css';
+      $form['module_filter']['#attached']['js'][drupal_get_path('module', 'module_filter') . '/js/dynamic_position.js'] = array('weight' => 3);
     }
     }
 
 
     $form['#attached']['css'][] = drupal_get_path('module', 'module_filter') . '/css/modules.css';
     $form['#attached']['css'][] = drupal_get_path('module', 'module_filter') . '/css/modules.css';
@@ -128,7 +128,7 @@ function module_filter_element_info() {
     '#process' => array('form_process_module_filter', 'ajax_process_form'),
     '#process' => array('form_process_module_filter', 'ajax_process_form'),
     '#weight' => -1,
     '#weight' => -1,
     '#tree' => TRUE,
     '#tree' => TRUE,
-    '#theme' => 'module_filter'
+    '#theme' => 'module_filter',
   );
   );
   return $types;
   return $types;
 }
 }
@@ -153,6 +153,18 @@ function module_filter_theme() {
   );
   );
 }
 }
 
 
+/**
+ * Create and add new textfield element.
+ *
+ * @param $element
+ *   An associative array containing the properties and children of the
+ *   form actions container.
+ * @param $form_state
+ *   The $form_state array for the form this element belongs to.
+ *
+ * @return
+ *   The processed element.
+ */
 function form_process_module_filter($element, &$form_state) {
 function form_process_module_filter($element, &$form_state) {
   $element['name'] = array(
   $element['name'] = array(
     '#type' => 'textfield',
     '#type' => 'textfield',
@@ -163,7 +175,7 @@ function form_process_module_filter($element, &$form_state) {
     '#attributes' => ((isset($element['#attributes'])) ? $element['#attributes'] : array()) + array('autocomplete' => 'off'),
     '#attributes' => ((isset($element['#attributes'])) ? $element['#attributes'] : array()) + array('autocomplete' => 'off'),
     '#attached' => array(
     '#attached' => array(
       'css' => array(
       'css' => array(
-        drupal_get_path('module', 'module_filter') . '/css/module_filter.css'
+        drupal_get_path('module', 'module_filter') . '/css/module_filter.css',
       ),
       ),
       'js' => array(
       'js' => array(
         'misc/jquery.cookie.js',
         'misc/jquery.cookie.js',
@@ -182,12 +194,13 @@ function form_process_module_filter($element, &$form_state) {
               'trackRecent' => variable_get('module_filter_track_recent_modules', 1),
               'trackRecent' => variable_get('module_filter_track_recent_modules', 1),
               'rememberActiveTab' => variable_get('module_filter_remember_active_tab', 1),
               'rememberActiveTab' => variable_get('module_filter_remember_active_tab', 1),
               'rememberUpdateState' => variable_get('module_filter_remember_update_state', 0),
               'rememberUpdateState' => variable_get('module_filter_remember_update_state', 0),
-            )
+              'expandedDescription' => variable_get('module_filter_expanded_description', 0),
+            ),
           ),
           ),
-          'type' => 'setting'
-        )
-      )
-    )
+          'type' => 'setting',
+        ),
+      ),
+    ),
   );
   );
   if (isset($element['#description'])) {
   if (isset($element['#description'])) {
     $element['name']['#description'] = $element['#description'];
     $element['name']['#description'] = $element['#description'];
@@ -195,15 +208,18 @@ function form_process_module_filter($element, &$form_state) {
   return $element;
   return $element;
 }
 }
 
 
+/**
+ * Form submission handler to filters module list.
+ */
 function module_filter_system_modules_submit_redirect($form, &$form_state) {
 function module_filter_system_modules_submit_redirect($form, &$form_state) {
   $query = array();
   $query = array();
   if (!empty($form_state['values']['module_filter']['name'])) {
   if (!empty($form_state['values']['module_filter']['name'])) {
     $query['filter'] = $form_state['values']['module_filter']['name'];
     $query['filter'] = $form_state['values']['module_filter']['name'];
   }
   }
-  $query['enabled'] = (int)(!empty($form_state['values']['module_filter']['show']['enabled']));
-  $query['disabled'] = (int)(!empty($form_state['values']['module_filter']['show']['disabled']));
-  $query['required'] = (int)(!empty($form_state['values']['module_filter']['show']['required']));
-  $query['unavailable'] = (int)(!empty($form_state['values']['module_filter']['show']['unavailable']));
+  $query['enabled'] = (int) (!empty($form_state['values']['module_filter']['show']['enabled']));
+  $query['disabled'] = (int) (!empty($form_state['values']['module_filter']['show']['disabled']));
+  $query['required'] = (int) (!empty($form_state['values']['module_filter']['show']['required']));
+  $query['unavailable'] = (int) (!empty($form_state['values']['module_filter']['show']['unavailable']));
 
 
   $form_state['redirect'] = array(
   $form_state['redirect'] = array(
     'admin/modules',
     'admin/modules',
@@ -211,6 +227,9 @@ function module_filter_system_modules_submit_redirect($form, &$form_state) {
   );
   );
 }
 }
 
 
+/**
+ * Form submission handler to track recently enabled/disabled modules
+ */
 function module_filter_system_modules_submit_recent($form, &$form_state) {
 function module_filter_system_modules_submit_recent($form, &$form_state) {
   $recent_modules = variable_get('module_filter_recent_modules', array());
   $recent_modules = variable_get('module_filter_recent_modules', array());
 
 
@@ -225,6 +244,11 @@ function module_filter_system_modules_submit_recent($form, &$form_state) {
   variable_set('module_filter_recent_modules', $recent_modules);
   variable_set('module_filter_recent_modules', $recent_modules);
 }
 }
 
 
+/**
+ * Create list of newly added modules (within a week)
+ * @return
+ *   An array of newly added modules.
+ */
 function module_filter_new_modules() {
 function module_filter_new_modules() {
   // Get current list of modules.
   // Get current list of modules.
   $files = system_rebuild_module_data();
   $files = system_rebuild_module_data();
@@ -249,12 +273,24 @@ function module_filter_new_modules() {
   return $new_modules;
   return $new_modules;
 }
 }
 
 
+/**
+ * Function to replace special characters with hyphen.
+ * @param string $text
+ * @return
+ *   String
+ */
 function module_filter_get_id($text) {
 function module_filter_get_id($text) {
   $id = strtolower($text);
   $id = strtolower($text);
   $id = preg_replace('/([^a-z0-9]+)/', '-', $id);
   $id = preg_replace('/([^a-z0-9]+)/', '-', $id);
   return trim($id, '-');
   return trim($id, '-');
 }
 }
 
 
+/**
+ * Function to return true/false depending on module changed time and a week timestamp
+ * @param integer $var
+ * @return
+ *   Boolean indicating
+ */
 function module_filter_recent_filter($var) {
 function module_filter_recent_filter($var) {
-  return (!($var < REQUEST_TIME - 60*60*24*7));
+  return (!($var < REQUEST_TIME - 60 * 60 * 24 * 7));
 }
 }

+ 12 - 5
sites/all/modules/contrib/admin/module_filter/module_filter.pages.inc

@@ -1,5 +1,9 @@
 <?php
 <?php
 
 
+/**
+ * @file
+ */
+
 /**
 /**
  * Wrapper function for update_status().
  * Wrapper function for update_status().
  *
  *
@@ -12,20 +16,23 @@ function module_filter_update_status() {
   return array(
   return array(
     'module_filter' => drupal_get_form('module_filter_update_status_form'),
     'module_filter' => drupal_get_form('module_filter_update_status_form'),
     'update_report' => array(
     'update_report' => array(
-      '#markup' => $update_report
-    )
+      '#markup' => $update_report,
+    ),
   );
   );
 }
 }
 
 
+/**
+ * Form builder for the module filter form.
+ */
 function module_filter_update_status_form($form, &$form_state) {
 function module_filter_update_status_form($form, &$form_state) {
   $form['module_filter'] = array(
   $form['module_filter'] = array(
     '#type' => 'module_filter',
     '#type' => 'module_filter',
     '#attached' => array(
     '#attached' => array(
       'css' => array(
       'css' => array(
-        drupal_get_path('module', 'module_filter') . '/css/update_status.css'
+        drupal_get_path('module', 'module_filter') . '/css/update_status.css',
       ),
       ),
       'js' => array(
       'js' => array(
-        drupal_get_path('module', 'module_filter') . '/js/update_status.js'
+        drupal_get_path('module', 'module_filter') . '/js/update_status.js',
       ),
       ),
     ),
     ),
   );
   );
@@ -34,7 +41,7 @@ function module_filter_update_status_form($form, &$form_state) {
     '#default_value' => (isset($_GET['show']) && in_array($_GET['show'], array('all', 'updates', 'security', 'unknown'))) ? $_GET['show'] : 'all',
     '#default_value' => (isset($_GET['show']) && in_array($_GET['show'], array('all', 'updates', 'security', 'unknown'))) ? $_GET['show'] : 'all',
     '#options' => array('all' => t('All'), 'updates' => t('Update available'), 'security' => t('Security update'), 'unknown' => t('Unknown')),
     '#options' => array('all' => t('All'), 'updates' => t('Update available'), 'security' => t('Security update'), 'unknown' => t('Unknown')),
     '#prefix' => '<div id="module-filter-show-wrapper">',
     '#prefix' => '<div id="module-filter-show-wrapper">',
-    '#suffix' => '</div>'
+    '#suffix' => '</div>',
   );
   );
   if (module_exists('update_advanced')) {
   if (module_exists('update_advanced')) {
     $options = $form['module_filter']['show']['#options'];
     $options = $form['module_filter']['show']['#options'];

+ 36 - 18
sites/all/modules/contrib/admin/module_filter/module_filter.theme.inc

@@ -37,6 +37,9 @@ function theme_module_filter_system_modules_tabs($variables) {
     array('data' => t('Description'), 'class' => array('description')),
     array('data' => t('Description'), 'class' => array('description')),
     array('data' => t('Links'), 'class' => array('links')),
     array('data' => t('Links'), 'class' => array('links')),
   );
   );
+  if (variable_get('module_filter_version_column', 0)) {
+    array_splice($header, 2, 0, array(array('data' => t('Version'), 'class' => array('version'))));
+  }
   $package_ids = array('all');
   $package_ids = array('all');
   $enabled['all'] = array();
   $enabled['all'] = array();
 
 
@@ -101,11 +104,18 @@ function theme_module_filter_system_modules_tabs($variables) {
       }
       }
       $row[] = array('class' => array('name'), 'data' => $label . '><strong>' . drupal_render($module['name']) . '</strong> <span class="module-machine-name">(' . $key . ')</span></label>');
       $row[] = array('class' => array('name'), 'data' => $label . '><strong>' . drupal_render($module['name']) . '</strong> <span class="module-machine-name">(' . $key . ')</span></label>');
 
 
+      if (variable_get('module_filter_version_column', 0) && $version) {
+        $row[] = array('class' => array('version'), 'data' => drupal_render($module['version']));
+      }
+
       // Add the description, along with any modules it requires.
       // Add the description, along with any modules it requires.
+      if (empty($module['description']['#markup'])) {
+        $module['description']['#markup'] = '<em>' . t('No description available.') . '</em>';
+      }
       $description = '<span class="details"><span class="text">' . drupal_render($module['description']) . '</span></span>';
       $description = '<span class="details"><span class="text">' . drupal_render($module['description']) . '</span></span>';
-      if ($version || $requires || $required_by) {
+      if ($requires || $required_by || (!variable_get('module_filter_version_column', 0) && $version)) {
         $description .= '<div class="requirements">';
         $description .= '<div class="requirements">';
-        if ($version) {
+        if (!variable_get('module_filter_version_column', 0) && $version) {
           $description .= '<div class="admin-requirements">' . t('Version: !module-version', array('!module-version' => drupal_render($module['version']))) . '</div>';
           $description .= '<div class="admin-requirements">' . t('Version: !module-version', array('!module-version' => drupal_render($module['version']))) . '</div>';
         }
         }
         if ($requires) {
         if ($requires) {
@@ -136,21 +146,20 @@ function theme_module_filter_system_modules_tabs($variables) {
     $form['modules'][$package]['#printed'] = TRUE;
     $form['modules'][$package]['#printed'] = TRUE;
   }
   }
 
 
-  if (variable_get('module_filter_count_enabled', 1)) {
-    $enabled_counts = array();
-    foreach ($enabled as $package_id => $value) {
-      $enabled_counts[$package_id] = array(
-        'enabled' => count(array_filter($value)),
-        'total' => count($value),
-      );
-    }
-    drupal_add_js(array(
-      'moduleFilter' => array(
-        'packageIDs' => $package_ids,
-        'enabledCounts' => $enabled_counts,
-      )
-    ), 'setting');
+  //Get packages and count number of modules
+  $enabled_counts = array();
+  foreach ($enabled as $package_id => $value) {
+    $enabled_counts[$package_id] = array(
+      'enabled' => count(array_filter($value)),
+      'total' => count($value),
+    );
   }
   }
+  drupal_add_js(array(
+    'moduleFilter' => array(
+      'packageIDs' => $package_ids,
+      'enabledCounts' => $enabled_counts,
+    )
+  ), 'setting');
 
 
   // Add first and last class to rows.
   // Add first and last class to rows.
   $rows[0]['class'][] = 'first';
   $rows[0]['class'][] = 'first';
@@ -165,6 +174,12 @@ function theme_module_filter_system_modules_tabs($variables) {
   return $output;
   return $output;
 }
 }
 
 
+/**
+ * Theme function for module filter operations.
+ * @param $variables
+ * @return
+ *   HTML for admin status operations.
+ */
 function theme_module_filter_operations(&$vars) {
 function theme_module_filter_operations(&$vars) {
   $links = &$vars['links'];
   $links = &$vars['links'];
   $dropbutton = $vars['dropbutton'];
   $dropbutton = $vars['dropbutton'];
@@ -174,16 +189,19 @@ function theme_module_filter_operations(&$vars) {
     if ($dropbutton) {
     if ($dropbutton) {
       hide($links[$key]);
       hide($links[$key]);
       if (!empty($links[$key]['#href'])) {
       if (!empty($links[$key]['#href'])) {
-        $operations[] = array(
+        $operations[$key] = array(
           'title' => $links[$key]['#title'],
           'title' => $links[$key]['#title'],
           'href' => $links[$key]['#href'],
           'href' => $links[$key]['#href'],
         );
         );
+        if (isset($links[$key]['#options'])) {
+          $operations[$key] += $links[$key]['#options'];
+        }
       }
       }
     }
     }
     else {
     else {
       $data = drupal_render($links[$key]);
       $data = drupal_render($links[$key]);
       if (!empty($data)) {
       if (!empty($data)) {
-        $operations[] = array('data' => $data);
+        $operations[$key] = array('data' => $data);
       }
       }
     }
     }
   }
   }

+ 3 - 3
sites/all/modules/contrib/dev/entity/entity.info

@@ -25,9 +25,9 @@ files[] = views/handlers/entity_views_handler_field_uri.inc
 files[] = views/handlers/entity_views_handler_relationship_by_bundle.inc
 files[] = views/handlers/entity_views_handler_relationship_by_bundle.inc
 files[] = views/handlers/entity_views_handler_relationship.inc
 files[] = views/handlers/entity_views_handler_relationship.inc
 files[] = views/plugins/entity_views_plugin_row_entity_view.inc
 files[] = views/plugins/entity_views_plugin_row_entity_view.inc
-; Information added by Drupal.org packaging script on 2016-09-22
-version = "7.x-1.8"
+; Information added by Drupal.org packaging script on 2018-02-14
+version = "7.x-1.9"
 core = "7.x"
 core = "7.x"
 project = "entity"
 project = "entity"
-datestamp = "1474546503"
+datestamp = "1518620551"
 
 

+ 4 - 3
sites/all/modules/contrib/dev/entity/entity.module

@@ -1088,9 +1088,10 @@ function entity_flush_caches() {
   // Care about entitycache tables.
   // Care about entitycache tables.
   if (module_exists('entitycache')) {
   if (module_exists('entitycache')) {
     $tables = array();
     $tables = array();
-    foreach (entity_crud_get_info() as $entity_type => $entity_info) {
-      if (isset($entity_info['module']) && !empty($entity_info['entity cache'])) {
-        $tables[] = 'cache_entity_' . $entity_type;
+    $tables_created = variable_get('entity_cache_tables_created');
+    if (is_array($tables_created)) {
+      foreach ($tables_created as $module => $entity_cache_tables) {
+        $tables = array_merge($tables, $entity_cache_tables);
       }
       }
     }
     }
     return $tables;
     return $tables;

+ 3 - 3
sites/all/modules/contrib/dev/entity/entity_token.info

@@ -5,9 +5,9 @@ files[] = entity_token.tokens.inc
 files[] = entity_token.module
 files[] = entity_token.module
 dependencies[] = entity
 dependencies[] = entity
 
 
-; Information added by Drupal.org packaging script on 2016-09-22
-version = "7.x-1.8"
+; Information added by Drupal.org packaging script on 2018-02-14
+version = "7.x-1.9"
 core = "7.x"
 core = "7.x"
 project = "entity"
 project = "entity"
-datestamp = "1474546503"
+datestamp = "1518620551"
 
 

+ 3 - 3
sites/all/modules/contrib/dev/entity/includes/entity.wrapper.inc

@@ -121,7 +121,7 @@ abstract class EntityMetadataWrapper {
     if (!$this->validate($value)) {
     if (!$this->validate($value)) {
       throw new EntityMetadataWrapperException(t('Invalid data value given. Be sure it matches the required data type and format. Value at !location: !value.', array(
       throw new EntityMetadataWrapperException(t('Invalid data value given. Be sure it matches the required data type and format. Value at !location: !value.', array(
         // An exception's message is output through check_plain().
         // An exception's message is output through check_plain().
-        '!value' => is_array($value) || is_object($value) ? var_export($value) : $value,
+        '!value' => is_array($value) || is_object($value) ? var_export($value, TRUE) : $value,
         '!location' => $this->debugIdentifierLocation(),
         '!location' => $this->debugIdentifierLocation(),
       )));
       )));
     }
     }
@@ -755,7 +755,7 @@ class EntityDrupalWrapper extends EntityStructureWrapper {
     if (!$this->validate($value)) {
     if (!$this->validate($value)) {
       throw new EntityMetadataWrapperException(t('Invalid data value given. Be sure it matches the required data type and format. Value at !location: !value.', array(
       throw new EntityMetadataWrapperException(t('Invalid data value given. Be sure it matches the required data type and format. Value at !location: !value.', array(
         // An exception's message is output through check_plain().
         // An exception's message is output through check_plain().
-        '!value' => is_array($value) || is_object($value) ? var_export($value) : $value,
+        '!value' => is_array($value) || is_object($value) ? var_export($value, TRUE) : $value,
         '!location' => $this->debugIdentifierLocation(),
         '!location' => $this->debugIdentifierLocation(),
       )));
       )));
     }
     }
@@ -1116,7 +1116,7 @@ class EntityListWrapper extends EntityMetadataWrapper implements IteratorAggrega
    */
    */
   public function getIterator() {
   public function getIterator() {
     // In case there is no data available, just iterate over the first item.
     // In case there is no data available, just iterate over the first item.
-    return new EntityMetadataWrapperIterator($this, $this->dataAvailable() ? array_keys(parent::value()) : array(0));
+    return new EntityMetadataWrapperIterator($this, ($this->dataAvailable() && is_array(parent::value())) ? array_keys(parent::value()) : array(0));
   }
   }
 
 
   /**
   /**

+ 1 - 1
sites/all/modules/contrib/dev/entity/modules/callbacks.inc

@@ -673,7 +673,7 @@ function entity_metadata_no_hook_node_access($op, $node = NULL, $account = NULL)
     if (empty($node->vid) && in_array($op, array('create', 'update'))) {
     if (empty($node->vid) && in_array($op, array('create', 'update'))) {
       // This is a new node or the original node.
       // This is a new node or the original node.
       if (isset($node->type)) {
       if (isset($node->type)) {
-        $op = !empty($node->is_new) && $node->is_new ? 'create' : 'update';
+        $op = empty($node->nid) || !empty($node->is_new) ? 'create' : 'update';
         return node_access($op, $op == 'create' ? $node->type : $node, $account);
         return node_access($op, $op == 'create' ? $node->type : $node, $account);
       }
       }
       else {
       else {

+ 3 - 3
sites/all/modules/contrib/dev/entity/tests/entity_feature.info

@@ -6,9 +6,9 @@ files[] = entity_feature.module
 dependencies[] = entity_test
 dependencies[] = entity_test
 hidden = TRUE
 hidden = TRUE
 
 
-; Information added by Drupal.org packaging script on 2016-09-22
-version = "7.x-1.8"
+; Information added by Drupal.org packaging script on 2018-02-14
+version = "7.x-1.9"
 core = "7.x"
 core = "7.x"
 project = "entity"
 project = "entity"
-datestamp = "1474546503"
+datestamp = "1518620551"
 
 

+ 3 - 3
sites/all/modules/contrib/dev/entity/tests/entity_test.info

@@ -7,9 +7,9 @@ files[] = entity_test.install
 dependencies[] = entity
 dependencies[] = entity
 hidden = TRUE
 hidden = TRUE
 
 
-; Information added by Drupal.org packaging script on 2016-09-22
-version = "7.x-1.8"
+; Information added by Drupal.org packaging script on 2018-02-14
+version = "7.x-1.9"
 core = "7.x"
 core = "7.x"
 project = "entity"
 project = "entity"
-datestamp = "1474546503"
+datestamp = "1518620551"
 
 

+ 3 - 3
sites/all/modules/contrib/dev/entity/tests/entity_test_i18n.info

@@ -5,9 +5,9 @@ dependencies[] = i18n_string
 package = Multilingual - Internationalization
 package = Multilingual - Internationalization
 core = 7.x
 core = 7.x
 hidden = TRUE
 hidden = TRUE
-; Information added by Drupal.org packaging script on 2016-09-22
-version = "7.x-1.8"
+; Information added by Drupal.org packaging script on 2018-02-14
+version = "7.x-1.9"
 core = "7.x"
 core = "7.x"
 project = "entity"
 project = "entity"
-datestamp = "1474546503"
+datestamp = "1518620551"
 
 

+ 31 - 1
sites/all/modules/contrib/dev/entity/views/handlers/entity_views_handler_area_entity.inc

@@ -40,7 +40,7 @@ class entity_views_handler_area_entity extends views_handler_area {
     $form['entity_id'] = array(
     $form['entity_id'] = array(
       '#type' => 'textfield',
       '#type' => 'textfield',
       '#title' => t('Entity id'),
       '#title' => t('Entity id'),
-      '#description' => t('Choose the entity you want to display in the area.'),
+      '#description' => t('Choose the entity you want to display in the area. To render an entity given by a contextual filter use "%1" for the first argument, "%2" for the second, etc.'),
       '#default_value' => $this->options['entity_id'],
       '#default_value' => $this->options['entity_id'],
     );
     );
 
 
@@ -105,6 +105,9 @@ class entity_views_handler_area_entity extends views_handler_area {
    * Render an entity using the view mode.
    * Render an entity using the view mode.
    */
    */
   public function render_entity($entity_type, $entity_id, $view_mode) {
   public function render_entity($entity_type, $entity_id, $view_mode) {
+    $tokens = $this->get_render_tokens();
+    // Replace argument tokens in entity id.
+    $entity_id = strtr($entity_id, $tokens);
     if (!empty($entity_type) && !empty($entity_id) && !empty($view_mode)) {
     if (!empty($entity_type) && !empty($entity_id) && !empty($view_mode)) {
       $entity = entity_load_single($entity_type, $entity_id);
       $entity = entity_load_single($entity_type, $entity_id);
       if (!empty($this->options['bypass_access']) || entity_access('view', $entity_type, $entity)) {
       if (!empty($this->options['bypass_access']) || entity_access('view', $entity_type, $entity)) {
@@ -117,4 +120,31 @@ class entity_views_handler_area_entity extends views_handler_area {
       return '';
       return '';
     }
     }
   }
   }
+
+  /**
+   * Get the 'render' tokens to use for advanced rendering.
+   *
+   * This runs through all of the fields and arguments that
+   * are available and gets their values. This will then be
+   * used in one giant str_replace().
+   */
+  function get_render_tokens() {
+    $tokens = array();
+    if (!empty($this->view->build_info['substitutions'])) {
+      $tokens = $this->view->build_info['substitutions'];
+    }
+    $count = 0;
+    foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) {
+      $token = '%' . ++$count;
+      if (!isset($tokens[$token])) {
+        $tokens[$token] = '';
+      }
+      // Use strip tags as there should never be HTML in the path.
+      // However, we need to preserve special characters like " that
+      // were removed by check_plain().
+      $tokens['%' . $count] = $handler->argument;
+    }
+
+    return $tokens;
+  }
 }
 }

+ 0 - 0
sites/all/modules/contrib/users/genpass/LICENSE.txt


+ 0 - 3
sites/all/modules/contrib/users/genpass/genpass.css

@@ -1,3 +0,0 @@
-.genpass-password {
-  white-space: nowrap;
-}

+ 3 - 4
sites/all/modules/contrib/users/genpass/genpass.info

@@ -3,9 +3,8 @@ description = Generate a password when adding a new user.
 core = 7.x
 core = 7.x
 configure = admin/config/people/accounts
 configure = admin/config/people/accounts
 
 
-; Information added by drupal.org packaging script on 2012-02-20
-version = "7.x-1.0"
+; Information added by Drupal.org packaging script on 2018-06-26
+version = "7.x-1.1"
 core = "7.x"
 core = "7.x"
 project = "genpass"
 project = "genpass"
-datestamp = "1329772844"
-
+datestamp = "1530031732"

+ 0 - 0
sites/all/modules/contrib/users/genpass/genpass.install


+ 50 - 47
sites/all/modules/contrib/users/genpass/genpass.module

@@ -9,13 +9,6 @@ define('GENPASS_DISPLAY_ADMIN', 1);
 define('GENPASS_DISPLAY_USER', 2);
 define('GENPASS_DISPLAY_USER', 2);
 define('GENPASS_DISPLAY_BOTH', 3);
 define('GENPASS_DISPLAY_BOTH', 3);
 
 
-/**
- * Implements of hook_init().
- */
-function genpass_init() {
-  drupal_add_css(drupal_get_path('module', 'genpass') . '/genpass.css');
-}
-
 /**
 /**
  * Defines default characters allowed for passwords.
  * Defines default characters allowed for passwords.
  */
  */
@@ -33,27 +26,31 @@ function genpass_generate() {
 }
 }
 
 
 /**
 /**
- * Generate a new password using genpass's internal password generation
- * algorithm.
- * Based on the original D6 user_password function (with more characters)
+ * Generates random password.
  *
  *
- * @return a fresh password according to the settings made in /admin/user/settings
+ * @see user_password()
  *
  *
- * @see genpass_form_alter()
+ * @return string
+ *   The random string.
  */
  */
 function genpass_password() {
 function genpass_password() {
   $pass = '';
   $pass = '';
-  $length = variable_get('genpass_length', 8);
+  $length = variable_get('genpass_length', 12);
   $allowable_characters = variable_get('genpass_entropy', _GENPASS_REQUIRED_entropy());
   $allowable_characters = variable_get('genpass_entropy', _GENPASS_REQUIRED_entropy());
 
 
   // Zero-based count of characters in the allowable list:
   // Zero-based count of characters in the allowable list:
   $len = strlen($allowable_characters) - 1;
   $len = strlen($allowable_characters) - 1;
-  
+
   // Loop the number of times specified by $length.
   // Loop the number of times specified by $length.
   for ($i = 0; $i < $length; $i++) {
   for ($i = 0; $i < $length; $i++) {
+    do {
+      // Find a secure random number within the range needed.
+      $index = ord(drupal_random_bytes(1));
+    } while ($index > $len);
+
     // Each iteration, pick a random character from the
     // Each iteration, pick a random character from the
     // allowable string and append it to the password:
     // allowable string and append it to the password:
-    $pass .= $allowable_characters[mt_rand(0, $len)];
+    $pass .= $allowable_characters[$index];
   }
   }
 
 
   return $pass;
   return $pass;
@@ -63,7 +60,7 @@ function genpass_password() {
 /**
 /**
  * Helper function to find a item in the user form, since its position
  * Helper function to find a item in the user form, since its position
  * within the form-array depends on the profile module (account-category).
  * within the form-array depends on the profile module (account-category).
- */ 
+ */
 function &_genpass_get_form_item(&$form, $field) {
 function &_genpass_get_form_item(&$form, $field) {
   if (isset($form['account'][$field])) {
   if (isset($form['account'][$field])) {
     return $form['account'][$field];
     return $form['account'][$field];
@@ -97,7 +94,7 @@ function genpass_form_alter(&$form, $form_state, $form_id) {
       $form['registration_cancellation']['genpass_length'] = array(
       $form['registration_cancellation']['genpass_length'] = array(
         '#type' => 'textfield',
         '#type' => 'textfield',
         '#title' => t('Generated password length'),
         '#title' => t('Generated password length'),
-        '#default_value' => variable_get('genpass_length', 8),
+        '#default_value' => variable_get('genpass_length', 12),
         '#size' => 2,
         '#size' => 2,
         '#maxlength' => 2,
         '#maxlength' => 2,
         '#description' => t('Set the length of generated passwords here. Allowed range: 5 to 32.'),
         '#description' => t('Set the length of generated passwords here. Allowed range: 5 to 32.'),
@@ -118,7 +115,7 @@ function genpass_form_alter(&$form, $form_state, $form_id) {
         '#default_value' => genpass_algorithm_module(),
         '#default_value' => genpass_algorithm_module(),
         '#options' => genpass_add_samples(genpass_algorithm_modules()),
         '#options' => genpass_add_samples(genpass_algorithm_modules()),
         '#description' => t('If third party modules define a password generation algorithm, you can select which one to use. Note that algorithms other than genpass will ignore the preferred entropy and password length. The currently selected algorithm produced the password @pw.', array('@pw' => genpass_generate())),
         '#description' => t('If third party modules define a password generation algorithm, you can select which one to use. Note that algorithms other than genpass will ignore the preferred entropy and password length. The currently selected algorithm produced the password @pw.', array('@pw' => genpass_generate())),
-      ); 
+      );
       $form['registration_cancellation']['genpass_display'] = array(
       $form['registration_cancellation']['genpass_display'] = array(
         '#type' => 'radios',
         '#type' => 'radios',
         '#title' => t('Generated password display'),
         '#title' => t('Generated password display'),
@@ -139,25 +136,25 @@ function genpass_form_alter(&$form, $form_state, $form_id) {
     // User registration form at admin/people/create
     // User registration form at admin/people/create
     case 'user_register_form':
     case 'user_register_form':
       $mode = variable_get('genpass_mode', GENPASS_REQUIRED);
       $mode = variable_get('genpass_mode', GENPASS_REQUIRED);
-      
+
       // Add validation function, where password may get set
       // Add validation function, where password may get set
       $form['#validate'][] = 'genpass_register_validate';
       $form['#validate'][] = 'genpass_register_validate';
-      
+
       // Administrator is creating the user
       // Administrator is creating the user
-      if ($_GET['q'] == 'admin/user/user/create') {
+      if ($_GET['q'] == 'admin/people/create') {
         // Switch to optional mode
         // Switch to optional mode
         $mode = GENPASS_OPTIONAL;
         $mode = GENPASS_OPTIONAL;
         // Help avoid obvious consequence of password being optional
         // Help avoid obvious consequence of password being optional
         $notify_item =& _genpass_get_form_item($form, 'notify');
         $notify_item =& _genpass_get_form_item($form, 'notify');
         $notify_item['#description'] = t('This is recommended when auto-generating the password; otherwise, neither you nor the new user will know the password.');
         $notify_item['#description'] = t('This is recommended when auto-generating the password; otherwise, neither you nor the new user will know the password.');
       }
       }
-      
+
       // Pass mode to validation function
       // Pass mode to validation function
       $form['genpass_mode'] = array(
       $form['genpass_mode'] = array(
         '#type' => 'value',
         '#type' => 'value',
         '#value' => $mode,
         '#value' => $mode,
       );
       );
-      
+
       $pass_item =& _genpass_get_form_item($form, 'pass');
       $pass_item =& _genpass_get_form_item($form, 'pass');
       switch ($mode) {
       switch ($mode) {
         // If password is optional, don't require it, and give the user an
         // If password is optional, don't require it, and give the user an
@@ -174,7 +171,7 @@ function genpass_form_alter(&$form, $form_state, $form_id) {
       }
       }
       break;
       break;
   }
   }
-  
+
 }
 }
 
 
 /**
 /**
@@ -200,38 +197,44 @@ function genpass_user_admin_settings_validate($form, &$form_state) {
  * User registration validation.
  * User registration validation.
  */
  */
 function genpass_register_validate($form, &$form_state) {
 function genpass_register_validate($form, &$form_state) {
-  if (empty($form_state['values']['pass']) && !form_get_errors()) {
-    
-    // Generate and set password
+  if (empty($form_state['values']['pass'])) {
+    // Generate and set password.
     $pass = genpass_generate();
     $pass = genpass_generate();
     $pass_item =& _genpass_get_form_item($form, 'pass');
     $pass_item =& _genpass_get_form_item($form, 'pass');
     form_set_value($pass_item, $pass, $form_state);
     form_set_value($pass_item, $pass, $form_state);
 
 
-    $display = variable_get('genpass_display', GENPASS_DISPLAY_BOTH);
+    if (!form_get_errors()) {
+      $display = variable_get('genpass_display', GENPASS_DISPLAY_BOTH);
+
+      // Administrator created the user.
+      if ($_GET['q'] == 'admin/people/create') {
+        $message = t('Since you did not provide a password, it was generated automatically for this account.');
 
 
-    // Administrator created the user.
-    if ($_GET['q'] == 'admin/people/create') {
-      $message = t('Since you did not provide a password, it was generated automatically for this account.');
-      if (in_array($display, array(GENPASS_DISPLAY_ADMIN, GENPASS_DISPLAY_BOTH))) {
-        $message .= ' ' . t('The password is: <strong class="genpass-password">!password</strong>', array('!password' => $pass));
+        if (in_array($display, array(GENPASS_DISPLAY_ADMIN, GENPASS_DISPLAY_BOTH))) {
+          $message .= ' ' . t('The password is: <strong class="nowrap">@password</strong>', array('@password' => $pass));
+        }
       }
       }
-    }
-    // Optional - User did not provide password, so it was generated
-    elseif ($form_state['values']['genpass_mode'] == GENPASS_OPTIONAL) {
-      $message = t('Since you did not provide a password, it was generated for you.');
-      if (in_array($display, array(GENPASS_DISPLAY_USER, GENPASS_DISPLAY_BOTH))) {
-        $message .= ' ' . t('Your password is: <strong class="genpass-password">!password</strong>', array('!password' => $pass));
+
+      // Optional - User did not provide password, so it was generated
+      elseif ($form_state['values']['genpass_mode'] == GENPASS_OPTIONAL) {
+        $message = t('Since you did not provide a password, it was generated for you.');
+
+        if (in_array($display, array(GENPASS_DISPLAY_USER, GENPASS_DISPLAY_BOTH))) {
+          $message .= ' ' . t('Your password is: <strong class="nowrap">@password</strong>', array('@password' => $pass));
+        }
+      }
+
+      // Restricted - User was forced to receive a generated password
+      elseif ($form_state['values']['genpass_mode'] == GENPASS_RESTRICTED && in_array($display, array(GENPASS_DISPLAY_USER, GENPASS_DISPLAY_BOTH))) {
+        $message = t('The following password was generated for you: <strong class="nowrap">@password</strong>', array('@password' => $pass));
       }
       }
-    }
-    // Restricted - User was forced to receive a generated password
-    elseif ($form_state['values']['genpass_mode'] == GENPASS_RESTRICTED && in_array($display, array(GENPASS_DISPLAY_USER, GENPASS_DISPLAY_BOTH))) {
-      $message = t('The following password was generated for you: <strong class="genpass-password">!password</strong>', array('!password' => $pass));
-    }
 
 
-    if (!empty($message)) {
-      drupal_set_message($message);
+      if (!empty($message)) {
+        drupal_set_message($message);
+      }
     }
     }
   }
   }
+
   return $form;
   return $form;
 }
 }
 
 
@@ -261,7 +264,7 @@ function genpass_algorithm_modules() {
 function genpass_algorithm_module() {
 function genpass_algorithm_module() {
   $modules = genpass_algorithm_modules();
   $modules = genpass_algorithm_modules();
   $module = variable_get('genpass_algorithm', 'genpass');
   $module = variable_get('genpass_algorithm', 'genpass');
-  
+
   if (in_array($module, array_keys($modules))) {
   if (in_array($module, array_keys($modules))) {
     return $module;
     return $module;
   }
   }