BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

inbox.class.php 919B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. #declare(strict_types=1);
  3. class Inbox
  4. {
  5. /*
  6. * Get the link to a user's inbox.
  7. * This is what handles the ListUnreadPMsFirst setting
  8. *
  9. * @param string - whether the inbox or sentbox should be loaded
  10. * @return string - the URL to a user's inbox
  11. */
  12. public static function get_inbox_link($WhichBox = 'inbox')
  13. {
  14. $ListFirst = isset(G::$LoggedUser['ListUnreadPMsFirst']) ? G::$LoggedUser['ListUnreadPMsFirst'] : false;
  15. if ($WhichBox === 'inbox') {
  16. if ($ListFirst) {
  17. $InboxURL = 'inbox.php?sort=unread';
  18. } else {
  19. $InboxURL = 'inbox.php';
  20. }
  21. } else {
  22. if ($ListFirst) {
  23. $InboxURL = 'inbox.php?action=sentbox&amp;sort=unread';
  24. } else {
  25. $InboxURL = 'inbox.php?action=sentbox';
  26. }
  27. }
  28. return $InboxURL;
  29. }
  30. }