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