Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CarnetApp/CarnetNextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhie <phie@phie.ovh>2018-09-23 16:34:12 +0300
committerPhie <phie@phie.ovh>2018-09-23 16:34:12 +0300
commit261ed0ec7aa159b4a893f66646c8dd9f6a9c93aa (patch)
tree5312bf9c1a0ec4dfa7a87749916de5c72c09752d /lib/Command
parent75f3f2b4f462fcc873fb93ad953e7c3522021f09 (diff)
making app compliant
Diffstat (limited to 'lib/Command')
-rw-r--r--lib/Command/Search.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Command/Search.php b/lib/Command/Search.php
index d2da264..3a517d9 100644
--- a/lib/Command/Search.php
+++ b/lib/Command/Search.php
@@ -58,7 +58,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$output->writeln('searching '.$input->getArgument('query')." in ".$this->CarnetFolder->getFullPath($input->getArgument('root')));
$path = $input->getArgument('root');
- if (!empty($path) && substr($path, -1) == '/' || $path == ".")
+ if (!empty($path) && substr($path, -1) !== '/' || $path !== ".")
$path = substr($path, -1);
$this->search($path, $this->CarnetFolder->get($path),$input->getArgument('query'),0);
$data = json_decode( $this->searchCache->getContent());
@@ -82,7 +82,7 @@ private function writeFound($relativePath, $in){
$file = array();
$file['name'] = $inf->getName();
$file['path'] = $relativePath."/".$inf->getName();
- $file['isDir'] = $inf->getType() == "dir";
+ $file['isDir'] = $inf->getType() === "dir";
$file['mtime'] = $inf->getMtime();
$data = json_decode( $this->searchCache->getContent());
array_push($data, $file);
@@ -95,9 +95,9 @@ private function search($relativePath, $folder, $query, $curDepth){
foreach($folder->getDirectoryListing() as $in){
//$this->output->writeln('in '.$in->getPath());
- if($in->getFileInfo()->getType() == "dir"){
+ if($in->getFileInfo()->getType() === "dir"){
if($curDepth<30) //might be a problem in nc db
- $this->search(($relativePath!=""?relativePath."/":"").$in->getName(), $in, $query, $curDepth+1);
+ $this->search(($relativePath!==""?relativePath."/":"").$in->getName(), $in, $query, $curDepth+1);
}
else{