View source
<?php
function express_install() {
$default_theme = 'cuspirit';
$admin_theme = 'expressadmin';
db_update('system')
->fields(array(
'status' => 0,
))
->condition('type', 'theme')
->execute();
db_update('system')
->fields(array(
'status' => 1,
))
->condition('type', 'theme')
->condition('name', $default_theme)
->execute();
variable_set('theme_default', $default_theme);
variable_set('admin_theme', $admin_theme);
variable_set('node_admin_theme', '1');
$blocks = array(
array(
'module' => 'system',
'delta' => 'main',
'theme' => $default_theme,
'status' => 1,
'weight' => 0,
'region' => 'content',
'pages' => '',
'cache' => -1,
),
array(
'module' => 'system',
'delta' => 'help',
'theme' => $default_theme,
'status' => 1,
'weight' => -10,
'region' => 'content',
'pages' => '',
'cache' => -1,
),
array(
'module' => 'system',
'delta' => 'main',
'theme' => $admin_theme,
'status' => 1,
'weight' => 0,
'region' => 'content',
'pages' => '',
'cache' => -1,
),
array(
'module' => 'system',
'delta' => 'help',
'theme' => $admin_theme,
'status' => 1,
'weight' => 0,
'region' => 'help',
'pages' => '',
'cache' => -1,
),
);
db_delete('block')
->condition('module', 'system')
->execute();
db_delete('block')
->condition('module', 'user')
->execute();
$query = db_insert('block')
->fields(array(
'module',
'delta',
'theme',
'status',
'weight',
'region',
'pages',
'cache',
));
foreach ($blocks as $block) {
$query
->values($block);
}
$query
->execute();
$shortcut_set = shortcut_set_load(SHORTCUT_DEFAULT_SET_NAME);
$shortcut_set->links = NULL;
$shortcut_set->links = array(
array(
'link_path' => 'admin/structure/menu/manage/main-menu',
'link_title' => st('Main Menu'),
'weight' => -12,
),
);
shortcut_set_save($shortcut_set);
variable_set('node_admin_theme', 1);
variable_set('quicktabs_tabstyle', 'Tabs');
variable_set('image_allow_insecure_derivatives', TRUE);
variable_set('pathauto_transliterate', 1);
variable_set('error_level', 0);
variable_set('site_default_country', 'US');
variable_set('user_register', 0);
variable_set('focal_point_default_method', 'smartcrop');
variable_set('menu_footer_links_source', 'menu-footer-menu');
variable_set('menu_secondary_links_source', 'menu-secondary-menu');
variable_set('google_appliance_error_gsa_no_results_format', 'wysiwyg');
variable_set('honeypot_element_name', 'url');
variable_set('honeypot_form_user_pass', 0);
variable_set('honeypot_log', 0);
variable_set('honeypot_protect_all_forms', 1);
variable_set('honeypot_time_limit', 0);
$locale_custom_strings_en = array(
'Each menu has a corresponding block that is managed on the <a href="@blocks">Blocks administration page</a>.' => 'Each menu has a corresponding block which can be placed in a content region.',
'Set and configure the default theme for your website. Alternative <a href="@themes">themes</a> are available.' => 'Set and configure the default theme for your website.',
'The menu module allows on-the-fly creation of menu links in the content authoring forms. To configure these settings for a particular content type, visit the <a href="@content-types">Content types</a> page, click the <em>edit</em> link for the content type, and go to the <em>Menu settings</em> section.' => 'The menu module allows on-the-fly creation of menu links.',
);
variable_set('locale_custom_strings_en', $locale_custom_strings_en);
menu_rebuild();
node_access_needs_rebuild(FALSE);
drupal_get_messages();
}
function express_update_7001() {
registry_rebuild();
}
function express_update_7002() {
module_enable(array(
'express_version',
));
}
function express_update_7003() {
module_enable(array(
'field_reference_delete',
));
}
function express_update_7004() {
module_enable(array(
'cu_elysia_cron',
));
secure_permissions_rebuild();
}