Skip to content

Commit

Permalink
Merge branch 'release/3.2.15'
Browse files Browse the repository at this point in the history
Release/3.2.15
  • Loading branch information
mayurngondhkar committed Oct 10, 2023
2 parents 342de54 + bb47a19 commit 036fdf9
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 23 deletions.
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@
"extra": {
"patches": {
"drupal/admin_audit_trail": {
"Add an option to allow logging in CLI - https://www.drupal.org/project/admin_audit_trail/issues/3263615#comment-14405529": "https://www.drupal.org/files/issues/2022-02-10/3263615-admin_audit_trail-option_for_cli-3.patch",
"Latest Release Breaks Pagination - https://www.drupal.org/project/admin_audit_trail/issues/3316835": "https://git.drupalcode.org/project/admin_audit_trail/-/merge_requests/9.diff"
"Add an option to allow logging in CLI - https://www.drupal.org/project/admin_audit_trail/issues/3263615#comment-14405529": "https://www.drupal.org/files/issues/2022-02-10/3263615-admin_audit_trail-option_for_cli-3.patch"
},
"drupal/core": {
"Contextual links should not be added inside another link - https://www.drupal.org/project/drupal/issues/2898875#comment-14018213": "https://www.drupal.org/files/issues/2021-03-03/contextual_links_should-2898875-16.patch",
Expand Down Expand Up @@ -284,7 +283,7 @@
"3253423: Warnings are skipped for valid users - https://www.drupal.org/project/user_expire/issues/3253423": "https://www.drupal.org/files/issues/2021-12-08/3253423-2-test-for-non-existent-account.patch"
},
"drupal/site_alert": {
"Add ability to dismiss alert - https://www.drupal.org/project/site_alert/issues/3156557#comment-14930684": "https://www.drupal.org/files/issues/2023-02-19/3156557-67.patch"
"Use HTTP GET to allow caching of AJAX request-3160200/Add ability to dismiss alert-3156557": "https://git.drupalcode.org/project/site_alert/-/merge_requests/3.patch"
},
"drupal/ckeditor_templates": {
"CKEditor 5 support for Content Templates - https://www.drupal.org/project/ckeditor_templates/issues/3273358#comment-14963779": "./patches/ckeditor_templates/ckeditor_templates_4.patch"
Expand Down
2 changes: 0 additions & 2 deletions config/install/user.role.editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ permissions:
- 'delete any image_gallery content'
- 'delete any landing_page content'
- 'delete any landing_page content'
- 'delete any media'
- 'delete any news content'
- 'delete any note content'
- 'delete any page content'
Expand All @@ -56,7 +55,6 @@ permissions:
- 'delete image_gallery revisions'
- 'delete landing_page revisions'
- 'delete landing_page revisions'
- 'delete media'
- 'delete news revisions'
- 'delete note revisions'
- 'delete own alert content'
Expand Down
2 changes: 1 addition & 1 deletion config/optional/pathauto.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ punctuation:
back_slash: 0
verbose: false
separator: '-'
max_length: 100
max_length: 255
max_component_length: 100
transliterate: true
reduce_ascii: false
Expand Down
16 changes: 4 additions & 12 deletions includes/helpers.inc
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,10 @@ function _tide_import_single_config($config_name, array $locations = [], $priori
*/
function _tide_retrieve_config_sync(string $config_name, string $key = NULL) {
try {
if (version_compare(\Drupal::VERSION, '8.8.0', '<')) {
$config_sync = config_get_config_directory(CONFIG_SYNC_DIRECTORY);
}
else {
$config_sync = Settings::get('config_sync_directory');
}
if ($config_sync) {
$config_file = $config_sync . DIRECTORY_SEPARATOR . $config_name . '.yml';
if (file_exists($config_file)) {
$config = Yaml::decode(file_get_contents($config_file));
return ($key && array_key_exists($key, $config)) ? $config[$key] : $config;
}
$config_file = Settings::get('config_sync_directory') . DIRECTORY_SEPARATOR . $config_name . '.yml';
if (file_exists($config_file)) {
$config = Yaml::decode(file_get_contents($config_file));
return ($key && array_key_exists($key, $config)) ? $config[$key] : $config;
}
}
catch (Exception $exception) {
Expand Down
4 changes: 2 additions & 2 deletions modules/tide_oauth/tide_oauth.install
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use Drupal\user\Entity\Role;
* Add the field_long_description field to Consumer entity display.
*/
function _tide_oauth_update_consumer_long_description_field() {
module_load_include('inc', 'tide_core', 'includes/helpers');
\Drupal::moduleHandler()->loadInclude('tide_core', 'inc', 'includes/helpers');

// Update the UUID of field storage and field config.
$field_name = 'field_long_description';
Expand Down Expand Up @@ -140,7 +140,7 @@ function _tide_oauth_update_consumer_long_description_field() {
* Add the machine_name field to Consumer entity display.
*/
function _tide_oauth_update_consumer_machine_name_field() {
module_load_include('inc', 'tide_core', 'includes/helpers');
\Drupal::moduleHandler()->loadInclude('tide_core', 'inc', 'includes/helpers');

// Update the UUID of field storage and field config.
$field_name = 'machine_name';
Expand Down
2 changes: 1 addition & 1 deletion modules/tide_ui_restriction/tide_ui_restriction.install
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function tide_ui_restriction_update_8001() {
\Drupal::service('module_installer')->install(['config_perms']);
}

module_load_include('inc', 'tide_core', 'includes/helpers');
\Drupal::moduleHandler()->loadInclude('tide_core', 'inc', 'includes/helpers');
$config_location = [
drupal_get_path('module', 'tide_ui_restriction') . '/config/install',
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Drupal\Core\Form\FormStateInterface;
use Drupal\node\NodeInterface;

module_load_include('inc', 'tide_workflow_notification', 'tide_workflow_notification.tokens');
\Drupal::moduleHandler()->loadInclude('tide_workflow_notification', 'inc', 'tide_workflow_notification.tokens');

/**
* Implements hook_form_FORM_ID_alter().
Expand Down
30 changes: 30 additions & 0 deletions tide_core.install
Original file line number Diff line number Diff line change
Expand Up @@ -1975,3 +1975,33 @@ function tide_core_update_8095() {
->save();
}
}

/**
* Increase character limit of URLs.
*/
function tide_core_update_8096() {
$config = \Drupal::configFactory()->getEditable('pathauto.settings');
$config->set('max_length', 255);
$config->save();
}

/**
* Revokes `delete any media` and `delete media` from the editor role.
*/
function tide_core_update_8097() {
$editor = Role::load('editor');
if (!$editor) {
return;
}
$permissionsToRemove = ['delete any media', 'delete media'];
$changed = FALSE;
foreach ($permissionsToRemove as $permission) {
if ($editor->hasPermission($permission)) {
$editor->revokePermission($permission);
$changed = TRUE;
}
}
if ($changed) {
$editor->save();
}
}
2 changes: 1 addition & 1 deletion tide_core.module
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ function tide_core_form_revision_overview_form_alter(&$form, FormStateInterface
* The form state.
*/
function _tide_core_node_edit_form_log_message_validate(array &$form, FormStateInterface $form_state) {
if (!$form['revision_log']['#access']) {
if (!$form['revision_log']['#access'] || $form_state->getValue('moderation_state') === NULL) {
return;
}
$moderation_state = reset($form_state->getValue('moderation_state'));
Expand Down

0 comments on commit 036fdf9

Please sign in to comment.