Ticket #70: magnet.patch

File magnet.patch, 782 bytes (added by apf, 12 years ago)

magnet URI patch

  • input.php

    old new  
    276276                               $_SESSION["rtwi_err"] = "notorrenturl";
    277277                               header( "location: {$config["index"]}?mod=addtorrent" );
    278278                               exit;
    279                        } elseif ( substr( $_REQUEST["torrenturl"], 0, 7 ) != "http://" ) {
     279                       } elseif ( ( substr( $_REQUEST["torrenturl"], 0, 7 ) != "http://" ) && ( substr( $_REQUEST["torrenturl"], 0, 7 ) != "magnet:" ) ) {
    280280                               $_SESSION["rtwi_err"] = "notanurl";
    281281                               header( "location: {$config["index"]}?mod=addtorrent" );
    282282                               exit;