Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1098803
D400.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
Thu, Aug 14, 5:51 AM
Size
973 B
Mime Type
text/x-diff
Expires
Fri, Aug 15, 5:51 AM (2 h, 7 m)
Engine
blob
Format
Raw Data
Handle
711456
Attached To
D400: INP-1800 - Remove duplicate primary theme detection query
D400.diff
View Options
Index: branches/5.2.x/core/units/helpers/themes_helper.php
===================================================================
--- branches/5.2.x/core/units/helpers/themes_helper.php
+++ branches/5.2.x/core/units/helpers/themes_helper.php
@@ -594,15 +594,9 @@
// get theme, that user selected in catalog
$theme_id = $this->Application->RecallVar('theme_id');
- if ($theme_id === false) {
- // query, because "m_theme" is always empty in admin
- $id_field = $this->Application->getUnitOption('theme', 'IDField');
- $table_name = $this->Application->getUnitOption('theme', 'TableName');
-
- $sql = 'SELECT ' . $id_field . '
- FROM ' . $table_name . '
- WHERE (PrimaryTheme = 1) AND (Enabled = 1)';
- $theme_id = $this->Conn->GetOne($sql);
+ if ( $theme_id === false ) {
+ // Query, because "m_theme" is always empty in admin.
+ $theme_id = $this->Application->GetDefaultThemeId(true);
}
return $theme_id;
Event Timeline
Log In to Comment