Browse Source

Fix deprecated constructor format in torrent form

spaghetti 7 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
 // This class is used in upload.php to display the upload form, and the edit
3
 // This class is used in upload.php to display the upload form, and the edit
4
 // section of torrents.php to display a shortened version of the same form
4
 // section of torrents.php to display a shortened version of the same form
5
 
5
 
6
-class TORRENT_FORM {
6
+class TorrentForm {
7
   var $UploadForm = '';
7
   var $UploadForm = '';
8
   var $Categories = [];
8
   var $Categories = [];
9
   var $Formats = [];
9
   var $Formats = [];
25
   var $Disabled = '';
25
   var $Disabled = '';
26
   var $DisabledFlag = false;
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
     $this->NewTorrent = $NewTorrent;
30
     $this->NewTorrent = $NewTorrent;
31
     $this->Torrent = $Torrent;
31
     $this->Torrent = $Torrent;

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

1
 <?
1
 <?
2
 //**********************************************************************//
2
 //**********************************************************************//
3
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Edit form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
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
 // the necessary functions.                                             //
5
 // the necessary functions.                                             //
6
 //----------------------------------------------------------------------//
6
 //----------------------------------------------------------------------//
7
 // At the bottom, there are grouping functions which are off limits to  //
7
 // At the bottom, there are grouping functions which are off limits to  //
67
 
67
 
68
 View::show_header('Edit torrent', 'upload,torrent');
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
 $TorrentForm->upload_form();
72
 $TorrentForm->upload_form();
73
 
73
 

+ 2
- 2
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      //
4
+// This page relies on the TorrentForm class. All it does is call      //
5
 // the necessary functions.                                             //
5
 // the necessary functions.                                             //
6
 //----------------------------------------------------------------------//
6
 //----------------------------------------------------------------------//
7
 // $Properties, $Err and $UploadForm are set in takeupload.php, and     //
7
 // $Properties, $Err and $UploadForm are set in takeupload.php, and     //
77
 }
77
 }
78
 
78
 
79
 require(SERVER_ROOT.'/classes/torrent_form.class.php');
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
 $GenreTags = $Cache->get_value('genre_tags');
82
 $GenreTags = $Cache->get_value('genre_tags');
83
 if (!$GenreTags) {
83
 if (!$GenreTags) {

Loading…
Cancel
Save