PluginProbe
User Access Manager / trunk
User Access Manager vtrunk
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | src/Object/ObjectMapHandler.php +16 -16 2.3.18trunk View file →
@@ -85,11 +85,11 @@
85 85
86 86 public function getPostTreeMap(): array
87 87 {
88 88 if ($this->postTreeMap === null) {
89 - $query = "SELECT ID AS id, post_parent AS parentId, post_type AS type
90 - FROM {$this->database->getPostsTable()}
91 - WHERE post_parent != 0 AND post_type != 'revision'";
89 + $query = "SELECT `ID` AS `id`, `post_parent` AS `parentId`, `post_type` AS `type`
90 + FROM `{$this->database->getPostsTable()}`
91 + WHERE `post_parent` != 0 AND `post_type` != 'revision'";
92 92
93 93 $this->postTreeMap = $this->getCachedTreeMap(
94 94 self::POST_TREE_MAP_CACHE_KEY,
95 95 ObjectHandler::GENERAL_POST_OBJECT_TYPE,
@@ -102,11 +102,11 @@
102 102
103 103 public function getTermTreeMap(): array
104 104 {
105 105 if ($this->termTreeMap === null) {
106 - $query = "SELECT term_id AS id, parent AS parentId, taxonomy AS type
107 - FROM {$this->database->getTermTaxonomyTable()}
108 - WHERE parent != 0";
106 + $query = "SELECT `term_id` AS `id`, `parent` AS `parentId`, `taxonomy` AS `type`
107 + FROM `{$this->database->getTermTaxonomyTable()}`
108 + WHERE `parent` != 0";
109 109
110 110 $this->termTreeMap = $this->getCachedTreeMap(
111 111 self::TERM_TREE_MAP_CACHE_KEY,
112 112 ObjectHandler::GENERAL_TERM_OBJECT_TYPE,
@@ -138,14 +138,14 @@
138 138 public function getTermPostMap(): array
139 139 {
140 140 if ($this->termPostMap === null) {
141 141 $select = "
142 - SELECT tr.object_id AS objectId, tt.term_id AS parentId, p.post_type AS type
143 - FROM {$this->database->getTermRelationshipsTable()} AS tr
144 - LEFT JOIN {$this->database->getPostsTable()} AS p
145 - ON (tr.object_id = p.ID)
146 - LEFT JOIN {$this->database->getTermTaxonomyTable()} AS tt
147 - ON (tr.term_taxonomy_id = tt.term_taxonomy_id)";
142 + SELECT `tr`.`object_id` AS `objectId`, `tt`.`term_id` AS `parentId`, `p`.`post_type` AS `type`
143 + FROM `{$this->database->getTermRelationshipsTable()}` AS `tr`
144 + LEFT JOIN `{$this->database->getPostsTable()}` AS `p`
145 + ON (`tr`.`object_id` = `p`.`ID`)
146 + LEFT JOIN `{$this->database->getTermTaxonomyTable()}` AS `tt`
147 + ON (`tr`.`term_taxonomy_id` = `tt`.`term_taxonomy_id`)";
148 148
149 149 $this->termPostMap = $this->getCachedMap(self::TERM_POST_MAP_CACHE_KEY, $select);
150 150 }
151 151
@@ -155,12 +155,12 @@
155 155 public function getPostTermMap(): array
156 156 {
157 157 if ($this->postTermMap === null) {
158 158 $select = "
159 - SELECT tr.object_id AS parentId, tt.term_id AS objectId, tt.taxonomy AS type
160 - FROM {$this->database->getTermRelationshipsTable()} AS tr
161 - LEFT JOIN {$this->database->getTermTaxonomyTable()} AS tt
162 - ON (tr.term_taxonomy_id = tt.term_taxonomy_id)";
159 + SELECT `tr`.`object_id` AS `parentId`, `tt`.`term_id` AS `objectId`, `tt`.`taxonomy` AS `type`
160 + FROM `{$this->database->getTermRelationshipsTable()}` AS `tr`
161 + LEFT JOIN `{$this->database->getTermTaxonomyTable()}` AS `tt`
162 + ON (`tr`.`term_taxonomy_id` = `tt`.`term_taxonomy_id`)";
163 163
164 164 $this->postTermMap = $this->getCachedMap(self::POST_TERM_MAP_CACHE_KEY, $select);
165 165 }
166 166