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.

revisionhistory.class.php 725B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. #declare(strict_types=1);
  3. class RevisionHistory
  4. {
  5. /**
  6. * Read the revision history of an artist or torrent page
  7. * @param string $Page artists or torrents
  8. * @param in $PageID
  9. * @return array
  10. */
  11. public static function get_revision_history($Page, $PageID)
  12. {
  13. $Table = ($Page == 'artists') ? 'wiki_artists' : 'wiki_torrents';
  14. $QueryID = G::$DB->get_query_id();
  15. G::$DB->query("
  16. SELECT
  17. RevisionID,
  18. Summary,
  19. Time,
  20. UserID
  21. FROM $Table
  22. WHERE PageID = $PageID
  23. ORDER BY RevisionID DESC");
  24. $Ret = G::$DB->to_array();
  25. G::$DB->set_query_id($QueryID);
  26. return $Ret;
  27. }
  28. }