Browse Source

Collect various template and validation edits

pjc 5 years ago
parent
commit
a4264ea136

+ 151
- 147
classes/artists.class.php View File

@@ -1,5 +1,7 @@
1
-<?
2
-class Artists {
1
+<?php
2
+class Artists
3
+{
4
+
3 5
   /**
4 6
    * Given an array of GroupIDs, return their associated artists.
5 7
    *
@@ -17,27 +19,28 @@ class Artists {
17 19
    * 5 => Conductor
18 20
    * 6 => DJ
19 21
    */
20
-  public static function get_artists($GroupIDs) {
21
-    $Results = [];
22
-    $DBs = [];
23
-    foreach ($GroupIDs as $GroupID) {
24
-      if (!is_number($GroupID)) {
25
-        continue;
26
-      }
27
-      $Artists = G::$Cache->get_value('groups_artists_'.$GroupID);
28
-      if (is_array($Artists)) {
29
-        $Results[$GroupID] = $Artists;
30
-      } else {
31
-        $DBs[] = $GroupID;
32
-      }
33
-    }
34
-    if (count($DBs) > 0) {
35
-      $IDs = implode(',', $DBs);
36
-      if (empty($IDs)) {
37
-        $IDs = "null";
38
-      }
39
-      $QueryID = G::$DB->get_query_id();
40
-      G::$DB->query("
22
+    public static function get_artists($GroupIDs)
23
+    {
24
+        $Results = [];
25
+        $DBs = [];
26
+        foreach ($GroupIDs as $GroupID) {
27
+            if (!is_number($GroupID)) {
28
+                continue;
29
+            }
30
+            $Artists = G::$Cache->get_value('groups_artists_'.$GroupID);
31
+            if (is_array($Artists)) {
32
+                $Results[$GroupID] = $Artists;
33
+            } else {
34
+                $DBs[] = $GroupID;
35
+            }
36
+        }
37
+        if (count($DBs) > 0) {
38
+            $IDs = implode(',', $DBs);
39
+            if (empty($IDs)) {
40
+                $IDs = "null";
41
+            }
42
+            $QueryID = G::$DB->get_query_id();
43
+            G::$DB->query("
41 44
         SELECT ta.GroupID,
42 45
           ta.ArtistID,
43 46
           ag.Name
@@ -46,164 +49,165 @@ class Artists {
46 49
         WHERE ta.GroupID IN ($IDs)
47 50
         ORDER BY ta.GroupID ASC,
48 51
           ag.Name ASC;");
49
-      while (list($GroupID, $ArtistID, $ArtistName) = G::$DB->next_record(MYSQLI_BOTH, false)) {
50
-        $Results[$GroupID][] = array('id' => $ArtistID, 'name' => $ArtistName);
51
-        $New[$GroupID][] = array('id' => $ArtistID, 'name' => $ArtistName);
52
-      }
53
-      G::$DB->set_query_id($QueryID);
54
-      foreach ($DBs as $GroupID) {
55
-        if (isset($New[$GroupID])) {
56
-          G::$Cache->cache_value('groups_artists_'.$GroupID, $New[$GroupID]);
57
-        }
58
-        else {
59
-          G::$Cache->cache_value('groups_artists_'.$GroupID, []);
52
+            while (list($GroupID, $ArtistID, $ArtistName) = G::$DB->next_record(MYSQLI_BOTH, false)) {
53
+                $Results[$GroupID][] = array('id' => $ArtistID, 'name' => $ArtistName);
54
+                $New[$GroupID][] = array('id' => $ArtistID, 'name' => $ArtistName);
55
+            }
56
+            G::$DB->set_query_id($QueryID);
57
+            foreach ($DBs as $GroupID) {
58
+                if (isset($New[$GroupID])) {
59
+                    G::$Cache->cache_value('groups_artists_'.$GroupID, $New[$GroupID]);
60
+                } else {
61
+                    G::$Cache->cache_value('groups_artists_'.$GroupID, []);
62
+                }
63
+            }
64
+            $Missing = array_diff($GroupIDs, array_keys($Results));
65
+            if (!empty($Missing)) {
66
+                $Results += array_fill_keys($Missing, []);
67
+            }
60 68
         }
61
-      }
62
-      $Missing = array_diff($GroupIDs, array_keys($Results));
63
-      if (!empty($Missing)) {
64
-        $Results += array_fill_keys($Missing, []);
65
-      }
69
+        return $Results;
66 70
     }
67
-    return $Results;
68
-  }
69 71
 
72
+    /**
73
+     * Convenience function for get_artists, when you just need one group.
74
+     *
75
+     * @param int $GroupID
76
+     * @return array - see get_artists
77
+     */
78
+    public static function get_artist($GroupID)
79
+    {
80
+        $Results = Artists::get_artists(array($GroupID));
81
+        return $Results[$GroupID];
82
+    }
70 83
 
71
-  /**
72
-   * Convenience function for get_artists, when you just need one group.
73
-   *
74
-   * @param int $GroupID
75
-   * @return array - see get_artists
76
-   */
77
-  public static function get_artist($GroupID) {
78
-    $Results = Artists::get_artists(array($GroupID));
79
-    return $Results[$GroupID];
80
-  }
81
-
82
-
83
-  /**
84
-   * Format an array of artists for display.
85
-   * TODO: Revisit the logic of this, see if we can helper-function the copypasta.
86
-   *
87
-   * @param array Artists an array of the form output by get_artists
88
-   * @param boolean $MakeLink if true, the artists will be links, if false, they will be text.
89
-   * @param boolean $IncludeHyphen if true, appends " - " to the end.
90
-   * @param $Escape if true, output will be escaped. Think carefully before setting it false.
91
-   */
92
-  public static function display_artists($Artists, $MakeLink = true, $IncludeHyphen = true, $Escape = true) {
93
-    if (!empty($Artists)) {
94
-      $ampersand = ($Escape) ? ' &amp; ' : ' & ';
95
-      $link = '';
96
-
97
-      switch(count($Artists)) {
84
+    /**
85
+     * Format an array of artists for display.
86
+     * TODO: Revisit the logic of this, see if we can helper-function the copypasta.
87
+     *
88
+     * @param array Artists an array of the form output by get_artists
89
+     * @param boolean $MakeLink if true, the artists will be links, if false, they will be text.
90
+     * @param boolean $IncludeHyphen if true, appends " - " to the end.
91
+     * @param $Escape if true, output will be escaped. Think carefully before setting it false.
92
+     */
93
+    public static function display_artists($Artists, $MakeLink = true, $IncludeHyphen = true, $Escape = true)
94
+    {
95
+        if (!empty($Artists)) {
96
+            $ampersand = ($Escape) ? ' &amp; ' : ' & ';
97
+            $link = '';
98
+
99
+            switch (count($Artists)) {
98 100
         case 0:
99 101
           break;
100 102
         case 3:
101 103
           $link .= Artists::display_artist($Artists[2], $MakeLink, $Escape). ", ";
104
+        break;
102 105
         case 2:
103 106
           $link .= Artists::display_artist($Artists[1], $MakeLink, $Escape). ", ";
107
+        break;
104 108
         case 1:
105 109
           $link .= Artists::display_artist($Artists[0], $MakeLink, $Escape).($IncludeHyphen?' – ':'');
106 110
           break;
107 111
         default:
108
-          $link = "Various".($IncludeHyphen?' – ':'');
112
+        $link = Artists::display_artist($Artists[0], $MakeLink, $Escape).' et al.'.($IncludeHyphen?' – ':'');
109 113
       }
110 114
 
111
-      return $link;
112
-    } else {
113
-      return '';
115
+            return $link;
116
+        } else {
117
+            return '';
118
+        }
114 119
     }
115
-  }
116
-
117 120
 
118
-  /**
119
-   * Formats a single artist name.
120
-   *
121
-   * @param array $Artist an array of the form ('id'=>ID, 'name'=>Name)
122
-   * @param boolean $MakeLink If true, links to the artist page.
123
-   * @param boolean $Escape If false and $MakeLink is false, returns the unescaped, unadorned artist name.
124
-   * @return string Formatted artist name.
125
-   */
126
-  public static function display_artist($Artist, $MakeLink = true, $Escape = true) {
127
-    if ($MakeLink && !$Escape) {
128
-      error('Invalid parameters to Artists::display_artist()');
129
-    } elseif ($MakeLink) {
130
-      return '<a href="artist.php?id='.$Artist['id'].'" dir="ltr">'.display_str($Artist['name']).'</a>';
131
-    } elseif ($Escape) {
132
-      return display_str($Artist['name']);
133
-    } else {
134
-      return $Artist['name'];
121
+    /**
122
+     * Formats a single artist name.
123
+     *
124
+     * @param array $Artist an array of the form ('id'=>ID, 'name'=>Name)
125
+     * @param boolean $MakeLink If true, links to the artist page.
126
+     * @param boolean $Escape If false and $MakeLink is false, returns the unescaped, unadorned artist name.
127
+     * @return string Formatted artist name.
128
+     */
129
+    public static function display_artist($Artist, $MakeLink = true, $Escape = true)
130
+    {
131
+        if ($MakeLink && !$Escape) {
132
+            error('Invalid parameters to Artists::display_artist()');
133
+        } elseif ($MakeLink) {
134
+            return '<a href="artist.php?id='.$Artist['id'].'" dir="ltr">'.display_str($Artist['name']).'</a>';
135
+        } elseif ($Escape) {
136
+            return display_str($Artist['name']);
137
+        } else {
138
+            return $Artist['name'];
139
+        }
135 140
     }
136
-  }
137 141
 
138
-  /**
139
-   * Deletes an artist and their requests, wiki, and tags.
140
-   * Does NOT delete their torrents.
141
-   *
142
-   * @param int $ArtistID
143
-   */
144
-  public static function delete_artist($ArtistID) {
145
-    $QueryID = G::$DB->get_query_id();
146
-    G::$DB->query("
142
+    /**
143
+     * Deletes an artist and their requests, wiki, and tags.
144
+     * Does NOT delete their torrents.
145
+     *
146
+     * @param int $ArtistID
147
+     */
148
+    public static function delete_artist($ArtistID)
149
+    {
150
+        $QueryID = G::$DB->get_query_id();
151
+        G::$DB->query("
147 152
       SELECT Name
148 153
       FROM artists_group
149 154
       WHERE ArtistID = ".$ArtistID);
150
-    list($Name) = G::$DB->next_record(MYSQLI_NUM, false);
155
+        list($Name) = G::$DB->next_record(MYSQLI_NUM, false);
151 156
 
152
-    // Delete requests
153
-    G::$DB->query("
157
+        // Delete requests
158
+        G::$DB->query("
154 159
       SELECT RequestID
155 160
       FROM requests_artists
156 161
       WHERE ArtistID = $ArtistID
157 162
         AND ArtistID != 0");
158
-    $Requests = G::$DB->to_array();
159
-    foreach ($Requests AS $Request) {
160
-      list($RequestID) = $Request;
161
-      G::$DB->query('DELETE FROM requests WHERE ID='.$RequestID);
162
-      G::$DB->query('DELETE FROM requests_votes WHERE RequestID='.$RequestID);
163
-      G::$DB->query('DELETE FROM requests_tags WHERE RequestID='.$RequestID);
164
-      G::$DB->query('DELETE FROM requests_artists WHERE RequestID='.$RequestID);
165
-    }
163
+        $Requests = G::$DB->to_array();
164
+        foreach ($Requests as $Request) {
165
+            list($RequestID) = $Request;
166
+            G::$DB->query('DELETE FROM requests WHERE ID='.$RequestID);
167
+            G::$DB->query('DELETE FROM requests_votes WHERE RequestID='.$RequestID);
168
+            G::$DB->query('DELETE FROM requests_tags WHERE RequestID='.$RequestID);
169
+            G::$DB->query('DELETE FROM requests_artists WHERE RequestID='.$RequestID);
170
+        }
166 171
 
167
-    // Delete artist
168
-    G::$DB->query('DELETE FROM artists_group WHERE ArtistID='.$ArtistID);
169
-    G::$Cache->decrement('stats_artist_count');
172
+        // Delete artist
173
+        G::$DB->query('DELETE FROM artists_group WHERE ArtistID='.$ArtistID);
174
+        G::$Cache->decrement('stats_artist_count');
170 175
 
171
-    // Delete wiki revisions
172
-    G::$DB->query('DELETE FROM wiki_artists WHERE PageID='.$ArtistID);
176
+        // Delete wiki revisions
177
+        G::$DB->query('DELETE FROM wiki_artists WHERE PageID='.$ArtistID);
173 178
 
174
-    // Delete tags
175
-    G::$DB->query('DELETE FROM artists_tags WHERE ArtistID='.$ArtistID);
179
+        // Delete tags
180
+        G::$DB->query('DELETE FROM artists_tags WHERE ArtistID='.$ArtistID);
176 181
 
177
-    // Delete artist comments, subscriptions and quote notifications
178
-    Comments::delete_page('artist', $ArtistID);
182
+        // Delete artist comments, subscriptions and quote notifications
183
+        Comments::delete_page('artist', $ArtistID);
179 184
 
180
-    G::$Cache->delete_value('artist_'.$ArtistID);
181
-    G::$Cache->delete_value('artist_groups_'.$ArtistID);
182
-    // Record in log
185
+        G::$Cache->delete_value('artist_'.$ArtistID);
186
+        G::$Cache->delete_value('artist_groups_'.$ArtistID);
187
+        // Record in log
183 188
 
184
-    if (!empty(G::$LoggedUser['Username'])) {
185
-      $Username = G::$LoggedUser['Username'];
186
-    } else {
187
-      $Username = 'System';
189
+        if (!empty(G::$LoggedUser['Username'])) {
190
+            $Username = G::$LoggedUser['Username'];
191
+        } else {
192
+            $Username = 'System';
193
+        }
194
+        Misc::write_log("Artist $ArtistID ($Name) was deleted by $Username");
195
+        G::$DB->set_query_id($QueryID);
188 196
     }
189
-    Misc::write_log("Artist $ArtistID ($Name) was deleted by $Username");
190
-    G::$DB->set_query_id($QueryID);
191
-  }
192
-
193 197
 
194
-  /**
195
-   * Remove LRM (left-right-marker) and trims, because people copypaste carelessly.
196
-   * If we don't do this, we get seemingly duplicate artist names.
197
-   * TODO: make stricter, e.g. on all whitespace characters or Unicode normalisation
198
-   *
199
-   * @param string $ArtistName
200
-   */
201
-  public static function normalise_artist_name($ArtistName) {
202
-    // \u200e is &lrm;
203
-    $ArtistName = trim($ArtistName);
204
-    $ArtistName = preg_replace('/^(\xE2\x80\x8E)+/', '', $ArtistName);
205
-    $ArtistName = preg_replace('/(\xE2\x80\x8E)+$/', '', $ArtistName);
206
-    return trim(preg_replace('/ +/', ' ', $ArtistName));
207
-  }
198
+    /**
199
+     * Remove LRM (left-right-marker) and trims, because people copypaste carelessly.
200
+     * If we don't do this, we get seemingly duplicate artist names.
201
+     * TODO: make stricter, e.g. on all whitespace characters or Unicode normalisation
202
+     *
203
+     * @param string $ArtistName
204
+     */
205
+    public static function normalise_artist_name($ArtistName)
206
+    {
207
+        // \u200e is &lrm;
208
+        $ArtistName = trim($ArtistName);
209
+        $ArtistName = preg_replace('/^(\xE2\x80\x8E)+/', '', $ArtistName);
210
+        $ArtistName = preg_replace('/(\xE2\x80\x8E)+$/', '', $ArtistName);
211
+        return trim(preg_replace('/ +/', ' ', $ArtistName));
212
+    }
208 213
 }
209
-?>

+ 531
- 485
classes/format.class.php
File diff suppressed because it is too large
View File


+ 0
- 2
classes/validate.class.php View File

@@ -169,8 +169,6 @@ class Validate
169 169
 
170 170
   public function GenerateJS($FormID)
171 171
   {
172
-      return true;
173
-
174 172
       /*
175 173
       $ReturnJS = "<script type=\"text/javascript\" language=\"javascript\">\r\n";
176 174
       $ReturnJS .= "function formVal() {\r\n";

+ 3
- 3
gazelle.sql View File

@@ -1149,9 +1149,9 @@ CREATE TABLE `torrents_bad_tags` (
1149 1149
 CREATE TABLE `torrents_group` (
1150 1150
   `ID` int(10) NOT NULL AUTO_INCREMENT,
1151 1151
   `CategoryID` int(10) DEFAULT NULL,
1152
-  `Name` varchar(300) DEFAULT NULL,
1153
-  `NameRJ` varchar(300) DEFAULT NULL,
1154
-  `NameJP` varchar(300) DEFAULT NULL,
1152
+  `Name` varchar(255) DEFAULT NULL,
1153
+  `NameRJ` varchar(255) DEFAULT NULL,
1154
+  `NameJP` varchar(255) DEFAULT NULL,
1155 1155
   `Year` int(4) DEFAULT NULL,
1156 1156
   `Studio` varchar(80) NOT NULL DEFAULT '',
1157 1157
   `Series` varchar(80) NOT NULL DEFAULT '',

+ 1
- 1
sections/torrents/browse.php View File

@@ -576,7 +576,7 @@ $ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGr
576 576
         $Data['CategoryID'] = $CategoryID;
577 577
         // All of the individual torrents in the group
578 578
 
579
-        //Get report info for each torrent, use the cache if available, if not, add to it.
579
+        // Get report info for each torrent, use the cache if available, if not, add to it.
580 580
         $Reported = false;
581 581
         $Reports = Torrents::get_reports($TorrentID);
582 582
         if (count($Reports) > 0) {

+ 61
- 62
sections/upload/upload_handle.php View File

@@ -122,92 +122,89 @@ if (!empty($_POST['requestid'])) {
122 122
 //******************************************************************************//
123 123
 //--------------- Validate data in upload form ---------------------------------//
124 124
 
125
-$Validate->SetFields('type', '1', 'inarray', 'Please select a valid type.', array('inarray' => array_keys($Categories)));
126
-switch ($Type) {
127
-  /*
128
-  case 'Movies':
129
-  case 'Anime':
130
-    $Validate->SetFields('codec',
131
-      '1','inarray','Please select a valid codec.', array('inarray'=>$Codecs));
132
-
133
-    $Validate->SetFields('resolution',
134
-      '1','regex','Please set a valid resolution.', array('regex'=>'/^(SD)|([0-9]+(p|i))|([0-9]K)|([0-9]+x[0-9]+)$/'));
135
-
136
-    $Validate->SetFields('audioformat',
137
-      '1','inarray','Please select a valid audio format.', array('inarray'=>$AudioFormats));
138
-
139
-    $Validate->SetFields('sub',
140
-      '1','inarray','Please select a valid sub format.', array('inarray'=>$Subbing));
141
-
142
-    $Validate->SetFields('censored', '1', 'inarray', 'Set valid censoring', array('inarray'=>array(0, 1)));
143
-
144
-  case 'Games':
145
-    $Validate->SetFields('container',
146
-      '1','inarray','Please select a valid container.', array('inarray'=>array_merge($Containers, $ContainersGames)));
125
+$Validate->SetFields(
126
+    'type',
127
+    '1',
128
+    'inarray',
129
+    'Please select a valid type.',
130
+    array('inarray' => array_keys($Categories))
131
+);
147 132
 
148
-  case 'Manga':
133
+switch ($Type) {
134
+    /*
135
+  case 'Imaging':
149 136
     if (!isset($_POST['groupid']) || !$_POST['groupid']) {
150
-      $Validate->SetFields('year',
151
-        '1','number','The year of the original release must be entered.', array('maxlength'=>3000, 'minlength'=>1800));
152
-      if ($Type === 'Manga') {
153
-        $Validate->SetFields('pages',
154
-          '1', 'number', 'That is not a valid page count', array('minlength'=>1));
155
-      }
156
-    }
157
-
158
-    $Validate->SetFields('media',
159
-      '1','inarray','Please select a valid media/platform.', array('inarray'=>array_merge($Media, $MediaManga, $Platform)));
160
-
161
-    $Validate->SetFields('lang',
162
-      '1','inarray','Please select a valid language.', array('inarray'=>$Languages));
137
+        $Validate->SetFields( # torrents.Media
138
+            'media',
139
+            '1',
140
+            'inarray',
141
+            'Please select a valid platform.',
142
+            array('inarray'=>array_merge($Media, $MediaManga, $Platform))
143
+        );
163 144
 
164
-    $Validate->SetFields('release_desc',
165
-      '0','string','The release description has a minimum length of 10 characters.', array('maxlength'=>1000000, 'minlength'=>10));
166
-  */
145
+        $Validate->SetFields( # torrents.Container
146
+            'container',
147
+            '1',
148
+            'inarray',
149
+            'Please select a valid format.',
150
+            array('inarray'=>array_merge($Containers, $ContainersGames))
151
+        );
152
+    }
153
+break;
154
+*/
167 155
 
168
-  default:
156
+default:
169 157
     if (!isset($_POST['groupid']) || !$_POST['groupid']) {
170
-        $Validate->SetFields(
158
+        $Validate->SetFields( # torrents_group.Name
171 159
             'title',
172
-            '0',
160
+            '1',
173 161
             'string',
174
-            'Torrent Title must be between 1 and 300 characters.', # `torrents_group` limits
175
-            array('maxlength'=>300, 'minlength'=>1)
162
+            'Torrent Title must be between 1 and 255 characters.',
163
+            array('maxlength'=>255, 'minlength'=>1)
176 164
         );
177
-        $Validate->SetFields(
165
+
166
+        $Validate->SetFields( # torrents_group.NameRJ
178 167
             'title_rj',
179 168
             '0',
180 169
             'string',
181
-            'Organism must be between 1 and 300 characters.',
182
-            array('maxlength'=>300, 'minlength'=>1)
170
+            'Organism must be between 0 and 255 characters.',
171
+            array('maxlength'=>255, 'minlength'=>0)
183 172
         );
184 173
 
185
-        $Validate->SetFields(
174
+        $Validate->SetFields( # torrents_group.NameJP
186 175
             'title_jp',
187 176
             '0',
188 177
             'string',
189
-            'Strain/Variety must be between 1 and 300 characters.',
190
-            array('maxlength'=>300, 'minlength'=>1)
178
+            'Strain/Variety must be between 0 and 255 characters.',
179
+            array('maxlength'=>255, 'minlength'=>0)
180
+        );
181
+
182
+        $Validate->SetFields( # torrents_group.Year
183
+            'year',
184
+            '1',
185
+            'number',
186
+            'The year of the original release must be entered.',
187
+            array('maxlength'=>4, 'minlength'=>4)
191 188
         );
192 189
 
193
-        $Validate->SetFields(
190
+        $Validate->SetFields( # torrents_group.TagList
194 191
             'tags',
195 192
             '1',
196 193
             'string',
197
-            'You must enter at least five tags. Maximum length is 1500 characters.',
198
-            array('maxlength'=>1500, 'minlength'=>2)
194
+            'You must enter at least five tags. Maximum length is 500 characters.',
195
+            array('maxlength'=>500, 'minlength'=>5)
199 196
         );
200 197
 
201
-        $Validate->SetFields(
198
+        $Validate->SetFields( # torrents_group.WikiImage
202 199
             'image',
203 200
             '0',
204 201
             'link',
205 202
             'The image URL you entered was invalid.',
206
-            array('maxlength'=>255, 'minlength'=>12)
203
+            array('maxlength'=>255, 'minlength'=>10)
207 204
         );
208 205
     }
209 206
 
210
-    $Validate->SetFields(
207
+    $Validate->SetFields( # torrents_group.WikiBody
211 208
         'album_desc',
212 209
         '1',
213 210
         'string',
@@ -690,9 +687,10 @@ if ($PublicTorrent) {
690 687
     View::show_header('Warning'); ?>
691 688
 <h1>Warning</h1>
692 689
 <p>
693
-  <strong>Your torrent has been uploaded but you must re-download your torrent file from
694
-  <a href="torrents.php?id=<?=$GroupID?>&torrentid=<?=$TorrentID?>">here</a>
695
-  because the site modified it to make it private.</strong>
690
+    <strong>Your torrent has been uploaded but you must re-download your torrent file from
691
+        <a
692
+            href="torrents.php?id=<?=$GroupID?>&torrentid=<?=$TorrentID?>">here</a>
693
+        because the site modified it to make it private.</strong>
696 694
 </p>
697 695
 <?php
698 696
   View::show_footer();
@@ -700,9 +698,10 @@ if ($PublicTorrent) {
700 698
     View::show_header('Warning'); ?>
701 699
 <h1>Warning</h1>
702 700
 <p>
703
-  <strong>Your torrent has been uploaded but you must re-download your torrent file from
704
-  <a href="torrents.php?id=<?=$GroupID?>&torrentid=<?=$TorrentID?>">here</a>
705
-  because the site modified it to add a source flag.</strong>
701
+    <strong>Your torrent has been uploaded but you must re-download your torrent file from
702
+        <a
703
+            href="torrents.php?id=<?=$GroupID?>&torrentid=<?=$TorrentID?>">here</a>
704
+        because the site modified it to add a source flag.</strong>
706 705
 </p>
707 706
 <?php
708 707
   View::show_footer();

+ 0
- 7
templates/bibtex.tpl View File

@@ -1,7 +0,0 @@
1
-@misc{ BioTorrents.de-$TorrentID,
2
-  author = "$Artist1 and $Artist2 and $ArtistN and $UserID",
3
-  title  = "$Title",
4
-  year   = "2019",
5
-  url    = "https://biotorrents.de/torrents.php?torrentid=$TorrentID",
6
-  note   = "Online; accessed $Y-m-d"
7
-}

+ 4
- 3
templates/enable_request_accepted.tpl View File

@@ -1,6 +1,7 @@
1
-Your request to re-enable your account has been accepted. Please use the following link to activate your account. This link is valid for 48 hours, and can be clicked only once.
1
+Your request to re-enable your account was accepted.
2
+
3
+Please click the link below to activate your account (you have 48 hours).
2 4
 
3 5
 https://{{SITE_DOMAIN}}/enable.php?token={{TOKEN}}
4 6
 
5
-Thank you,
6
-{{SITE_NAME}} Staff
7
+-- {{SITE_NAME}}

+ 5
- 6
templates/enable_request_denied.tpl View File

@@ -1,8 +1,7 @@
1
-Your request to re-enable your account was not accepted, for one or more of the following reasons:
1
+Your request to re-enable your account was denied for one or more of the reasons below.
2 2
 
3
-* We may require more information to verify your account ownership.
4
-* The e-mail address you provided does not match our records.
5
-* Your account may not qualify for automatic re-enabling due to rule violations.
3
+* We require more information to verify your account ownership
4
+* The email address you provided doesn't match our records
5
+* Your account doesn't qualify for automatic re-enabling due to rule violations
6 6
 
7
-Thank you,
8
-{{SITE_NAME}} Staff
7
+-- {{SITE_NAME}}

+ 7
- 8
templates/invite.tpl View File

@@ -1,14 +1,13 @@
1
-The user {{InviterName}} has invited you to join {{SITE_NAME}}, and has specified this address ({{Email}}) as your email address. If you do not know this person, please ignore this email, and do not reply.
1
+{{InviterName}} invited you at {{Email}} to join {{SITE_NAME}}.
2 2
 
3
-Please note that selling invites, trading invites, and giving invites away publicly (e.g. on a forum) is strictly forbidden. If you have received your invite as a result of any of these things, do not bother signing up - you will be banned and lose your chances of ever signing up legitimately.
3
+If you don't know them, please ignore this email and don't reply.
4 4
 
5
-If you had previously had an account at {{SITE_NAME}}, do not use this invite. Instead, please join {{DISABLED_CHAN}} on {{IRC_SERVER}} and ask for your account to be reactivated.
5
+If you have another account at {{SITE_NAME}}, don't use this invite.
6 6
 
7
-To confirm your invite, click on the following link:
7
+Instead, join {{DISABLED_CHAN}} on {{IRC_SERVER}} and ask us to reactivate your account.
8 8
 
9
-https://{{SITE_DOMAIN}}/register.php?invite={{InviteKey}}
9
+Please click the link below to confirm your invite (you have 3 days).
10 10
 
11
-After you register, you will be able to use your account. Please take note that if you do not use this invite in the next 3 days, it will expire. We urge you to read the RULES and the wiki immediately after you join.
11
+https://{{SITE_DOMAIN}}/register.php?invite={{InviteKey}}
12 12
 
13
-Thank you,
14
-{{SITE_NAME}} Staff
13
+-- {{SITE_NAME}}

+ 5
- 6
templates/new_location.tpl View File

@@ -1,10 +1,9 @@
1
-A login from a new location was detected for the user {{Username}} from the IP address {{IP}}.
1
+We detected a new login attempt for {{Username}} from {{IP}}.
2 2
 
3
-To allow logins from this location, click the link below (you have 2 hours)
3
+If this wasn't you, change your password and contact staff immediately.
4 4
 
5
-https://{{SITE_DOMAIN}}/login.php?act=newlocation&key={{AuthKey}}
5
+Please click the link below to allow logins from this location (you have 2 hours).
6 6
 
7
-If this login attempt was not you, change your password and contact staff immediately.
7
+https://{{SITE_DOMAIN}}/login.php?act=newlocation&key={{AuthKey}}
8 8
 
9
-Thank you,
10
-{{SITE_NAME}} Staff
9
+-- {{SITE_NAME}}

+ 3
- 4
templates/new_registration.tpl View File

@@ -1,8 +1,7 @@
1
-This email is to confirm the account you just created at {{SITE_NAME}}
1
+Thank you for joining {{SITE_NAME}}.
2 2
 
3
-You have 24 hours to click the link below and finish the registration process for the account created with the username: {{Username}}
3
+Please click the link below to confirm your account {{Username}} (you have 24 hours).
4 4
 
5 5
 https://{{SITE_DOMAIN}}/register.php?confirm={{TorrentKey}}
6 6
 
7
-Thank you,
8
-{{SITE_NAME}} Staff
7
+-- {{SITE_NAME}}

+ 5
- 6
templates/password_reset.tpl View File

@@ -1,11 +1,10 @@
1
-A password reset process has been started for the username: {{Username}}
1
+Someone from {{IP}} requested a passphrase reset for {{Username}}.
2 2
 
3
-To finish this process please click the link below (you have 1 hour)
3
+If you didn't request this, please ignore this email and don't reply.
4
+
5
+Please click the link below to reset your passphrase (you have 1 hour).
4 6
 
5 7
 https://{{SITE_DOMAIN}}/login.php?act=recover&key={{ResetKey}}
6 8
 
7
-If you did not initiate this password reset then please disregard this email.
8
-The user who requested the password reset had the IP address {{IP}}.
9 9
 
10
-Thank you,
11
-{{SITE_NAME}} Staff
10
+-- {{SITE_NAME}}

Loading…
Cancel
Save