diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-01-08 12:05:54 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-01-08 12:49:02 +0100 |
commit | 7fbb7f4dc4cd1918a5b3dfaa4c8dfb6a7e11d0c3 (patch) | |
tree | f3d82bd3c36d0cb3ddf6493702afedcefd951070 /lib/private/updater.php | |
parent | 14e534e93322d3ce3275f04657de40fcf34d61d9 (diff) | |
download | nextcloud-server-7fbb7f4dc4cd1918a5b3dfaa4c8dfb6a7e11d0c3.tar.gz nextcloud-server-7fbb7f4dc4cd1918a5b3dfaa4c8dfb6a7e11d0c3.zip |
Add version to .htaccess
Currently if a user does not replace the .htaccess file with the new update this can lead to serious problems in case Apache is used as webserver.
This commit adds the version to the .htaccess file and the update routine fails in case not the newest version is specified in there. This obviously means that every release has to update the version specified in .htaccess as well. But I see no better solution for it.
Conflicts:
lib/private/updater.php
Diffstat (limited to 'lib/private/updater.php')
-rw-r--r-- | lib/private/updater.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/updater.php b/lib/private/updater.php index 6272f77cfc2..fb41e2d36f0 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -189,7 +189,11 @@ class Updater extends BasicEmitter { // Update htaccess files for apache hosts if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) { - \OC_Setup::updateHtaccess(); + try { + \OC_Setup::updateHtaccess(); + } catch (\Exception $e) { + throw new \Exception($e->getMessage()); + } } // create empty file in data dir, so we can later find |