Skip to content

Commit

Permalink
#707 Use different notifiacation messages for admin and site apps
Browse files Browse the repository at this point in the history
  • Loading branch information
amazeika committed Jun 28, 2024
1 parent 82c19d7 commit 98004c2
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ protected function _beforeRender(KControllerContextInterface $context)

if ($license->hasError())
{
$context->_message = $translator->translate('license error', ['component' => $this->_getComponent(), 'error' => $translator->translate($license->getError()), 'url' => 'https://dashboard.joomlatools.com']);

if ($this->_isAdmin()) {
$context->_message = $translator->translate('license error', ['component' => $this->_getComponent(), 'error' => $translator->translate($license->getError()), 'url' => 'https://dashboard.joomlatools.com']);
} else {
$context->_message = $translator->translate('license expiry site');
}

$result = $this->_notify($context);
}
elseif ($this->isRestricted(true))
Expand All @@ -106,7 +110,11 @@ protected function _beforeRender(KControllerContextInterface $context)
}
else
{
$context->_message = $translator->translate('license expiry', ['component' => $this->_getComponent()]);
if ($this->_isAdmin()) {
$context->_message = $translator->translate('license expiry', ['component' => $this->_getComponent()]);
} else {
$context->_message = $translator->translate('license expiry site');
}

$result = $this->_notify($context);
}
Expand Down Expand Up @@ -256,7 +264,7 @@ public function isRestricted($strict = false)
}

protected function _isLocal()
{
{return false;
static $local_hosts = array('localhost', '127.0.0.1', '::1');

$url = $this->getObject('request')->getUrl();
Expand Down

0 comments on commit 98004c2

Please sign in to comment.