Showing with 192 additions and 4,184 deletions.
  1. +0 −5 .tx/config
  2. +8 −1 CHANGELOG.md
  3. +7 −4 DEPRECATED.md
  4. +0 −1 UPGRADE.md
  5. +9 −28 composer.json
  6. +2 −10 phpunit.xml.dist
  7. +1 −1 src/ContaoFramework.php
  8. +0 −22 src/Controller/BackendController.php
  9. +0 −5 src/EventListener/InsecureInstallationListener.php
  10. +3 −5 src/Resources/contao/classes/Backend.php
  11. +1 −2 src/Resources/contao/config/autoload.php
  12. +1 −1 src/Resources/contao/config/constants.php
  13. +1 −2 src/Resources/contao/config/ide_compat.php
  14. +0 −969 src/Resources/contao/controllers/BackendInstall.php
  15. +0 −205 src/Resources/contao/languages/en/tl_install.xlf
  16. +5 −4 src/Resources/contao/library/Contao/Combiner.php
  17. +2 −0 src/Resources/contao/library/Contao/Config.php
  18. +0 −1 src/Resources/contao/library/Contao/Controller.php
  19. +0 −516 src/Resources/contao/library/Contao/Database/Installer.php
  20. +0 −1,028 src/Resources/contao/library/Contao/Database/Updater.php
  21. +20 −2 src/Resources/contao/library/Contao/DcaExtractor.php
  22. +1 −1 src/Resources/contao/library/Contao/Environment.php
  23. +94 −0 src/Resources/contao/library/Contao/SqlFileParser.php
  24. +3 −3 src/Resources/contao/library/Contao/String.php
  25. +0 −2 src/Resources/contao/library/Contao/System.php
  26. +2 −2 src/Resources/contao/library/Contao/Validator.php
  27. +0 −1,291 src/Resources/contao/templates/backend/be_install.html5
  28. +1 −1 src/Resources/contao/themes/flexible/install.css
  29. +11 −10 src/Resources/contao/themes/flexible/src/install.css
  30. +13 −11 tests/Contao/WidgetTest.php
  31. +0 −1 tests/ContaoFrameworkTest.php
  32. +0 −1 tests/Controller/BackendControllerTest.php
  33. +0 −16 tests/EventListener/InsecureInstallationListenerTest.php
  34. +0 −26 tests/Fixtures/library/Input.php
  35. +7 −7 tests/bootstrap.php
5 changes: 0 additions & 5 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ source_file = src/Resources/contao/languages/en/tl_image_size_item.xlf
source_lang = en
file_filter = src/Resources/contao/languages/<lang>/tl_image_size_item.xlf

[contao-core-bundle.v4_0-tl_install]
source_file = src/Resources/contao/languages/en/tl_install.xlf
source_lang = en
file_filter = src/Resources/contao/languages/<lang>/tl_install.xlf

[contao-core-bundle.v4_0-tl_layout]
source_file = src/Resources/contao/languages/en/tl_layout.xlf
source_lang = en
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
Contao change log
=================

Version 4.0.1 (2015-XX-XX)
Version 4.0.2 (2015-08-04)
--------------------------

### Fixed
Make the install tool stand-alone.


Version 4.0.1 (2015-07-24)
--------------------------

### Fixed
Expand Down
11 changes: 7 additions & 4 deletions DEPRECATED.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,14 @@ via Ajax, has been deprecated in Contao 4.0 and will be removed in Contao 5.0.
Subscribe to the "ajax_change" event instead.


### Session::setData() and Session::getData()
### Session class

The methods `Session::setData()` and `Session::getData()` have been deprecated
in Contao 4.0 and will be removed in Contao 5.0. Use the methods `replace()`
and `all()` instead.
The `Session` class has been deprecated in Contao 4.0 and will be removed in
Contao 5.0. Use the session service instead:

```php
$session = System::getContainer()->get('session');
```


