Browse Source

Fix SQL error on edit handler and minor edits

pjc 5 years ago
parent
commit
e3aeacd727

+ 5
- 5
classes/rules.class.php View File

53
   <li>Tags should be comma-separated, and you should use a period to separate words inside a tag, e.g., <strong
53
   <li>Tags should be comma-separated, and you should use a period to separate words inside a tag, e.g., <strong
54
       class="important_text_alt">gram.negative</strong>.</li>
54
       class="important_text_alt">gram.negative</strong>.</li>
55
 
55
 
56
-  <li>There is a list of official tags <?=($OnUpload ? 'to the left of the text box' : 'on <a href="upload.php">the torrent upload page</a>')?>.
56
+  <li>There is a list of official tags <?=($OnUpload ? 'to the left of the text box' : 'on the <a href="upload.php">upload page</a>')?>.
57
     Please use these tags instead of "unofficial" tags, e.g., use the official <strong
57
     Please use these tags instead of "unofficial" tags, e.g., use the official <strong
58
       class="important_text_alt">fungi</strong> tag instead of an unofficial <strong
58
       class="important_text_alt">fungi</strong> tag instead of an unofficial <strong
59
       class="important_text">mushrooms</strong> tag.</li>
59
       class="important_text">mushrooms</strong> tag.</li>
89
   <li><strong>All uploads require a minimum of 5 tags.</strong> Please don't add unrelated tags just to meet the 5 tag
89
   <li><strong>All uploads require a minimum of 5 tags.</strong> Please don't add unrelated tags just to meet the 5 tag
90
     requirement. If you can't think of 5 tags for your content, study it again until you can.</li>
90
     requirement. If you can't think of 5 tags for your content, study it again until you can.</li>
91
 
91
 
92
-  <li><strong>You should be able to build up a list of tags using only the official tags <?=($OnUpload ? 'to the left of the text box' : 'on <a href="upload.php">the torrent upload page</a>')?>.</strong>
92
+  <li><strong>You should be able to build up a list of tags using only the official tags <?=($OnUpload ? 'to the left of the text box' : 'on the <a href="upload.php">upload page</a>')?>.</strong>
93
     If you doubt whether or not a tag is acceptable, please omit it for now and send a staff PM to request a new
93
     If you doubt whether or not a tag is acceptable, please omit it for now and send a staff PM to request a new
94
     official tag or an approved alias.</li>
94
     official tag or an approved alias.</li>
95
 </ul>
95
 </ul>
112
     Thank you.</li>
112
     Thank you.</li>
113
 
113
 
114
   <li>No advertising, referrals, affiliate links, cryptocurrency pumps, or calls to action that involve using a
114
   <li>No advertising, referrals, affiliate links, cryptocurrency pumps, or calls to action that involve using a
115
-    financial instrument. You'll be banned on the spot. The exceptions: cryptocurrencies that derive their value from
116
-    work performed on distributed science computation networks, i.e., Curecoin, FoldingCoin, and Gridcoin.</li>
115
+    financial instrument. You'll be banned on the spot. The exceptions: discussions about cryptocurrencies that derive their value from
116
+    work performed on distributed science networks, i.e., Curecoin, FoldingCoin, and Gridcoin.</li>
117
 
117
 
118
   <li>Feel free to post announcements for your own projects, even and especially if they're commercial ones, in the
118
   <li>Feel free to post announcements for your own projects, even and especially if they're commercial ones, in the
119
     General board. Limit all discussion of trading biomaterials, including bulk giveaways, to the Marketplace forum
119
     General board. Limit all discussion of trading biomaterials, including bulk giveaways, to the Marketplace forum
133
     quoting more than 3 levels deep.</li>
133
     quoting more than 3 levels deep.</li>
134
 
134
 
135
   <li>Don't post potentially malicious links without sufficient warning, or post pictures > 2 MiB. Please only speak
135
   <li>Don't post potentially malicious links without sufficient warning, or post pictures > 2 MiB. Please only speak
136
-    English as stated in the Upload rules.</li>
136
+    English as stated in the upload rules.</li>
137
 </ul>
137
 </ul>
138
 <?php
138
 <?php
139
     }
139
     }

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

319
       <a href="collages.php?action=search&amp;cats[<?=(int)$CategoryID?>]=1"><?=$CollageCats[(int)$CategoryID]?></a>
