Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/administrator/components/com_users/tables/note.php b/administrator/components/com_users/tables/note.php
- index 7093457..33df9f8 100644
- --- a/administrator/components/com_users/tables/note.php
- +++ b/administrator/components/com_users/tables/note.php
- @@ -45,18 +45,19 @@ class UsersTableNote extends JTable
- $userId = JFactory::getUser()->get('id');
- $this->modified_time = $date;
- -
- - if (empty($this->id))
- - {
- - // New record.
- - $this->created_time = $date;
- - $this->created_user_id = $userId;
- - }
- - else
- - {
- - // Existing record.
- - $this->modified_user_id = $userId;
- - }
- + $this->modified_user_id = $userId;
- +
- + if (!((int) $this->review_time))
- + {
- + $this->review_time = $this->_db->getNullDate();
- + }
- +
- + if (empty($this->id))
- + {
- + // New record.
- + $this->created_time = $date;
- + $this->created_user_id = $userId;
- + }
- // Attempt to store the data.
- return parent::store($updateNulls);
- diff --git a/administrator/components/com_users/views/notes/tmpl/default.php b/administrator/components/com_users/views/notes/tmpl/default.php
- index 813f469..268d8c6 100644
- --- a/administrator/components/com_users/views/notes/tmpl/default.php
- +++ b/administrator/components/com_users/views/notes/tmpl/default.php
- @@ -148,7 +148,7 @@ JFactory::getDocument()->addScriptDeclaration('
- <?php echo JHtml::_('jgrid.published', $item->state, $i, 'notes.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
- </td>
- <td class="center">
- - <?php if (intval($item->review_time)) : ?>
- + <?php if ($item->review_time !== JFactory::getDbo()->getNullDate()) : ?>
- <?php echo JHtml::_('date', $item->review_time, JText::_('DATE_FORMAT_LC4')); ?>
- <?php else : ?>
- <?php echo JText::_('COM_USERS_EMPTY_REVIEW'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement