🎉 Added files
This commit is contained in:
32
rayphp/getfile.php
Normal file
32
rayphp/getfile.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?
|
||||
// gets file from repositories listed in repositories.list
|
||||
|
||||
// params: $filename (string, input), $force (integer, input),
|
||||
// $status (integer, output)
|
||||
|
||||
// This script must be placed in "rayphp" sub-directory.
|
||||
|
||||
require("libfile.php");
|
||||
|
||||
$status=0;
|
||||
|
||||
filename_cut($filename,$file,$path);
|
||||
echo "Using repositories to get '$file' file";
|
||||
$repos=read_repositories_file("repositories.list");
|
||||
|
||||
// foreach repository
|
||||
for($i=0;$i<count($repos);$i++)
|
||||
{
|
||||
$r = $repos[$i];
|
||||
if(valid_entry($r))
|
||||
{
|
||||
if(update_file($file,$r,$path.$file,$force))
|
||||
{
|
||||
$status=1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// If we get here, something went wrong
|
||||
die("No valid repository found for this file, aborting.");
|
||||
?>
|
Reference in New Issue
Block a user