security updates

have to check views and entityreference for custom patches
This commit is contained in:
Bachir Soussi Chiadmi
2015-04-19 20:45:16 +02:00
parent 802ec0c6f3
commit b3221c71e2
516 changed files with 14267 additions and 7349 deletions

View File

@@ -22,12 +22,21 @@ function i18n_uninstall() {
}
/**
* Add fields to schema if they don't exist
* Add fields to the schema if they don't exist.
*
* @param string $table
* The name of the database table.
* @param array $fields
* The list of database fields to create.
* @param boolean $force_rebuild_schema
* Whether to force drupal_get_schema() to rebuild the schema. This may be
* necessary when additional implementations of hook_schema_alter() have
* become available since the schema was originally built.
*/
function i18n_install_create_fields($table, $fields) {
function i18n_install_create_fields($table, $fields, $force_rebuild_schema = FALSE) {
static $schema;
// Do not force schema refresh more than once per request.
$schema = drupal_get_schema($table, !isset($schema));
$rebuild_schema = !isset($schema) || $force_rebuild_schema;
$schema = drupal_get_schema($table, $rebuild_schema);
foreach ($fields as $field) {
if (!empty($schema['fields'][$field])) {
if (!db_field_exists($table, $field)) {