Version 5.0.0 release
This commit is contained in:
1 parent
90e8c7e903
commit
a3a4a9ccbd
651 files changed
+7275
-9481
No files matched your search
@@ -345,48 +345,6 @@ class upgrade extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
/* Check theme compatibility (checks if any of the HTML templates or CSS files that have been customised on installed themes have changed between the version we are upgrading from to the version we are upgrading to) */
|
||||
if ( $data['info']['steps']['theme'] )
|
||||
{
|
||||
if ( !isset( Request::i()->skip_theme_check ) )
|
||||
{
|
||||
$conflicts = array();
|
||||
$validThemeIds = array_keys( Theme::themes() );
|
||||
|
||||
/* Check all of our customised HTML templates to see if any are in that list */
|
||||
foreach ( Db::i()->select( array( 'template_id', 'template_set_id', 'template_app', 'template_location', 'template_group', 'template_name' ), 'core_theme_templates', array( 'template_set_id>0' ) ) as $modifiedTemplate )
|
||||
{
|
||||
$templateKey = "{$modifiedTemplate['template_location']}/{$modifiedTemplate['template_group']}/{$modifiedTemplate['template_name']}";
|
||||
if ( isset( $data['changes']['theme'][ $modifiedTemplate['template_app'] ] ) )
|
||||
{
|
||||
if ( in_array( $modifiedTemplate['template_set_id'], $validThemeIds ) and in_array( $templateKey, $data['changes']['theme'][ $modifiedTemplate['template_app'] ]['html']['edited'] ) )
|
||||
{
|
||||
$conflicts[ $modifiedTemplate['template_set_id'] ]['html'][ $modifiedTemplate['template_app'] . '/' . $templateKey ] = $modifiedTemplate['template_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check all of our customised CSS files to see if any are in that list */
|
||||
foreach ( Db::i()->select( array( 'css_id', 'css_set_id', 'css_app', 'css_location', 'css_path', 'css_name' ), 'core_theme_css', array( 'css_set_id>0' ) ) as $modifiedCss )
|
||||
{
|
||||
$cssKey = "{$modifiedCss['css_location']}/" . ( $modifiedCss['css_path'] ? "{$modifiedCss['css_path']}/" : '' ) . $modifiedCss['css_name'];
|
||||
if ( isset( $data['changes']['theme'][ $modifiedCss['css_app'] ] ) )
|
||||
{
|
||||
if ( in_array( $modifiedCss['css_set_id'], $validThemeIds ) and in_array( $cssKey, $data['changes']['theme'][ $modifiedCss['css_app'] ]['css']['edited'] ) )
|
||||
{
|
||||
$conflicts[ $modifiedCss['css_set_id'] ]['css'][ $modifiedCss['css_app'] . '/' . $cssKey ] = $modifiedCss['css_set_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If there was any, display that */
|
||||
if ( count( $conflicts ) )
|
||||
{
|
||||
return Theme::i()->getTemplate('system')->upgradeDeltaThemeConflicts( $values['version'], $conflicts );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Have we set the complete "kill the automatic upgrader" flag?
|
||||
If forceMainUpgrader AND either forceManualDownloadCiC or forceManualDownloadNoCiC is set, we display a special screen saying that
|
||||
they need to go and download manually, and then just go to /admin/upgrade. This can be used for major upgrades where trying to do
|
||||
|
||||
Reference in new issue
Block a user