Skip to content

Commit accb86a

Browse files
committed
Fix bug getting module parameters
1 parent 2bba911 commit accb86a

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

changelog.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
- -> Removed
1515
! -> Note
1616

17+
WIP
18+
# Fix bug getting module parameters
19+
1720
Version 8.1.15
1821
# Fix permission issues with page builder extensions
1922

mod_shoutbox/helper.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,19 @@ public static function getPostsAjax()
156156
public function getParams($title = null)
157157
{
158158
$query = $this->db->getQuery(true)
159-
->select('params')
160-
->from($this->db->qn('#__modules'))
161-
->where($this->db->qn('module') . ' = ' . $this->db->q('mod_shoutbox'));
159+
->select('m.id, m.module, m.params')
160+
->from('#__modules AS m')
161+
->join('LEFT', '#__modules_menu AS mm ON mm.moduleid = m.id')
162+
->where('m.published = 1')
163+
->where('m.module = ' . $this->db->q('mod_shoutbox'))
164+
->join('LEFT', '#__extensions AS e ON e.element = m.module AND e.client_id = m.client_id')
165+
->where('e.enabled = 1');
162166

163167
$this->db->setQuery($query);
164-
$result = $this->db->loadResult();
168+
$result = $this->db->loadObject();
165169

166170
$moduleParams = new JRegistry;
167-
171+
168172
if ($result !== '')
169173
{
170174
$moduleParams->loadString($result);

0 commit comments

Comments
 (0)