### Widget::addSubmit()
Expand Down
1 change: 0 additions & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ has been set up for each one instead.
- `contao/file.php` -> `contao_backend_file`
- `contao/help.php` -> `contao_backend_help`
- `contao/index.php` -> `contao_backend_login`
- `contao/install.php` -> `contao_backend_install`
- `contao/main.php` -> `contao_backend`
- `contao/page.php` -> `contao_backend_page`
- `contao/password.php` -> `contao_backend_password`
Expand Down
37 changes: 9 additions & 28 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"symfony/finder": "~2.7",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/yaml": "~2.7",
"sensio/framework-extra-bundle": "~3.0,>=3.0.2",
"sensio/framework-extra-bundle": "^3.0.2",
"twig/twig": "~1.18",
"doctrine/doctrine-bundle": "~1.4",
"leafo/scssphp": "~0.1",
Expand All @@ -28,35 +28,17 @@
"simplepie/simplepie": "~1.3",
"tecnick.com/tcpdf": "~6.0",
"true/punycode": "~1.0",
"contao-components/ace": "^1.1.9",
"contao-components/chosen": "~1.0",
"contao-components/colorbox": "~1.5",
"contao-components/colorpicker": "~1.4",
"contao-components/compass": "~0.12",
"contao-components/contao": "^4.1.4",
"contao-components/datepicker": "~2.2",
"contao-components/dropzone": "~3.10",
"contao-components/highlight": "~8.2",
"contao-components/html5shiv": "~3.7",
"contao-components/jquery": "~1.11",
"contao-components/jquery-ui": "~1.11",
"contao-components/mediabox": "~1.4",
"contao-components/mediaelement": "~2.15",
"contao-components/mootools": "~1.5",
"contao-components/respimage": "~1.1",
"contao-components/simplemodal": "~1.2",
"contao-components/stylect": "~3.4",
"contao-components/swipe": "^2.0.3",
"contao-components/tablesort": "~3.4",
"contao-components/tablesorter": "~2.0",
"contao-components/tinymce4": "~4.1"
"contao-components/all": "~4.0"
},
"require-dev": {
"composer/composer": "~1.0",
"composer/composer": "~1.0@dev",
"fabpot/php-cs-fixer": "~1.8",
"phpunit/phpunit": "~4.5",
"symfony/phpunit-bridge": "~2.7"
},
"config": {
"component-dir": "vendor/contao-components"
},
"conflict": {
"contao/core": "*"
},
Expand All @@ -67,9 +49,8 @@
},
"extra": {
"branch-alias": {
"dev-develop": "4.1.x-dev"
"dev-develop": "4.1.x-dev",
"dev-hotfix/4.0.2": "4.0.x-dev"
}
},
"prefer-stable": true,
"minimum-stability": "dev"
}
}
12 changes: 2 additions & 10 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,11 @@
<testsuites>
<testsuite name="latest">
<directory>./tests</directory>
<exclude>./tests/Contao/EnvironmentTest.php</exclude>
<exclude>./tests/Contao/GdImageTest.php</exclude>
<exclude>./tests/Contao/ImageTest.php</exclude>
<exclude>./tests/Contao/PictureTest.php</exclude>
<exclude>./tests/Contao/WidgetTest.php</exclude>
<exclude>./tests/Contao</exclude>
<exclude>./tests/Fixtures</exclude>
</testsuite>
<testsuite name="legacy">
<file>./tests/Contao/EnvironmentTest.php</file>
<file>./tests/Contao/GdImageTest.php</file>
<file>./tests/Contao/ImageTest.php</file>
<file>./tests/Contao/PictureTest.php</file>
<file>./tests/Contao/WidgetTest.php</file>
<directory>./tests/Contao</directory>
</testsuite>
</testsuites>

