aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-10-29 09:52:13 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-11-23 14:12:36 +0100
commit728648ad77ba3d96d8e61f95a748702df3d615bd (patch)
tree9091dbb05dadb9106ad047764c55ce4e6cb99bf5 /lib
parent9caf4ffbfc2be077a1431149e77be485cd087081 (diff)
downloadnextcloud-server-728648ad77ba3d96d8e61f95a748702df3d615bd.tar.gz
nextcloud-server-728648ad77ba3d96d8e61f95a748702df3d615bd.zip
Replace new occurences of ini_get with IniWrapper methods
Diffstat (limited to 'lib')
-rw-r--r--lib/private/helper.php10
-rw-r--r--lib/private/memcache/xcache.php2
-rw-r--r--lib/private/tempmanager.php2
-rw-r--r--lib/private/util.php2
4 files changed, 9 insertions, 7 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php
index 3bb81fba603..e9fe43a4b34 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -753,8 +753,9 @@ class OC_Helper {
* @return int PHP upload file size limit
*/
public static function uploadLimit() {
- $upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
- $post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
+ $ini = \OC::$server->getIniWrapper();
+ $upload_max_filesize = OCP\Util::computerFileSize($ini->get('upload_max_filesize'));
+ $post_max_size = OCP\Util::computerFileSize($ini->get('post_max_size'));
if ((int)$upload_max_filesize === 0 and (int)$post_max_size === 0) {
return INF;
} elseif ((int)$upload_max_filesize === 0 or (int)$post_max_size === 0) {
@@ -774,12 +775,13 @@ class OC_Helper {
if (!function_exists($function_name)) {
return false;
}
- $disabled = explode(',', ini_get('disable_functions'));
+ $ini = \OC::$server->getIniWrapper();
+ $disabled = explode(',', $ini->get('disable_functions'));
$disabled = array_map('trim', $disabled);
if (in_array($function_name, $disabled)) {
return false;
}
- $disabled = explode(',', ini_get('suhosin.executor.func.blacklist'));
+ $disabled = explode(',', $ini->get('suhosin.executor.func.blacklist'));
$disabled = array_map('trim', $disabled);
if (in_array($function_name, $disabled)) {
return false;
diff --git a/lib/private/memcache/xcache.php b/lib/private/memcache/xcache.php
index f1f932ba2c0..0d2e43a1c18 100644
--- a/lib/private/memcache/xcache.php
+++ b/lib/private/memcache/xcache.php
@@ -124,7 +124,7 @@ class XCache extends Cache implements IMemcache {
// AND administration functions are password-protected.
return false;
}
- $var_size = (int)ini_get('xcache.var_size');
+ $var_size = \OC::$server->getIniWrapper()->getNumeric('xcache.var_size');
if (!$var_size) {
return false;
}
diff --git a/lib/private/tempmanager.php b/lib/private/tempmanager.php
index 365d639389f..ac44b76d683 100644
--- a/lib/private/tempmanager.php
+++ b/lib/private/tempmanager.php
@@ -213,7 +213,7 @@ class TempManager implements ITempManager {
if ($temp = $this->config->getSystemValue('tempdirectory', null)) {
$directories[] = $temp;
}
- if ($temp = ini_get('upload_tmp_dir')) {
+ if ($temp = \OC::$server->getIniWrapper()->get('upload_tmp_dir')) {
$directories[] = $temp;
}
if ($temp = getenv('TMP')) {
diff --git a/lib/private/util.php b/lib/private/util.php
index 69f01c22be9..95cbc480eaf 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -1415,7 +1415,7 @@ class OC_Util {
}
// XCache
if (function_exists('xcache_clear_cache')) {
- if (ini_get('xcache.admin.enable_auth')) {
+ if (\OC::$server->getIniWrapper()->getBool('xcache.admin.enable_auth')) {
\OCP\Util::writeLog('core', 'XCache opcode cache will not be cleared because "xcache.admin.enable_auth" is enabled.', \OCP\Util::WARN);
} else {
@xcache_clear_cache(XC_TYPE_PHP, 0);