silverstripe/sapphire — pull request #324 by halkyon (2012-04-16 00:42:19+00:00)
Title: Fixed install not loading because of Zend/Translate.php dependency in i18n.php

Fixes for the installer.

install.php tries to load the i18n class as dependency `require_once 'Zend/Translate.php'`, however that is a relative path to the thirdparty directory in framework, and the installer doesn't include it in the include path yet, as that's a job for Core.php.

Rather than try to include i18n.php manually in the installer, this fix includes core/Core.php in the install directly, which then in turn includes all the other dependencies like i18n, and the database configuration classes. This also has the benefit of being able to remove the temp folder discovery code in the installer, and instead rely on whatever is setup in Core `getTempFolder`.

This also deprecates `getSysTempDir` and instead uses the built-in php function `get_sys_temp_dir()` which is a far more reliable way of getting the system temp dir. Because we rely on PHP 5.3+ now, we don't have to worry about patching around to find the temp dir.

There are also fixes to remove PHP notices during installation, as well as give better error messages when the CMS admin account can't be created, and `Filesystem::sync()` fails. These don't halt the execution any longer, but instead show up as "Warning: ..." messages in the steps during the installation process.