system_update_6027
modules/system/system.install, строка 2025
- Версии
- 6
system_update_6027()
Add block cache.
Связанные темы
Код
<?php
function system_update_6027() {
$ret = array();
// Create the blocks.cache column.
db_add_field($ret, 'blocks', 'cache', array('type' => 'int', 'not null' => TRUE, 'default' => 1, 'size' => 'tiny'));
// The cache_block table is created in update_fix_d6_requirements() since
// calls to cache_clear_all() would otherwise cause warnings.
// Fill in the values for the new 'cache' column in the {blocks} table.
foreach (module_list() as $module) {
if ($module_blocks = module_invoke($module, 'block', 'list')) {
foreach ($module_blocks as $delta => $block) {
if (isset($block['cache'])) {
db_query("UPDATE {blocks} SET cache = %d WHERE module = '%s' AND delta = %d", $block['cache'], $module, $delta);
}
}
}
}
return $ret;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии