Browse Source

torrents_doi

biotorrents 4 years ago
parent
commit
06a73b48c5

+ 1
- 1
gazelle.sql View File

@@ -1212,7 +1212,7 @@ CREATE TABLE `torrents_recommended` (
1212 1212
   KEY `Time` (`Time`)
1213 1213
 ) ENGINE=InnoDB CHARSET=utf8mb4;
1214 1214
 
1215
-CREATE TABLE `torrents_screenshots` (
1215
+CREATE TABLE `torrents_doi` (
1216 1216
   `ID` int NOT NULL AUTO_INCREMENT,
1217 1217
   `TorrentID` int NOT NULL,
1218 1218
   `UserID` int NOT NULL,

+ 1
- 1
sections/better/screenshots.php View File

@@ -23,7 +23,7 @@ WHERE
23 23
   SELECT DISTINCT
24 24
     `TorrentID`
25 25
   FROM
26
-    `torrents_screenshots`
26
+    `torrents_doi`
27 27
   )
28 28
 ORDER BY
29 29
   RAND()

+ 2
- 2
sections/torrents/editgroup.php View File

@@ -56,9 +56,9 @@ SELECT
56 56
   `Time`,
57 57
   `URI`
58 58
 FROM
59
-  `torrents_screenshots`
59
+  `torrents_doi`
60 60
 WHERE
61
-  `GroupID` = '$GroupID'
61
+  `TorrentID` = '$GroupID'
62 62
 ");
63 63
 
64 64
 if ($DB->has_results()) {

+ 2
- 2
sections/torrents/functions.php View File

@@ -63,9 +63,9 @@ function get_group_info($GroupID, $Return = true, $RevisionID = 0, $PersonalProp
63 63
           `Time`,
64 64
           `URI`
65 65
         FROM
66
-          `torrents_screenshots`
66
+          `torrents_doi`
67 67
         WHERE
68
-          `GroupID` = '$GroupID'
68
+          `TorrentID` = '$GroupID'
69 69
         ");
70 70
 
71 71
         if ($DB->has_results()) {

+ 5
- 5
sections/torrents/screenshotedit.php View File

@@ -39,9 +39,9 @@ SELECT
39 39
   `UserID`,
40 40
   `URI`
41 41
 FROM
42
-  `torrents_screenshots`
42
+  `torrents_doi`
43 43
 WHERE
44
-  `GroupID` = '$GroupID'
44
+  `TorrentID` = '$GroupID'
45 45
 ");
46 46
 
47 47
 // $Old is an array of the form URL => UserID where UserID is the ID of the User who originally uploaded that image.
@@ -81,7 +81,7 @@ if (!empty($Deleted)) {
81 81
         $DB->prepare_query("
82 82
         DELETE
83 83
         FROM
84
-          `torrents_screenshots`
84
+          `torrents_doi`
85 85
         WHERE
86 86
           `URI` = '$ScreenDel'
87 87
         ");
@@ -100,8 +100,8 @@ if (!empty($New)) {
100 100
     $Screenshot = '';
101 101
     $DB->prepare_query(
102 102
         "
103
-    INSERT INTO `torrents_screenshots`
104
-      (`GroupID`, `UserID`, `Time`, `URI`)
103
+    INSERT INTO `torrents_doi`
104
+      (`TorrentID`, `UserID`, `Time`, `URI`)
105 105
     VALUES
106 106
       (?, ?, NOW(), ?)",
107 107
         $GroupID,

+ 2
- 2
sections/upload/upload_handle.php View File

@@ -602,8 +602,8 @@ if (!isset($GroupID) || !$GroupID) {
602 602
     if (!empty($Screenshots)) {
603 603
         $Screenshot = '';
604 604
         $DB->prepare_query("
605
-          INSERT INTO torrents_screenshots
606
-            (GroupID, UserID, Time, Image)
605
+          INSERT INTO torrents_doi
606
+            (TorrentID, UserID, Time, URI)
607 607
           VALUES (?, ?, NOW(), ?)", $GroupID, $LoggedUser['ID'], $Screenshot);
608 608
 
609 609
         foreach ($Screenshots as $Screenshot) {

+ 1
- 1
sections/user/community_stats.php View File

@@ -128,7 +128,7 @@ list($UniqueGroups) = $DB->next_record();
128 128
   if ($Override = check_paranoia_here('screenshotcount')) {
129 129
   $DB->query("
130 130
     SELECT COUNT(*)
131
-    FROM torrents_screenshots
131
+    FROM torrents_doi
132 132
     WHERE UserID = '$UserID'");
133 133
   list($Screenshots) = $DB->next_record();
134 134
 ?>

Loading…
Cancel
Save