Project

General

Profile

Revision 76bdcd04

Added by Assos Assos almost 6 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/print/print.install
21 21
 * Implements hook_enable().
22 22
 */
23 23
function print_enable() {
24
  // Module weight
24
  // Module weight.
25 25
  db_update('system')
26 26
    ->fields(array(
27 27
      'weight' => 0,
......
35 35
 * Implements hook_uninstall().
36 36
 */
37 37
function print_uninstall() {
38
  variable_del('print_settings');
39
  variable_del('print_sourceurl_settings');
40
  variable_del('print_html_settings');
41
  variable_del('print_robot_settings');
42
  variable_del('print_logo_url');
43
  variable_del('print_logo_options');
38
  variable_del('print_comments');
44 39
  variable_del('print_css');
40
  variable_del('print_footer_options');
41
  variable_del('print_footer_user');
42
  variable_del('print_html_display_sys_urllist');
43
  variable_del('print_html_link_text');
44
  variable_del('print_html_link_text_enabled');
45
  variable_del('print_html_new_window');
46
  variable_del('print_html_sendtoprinter');
47
  variable_del('print_html_windowclose');
45 48
  variable_del('print_keep_theme_css');
46
  variable_del('print_urls');
47
  variable_del('print_urls_anchors');
48
  variable_del('print_comments');
49
  variable_del('print_logo_options');
50
  variable_del('print_logo_url');
49 51
  variable_del('print_newwindow');
50
  variable_del('print_sourceurl_enabled');
52
  variable_del('print_robots_noarchive');
53
  variable_del('print_robots_nofollow');
54
  variable_del('print_robots_noindex');
51 55
  variable_del('print_sourceurl_date');
56
  variable_del('print_sourceurl_enabled');
52 57
  variable_del('print_sourceurl_forcenode');
53
  variable_del('print_html_show_link');
58
  variable_del('print_urls');
59
  variable_del('print_urls_anchors');
60

  
61
  variable_del('print_html_book_link');
62
  variable_del('print_html_link_class');
54 63
  variable_del('print_html_link_pos');
55 64
  variable_del('print_html_link_teaser');
56
  variable_del('print_html_node_link_visibility');
57
  variable_del('print_html_node_link_pages');
58
  variable_del('print_html_link_class');
59
  variable_del('print_html_sys_link_visibility');
60
  variable_del('print_html_sys_link_pages');
61
  variable_del('print_html_book_link');
62
  variable_del('print_html_new_window');
63
  variable_del('print_html_sendtoprinter');
64
  variable_del('print_html_windowclose');
65
  variable_del('print_display_sys_urllist');
66
  variable_del('print_robots_noindex');
67
  variable_del('print_robots_nofollow');
68
  variable_del('print_robots_noarchive');
69
  variable_del('print_footer_options');
70
  variable_del('print_footer_user');
71
  variable_del('print_html_link_text');
72 65
  variable_del('print_html_link_use_alias');
73
  variable_del('print_text_links');
74
  variable_del('print_text_published');
75
  variable_del('print_text_retrieved');
76
  variable_del('print_text_source_url');
77
  $settings = db_query("SELECT name FROM {variable} WHERE name LIKE 'print\_display\_%'");
66
  variable_del('print_html_show_link');
67
  variable_del('print_html_sys_link_pages');
68
  variable_del('print_html_sys_link_visibility');
69

  
70
  $settings = db_query("SELECT name FROM {variable} WHERE name LIKE 'print\_html\_display\_%'");
78 71
  foreach ($settings as $variable) {
79 72
    variable_del($variable->name);
80 73
  }
......
153 146
}
154 147

  
155 148
/**
156
 * Remove hardcoded numeric deltas from all blocks
149
 * Remove hardcoded numeric deltas from all blocks.
157 150
 */
158 151
function print_update_7000(&$sandbox) {
159 152
  $renamed_deltas = array(
......
167 160
}
168 161

  
169 162
/**
170
 * Enable block and help area links
163
 * Enable the print UI module.
164
 */
165
function print_update_7199(&$sandbox) {
166
  module_enable(array('print_ui'), FALSE);
167
}
168

  
169
/**
170
 * Delete old variables.
171 171
 */
172
function print_update_7101(&$sandbox) {
172
function print_update_7200(&$sandbox) {
173
  variable_del('print_settings');
174
  variable_del('print_sourceurl_settings');
175
  variable_del('print_html_settings');
176
  variable_del('print_robot_settings');
177

  
178
  variable_del('print_html_node_link_pages');
179
  variable_del('print_html_node_link_visibility');
180

  
181
  variable_del('print_text_links');
182
  variable_del('print_text_published');
183
  variable_del('print_text_retrieved');
184
  variable_del('print_text_source_url');
185

  
186
  $settings = db_query("SELECT name FROM {variable} WHERE name LIKE 'print\_display\_%'");
187
  foreach ($settings as $variable) {
188
    $name = $variable->name;
189

  
190
    variable_set(str_replace('print_', 'print_html_', $name), variable_get($name));
191
    variable_del($name);
192
  }
193
}
194

  
195
/**
196
 * Enable block and help area links.
197
 */
198
function print_update_7202(&$sandbox) {
173 199
  $link_pos = variable_get('print_html_link_pos', drupal_json_decode('{ "link": "link", "block": "block", "help": "help" }'));
174 200
  $link_pos['block'] = 'block';
175 201
  $link_pos['help'] = 'help';
......
177 203
}
178 204

  
179 205
/**
180
 * Increase size of the path field in the print_page_counter table
206
 * Increase size of the path field in the print_page_counter table.
181 207
 */
182
function print_update_7103(&$sandbox) {
208
function print_update_7203(&$sandbox) {
183 209
  db_drop_primary_key('print_page_counter');
184 210
  db_change_field('print_page_counter', 'path', 'path',
185
    array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'description' => 'Page path'),
211
    array(
212
      'type' => 'varchar',
213
      'length' => 255,
214
      'not null' => TRUE,
215
      'description' => 'Page path',
216
    ),
186 217
    array('primary key' => array('path')));
187 218
}

Also available in: Unified diff