Browse Source

Upload form: fix broken CategoryID after submission reattempt

spaghetti 7 years ago
parent
commit
2a4076d591
2 changed files with 6 additions and 5 deletions
  1. 5
    5
      sections/upload/upload.php
  2. 1
    0
      sections/upload/upload_handle.php

+ 5
- 5
sections/upload/upload.php View File

1
 <?
1
 <?
2
 //**********************************************************************//
2
 //**********************************************************************//
3
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Upload form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
3
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Upload form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
4
-// This page relies on the TORRENT_FORM class. All it does is call    //
5
-// the necessary functions.                        //
4
+// This page relies on the TORRENT_FORM class. All it does is call      //
5
+// the necessary functions.                                             //
6
 //----------------------------------------------------------------------//
6
 //----------------------------------------------------------------------//
7
-// $Properties, $Err and $UploadForm are set in takeupload.php, and    //
8
-// are only used when the form doesn't validate and this page must be  //
9
-// called again.                            //
7
+// $Properties, $Err and $UploadForm are set in takeupload.php, and     //
8
+// are only used when the form doesn't validate and this page must be   //
9
+// called again.                                                        //
10
 //**********************************************************************//
10
 //**********************************************************************//
11
 
11
 
12
 ini_set('max_file_uploads', '100');
12
 ini_set('max_file_uploads', '100');

+ 1
- 0
sections/upload/upload_handle.php View File

36
 $Properties = [];
36
 $Properties = [];
37
 $Type = $Categories[(int)$_POST['type']];
37
 $Type = $Categories[(int)$_POST['type']];
38
 $TypeID = $_POST['type'] + 1;
38
 $TypeID = $_POST['type'] + 1;
39
+$Properties['CategoryID'] = $TypeID;
39
 $Properties['CategoryName'] = $Type;
40
 $Properties['CategoryName'] = $Type;
40
 $Properties['Title'] = $_POST['title'];
41
 $Properties['Title'] = $_POST['title'];
41
 $Properties['TitleRJ'] = $_POST['title_rj'];
42
 $Properties['TitleRJ'] = $_POST['title_rj'];

Loading…
Cancel
Save