Browse Source

Fix deprecated constructor format in torrent form

spaghetti 2 years ago
parent
commit
ce7f6f0c91
3 changed files with 6 additions and 6 deletions
  1. 2
    2
      classes/torrent_form.class.php
  2. 2
    2
      sections/torrents/edit.php
  3. 2
    2
      sections/upload/upload.php

+ 2
- 2
classes/torrent_form.class.php View File

@@ -3,7 +3,7 @@
3 3
 // This class is used in upload.php to display the upload form, and the edit
4 4
 // section of torrents.php to display a shortened version of the same form
5 5
 
6
-class TORRENT_FORM {
6
+class TorrentForm {
7 7
   var $UploadForm = '';
8 8
   var $Categories = [];
9 9
   var $Formats = [];
@@ -25,7 +25,7 @@ class TORRENT_FORM {
25 25
   var $Disabled = '';
26 26
   var $DisabledFlag = false;
27 27
 
28
-  function TORRENT_FORM($Torrent = false, $Error = false, $NewTorrent = true) {
28
+  function __construct($Torrent = false, $Error = false, $NewTorrent = true) {
29 29
 
30 30
     $this->NewTorrent = $NewTorrent;
31 31
     $this->Torrent = $Torrent;

+ 2
- 2
sections/torrents/edit.php View File

@@ -1,7 +1,7 @@
1 1
 <?
2 2
 //**********************************************************************//
3 3
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Edit form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
4
-// This page relies on the TORRENT_FORM class. All it does is call      //
4
+// This page relies on the TorrentForm class. All it does is call      //
5 5
 // the necessary functions.                                             //
6 6
 //----------------------------------------------------------------------//
7 7
 // At the bottom, there are grouping functions which are off limits to  //
@@ -67,7 +67,7 @@ if (($LoggedUser['ID'] != $Properties['UserID'] && !check_perms('torrents_edit')
67 67
 
68 68
 View::show_header('Edit torrent', 'upload,torrent');
69 69
 
70
-$TorrentForm = new TORRENT_FORM($Properties, $Err, false);
70
+$TorrentForm = new TorrentForm($Properties, $Err, false);
71 71
 
72 72
 $TorrentForm->upload_form();
73 73
 

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

@@ -1,7 +1,7 @@
1 1
 <?
2 2
 //**********************************************************************//
3 3
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Upload form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
4
-// This page relies on the TORRENT_FORM class. All it does is call      //
4
+// This page relies on the TorrentForm class. All it does is call      //
5 5
 // the necessary functions.                                             //
6 6
 //----------------------------------------------------------------------//
7 7
 // $Properties, $Err and $UploadForm are set in takeupload.php, and     //
@@ -77,7 +77,7 @@ if (!empty($ArtistForm)) {
77 77
 }
78 78
 
79 79
 require(SERVER_ROOT.'/classes/torrent_form.class.php');
80
-$TorrentForm = new TORRENT_FORM($Properties ?? false, $Err ?? false);
80
+$TorrentForm = new TorrentForm($Properties ?? false, $Err ?? false);
81 81
 
82 82
 $GenreTags = $Cache->get_value('genre_tags');
83 83
 if (!$GenreTags) {

Loading…
Cancel
Save