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
path: root/lib
diff options
context:
space:
mode:
authorPhie <phie@phie.ovh>2019-11-08 21:36:13 +0300
committerPhie <phie@phie.ovh>2019-11-08 21:36:13 +0300
commitd016777a6a675da7f5f04a920c1a5ab8050a278e (patch)
tree63751347018324f6c5439aa5a53de01ac8ab7f69 /lib
parent8e2288aa64941369a901160ecc722de1d24fc9c1 (diff)
everything ending with sqd is a Note
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Controller/NoteController.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php
index b24f686..c0bd031 100755
--- a/lib/Controller/NoteController.php
+++ b/lib/Controller/NoteController.php
@@ -51,7 +51,7 @@
public function isNote($node){
- return $node->getType() !== "dir" || substr($node->getName(), 0, strlen("note$")) === "note$";
+ return $node->getType() !== "dir" || substr($node->getName(), strlen($node->getName()) -strlen(".sqd"),strlen($node->getName())) === ".sqd";
}
/**
* CAUTION: the @Stuff turns off security checks; for this page no admin is
@@ -71,12 +71,12 @@
$paths = array();
$data = array();
foreach($this->CarnetFolder->get($path)->getDirectoryListing() as $in){
-
+
$inf = $in->getFileInfo();
$file = array();
$file['name'] = $inf->getName();
$file['path'] = $path.$inf->getName();
- $file['isDir'] = !$this->isNote($inf);
+ $file['isDir'] = $inf->getType() === "dir";
$file['mtime'] = $inf->getMtime();
if($inf->getType() !== "dir"){
array_push($paths, $file['path']);