';
- if ($version) {
+ if (!variable_get('module_filter_version_column', 0) && $version) {
$description .= '
' . t('Version: !module-version', array('!module-version' => drupal_render($module['version']))) . '
';
}
if ($requires) {
@@ -136,21 +146,20 @@ function theme_module_filter_system_modules_tabs($variables) {
$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.
$rows[0]['class'][] = 'first';
@@ -165,6 +174,12 @@ function theme_module_filter_system_modules_tabs($variables) {
return $output;
}
+/**
+ * Theme function for module filter operations.
+ * @param $variables
+ * @return
+ * HTML for admin status operations.
+ */
function theme_module_filter_operations(&$vars) {
$links = &$vars['links'];
$dropbutton = $vars['dropbutton'];
@@ -174,16 +189,19 @@ function theme_module_filter_operations(&$vars) {
if ($dropbutton) {
hide($links[$key]);
if (!empty($links[$key]['#href'])) {
- $operations[] = array(
+ $operations[$key] = array(
'title' => $links[$key]['#title'],
'href' => $links[$key]['#href'],
);
+ if (isset($links[$key]['#options'])) {
+ $operations[$key] += $links[$key]['#options'];
+ }
}
}
else {
$data = drupal_render($links[$key]);
if (!empty($data)) {
- $operations[] = array('data' => $data);
+ $operations[$key] = array('data' => $data);
}
}
}
diff --git a/sites/all/modules/contrib/dev/entity/entity.info b/sites/all/modules/contrib/dev/entity/entity.info
index 787db138..0b865a04 100644
--- a/sites/all/modules/contrib/dev/entity/entity.info
+++ b/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.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"
project = "entity"
-datestamp = "1474546503"
+datestamp = "1518620551"
diff --git a/sites/all/modules/contrib/dev/entity/entity.module b/sites/all/modules/contrib/dev/entity/entity.module
index d00afa46..da0acf69 100644
--- a/sites/all/modules/contrib/dev/entity/entity.module
+++ b/sites/all/modules/contrib/dev/entity/entity.module
@@ -1088,9 +1088,10 @@ function entity_flush_caches() {
// Care about entitycache tables.
if (module_exists('entitycache')) {
$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;
diff --git a/sites/all/modules/contrib/dev/entity/entity_token.info b/sites/all/modules/contrib/dev/entity/entity_token.info
index cc732945..c59c6502 100644
--- a/sites/all/modules/contrib/dev/entity/entity_token.info
+++ b/sites/all/modules/contrib/dev/entity/entity_token.info
@@ -5,9 +5,9 @@ files[] = entity_token.tokens.inc
files[] = entity_token.module
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"
project = "entity"
-datestamp = "1474546503"
+datestamp = "1518620551"
diff --git a/sites/all/modules/contrib/dev/entity/includes/entity.wrapper.inc b/sites/all/modules/contrib/dev/entity/includes/entity.wrapper.inc
index 6c262e69..860d2c33 100644
--- a/sites/all/modules/contrib/dev/entity/includes/entity.wrapper.inc
+++ b/sites/all/modules/contrib/dev/entity/includes/entity.wrapper.inc
@@ -121,7 +121,7 @@ abstract class EntityMetadataWrapper {
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(
// 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(),
)));
}
@@ -755,7 +755,7 @@ class EntityDrupalWrapper extends EntityStructureWrapper {
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(
// 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(),
)));
}
@@ -1116,7 +1116,7 @@ class EntityListWrapper extends EntityMetadataWrapper implements IteratorAggrega
*/
public function getIterator() {
// 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));
}
/**
diff --git a/sites/all/modules/contrib/dev/entity/modules/callbacks.inc b/sites/all/modules/contrib/dev/entity/modules/callbacks.inc
index 0c5c8eef..ee156ab3 100644
--- a/sites/all/modules/contrib/dev/entity/modules/callbacks.inc
+++ b/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'))) {
// This is a new node or the original node.
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);
}
else {
diff --git a/sites/all/modules/contrib/dev/entity/tests/entity_feature.info b/sites/all/modules/contrib/dev/entity/tests/entity_feature.info
index 3e398961..524fdfaf 100644
--- a/sites/all/modules/contrib/dev/entity/tests/entity_feature.info
+++ b/sites/all/modules/contrib/dev/entity/tests/entity_feature.info
@@ -6,9 +6,9 @@ files[] = entity_feature.module
dependencies[] = entity_test
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"
project = "entity"
-datestamp = "1474546503"
+datestamp = "1518620551"
diff --git a/sites/all/modules/contrib/dev/entity/tests/entity_test.info b/sites/all/modules/contrib/dev/entity/tests/entity_test.info
index f1562ac6..b7cceabf 100644
--- a/sites/all/modules/contrib/dev/entity/tests/entity_test.info
+++ b/sites/all/modules/contrib/dev/entity/tests/entity_test.info
@@ -7,9 +7,9 @@ files[] = entity_test.install
dependencies[] = entity
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"
project = "entity"
-datestamp = "1474546503"
+datestamp = "1518620551"
diff --git a/sites/all/modules/contrib/dev/entity/tests/entity_test_i18n.info b/sites/all/modules/contrib/dev/entity/tests/entity_test_i18n.info
index db1eb56a..4ca048af 100644
--- a/sites/all/modules/contrib/dev/entity/tests/entity_test_i18n.info
+++ b/sites/all/modules/contrib/dev/entity/tests/entity_test_i18n.info
@@ -5,9 +5,9 @@ dependencies[] = i18n_string
package = Multilingual - Internationalization
core = 7.x
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"
project = "entity"
-datestamp = "1474546503"
+datestamp = "1518620551"
diff --git a/sites/all/modules/contrib/dev/entity/views/handlers/entity_views_handler_area_entity.inc b/sites/all/modules/contrib/dev/entity/views/handlers/entity_views_handler_area_entity.inc
index f3746942..0c5b7143 100644
--- a/sites/all/modules/contrib/dev/entity/views/handlers/entity_views_handler_area_entity.inc
+++ b/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(
'#type' => 'textfield',
'#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'],
);
@@ -105,6 +105,9 @@ class entity_views_handler_area_entity extends views_handler_area {
* Render an entity using the 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)) {
$entity = entity_load_single($entity_type, $entity_id);
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 '';
}
}
+
+ /**
+ * 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;
+ }
}
diff --git a/sites/all/modules/contrib/users/genpass/LICENSE.txt b/sites/all/modules/contrib/users/genpass/LICENSE.txt
old mode 100755
new mode 100644
diff --git a/sites/all/modules/contrib/users/genpass/genpass.css b/sites/all/modules/contrib/users/genpass/genpass.css
deleted file mode 100755
index fc10c690..00000000
--- a/sites/all/modules/contrib/users/genpass/genpass.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.genpass-password {
- white-space: nowrap;
-}
diff --git a/sites/all/modules/contrib/users/genpass/genpass.info b/sites/all/modules/contrib/users/genpass/genpass.info
old mode 100755
new mode 100644
index be0d3e34..62895820
--- a/sites/all/modules/contrib/users/genpass/genpass.info
+++ b/sites/all/modules/contrib/users/genpass/genpass.info
@@ -3,9 +3,8 @@ description = Generate a password when adding a new user.
core = 7.x
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"
project = "genpass"
-datestamp = "1329772844"
-
+datestamp = "1530031732"
diff --git a/sites/all/modules/contrib/users/genpass/genpass.install b/sites/all/modules/contrib/users/genpass/genpass.install
old mode 100755
new mode 100644
diff --git a/sites/all/modules/contrib/users/genpass/genpass.module b/sites/all/modules/contrib/users/genpass/genpass.module
old mode 100755
new mode 100644
index 4629453f..c9145652
--- a/sites/all/modules/contrib/users/genpass/genpass.module
+++ b/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_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.
*/
@@ -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() {
$pass = '';
- $length = variable_get('genpass_length', 8);
+ $length = variable_get('genpass_length', 12);
$allowable_characters = variable_get('genpass_entropy', _GENPASS_REQUIRED_entropy());
// Zero-based count of characters in the allowable list:
$len = strlen($allowable_characters) - 1;
-
+
// Loop the number of times specified by $length.
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
// allowable string and append it to the password:
- $pass .= $allowable_characters[mt_rand(0, $len)];
+ $pass .= $allowable_characters[$index];
}
return $pass;
@@ -63,7 +60,7 @@ function genpass_password() {
/**
* Helper function to find a item in the user form, since its position
* within the form-array depends on the profile module (account-category).
- */
+ */
function &_genpass_get_form_item(&$form, $field) {
if (isset($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(
'#type' => 'textfield',
'#title' => t('Generated password length'),
- '#default_value' => variable_get('genpass_length', 8),
+ '#default_value' => variable_get('genpass_length', 12),
'#size' => 2,
'#maxlength' => 2,
'#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(),
'#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())),
- );
+ );
$form['registration_cancellation']['genpass_display'] = array(
'#type' => 'radios',
'#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
case 'user_register_form':
$mode = variable_get('genpass_mode', GENPASS_REQUIRED);
-
+
// Add validation function, where password may get set
$form['#validate'][] = 'genpass_register_validate';
-
+
// Administrator is creating the user
- if ($_GET['q'] == 'admin/user/user/create') {
+ if ($_GET['q'] == 'admin/people/create') {
// Switch to optional mode
$mode = GENPASS_OPTIONAL;
// Help avoid obvious consequence of password being optional
$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.');
}
-
+
// Pass mode to validation function
$form['genpass_mode'] = array(
'#type' => 'value',
'#value' => $mode,
);
-
+
$pass_item =& _genpass_get_form_item($form, 'pass');
switch ($mode) {
// 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;
}
-
+
}
/**
@@ -200,38 +197,44 @@ function genpass_user_admin_settings_validate($form, &$form_state) {
* User registration validation.
*/
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_item =& _genpass_get_form_item($form, 'pass');
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.');
- if (in_array($display, array(GENPASS_DISPLAY_ADMIN, GENPASS_DISPLAY_BOTH))) {
- $message .= ' ' . t('The password is:
!password', 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:
!password', 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:
!password', array('!password' => $pass));
- }
+ // 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 (!empty($message)) {
- drupal_set_message($message);
+ if (in_array($display, array(GENPASS_DISPLAY_ADMIN, GENPASS_DISPLAY_BOTH))) {
+ $message .= ' ' . t('The password is:
@password', 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:
@password', 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:
@password', array('@password' => $pass));
+ }
+
+ if (!empty($message)) {
+ drupal_set_message($message);
+ }
}
}
+
return $form;
}
@@ -261,7 +264,7 @@ function genpass_algorithm_modules() {
function genpass_algorithm_module() {
$modules = genpass_algorithm_modules();
$module = variable_get('genpass_algorithm', 'genpass');
-
+
if (in_array($module, array_keys($modules))) {
return $module;
}