diff options
author | Daniel Rudolf <github.com@daniel-rudolf.de> | 2021-08-04 18:52:55 +0200 |
---|---|---|
committer | Daniel Rudolf <github.com@daniel-rudolf.de> | 2021-08-04 18:52:55 +0200 |
commit | aa455e71d95c877b0dc758bc5c873d9278e6e112 (patch) | |
tree | 6f1135402c356f68cd940e0b2ca5efd1f8d91a67 /lib/private/legacy/OC_Util.php | |
parent | b768cade2b2c6664851de6462a17ef3531305971 (diff) | |
parent | 2a632195365be77889428e85801a00c74ab6a836 (diff) | |
download | nextcloud-server-aa455e71d95c877b0dc758bc5c873d9278e6e112.tar.gz nextcloud-server-aa455e71d95c877b0dc758bc5c873d9278e6e112.zip |
Merge branch 'master' into enhancement/noid/IURLGenerator-linkToDefaultPageUrl
Diffstat (limited to 'lib/private/legacy/OC_Util.php')
-rw-r--r-- | lib/private/legacy/OC_Util.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index afd28a697d7..35c81dd34e6 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -63,6 +63,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + use bantu\IniGetWrapper\IniGetWrapper; use OC\AppFramework\Http\Request; use OC\Files\Storage\LocalRootStorage; @@ -1177,7 +1178,7 @@ class OC_Util { $fp = @fopen($testFile, 'w'); if (!$fp) { - throw new OC\HintException('Can\'t create test file to check for working .htaccess file.', + throw new \OCP\HintException('Can\'t create test file to check for working .htaccess file.', 'Make sure it is possible for the webserver to write to ' . $testFile); } fwrite($fp, $testContent); @@ -1188,10 +1189,11 @@ class OC_Util { /** * Check if the .htaccess file is working + * * @param \OCP\IConfig $config * @return bool * @throws Exception - * @throws \OC\HintException If the test file can't get written. + * @throws \OCP\HintException If the test file can't get written. */ public function isHtaccessWorking(\OCP\IConfig $config) { if (\OC::$CLI || !$config->getSystemValue('check_for_working_htaccess', true)) { @@ -1385,7 +1387,7 @@ class OC_Util { * * @param \OC\SystemConfig $config * @return bool whether the core or any app needs an upgrade - * @throws \OC\HintException When the upgrade from the given version is not allowed + * @throws \OCP\HintException When the upgrade from the given version is not allowed */ public static function needUpgrade(\OC\SystemConfig $config) { if ($config->getValue('installed', false)) { @@ -1405,11 +1407,11 @@ class OC_Util { return true; } else { // downgrade attempt, throw exception - throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); + throw new \OCP\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); } } elseif ($versionDiff < 0) { // downgrade attempt, throw exception - throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); + throw new \OCP\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')'); } // also check for upgrades for apps (independently from the user) |