diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0746996cd3b156cb771a6f1e327fe9933c781298..3624111842404c169f70843f439f3ea6ff3aadca 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,14 @@ Linkit x.x-x.x, xxxx-xx-xx +Linkit 7.x-2.3, 2012-04-25 +------------------------------ +- Added feature #1511966: Autofocus in the search field. +- Fixed issue #1508846: Token module support for terms does not handle the right + tokens. +- Added entity module as a new dependency. +- Fixed issue #1508148: Term autocompletion by bundle doesn't work. +- Fixed issue #1508826: Warning: Invalid argument supplied for foreach() in + element_children(). Linkit 7.x-2.2, 2012-03-28 ------------------------------ diff --git a/linkit.info b/linkit.info index afa27dcc1569c60b1264930737ded3d09347853e..d24ddb0a759e1bd3d739bd67c2ed08d9490ef7f4 100644 --- a/linkit.info +++ b/linkit.info @@ -3,6 +3,7 @@ description = Provides an easy interface for inserting links to internal content core = 7.x configure = admin/config/content/linkit dependencies[] = ctools +dependencies[] = entity ; Our plugins interfaces and abstract implementations. diff --git a/plugins/linkit_plugins/linkit-plugin-entity.class.php b/plugins/linkit_plugins/linkit-plugin-entity.class.php index 519e6faa7b3edf3a0525e32f04691b91aa9af73a..68ea06d6c9ab7fd299f81fc0b08d61495b54c8e9 100644 --- a/plugins/linkit_plugins/linkit-plugin-entity.class.php +++ b/plugins/linkit_plugins/linkit-plugin-entity.class.php @@ -161,7 +161,11 @@ class LinkitPluginEntity extends LinkitPlugin { $this->query->propertyCondition($this->entity_field_label, '%' . db_like($this->serach_string) . '%', 'LIKE') ->addTag('linkit_entity_autocomplete') - ->addTag('linkit_' . $this->plugin['name'] . '_autocomplete'); + ->addTag('linkit_' . $this->plugin['entity_type'] . '_autocomplete'); + + // Add access tag for the query. + // There is also a runtime access check that uses entity_access(). + $this->query->addTag($this->plugin['entity_type'] . '_access'); // Bundle check. if (isset($this->entity_key_bundle) && isset($this->conf['bundles']) ) { @@ -183,10 +187,9 @@ class LinkitPluginEntity extends LinkitPlugin { $entities = entity_load($this->plugin['entity_type'], $ids); foreach ($entities AS $entity) { - // If we have the entity module enabled, we check the access againt the - // definded entity access callback. - if (module_exists('entity') && !entity_access('view', $this->plugin['entity_type'], $entity)) { - // continue; + // Check the access againt the definded entity access callback. + if (!entity_access('view', $this->plugin['entity_type'], $entity)) { + continue; } $matches[] = array(