You are here

function _features_get_signature_storage_type in Features 7.2

Gets the current storage type for features component signatures.

This is needed to prevent breakage in a database that is not fully updated yet, e.g. in deployment operations that run before the database update.

The signatures used to be stored in a variable. Since #1325288, it was stored in a cache table. This only applies to projects that were using a -dev branch after 7.x-2.11. Since #3162854, it is stored in a dedicated non-cache table.

Return value

string One of 'table', 'cache' or 'type'. On a fully updated database, this value will be 'table'.

See also

\features_get_signature()

\features_set_signature()

\features_update_7202()

2 calls to _features_get_signature_storage_type()
features_get_signature in ./features.export.inc
Gets an md5 signature for a the state of an object in code or database.
features_set_signature in ./features.export.inc
Updates a module/component signature in the database.
1 string reference to '_features_get_signature_storage_type'
features_update_7202 in ./features.install
Create a new table 'features_signature' to store signatures.

File

./features.export.inc, line 1044
Contains functions that export configuration into feature modules.

Code

function _features_get_signature_storage_type() {
  $type =& drupal_static(__FUNCTION__);
  if ($type !== NULL) {
    return $type;
  }
  if (db_table_exists('features_signature')) {
    $type = 'table';
  }
  elseif (db_table_exists('cache_featurestate')) {
    $type = 'cache';
  }
  else {
    $type = 'variable';
  }
  return $type;
}