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,7 +53,7 @@ class Rules
53 53
   <li>Tags should be comma-separated, and you should use a period to separate words inside a tag, e.g., <strong
54 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 57
     Please use these tags instead of "unofficial" tags, e.g., use the official <strong
58 58
       class="important_text_alt">fungi</strong> tag instead of an unofficial <strong
59 59
       class="important_text">mushrooms</strong> tag.</li>
@@ -89,7 +89,7 @@ class Rules
89 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 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 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 94
     official tag or an approved alias.</li>
95 95
 </ul>
@@ -112,8 +112,8 @@ class Rules
112 112
     Thank you.</li>
113 113
 
114 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 118
   <li>Feel free to post announcements for your own projects, even and especially if they're commercial ones, in the
119 119
     General board. Limit all discussion of trading biomaterials, including bulk giveaways, to the Marketplace forum
@@ -133,7 +133,7 @@ class Rules
133 133
     quoting more than 3 levels deep.</li>
134 134
 
135 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 137
 </ul>
138 138
 <?php
139 139
     }

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

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

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

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

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

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

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

@@ -758,7 +758,12 @@ ul.poll li.graph {
758 758
 
759 759
 .torrent_table tr .center, #collage_table td {
760 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 769
 .group_torrent span {

Loading…
Cancel
Save