2.4.0-beta2 (2010-05-17)

Changelog

Features and Enhancements

[rev:101127] Added 'Dependent pages' tab to CMS, to show virtuals, redirectors, and backlinks that point to this page.

[rev:101054] Allowing SQLite selection in installer

[rev:101054] Moved all Javascript containedin install.php and config-form.html to install.js, and using jQuery to simplify logic

[rev:101054] Allow installer to attach custom form fields based on the install driver (as defined in _register_database.php)

[rev:100989] If no arguments specified for cli-script.php/sake, then provide a friendly message to the user on where to get help

[rev:100966] MoneyField currency dropdown can be made from an associate array like array('NZD'=>'New Zealand Dollor', 'USD'=>"United States Dollor') as well

[rev:100940] Added help text for "locale" setting in installer

[rev:100937] Redirecting to translated page when original is requested with a 'locale' GET parameter (e.g. 'about-us/?locale=de_DE' will redirect to 'ueber-uns' with a 301 HTTP response). Implemented in ContentController->handleRequest(). (see #5001)

[rev:100908] Added DatabaseAdapterRegistry::unregister() to remove a database from the registry

[rev:100902] Added _register_database.php to sapphire which sets the SS provided databases for DatabaseAdapterRegistry

[rev:99841] #5024 Installer now checks that the user has entered a username and password correctly for the default admin, an additional button for re-checking requirements is now found at the bottom of the admin configuration section

[rev:99841] Error messages for database AND admin configuration are now in the same place at the top of the installer

[rev:99737] Allow DataObjectSet to remove duplicates based on any field (#5094, thanks mobiusnz) (from r99736)

[rev:99360] New DateField and TimeField form classes with more consistent API and easier localization

[rev:99360] Using Zend_Date for DateField and TimeField, with more robust date handling, starting localization support. Set globally via i18n::set_locale(), or for a field instance through setLocale(). Note: Javascript validation is not localized yet.

API Changes

[rev:101137] Partial cache adjustments - now supports nested cache blocks (which are independant of their containing cache block), conditionals to control if a given cache block is active, and includes hash of template code in key (so template changes mean cache is invalidated). Changes template control for cache block to <% cached %>, to which the now deprecated <% cacheblock %> is aliased, and an additional template control <% uncached %> has been added.

[rev:100057] #5107 Upload now uses Upload_Validator to separate the validation rules from the File loading done in the Upload class

[rev:99849] SiteTree::validURLSegment extendable (#5907)

[rev:99360] Date/time parsing in DateField, TimeField and DatetimeField defaults to i18n::get_locale() ('en_US') instead of using en_NZ/en_GB specific parsing. Use i18n::set_locale('en_NZ') in mysite/_config.php to revert to old behaviour.

[rev:99051] Let any DataObjectDecorator define an on_db_reset() method that is called by tests, like in Versioned. (from r97734)

[rev:98786] Installer now uses a database configuration helper class which isolates the logic of checking the database away from the installer, this interface can be used by other databases like MSSQL and PostgreSQL. The installer now looks for a specific file inside each database module, provided it's configured in install.php MySQL is provided by default, as it lives in sapphire

[rev:98543] Made ComplexTableField not use Object::create() for item and popup classes to be consistent with TableListField. These can be overridden as itemClass and popupClass are public properties on ComplexTableField

[rev:98373] HTTP::setGetVar() always returns absolute URLs. Use Director::makeRelative() to make them relative again.

[rev:100932] SiteTree::getSiteConfig() should always fall back to using a default if an alternate config wasn't found

[rev:100924] Allow DatabaseAdmin to run dev/build in live mode when not Security::is_database_ready(), and avoid broken login due to broken db queries (selecting unknown columns before dev/build) (see #4957)

[rev:100921] DataObject::hasValue() is now compatible with parent ViewableData::hasValue() (this also fixes E_STRICT standards in PHP)

[rev:100919] RequestHandler::handleRequest is now compatible with Controller::handleRequest in that SS_HTTPRequest is the type hint for the $request parameter

[rev:100918] ManifestBuilder::up_children() should be declared as static as it's called statically

[rev:100861] #5157 If paths are longer than 255 characters, fopen() produces an "Invalid argument" error, shorten the paths by using basename() instead of realpath() on the manifest filename when producing the cache path in ManifestBuilder

[rev:100858] Fixed notice level error with folder ID

[rev:100854] fixed file uploading not uploading any files at all

[rev:100853] Fixed jQuery.ondemand.js script to work with prototype.js (will probably need to be merged back to trunk for legacy purposes)

[rev:100848] Fixed variable declaration order in tabstrip.js (necessary due to changed jquery.livequery behaviour

[rev:100825] Added single quote as a valid local-part of an email address as per RFC5322. Other symbols still excluded although in the spec

[rev:100795] #5157 strftime() %F format parameter does not work on Windows - use %Y-%m-%d instead

[rev:100747] #5099 FileIFrameField fails when using it with a locale different to the default

[rev:100727] allow selection of database adpater

[rev:100726] misspelled variable

[rev:100724] some sections dont have a tree at all, but they still use LeftAndMain as their base class (eg report admin). Added a guard.

[rev:100723] Fixed SapphireTest->loginWithPermission() and MemberAuthenticatorTest to use existing Members based on their unique_identifier_field (if existing) to accommodate recent Member->onBeforeWrite() changes (see r100705)

[rev:100721] Unsetting 'ID' parameter in MemberTableField->addtogroup() to avoid confusion between Group and Member records (regression from r100716) (from r100720)

[rev:100719] Fixed MemberTableField->addtogroup() to fetch existing Member records by ID or $unique_identifier_field instead of relying on the (now removed) "auto-merging" in Member->onBeforeWrite() (see r100705) (from r100716)

[rev:100717] Fixing Member_ProfileForm to validate for existing members via Member_Validator to avoid CMS users to switch to another existing user account by using their email address (from r100704)

[rev:100701] moving the ajaxupdatesort JS response code from php to js to get rid of eval. Also disable the "loading" on the moved element when we are done, in case we are repositioning other than the selected item - otherwise the progress indicator is displayed indefinitely.

[rev:100393] YamlFixture::writeDataObject() - some databases need special allowance to edit the primary key column - do so by using DB::getConn()->allowPrimaryKeyEditing()

[rev:100375] Sam's fix for "Unknown column Group.SubsiteID" with new subsites

[rev:100370] use localized prefix to compare group codes rather than hard coded english string. MINOR: updated lang file

[rev:100367] PHP 5.1 requires an array rather than a string for call_user_func()

[rev:100359] Show Language dropdown in English (#5098)

[rev:100335] #5023 AssetAdmin::sync() is now used to sync tasks, as it works when the user only has access to the AssetAdmin controller instead of going to dev/tasks/FilesystemSyncTask which can only be run by administrators or if the site is in dev mode

[rev:99647] Fixed TreeMultiselectField->Field() to respect settings, and give them priority over existing relations through getItems(). This is used in MemberTableField to set default groups for 'add member' popups. (from r98879)

[rev:99342] Enforcing creation of temp database in SapphireTest->setUp() to avoid writing to production databases. This check should only kick in for single test case runs, as the temp database connection should be set in a dev/tests/all run after the first db-related test anyway. (see #5034)

[rev:99303] Disable some permission caching for now, as it was breaking unit tests (from r98504)

[rev:98403] Fixed Hierarchy->loadDescendantIdList() to call setOwner() on the extension instance. This was necessary due to underlying Object/Extension changes in 2.4.

[rev:98382] #5044 Hierarchy::loadDescendantIDListInto() now uses Object::getExtensionInstance('Hierarchy') instead of going through __call(), as PHP 5.3 has issues converting references to values

[rev:98373] HTTP::setGetVar() uses parse_url() and http_build_query() to add query parameters to an existing URL, instead of doing its own regex-based parsing. This means existing GET parameters are correctly url encoded.

[rev:100967] Renamed SiteTree->getEditFormFields() to getCMSFields() (including new decorator hook for 'updateCMSFields'). Renamed SiteTree->getEditFormActions() to getCMSActions() (including new decorator hook for 'updateCMSActions'). Old API was never released

[rev:100965] Fixed "disabled" styling for database options in config-form.html (showed all as green when "use _ss_environment" was ticked

[rev:99347] Fixed FilesystemPublisherTest to have self-contained extension settings, and not rely on static publishing being enable in mysite/_config.php already. Fixed login permissions for doPublish() calls in test case.

[rev:99178] Moved timezone coupling in SS_Report labels into timezoneawareness module