Commit Graph

690 Commits

Author SHA1 Message Date
Sean Harvey
8e62d36c5f MINOR Fixed PHP level notices
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76223 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 04:42:58 +00:00
Normann Lou
d9ea21c68e MINOR: delete debug info
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76145 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 01:07:03 +00:00
Ingo Schommer
5e8e47ef77 FEATURE Added Money class for managing monetary amounts with currencies through the Money design pattern. Uses the CompositeDBField interface to contain multiple database columns in a single DBField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76100 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-05 08:10:51 +00:00
Ingo Schommer
b4ec97506a BUGFIX Only loading value in a CompositeDBField through DataObject->getField() if either the value exists, or the record was previously saved
ENHANCEMENT Getting composite db field definitions in DataObject->hasOwnTableDatabaseField() when dealing with a CompositeDBField class

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76097 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-05 07:55:46 +00:00
Sam Minnee
3e18112b32 BUGFIX: Fix notice-level error in 'show deleted pages' function
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76096 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-05 07:24:33 +00:00
Ingo Schommer
aafaee660b BUGFIX Removing ParentType and ParentID fields in Translatable->updateCMSFields() as they are causing js problems when set to readonly. These fields should only be set on the original record anyway (at least as long as we don't have a multi-language capable TreeMultiSelectField).
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75984 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 09:01:14 +00:00
Ingo Schommer
3fcb2a336a BUGFIX Fixed TranslatableTest URLSegment detection
BUGFIX Removed URLSegment detection from Translatable->onBeforeWrite() - it was always preceeded by SiteTree->onBeforeWrite() which already alters the URL, so the appending of locale values to disambiguate the URL was pointless (never triggered)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75983 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 08:48:14 +00:00
Ingo Schommer
896b39b800 BUGFIX Fixed undefined var error in VirtualPage
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75926 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 03:42:55 +00:00
Ingo Schommer
681380424a BUGFIX Fixed empty ErrorPage types in output by setting status code in init() instead of index() and checking for "index" action - introduced in r75096 (see #3960)
BUGIFX Changed ErrorPage->publish() to doPublish->doPublish() - the publication of static HTML into the /assets directory was lagging one version behind the actual published content
BUGFIX Fixed wrong parameter in ErrorPage::get_static_filepath()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75915 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 02:20:57 +00:00
Sean Harvey
6f79d66e3a Fixed error merging
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75907 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 01:31:42 +00:00
Sean Harvey
0ccb422d27 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75904 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 01:25:09 +00:00
Sean Harvey
f4eecd4d0d Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75903 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 01:20:12 +00:00
Sean Harvey
9b75cb1987 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75845 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-01 03:49:34 +00:00
Ingo Schommer
4965352bc3 BUGFIX Limiting all SQL queries going through Translatable->augmentSQL() to the Locale of the current object (if set), otherwise falling back to default locale. This fixes lots of problems with the Versioned extension in combination with Translatable, for example showing and comparing versions in the CMS sidebar (see #3886)
BUGFIX Removing the appended querying for NULL or empty Locale values in Translatable->augmentSQL() - this should no longer be necessary as we set default locales to all records through Translatable->requireDefaultRecords()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75826 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-01 03:18:40 +00:00
Ingo Schommer
7e41cc2b8e BUGFIX Fixed ErrorPage::get_filepath_for_errorcode() to work with locale values instead of short language subtags
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75791 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 23:51:55 +00:00
Ingo Schommer
c28c90b708 MINOR Re-added Translatable->extendWithSuffix()
BUGFIX Fixed DBLocaleTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75745 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 08:39:49 +00:00
Ingo Schommer
c1c920cca0 ENHANCEMENT Added DBLocale class for Translatable extension
API CHANGE Deprecated Translatable::get_langs_by_id() - use getTranslations()
MINOR Removed Translatable::is_default_locale() - no deprecation necessary, was recently added
MINOR Removed commented out methods in Translatable: augmentNumChildrenCountQuery(), augmentAllChildrenIncludingDeleted() and augmentStageChildren()
MINOR Removed fieldsInExtraTables() and extendWithSuffix()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75742 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 07:37:09 +00:00
Ingo Schommer
f2efb12bdd MINOR Updated Translatable and i18n documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75707 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 02:51:17 +00:00
Ingo Schommer
332e231529 ENHANCEMENT Added Versioned support to Translatable::getTranslation() and getTranslations()
ENHANCEMENT Marking 2.1-style "_lang" tables obsolete in Translatable::requireDefaultRecords()
ENHANCEMENT Added override flag to Translatable::addTranslationGroups()
MINOR Disabled Translatable->TranslationMasterID - not implemented yet

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75677 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 23:18:17 +00:00
Sean Harvey
4615fd74b3 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75591 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 01:21:38 +00:00
Sean Harvey
a5e82ddff1 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75590 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 01:20:24 +00:00
Sean Harvey
13b358a8dd Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75582 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 00:07:39 +00:00
Sean Harvey
56fbe55a47 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75580 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 23:55:53 +00:00
Sean Harvey
76b5adc979 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75579 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 23:52:15 +00:00
Sean Harvey
ec9765d9f2 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75572 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 23:40:35 +00:00
Ingo Schommer
908ef4c1b7 ENHANCEMENT Auto-update locale values in Translatable->requireDefaultRecords() with default language when Translatable is first enabled
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75421 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 03:12:57 +00:00
Ingo Schommer
c07f20b9a7 MINOR Partially merged r66168 from branches/2.3 - the last merge was ignoring SiteTreeDecorator.php file which was necessary for the new googlesitemaps module compatiblity
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75380 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 01:40:24 +00:00
Ingo Schommer
a8028df67e ENHANCEMENT Added Translatable->MetaTags() to automatically insert <link rel="alternate" hreflang="...> tags into the page template
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75349 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 00:08:14 +00:00
Ingo Schommer
99c1fe9f93 BUGFIX Allowing translated homepages in RootUrlController
BUGFIX Limiting RootURLController to just trigger Translatable if no DomainForHomepage value is found
BUGFIX Using $locale parameter in Translatable::get_homepage_urlsegment_by_locale()
BUGFIX Updated enabling mechanism in Translatable->alternateGetByUrl()
MINOR Removed HTTP_HOST setting in TranslatableTest, wasn't necessary
API CHANGE Deprecated Translatable::get_homepage_urlsegment_by_language(), use get_homepage_urlsegment_by_locale()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75328 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 23:08:39 +00:00
Geoff Munn
eb86cc1b07 Re-enabled searchable fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75297 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 21:38:46 +00:00
Geoff Munn
f326047536 basic templates
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75295 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 21:37:35 +00:00
Geoff Munn
3022c7a908 Removed Database Abstraction TODO notice
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75291 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 21:35:20 +00:00
Ingo Schommer
ca24365c6f BUGFIX Fixed Translatable->onBeforeWrite() to change ClassNames on all translations when the "master page" (default language) changes its class to avoid inconsistencies with saving translations (see #3487)
BUGFIX Correctly showing the available languages dropdown in Translatable->getCMSFields()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75249 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 05:57:11 +00:00
Ingo Schommer
e55f3126fa BUGFIX Changed DataObject->newClassInstance() to only force changes if a differing classname was set. Setting ClassName property on new instance to trigger change detection (required for Translatable->onBeforeWrite())
BUGFIX Only force DataObject->forceChange() on fields which aren't already marked as changed

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75248 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 05:55:25 +00:00
Ingo Schommer
f5d578ff8c BUGFIX Setting Classname and RecordClassname properties on internal $record map when constructing a DataObject without passing $record into it. This ensures that getChangedFields() works on ClassName as well, which is required for Translatable->onBeforeWrite()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75156 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 01:36:15 +00:00
Ingo Schommer
bc14dd3b80 MINOR Fixed case of SQL commands in Database class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75155 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 01:34:23 +00:00
Ingo Schommer
bac89fd2c5 BUGFIX Setting the correct ParentID for children with existing parents in Translatable->createTranslation() - see #3861
BUGFIX Fixed Locale duplication detection for queries in Translatable->augmentSQL()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75027 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-23 04:41:49 +00:00
Sean Harvey
16293cf1d4 ENHANCEMENT DataObjectSet::groupBy() now supports use of a method name to group objects
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74996 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-23 02:37:44 +00:00
Sean Harvey
515f7b1587 ENHANCEMENT Allow calling Format() on a Time DB field type to specify the formatting type
MINOR Code formatting fixes for Date and Time classes
MINOR Added phpDoc comments to methods



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74786 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-20 22:32:13 +00:00
Mark Rickerby
1bd388ee92 fixing alteration message to output plaintext if executed via cli
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74337 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-11 05:00:41 +00:00
Geoff Munn
66ca0daa61 BUG FIX: Fulltext search fields restored
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74085 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-05 23:37:17 +00:00
Geoff Munn
03acac8e59 API CHANGE: addslashes now DB-specific
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74083 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-05 23:24:56 +00:00
Ingo Schommer
183d5e6336 API CHANGE Deprecated Translatable::choose_site_lang(), use choose_site_locale()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74070 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-03 21:23:51 +00:00
Ingo Schommer
301180d491 BUGFIX Fixed legacy handling of Translatable::enable(),Translatable::disable() and Translatable::is_enabled() - applying extension to SiteTree instead of Page to avoid datamodel clashes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74069 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-03 20:43:01 +00:00
Ingo Schommer
740dfef39e API CHANGE Removed SiteTree->LegacyURL property - it was never evaluated as a fallback in controllers anyway, and is just confusing to have without any functionality or edit interface attached to it (originally committed in r22189)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74066 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-03 17:41:10 +00:00
Ingo Schommer
033e51c280 BUGFIX Re-added Translatable->isTranslation() for more friendly deprecation (originally removed in r73338)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74065 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-03 16:38:51 +00:00
Ingo Schommer
a92413f1b7 MINOR Re-added Translatable::default_lang() for more graceful fallback to Translatable::default_locale()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74030 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-02 22:41:26 +00:00
Ingo Schommer
50fc4959a2 ENHANCEMENT Improved deprecated fallbacks in Translatable by auto-converting short language codes to long locales and vice versa through i18n::get_lang_from_locale()/i18n::get_locale_from_lang()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74017 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-02 21:49:40 +00:00
Ingo Schommer
a9a12e51d6 MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74012 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-02 17:17:04 +00:00
Ingo Schommer
e482ada014 API CHANGE Deprecated Translatable::enable() and i18n::enable()- use Object::add_extension('SiteTree','Translatable'), Deprecated Translatable::disable() and i18n::disable() - use Object::remove_extension('SiteTree','Translatable'), Deprecated Translatable::enabled() - use $myPage->hasExtension('Translatable')
API CHANGE Removed Translatable::creating_from() - doesn't apply any longer
ENHANCEMENT Translatable extension is no longer hooked up to SiteTree by default, which should improve performance and memory usage for sites not using Translatable. Please use Object::add_extension('SiteTree','Translatable') in your _config.php instead. Adjusted several classes (Image, ErrorPage, RootURLController) to the new behaviour.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73951 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-01 16:35:32 +00:00
Ingo Schommer
d2d04d950a BUGFIX Consistently returning boolean values in DataObject->hasDatabaseField()
MINOR Documentation in DataObject

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73885 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-31 19:34:37 +00:00
Ingo Schommer
697703aff8 ENHANCEMENT Added DataObjectDecorator->setOwner()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73882 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-31 19:31:21 +00:00
Ingo Schommer
9886aef57d BUGFIX Removed version number from <meta> generator tag - opt for security by obscurity in this case (originally committed in r70422 and r71172)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73836 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-30 16:34:38 +00:00
Geoff Munn
6a53df681f BUG FIX: Fulltext fields restored in SiteTree.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73659 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-25 22:56:43 +00:00
Sean Harvey
7cc578a603 BUGFIX Allow empty value passed to Database::manipulate() (merged from r61324)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73656 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-25 22:26:03 +00:00
Geoff Munn
50ca8ff01a MSSQL enabled for GW metlink
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73647 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-25 21:06:06 +00:00
Sean Harvey
6d561f3a3c removed accidental character
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73616 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-25 03:18:09 +00:00
Sean Harvey
7db4f61c6c BUGFIX Fixed undefined index notice error in Database
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73615 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-25 03:17:19 +00:00
Sean Harvey
41e2ea0629 BUGFIX Fix call to undefined "_12Hour" function
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73532 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-23 02:49:22 +00:00
Sean Harvey
b004149267 BUGFIX Check if the index_alt variable is set on the indexList() return before checking if it's an array
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73517 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-23 01:00:33 +00:00
Ingo Schommer
b12a00c391 MINOR phpdoc documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73509 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-22 22:59:14 +00:00
Sam Minnee
6b2cf2a48e BUGFIX: Fixed translatable test execution by making protected methods public
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73472 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-21 04:30:04 +00:00
Ingo Schommer
7ad7f8dcf2 ENHANCEMENT Adjusted SearchForm, Debug, ErrorPage, SiteTree to using locales instead of lang codes
API CHANGE Changed Translatable datamodel to use locales ("en_US") instead of lang values ("en).
API CHANGE Changed Translatable::$default_lang to $default_locale, Translatable::$reading_lang to $reading_locale
API CHANGE Using "locale" instead of "lang" in Translatable::choose_site_lang() to auto-detect language from cookies or GET parameters
API CHANGE Deprecated Translatable::is_default_lang(), set_default_lang(), get_default_lang(), current_lang(), set_reading_lang(), get_reading_lang(), get_by_lang(), get_one_by_lang()
API CHANGE Removed Translatable::get_original() - with the new "translation groups" concept there no longer is an original for a translation
BUGFIX Updated MigrateTranslatableTask to new Locale based datamodel

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73468 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-20 08:47:06 +00:00
Ingo Schommer
fceb53eae6 MINOR documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73464 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-20 07:51:00 +00:00
Ingo Schommer
93bb76dd10 BUGFIX Setting ParentID of translated record if recursively creating parents in Translatable::onBeforeWrite()
BUGFIX Fixing inline form action for "create translation"
BUGFIX Removed link to "original page" for a translation - no longer valid
MINOR documentation for Translatable

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73342 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-18 17:13:23 +00:00
Ingo Schommer
fef49abefa BUGFIX Disabled "untranslated" CSS class for SiteTree elements - doesn't apply any longer with the new "translation groups" concept
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73339 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-18 16:15:46 +00:00
Ingo Schommer
103c6e8d68 API CHANGE Added concept of "translation groups" to Translatable- every page can belong to a group of related translations, rather than having an explicit "original", meaning you can have pages in "non-default" languages which have no representation in other language trees. This group is recorded in a new table "<classname>_translationgroups". Translatable->createTranslation() and Translatable->onBeforeWrite() will automatically associate records in this groups. Added Translatable->addTranslationGroup(), Translatable->removeTranslationGroup(), Translatable->getTranslationGroup()
API CHANGE Removed Translatable->isTranslation() - after the new "translation group" model, every page is potentially a translation
API CHANGE Translatable->findOriginalIDs(), Translatable->setOriginalPage(), Translatable->getOriginalPage()
ENHANCEMENT Translatable->getCMSFields() will now always show the "create translation" option, not only on default languages - meaning you can create translations based on other translations
ENHANCEMENT Translatable language dropdown in CMS will always show all available languages, rather than filtering by already existing translations
ENHANCEMENT Added check for an existing record in Translatable->createTranslation()
BUGFIX Removed Translatable->getLang() which overloaded the $db property - it was causing side effects during creation of SiteTree default records.
BUGFIX Added check in Translatable->augmentSQL() to avoid reapplying "Lang = ..." filter twice
BUGFIX Removed bypass in Translatable->AllChildrenIncludingDeleted()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73338 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-18 16:13:40 +00:00
Ingo Schommer
8c2d1beb7e MINOR Merged r73298,r73299,r73301,r73304,r73318 from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73334 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-18 10:16:15 +00:00
Ingo Schommer
44d213e0b2 BUGFIX Using $allowed_actions in Image_Uploader
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73255 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 22:26:52 +00:00
Ingo Schommer
ad3d9ae29a BUGFIX Added isDev() and Permission::check() directives to DatabaseAdmin and DevelopmentAdmin
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73251 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 22:23:52 +00:00
Geoff Munn
e76d876b73 API CHANGE: Postgres support for T-search indexes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73249 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 22:22:46 +00:00
Ingo Schommer
a2f6d82379 MINOR documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73233 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 20:20:43 +00:00
Geoff Munn
ec09946ae8 BUG FIX: modifyIndex function now present (was indexOrIndexAlt())
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73231 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 19:56:11 +00:00
Ingo Schommer
68fc0bab0b MINOR Temporarily disabled broken method reference from r73214
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73229 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 12:07:18 +00:00
Geoff Munn
ac06b8dd20 API CHANGE: index logic changed for MSSQL compatibility
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73214 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 05:02:40 +00:00
Sam Minnee
41fb93b344 ENHANCEMENT #3032 ajshort: Use static methods for accessing static data
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73036 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-14 00:16:32 +00:00
Geoff Munn
ef5c9a42d5 BUG FIX: SQL queries fixed for MSSQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72983 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-12 21:48:58 +00:00
Ingo Schommer
a97ee0e97d MINOR Documentation about database indexes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72976 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-12 11:11:35 +00:00
Geoff Munn
0d1846ac59 API CHANGE: fields now detected properly upon dev/rebuild in MSSQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72965 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-12 02:43:10 +00:00
Geoff Munn
30cd13f0af BUG FIX: $basetable moved to avoid errors
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72939 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-12 00:34:32 +00:00
Geoff Munn
aaaf9cdfcd API CHANGE: queries fixed for MSSQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72929 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 23:03:28 +00:00
Geoff Munn
fc4756ddcd BUG FIX: function now() now included
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72925 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 22:24:50 +00:00
Geoff Munn
586a1888ee BUG FIX: allTablesSQL function now included
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72924 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 22:00:01 +00:00
Geoff Munn
53d551d2e6 API CHANGE: raw2sql now uses DB-specific method
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72923 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:50:26 +00:00
Geoff Munn
cac97f9d78 API CHANGE: Auto-increment of ID column now DB-specific
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72921 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:48:59 +00:00
Geoff Munn
3201b4fd79 API CHANGE: addslashes function included for MySQL database
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72920 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:48:30 +00:00
Geoff Munn
8479c88e09 API CHANGE: Versioned fixed to use DB-specific ID auto-increment settings
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72916 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:44:58 +00:00
Sam Minnee
189f0567f8 Merged from branches/2.2
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72811 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-10 22:17:26 +00:00
Sam Minnee
08a5a7c387 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72803 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-10 22:08:52 +00:00
Sean Harvey
c5d1a53281 MINOR Fixed Database class PHP notices caused by a missing array index when running dev/build to create a new table
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72750 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-10 02:02:14 +00:00
Geoff Munn
553f2e74af API CHANGE: column names escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72676 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-09 05:14:45 +00:00
Sean Harvey
87f9f13c3b BUGFIX Fixed duplicate function committed in r72468
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72673 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-09 04:54:31 +00:00
Geoff Munn
fed4d9b862 API CHANGE: Databases now support index types such as hash, btree (default) and rtree.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72468 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 21:54:33 +00:00
Sam Minnee
a581e748d9 ENHANCEMENT: Added dev/tests/cleanupdb action to remove test databases
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72463 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 07:31:23 +00:00
Andrew O'Neil
635e2c3df6 Merged from 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72453 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 03:44:11 +00:00
Geoff Munn
334cfc8f3e API CHANGE: function RequireField now explained a bit more clearly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72427 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-03 21:45:54 +00:00
Geoff Munn
6a21071e4c API CHANGE: column names escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72426 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-03 21:44:21 +00:00
Ingo Schommer
7f4f57c307 ENHANCEMENT Added i18n::get_lang_from_locale() and i18n::convert_rfc1766()
ENHANCEMENT Using IETF/HTTP compatible "long" language code in SiteTree->MetaTags(). This means the default <meta type="content-language..."> value will be "en-US" instead of "en". The locale can be either set through the Translatable content language, or through i18n::set_locale()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72367 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-02 22:13:30 +00:00
Ingo Schommer
4b4b7cca9a BUGFIX Fixed finding a translated homepage without an explicit URLSegment (e.g. http://mysite.com/?lang=de) - see #3540
ENHANCEMENT Added Translatable::get_homepage_urlsegment_by_language()
ENHANCEMENT Added RootURLController::get_default_homepage_urlsegment()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72054 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-22 21:30:41 +00:00
Geoff Munn
338bb01f1a API CHANGE: Column names escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71983 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-18 03:12:39 +00:00