mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-14 20:18:00 +00:00
fixed dev output
This commit is contained in:
@@ -54,7 +54,7 @@ class FTPStorage implements StorageController
|
||||
function getItems($dev=false)
|
||||
{
|
||||
if(!$this->connect()) return false;
|
||||
return $this->ftp_list_files_recursive(FTP_BASEDIR);
|
||||
return $this->ftp_list_files_recursive(FTP_BASEDIR,$dev);
|
||||
}
|
||||
|
||||
function pullFile($hash,$location)
|
||||
@@ -106,7 +106,7 @@ class FTPStorage implements StorageController
|
||||
}
|
||||
}
|
||||
|
||||
function ftp_list_files_recursive($path)
|
||||
function ftp_list_files_recursive($path,$dev=false)
|
||||
{
|
||||
if(!$this->connect()) return false;
|
||||
$items = ftp_mlsd($this->connection, $path);
|
||||
@@ -122,13 +122,15 @@ class FTPStorage implements StorageController
|
||||
if ($type == 'dir')
|
||||
{
|
||||
$result =
|
||||
array_merge($result, $this->ftp_list_files_recursive($filepath));
|
||||
array_merge($result, $this->ftp_list_files_recursive($filepath,$dev));
|
||||
}
|
||||
else if(mightBeAHash($name) || endswith($name,'.enc'))
|
||||
{
|
||||
$result[] = $name;
|
||||
if($dev===true) echo " Got $name \r";
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -57,13 +57,11 @@ class S3Storage implements StorageController
|
||||
|
||||
++$count;
|
||||
foreach ($objects['Contents'] as $object){
|
||||
//echo $count." {$object['Key']}\n";
|
||||
$lastkey = $object['Key'];
|
||||
$items[] = $lastkey;
|
||||
}
|
||||
|
||||
if($dev===true)
|
||||
echo "Got ".($count*$keys)." files \r";
|
||||
if($dev===true) echo " Got ".($count*$keys)." files \r";
|
||||
|
||||
$KeyCount = $objects['KeyCount'];
|
||||
}
|
||||
|
||||
@@ -52,9 +52,9 @@ if(!in_array('p2',$argv))
|
||||
|
||||
foreach($controllers as $contr)
|
||||
{
|
||||
echo " [P1] Collecting list of items from ".get_class($contr)."..";
|
||||
echo " [P1] Collecting list of items from ".get_class($contr)."..\n";
|
||||
$controllerfiles = $contr->getItems(true);
|
||||
echo " done. Got ".count($controllerfiles)." files\n";
|
||||
echo "\n done. Got ".count($controllerfiles)." files\n";
|
||||
if($controllerfiles)
|
||||
foreach($controllerfiles as $cfile)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user