Fix checking of NULL or empty OC::$THIRDPARTYROOT/OC::$THIRDPARTYWEBROOT
Fixes #10065
This commit is contained in:
parent
fd1bb688f9
commit
f2e20757f6
|
@ -135,7 +135,7 @@ class OC {
|
||||||
OC::$THIRDPARTYROOT = OC_Config::getValue('3rdpartyroot', null);
|
OC::$THIRDPARTYROOT = OC_Config::getValue('3rdpartyroot', null);
|
||||||
OC::$THIRDPARTYWEBROOT = OC_Config::getValue('3rdpartyurl', null);
|
OC::$THIRDPARTYWEBROOT = OC_Config::getValue('3rdpartyurl', null);
|
||||||
|
|
||||||
if (is_null(OC::$THIRDPARTYROOT) && is_null(OC::$THIRDPARTYWEBROOT)) {
|
if (empty(OC::$THIRDPARTYROOT) && empty(OC::$THIRDPARTYWEBROOT)) {
|
||||||
if (file_exists(OC::$SERVERROOT . '/3rdparty')) {
|
if (file_exists(OC::$SERVERROOT . '/3rdparty')) {
|
||||||
OC::$THIRDPARTYROOT = OC::$SERVERROOT;
|
OC::$THIRDPARTYROOT = OC::$SERVERROOT;
|
||||||
OC::$THIRDPARTYWEBROOT = OC::$WEBROOT;
|
OC::$THIRDPARTYWEBROOT = OC::$WEBROOT;
|
||||||
|
@ -144,7 +144,7 @@ class OC {
|
||||||
OC::$THIRDPARTYROOT = rtrim(dirname(OC::$SERVERROOT), '/');
|
OC::$THIRDPARTYROOT = rtrim(dirname(OC::$SERVERROOT), '/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_null(OC::$THIRDPARTYROOT) || !file_exists(OC::$THIRDPARTYROOT)) {
|
if (empty(OC::$THIRDPARTYROOT) || !file_exists(OC::$THIRDPARTYROOT)) {
|
||||||
echo('3rdparty directory not found! Please put the ownCloud 3rdparty'
|
echo('3rdparty directory not found! Please put the ownCloud 3rdparty'
|
||||||
. ' folder in the ownCloud folder or the folder above.'
|
. ' folder in the ownCloud folder or the folder above.'
|
||||||
. ' You can also configure the location in the config.php file.');
|
. ' You can also configure the location in the config.php file.');
|
||||||
|
|
Loading…
Reference in New Issue