Projet

Général

Profil

Révision 661d64c9

Ajouté par Assos Assos il y a plus de 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/diff/diff.install
5 5
 * Provides uninstallation functions.
6 6
 */
7 7

  
8
/**
9
 * Implements hook_install().
10
 */
11
function diff_install() {
12
  user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('diff view changes'));
13
  user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('diff view changes'));
14
}
15

  
8 16
/**
9 17
 * Implements hook_uninstall().
10 18
 */
......
16 24
    'diff_view_mode_',
17 25
    'diff_admin_path_',
18 26
    'diff_default_state_',
27
    'diff_additional_options_',
19 28
  );
20 29
  foreach ($prefixes as $prefix) {
21 30
    db_delete('variable')
......
55 64
  }
56 65
}
57 66

  
58
/**
59
 * Removed diff_update_7301().
60
 */
61

  
62
/**
63
 * Removed diff_update_7302().
64
 */
65

  
66 67
/**
67 68
 * Renames some internal settings names.
68 69
 */
69 70
function diff_update_7303() {
70
  // Get current values
71
  // Get current values.
71 72
  $radio = variable_get('diff_script_revisioning', 'simple');
72 73
  $leading = variable_get('diff_leading_context_lines', 2);
73 74
  $trailing = variable_get('diff_trailing_context_lines', 2);
74
  // Create new variable names
75
  // Create new variable names.
75 76
  variable_set('diff_radio_behavior', $radio);
76 77
  variable_set('diff_context_lines_leading', $leading);
77 78
  variable_set('diff_context_lines_trailing', $trailing);
78
  // Delete old variables
79
  // Delete old variables.
79 80
  variable_del('diff_script_revisioning');
80 81
  variable_del('diff_leading_context_lines');
81 82
  variable_del('diff_trailing_context_lines');
......
88 89
  // This is now always applied to text fields.
89 90
  variable_del('diff_normalise_text');
90 91

  
91
  // Merge the content type settings for the inline diff block into a single variable.
92
  // diff_update_7300() - show_diff_inline_TYPE to diff_show_diff_inline_node_TYPE
92
  // Merge the content type settings for the inline diff block into a single
93
  // variable.
93 94
  $node_types = array_keys(node_type_get_types());
94 95
  $enabled_types = array();
95 96
  foreach ($node_types as $node_type) {
......
122 123
      ->condition('name', db_like('diff_view_mode_inline_') . '%', 'LIKE')
123 124
      ->execute();
124 125
}
126

  
127
/**
128
 * Sets the optional additional node properties to render so that the title
129
 * still shows by default when doing node comparisons.
130
 */
131
function diff_update_7306() {
132
  variable_set('diff_additional_options_node', array('title' => 'title'));
133
}
134

  
135
/**
136
 * Grants access to the Diff "View Changes" button permission to all users.
137
 */
138
function diff_update_7307() {
139
  user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('diff view changes'));
140
  user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('diff view changes'));
141
}

Formats disponibles : Unified diff