summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-14 23:33:34 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-14 23:33:34 +0200
commitf4f4f8834753a725c1bd9663dfbe024929f65941 (patch)
tree4af6b024a72f5350004457c03a4abfb146a852db /lib
parenta4938d9b26f28a3dbc3e28b00279af5d755c030c (diff)
parentdc061bae42293df936c138f0db32fb6d308042f6 (diff)
downloadnextcloud-server-f4f4f8834753a725c1bd9663dfbe024929f65941.tar.gz
nextcloud-server-f4f4f8834753a725c1bd9663dfbe024929f65941.zip
Merge pull request #24005 from owncloud/3rdparty-has-to-be-in-root
Kill movable 3rdparty
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php36
-rw-r--r--lib/private/templatelayout.php4
2 files changed, 8 insertions, 32 deletions
diff --git a/lib/base.php b/lib/base.php
index 5a1d15913ba..728d9bced95 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -78,19 +78,14 @@ class OC {
*/
public static $WEBROOT = '';
/**
- * The installation path of the 3rdparty folder on the server (e.g. /srv/http/owncloud/3rdparty)
- */
- public static $THIRDPARTYROOT = '';
- /**
- * the root path of the 3rdparty folder for http requests (e.g. owncloud/3rdparty)
- */
- public static $THIRDPARTYWEBROOT = '';
- /**
* The installation path array of the apps folder on the server (e.g. /srv/http/owncloud) 'path' and
* web path in 'url'
*/
public static $APPSROOTS = array();
+ /**
+ * @var string
+ */
public static $configDir;
/**
@@ -183,25 +178,6 @@ class OC {
}
}
- // search the 3rdparty folder
- OC::$THIRDPARTYROOT = self::$config->getValue('3rdpartyroot', null);
- OC::$THIRDPARTYWEBROOT = self::$config->getValue('3rdpartyurl', null);
-
- if (empty(OC::$THIRDPARTYROOT) && empty(OC::$THIRDPARTYWEBROOT)) {
- if (file_exists(OC::$SERVERROOT . '/3rdparty')) {
- OC::$THIRDPARTYROOT = OC::$SERVERROOT;
- OC::$THIRDPARTYWEBROOT = OC::$WEBROOT;
- } elseif (file_exists(OC::$SERVERROOT . '/../3rdparty')) {
- OC::$THIRDPARTYWEBROOT = rtrim(dirname(OC::$WEBROOT), '/');
- OC::$THIRDPARTYROOT = rtrim(dirname(OC::$SERVERROOT), '/');
- }
- }
- if (empty(OC::$THIRDPARTYROOT) || !file_exists(OC::$THIRDPARTYROOT)) {
- throw new \RuntimeException('3rdparty directory not found! Please put the ownCloud 3rdparty'
- . ' folder in the ownCloud folder or the folder above.'
- . ' You can also configure the location in the config.php file.');
- }
-
// search the apps folder
$config_paths = self::$config->getValue('apps_paths', array());
if (!empty($config_paths)) {
@@ -240,7 +216,7 @@ class OC {
set_include_path(
OC::$SERVERROOT . '/lib/private' . PATH_SEPARATOR .
OC::$SERVERROOT . '/config' . PATH_SEPARATOR .
- OC::$THIRDPARTYROOT . '/3rdparty' . PATH_SEPARATOR .
+ OC::$SERVERROOT . '/3rdparty' . PATH_SEPARATOR .
implode(PATH_SEPARATOR, $paths) . PATH_SEPARATOR .
get_include_path() . PATH_SEPARATOR .
OC::$SERVERROOT
@@ -306,7 +282,7 @@ class OC {
// render error page
$template = new OC_Template('', 'update.user', 'guest');
- OC_Util::addscript('maintenance-check');
+ OC_Util::addScript('maintenance-check');
$template->printPage();
die();
}
@@ -493,7 +469,7 @@ class OC {
try {
self::initPaths();
// setup 3rdparty autoloader
- $vendorAutoLoad = OC::$THIRDPARTYROOT . '/3rdparty/autoload.php';
+ $vendorAutoLoad = OC::$SERVERROOT. '/3rdparty/autoload.php';
if (!file_exists($vendorAutoLoad)) {
throw new \RuntimeException('Composer autoloader not found, unable to continue. Check the folder "3rdparty". Running "git submodule update --init" will initialize the git submodule that handles the subfolder "3rdparty".');
}
diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php
index fe7638f399d..88077b418a7 100644
--- a/lib/private/templatelayout.php
+++ b/lib/private/templatelayout.php
@@ -182,7 +182,7 @@ class TemplateLayout extends \OC_Template {
\OC::$server->getLogger(),
$theme,
array( \OC::$SERVERROOT => \OC::$WEBROOT ),
- array( \OC::$THIRDPARTYROOT => \OC::$THIRDPARTYWEBROOT ));
+ array( \OC::$SERVERROOT => \OC::$WEBROOT ));
$locator->find($styles);
return $locator->getResources();
}
@@ -199,7 +199,7 @@ class TemplateLayout extends \OC_Template {
\OC::$server->getLogger(),
$theme,
array( \OC::$SERVERROOT => \OC::$WEBROOT ),
- array( \OC::$THIRDPARTYROOT => \OC::$THIRDPARTYWEBROOT ));
+ array( \OC::$SERVERROOT => \OC::$WEBROOT ));
$locator->find($scripts);
return $locator->getResources();
}