diff --git a/classes/class_torrent.php b/classes/class_torrent.php index f6863a94..8e9b8251 100644 --- a/classes/class_torrent.php +++ b/classes/class_torrent.php @@ -292,14 +292,13 @@ function make_private() { unset($this->Val['libtorrent_resume']); //----- End properties that do not affect the infohash - if ($this->Val['info']->Val['private']) { return true; // Torrent is private } else { // Torrent is not private! - // add private tracker flag + // add private tracker flag and sort info dictionary $this->Val['info']->Val['private'] = 1; - + ksort($this->Val['info']->Val); return false; } } diff --git a/classes/class_torrent_32bit.php b/classes/class_torrent_32bit.php index 51389934..78bdff75 100644 --- a/classes/class_torrent_32bit.php +++ b/classes/class_torrent_32bit.php @@ -288,9 +288,9 @@ function make_private() { return true; } else { // Torrent is not private! - // add private tracker flag + // add private tracker flag and sort info dictionary $this->Val['info']->Val['private'] = '[*INT*]1'; - + ksort($this->Val['info']->Val); return false; } }