319
       <a href="collages.php?action=search&amp;cats[<?=(int)$CategoryID?>]=1"><?=$CollageCats[(int)$CategoryID]?></a>
320
     </td>
320
     </td>
321
     <td>
321
     <td>
322
-      <a href="collages.php?id=<?=$ID?>"><?=$Name?></a>
322
+      <a id="collage_name" href="collages.php?id=<?=$ID?>"><?=$Name?></a>
323
 <?  if ($BookmarkView) { ?>
323
 <?  if ($BookmarkView) { ?>
324
       <span class="float_right">
324
       <span class="float_right">
325
         <a href="#" onclick="Unbookmark('collage', <?=$ID?>, ''); return false;" class="brackets">Remove bookmark</a>
325
         <a href="#" onclick="Unbookmark('collage', <?=$ID?>, ''); return false;" class="brackets">Remove bookmark</a>

+ 2
- 0
sections/requests/requests.php View File

522
         <div title="<?=Format::pretty_category($Request['CategoryID'])?>" class="tooltip <?=Format::css_category($Request['CategoryID'])?>"></div>
522
         <div title="<?=Format::pretty_category($Request['CategoryID'])?>" class="tooltip <?=Format::css_category($Request['CategoryID'])?>"></div>
523
       </td>
523
       </td>
524
       <td>
524
       <td>
525
+          <div id="request_name">
525
         <?=$FullName?>
526
         <?=$FullName?>
527
+        </div>
526
         <div class="tags">
528
         <div class="tags">
527
 <?php
529
 <?php
528
     $TagList = [];
530
     $TagList = [];

+ 13
- 9
sections/torrents/takeedit.php View File

55
 $Properties['Censored'] = (isset($_POST['censored'])) ? '1' : '0';
55
 $Properties['Censored'] = (isset($_POST['censored'])) ? '1' : '0';
56
 $Properties['Anonymous'] = (isset($_POST['anonymous'])) ? '1' : '0';
56
 $Properties['Anonymous'] = (isset($_POST['anonymous'])) ? '1' : '0';
57
 
57
 
58
-$Properties['Container'] = (isset($_POST['container']) && $_POST['container'] !== '---') ? $_POST['container'] : '';
59
-$Properties['Archive'] = (isset($_POST['archive']) && $_POST['archive'] !== '---') ? $_POST['archive'] : '';
58
+$Properties['Container'] = (isset($_POST['container']) && $_POST['container'] !== 'Autofill') ? $_POST['container'] : '';
59
+$Properties['Archive'] = (isset($_POST['archive']) && $_POST['archive'] !== 'Autofill') ? $_POST['archive'] : '';
60
 
60
 
61
 if ($_POST['album_desc']) {
61
 if ($_POST['album_desc']) {
62
     $Properties['GroupDescription'] = $_POST['album_desc'];
62
     $Properties['GroupDescription'] = $_POST['album_desc'];
183
         'Remaster catalogue number must be between 2 and 80 characters',
183
         'Remaster catalogue number must be between 2 and 80 characters',
184
         array('maxlength' => 80, 'minlength' => 2)
184
         array('maxlength' => 80, 'minlength' => 2)
185
     );
185
     );
186
+    */
186
 
187
 
187
     $Validate->SetFields(
188
     $Validate->SetFields(
188
         'format',
189
         'format',
192
         array('inarray' => $Formats)
193
         array('inarray' => $Formats)
193
     );
194
     );
194
 
195
 
196
+    /*
195
     $Validate->SetFields(
197
     $Validate->SetFields(
196
         'bitrate',
198
         'bitrate',
197
         '1',
199
         '1',
227
             array('inarray' => $Bitrates)
229
             array('inarray' => $Bitrates)
228
         );
230
         );
229
     }
231
     }
232
+    */
230
 
233
 
231
     $Validate->SetFields(
234
     $Validate->SetFields(
232
         'media',
235
         'media',
236
         array('inarray' => $Media)
239
         array('inarray' => $Media)
237
     );
240
     );
238
 
241
 
242
+    /*
239
     $Validate->SetFields(
243
     $Validate->SetFields(
240
         'release_desc',
244
         'release_desc',
241
         '0',
245
         '0',
252
 
256
 
253
 $Err = $Validate->ValidateForm($_POST); // Validate the form
257
 $Err = $Validate->ValidateForm($_POST); // Validate the form
254
 
258
 
259
+/*
255
 if ($Properties['Remastered'] && !$Properties['RemasterYear']) {
260
 if ($Properties['Remastered'] && !$Properties['RemasterYear']) {
256
     // Unknown Edit!
261
     // Unknown Edit!
257
     if ($LoggedUser['ID'] === $UserID || check_perms('edit_unknowns')) {
262
     if ($LoggedUser['ID'] === $UserID || check_perms('edit_unknowns')) {
260
         $Err = "You may not edit someone else's upload to unknown release";
265
         $Err = "You may not edit someone else's upload to unknown release";
261
     }
266
     }
262
 }
267
 }
268
+*/
263
 
269
 
264
 // Strip out Amazon's padding
270
 // Strip out Amazon's padding
265
 $AmazonReg = '/(http:\/\/ecx.images-amazon.com\/images\/.+)(\._.*_\.jpg)/i';
271
 $AmazonReg = '/(http:\/\/ecx.images-amazon.com\/images\/.+)(\._.*_\.jpg)/i';
322
 $LogDetails = '';
328
 $LogDetails = '';
323
 foreach ($DBTorVals as $Key => $Value) {
329
 foreach ($DBTorVals as $Key => $Value) {
324
     $Value = "'$Value'";
330
     $Value = "'$Value'";
325
-    if ($Value != $T[$Key]) {
331
+    if ($Value !== $T[$Key]) {
326
         if (!isset($T[$Key])) {
332
         if (!isset($T[$Key])) {
327
             continue;
333
             continue;
328
         }
334
         }
329
-        if ((empty($Value) && empty($T[$Key])) || ($Value == "'0'" && $T[$Key] == "''")) {
335
+        if ((empty($Value) && empty($T[$Key])) || ($Value === "'0'" && $T[$Key] === "''")) {
330
             continue;
336
             continue;
331
         }
337
         }
332
-        if ($LogDetails == '') {
338
+        if ($LogDetails === '') {
333
             $LogDetails = "$Key: $Value -> ".$T[$Key];
339
             $LogDetails = "$Key: $Value -> ".$T[$Key];
334
         } else {
340
         } else {
335
             $LogDetails = "$LogDetails, $Key: $Value -> ".$T[$Key];
341
             $LogDetails = "$LogDetails, $Key: $Value -> ".$T[$Key];
336
         }
342
         }
337
     }
343
     }
338
 }
344
 }
339
-$T['Censored'] = $Properties['Censored'];
340
-$T['Anonymous'] = $Properties['Anonymous'];
341
 
345
 
342
 // Update info for the torrent
346
 // Update info for the torrent
343
 /*
347
 /*
359
   UPDATE torrents
363
   UPDATE torrents
360
   SET
364
   SET
361
     Media = $T[Media],
365
     Media = $T[Media],
362
-    Container = $T[Container],
366
+    Container = '$T[Container]',
363
     Codec = $T[Codec],
367
     Codec = $T[Codec],
364
     Resolution = $T[Resolution],
368
     Resolution = $T[Resolution],
365
     AudioFormat = $T[AudioFormat],
369
     AudioFormat = $T[AudioFormat],
366
     Subbing = $T[Subbing],
370
     Subbing = $T[Subbing],
367
     Language = $T[Language],
371
     Language = $T[Language],
368
     Subber = $T[Subber],
372
     Subber = $T[Subber],
369
-    Archive = $T[Archive],
373
+    Archive = '$T[Archive]',
370
     MediaInfo = $T[MediaInfo],
374
     MediaInfo = $T[MediaInfo],
371
     Censored = $T[Censored],
375
     Censored = $T[Censored],
372
     Anonymous = $T[Anonymous],";
376
     Anonymous = $T[Anonymous],";

+ 6
- 1
static/styles/matcha/style.css View File

758
 
758
 
759
 .torrent_table tr .center, #collage_table td {
759
 .torrent_table tr .center, #collage_table td {
760
   vertical-align: middle;
760
   vertical-align: middle;
761
-  text-align: center;
761
+  /* text-align: center; */
762
+}
763
+
764
+#collage_name,
765
+#request_name {
766
+  font-weight: bold;
762
 }
767
 }
763
 
768
 
764
 .group_torrent span {
769
 .group_torrent span {

Loading…
Cancel
Save