mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 19:06:27 +00:00
30 lines
613 B
PHP
30 lines
613 B
PHP
<?
|
|
class RevisionHistory {
|
|
/**
|
|
* Read the revision history of an artist or torrent page
|
|
* @param string $Page artists or torrents
|
|
* @param in $PageID
|
|
* @return array
|
|
*/
|
|
public static function get_revision_history($Page, $PageID) {
|
|
if ($Page == 'artists') {
|
|
$Table = 'wiki_artists';
|
|
} else {
|
|
$Table = 'wiki_torrents';
|
|
}
|
|
$QueryID = G::$DB->get_query_id();
|
|
G::$DB->query("
|
|
SELECT
|
|
RevisionID,
|
|
Summary,
|
|
Time,
|
|
UserID
|
|
FROM $Table
|
|
WHERE PageID = $PageID
|
|
ORDER BY RevisionID DESC");
|
|
$Ret = G::$DB->to_array();
|
|
G::$DB->set_query_id($QueryID);
|
|
return $Ret;
|
|
}
|
|
}
|