mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
Merge pull request #52930 from nextcloud/chore/depreate-oc-helper-ro
This commit is contained in:
commit
5ba9bc2dd6
3 changed files with 6 additions and 3 deletions
|
|
@ -196,7 +196,8 @@ class OC {
|
|||
|
||||
// Check if config is writable
|
||||
$configFileWritable = is_writable($configFilePath);
|
||||
if (!$configFileWritable && !OC_Helper::isReadOnlyConfigEnabled()
|
||||
$configReadOnly = Server::get(IConfig::class)->getSystemValueBool('config_is_read_only');
|
||||
if (!$configFileWritable && !$configReadOnly
|
||||
|| !$configFileWritable && \OCP\Util::needUpgrade()) {
|
||||
$urlGenerator = Server::get(IURLGenerator::class);
|
||||
$l = Server::get(\OCP\L10N\IFactory::class)->get('lib');
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ class OC_Helper {
|
|||
|
||||
/**
|
||||
* Try to find a program
|
||||
* @deprecated 25.0.0 Use \OC\BinaryFinder directly
|
||||
* @deprecated 25.0.0 Use \OCP\IBinaryFinder directly
|
||||
*/
|
||||
public static function findBinaryPath(string $program): ?string {
|
||||
$result = Server::get(IBinaryFinder::class)->findBinaryPath($program);
|
||||
|
|
@ -415,6 +415,7 @@ class OC_Helper {
|
|||
/**
|
||||
* Returns whether the config file is set manually to read-only
|
||||
* @return bool
|
||||
* @deprecated 32.0.0 use the `config_is_read_only` system config directly
|
||||
*/
|
||||
public static function isReadOnlyConfigEnabled() {
|
||||
return \OC::$server->getConfig()->getSystemValueBool('config_is_read_only', false);
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ class OC_Util {
|
|||
*
|
||||
* @param IUser|null $user
|
||||
* @return int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false|float Quota bytes
|
||||
* @deprecated 9.0.0 - Use \OCP\IUser::getQuota
|
||||
*/
|
||||
public static function getUserQuota(?IUser $user) {
|
||||
if (is_null($user)) {
|
||||
|
|
@ -331,7 +332,7 @@ class OC_Util {
|
|||
}
|
||||
|
||||
// Check if config folder is writable.
|
||||
if (!OC_Helper::isReadOnlyConfigEnabled()) {
|
||||
if (!(bool)$config->getValue('config_is_read_only', false)) {
|
||||
if (!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) {
|
||||
$errors[] = [
|
||||
'error' => $l->t('Cannot write into "config" directory.'),
|
||||
|
|
|
|||
Loading…
Reference in a new issue