Commit Graph

124 Commits

Author SHA1 Message Date
Ingo Schommer
1670dab5e1 API CHANGE Using i18n::validate_locale() in various Translatable methods to ensure the locale exists (as defined through i18n::$allowed_locales) (from r114470)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114474 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:03 +13:00
Andreas Piening
d01db84336 MINOR: don't trigger notice but Debug::show it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113937 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:01 +13:00
Andreas Piening
fdebd72e97 MINOR: don't trigger notice but Debug::show it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113936 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:01 +13:00
Andreas Piening
1fb51c6c5d MINOR: test doesn't fail anymore due to time differences between db and php. The test now issues notices, warnings and errors depending on the severity of the offset
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113933 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:01 +13:00
Sean Harvey
0b2e932e10 MINOR Change matchesRoughly threshold slightly in DbDatetimeTest to allow for slower database server connections
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111821 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:55 +13:00
Sean Harvey
ae89969321 BUGFIX Fixed column names that were not quoted that broke PostgreSQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110944 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Will Rossiter
f9a84974b6 BUGFIX: delete orphaned records from versioned tables when updating. #5936
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110901 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Luke Hudson
dce50511d3 BUGFIX: Remove () that was breaking coverage report
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109128 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:46 +13:00
Carlos Barberis
900d4ea23a BUGFIX: DataObjects without the Versioned decorator cannot have a "Version" field. ticket #5775. Thanks ajshort
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108399 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:41 +13:00
Julian Seidenberg
b22261f781 BUGFIX: tests now pass when the locale is set to something other than 'en_US' in the mysite's _config.php file
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107940 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:39 +13:00
Ingo Schommer
b20f1fd59d BUGFIX Remove dummy entry created by Versioned if record is first written to Live stage (fixes #5596, thanks muzdowski)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107537 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:37 +13:00
Ingo Schommer
52efe7f3f9 MINOR Changed ImageTest to use fixture files located in assets/ folder, the filesystem API doesn't support Folder objects with "sapphire/..." paths, which leads to inconsistent results
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107272 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:34 +13:00
Sam Minnee
bb8ad14651 MINOR: Added test for Database::hasTable().
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106119 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:30 +13:00
Sam Minnee
5fbc19f5be BUGFIX: Don't let deleteFromStage() kill the ID of the original record.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106080 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:30 +13:00
Sean Harvey
6ca91670f3 MINOR Fixed fixture location for DbDatetimeTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105198 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:27 +13:00
Sean Harvey
b470c565e7 MINOR Added DbDatetimeTest cases to sapphire (these were previously in the sqlite3 module, but they actually test core Database functionality)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105196 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:27 +13:00
Ingo Schommer
e9adf1d764 MINOR Fixed SiteConfigTest to work alongsite subsites module (SiteTreeSubsites changes the canEdit() behaviour)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104796 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:24 +13:00
Ingo Schommer
f8b4ebb5e9 MINOR Fixed TranslatableTest for postgresql database driver (mostly ordering issues)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103819 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:18 +13:00
Ingo Schommer
efd818f96f MINOR Removed mysql specific functionality from DataObjectSchemaGenerationTest and moved it to a new MySQLDatabaseTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103799 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:17 +13:00
Ingo Schommer
b966403a5a MINOR Fixed TranslatableTest for postgresql database driver (mostly ordering issues)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103798 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:17 +13:00
Ingo Schommer
e80b87f1c0 MINOR Fixed AggregateTest for MSSQLDatabase (wrong date formatting)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103640 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:16 +13:00
Ingo Schommer
f89cb98d2a MINOR Fixed VersionedTest arguments in test case
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@102018 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:10 +13:00
Sam Minnee
65c711cfea MINOR: Fix tests to cope with ID type cleanup changed recently
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101970 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:10 +13:00
Ingo Schommer
d41539ad22 BUGFIX Versioned->publish() with $createNewVersion=TRUE now increases version number of in-memory object (fixes #5261)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101739 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:08 +13:00
Geoff Munn
06679080d8 BUGFIX: tables and column quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101493 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:05 +13:00
Geoff Munn
f2622f7b29 BUGFIX: results sorted alphabetically for consistency
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101492 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:05 +13:00
Sam Minnee
f2bb6baa9f BUGFIX: Ensure that Versioned works on classes with underscores in the names. (from r100905)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101153 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:02 +13:00
Sam Minnee
3aad86d9be API CHANGE: Added SiteTree::VirtualPages() and SiteTree::DependentPages() accessors.
BUGFIX: Improved reliabilty of broken link tracking.
ENHANCEMENT: Added 'Dependent pages' tab to CMS, to show virtuals, redirectors, and backlinks that point to this page.
BUGFIX: Don't mark a page as changed on stage if the only thing that has changed is broken link metadata

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101127 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:02 +13:00
Ingo Schommer
c79a9d5a03 ENHANCEMENT 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)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100937 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:57 +13:00
Luke Hudson
be26cf2579 BUGFIX: Fix #5097, Translatable uses augmentValidURLSegment to check that URLSegment is valid
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99850 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:43 +13:00
Ingo Schommer
f44b9941ed MINOR Added ComponentSetTest (from r99580)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99654 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:40 +13:00
Ingo Schommer
508ead95e9 MINOR Fixed SapphireTest->logInWithPermission() spelling
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99491 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:38 +13:00
Ingo Schommer
c02956d5c7 MINOR Temporarily disabled nested url specific cases inTranslatableTest->testAlternateGetByLink(), unclear functionality requirements
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99350 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:37 +13:00
Ingo Schommer
f5424da34a BUGFIX: Fixed SiteTree_versions version numbers for published virtual pages. (from r98675)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99065 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:35 +13:00
Ingo Schommer
b05117bd68 BUGFIX: Generate SiteTree_version records for VirtualPages more reliably. (from r98309)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99052 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:35 +13:00
Mateusz Uzdowski
ec5f472139 BUGFIX: the ID should be that of untranslated child (it's the middle segment that's from translated version, not the last one)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98946 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:32 +13:00
Ingo Schommer
badd45a663 BUGFIX Fixed Hierarchy->loadDescendantIdList() to call setOwner() on the extension instance. This was necessary due to underlying Object/Extension changes in 2.4.
MINOR Fixed HierarchyTest assertions around including grand children counts

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98403 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:27 +13:00
Sean Harvey
062975d30a MINOR Testing of grand-children items in HierarchyTest::testLoadDescendantIDListIntoArray() and HierarchyTest::testNumChildren()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98376 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:26 +13:00
Sean Harvey
fd3fa79804 MINOR Fixed test case name in Hierarchy
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98370 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:26 +13:00
Sean Harvey
be919f2898 MINOR Added test case for Hierarchy::getDescendantIDList() which also tests Hierarchy::loadDescendantIDListInto()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98369 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:26 +13:00
Ingo Schommer
f31ec616a7 MINOR Adding SiteConfig as Translatable dependency in SiteTreeTest and TranslatableTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98228 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:25 +13:00
Sean Harvey
3e66a0093c MINOR Cleanup test folder after SiteConfigTest::testAvailableThemes() is run
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98127 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Sean Harvey
caff92709f ENHANCEMENT Allow user theme selection through SiteConfig, falling back to SSViewer::set_theme() as a default if there are none selected
MINOR Unit tests for SSViewer::current_theme() and SiteConfig::getAvailableThemes()


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98110 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Sam Minnee
2294d0986b BUGFIX #5009: Removed inappropriate field-detection change on multienums with no default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97980 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:18 +13:00
Ingo Schommer
662ee20141 BUGFIX Allowing translations of VirtualPage by not copying over original Locale property (see #5000)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97912 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:18 +13:00
Sam Minnee
17a5887a80 API CHANGE: Added cancelSchemaUpdate() and doesSchemaNeedUpdating() to the Database class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97827 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:17 +13:00
Hamish Friedlander
c826191897 BUGFIX: Was using custom_database_fields in Aggregate, not database_fields, and so aggregates for the common fields (LastEdited, Created, ClassName) would fail
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97414 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:12 +13:00
Hamish Friedlander
0d76dac5a1 FEATURE: Add aggregate calculation to DataObject, allowing (cached) calculation of Max, Min, Count, Avg, etc
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97390 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:11 +13:00
Ingo Schommer
3e8526960b FEATURE Allowing translation of SiteConfig (including toplevel permission groups)
BUGFIX Fixed SiteConfig->canView()/canEdit() to respect empty CanViewType/CanEditType assignments.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97370 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:11 +13:00
Sam Minnee
916be1aa2f MINOR: Removed unnecessary illegalExtensions data from TranslatableTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96942 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:08 +13:00