diff --git a/src/com_tjnotifications/admin/views/logs/view.html.php b/src/com_tjnotifications/admin/views/logs/view.html.php
index 6b127247..292ea27e 100644
--- a/src/com_tjnotifications/admin/views/logs/view.html.php
+++ b/src/com_tjnotifications/admin/views/logs/view.html.php
@@ -50,7 +50,8 @@ public function display($tpl = null)
// Check for errors.
if (count($errors = $this->get('Errors')))
{
- JError::raiseError(500, implode('
', $errors));
+ $app = Factory::getApplication();
+ $app->enqueueMessage(implode('
', $errors), 'error');
return false;
}
diff --git a/src/com_tjnotifications/admin/views/notification/view.html.php b/src/com_tjnotifications/admin/views/notification/view.html.php
index 301c0fcf..c964a2fe 100644
--- a/src/com_tjnotifications/admin/views/notification/view.html.php
+++ b/src/com_tjnotifications/admin/views/notification/view.html.php
@@ -56,7 +56,7 @@ public function display($tpl = null)
if (empty($this->user->authorise('core.create', 'com_tjnotifications')) || empty($this->user->authorise('core.edit', 'com_tjnotifications')))
{
$msg = Text::_('JERROR_ALERTNOAUTHOR');
- JError::raiseError(403, $msg);
+ $this->app->enqueueMessage($msg, 'error');
$this->app->redirect(Route::_('index.php?Itemid=0', false));
}
@@ -74,7 +74,7 @@ public function display($tpl = null)
// Check for errors.
if (count($errors = $this->get('Errors')))
{
- JError::raiseError(500, implode('
', $errors));
+ $this->app->enqueueMessage(implode('
', $errors), 'error');
return false;
}
diff --git a/src/com_tjnotifications/admin/views/notifications/view.html.php b/src/com_tjnotifications/admin/views/notifications/view.html.php
index e668c2df..cf218afc 100644
--- a/src/com_tjnotifications/admin/views/notifications/view.html.php
+++ b/src/com_tjnotifications/admin/views/notifications/view.html.php
@@ -62,7 +62,7 @@ public function display($tpl = null)
if (empty($this->user->authorise('core.viewlist', 'com_tjnotifications')))
{
$msg = Text::_('JERROR_ALERTNOAUTHOR');
- JError::raiseError(403, $msg);
+ $this->app->enqueueMessage($msg, 'error');
$this->app->redirect(Route::_('index.php?Itemid=0', false));
}
@@ -78,7 +78,7 @@ public function display($tpl = null)
// Check for errors.
if (count($errors = $this->get('Errors')))
{
- JError::raiseError(500, implode('
', $errors));
+ $this->app->enqueueMessage(implode('
', $errors), 'error');
return false;
}
diff --git a/src/com_tjnotifications/install.tjnotifications.php b/src/com_tjnotifications/install.tjnotifications.php
index 15eef954..b544125e 100644
--- a/src/com_tjnotifications/install.tjnotifications.php
+++ b/src/com_tjnotifications/install.tjnotifications.php
@@ -265,7 +265,8 @@ public function installSqlFiles($parent)
if (!$db->execute())
{
- JError::raiseWarning(1, Text::sprintf('JLIB_INSTALLER_ERROR_SQL_ERROR', $db->stderr(true)));
+ $app = Factory::getApplication();
+ $app->enqueueMessage(Text::sprintf('JLIB_INSTALLER_ERROR_SQL_ERROR', $db->stderr(true)), 'error');
return false;
}
@@ -294,6 +295,7 @@ public function installSqlFiles($parent)
*/
public function fixTemplateTable($db, $dbprefix, $config)
{
+ $app = Factory::getApplication();
$query = "SHOW COLUMNS FROM #__tj_notification_templates WHERE `Field` = 'title'";
$db->setQuery($query);
$check = $db->loadResult();
@@ -305,7 +307,7 @@ public function fixTemplateTable($db, $dbprefix, $config)
if (!$db->execute())
{
- JError::raiseError(500, $db->stderr());
+ $app->enqueueMessage($db->stderr(), 'error');
}
}
@@ -320,7 +322,7 @@ public function fixTemplateTable($db, $dbprefix, $config)
if (!$db->execute())
{
- JError::raiseError(500, $db->stderr());
+ $app->enqueueMessage($db->stderr(), 'error');
}
}
@@ -335,7 +337,7 @@ public function fixTemplateTable($db, $dbprefix, $config)
if (!$db->execute())
{
- JError::raiseError(500, $db->stderr());
+ $app->enqueueMessage($db->stderr(), 'error');
}
}
@@ -350,7 +352,7 @@ public function fixTemplateTable($db, $dbprefix, $config)
if (!$db->execute())
{
- JError::raiseError(500, $db->stderr());
+ $app->enqueueMessage($db->stderr(), 'error');
}
}
}