Skip to content

Commit 1072cf7

Browse files
committed
fix composing css
1 parent fa6eb8a commit 1072cf7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

classes/snippets.php

+7-4
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ public static function get_enabled_snippet_css() {
6666
global $DB;
6767

6868
// Compose SQL base query.
69-
$sql = 'SELECT *
70-
FROM {theme_boost_union_snippets} t
71-
ORDER BY sort';
69+
$sql = "SELECT *
70+
FROM m_theme_boost_union_snippets
71+
WHERE enabled = '1'
72+
ORDER BY sortorder";
7273

7374
// Get records.
7475
$data = $DB->get_recordset_sql($sql);
@@ -77,10 +78,12 @@ public static function get_enabled_snippet_css() {
7778

7879
foreach ($data as $snippet) {
7980
if ($snippet->enabled) {
80-
$css .= self::get_snippet($snippet->key, $snippet->domain);
81+
$css .= self::get_snippet($snippet->key, $snippet->domain)['css'] . ' ';
8182
}
8283
}
8384

85+
$data->close();
86+
8487
return $css;
8588
}
8689
}

0 commit comments

Comments
 (0)