diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-19 13:26:41 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-19 13:26:41 +0200 |
commit | 6869d2e82aa654f6166b70af37d8ca1510d299ad (patch) | |
tree | 7c079946185ced923b970b8fe1aee5784f55467c /.gitmodules | |
parent | 079ad18bce537c1c831c4a635ac26fb2f28956fa (diff) | |
download | nextcloud-server-6869d2e82aa654f6166b70af37d8ca1510d299ad.tar.gz nextcloud-server-6869d2e82aa654f6166b70af37d8ca1510d299ad.zip |
Throw error in showPreview instead the constructor
This function is also used in a way such as:
```
$preview = new \OC\Preview(\OC_User::getUser(), 'files');
$info = \OC\Files\Filesystem::getFileInfo($file);
if (!$always and !$preview->isAvailable($info)) {
\OC_Response::setStatus(404);
} else {
$preview->setFile($file);
$preview->setMaxX($maxX);
$preview->setMaxY($maxY);
$preview->setScalingUp($scalingUp);
$preview->setKeepAspect($keepAspect);
}
```
Which won't work anymore since `setFile` is used instead of passing the file in the constructor. Fixes a regression in master.
Diffstat (limited to '.gitmodules')
0 files changed, 0 insertions, 0 deletions