Ticket #70: magnet_base64.patch
File magnet_base64.patch, 838 bytes (added by , 13 years ago) |
---|
-
input.php
old new 276 276 $_SESSION["rtwi_err"] = "notorrenturl"; 277 277 header( "location: {$config["index"]}?mod=addtorrent" ); 278 278 exit; 279 } elseif ( substr( $_REQUEST["torrenturl"], 0, 7 ) != "http://") {279 } elseif ( ( substr( $_REQUEST["torrenturl"], 0, 7 ) != "http://" ) && ( substr( $_REQUEST["torrenturl"], 0, 7 ) != "magnet:" ) ) { 280 280 $_SESSION["rtwi_err"] = "notanurl"; 281 281 header( "location: {$config["index"]}?mod=addtorrent" ); 282 282 exit; 283 283 } 284 284 $torrent = $_REQUEST["torrenturl"]; 285 if ( substr( $torrent, 0, 7 ) == "magnet:" ) { 286 $xmlrpc->set_type( $torrent, "base64" ); 287 } 285 288 } else { 286 289 if ( !isset( $_FILES ) || !is_array( $_FILES ) ) { 287 290 $_SESSION["rtwi_err"] = "notorrentfileuploaded";