mirror of
https://github.com/YGGverse/Yo.git
synced 2026-03-31 17:55:35 +00:00
fix duplicates validation
This commit is contained in:
parent
dfb2c06738
commit
01437065e3
1 changed files with 4 additions and 2 deletions
|
|
@ -121,12 +121,14 @@ for ($i = 0; $i <= $total; $i++)
|
|||
|
||||
foreach ($query->fetchAll() as $remote)
|
||||
{
|
||||
$url = $remote->scheme . '://' . $remote->name . ($remote->port ? ':' . $remote->port : false) . $remote->uri;
|
||||
$url = $remote->scheme . '://' . $remote->name . ($remote->port ? ':' . $remote->port : false) . $remote->uri;
|
||||
$crc32url = crc32($url);
|
||||
|
||||
// Check for unique URL requested
|
||||
if (isset($argv[6]))
|
||||
{
|
||||
$local = $index->search('@url "' . trim($argv[1]) . '"')
|
||||
$local = $index->search('@url "' . trim($url) . '"')
|
||||
->filter('crc32url', $crc32url)
|
||||
->limit(1)
|
||||
->get();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue