Browse Source

Move packages to another folder

pjc 5 years ago
parent
commit
2e5a4264a2

+ 0
- 8
_packages/formatting-bugs/readme.md View File

@@ -1,8 +0,0 @@
1
-A function should run the same no matter how it's (legally) formatted.
2
-Having arbitrary whitespace break things, and using lax equality checks, are bugs.
3
-PHP is notorious for code that relies on edge cases in its abysmal concepts of things being "equal."
4
-
5
-This repo contains file paths and snippets that indicate broken code when run through PHP CS Fixer or converted to strict equality.
6
-According to Visual Studio Code with
7
-(only this PHP CS Fixer extension installed)[https://marketplace.visualstudio.com/items?itemName=junstyle.php-cs-fixer]
8
-and set to run without arguments.

+ 0
- 11
_packages/formatting-bugs/sections/torrents/details.php View File

@@ -1,11 +0,0 @@
1
-<div class="spoilerContainer hideContainer">
2
-    <!--
3
-    This must be one line or the "Show/Hide MediaInfo" button fails
4
-    PHP CS Fixer breaks lines between the tags
5
-    -->
6
-    <input type="button" class="spoilerButton" value="Show MediaInfo" /><blockquote class="spoiler hidden">
7
-<?php
8
-        echo Text::full_format($MediaInfo);
9
-?>
10
-    </blockquote>
11
-  </div>

+ 0
- 17
_packages/tracker-tiers/classes/config.template View File

@@ -1,17 +0,0 @@
1
-<?php
2
-
3
-# ...
4
-
5
-// Tracker urls to be added to torrent files à la http://bittorrent.org/beps/bep_0012.html
6
-define('ANNOUNCE_URLS', [
7
-  [ # Tier 1
8
-    'https://track.biotorrents.de:443',
9
-  ],
10
-  [ # Tier 2
11
-    'udp://tracker.coppersurfer.tk:6969/announce',
12
-    'udp://tracker.cyberia.is:6969/announce',
13
-    'udp://tracker.leechers-paradise.org:6969/announce'
14
-  ]
15
-]);
16
-
17
-# ...

+ 0
- 23
_packages/tracker-tiers/classes/torrent_form.class.php View File

@@ -1,23 +0,0 @@
1
-<!-- ... -->
2
-
3
-<p style="text-align: center;">
4
-  <?php
5
-    $Announces = ANNOUNCE_URLS[0];
6
-    #$Announces = call_user_func_array('array_merge', ANNOUNCE_URLS);
7
-    foreach ($Announces as $Announce) {
8
-      # Loop through tracker URLs
9
-  ?>
10
-  <strong>Announce</strong>
11
-  <input type="text"
12
-    value="<?= $Announce . '/' . G::$LoggedUser['torrent_pass'] . '/announce' ?>"
13
-    size="74" onclick="this.select();" readonly="readonly" /> <br />
14
-  <?php
15
-    }
16
-  ?>
17
-
18
-  <strong>Source</strong>
19
-  <input type="text" value="<?= Users::get_upload_sources()[0] ?>"
20
-    size="20" onclick="this.select();" readonly="readonly" />
21
-</p>
22
-
23
-<!-- ... -->

+ 0
- 34
_packages/tracker-tiers/classes/torrentsdl.class.php View File

@@ -1,34 +0,0 @@
1
-<?php
2
-
3
-class TorrentsDL
4
-{
5
-    # ...
6
-
7
-    /**
8
-     * Create a Zip object and store the query results
9
-     *
10
-     * @param mysqli_result $QueryResult results from a query on the collector pages
11
-     * @param string $Title name of the collection that will be created
12
-     * @param string $AnnounceURL URL to add to the created torrents
13
-     */
14
-    public function __construct(&$QueryResult, $Title)
15
-    {
16
-        G::$Cache->InternalCache = false; // The internal cache is almost completely useless for this
17
-        Zip::unlimit(); // Need more memory and longer timeout
18
-        $this->QueryResult = $QueryResult;
19
-        $this->Title = $Title;
20
-        $this->User = G::$LoggedUser;
21
-        $this->AnnounceURL = ANNOUNCE_URLS[0][0].'/'.G::$LoggedUser['torrent_pass'].'/announce';
22
-
23
-        function add_passkey($Ann)
24
-        {
25
-            return (is_array($Ann)) ? array_map('add_passkey', $Ann) : $Ann.'/'.G::$LoggedUser['torrent_pass'].'/announce';
26
-        }
27
-
28
-        $this->AnnounceList = array(array_map('add_passkey', ANNOUNCE_URLS[0]), ANNOUNCE_URLS[1]);
29
-        #$this->AnnounceList = (sizeof(ANNOUNCE_URLS) === 1 && sizeof(ANNOUNCE_URLS[0]) === 1) ? [] : array_map('add_passkey', ANNOUNCE_URLS);
30
-        $this->Zip = new Zip(Misc::file_string($Title));
31
-    }
32
-
33
-    # ...
34
-}

+ 0
- 16
_packages/tracker-tiers/readme.md View File

@@ -1,16 +0,0 @@
1
-# Multiple tracker tiers
2
-
3
-BioTorrents.de supports two tiers of trackers:
4
-
5
-  - Tier 1: Authenticated private tracker URLs using the familiar Gazelle/Ocelot features
6
-  - Tier 2: A list of standalone public trackers as backups, in case the main tracker goes down
7
-
8
-User passkeys are only applied to the 1st tier, which should contain the announce URLs used for reporting stats to Ocelot.
9
-
10
-The 2nd tier contains public trackers that (1) keep no logs, and (2) insert random IP addresses into the peer list.
11
-
12
-Please note that all torrent contents are hashed with the private flag, so the normal protections against DHT, PEX, etc., work as expected.
13
-
14
-Support for multiple trackers does not extend to magnet links!
15
-
16
-Web seed support is coming soon.

+ 0
- 22
_packages/tracker-tiers/sections/torrents/download.php View File

@@ -1,22 +0,0 @@
1
-<?php
2
-
3
-# ...
4
-
5
-header('Content-Type: application/x-bittorrent; charset=utf-8');
6
-header('Content-disposition: attachment; filename="'.$FileName.'"');
7
-
8
-function add_passkey($Ann)
9
-{
10
-    global $TorrentPass;
11
-    return (is_array($Ann)) ? array_map('add_passkey', $Ann) : $Ann.'/'.$TorrentPass.'/announce';
12
-}
13
-
14
-$UserAnnounceURL = ANNOUNCE_URLS[0][0].'/'.$TorrentPass.'/announce';
15
-$UserAnnounceList = array(array_map('add_passkey', ANNOUNCE_URLS[0]), ANNOUNCE_URLS[1]);
16
-#$UserAnnounceList = (sizeof(ANNOUNCE_URLS) === 1 && sizeof(ANNOUNCE_URLS[0]) === 1) ? [] : array_map('add_passkey', ANNOUNCE_URLS);
17
-
18
-echo TorrentsDL::get_file($Contents, $UserAnnounceURL, $UserAnnounceList);
19
-
20
-define('SKIP_NO_CACHE_HEADERS', 1);
21
-
22
-# EOF

Loading…
Cancel
Save