Move files inside public, update CI paths, remove APP_URL_APPEND calls

pull/3064/head
Julio Montoya 5 years ago
parent b54686d461
commit 6f27ffae65
  1. 34
      .php_cs.dist
  2. 5
      README.md
  3. BIN
      apple-touch-icon.png
  4. 0
      public/certificates/index.php
  5. 0
      public/custompages/README.md
  6. 0
      public/custompages/first_login-dist.php
  7. 0
      public/custompages/images/footer.png
  8. 0
      public/custompages/images/header.png
  9. 0
      public/custompages/images/login-form-submit-bg.jpg
  10. 0
      public/custompages/images/page-background.png
  11. 0
      public/custompages/index-logged-dist.php
  12. 0
      public/custompages/index-unlogged-dist.php
  13. 0
      public/custompages/language.inc.php
  14. 0
      public/custompages/language.php
  15. 0
      public/custompages/loggedout-dist.php
  16. 0
      public/custompages/lostpassword-dist.php
  17. 0
      public/custompages/registration-dist.php
  18. 0
      public/custompages/registration-feedback-dist.php
  19. 0
      public/custompages/url-images/README
  20. 12
      public/main/inc/global.inc.php
  21. 2
      public/main/inc/lib/api.lib.php
  22. 2
      public/main/inc/lib/diagnoser.lib.php
  23. 4
      public/main/install/configuration.dist.php
  24. 3
      public/main/install/index.php
  25. 1
      public/main/install/install.lib.php
  26. 0
      public/robots.txt

@ -40,20 +40,20 @@ $finder = PhpCsFixer\Finder::create()
->exclude('assets') ->exclude('assets')
->exclude('bin') ->exclude('bin')
->exclude('documentation') ->exclude('documentation')
->exclude('main/inc/lib/internationalization_database') ->exclude('public/main/inc/lib/internationalization_database')
->exclude('main/inc/lib/javascript') ->exclude('public/main/inc/lib/javascript')
->exclude('main/inc/lib/kses-0.2.2') ->exclude('public/main/inc/lib/kses-0.2.2')
->exclude('main/inc/lib/mimetex') ->exclude('public/main/inc/lib/mimetex')
->exclude('main/inc/lib/nusoap') ->exclude('public/main/inc/lib/nusoap')
->exclude('main/inc/lib/opengraph') ->exclude('public/main/inc/lib/opengraph')
->exclude('main/inc/lib/ppt2png') ->exclude('public/main/inc/lib/ppt2png')
->exclude('main/inc/lib/pear') ->exclude('public/main/inc/lib/pear')
->exclude('main/inc/lib/svg-edit') ->exclude('public/main/inc/lib/svg-edit')
->exclude('main/inc/lib/wami-recorder') ->exclude('public/main/inc/lib/wami-recorder')
->exclude('main/inc/lib/xajax') ->exclude('public/main/inc/lib/xajax')
->exclude('main/lp/packaging') ->exclude('public/main/lp/packaging')
->exclude('main/template') ->exclude('public/main/template')
->exclude('main/lang') ->exclude('public/main/lang')
->exclude('plugin/buycourses/src/Culqi') ->exclude('plugin/buycourses/src/Culqi')
->exclude('plugin/buycourses/src/Requests') ->exclude('plugin/buycourses/src/Requests')
->exclude('plugin/vchamilo/cli') ->exclude('plugin/vchamilo/cli')
@ -69,10 +69,10 @@ $finder = PhpCsFixer\Finder::create()
->exclude('vendor') ->exclude('vendor')
->exclude('web') ->exclude('web')
->notPath('main/admin/db.php') ->notPath('public/main/admin/db.php')
->notPath('public/check.php') ->notPath('public/check.php')
->notPath('main/admin/ldap_synchro.php') ->notPath('public/main/admin/ldap_synchro.php')
->notPath('main/chat/emoji_strategy.php') ->notPath('public/main/chat/emoji_strategy.php')
->in(__DIR__) ->in(__DIR__)
; ;