Expand Down
2 changes: 1 addition & 1 deletion src/ContaoFramework.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ private function setDefaultLanguage()
*/
private function validateInstallation()
{
if (null === $this->request || 'contao_backend_install' === $this->request->attributes->get('_route')) {
if (null === $this->request) {
return;
}

Expand Down
22 changes: 0 additions & 22 deletions src/Controller/BackendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Contao\BackendFile;
use Contao\BackendHelp;
use Contao\BackendIndex;
use Contao\BackendInstall;
use Contao\BackendMain;
use Contao\BackendPage;
use Contao\BackendPassword;
Expand Down Expand Up @@ -67,27 +66,6 @@ public function loginAction()
return $controller->run();
}

/**
* Renders the install tool.
*
* @return Response
*
* @todo Make the install tool stand-alone
*
* @Route("/install", name="contao_backend_install")
*/
public function installAction()
{
$this->container->get('contao.framework')->initialize();

ob_start();

$controller = new BackendInstall();
$controller->run();

return new Response(ob_get_clean());
}

/**
* Renders the "set new password" form.
*
Expand Down
5 changes: 0 additions & 5 deletions src/EventListener/InsecureInstallationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ public function onKernelRequest(GetResponseEvent $event)
{
$request = $event->getRequest();

// Skip the check in the install tool
if ('contao_backend_install' === $request->attributes->get('_route')) {
return;
}

// Skip the check on localhost
if (in_array($request->getClientIp(), $this->localIps)) {
return;
Expand Down
8 changes: 3 additions & 5 deletions src/Resources/contao/classes/Backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,8 @@ public static function addToUrl($strRequest, $blnAddRef=true, $arrUnset=array())
*
* @throws \Exception
*/
protected function handleRunOnce()
public static function handleRunOnce()
{
$this->import('Files');

try
{
$files = \System::getContainer()->get('contao.resource_locator')->locate('config/runonce.php', null, false);
Expand All @@ -269,12 +267,12 @@ protected function handleRunOnce()

$strRelpath = str_replace(TL_ROOT . DIRECTORY_SEPARATOR, '', $file);

if (!$this->Files->delete($strRelpath))
if (!unlink($file))
{
throw new \Exception("The file $strRelpath cannot be deleted. Please remove the file manually and correct the file permission settings on your server.");
}

$this->log("File $strRelpath ran once and has then been removed successfully", __METHOD__, TL_GENERAL);
\System::log("File $strRelpath ran once and has then been removed successfully", __METHOD__, TL_GENERAL);
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/config/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,8 @@
'Contao\Combiner' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/Combiner.php',
'Contao\Config' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/Config.php',
'Contao\Controller' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php',
'Contao\Database\Installer' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Installer.php',
'Contao\Database\Result' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Result.php',
'Contao\Database\Statement' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php',
'Contao\Database\Updater' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Updater.php',
'Contao\Database' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database.php',
'Contao\Date' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/Date.php',
'Contao\Dbafs' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/Dbafs.php',
Expand Down Expand Up @@ -149,6 +147,7 @@
'Contao\Search' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/Search.php',
'Contao\Session' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/Session.php',
'Contao\SortedIterator' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/SortedIterator.php',
'Contao\SqlFileParser' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/SqlFileParser.php',
'Contao\String' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/String.php',
'Contao\StringUtil' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/StringUtil.php',
'Contao\System' => 'vendor/contao/core-bundle/src/Resources/contao/library/Contao/System.php',
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/config/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// Core version
define('VERSION', '4.0');
define('BUILD', '0');
define('BUILD', '2');
define('LONG_TERM_SUPPORT', false);

// Link constants
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/config/ide_compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ class RequestToken extends \Contao\RequestToken {}
class Search extends \Contao\Search {}
class Session extends \Contao\Session {}
class SortedIterator extends \Contao\SortedIterator {}
class SqlFileParser extends \Contao\SqlFileParser {}
class String extends \Contao\String {}
class StringUtil extends \Contao\StringUtil {}
abstract class System extends \Contao\System {}
Expand Down Expand Up @@ -214,10 +215,8 @@ class TrblField extends \Contao\TrblField {}
class Upload extends \Contao\Upload {}
}
namespace Database {
class Installer extends \Contao\Database\Installer {}
class Result extends \Contao\Database\Result {}
class Statement extends \Contao\Database\Statement {}
class Updater extends \Contao\Database\Updater {}
}
namespace Filter {
class SqlFiles extends \Contao\Filter\SqlFiles {}
Expand Down
Loading