update_check_incompatibility($name, $type = 'module')
Tests the compatibility of a module or theme.
File
- core/includes/update.inc, line 37
- Drupal database update API.
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | function update_check_incompatibility( $name , $type = 'module' ) { static $themes , $modules ; // Store values of expensive functions for future use. if ( empty ( $themes ) || empty ( $modules )) { // We need to do a full rebuild here to make sure the database reflects any // code changes that were made in the filesystem before the update script // was initiated. $themes = \Drupal::service( 'theme_handler' )->rebuildThemeData(); $modules = system_rebuild_module_data(); } if ( $type == 'module' && isset( $modules [ $name ])) { $file = $modules [ $name ]; } elseif ( $type == 'theme' && isset( $themes [ $name ])) { $file = $themes [ $name ]; } if (!isset( $file ) || !isset( $file ->info[ 'core' ]) || $file ->info[ 'core' ] != \Drupal::CORE_COMPATIBILITY || version_compare(phpversion(), $file ->info[ 'php' ]) < 0) { return TRUE; } return FALSE; } |
Please login to continue.