Advertisement
Guest User

Suggested Changes for Joomla Issue #6265

a guest
Apr 8th, 2015
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.88 KB | None | 0 0
  1. diff --git a/administrator/components/com_users/tables/note.php b/administrator/components/com_users/tables/note.php
  2. index 7093457..33df9f8 100644
  3. --- a/administrator/components/com_users/tables/note.php
  4. +++ b/administrator/components/com_users/tables/note.php
  5. @@ -45,18 +45,19 @@ class UsersTableNote extends JTable
  6.         $userId = JFactory::getUser()->get('id');
  7.  
  8.         $this->modified_time = $date;
  9. -
  10. -       if (empty($this->id))
  11. -       {
  12. -           // New record.
  13. -           $this->created_time = $date;
  14. -           $this->created_user_id = $userId;
  15. -       }
  16. -       else
  17. -       {
  18. -           // Existing record.
  19. -           $this->modified_user_id = $userId;
  20. -       }
  21. +        $this->modified_user_id = $userId;
  22. +
  23. +        if (!((int) $this->review_time))
  24. +        {
  25. +            $this->review_time = $this->_db->getNullDate();
  26. +        }
  27. +
  28. +        if (empty($this->id))
  29. +        {
  30. +            // New record.
  31. +            $this->created_time = $date;
  32. +            $this->created_user_id = $userId;
  33. +        }
  34.  
  35.         // Attempt to store the data.
  36.         return parent::store($updateNulls);
  37. diff --git a/administrator/components/com_users/views/notes/tmpl/default.php b/administrator/components/com_users/views/notes/tmpl/default.php
  38. index 813f469..268d8c6 100644
  39. --- a/administrator/components/com_users/views/notes/tmpl/default.php
  40. +++ b/administrator/components/com_users/views/notes/tmpl/default.php
  41. @@ -148,7 +148,7 @@ JFactory::getDocument()->addScriptDeclaration('
  42.                         <?php echo JHtml::_('jgrid.published', $item->state, $i, 'notes.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
  43.                     </td>
  44.                     <td class="center">
  45. -                       <?php if (intval($item->review_time)) : ?>
  46. +                       <?php if ($item->review_time !== JFactory::getDbo()->getNullDate()) : ?>
  47.                             <?php echo JHtml::_('date', $item->review_time, JText::_('DATE_FORMAT_LC4')); ?>
  48.                         <?php else : ?>
  49.                             <?php echo JText::_('COM_USERS_EMPTY_REVIEW'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement