1 system.install system_update_1100()

Set the default Basis settings for CSS updates.

Related topics

File

core/modules/system/system.install, line 3715
Install, update and uninstall functions for the system module.

Code

function system_update_1100() {
  $themes = system_list('theme');
  if (!empty($themes['basis']->status)) {
    $config = config('basis.settings');
    $data = $config->getData();
    // Put the _config_static option at the top of the file.
    $data = array_merge(array(
      '_config_static' => TRUE,
    ), $data);
    if (!isset($data['css_update'])) {
      $data['css_update'] = 'install';
      // An empty version is sufficient, the same as "No updates" for existing
      // sites running Basis.
      $data['css_update_version'] = '';
    }
    $config->setData($data);
    $config->save();
  }
}