diff options
author | Phie <phie@phie.ovh> | 2019-08-17 15:05:34 +0300 |
---|---|---|
committer | Phie <phie@phie.ovh> | 2019-08-17 15:05:34 +0300 |
commit | 4ff1ecb3ab94be2448aabe22b58e477323c9691c (patch) | |
tree | b062b27ad01dc29b274a95db60380ada52bd3e3a /lib | |
parent | 89065bbc04c880e6a879067af02aca03b3299f28 (diff) |
fix waitForExtraction
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Controller/NoteController.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php index 92e6946..b5deeab 100755 --- a/lib/Controller/NoteController.php +++ b/lib/Controller/NoteController.php @@ -622,8 +622,8 @@ * @NoCSRFRequired */ public function saveTextToOpenNote(){ - $this->waitEndOfExtraction($id) $id = $_POST['id']; + $this->waitEndOfExtraction($id); $cache = $this->getCacheFolder(); $folder = $cache->get("currentnote".$id); try{ @@ -648,7 +648,7 @@ * @NoCSRFRequired */ public function deleteMediaFromOpenNote($id){ - $this->waitEndOfExtraction($id) + $this->waitEndOfExtraction($id); $cache = $this->getCacheFolder(); $folder = $cache->get("currentnote".$id); @@ -666,7 +666,7 @@ * @NoCSRFRequired */ public function addMediaToOpenNote($id){ - $this->waitEndOfExtraction($id) + $this->waitEndOfExtraction($id); $cache = $this->getCacheFolder(); $folder = $cache->get("currentnote".$id); @@ -712,7 +712,7 @@ * @NoCSRFRequired */ public function listMediaOfOpenNote($id){ - $this->waitEndOfExtraction($id) + $this->waitEndOfExtraction($id); $cache = $this->getCacheFolder(); $folder = $cache->get("currentnote".$id); $media = array(); @@ -733,7 +733,7 @@ * @NoCSRFRequired */ public function getMediaOfOpenNote($id, $media){ - $this->waitEndOfExtraction($id) + $this->waitEndOfExtraction($id); $cache = $this->getCacheFolder(); $folder = $cache->get("currentnote".$id); $data = $folder->get("data"); @@ -816,10 +816,10 @@ private function waitEndOfExtraction($id){ $cache = $this->getCacheFolder(); - $folder = $cache->get("currentnote".$id); do{ - if($folder->nodeExists(".extraction_finished")) + if($cache->nodeExists("currentnote".$id."/.extraction_finished")) return; + sleep(1); }while(true); } |