Skip to content

Commit cbf007c

Browse files
committed
Fix permissions with page builder extensions
1 parent 5c5245f commit cbf007c

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
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 permission issues with page builder extensions
19+
1720
Version 8.1.14
1821
# Fixed install SQL missing a field
1922
# Fixed HTML5 notification image on multilingual sites

mod_shoutbox/helper.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ class ModShoutboxHelper
4545
*/
4646
public function __construct($id)
4747
{
48-
$this->params = $this->getParams($id);
4948
$this->db = JFactory::getDbo();
49+
$this->params = $this->getParams($id);
5050
}
5151

5252
/**
@@ -155,10 +155,20 @@ public static function getPostsAjax()
155155
*/
156156
public function getParams($title = null)
157157
{
158-
jimport('joomla.application.module.helper');
159-
$module = JModuleHelper::getModule('mod_shoutbox', $title);
158+
$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'));
162+
163+
$this->db->setQuery($query);
164+
$result = $this->db->loadResult();
165+
160166
$moduleParams = new JRegistry;
161-
$moduleParams->loadString($module->params);
167+
168+
if ($result !== '')
169+
{
170+
$moduleParams->loadString($result);
171+
}
162172

163173
return $moduleParams;
164174
}

0 commit comments

Comments
 (0)