@ -64,11 +64,6 @@ Then make sure your database supports large prefixes (see [this Stack Overflow t
Load the (your-domain)/main/install/index.php URL to start the installer (which is very similar to the installer in previous versions). Load the (your-domain)/main/install/index.php URL to start the installer (which is very similar to the installer in previous versions).
If the installer is pure-HTML and doesn't appear with a clean layout, that's because you didn't follow these instructions carefully. If the installer is pure-HTML and doesn't appear with a clean layout, that's because you didn't follow these instructions carefully.
Go back to the beginning of this section and try again. Go back to the beginning of this section and try again.
Finally, if you are installing this development version in a subdirectory, you will need to add "the folder" in the ".env" file in the root folder:
```
APP_URL_APPEND=the-folder
```
## Changes from 1.x ## Changes from 1.x

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before

Width:  |  Height:  |  Size: 862 B

After

Width:  |  Height:  |  Size: 862 B

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

@ -31,7 +31,6 @@ try {
} }
$env = $_SERVER['APP_ENV'] ?? 'dev'; $env = $_SERVER['APP_ENV'] ?? 'dev';
$append = $_SERVER['APP_URL_APPEND'] ?? '';
$kernel = new Chamilo\Kernel($env, true); $kernel = new Chamilo\Kernel($env, true);
// Loading Request from Sonata. In order to use Sonata Pages Bundle. // Loading Request from Sonata. In order to use Sonata Pages Bundle.
@ -44,22 +43,11 @@ try {
// @todo fix URL loading // @todo fix URL loading
$request->setBaseUrl($request->getRequestUri()); $request->setBaseUrl($request->getRequestUri());
$kernel->boot(); $kernel->boot();
if (!empty($append)) {
if (substr($append, 0, 1) !== '/') {
echo 'APP_URL_APPEND must start with "/"';
exit;
}
$append = "$append/";
$append .= 'public';
} else {
$append .= '/public';
}
$container = $kernel->getContainer(); $container = $kernel->getContainer();
$router = $container->get('router'); $router = $container->get('router');
$context = $router->getContext(); $context = $router->getContext();
$context->setBaseUrl($append);
$router->setContext($context); $router->setContext($context);
$response = $kernel->handle($request); $response = $kernel->handle($request);
$context = Container::getRouter()->getContext(); $context = Container::getRouter()->getContext();

@ -829,7 +829,7 @@ function api_get_path($path = '', $configuration = [])
} }
$isInitialized = []; $isInitialized = [];
$root_rel = $_SERVER['APP_URL_APPEND'] ?? ''; $root_rel = '';
if (!empty($root_rel)) { if (!empty($root_rel)) {
// Adds "/" to the root_rel // Adds "/" to the root_rel

@ -127,7 +127,7 @@ class Diagnoser
{ {
global $paths; global $paths;
$list = $paths[api_get_path(WEB_PATH)]; $list = $paths[api_get_path(WEB_PATH)];
$list['url_append'] = api_get_configuration_value('url_append'); //$list['url_append'] = api_get_configuration_value('url_append');
asort($list); asort($list);
return [ return [

@ -36,10 +36,6 @@ $_configuration['db_manager_enabled'] = false;
// Path to the webroot of system, example: /var/www/ // Path to the webroot of system, example: /var/www/
$_configuration['root_sys'] = '{ROOT_SYS}'; $_configuration['root_sys'] = '{ROOT_SYS}';
// Path from your WWW-root to the root of your Chamilo installation,
// example: chamilo (this means chamilo is installed in /var/www/chamilo/
$_configuration['url_append'] = '{URL_APPEND_PATH}';
/** /**
* Hosting settings - Allows you to set limits to the Chamilo portal when * Hosting settings - Allows you to set limits to the Chamilo portal when
* hosting it for a third party. These settings can be overwritten by an * hosting it for a third party. These settings can be overwritten by an

@ -44,7 +44,6 @@ ob_implicit_flush(true);
// Defaults settings // Defaults settings
putenv('APP_LOCALE=en'); putenv('APP_LOCALE=en');
putenv('APP_URL_APPEND=""');
putenv('APP_ENCRYPT_METHOD="bcrypt"'); putenv('APP_ENCRYPT_METHOD="bcrypt"');
putenv('DATABASE_HOST='); putenv('DATABASE_HOST=');
putenv('DATABASE_PORT='); putenv('DATABASE_PORT=');
@ -572,7 +571,6 @@ if (isset($_POST['step2'])) {
'{{DATABASE_PASSWORD}}' => $dbPassForm, '{{DATABASE_PASSWORD}}' => $dbPassForm,
'{{APP_INSTALLED}}' => 1, '{{APP_INSTALLED}}' => 1,
'{{APP_ENCRYPT_METHOD}}' => $encryptPassForm, '{{APP_ENCRYPT_METHOD}}' => $encryptPassForm,
'{{APP_URL_APPEND}}' => $urlAppendPath,
'{{APP_SECRET}}' => generateRandomToken(), '{{APP_SECRET}}' => generateRandomToken(),
]; ];
@ -633,7 +631,6 @@ if (isset($_POST['step2'])) {
'{{DATABASE_PASSWORD}}' => $dbPassForm, '{{DATABASE_PASSWORD}}' => $dbPassForm,
'{{APP_INSTALLED}}' => 1, '{{APP_INSTALLED}}' => 1,
'{{APP_ENCRYPT_METHOD}}' => $encryptPassForm, '{{APP_ENCRYPT_METHOD}}' => $encryptPassForm,
'{{APP_URL_APPEND}}' => $urlAppendPath,
'{{APP_SECRET}}' => generateRandomToken(), '{{APP_SECRET}}' => generateRandomToken(),
]; ];

@ -2840,7 +2840,6 @@ function updateEnvFile($distFile, $envFile, $params)
'DATABASE_PASSWORD', 'DATABASE_PASSWORD',
'APP_INSTALLED', 'APP_INSTALLED',
'APP_ENCRYPT_METHOD', 'APP_ENCRYPT_METHOD',
'APP_URL_APPEND',
]; ];
foreach ($requirements as $requirement) { foreach ($requirements as $requirement) {

Loading…
Cancel
Save