Projet

Général

Profil

Révision e4c061ad

Ajouté par Assos Assos il y a plus de 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/panels/panels.install
17 17
  // Assume that if the user is running an installation profile that both
18 18
  // Panels and CTools are the same release.
19 19
  if (!(defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install')) {
20
    // apparently the install process doesn't include .module files,
20
    // Apparently the install process doesn't include .module files,
21 21
    // so we need to force the issue in order for our versioning
22 22
    // check to work.
23 23
    if (!defined('PANELS_REQUIRED_CTOOLS_API')) {
......
30 30
      include_once drupal_get_path('module', 'ctools') . '/ctools.module';
31 31
    }
32 32
    if (!module_invoke('ctools', 'api_version', PANELS_REQUIRED_CTOOLS_API)) {
33
       $requirements['panels_ctools'] = array(
34
         'title' => $t('CTools API Version'),
35
         'value' => CTOOLS_API_VERSION,
36
         'severity' => REQUIREMENT_ERROR,
37
         'description' => t('The CTools API version is too old for Panels. Panels needs at least %version.', array('%version' => PANELS_REQUIRED_CTOOLS_API))
38
       );
33
      $requirements['panels_ctools'] = array(
34
        'title' => $t('CTools API Version'),
35
        'value' => CTOOLS_API_VERSION,
36
        'severity' => REQUIREMENT_ERROR,
37
        'description' => t('The CTools API version is too old for Panels. Panels needs at least %version.', array('%version' => PANELS_REQUIRED_CTOOLS_API)),
38
      );
39 39
    }
40 40
  }
41 41
  return $requirements;
42 42
}
43 43

  
44 44
/**
45
 * Implementation of hook_schema().
45
 * Implements of hook_schema().
46 46
 */
47 47
function panels_schema() {
48
  // This should always point to our 'current' schema. This makes it relatively easy
49
  // to keep a record of schema as we make changes to it.
50
  return panels_schema_5();
48
  // This should always point to our 'current' schema. This makes it relatively
49
  // easy to keep a record of schema as we make changes to it.
50
  return panels_schema_6();
51
}
52

  
53
function panels_schema_6() {
54
  $schema = panels_schema_5();
55

  
56
  $schema['cache_panels'] = drupal_get_schema_unprocessed('system', 'cache');
57

  
58
  return $schema;
51 59
}
52 60

  
53 61
function panels_schema_5() {
......
351 359
    'primary key' => array('lid'),
352 360
  );
353 361

  
354
  $schema['cache_panels'] = drupal_get_schema_unprocessed('system', 'cache');
355

  
356 362
  return $schema;
357 363
}
358 364

  
......
402 408
 * Adding universally unique identifiers to panels.
403 409
 */
404 410
function panels_update_7302() {
411
  if (!module_load_include('inc', 'ctools', 'includes/uuid')) {
412
    throw new DrupalUpdateException(t('Ctools UUID support not detected. You must update to a more recent version of the ctools module.'));
413
  }
405 414
  // Load the schema.
406 415
  $schema = panels_schema_5();
407 416
  $msg = array();
......
453 462

  
454 463
  $dids = array_unique(array_merge($display_dids, $pane_dids));
455 464

  
465
  // If the Panels module is disabled we don't have access to
466
  // panels_load_displays().
467
  if (!function_exists('panels_load_displays')) {
468
    module_load_include('module', 'panels');
469
  }
456 470
  if ($displays = panels_load_displays($dids)) {
457 471
    foreach ($displays as $display) {
458 472
      // A display save also triggers pane saves.
......
471 485
 * Add a custom cache table for Panels.
472 486
 */
473 487
function panels_update_7303() {
488
  $schema = panels_schema_6();
489

  
474 490
  $table_name = 'cache_panels';
475 491
  if (!db_table_exists($table_name)) {
476
    $schema = drupal_get_schema_unprocessed('system', 'cache');
477
    db_create_table($table_name, $schema);
492
    db_create_table($table_name, $schema[$table_name]);
478 493
  }
479 494
}

Formats disponibles : Unified diff