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-04-30 15:35:39 +0300
committerPhie <phie@phie.ovh>2019-04-30 15:35:39 +0300
commit59e496950618821fcc9523e09d2c6ca356ff43f9 (patch)
treed48a06baec9f1bce025b0c42f7bafb5f2c78c9cd /lib
parentfce3221fa82595d71da45340be8ef22db3ee7bca (diff)
don't ask for removed notes
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Controller/NoteController.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php
index f85c0bb..79b3b30 100755
--- a/lib/Controller/NoteController.php
+++ b/lib/Controller/NoteController.php
@@ -114,9 +114,19 @@
$recents['data'] = array();
foreach($recents['data'] as $item){
$path = $item['path'];
- if($item['newpath'] != null)
- $path =$item['newpath'];
- if(!in_array($path, $paths))
+ if(array_key_exists('newpath', $îtem) && $item['newpath'] != null){
+ $path = $item['newpath'];
+ if(in_array($item['path'], $paths)){
+ array_splice($paths, array_search($item['path'], $paths), 1);
+ }
+
+ }
+ if($item['action'] == "remove"){
+ if(in_array($item['path'], $paths)){
+ array_splice($paths, array_search($item['path'], $paths), 1);
+ }
+ }
+ else if(!in_array($path, $paths))
array_push($paths, $path);
}