function views_update_6001 in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.3 views.install \views_update_6001()
- 6.2 views.install \views_update_6001()
Remove '$' symbol in special blocks, as it is invalid for theming.
File
- ./
views.install, line 291 - Contains install and update functions for Views.
Code
function views_update_6001() {
$result = db_query("SELECT * FROM {blocks} WHERE module = 'views' AND delta LIKE '\$exp%'");
foreach ($result as $block) {
$new = strtr($block->delta, '$', '-');
update_sql("UPDATE {blocks} SET delta = '" . db_escape_string($new) . "' WHERE module = 'views' AND delta = '" . db_escape_string($block->delta) . "'");
}
update_sql("UPDATE {blocks} SET delta = CONCAT(delta, '-block_1') WHERE module = 'views'");
}