Browse Source

Add (commented) strict type declaration to all files missing it

biotorrents 4 years ago
parent
commit
8e8bc5ff80
100 changed files with 108 additions and 9 deletions
  1. 1
    0
      classes/vendor/Parsedown.php
  2. 1
    0
      classes/vendor/ParsedownExtra.php
  3. 1
    0
      classes/vendor/TwitterAPIExchange.php
  4. 1
    0
      sections/ajax/artist.php
  5. 2
    1
      sections/ajax/autofill/anime.php
  6. 2
    1
      sections/ajax/autofill/jav.php
  7. 1
    0
      sections/ajax/bookmarks/artists.php
  8. 1
    0
      sections/ajax/bookmarks/index.php
  9. 1
    0
      sections/ajax/bookmarks/torrents.php
  10. 1
    0
      sections/ajax/clear_user_notification.php
  11. 1
    0
      sections/ajax/community_stats.php
  12. 1
    0
      sections/ajax/forum/forum.php
  13. 1
    0
      sections/ajax/forum/index.php
  14. 1
    0
      sections/ajax/forum/main.php
  15. 1
    0
      sections/ajax/forum/thread.php
  16. 1
    0
      sections/ajax/get_friends.php
  17. 1
    0
      sections/ajax/get_user_notifications.php
  18. 1
    0
      sections/ajax/inbox/inbox.php
  19. 2
    1
      sections/ajax/inbox/index.php
  20. 1
    0
      sections/ajax/loadavg.php
  21. 1
    0
      sections/ajax/news_ajax.php
  22. 1
    0
      sections/ajax/notifications.php
  23. 1
    0
      sections/ajax/preview.php
  24. 1
    0
      sections/ajax/raw_bbcode.php
  25. 1
    0
      sections/ajax/send_recommendation.php
  26. 1
    0
      sections/ajax/stats.php
  27. 1
    0
      sections/ajax/tcomments.php
  28. 1
    0
      sections/ajax/top10/index.php
  29. 1
    0
      sections/ajax/top10/tags.php
  30. 1
    0
      sections/ajax/top10/torrents.php
  31. 1
    0
      sections/ajax/top10/users.php
  32. 1
    0
      sections/ajax/user.php
  33. 1
    0
      sections/ajax/user_recents.php
  34. 1
    0
      sections/ajax/userhistory/index.php
  35. 1
    0
      sections/ajax/userhistory/post_history.php
  36. 1
    0
      sections/ajax/wiki.php
  37. 1
    0
      sections/artist/autocomplete.php
  38. 1
    0
      sections/artist/notify.php
  39. 1
    0
      sections/bookmarks/artists.php
  40. 1
    0
      sections/bookmarks/index.php
  41. 1
    0
      sections/bookmarks/mass_edit.php
  42. 1
    0
      sections/bookmarks/remove.php
  43. 2
    1
      sections/collages/add_torrent.php
  44. 1
    0
      sections/collages/artist_collage.php
  45. 1
    0
      sections/collages/browse.php
  46. 1
    0
      sections/collages/collage.php
  47. 2
    1
      sections/collages/delete.php
  48. 1
    0
      sections/collages/manage_artists_handle.php
  49. 1
    0
      sections/collages/manage_handle.php
  50. 1
    0
      sections/collages/new_handle.php
  51. 1
    0
      sections/delete/delete_email.php
  52. 1
    0
      sections/delete/delete_ip.php
  53. 1
    0
      sections/delete/index.php
  54. 1
    0
      sections/delete/take_delete_email.php
  55. 1
    0
      sections/delete/take_delete_ip.php
  56. 1
    0
      sections/enable/index.php
  57. 1
    0
      sections/forums/add_poll_option.php
  58. 1
    0
      sections/forums/change_vote.php
  59. 1
    0
      sections/forums/edit_rules.php
  60. 1
    0
      sections/forums/forum.php
  61. 1
    0
      sections/forums/index.php
  62. 2
    1
      sections/forums/poll_vote.php
  63. 1
    0
      sections/forums/warn.php
  64. 1
    0
      sections/image/index.php
  65. 1
    0
      sections/inbox/get_post.php
  66. 2
    1
      sections/index/feat_merch.php
  67. 1
    0
      sections/locked/index.php
  68. 1
    0
      sections/log/index.php
  69. 1
    0
      sections/log/sphinx.php
  70. 1
    0
      sections/log/sql.php
  71. 1
    0
      sections/login/disabled.php
  72. 1
    0
      sections/pwgen/diceware.php
  73. 1
    0
      sections/pwgen/wordlist.php
  74. 1
    0
      sections/reports/ajax_add_notes.php
  75. 1
    0
      sections/reports/ajax_claim_report.php
  76. 1
    0
      sections/reports/ajax_unclaim_report.php
  77. 2
    1
      sections/reports/stats.php
  78. 1
    0
      sections/reportsv2/ajax_report.php
  79. 2
    1
      sections/reportsv2/index.php
  80. 1
    0
      sections/reportsv2/report.php
  81. 1
    0
      sections/reportsv2/search.php
  82. 1
    0
      sections/requests/index.php
  83. 1
    0
      sections/rules/chat.php
  84. 1
    0
      sections/rules/clients.php
  85. 1
    0
      sections/rules/collages.php
  86. 1
    0
      sections/rules/index.php
  87. 1
    0
      sections/rules/ratio.php
  88. 1
    0
      sections/rules/requests.php
  89. 1
    0
      sections/rules/tag.php
  90. 1
    0
      sections/schedule/biweekly/cycle_auth_keys.php
  91. 1
    0
      sections/schedule/biweekly/grant_invites.php
  92. 1
    0
      sections/schedule/daily/class_demotions.php
  93. 1
    0
      sections/schedule/daily/delete_dead_torrents.php
  94. 1
    0
      sections/schedule/daily/disable_inactive_users.php
  95. 1
    0
      sections/schedule/daily/disable_unconfirmed_users.php
  96. 1
    0
      sections/schedule/daily/ratio_reqs.php
  97. 1
    0
      sections/schedule/daily/ratio_watch.php
  98. 1
    0
      sections/schedule/daily/resolve_staff_pms.php
  99. 1
    0
      sections/schedule/daily/top10_daily.php
  100. 0
    0
      sections/schedule/every/expire_tokens.php

