Kill movable 3rdparty

This commit is contained in:
Thomas Müller 2016-04-14 17:59:49 +02:00
parent 5911ce530b
commit dc061bae42
No known key found for this signature in database
GPG key ID: A943788A3BBEC44C
3 changed files with 8 additions and 47 deletions

View file

@ -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.

View file

@ -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".');
}

View file

@ -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();
}