@@ 187-193 (lines=7) @@ | ||
184 | $newmtime = $file->getMTime(); |
|
185 | $newsize = $file->getSize(); |
|
186 | return new DataResponse(['mtime' => $newmtime, 'size' => $newsize], Http::STATUS_OK); |
|
187 | } else { |
|
188 | // Not writeable! |
|
189 | $this->logger->error('User does not have permission to write to file: ' . $path, |
|
190 | ['app' => 'files_texteditor']); |
|
191 | return new DataResponse([ 'message' => $this->l->t('Insufficient permissions')], |
|
192 | Http::STATUS_BAD_REQUEST); |
|
193 | } |
|
194 | } |
|
195 | } else if ($path === '') { |
|
196 | $this->logger->error('No file path supplied'); |
|
@@ 198-201 (lines=4) @@ | ||
195 | } else if ($path === '') { |
|
196 | $this->logger->error('No file path supplied'); |
|
197 | return new DataResponse(['message' => $this->l->t('File path not supplied')], Http::STATUS_BAD_REQUEST); |
|
198 | } else { |
|
199 | $this->logger->error('No file mtime supplied', ['app' => 'files_texteditor']); |
|
200 | return new DataResponse(['message' => $this->l->t('File mtime not supplied')], Http::STATUS_BAD_REQUEST); |
|
201 | } |
|
202 | ||
203 | } catch (HintException $e) { |
|
204 | $message = (string)$e->getHint(); |