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 4f15523 commit ed9135b
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/com_tjnotifications/admin/models/logs.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
*/
class TjnotificationsModelLogs extends ListModel
{
/**
* Constructor.
*
* @param array $config An optional associative array of configuration settings.
*
* @see JController
* @since 1.1.0
*/
/**
* Constructor.
*
* @param array $config An optional associative array of configuration settings.
*
* @see JController
* @since 1.1.0
*/
public function __construct($config = array())
{
if (empty($config['filter_fields']))
Expand Down Expand Up @@ -72,8 +72,8 @@ protected function populateState($ordering = 'tjl.id', $direction = 'desc')
parent::populateState($ordering, $direction);

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

// In case limit has been changed, adjust it
$limitstart = ($limit != 0 ? (floor($limitstart / $limit) * $limit) : 0);
Expand Down Expand Up @@ -136,8 +136,7 @@ protected function getListQuery()
if (!empty($search))
{
$like = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%'));
$query->where($db->quoteName('tjl.subject') . ' LIKE ' . $like . ' OR ' . $db->quoteName('tjl.to') . ' LIKE ' . $like);
$query->where($db->quoteName('tjl.from') . ' LIKE ' . $like);
$query->where($db->quoteName('tjl.subject') . ' LIKE ' . $like . ' OR ' . $db->quoteName('tjl.from') . ' LIKE ' . $like . ' OR ' . $db->quoteName('tjl.to') . ' LIKE ' . $like);
}

$orderCol = $this->getState('list.ordering');
Expand Down

0 comments on commit ed9135b

Please sign in to comment.