Stable prep: Patch the theme.yaml file for latest YAML version
Fixes #1950
This commit is contained in:
parent
d7cfe61e67
commit
d6d5a37ab1
|
|
@ -15,6 +15,16 @@ class DbCmsTimestampFix extends Migration
|
|||
DbDongle::disableStrictMode();
|
||||
|
||||
DbDongle::convertTimestamps('cms_theme_data');
|
||||
|
||||
// Use this opportunity to patch the theme.yaml file for stable
|
||||
$demoTheme = base_path('themes/demo/theme.yaml');
|
||||
if (file_exists($demoTheme) && is_writable($demoTheme)) {
|
||||
$contents = file_get_contents($demoTheme);
|
||||
$search = "description: Demo OctoberCMS theme. Demonstrates the basic concepts of the front-end theming: layouts, pages, partials, components, content blocks, AJAX framework.";
|
||||
$replace = "description: 'Demo OctoberCMS theme. Demonstrates the basic concepts of the front-end theming: layouts, pages, partials, components, content blocks, AJAX framework.'";
|
||||
$contents = str_replace($search, $replace, $contents);
|
||||
file_put_contents($demoTheme, $contents);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
|
|
|
|||
Loading…
Reference in New Issue