Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F726997
D327.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 4:53 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Tue, Jan 7, 4:53 AM (2 d, 23 h ago)
Engine
blob
Format
Raw Data
Handle
537066
Attached To
D327: INP-1728 - Add dynamic LEFT JOINs using ENTER in "OnAfterConfigRead" events
D327.diff
View Options
Index: branches/5.2.x/core/units/reviews/reviews_event_handler.php
===================================================================
--- branches/5.2.x/core/units/reviews/reviews_event_handler.php
+++ branches/5.2.x/core/units/reviews/reviews_event_handler.php
@@ -585,9 +585,12 @@
$item_table = $this->Application->getUnitOption($regs[1], 'TableName');
$ci_table = $this->Application->getUnitOption('ci', 'TableName');
+ /** @var array $list_sqls */
$list_sqls = $this->Application->getUnitOption($event->Prefix, 'ListSQLs');
- $list_sqls[''] .= ' LEFT JOIN '.$item_table.' item_table ON item_table.ResourceId = %1$s.ItemId';
- $list_sqls[''] .= ' LEFT JOIN '.$ci_table.' ci ON item_table.ResourceId = ci.ItemResourceId AND ci.PrimaryCat = 1';
+ $list_sqls[''] .= PHP_EOL . 'LEFT JOIN ' . $item_table . ' item_table
+ ON item_table.ResourceId = %1$s.ItemId';
+ $list_sqls[''] .= PHP_EOL . 'LEFT JOIN ' . $ci_table . ' ci
+ ON item_table.ResourceId = ci.ItemResourceId AND ci.PrimaryCat = 1';
$this->Application->setUnitOption($event->Prefix, 'ListSQLs', $list_sqls);
// 2. add calculated field
Event Timeline
Log In to Comment