Skip to content

Commit

Permalink
Fix JText -> Text
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Babker committed Apr 14, 2019
1 parent 6d6ec01 commit 4149054
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Expand Up @@ -77,8 +77,8 @@ public function getCapabilities()

// We are going to "cheat" here and include this component's capabilities without using a plugin
$extensionCapabilities = [
JText::_('COM_PRIVACY') => [
JText::_('COM_PRIVACY_EXTENSION_CAPABILITY_PERSONAL_INFO'),
Text::_('COM_PRIVACY') => [
Text::_('COM_PRIVACY_EXTENSION_CAPABILITY_PERSONAL_INFO'),
],
];

Expand Down
14 changes: 7 additions & 7 deletions administrator/modules/mod_privacy_dashboard/helper.php
Expand Up @@ -9,7 +9,9 @@

defined('_JEXEC') or die;

use Joomla\CMS\MVC\Model\BaseModel;
use Joomla\CMS\Factory;
use Joomla\Component\Privacy\Administrator\Model\DashboardModel;
use Joomla\Database\Exception\ExecutionFailureException;

/**
* Helper class for admin privacy dashboard module
Expand All @@ -27,18 +29,16 @@ class ModPrivacyDashboardHelper
*/
public static function getData()
{
BaseModel::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_privacy/models', 'PrivacyModel');

/** @var PrivacyModelDashboard $model */
$model = BaseModel::getInstance('Dashboard', 'PrivacyModel');
/** @var DashboardModel $model */
$model = Factory::getApplication()->bootComponent('com_privacy')->getMVCFactory()->createModel('Dashboard', 'Administrator', ['ignore_request' => true]);

try
{
return $model->getRequestCounts();
}
catch (JDatabaseException $e)
catch (ExecutionFailureException $e)
{
return array();
return [];
}
}
}

0 comments on commit 4149054

Please sign in to comment.