torrents are published by default.
how do i disable this?
XFileSharing Pro - Torrents Mod
i found the solution.
in file \cgi-bin\Torrents\plugins\Bitflu\00_StorageVFS.pm
change the below code
to the code below
in file \cgi-bin\Torrents\plugins\Bitflu\00_StorageVFS.pm
change the below code
Code: Select all
my $xfile = {file_tmp=>$file, file_name_orig=>$fname, file_public=>1, torrent=>1, sid=>$sid};
# --------------------
$xfile = &XUpload::ProcessFile($xfile,{ip=>'2.2.2.2',fld_name=>$fld_name});
# --------------------
&logg("ProcessTFile Error: $xfile->{file_status}") if $xfile->{file_status};
Code: Select all
my $xfile = {file_tmp=>$file, file_name_orig=>$fname, file_public=>0, torrent=>1, sid=>$sid};
# --------------------
$xfile = &XUpload::ProcessFile($xfile,{ip=>'2.2.2.2',fld_name=>$fld_name});
# --------------------
&logg("ProcessTFile Error: $xfile->{file_status}") if $xfile->{file_status};
in index.cgi, look for the below code.randy wrote:yes. they will also published by default I think! And I want to find out how to disable when copying files in my files not to show public also by default
Code: Select all
sub CloneFile
{
my ($file,$fld_id) = @_;
my $code = $ses->randchar(12);
while($db->SelectOne("SELECT file_id FROM Files WHERE file_code=? OR file_real=?",$code,$code)){$code = $ses->randchar(12);}
$db->Exec("INSERT INTO Files
SET usr_id=?,
srv_id=?,
file_fld_id=?,
file_name=?,
file_descr=?,
file_public=?,
file_code=?,
file_real=?,
file_real_id=?,
file_del_id=?,
file_size=?,
file_password=?,
file_ip=INET_ATON(?),
file_md5=?,
file_spec=?,
file_created=NOW(),
file_last_download=NOW()",
$ses->getUserId,
$file->{srv_id},
$fld_id||0,
$file->{file_name},
'',
1,
$code,
$file->{file_real},
$file->{file_real_id}||$file->{file_id},
$file->{file_del_id},
$file->{file_size},
'',
$ses->getIP,
$file->{file_md5},
$file->{file_spec}||'',
);
$db->Exec("UPDATE Servers SET srv_files=srv_files+1 WHERE srv_id=?",$file->{srv_id});
return $code;
}
Code: Select all
sub CloneFile
{
my ($file,$fld_id) = @_;
my $code = $ses->randchar(12);
while($db->SelectOne("SELECT file_id FROM Files WHERE file_code=? OR file_real=?",$code,$code)){$code = $ses->randchar(12);}
$db->Exec("INSERT INTO Files
SET usr_id=?,
srv_id=?,
file_fld_id=?,
file_name=?,
file_descr=?,
file_public=?,
file_code=?,
file_real=?,
file_real_id=?,
file_del_id=?,
file_size=?,
file_password=?,
file_ip=INET_ATON(?),
file_md5=?,
file_spec=?,
file_created=NOW(),
file_last_download=NOW()",
$ses->getUserId,
$file->{srv_id},
$fld_id||0,
$file->{file_name},
'',
0,
$code,
$file->{file_real},
$file->{file_real_id}||$file->{file_id},
$file->{file_del_id},
$file->{file_size},
'',
$ses->getIP,
$file->{file_md5},
$file->{file_spec}||'',
);
$db->Exec("UPDATE Servers SET srv_files=srv_files+1 WHERE srv_id=?",$file->{srv_id});
return $code;
}