From dc061bae42293df936c138f0db32fb6d308042f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Thu, 14 Apr 2016 17:59:49 +0200 Subject: [PATCH] Kill movable 3rdparty --- config/config.sample.php | 15 -------------- lib/base.php | 36 ++++++---------------------------- lib/private/templatelayout.php | 4 ++-- 3 files changed, 8 insertions(+), 47 deletions(-) diff --git a/config/config.sample.php b/config/config.sample.php index d1ad1cd38d..c2671f9d21 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -611,21 +611,6 @@ $CONFIG = array( * Some of the ownCloud code may be stored in alternate locations. */ -/** - * ownCloud uses some 3rd party PHP components to provide certain functionality. - * These components are shipped as part of the software package and reside in - * ``owncloud/3rdparty``. Use this option to configure a different location. - * For example, if your location is /var/www/owncloud/foo/3rdparty, then the - * correct configuration is '3rdpartyroot' => '/var/www/owncloud/foo/', - */ -'3rdpartyroot' => '', - -/** - * If you have an alternate ``3rdpartyroot``, you must also configure the URL as - * seen by a Web browser. - */ -'3rdpartyurl' => '', - /** * This section is for configuring the download links for ownCloud clients, as * seen in the first-run wizard and on Personal pages. diff --git a/lib/base.php b/lib/base.php index 5a1d15913b..728d9bced9 100644 --- a/lib/base.php +++ b/lib/base.php @@ -77,20 +77,15 @@ class OC { * the owncloud root path for http requests (e.g. owncloud/) */ 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 fe7638f399..88077b418a 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(); }