+ 1
- 0
classes/vendor/Parsedown.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 #
4
 #
4
 #
5
 #

+ 1
- 0
classes/vendor/ParsedownExtra.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 #
4
 #
4
 #
5
 #

+ 1
- 0
classes/vendor/TwitterAPIExchange.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 /**
4
 /**
4
  * Twitter-API-PHP : Simple PHP wrapper for the v1.1 API
5
  * Twitter-API-PHP : Simple PHP wrapper for the v1.1 API

+ 1
- 0
sections/ajax/artist.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # todo: Go through line by line
4
 # todo: Go through line by line
4
 
5
 

+ 2
- 1
sections/ajax/autofill/anime.php View File

1
-<?
1
+<?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (empty($_GET['aid'])) {
4
 if (empty($_GET['aid'])) {
4
   json_die();
5
   json_die();

+ 2
- 1
sections/ajax/autofill/jav.php View File

1
-<?
1
+<?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # Headers, cache, etc.
4
 # Headers, cache, etc.
4
 $debug = false;
5
 $debug = false;

+ 1
- 0
sections/ajax/bookmarks/artists.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!empty($_GET['userid'])) {
4
 if (!empty($_GET['userid'])) {
4
     if (!check_perms('users_override_paranoia')) {
5
     if (!check_perms('users_override_paranoia')) {

+ 1
- 0
sections/ajax/bookmarks/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 // Number of users per page
4
 // Number of users per page
4
 define('BOOKMARKS_PER_PAGE', '20');
5
 define('BOOKMARKS_PER_PAGE', '20');

+ 1
- 0
sections/ajax/bookmarks/torrents.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 ini_set('memory_limit', -1);
4
 ini_set('memory_limit', -1);
4
 
5
 

+ 1
- 0
sections/ajax/clear_user_notification.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $Type = $_POST['type'];
4
 $Type = $_POST['type'];
4
 
5
 

+ 1
- 0
sections/ajax/community_stats.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!isset($_GET['userid']) || !is_number($_GET['userid'])) {
4
 if (!isset($_GET['userid']) || !is_number($_GET['userid'])) {
4
     json_die('failure');
5
     json_die('failure');

+ 1
- 0
sections/ajax/forum/forum.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # todo: Go through line by line
4
 # todo: Go through line by line
4
 
5
 

+ 1
- 0
sections/ajax/forum/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 // Already done in /sections/ajax/index.php
4
 // Already done in /sections/ajax/index.php
4
 //enforce_login();
5
 //enforce_login();

+ 1
- 0
sections/ajax/forum/main.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # todo: Go through line by line
4
 # todo: Go through line by line
4
 if (isset($LoggedUser['PostsPerPage'])) {
5
 if (isset($LoggedUser['PostsPerPage'])) {

+ 1
- 0
sections/ajax/forum/thread.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # todo: Go through line by line
4
 # todo: Go through line by line
4
 // todo: Normalize thread_*_info don't need to waste all that ram on things that are already in other caches
5
 // todo: Normalize thread_*_info don't need to waste all that ram on things that are already in other caches

+ 1
- 0
sections/ajax/get_friends.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $DB->query("
4
 $DB->query("
4
 SELECT
5
 SELECT

+ 1
- 0
sections/ajax/get_user_notifications.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $Skip = [];
4
 $Skip = [];
4
 $Skip[] = db_string($_GET['skip']);
5
 $Skip[] = db_string($_GET['skip']);

+ 1
- 0
sections/ajax/inbox/inbox.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $UserID = $LoggedUser['ID'];
4
 $UserID = $LoggedUser['ID'];
4
 
5
 

+ 2
- 1
sections/ajax/inbox/index.php View File

1
-<?
1
+<?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (empty($_GET['type']) || $_GET['type'] == 'inbox' || $_GET['type'] == 'sentbox') {
4
 if (empty($_GET['type']) || $_GET['type'] == 'inbox' || $_GET['type'] == 'sentbox') {
4
   require(SERVER_ROOT.'/sections/ajax/inbox/inbox.php');
5
   require(SERVER_ROOT.'/sections/ajax/inbox/inbox.php');

+ 1
- 0
sections/ajax/loadavg.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 #authorize();
4
 #authorize();
4
 
5
 

+ 1
- 0
sections/ajax/news_ajax.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 // Don't allow bigger queries than specified below regardless of called function
4
 // Don't allow bigger queries than specified below regardless of called function
4
 $SizeLimit = 10;
5
 $SizeLimit = 10;

+ 1
- 0
sections/ajax/notifications.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # todo: Go through line by line
4
 # todo: Go through line by line
4
 if (!check_perms('site_torrents_notify')) {
5
 if (!check_perms('site_torrents_notify')) {

+ 1
- 0
sections/ajax/preview.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 /* AJAX previews, simple stuff */
4
 /* AJAX previews, simple stuff */
