Commit Graph

658 Commits

Author SHA1 Message Date
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