function system_post_update_amend_config_sync_readme_url

Fix path in README.txt in CONFIG_SYNC_DIRECTORY.

File

core/modules/system/system.post_update.php, line 187

Code

function system_post_update_amend_config_sync_readme_url() {
    $configuration_directory = Settings::get('config_sync_directory');
    $readme_path = $configuration_directory . '/README.txt';
    if (!file_exists($readme_path)) {
        // No operation if the original file is not there.
        return;
    }
    $writable = is_writable($readme_path) || !file_exists($readme_path) && is_writable($configuration_directory);
    if (!$writable) {
        // Cannot write the README.txt file, nothing to do.
        return;
    }
    $original_content = file_get_contents($readme_path);
    $changed_content = str_replace('admin/config/development/configuration/sync', 'admin/config/development/configuration', $original_content);
    file_put_contents($readme_path, $changed_content);
    return \t('Amended configuration synchronization readme file content.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.