4
 Text::$TOC = true;
5
 Text::$TOC = true;

+ 1
- 0
sections/ajax/raw_bbcode.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $PostID = (int) $_GET['postid'];
4
 $PostID = (int) $_GET['postid'];
4
 
5
 

+ 1
- 0
sections/ajax/send_recommendation.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $FriendID = (int)$_POST['friend'];
4
 $FriendID = (int)$_POST['friend'];
4
 $Type = $_POST['type'];
5
 $Type = $_POST['type'];

+ 1
- 0
sections/ajax/stats.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 // Begin user stats
4
 // Begin user stats
4
 if (($UserCount = $Cache->get_value('stats_user_count')) === false) {
5
 if (($UserCount = $Cache->get_value('stats_user_count')) === false) {

+ 1
- 0
sections/ajax/tcomments.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (empty($_GET['id']) || !is_number($_GET['id'])) {
4
 if (empty($_GET['id']) || !is_number($_GET['id'])) {
4
     json_die('failure');
5
     json_die('failure');

+ 1
- 0
sections/ajax/top10/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 // Already done in /sections/ajax/index.php
4
 // Already done in /sections/ajax/index.php
4
 //enforce_login();
5
 //enforce_login();

+ 1
- 0
sections/ajax/top10/tags.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # todo: Go through line by line
4
 # todo: Go through line by line
4
 
5
 

+ 1
- 0
sections/ajax/top10/torrents.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # todo: Go through line by line
4
 # todo: Go through line by line
4
 if (isset($_GET['details'])) {
5
 if (isset($_GET['details'])) {

+ 1
- 0
sections/ajax/top10/users.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # todo: Go through line by line
4
 # todo: Go through line by line
4
 if (isset($_GET['details'])) {
5
 if (isset($_GET['details'])) {

+ 1
- 0
sections/ajax/user.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (empty($_GET['id']) || !is_numeric($_GET['id'])) {
4
 if (empty($_GET['id']) || !is_numeric($_GET['id'])) {
4
     json_die('failure', 'bad id parameter');
5
     json_die('failure', 'bad id parameter');

+ 1
- 0
sections/ajax/user_recents.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # todo: Go through line by line
4
 # todo: Go through line by line
4
 $UserID = (int) $_GET['userid'];
5
 $UserID = (int) $_GET['userid'];

+ 1
- 0
sections/ajax/userhistory/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if ($_GET['type']) {
4
 if ($_GET['type']) {
4
     switch ($_GET['type']) {
5
     switch ($_GET['type']) {

+ 1
- 0
sections/ajax/userhistory/post_history.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # todo: Go through line by line
4
 # todo: Go through line by line
4
 function error_out($reason = '')
5
 function error_out($reason = '')

+ 1
- 0
sections/ajax/wiki.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!empty($_GET['id']) && is_number($_GET['id'])) {
4
 if (!empty($_GET['id']) && is_number($_GET['id'])) {
4
     // Visiting article via ID
5
     // Visiting article via ID

+ 1
- 0
sections/artist/autocomplete.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (empty($_GET['query'])) {
4
 if (empty($_GET['query'])) {
4
     error(400);
5
     error(400);

+ 1
- 0
sections/artist/notify.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 authorize();
4
 authorize();
4
 if (!check_perms('site_torrents_notify')) {
5
 if (!check_perms('site_torrents_notify')) {

+ 1
- 0
sections/bookmarks/artists.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!empty($_GET['userid'])) {
4
 if (!empty($_GET['userid'])) {
4
     if (!check_perms('users_override_paranoia')) {
5
     if (!check_perms('users_override_paranoia')) {

+ 1
- 0
sections/bookmarks/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 enforce_login();
4
 enforce_login();
4
 
5
 

+ 1
- 0
sections/bookmarks/mass_edit.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 authorize();
4
 authorize();
4
 if ($UserID !== $LoggedUser['ID']
5
 if ($UserID !== $LoggedUser['ID']

+ 1
- 0
sections/bookmarks/remove.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 authorize();
4
 authorize();
4
 if (!Bookmarks::can_bookmark($_GET['type'])) {
5
 if (!Bookmarks::can_bookmark($_GET['type'])) {

+ 2
- 1
sections/collages/add_torrent.php View File

1
-<?
1
+<?php
2
+#declare(strict_types=1);
2
 
3
 
3
 authorize();
4
 authorize();
4
 
5
 

+ 1
- 0
sections/collages/artist_collage.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 // todo: Cache this
4
 // todo: Cache this
4
 $DB->query("
5
 $DB->query("

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

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 define('COLLAGES_PER_PAGE', 25);
4
 define('COLLAGES_PER_PAGE', 25);
4
 
5
 

+ 1
- 0
sections/collages/collage.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 ini_set('max_execution_time', 600);
4
 ini_set('max_execution_time', 600);
4
 
5
 

+ 2
- 1
sections/collages/delete.php View File

1
-<?
1
+<?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $CollageID = $_GET['collageid'];
4
 $CollageID = $_GET['collageid'];
4
 if (!is_number($CollageID) || !$CollageID) {
5
 if (!is_number($CollageID) || !$CollageID) {

+ 1
- 0
sections/collages/manage_artists_handle.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 authorize();
4
 authorize();
4
 
5
 

+ 1
- 0
sections/collages/manage_handle.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 authorize();
4
 authorize();
4
 
5
 

+ 1
- 0
sections/collages/new_handle.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 authorize();
4
 authorize();
4
 include(SERVER_ROOT.'/classes/validate.class.php');
5
 include(SERVER_ROOT.'/classes/validate.class.php');

+ 1
- 0
sections/delete/delete_email.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!isset($_POST['emails']) || !is_array($_POST['emails'])) {
4
 if (!isset($_POST['emails']) || !is_array($_POST['emails'])) {
4
     error('No email requested');
5
     error('No email requested');

+ 1
- 0
sections/delete/delete_ip.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!isset($_POST['ips']) || !is_array($_POST['ips'])) {
4
 if (!isset($_POST['ips']) || !is_array($_POST['ips'])) {
4
     error('No IP requested');
5
     error('No IP requested');

+ 1
- 0
sections/delete/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 enforce_login();
4
 enforce_login();
4
 
5
 

+ 1
- 0
sections/delete/take_delete_email.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 enforce_login();
4
 enforce_login();
4
 authorize();
5
 authorize();

+ 1
- 0
sections/delete/take_delete_ip.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 enforce_login();
4
 enforce_login();
4
 authorize();
5
 authorize();

+ 1
- 0
sections/enable/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (isset($LoggedUser['ID']) || !isset($_GET['token']) || !FEATURE_EMAIL_REENABLE) {
4
 if (isset($LoggedUser['ID']) || !isset($_GET['token']) || !FEATURE_EMAIL_REENABLE) {
4
     header('Location: index.php');
5
     header('Location: index.php');

+ 1
- 0
sections/forums/add_poll_option.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 authorize();
4
 authorize();
4
 
5
 

+ 1
- 0
sections/forums/change_vote.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 authorize();
4
 authorize();
4
 
5
 

+ 1
- 0
sections/forums/edit_rules.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 enforce_login();
4
 enforce_login();
4
 if (!check_perms('site_moderate_forums')) {
5
 if (!check_perms('site_moderate_forums')) {

+ 1
- 0
sections/forums/forum.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 /**********|| Page to show individual forums || ********************************\
4
 /**********|| Page to show individual forums || ********************************\
4
 
5
 

+ 1
- 0
sections/forums/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 enforce_login();
4
 enforce_login();
4
 
5
 

+ 2
- 1
sections/forums/poll_vote.php View File

1
-<?
1
+<?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!isset($_POST['topicid']) || !is_number($_POST['topicid'])) {
4
 if (!isset($_POST['topicid']) || !is_number($_POST['topicid'])) {
4
   error(0, true);
5
   error(0, true);

+ 1
- 0
sections/forums/warn.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!check_perms('users_warn')) {
4
 if (!check_perms('users_warn')) {
4
     error(404);
5
     error(404);

+ 1
- 0
sections/image/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!check_perms('site_proxy_images')) {
4
 if (!check_perms('site_proxy_images')) {
4
     img_error('forbidden');
5
     img_error('forbidden');

+ 1
- 0
sections/inbox/get_post.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 // todo: make this use the cache version of the thread, save the db query
4
 // todo: make this use the cache version of the thread, save the db query
4
 
5
 

+ 2
- 1
sections/index/feat_merch.php View File

1
-<?
1
+<?php
2
+#declare(strict_types=1);
2
 
3
 
3
   $FeaturedMerchURL = '';
4
   $FeaturedMerchURL = '';
4
 
5
 

+ 1
- 0
sections/locked/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 enforce_login();
4
 enforce_login();
4
 
5
 

+ 1
- 0
sections/log/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 enforce_login();
4
 enforce_login();
4
 if (!defined('LOG_ENTRIES_PER_PAGE')) {
5
 if (!defined('LOG_ENTRIES_PER_PAGE')) {

+ 1
- 0
sections/log/sphinx.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!empty($_GET['page']) && is_number($_GET['page'])) {
4
 if (!empty($_GET['page']) && is_number($_GET['page'])) {
4
     $Page = min(SPHINX_MAX_MATCHES / LOG_ENTRIES_PER_PAGE, $_GET['page']);
5
     $Page = min(SPHINX_MAX_MATCHES / LOG_ENTRIES_PER_PAGE, $_GET['page']);

+ 1
- 0
sections/log/sql.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 list($Page, $Limit) = Format::page_limit(LOG_ENTRIES_PER_PAGE);
4
 list($Page, $Limit) = Format::page_limit(LOG_ENTRIES_PER_PAGE);
4
 
5
 

+ 1
- 0
sections/login/disabled.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 View::show_header('Disabled');
4
 View::show_header('Disabled');
4
 
5
 

+ 1
- 0
sections/pwgen/diceware.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # Load the dictionary
4
 # Load the dictionary
4
 require_once 'wordlist.php';
5
 require_once 'wordlist.php';

+ 1
- 0
sections/pwgen/wordlist.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt
4
 # https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt
4
 $eff_large_wordlist = [
5
 $eff_large_wordlist = [

+ 1
- 0
sections/reports/ajax_add_notes.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!check_perms('admin_reports') || empty($_POST['id'])) {
4
 if (!check_perms('admin_reports') || empty($_POST['id'])) {
4
   print
5
   print

+ 1
- 0
sections/reports/ajax_claim_report.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!check_perms('site_moderate_forums') || empty($_POST['id'])) {
4
 if (!check_perms('site_moderate_forums') || empty($_POST['id'])) {
4
   print
5
   print

+ 1
- 0
sections/reports/ajax_unclaim_report.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!check_perms('site_moderate_forums') || empty($_POST['id']) || empty($_POST['remove'])) {
4
 if (!check_perms('site_moderate_forums') || empty($_POST['id']) || empty($_POST['remove'])) {
4
   print
5
   print

+ 2
- 1
sections/reports/stats.php View File

1
-<?
1
+<?php
2
+#declare(strict_types=1);
2
 
3
 
3
 if (!check_perms('admin_reports') && !check_perms('site_moderate_forums')) {
4
 if (!check_perms('admin_reports') && !check_perms('site_moderate_forums')) {
4
   error(403);
5
   error(403);

+ 1
- 0
sections/reportsv2/ajax_report.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 /*
4
 /*
4
  * The backend to changing the report type when making a report.
5
  * The backend to changing the report type when making a report.

+ 2
- 1
sections/reportsv2/index.php View File

1
-<?
1
+<?php
2
+#declare(strict_types=1);
2
 
3
 
3
 /*
4
 /*
4
  * This is the index page, it is pretty much reponsible only for the switch statement.
5
  * This is the index page, it is pretty much reponsible only for the switch statement.

+ 1
- 0
sections/reportsv2/report.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 /*
4
 /*
4
  * This is the frontend of reporting a torrent, it's what users see when
5
  * This is the frontend of reporting a torrent, it's what users see when

+ 1
- 0
sections/reportsv2/search.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 /*
4
 /*
4
  * todo: I'm not writing documentation for this page until I write this page >.>
5
  * todo: I'm not writing documentation for this page until I write this page >.>

+ 1
- 0
sections/requests/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 enforce_login();
4
 enforce_login();
4
 $RequestTax = 0.1;
5
 $RequestTax = 0.1;

+ 1
- 0
sections/rules/chat.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # Formerly Rules::display_forum_rules()
4
 # Formerly Rules::display_forum_rules()
4
 # and Rules::display_irc_chat_rules()
5
 # and Rules::display_irc_chat_rules()

+ 1
- 0
sections/rules/clients.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 View::show_header('Client rules');
4
 View::show_header('Client rules');
4
 
5
 

+ 1
- 0
sections/rules/collages.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 View::show_header('Collection rules');
4
 View::show_header('Collection rules');
4
 ?>
5
 ?>

+ 1
- 0
sections/rules/index.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 enforce_login();
4
 enforce_login();
4
 
5
 

+ 1
- 0
sections/rules/ratio.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 View::show_header('Ratio requirements');
4
 View::show_header('Ratio requirements');
4
 ?>
5
 ?>

+ 1
- 0
sections/rules/requests.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 View::show_header('Request rules');
4
 View::show_header('Request rules');
4
 ?>
5
 ?>

+ 1
- 0
sections/rules/tag.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 # Formerly Rules::display_site_tag_rules()
4
 # Formerly Rules::display_site_tag_rules()
4
 View::show_header('Tagging rules');
5
 View::show_header('Tagging rules');

+ 1
- 0
sections/schedule/biweekly/cycle_auth_keys.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $DB->query("
4
 $DB->query("
4
 UPDATE
5
 UPDATE

+ 1
- 0
sections/schedule/biweekly/grant_invites.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 /*
4
 /*
4
 Well Endowed (POWER) have a cap of 2 invites. Bombshells (ELITE) have a cap of 3, Top Heavy (TORRENT_MASTER) have a cap of 4
5
 Well Endowed (POWER) have a cap of 2 invites. Bombshells (ELITE) have a cap of 3, Top Heavy (TORRENT_MASTER) have a cap of 4

+ 1
- 0
sections/schedule/daily/class_demotions.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $ENV = ENV::go();
4
 $ENV = ENV::go();
4
 
5
 

+ 1
- 0
sections/schedule/daily/delete_dead_torrents.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 // The SQL query's line below controls the deletion clock
4
 // The SQL query's line below controls the deletion clock
4
 //   (t.last_action < (NOW() - INTERVAL 28 DAY) AND t.last_action IS NOT NULL)
5
 //   (t.last_action < (NOW() - INTERVAL 28 DAY) AND t.last_action IS NOT NULL)

+ 1
- 0
sections/schedule/daily/disable_inactive_users.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $ENV = ENV::go();
4
 $ENV = ENV::go();
4
 
5
 

+ 1
- 0
sections/schedule/daily/disable_unconfirmed_users.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 // Get a list of user IDs for clearing cache keys
4
 // Get a list of user IDs for clearing cache keys
4
 $DB->query("
5
 $DB->query("

+ 1
- 0
sections/schedule/daily/ratio_reqs.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 // Clear old seed time history
4
 // Clear old seed time history
4
 $DB->query("
5
 $DB->query("

+ 1
- 0
sections/schedule/daily/ratio_watch.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $OffRatioWatch = [];
4
 $OffRatioWatch = [];
4
 $OnRatioWatch = [];
5
 $OnRatioWatch = [];

+ 1
- 0
sections/schedule/daily/resolve_staff_pms.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $DB->query("
4
 $DB->query("
4
   UPDATE staff_pm_conversations
5
   UPDATE staff_pm_conversations

+ 1
- 0
sections/schedule/daily/top10_daily.php View File

1
 <?php
1
 <?php
2
+#declare(strict_types=1);
2
 
3
 
3
 $DB->query("
4
 $DB->query("
4
   INSERT INTO top10_history (Date, Type)
5
   INSERT INTO top10_history (Date, Type)

+ 0
- 0
sections/schedule/every/expire_tokens.php View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save