Browse Source

Fix torrent edit form error display and function

pjc 5 years ago
parent
commit
874409c1d5
1 changed files with 7 additions and 4 deletions
  1. 7
    4
      sections/torrents/takeedit.php

+ 7
- 4
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'] : 'Other';
59
-$Properties['Archive'] = (isset($_POST['archive']) && $_POST['archive'] !== '---') ? $_POST['archive'] : 'None';
58
+$Properties['Container'] = (isset($_POST['container']) && $_POST['container'] !== '---') ? $_POST['container'] : '';
59
+$Properties['Archive'] = (isset($_POST['archive']) && $_POST['archive'] !== '---') ? $_POST['archive'] : '';
60 60
 
61 61
 if ($_POST['album_desc']) {
62 62
     $Properties['GroupDescription'] = $_POST['album_desc'];
@@ -291,6 +291,9 @@ foreach ($Properties as $Key => $Value) {
291 291
 $T['Censored'] = $Properties['Censored'];
292 292
 $T['Anonymous'] = $Properties['Anonymous'];
293 293
 
294
+$T['Container'] = $Properties['Container'];
295
+$T['Archive'] = $Properties['Archive'];
296
+
294 297
 //******************************************************************************//
295 298
 //--------------- Autofill format and archive ----------------------------------//
296 299
 
@@ -301,8 +304,8 @@ $T['Anonymous'] = $Properties['Anonymous'];
301 304
 # Disable the extension parser for edits
302 305
 # todo: Make this work with $T['FileList']
303 306
 if ($T['Container'] === 'Autofill'
304
-|| $T['Archive'] === 'Autofill') {
305
-    $Err = "Extension parsing is only possible for new uploads";
307
+ || $T['Archive'] === 'Autofill') {
308
+    $Err = 'Extension parsing is only possible for new uploads';
306 309
     error($Err);
307 310
 }
308 311
     

Loading…
Cancel
Save