security update core+modules
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user