123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
- function minimal_install() {
-
- $default_theme = variable_get('theme_default', 'bartik');
- $values = array(
- array(
- 'module' => 'system',
- 'delta' => 'main',
- 'theme' => $default_theme,
- 'status' => 1,
- 'weight' => 0,
- 'region' => 'content',
- 'pages' => '',
- 'cache' => -1,
- ),
- array(
- 'module' => 'user',
- 'delta' => 'login',
- 'theme' => $default_theme,
- 'status' => 1,
- 'weight' => 0,
- 'region' => 'sidebar_first',
- 'pages' => '',
- 'cache' => -1,
- ),
- array(
- 'module' => 'system',
- 'delta' => 'navigation',
- 'theme' => $default_theme,
- 'status' => 1,
- 'weight' => 0,
- 'region' => 'sidebar_first',
- 'pages' => '',
- 'cache' => -1,
- ),
- array(
- 'module' => 'system',
- 'delta' => 'management',
- 'theme' => $default_theme,
- 'status' => 1,
- 'weight' => 1,
- 'region' => 'sidebar_first',
- 'pages' => '',
- 'cache' => -1,
- ),
- array(
- 'module' => 'system',
- 'delta' => 'help',
- 'theme' => $default_theme,
- 'status' => 1,
- 'weight' => 0,
- 'region' => 'help',
- 'pages' => '',
- 'cache' => -1,
- ),
- );
- $query = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'cache'));
- foreach ($values as $record) {
- $query->values($record);
- }
- $query->execute();
-
- variable_set('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
-
- user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content'));
- user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access content'));
- }
|