Skip to content

Commit

Permalink
Issue techjoomla#48 chore: Log Email details in DB table - Tj Notific…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
punambaravkar committed Jul 1, 2019
1 parent f006121 commit 7fc56ed
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
7 changes: 4 additions & 3 deletions src/com_tjnotifications/admin/models/logs.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

jimport('joomla.application.component.model');

use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\ListModel;

/**
Expand Down Expand Up @@ -63,7 +64,7 @@ public function __construct($config = array())
*/
protected function populateState($ordering = 'tjl.id', $direction = 'desc')
{
$app = JFactory::getApplication();
$app = Factory::getApplication();

// Load the filter search
$search = $app->getUserStateFromRequest($this->context . 'filter.search', 'filter_search');
Expand All @@ -73,7 +74,7 @@ protected function populateState($ordering = 'tjl.id', $direction = 'desc')

// Get pagination request variables
$limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->getCfg('list_limit'), 'int');
$limitstart = JRequest::getVar('limitstart', 0, '', 'int');
$limitstart = Factory::getApplication()->input->post->get('limitstart');

// In case limit has been changed, adjust it
$limitstart = ($limit != 0 ? (floor($limitstart / $limit) * $limit) : 0);
Expand All @@ -92,7 +93,7 @@ protected function populateState($ordering = 'tjl.id', $direction = 'desc')
protected function getListQuery()
{
// Initialize variables.
$db = JFactory::getDbo();
$db = Factory::getDbo();
$query = $db->getQuery(true);

// Create the base select statement.
Expand Down
2 changes: 1 addition & 1 deletion src/com_tjnotifications/admin/views/logs/tmpl/body.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$jinput = Factory::getApplication()->input;
$logId = $jinput->get('id', 0, 'INT');

if($logId)
if ($logId)
{
Table::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tjnotifications/tables');
$logTable = Table::getInstance('Log', 'TjnotificationsTable');
Expand Down
16 changes: 8 additions & 8 deletions src/com_tjnotifications/admin/views/logs/tmpl/param.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
/**
* @package TJNotifications
* @subpackage com_tjnotifications
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
* @package TJNotifications
* @subpackage com_tjnotifications
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
// No direct access
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
Expand All @@ -16,7 +16,7 @@
$jinput = Factory::getApplication()->input;
$logId = $jinput->get('id', 0, 'INT');

if($logId)
if ($logId)
{
Table::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tjnotifications/tables');
$logTable = Table::getInstance('Log', 'TjnotificationsTable');
Expand Down

0 comments on commit 7fc56ed

Please sign in to comment.