Commit Graph

740 Commits

Author SHA1 Message Date
Sean Harvey
6369bb80de API CHANGE Removed @deprecated 2.3 GhostPage and SiteTree::MultipleParents() which used it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77383 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 06:45:32 +00:00
Sean Harvey
ed39a9e369 API CHANGE Removed @deprecated 2.3 method Varchar::Attr() on Varchar: Please use Varchar::ATT_val() instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77380 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 06:25:15 +00:00
Sean Harvey
e27f41238d API CHANGE Removed @deprecated 2.3 method DataObject::filledOut(): Please use custom code instead for checking values
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77379 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 06:22:33 +00:00
Sean Harvey
0ad370ac30 MINOR Removed user_error messages on DataObjectDecorator
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77371 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 05:53:11 +00:00
Sean Harvey
7bf69a8689 MINOR Changed @deprecated 2.3 functions to @deprecated 2.4 and throw a notice if they are used
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77370 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 05:48:46 +00:00
Sean Harvey
5e8b144318 BUGFIX #2719 Image::deleteFormattedImages() doesn't delete all formatted images properly (banal)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77276 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 23:42:40 +00:00
Sean Harvey
834c143e61 MINOR #3888 Added name to HomepageForDomain literal field in SiteTree so it can be manipulated later on (bgribaudo)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77272 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 23:16:20 +00:00
Sean Harvey
a62cf00061 BUGFIX #3777 DataObjectSet_Iterator->getOffset() shouldn't die if trying to seek past the set (mobiusnz)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77270 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 23:11:38 +00:00
Sam Minnee
83613ee0d3 ENHANCEMENT: Added databse name to output of dev/build
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77265 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 22:30:50 +00:00
Sean Harvey
08b651bd2d Merged r77256 from sapphire/branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77257 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 22:02:44 +00:00
Ingo Schommer
4e8735b10e MINOR Marked new $create_table_options API as experimental
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77170 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 04:44:33 +00:00
Ingo Schommer
336bce8bf8 ENHANCEMENT Added DataObject::$create_table_options to pass through special options to Database->requireTable(). Contains a keyed array by database driver. Example use is specifying different storage engines for MySQL: array('MySQLDatabase'=>'ENGINE=InnoDB')
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77160 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 03:55:14 +00:00
Ingo Schommer
7a18cd8bec BUGFIX Fixed quoting in Money
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77132 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 01:58:29 +00:00
Sean Harvey
5322ecc692 ENHANCEMENT SSDatetime->setValue() can now set a timestamp, consistently working the same as Date does
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77120 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 00:35:15 +00:00
Geoff Munn
a4cf64f105 Formatting fixed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77099 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-18 21:24:33 +00:00
Geoff Munn
b0a56e7d37 Enum values now include table name
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77098 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-18 21:24:02 +00:00
Ingo Schommer
2dd58c8a66 BUGFIX Added base javascript requirements to SiteTree->getCMSFields() to avoid it failing when used outside of CMS context (e.g. in our frameworktest project)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77093 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-18 20:55:10 +00:00
Sean Harvey
161e7a35c7 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77020 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-17 23:15:31 +00:00
Sean Harvey
4ded1f4930 Merged r77016 from sapphire/branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77017 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-17 22:59:48 +00:00
Sam Minnee
8d4e1dd6e0 ENHANCEMENT ajshort: Major refactoring of FileIFrameField and ImageField to use the new URL handler. Access control to the field is now controlled by the form, and ImageField now uses a codebase much more aligned with FileIFrameField.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77012 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-17 22:06:59 +00:00
Ingo Schommer
104470006e API CHANGE Deprecated Translatable::set_reading_lang(), use Translatable::set_current_locale().
MINOR Renamed internal property Translatable::$reading_lang to $current_lang

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77006 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-17 05:36:01 +00:00
Ingo Schommer
9790c4832a BUGFIX Fixed default locale setting in SiteTree_Live through Translatable->requireDefaultRecords()
BUGFIX Added translation groups for existing entries the first time Translatable is switched on through Translatable->requireDefaultRecords() (see #4051)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76866 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 21:05:48 +00:00
Ingo Schommer
1b76ac9130 MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76862 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 06:58:04 +00:00
Ingo Schommer
67180937ff API CHANGE Deprecated Translatable::current_lang(), use Translatable::get_current_locale()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76853 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 06:05:48 +00:00
Sean Harvey
b1018f5864 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76846 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 05:26:47 +00:00
Ingo Schommer
5b0ee9678f API CHANGE Deprecated Translatable->getTranslatedLangs(), use getTranslatedLocales()
ENHANCEMENT Added Translatable::$allowed_locales to limit the available locales in the CMS for page translations. Added Translatable->canTranslate() and Translatable->canEdit() to determine if a translation is allowed.
ENHANCEMENT Added $instance parameter to LanguageDropdownField to call instance-specific canTranslate() on it (optionally)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76839 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 05:16:49 +00:00
Ingo Schommer
84089a1b7d BUGFIX Increased decimal precision of Money->Amount database column to support currencies with a greater precision than 2 digits.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76743 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-13 22:21:17 +00:00
Ingo Schommer
261ab10e00 MINOR Class naming in Translatable (see #4060)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76737 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-13 21:39:32 +00:00
Ingo Schommer
4085b3e654 BUGFIX Added Money->addToQuery() to work around changes in the ORM which require database columns to be explcitly selected
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76664 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 05:29:59 +00:00
Sean Harvey
2b042be1ff MINOR Fixed merging error in SiteTree
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76662 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 05:13:32 +00:00
Sean Harvey
0a5f4de51c Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76661 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 05:12:47 +00:00
Ingo Schommer
e6ff8e283c BUGFIX Added all columns defined in Versioned extension to decorated or created SELECT statements in "*_versioned" tables. This was necessary because we're now explicitly selecting columns in the ORM, which meant Versioned was missing columns like "WasPublished". See #4050
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76647 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 04:47:56 +00:00
Ingo Schommer
d3b95a0009 BUGFIX Fixed "Translations" tab display in CMS - no more duplication of original language and translated tab - see #4020
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76613 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 02:33:59 +00:00
Sean Harvey
9ff495188f MINOR Moved protected variables brokenOnWrite and brokenOnDelete to top of DataObject for consistency
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76607 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 01:58:45 +00:00
Ingo Schommer
21c295d2e3 BUGFIX Return NULL in Versioned::get_latest_version() if no record was found (fixes #4015)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76603 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 01:55:43 +00:00
Sean Harvey
7c99e3306d ENHANCEMENT Added ability to call Image::SetRatioSize() which is a more versatile way of generating images
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76574 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-11 22:42:01 +00:00
Ingo Schommer
3fbdbd50d0 BUGFIX Closing <link type="alternate"> tags for XHTML compliance on Translatable->MetaTags(). Use ContentNegotiator to transform them back to HTML markup. See #3989
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76517 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-11 02:47:20 +00:00
Sam Minnee
b2b7481f04 ENHANCEMENT: Added Database::USE_ANSI_SQL to make it easier to write code that's compatible with both 2.3 and 2.4
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76509 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-10 23:55:38 +00:00
Sam Minnee
ed06eb37c0 BUGFIX: Created Versioned's Version field as a proper Dataobject field.
API CHANGE: DataObject's internal $this->record array doesn't import null values, so that they don't get written back out.
API CHANGE: DataObject queries explicitly list columns, rather than using *.  This means that extraneous columns won't be included.
MINOR: Updated tests for db abstraction.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76372 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 06:00:50 +00:00
Sam Minnee
32ed6da54c BUGFIX: Don't use _SortColumn syntax when randomly sorting.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76370 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 06:00:02 +00:00
Sam Minnee
f296534380 BUGFIX: Fixed SiteTree::doRestoreToStage() for db abstraction.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76369 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 05:59:24 +00:00
Sam Minnee
29afa282b9 BUGFIX: Added default values for Money's component fields, to work with more picky databases.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76368 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 05:58:10 +00:00
Sam Minnee
edf59a8667 BUGFIX: Made Hierarchy::liveChildren() db-agnostic
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76366 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 05:57:34 +00:00
Sam Minnee
f7155ff580 API CHANGE: Database::tableList() no longer returns lowercase table names
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76355 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 04:30:54 +00:00
Sam Minnee
392608b0fa ENHANCEMENT: Added db-abstraction for test database creation and removal.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76345 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 03:49:15 +00:00
Sam Minnee
e4efbcb78c BUGFIX: Removed 2nd and 3rd full-text indexes from SiteTree, because these confuse MSSQL, and are kind of a MySQL-specific hack anyway.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76344 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 03:48:47 +00:00
Ingo Schommer
0cab3bf61e MINOR Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76306 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 23:50:19 +00:00
Normann Lou
b50d564a5c BUGFIX: pass-in the params in right order when constructing of Zend_Currency in Money Constructor. Add NiceWithShortname function.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76299 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 23:32:57 +00:00
Sean Harvey
b20b6e0f95 Merged from 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76269 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 06:36:16 +00:00
Normann Lou
7a4320f339 ENHANCEMENT: set the DBField name to its scaffoldFormField id, so that we could get if from other places.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76257 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 05:50:18 +00:00
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