Skip to content

Commit

Permalink
[com_ajax] Change modules check (#19818)
Browse files Browse the repository at this point in the history
* Add com_ajax check in getModuleList query

* Restore getModuleList query

* Change module check inside com_ajax
  • Loading branch information
Septdir authored and Michael Babker committed Mar 17, 2018
1 parent 96bb9ef commit 777a670
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions components/com_ajax/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,11 @@
*/
elseif ($input->get('module'))
{
$module = $input->get('module');
$moduleObject = JModuleHelper::getModule('mod_' . $module, null);

/*
* As JModuleHelper::isEnabled always returns true, we check
* for an id other than 0 to see if it is published.
*/
if ($moduleObject->id != 0)
$module = $input->get('module');
$table = JTable::getInstance('extension');
$moduleId = $table->find(array('type' => 'module', 'element' => 'mod_' . $module));

if ($moduleId && $table->load($moduleId) && $table->enabled)
{
$helperFile = JPATH_BASE . '/modules/mod_' . $module . '/helper.php';

Expand Down

0 comments on commit 777a670

Please sign in to comment.