-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpanelizer-entity-select-3.1.patch
40 lines (37 loc) · 1.66 KB
/
panelizer-entity-select-3.1.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/panelizer.install b/panelizer.install
index 3130b2c..9c56409 100755
--- a/panelizer.install
+++ b/panelizer.install
@@ -10,7 +10,7 @@
function panelizer_schema() {
// This should always point to our 'current' schema. This makes it
// relatively easy to keep a record of schema as we make changes to it.
- return panelizer_schema_3();
+ return panelizer_schema_5();
}
/**
@@ -248,6 +248,13 @@ function panelizer_schema_3() {
return $schema;
}
+function panelizer_schema_5() {
+ $schema = panelizer_schema_3();
+ $schema['panelizer_entity']['indexes']['revision_id'] = array('revision_id');
+
+ return $schema;
+}
+
/**
* Implements hook_install().
*/
diff --git a/plugins/entity/PanelizerEntityDefault.class.php b/plugins/entity/PanelizerEntityDefault.class.php
index 797b35e..c83ab46 100755
--- a/plugins/entity/PanelizerEntityDefault.class.php
+++ b/plugins/entity/PanelizerEntityDefault.class.php
@@ -718,7 +718,7 @@ abstract class PanelizerEntityDefault implements PanelizerEntityInterface {
// Load all the panelizers associated with the list of entities.
if ($this->supports_revisions) {
- $result = db_query("SELECT * FROM {panelizer_entity} WHERE entity_type = '$this->entity_type' AND entity_id IN (:ids) AND revision_id IN (:vids)", array(':ids' => $ids, ':vids' => $vids));
+ $result = db_query("SELECT * FROM {panelizer_entity} WHERE entity_type = :entity_type AND revision_id IN (:vids)", array(':entity_type' => $this->entity_type, ':vids' => $vids));
}
else {
$result = db_query("SELECT * FROM {panelizer_entity} WHERE entity_type = '$this->entity_type' AND entity_id IN (:ids)", array(':ids' => $ids));