Stable prep: Patch the theme.yaml file for latest YAML version

Fixes #1950
This commit is contained in:
Samuel Georges 2016-06-06 07:33:21 +10:00
parent d7cfe61e67
commit d6d5a37ab1
1 changed files with 10 additions and 0 deletions

View File

@ -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()