jean
fbfff8df28
FIX 7934 When lazy loading fields respect version of the record
2012-11-27 17:31:45 +01:00
Ingo Schommer
15a687f1e7
Merge remote-tracking branch 'origin/3.0'
2012-11-23 15:31:08 +01:00
Ingo Schommer
aa72425e84
Fixed PHPUnit assertions for incomplete tests in core
...
Avoid PHPUnit throwing "test didn't run any assertions"
notices in PHP. If nothing else, it keeps test output
looking less broken by default, making it more likely
that actual errors do get noticed.
2012-11-23 15:16:39 +01:00
Ingo Schommer
c55c7c33f8
Merge branch '3.0'
...
Conflicts:
admin/code/CMSProfileController.php
composer.json
tests/model/DataObjectTest.php
2012-11-22 23:51:28 +01:00
Damian Mooyman
76c63fe4a4
BUG Fixed issue with SQLQuery::lastRow crashing on empty set. Added test cases for lastRow and firstRow.
...
Quoted table / column names to make test cases work in postgres
BUG Fixed issue with SQLQuery::lastRow crashing on empty set. Added test cases for lastRow and firstRow.
Quoted table / column names to make test cases work in postgres
Merge branch '3.0-sqlquery-lastrow-fix' of github.com:tractorcow/sapphire into 3.0-sqlquery-lastrow-fix
2012-11-16 13:27:51 +13:00
Andrew O'Neil
b6017a7c90
BUGFIX: ArrayList now discards keys of the array passed in and keeps the numerically indexed array sequential.
...
This fixes FirstLast and EvenOdd in templates, and makes ArrayList more consistent, as several methods already discarded the keys.
2012-11-16 09:39:01 +13:00
Sean Harvey
d038cd7a65
Removing deprecated tests
2012-11-15 14:43:15 +13:00
Sean Harvey
88366bf3c8
Adding additional test for populateDefaults() in DataObjectTest
2012-11-07 11:28:36 +13:00
Andrew O'Neil
fdea5321c7
APICHANGE: add_extension() is now called directly on the class, instead of on Object
2012-11-07 11:07:55 +13:00
Justin Martin
d24b586830
NEW: Enable multiple image manipulation back-ends on the Image class
2012-11-03 19:38:09 -07:00
Simon Welsh
123a742872
Merge pull request #920 from TheFrozenFire/feature-SSListEach
...
API: Add new method "each" to SS_List
2012-11-03 02:10:23 -07:00
Simon Welsh
5a793990d8
Merge pull request #921 from TheFrozenFire/bug-DataObjectCreated
...
BUG: DataObject::write overwrites Created on first write
2012-11-03 02:08:35 -07:00
Justin Martin
f2a709d849
BUG: DataObject::write overwrites Created on first write
2012-11-02 20:37:17 -07:00
Justin Martin
26e5afc0c4
NEW: Add new method "each" to SS_List and core implementors thereof
2012-11-02 18:21:02 -07:00
Simon Welsh
8a0f234acf
Merge pull request #870 from chillu/pulls/datalist-filterany
...
NEW DataList->filterAny()
2012-11-02 16:17:48 -07:00
Simon Welsh
bedb579b07
Merge branch '3.0'
2012-10-23 15:21:20 +13:00
Mateusz Uzdowski
8eb0fa91bd
API Add the ability to query if the schema update is in progress.
...
The specific situation where this is useful is where populateDefaults on
DataObjects needs to query the database. This will break the dev/build
when it tries to create the object via singleton - the query will not be
able to be executed if the table is not there or its schema has changed.
For an example of such use case see Translatable::populateDefaults.
2012-10-17 11:45:21 +13:00
Ingo Schommer
5be3a4c35a
NEW DataList->filterAny()
2012-10-12 15:24:25 +02:00
Simon Welsh
c49f7566c3
API Allow use of :not, :nocase and :case modifiers to SearchFilters.
...
More modifiers can be added to each class as desired.
2012-10-10 10:26:47 +13:00
Simon Welsh
2faf7d112d
API Allow using SearchFilters in DataList::exclude()
2012-10-09 14:47:22 +13:00
Ingo Schommer
fb5e488103
Line length fixes
2012-10-03 18:11:31 +02:00
Ingo Schommer
56f7ce1dcf
Merge remote-tracking branch 'origin/3.0'
...
Conflicts:
control/Cookie.php
control/Director.php
control/HTTPResponse.php
model/Database.php
model/MySQLDatabase.php
model/SQLQuery.php
view/Requirements.php
view/SSViewer.php
2012-10-03 16:16:19 +02:00
Ingo Schommer
ef81318aea
BUG Retaining join extraFields on ManyManyList->add()
2012-10-03 14:58:28 +13:00
Sam Minnee
1f7fc1f76a
FIX Remove instances of lines longer than 120c
...
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit. This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Simon Welsh
6d696d506f
API Allow subgroups in the WHERE clause of a Data/SQLQuery
...
Adds three extra methods to Data/SQLQuery query that allow for starting
a disjunctive subgroup, a conjunctive subgroup and for ending a subgroup.
Database::sqlWhereToString() now builds up the WHERE clause one by one
instead of with a straight implode. Uses a stack to know which conenctive
to use.
2012-09-21 14:59:47 +12:00
Simon Welsh
1e629f4585
Merge branch '3.0'
...
Conflicts:
control/Cookie.php
control/Director.php
dev/Profiler.php
view/Requirements.php
2012-09-21 14:56:56 +12:00
Ingo Schommer
e2f073f38a
Method visibility according to coding conventions
2012-09-20 10:46:59 +02:00
Sam Minnée
651f45e0e4
Merge pull request #782 from tractorcow/3.0-index-generation-fixes
...
FIXED: Generation of table indexes
2012-09-16 23:43:17 -07:00
Sean Harvey
9c2be0f025
Merge branch '3.0'
2012-09-17 15:16:52 +12:00
Damian Mooyman
0e997d0285
FIXED: Cleaned up test case, made sure it initialised consistently and correctly
...
ADDED: Extra assertions to test case to ensure that different expressions of the same index definition were treated as non-changes.
2012-09-14 14:55:07 +12:00
Ingo Schommer
99b1bc672b
Don't rely on hardcoded IDs in DataListTest (breaks postgres)
2012-09-12 10:51:40 +02:00
Damian Mooyman
30e15d11a7
FIXED: Generation of tables with fulltext indexes now no longer incorrectly thinks that all fulltext indexes have changed.
...
ADDED: Test cases correctly checking for changes (and no changes) to the data model for both fields and indexes.
FIXED: References to indexes throughough the code that probably should have quoted field names. This prevents a lot of 'spam' during dev build. This includes an updated FulltextSearchable test case.
2012-09-11 12:53:08 +12:00
Simon Welsh
78fdcc580b
API DataList->leftJoin()/innerJoin() args no longer escaped
...
The table name in the join was being escaped, though table
names aren't escaped anywhere else. This breaks
namespaced classes, which rely on unescaped backslashes.
2012-08-29 11:54:42 +02:00
Simon Welsh
9d2686130c
Merge cd61b61
from master
2012-08-29 11:18:41 +12:00
Sam Minnee
c2afca2cd8
Merge branch '3.0'
2012-08-28 16:08:57 +12:00
Simon Welsh
e159a68f89
FIX Removes version checking for LSB in Object::static_lookup()
...
Late static binding was added in PHP 5.3, not 5.4. As such, the check for 5.4
and then fallback to Reflection isn't needed.
2012-08-23 17:51:29 +12:00
Simon Welsh
cd61b61a84
FIX Use array_intersect() with expected values so that the order matches.
...
The values in $values aren't returned in any order, so this test can randomly fail. This
changes the check from expected = $values to $values \cap expected = $value. PHP's array_intersect
maintains the keys of the first array, so order is preserved. The intersect also guarentees that the
only accepted values are the expected ones.
2012-08-23 17:36:59 +12:00
Sam Minnee
f6334dd017
Added default sort to test data for better cross-db performance.
2012-08-23 12:38:33 +12:00
Damian Mooyman
89728acece
UPDATED: Improved get_all_versions test case to test versions in the middle of version updates.
2012-08-20 13:48:48 +12:00
Damian Mooyman
56fe7f881a
REMOVED: Unnecessary publish actions from test cases
...
ADDED: Test case for get_all_versions
2012-08-20 13:44:56 +12:00
Damian Mooyman
0f09305e3d
FIXED: Issue where temporary table would cause unpredictable behaviour. Temporary table functionality was substituted with subqueries in each use case.
...
ADDED: Test case for version archive functionality.
2012-08-20 13:24:28 +12:00
Hamish Friedlander
b7691077cf
API Prep forForeignID for immutability in 3.1 per 7673
2012-07-23 10:31:47 +12:00
Mateusz Uzdowski
70dcb55fe0
BUG Use prepStringForDB consistently across the framework.
...
Also remove a line from DBFieldTest, it's redundant with the previous
line.
Ref: os7229
2012-07-17 14:27:58 +12:00
Saophalkun Ponlu
c555256890
BUGFIX: PaginatedList::getIterator() trims the original list to the page lenght when the source list is DataList
2012-07-15 01:02:49 +12:00
Ingo Schommer
55c348d01b
Merge pull request #621 from chillu/pull/dbdatetimetest-offsets
...
Skip tests rather than throw PHP error on wrong offests in DBDatetimeTest
2012-07-06 02:34:19 -07:00
Ingo Schommer
64357a4522
Merge branch '3.0'
...
Conflicts:
admin/css/screen.css
admin/scss/_forms.scss
docs/en/changelogs/3.0.0.md
2012-07-05 18:01:09 +02:00
Ingo Schommer
664903433d
Mark DBDatetimeTest skipped on wrong offsets, rather than error out.
...
While well-intentioned, this test keeps causing problems
due to wrong timezone settings in test mode.
It shouldn't completely abort test execution,
since its more of an environment sanity check than a failed test.
Refactored to mark test skipped (regardless of offset, as long as
its greater than 5 seconds). And skipping tests altogether
on SQLite3 with new supportsTimezoneOverride() check.
SapphireTest->setUp() sets the PHP timezone to UTC (see 59547745
),
but SQLite doesn't support this for a DB connection.
Since changing it on a global UNIX system level is infeasible,
the tests need to be skipped.
2012-07-05 16:20:18 +02:00
Simon Welsh
cd0a1ff623
FIX DataQuery::applyRelation was returning the base class.
...
If the applyRelation() was passed a relation that went to a class with a parent
class with a database table, applyRelation would return the name of the parent
class, rather than the class the relation was actually too.
2012-06-29 21:54:48 +12:00
Will Rossiter
4ee709e88d
FIX: ensure limits to SQLQuery are passed as positive values
2012-06-29 19:40:28 +12:00
Sam Minnee
b654b95472
BUGFIX: Allow Versioned::get_latest_version() and Version::get_version() to return results if the classname has changed.
...
Without this bugfix, if you had a Page that used to be a SiteTree, and you tried to use Versiond::get_version() or Versioned::get_latest_version() to return the older SiteTree version, nothing would be returned, because the results were being filtered by ClassName. This caused bugs in the history panel for certain combinbations of page classname alteration.
2012-06-28 13:00:40 +12:00
Simon Welsh
070ba56104
FIX DataQuery::applyRelation was returning the base class.
...
If the applyRelation() was passed a relation that went to a class with a parent
class with a database table, applyRelation would return the name of the parent
class, rather than the class the relation was actually too.
2012-06-25 11:34:02 +12:00
Sam Minnee
fd881d6a4c
MINOR: Add test using a namespaced class for DataList::filter() and DataList::exclude()
2012-06-25 10:43:37 +12:00
Andrew Short
119da09549
BUG Fixed DataList filtering and excluding by ID.
...
If a filter or exclude by ID was applied across more than one table it
would throw an ambiguous column error as the table name was not specified.
2012-06-25 10:16:18 +12:00
Sam Minnee
4aa4cd2c28
Merge branch '3.0'
...
Conflicts:
admin/scss/ie7.scss
2012-06-22 17:20:07 +12:00
Sam Minnee
1b5768975c
BUG: exclude() clears previously selected filters() (Trac #7529 )
...
This bug was caused by the fact that SQLQuery::whereAny() removed existing filters. In line with addWhere() and setWhere(), I split this into addWhereAny() and setWhereAny(). Strictly speaking, this drops the method SQLQuery::whereAny(), but it was really just an internal function for exclude, and so I think that's acceptable.
2012-06-22 16:31:29 +12:00
Andrew Short
77d712202c
ENHANCEMENT: Add method to disable automatic limiting on PaginagedLists.
...
In some circumstances a custom generated list will already only contain
the items for the current page. The automatic limiting will then limit
the already limited list, breaking pagination. This allows you to disable
automatic limiting so all items are shown regardless of the current page.
2012-06-21 21:21:34 +02:00
Sean Harvey
b04c199064
MINOR Fixing additional cases where DataList needs to be returned correctly when filtering
2012-06-15 16:09:40 +12:00
Sam Minnee
80941ef658
MINOR: Fixed unit test to respect idempotent semantics of DataList filter() and sort().
2012-06-15 13:25:23 +12:00
Sean Harvey
e1ebb4a8eb
MINOR Fixing broken test for PostgreSQL
2012-06-12 14:54:19 +12:00
Ingo Schommer
cb8b11812c
API CHANGE Moved RestfulServer into its own module at https://github.com/silverstripe/silverstripe-restfulserver ( fixes #7282 )
2012-06-04 10:21:29 +02:00
Sean Harvey
792c89e103
ENHANCEMENT Adding List() in the GenericTemplateGlobalProvider so
...
templates can use <% cached List(Member).max(LastEdited) %> instead
of deprecated "Aggregate" syntax.
2012-05-29 20:04:51 +12:00
Sean Harvey
23a3872e34
MINOR Fixed regression in DataListTest
2012-05-28 21:17:40 +12:00
Sean Harvey
c3eabffcb9
MINOR Use shorthand {class}::get() syntax instead of DataList::create()
...
in core code.
2012-05-28 21:13:42 +12:00
Yuki Awano
c04b01fc2a
BUGFIX Changed Date.php and DateTime.php to use DateTime->Format instead of strtotime to handle extended dates on 32bit environment( fixes #7311 )
2012-05-18 16:09:38 +09:00
Sean Harvey
1859070fa9
MINOR Fixing use of deprecated getAllFields(), mark field as deprecated properly.
2012-05-11 11:23:24 +12:00
Sean Harvey
56e75b4486
MINOR Revert changes for 5.4
2012-05-10 14:11:33 +12:00
Sean Harvey
7dcfdb05fa
MINOR Fixing broken test on PHP 5.4
2012-05-10 13:40:35 +12:00
Sean Harvey
b1e17578c7
API CHANGE Removed assertType() and assertEmpty() workarounds. Use assertInstanceOf()
...
instead of assertType(), assertEmpty() is available in PHPUnit 3.5+.
PHPUnit 3.4 is no longer supported, so please upgrade your version to
work.
MINOR Removed FullTestSuite which was a workaround for PHPUnit but not
used.
2012-05-09 23:05:39 +12:00
Ingo Schommer
8281678d4c
BUGFIX Urlencode paths in URLSegmentFilter when $allowMultibyte=true to avoid creating invalid URLs (and breaking assumptions based on ascii-only URLs, such as static publishing filename creation)
2012-05-08 15:32:15 +02:00
Sean Harvey
bb9ffd2eb1
ENHANCEMENT SQLQuery::selectField() returns a SQLQuery object to be
...
consistent with how the other add/set methods work.
MINOR Fixing DbDatetimeTest to use the correct selectField to select an
alias
2012-05-07 16:59:42 +12:00
Sean Harvey
051d9de482
API CHANGE Deprecated internal access to SQLQuery properties, update core code to reflect these changes.
...
Using set/add instead in accessor methods, and use Database::sql*ToString() to allow easier per-database adapter SQL overloading.
2012-05-07 14:21:44 +12:00
Sean Harvey
a79032c57f
MINOR Fixing broken test on Windows
2012-05-04 22:48:47 +12:00
Sean Harvey
450bc258d8
MINOR Fixing broken SQLQueryTest cases
2012-05-03 13:09:50 +12:00
Sam Minnee
2207e3d978
API CHANGE: Add SQLQuery::prepareSelect(), to further remove the need for direct property access.
...
API CHANGE: Change the format of SQLQuery::$select to use aliases as keys.
2012-05-01 18:15:11 +12:00
Sam Minnee
a8e8a6060a
BUGFIX: Fixed errors caused by complex raw SQL sort() calls. ( #7236 )
2012-05-01 18:15:08 +12:00
Sam Minnee
8661164c19
API CHANGE: Add SQLQuery::clearSelect(), SQLQuery::selectField() and SQLQuery::itemisedSelect() to make it easier for other subsystems to use SQLQuery without resorting to direct property access.
...
API CHANGE: Remove DataQuery::select() in place of DataQuery::selectField().
BUGFIX: Remove direct property access to SQLQuery::$select
2012-05-01 17:57:39 +12:00
Sean Harvey
0882741f54
API CHANGE Renamed setModel for DataModel instances to setDataModel for
...
semantics, and also to allow a field name called "Model"
2012-05-01 14:45:44 +12:00
Robert Curry
ff6909df97
ENHANCEMENT: Add lazy loading to DataQuery.
2012-04-30 16:12:15 +12:00
Will Rossiter
9938b64cf6
FEATURE: implement SS_Sortable->reverse()
...
API CHANGE: SQLQuery:: now an array object rather than string. Existing strings will continue to work
2012-04-27 15:54:14 +12:00
Mateusz Uzdowski
6469d83569
API CHANGE: add a remote relation class getter to DataObject
2012-04-23 15:01:55 +12:00
Sean Harvey
a3e43171cf
MINOR Fixed broken DataExtensionTest
2012-04-20 15:41:51 +12:00
Sam Minnee
8e48e6e231
API CHANGE: Allow <classname>::get(), eg, Member::get()->byID(5)
2012-04-20 14:58:24 +12:00
Will Rossiter
585417d141
Merge pull request #343 from halkyon/object_static_remove_deprecation
...
BUGFIX Remove calls to deprecated Object static methods, update ConfigTest
2012-04-19 14:41:45 -07:00
Sean Harvey
4cf8db3ee4
ENHANCEMENT Remove use of deprecated extraStatics in core files
2012-04-19 08:37:51 +12:00
Sean Harvey
ccb941ea9d
BUGFIX Fixed places where Object::get_static() was being used. Replace
...
with Config system instead.
2012-04-18 23:55:37 +12:00
Sean Harvey
16e950cb6a
MINOR Tidy up of code formatting in TestRunner
...
MINOR Fixing up old ObjectStaticTest and merging into ConfigTest
2012-04-18 23:29:54 +12:00
Mateusz Uzdowski
be97535b1e
ENHANCEMENT: add an infinite-loop check as validation in Hierarchy (os4399)
...
Check only when the parent has changed - hierarchy traversal is
expensive operation, so we do it only when it is needed.
2012-04-18 10:50:35 +12:00
Sean Harvey
8949dfa691
ENHANCEMENT Replaced locations of sapphire with $ModulePath(framework) in templates, based off Controller which implements TemplateGlobalProvider
2012-04-15 10:50:20 +12:00
Simon Welsh
f07258f3cf
MINOR Update @package values to match renaming sapphire
2012-04-15 10:50:19 +12:00
Simon Welsh
3a6341a251
API-CHANGE sapphire folder can now be renamed.
2012-04-15 10:50:19 +12:00
Simon Welsh
f8082e4814
MINOR Add newline to end of files without one
2012-04-15 10:50:19 +12:00
Ingo Schommer
8ba9c3ca6b
API CHANGE Removed $params argument to DataObject->getCMSFields(), please use FormScaffolder directly ( fixes #7135 )
2012-04-13 15:46:47 +02:00
Sean Harvey
b52c6b4f2b
MINOR Testing extended dates (very far in the past and future) in
...
DateTest
2012-04-12 16:38:35 +12:00
Ingo Schommer
6cd91ff449
Merge pull request #299 from ajoneil/sapphire
...
---
Conflicts:
forms/NumericField.php
2012-04-11 15:36:35 +02:00
Andrew O'Neil
bdb312c665
API CHANGE: DBField::hasValue() conflicts with ViewableData::hasValue(), use DBField::exists() instead.
2012-04-11 14:48:06 +12:00
Sean Harvey
6c9a3ba9f0
MINOR Fixed failing tests on pgsql
2012-04-10 17:07:41 +12:00
Ingo Schommer
6517f4496b
Merge pull request #273 from ajoneil/sapphire
...
---
This allows DataList::create(SiteTree) as equivalent to Object::create(DataList, SiteTree), without
having to have a create() function on DataList.
Required for E_STRICT compliance, as child classes cant override create() if they change the arguments.
DBField::create() is also renamed to DBField::create_field(), as this does not just call the constructor, which all other cases of create() do.
Conflicts:
tests/model/DateTest.php
tests/model/DatetimeTest.php
2012-04-04 16:48:16 +02:00
Sean Harvey
db65704639
MINOR Removed PHP 5.2 check in DateTest
2012-04-03 09:54:55 +12:00
Sean Harvey
e097f6e1a8
MINOR Fixes to method arguments in core classes for E_STRICT support.
...
API CHANGE Remove abstract static function and just use static functions
in Authenticator (PHP 5.3+ doesn't support abstract static functions)
2012-03-28 22:41:42 +13:00
Fred Condo
5954774530
BUGFIX: Use UTC consistently across all tests for date/time calculations
...
This ensures that tests will not pass or fail based on whether the test
machine is on NZ time.
This partially reverts df050eda5d
, which has
already been merged. Instead of finding tests that use date calculations, we
are now setting the default time zone in SapphireTest so it will apply to the
whole test suite and any future tests.
Adjust expected values in certain tests for UTC, where the expected values had
previously been expressed in NZ time.
When creating a temp DB for test fixtures, create the DB connection with
timezone UTC.
2012-03-27 10:29:07 -07:00
Fred Condo
82bb12b5d3
MINOR: Explicitly declare $adapter in DbDatetimeTest
2012-03-27 10:28:10 -07:00
Andrew O'Neil
de2832e65f
ENHANCEMENT: Allow Object::create() to be called with late static binding.
...
This allows DataList::create('SiteTree') as equivalent to Object::create('DataList', 'SiteTree'), without
having to have a create() function on DataList. Required for E_STRICT compliance.
2012-03-27 17:57:42 +13:00
Sam Minnee
2576944a45
API CHANGE: Added DataObject::relField(), which pushes the "relation dot syntax" code of TableListField/GridField back to the model.
...
BUGFIX: Made DataObject::relObject() more flexible; allowable thanks to new ORM.
2012-03-24 14:04:08 +13:00
Sean Harvey
02c8019bb8
ENHANCEMENT Introduce Database::prepStringForDB(), used by
...
DBField::prepValueForDB() and StringField::prepValueForDB() to ensure
the field value is escaped correctly for the database. This means
databases like MSSQL can introduce an "N" prefix (marking text as
unicode to be saved correctly) by overloading the
prepStringForDB method. MySQL, PostgreSQL and SQLite3
operate as usual.
2012-03-20 21:20:35 +13:00
Sean Harvey
9b0009643a
MINOR Added tests for SS_Map testing value method instead of value field
2012-03-15 17:42:42 +13:00
Fred Condo
df050eda5d
BUGFIX: Correct testSetNullAndZeroValues() of DatetimeTest
...
- Code was assuming NZ time zone
- Set the default timezone to UTC for the test
- Correct the expected times for the epoch from noon to 00:00:00 UTC
2012-03-09 15:41:11 -08:00
Fred Condo
6e6890f689
Clarify failure messages to distinguish string and numeric zero tests
2012-03-09 15:41:11 -08:00
Hamish Friedlander
bc3f5ac329
BUGFIX: DataObjectTest needs its extensions to use the new static-on-object method to keep the ordering as it expects
2012-03-09 18:16:45 +13:00
Sam Minnee
a55e06f6b5
API CHANGE: Introduce SS_Limitable class for adding to SS_Lists that have limit capability.
...
API CHANGE: Deprecated SS_List::getRange() in favour of SS_Limitable::limit().
API CHANGE: Introduce SS_Limitable::limit($limit, $offset = 0) as the only modern way of specifying limits; deprecate all others.
2012-03-09 17:07:40 +13:00
Ingo Schommer
e4a6dd5850
Merge branch 'integration'
...
Conflicts:
forms/gridfield/GridField.php
2012-03-08 20:25:21 +01:00
Ingo Schommer
51bae9e4a6
ENHANCEMENT Allowing to save ManyManyList with multiple foreign keys (e.g. required to add to an overloaded Group->Members() relationship)
2012-03-06 21:38:33 +01:00
Ingo Schommer
bb6d4c506e
BUGFIX Fixed HasManyList and ManyManyList queries for relationships on new records (was returning all available records due to the SQL filtering ignoring ID=0)
2012-03-06 01:23:34 +01:00
Ingo Schommer
299bf8b9c6
Merge branch 'integration'
2012-03-02 20:53:06 +01:00
Ingo Schommer
e5c4b0a36b
ENHANCEMENT Hierarchy->Breadcrumbs()
2012-03-02 20:46:19 +01:00
Sean Harvey
58d48583a9
ENHANCEMENT Date::DayOfMonth() now supports ordinal argument, so you can get somehing like "10th" or "2nd". Also supported in Date::RangeString
2012-02-24 20:38:11 +13:00
Sean Harvey
8fdc531345
BUGFIX Ensure Date and Datetime field types actually set NULL, false, empty string values correctly instead of "1970-01-01" which gets saved to the database instead of NULL.
...
BUGFIX Datetime::Nice() and casting methods return NULL when there is no value, to be consistent with Date::Nice() and so on
2012-02-24 20:37:58 +13:00
Sean Harvey
b1acd0520d
MINOR Fixed tests using PostgreSQL as the database
2012-02-16 12:19:33 +13:00
Sean Harvey
f1a67a87de
MINOR Fixed broken test using PostgreSQL as the database
2012-02-16 12:18:36 +13:00
Fred Condo
d370423825
Clean up trailing ?> per coding standard
...
All sapphire but the lang directory
2012-02-12 12:40:16 -08:00
Sean Harvey
c5452a7d4c
MINOR Fixed broken tests in PostgreSQL
2012-02-11 14:40:39 +13:00
Sean Harvey
753bed5294
MINOR Fixed broken tests in PostgreSQL
2012-02-11 14:25:13 +13:00
Ingo Schommer
91b0c7b3ba
Merge pull request #187 from silverstripe-scienceninjas/story/datadifferencetest-fix
...
MINOR DataDifferenceTest should not test whitespace
2012-02-10 15:43:40 -08:00
Sean Harvey
591dd4efa9
BUGFIX SS_Map::keys() and SS_Map::values() are identical, keys() should return the *keys* not the values #6818
2012-02-11 11:46:20 +13:00
Stig Lindqvist
03abde46be
MINOR DataDifferenceTest should not test whitespace
2012-02-10 23:27:06 +01:00
Sam Minnee
d1a39b0b1a
BUGFIX: Fixed operation of the onlyDeletedFromStage parameter of Hierarchy::liveChildren().
2012-02-08 18:38:37 +13:00
Ingo Schommer
618d767dcb
API CHANGE Removed XML escaping in DBField->LowerCase() and UpperCase(), in order to consistently allow SSViewer to deal with casting. Affects subclasses like Text, Varchar and HTMLText.
...
API CHANGE Deprecated StringField->Lower() and Upper(), use String->LowerCase() and UpperCase() instead. Moved methods from DBField to StringField.
2012-01-31 16:11:55 +01:00
Ingo Schommer
e1e5546ab6
BUGFIX Casting return values on text helper methods in StringField, Text, Varchar
2012-01-31 16:11:55 +01:00
Stig Lindqvist
7f09b6931b
API CHANGE DataList::subtract and DataQuery::subtract for subtracting a list from another list
...
Minor Stripped out ManyManyList tests from DataListTest into it's own test case
2012-01-26 17:59:43 +13:00
Sam Minnee
d296a9411d
Merge remote-tracking branch 'refs/remotes/scienceninjas/story/sort-by-relation-on-datalist'
2012-01-10 17:33:04 +13:00
Sam Minnée
9a1644f9e1
Merge pull request #148 from ajshort/pull-2
...
Added GroupedList
2012-01-06 16:19:20 -08:00
Ingo Schommer
b5421d9598
ENHANCEMENT Allowing custom attributes in (most) FormField implementations, which allows for HTML5 data attributes
2012-01-02 16:48:14 +01:00
Sean Harvey
9e548f501e
API CHANGE FormField::Field() and FormField::FieldHolder() now render into templates on each FormField instead of creating HTML from PHP
2012-01-02 16:48:13 +01:00
ajshort
5242ed1051
FEATURE: Added GroupedList for grouping lists into sub-lists by common values of a field.
2011-12-26 19:48:53 +11:00
Stig Lindqvist
f59d11c91e
MINOR DataList::sort() can sort by relation name
2011-12-18 04:28:09 +01:00
Sam Minnee
5a157a6365
API CHANGE: Deprecate SubstringFilter in favour of PartialMatchFilter.
2011-12-17 16:42:30 +13:00
Stig Lindqvist
9bf247cc33
API CHANGE Introduced DataQuery::whereAny() and SQLQuery::whereAny()
2011-12-17 16:42:30 +13:00
Stig Lindqvist
aafdb8e01c
API CHANGE All SS_List implementators supports filter, exclude and sort methods
2011-12-17 16:42:29 +13:00
Ingo Schommer
3f28582ee8
MINOR Added URLSegmentFilterTest->testReplacements()
2011-12-17 01:13:27 +01:00
Ingo Schommer
0c3af80514
BUGFIX Better handling of multibyte strings in LimitCharacters(), removed code duplication by more flexible base implementation at StringField->LimitCharacters() (Merge pull request #121 from edlund/sapphire)
2011-12-17 00:40:13 +01:00
Ingo Schommer
a8f57be2f2
Merge pull request #118 from silverstripe/multibyte-urlsegment
...
URLSegmentFilter API (sapphire/master)
2011-12-02 02:20:59 -08:00
Ingo Schommer
9b27a4c1be
ENHANCEMENT More flexible URL filtering through new URLSegmentFilter API. Support for multibyte URL segments through URLPathFilter::$default_allow_multibyte. Abstraction from Convert::raw2url() (and SiteTree->generateURLSegment())
2011-11-29 11:04:08 +01:00
Ingo Schommer
dec86b7e6c
MINOR Using assertType() for PHPUnit 3.4 compat in DataListTest
2011-11-15 16:52:15 +01:00
Ingo Schommer
322d98306b
MINOR Whitespace
2011-11-15 16:51:17 +01:00
Fred Condo
5f1faec3e2
BUGFIX: regex-escape strings to prevent regex syntax errors
...
Apply preg_quote to each generator name and to $this->Name so that their use in a
regular expression will not cause run-time errors.
Provided fixture and test.
2011-10-31 11:34:33 -07:00
Stig Lindqvist
260a9e230c
BUGFIX Versioned returns error on singleton($className)->summaryFields()
...
This solves a bugfix when calling singleton($className)->summaryFields() and Versioned kicks back. It is needed to by the GridField functionality to get default columns to show.
This is due to DataExtension calls ClassName::extraStatics() when calling ::load_extra_statics() statically, we need to pass in class and extension.
2011-10-31 11:17:37 +13:00
Sean Harvey
016c70a6e9
MINOR Fixed broken SS_MapTest in PostgreSQL. Need to sort the IDs before asserting the DataList contents.
2011-10-30 12:50:52 +13:00
Sean Harvey
2f4b630340
MINOR Fixed broken test in PostgreSQL where assumption of IDs sorted isn't always the case
2011-10-29 23:53:24 +13:00
Sean Harvey
8f96ea7c9c
MINOR Fixed hardcoded IDs in DataListTest which fail in PostgreSQL
2011-10-29 18:27:26 +13:00
Sam Minnee
5ed14915bb
BUGFIX: Fixed DataList::find() for find by ID and find multiple times.
2011-10-29 17:36:39 +13:00
Sam Minnee
0d683dd8ef
MINOR: Removed use of deprecated join() in favour of innerJoin() and leftJoin().
2011-10-29 17:36:38 +13:00
Sam Minnee
22e5617ee2
MINOR: Moved from use of deprecated SQLMap to SS_Map.
2011-10-29 17:36:37 +13:00
Sam Minnee
c8ce6f9f55
BUGFIX: Don't create unnecessary aliases in generated SQL.
2011-10-29 17:36:37 +13:00
Sam Minnee
3e3188f81a
MINOR: Update tests for deprecated functions to explicitly disable deprecation errors.
2011-10-29 17:34:32 +13:00
Sam Minnee
a4ee0f4dad
ENHANCMEMENT: Added SS_Map to replace SQLMap.
...
API CHANGE: Deprecate SQLMap.
2011-10-29 17:34:32 +13:00
Sean Harvey
f4643e1b4a
MINOR Added double quotes around column names in AggregateTest
2011-10-29 17:28:46 +13:00
Simon Welsh
9dac9e5675
When relying on the order of returned objects, sort explicitly as it is nondeterminate for non-MySQL.
2011-10-29 15:24:06 +13:00
Simon Welsh
ca074eb7ba
Changes default MySQL storage engine to InnoDB. File requires MyISAM for FulltextSearch.
2011-10-29 13:34:45 +13:00
Stig Lindqvist
4123d2c6ab
MINOR Added more tests to the DataList to improve the coverage.
2011-10-28 16:07:19 +13:00
Ingo Schommer
c630f83344
BUGFIX Setting level in DataObject->getChangedFields() to 'value change' rather than 'type change' for CompositeFields, so they save correctly ( fixes #6726 , thanks frankmullenger)
2011-10-07 22:57:23 +02:00
Ingo Schommer
cc61551dae
MINOR Using raw SQL queries in DBDatetimeTest as SQLQuery returns false if no explicit FROM part is provided (previously working API was broken in 4171015d
)
2011-10-07 14:12:52 +02:00
Ingo Schommer
8302af1ea8
ENHANCEMENT Added Database->getLock() and Database->releaseLock() for application-level advisory locks
2011-10-07 14:12:50 +02:00
Ingo Schommer
2ec2c97766
ENHANCEMENT Allowing diffs of has_one relationship in DataDifferencer (AIR-24)
2011-10-07 14:12:48 +02:00
Ingo Schommer
007eb259e0
MINOR Added DataDifferencerTest, starting by testing array-based values (AIR-39)
2011-10-07 14:12:47 +02:00
Stig Lindqvist
8d7bfd4ffa
MINOR Fixed DataObjectTest to use ManyManyList when testing relation manipulations
2011-09-28 12:33:02 +13:00
Will Rossiter
1732a17114
Merged new-orm into datagrid
2011-09-26 16:47:54 +13:00
Ingo Schommer
ce8e72cf0e
MINOR Removing executable flag from all files (thanks miiihi)
2011-09-18 22:04:02 +02:00
Stig Lindqvist
0aeda5c924
MINOR: Fixed DateTest to work on Centos installation with another default date.timezone than Pacific/Auckland
...
Checking for PHP version and using the correct function for setting timezone
2011-08-30 00:39:44 +02:00
Ingo Schommer
908eeb4811
MINOR Fixed SQL quoting in DbDatetimeTest (broke PostgreSQL)
2011-05-31 08:18:50 +12:00
Ingo Schommer
0f7b115d33
MINOR Updated MemberDatetimeOptionsetFieldTest, i18nTest, MoneyTest to accept new default date formats caused by Zend/CLDR upgrade (from 'MM/dd/yyyy' to a less ambiguous 'MMM d, y')
2011-05-30 21:33:27 +12:00
Sam Minnee
878b348a0f
Merge branch 'master' into new-orm
...
Conflicts:
docs/en/reference/built-in-page-controls.md
model/SQLQuery.php
2011-05-26 17:08:10 +12:00
Ingo Schommer
00b1bf8ef7
MINOR Fixed DataObjectTest->testNewClassInstance() to use same ancestry classes, broken in dc367258
2011-05-20 08:38:21 +12:00
Ingo Schommer
11b409aac8
MINOR Using SQLQuery wrapper in DbDatetimeTest to provide better cross-db support, specifically correct LIMIT syntax in MSSQL (previously broken in a9b13509
)
2011-05-19 11:38:43 +12:00
ajshort
2294ef5820
API CHANGE: Deprecated DataObjectSet in favour of DataList or ArrayList.
...
MINOR: Moved DataObjectSet tests to ArrayListTest.
2011-05-06 00:52:50 +10:00
ajshort
b3fc458101
ENHANCEMENT: Made it possible to sort by multiple fields in ArrayList::sort().
2011-05-06 00:24:33 +10:00
ajshort
462689a4e6
ENHANCEMENT: Added ArrayList->removeDuplicates().
2011-05-05 20:53:07 +10:00
ajshort
99a2baf3f8
MINOR: Updated ArrayList->getRange() to return an ArrayList instance.
2011-05-05 20:41:06 +10:00
ajshort
3f132a105b
API CHANGE: Replaced DataObjectSet instances with ArrayList.
2011-05-05 20:40:24 +10:00
ajshort
9f87294427
ENHANCEMENT: Added exists(), replace(), merge(), push(), pop(), unshift() and shift() methods to ArrayList.
2011-05-05 17:48:12 +10:00
ajshort
7e7677bbba
FEATURE: Added ArrayList to allow an array of arrays or objects to be handled as a list.
2011-05-04 00:06:42 +10:00
ajshort
577be1e6fc
MINOR: Explicitly sort objects in DataListTest to prevent test failures across different DB's.
2011-05-03 21:59:51 +10:00
ajshort
c025ce7a4a
MINOR: Replaced usage of deprecated toDropdownMap() with map().
2011-05-03 13:05:27 +10:00
Sam Minnee
2f79961988
MINOR: Moved tests for DataList into DataListTest.
2011-05-01 17:12:50 +12:00
ajshort
2365bfc652
MINOR: Moved model tests into the tests/model directory.
2011-05-01 15:26:30 +12:00
ajshort
3fbb29a6c5
FEATURE: Added PaginatedList, which wraps around a data list or set to provide pagination functionality. This replaces the pagination functionality baked into DataObjectSet.
...
API CHANGE: Removed pagination related methods from DataObjectSet and implemented them on PaginatedList.
API CHANGE: Removed DataObjectSet::parseQueryLimit(), this is now implemented as PaginatedList::setPaginationFromQuery().
API CHANGE: Deprecated DataObjectSet::TotalItems in favour of Count().
ENHANCEMENT: Added FirstLink and LastLink to PaginatedList.
MINOR: Updated documentation, and added a how-to on paginating items.
2011-05-01 15:26:29 +12:00
Sam Minnee
6915e58a39
BUGFIX: Fix SQLQuery::queriedTables() and added test.
2011-05-01 15:26:29 +12:00
Sam Minnee
7efd19e7cb
BUGFIX: Fixed DataList arrayaccess.
2011-05-01 15:26:28 +12:00
Sam Minnee
3a17d5c427
API CHANGE: Add removeByID(), canSortBy(), and byID() to DataList and its subclasses.
2011-05-01 15:26:01 +12:00
Sam Minnee
c615c4eb91
ENHANCEMENT: First cut of running SearchContext through DataList/DataQuery. Note that the eventual goal is probably to ditch SearchContext entirely.
2011-05-01 15:25:58 +12:00
Sam Minnee
de1494e3a8
ENHANCEMENT: Implemented DataList as the successor of DataObjectSet. DataList doesn't execute the query until it's actually needed, allowing for a more flexible ORM.
...
API CHANGE: augmentSQL is now passed a DataQuery object from which query parameters can be extracted.
API CHANGE: DataObjectDecorators that manipulate the query can now define augmentDataQueryCreation().
API CHANGE: The container class argument for DataObject::get() is deprecated.
API CHANGE: DataObject::buildSQL() and DataObject::extendedSQL() are deprecated; just use DataObject::get() now.
API CHANGE: DataObject::instance_get() and DataObject::instance_get_one() are deprecated, and can no longer be overloaded.
API CHANGE: DataObject::buildDataObjectSet() is deprecated.
API CHANGE: Cant't call manual manipulation methods on DataList such as insertFirst()
2011-05-01 15:25:45 +12:00
Sam Minnee
5dd03ca9fb
MINOR: Added additional tests for the ORM.
2011-05-01 15:25:14 +12:00
ajshort
3a1c2df4e7
API CHANGE: Renamed DataObjectDecorator to DataExtension.
...
API CHANGE: Renamed LeftAndMainDecorator to LeftAndMainExtension.
MINOR: Replaced all references to decorators with extension.
2011-04-26 11:01:38 +10:00
Ingo Schommer
fcca1d454d
MINOR Moved TransactionTest->testReadonlyTransaction() to PostgreSQLDatabase driver, which is the only one that actually supports it. We can't have tests failing for all other databases by default for this optional feature which can't be detected through the Database API.
2011-04-06 23:18:31 +12:00
Ingo Schommer
9b29616710
API CHANGE Rearranged files in sapphire to reflect core dependencies more accurately, and have the tests/ folder mirror its folder structure
2011-03-31 09:56:21 +13:00
Ingo Schommer
2870eb9212
MINOR Changed $fixture_path to relative filenames in all sapphire test cases in order to allow easier file moving and less verbosity in tests
2011-03-30 23:04:48 +13:00
Ingo Schommer
a9b13509d2
MINOR Removed dependency on SiteTree in various unit tests
2011-03-29 18:07:58 +13:00
Ingo Schommer
d61444e976
API CHANGE Moved Translatable class into new 'translatable' module
2011-03-29 18:07:56 +13:00
Ingo Schommer
204fd2c4ce
MINOR Moved SiteTree, SiteTreeDecorator, SiteConfig, ErrorPage, RedirectorPage, VirtualPage (and related tests) to "cms" module
2011-03-29 18:07:55 +13:00
Ingo Schommer
2184acf17d
Revert "MINOR Replaced assertType() calls with assertInstanceOf(), deprecated in PHPUnit 3.6 (throws warnings as of 3.5.10)" - cased too many problems with mixed build environments that require PHP 3.4
...
This reverts commit 65f6104cd6
.
2011-03-11 15:06:09 +13:00
Ingo Schommer
0a4aa9dc17
BUGFIX Renamed MySQLDatabase->clear_cached_fieldlist() to clearCachedFieldList() and moved to parent Database class in order to avoid breaking other database drivers (broken in 360176d2
by gmunn)
2011-03-11 14:22:59 +13:00
Ingo Schommer
65f6104cd6
MINOR Replaced assertType() calls with assertInstanceOf(), deprecated in PHPUnit 3.6 (throws warnings as of 3.5.10)
2011-02-21 18:49:09 +13:00
Geoff Munn
360176d23c
MINOR: cached fieldlist array can now be cleared
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115445 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-01-12 00:10:38 +00:00
Will Rossiter
71c52f01df
EHANCEMENT: #5673 allow further manipulation on Image_Cached objects. Thanks charden!. BUGFIX: generate valid png files in ImageTest to prevent getimagesize() calls returning false results
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115202 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-20 02:19:17 +00:00
Ingo Schommer
396f297acb
API CHANGE Using i18n::validate_locale() in various Translatable methods to ensure the locale exists (as defined through i18n::$allowed_locales)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114470 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-03 00:28:24 +00:00
Sean Harvey
9ac991636e
MINOR Merged r113933,113936-113937 from branches/2.4
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114001 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-22 02:02:11 +00:00
Sam Minnee
7d09ef3e60
MINOR Change matchesRoughly threshold slightly in DbDatetimeTest to allow for slower database server connections (from r111821)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112924 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:55:50 +00:00
Sam Minnee
ffba082738
BUGFIX Fixed column names that were not quoted that broke PostgreSQL (from r110944)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112869 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:06:15 +00:00
Sam Minnee
0b2ed12c63
BUGFIX: delete orphaned records from versioned tables when updating. #5936 (from r110901)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112866 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:01:51 +00:00
Sam Minnee
97be4d2ca6
BUGFIX: Remove () that was breaking coverage report (from r109128)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112787 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:58:40 +00:00
Sam Minnee
2058ee31ee
BUGFIX: DataObjects without the Versioned decorator cannot have a "Version" field. ticket #5775 . Thanks ajshort (from r108399)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112725 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:53:19 +00:00
Sam Minnee
0e3693f99e
BUGFIX: tests now pass when the locale is set to something other than 'en_US' in the mysite's _config.php file (from r107940)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112702 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:33:41 +00:00
Ingo Schommer
b64015e2cf
BUGFIX Remove dummy entry created by Versioned if record is first written to Live stage ( fixes #5596 , thanks muzdowski) (from r107537)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112603 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:53:14 +00:00
Ingo Schommer
8ed5e18085
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 (from r107272)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112561 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:17:14 +00:00
Ingo Schommer
06ba0085dd
MINOR: Added test for Database::hasTable(). (from r106119)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112519 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:57:14 +00:00
Ingo Schommer
c7b47d8a8b
BUGFIX: Don't let deleteFromStage() kill the ID of the original record. (from r106080)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112515 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:55:45 +00:00
Ingo Schommer
4c1938fabd
MINOR Added DbDatetimeTest cases to sapphire (these were previously in the sqlite3 module, but they actually test core Database functionality) (from r105196)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112443 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 01:28:43 +00:00
Ingo Schommer
689494d55e
MINOR Fixed SiteConfigTest to work alongsite subsites module (SiteTreeSubsites changes the canEdit() behaviour) (from r104796)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112383 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 01:13:55 +00:00
Sam Minnee
cde2f6ef67
MINOR Fixed TranslatableTest for postgresql database driver (mostly ordering issues) (from r103819)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112163 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:08:52 +00:00
Sam Minnee
94158efc45
MINOR Removed mysql specific functionality from DataObjectSchemaGenerationTest and moved it to a new MySQLDatabaseTest (from r103799)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112160 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:06:50 +00:00
Sam Minnee
5fe546dbc0
MINOR Fixed TranslatableTest for postgresql database driver (mostly ordering issues) (from r103798)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112159 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:06:21 +00:00
Sam Minnee
f5fb01d11b
MINOR Fixed AggregateTest for MSSQLDatabase (wrong date formatting) (from r103640)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112156 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:01:20 +00:00
Sam Minnee
5ba7760f35
MINOR: Compiled duplicate tests
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112138 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:48:33 +00:00
Sam Minnee
0cc6d2b764
MINOR Fixed VersionedTest arguments in test case (from r102018)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112057 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:27:26 +00:00
Sam Minnee
e2d17d9b99
MINOR: Fix tests to cope with ID type cleanup changed recently (from r101970)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112051 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:23:07 +00:00
Sam Minnee
fd8e0044c4
BUGFIX Versioned->publish() with $createNewVersion=TRUE now increases version number of in-memory object ( fixes #5261 ) (from r101739)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112030 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:04:38 +00:00
Sam Minnee
51c9fa8a45
BUGFIX: tables and column quoted properly (from r101493)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112002 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 00:47:41 +00:00
Sam Minnee
0ec9d0e48f
BUGFIX: results sorted alphabetically for consistency (from r101492)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112001 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 00:47:22 +00:00
Sam Minnee
79459d72ad
BUGFIX: Ensure that Versioned works on classes with underscores in the names. (from r100905) (from r101153)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111961 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-12 21:42:45 +00:00
Sam Minnee
d19bf168b0
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 (from r101127)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111594 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:52:46 +00:00
Sam Minnee
94d98b18ac
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 ) (from r100937)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111545 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-04 04:24:01 +00:00
Julian Seidenberg
ed666b71b7
ENHANCEMENT: DataObject and SiteTree duplicate now duplicate relations (except for has_many relations, as the object at the other end of such a relation has an existing relation to the original object and that should not be modified by the duplication)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@110845 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-09-16 03:40:34 +00:00
Ingo Schommer
b632c8ff88
BUGFIX: Fix #5097 , Translatable uses augmentValidURLSegment to check that URLSegment is valid (from r99850)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105539 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 03:18:25 +00:00
Ingo Schommer
4703aa6e81
MINOR Fixed SapphireTest->logInWithPermission() spelling (from r99491)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102866 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-14 04:41:30 +00:00
Ingo Schommer
76d57b648d
MINOR Temporarily disabled nested url specific cases inTranslatableTest->testAlternateGetByLink(), unclear functionality requirements (from r99350)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102856 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-14 04:12:46 +00:00
Ingo Schommer
ffd0774839
BUGFIX: Fixed SiteTree_versions version numbers for published virtual pages. (from r98675) (from r99065)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102833 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-14 03:58:16 +00:00
Ingo Schommer
9c5303285a
BUGFIX: Generate SiteTree_version records for VirtualPages more reliably. (from r98309) (from r99052)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102828 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-14 03:54:36 +00:00
Ingo Schommer
d5f21946d2
BUGFIX: the ID should be that of untranslated child (it's the middle segment that's from translated version, not the last one) (from r98946)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102816 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-14 03:49:23 +00:00
Ingo Schommer
dc21cb9ae0
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 (from r98403)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102651 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 03:23:06 +00:00
Ingo Schommer
dad685e2e2
MINOR Testing of grand-children items in HierarchyTest::testLoadDescendantIDListIntoArray() and HierarchyTest::testNumChildren() (from r98376)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102648 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 03:21:58 +00:00
Ingo Schommer
4f84761ab4
MINOR Fixed test case name in Hierarchy (from r98370)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102645 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 03:20:46 +00:00
Ingo Schommer
761f607615
MINOR Added test case for Hierarchy::getDescendantIDList() which also tests Hierarchy::loadDescendantIDListInto() (from r98369)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102644 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 03:20:33 +00:00
Ingo Schommer
b73d75f907
MINOR Adding SiteConfig as Translatable dependency in SiteTreeTest and TranslatableTest (from r98228)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102634 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 03:17:14 +00:00
Ingo Schommer
ac5bb2b527
MINOR Cleanup test folder after SiteConfigTest::testAvailableThemes() is run (from r98127)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102601 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 02:14:47 +00:00
Ingo Schommer
21299ba686
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() (from r98110)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102597 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 02:13:12 +00:00
Ingo Schommer
1997485ba3
BUGFIX #5009 : Removed inappropriate field-detection change on multienums with no default (from r97980)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102561 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 01:46:27 +00:00
Ingo Schommer
6c0efa68de
BUGFIX Allowing translations of VirtualPage by not copying over original Locale property (see #5000 ) (from r97912)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102554 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 01:44:23 +00:00
Ingo Schommer
68fb898c6d
API CHANGE: Added cancelSchemaUpdate() and doesSchemaNeedUpdating() to the Database class (from r97827)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102538 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 23:43:10 +00:00
Ingo Schommer
f331e2e1a6
BUGFIX: Was using custom_database_fields in Aggregate, not database_fields, and so aggregates for the common fields (LastEdited, Created, ClassName) would fail (from r97414)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102489 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 21:10:21 +00:00
Ingo Schommer
956df37c2c
MINOR Fixed merge error (see r99654)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102464 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 08:38:45 +00:00
Ingo Schommer
4e850f6011
FEATURE: Add aggregate calculation to DataObject, allowing (cached) calculation of Max, Min, Count, Avg, etc (from r97390)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102448 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 05:04:34 +00:00
Ingo Schommer
1039cfade4
FEATURE Allowing translation of SiteConfig (including toplevel permission groups)
...
BUGFIX Fixed SiteConfig->canView()/canEdit() to respect empty CanViewType/CanEditType assignments. (from r97370)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102445 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 05:02:31 +00:00
Ingo Schommer
f4290d9500
MINOR: Removed unnecessary illegalExtensions data from TranslatableTest (from r96942)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102414 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 03:29:13 +00:00
Ingo Schommer
d9bd1af9ec
BUGFIX: Don't publish virtual pages on regular page publish unless the page has already been published. (from r93529) (from r96760)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102391 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 03:14:36 +00:00
Ingo Schommer
679d48c2ff
BUGFIX: Virtual pages can be deleted from the live site even when the're not publishable. (from r93319) (from r96758)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102389 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 03:13:26 +00:00
Ingo Schommer
b8246bb433
BUGFIX: Update virtual pages semantics to grab content from the published version of the source page when you publish the virtual page, and to not allow publication before their source page is published. (from r92209) (from r96748)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102377 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 02:40:09 +00:00
Ingo Schommer
848b7805e2
API CHANGE: Added Hierarchy::numHistoricalChildren() and Versioned::get_including_deleted_query()
...
API CHANGE: Added numChildrenMethod arg to getChildrenAsUL, markPartialTree, markChildren, markingFinished
BUGFIX: Clear the bypassStaticCache cookie when you return to the live site. (from r91165) (from r96739)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102365 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 02:33:46 +00:00
Ingo Schommer
e921b376bc
API CHANGE: Don't generate TestOnly DataObjects in the database immediately; instead let test developers specify them in SapphireTest::$extraDataObjects.
...
API CHANGE: Added SapphireTest::resetDBSchema() (from r90054) (from r96734)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102356 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 02:03:16 +00:00
Ingo Schommer
093da7592a
API CHANGE: Renamed SapphireTest::set_up_once/tear_down_once to setUpOnce/tearDownOnce, and made them instance methods.
...
API CHANGE: Added SapphireTest::$illegalExtensions and SapphireTest::$requiredExtensions for making tests depending on particular extension sets (from r89958) (from r96727)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102350 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 01:52:39 +00:00
Ingo Schommer
26ca64a579
MINOR Added ComponentSetTest
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@99580 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-02-22 04:37:32 +00:00
Ingo Schommer
38c71c56a3
MINOR Added flag to remaining SapphireTest subclasses
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93977 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-30 01:56:05 +00:00
Ingo Schommer
43dd296076
ENHANCEMENT Added parameter to DBLocale->Nice()
...
ENHANCEMENT Added DBLocale->getNativeName() (from r93771)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93941 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-30 00:44:46 +00:00
Ingo Schommer
b1300f7c49
ENHANCEMENT Creating filesystem node in Folder->onBeforeWrite() (moved from AssetAdmin->add())
...
ENHANCEMENT Setting default folder title in Folder->populateDefaults()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92563 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-21 02:33:33 +00:00
Ingo Schommer
5ca90fd00b
ENHANCEMENT Changed Hierarchy->numChildren() caching to be instance specific and respect flushCache(). This increases the amount of queries on large sets, but decreases the time for a single instance call (implemented in r89999)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90084 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 20:56:54 +00:00
Andrew Short
79773042be
API CHANGE: Renamed conflicting classes to have an "SS_" namespace, and renamed existing "SS" namespace to "SS_". The affected classes are: HTTPRequest, HTTPResponse, Query, Database, SSBacktrace, SSCli, SSDatetime, SSDatetimeTest, SSLog, SSLogTest, SSLogEmailWriter, SSLogErrorEmailFormatter, SSLogErrorFileFormatter, SSLogFileWriter and SSZendLog.
...
MINOR: Replaced usage of renamed classes with the new namespaced name.
From: Andrew Short <andrewjshort@gmail.com>
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 03:06:31 +00:00
Andrew O'Neil
f02e8803b1
ENHANCEMENT: Only run a single query per class for Hierarchy::numChildren()
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89999 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-22 22:18:02 +00:00
Ingo Schommer
e1a47de20e
BUGFIX Fixing regression in TranslatableTest due to outdated singleton caching.
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89911 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-22 00:30:21 +00:00
Ingo Schommer
11d5ce0274
BUGFIX Moved SINGLETON resetting for test runs from SiteTreeTest/ObjectTest into SapphireTest - there should be no caching between all test invocations to avoid side effects
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89893 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-21 23:09:14 +00:00
Sam Minnee
f792d16c01
MINOR: Ensure that tests work by giving the test executor admin rights (from r89124)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89217 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 22:41:55 +00:00
Sean Harvey
559bbfcca8
BUGFIX #4605 DataObject::newClassInstance() should repopulate it's defaults after changing to an instance of a different class, otherwise databases will complain of NULL values being written to columns that don't accept NULL values.
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88956 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-14 06:35:45 +00:00
Andrew Short
ea906a50a8
FEATURE: Implemented Translatable::get_homepage_link_by_locale() to enable translated home pages to function.
...
FEATURE: Updated SiteTree::get_by_link() to integrate with translatable, and allow it to work across languages by implementing Translatable->alternateGetByLink().
API CHANGE: Moved lang_filter enabling & disabling into static methods on Translatable, and renamed to locale_filter.
BUGFIX: Fixed viewing a translatable page by URL without explicitly setting a Locale in ContentController->handleRequest().
From: Andrew Short <andrewjshort@gmail.com>
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88503 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:22 +00:00
Andrew Short
ad7194cc40
FEATURE: Refactored RootURLController to allow nested home pages.
...
MINOR: Deprecated RootURLController::get_homepage_urlsegment() in favour of get_homepage_link().
MINOR: Updated SiteTree->RelativeLink() to return a link to the site root for the home page.
From: Andrew Short <andrewjshort@gmail.com>
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88496 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:17 +00:00
Ingo Schommer
2506816ad6
ENHANCEMENT Added Translatable->getAllowedLocalesForMember()
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88125 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 20:07:03 +00:00
Ingo Schommer
0faf03ee4e
API CHANGE Requiring TRANSLATE_ALL or TRANSLATE_<locale> permission for authors without administrative access to edit translations
...
ENHANCEMENT Added Translatable->providePermissions()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88123 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 10:33:36 +00:00
Geoff Munn
e603bb8915
MINOR: Dataobject now has enforced ordering
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87769 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-30 21:54:49 +00:00
Geoff Munn
fbe610ae13
MINOR FIX: column names escaped properly, plus ordering now on the query results
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87571 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:04:32 +00:00
Geoff Munn
84e4d7fee1
MINOR FIX: columns quoted properly
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86533 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:27:16 +00:00
Geoff Munn
7a392bd91b
MINOR FIX: columns quoted properly
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86530 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:19:32 +00:00
Sam Minnee
dfbd16e140
BUGFIX: Fixed querying of composite fields (broken due to inappropriate optimisation of hasField)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84796 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-19 04:59:40 +00:00
Ingo Schommer
26ff1f9264
MINOR Added test for SiteTree::get_by_url() in TranslatableTest
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84576 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-17 22:46:39 +00:00
Sam Minnee
5790ddf708
API CHANGE: Added DataObject::is_composite_field() and DataObject::composite_fields() to efficiently keep track of which fields are composite.
...
API CHANGE: Deprecated DataObject::databaseFields() in favour of the static DataObject::database_fields()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84161 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 08:49:52 +00:00
Ingo Schommer
f3959b038d
API CHANGE Deprecated use of SapphireTest->fixture to access YML fixtures, please use gateway methods on SapphireTest instead (e.g. $this->objFromFixture() instead of $this->fixture->objFromFixture())
...
ENHANCEMENT Allowing multiple fixtures to be defined in SapphireTest::$fixture_file through array notation.
BUGFIX Disabling DataObject validation in YamlFixture->saveIntoDatabase() instead of SapphireTest->setUp()
MINOR Adapted sapphire unit tests to deprecated $this->fixture usage
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81286 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-08 00:06:16 +00:00
Ingo Schommer
aaef41a122
MINOR renamed case sensitive SSDatetimeTest for filename to match classname
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80666 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-01 00:36:57 +00:00
Sam Minnee
e0fbc7ac83
BUGFIX: Added explicit DataObjectDecorator::load_extra_statics() calls as a workaround for issues with extensions defined directly in-object.
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79720 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-22 02:42:42 +00:00
Ingo Schommer
6fa83caae6
ENHANCEMENT Making SSDatetime mockable through SSDatetime::set_mock_now()
...
ENHANCEMENT SSDatetime::now()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79503 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-18 00:10:02 +00:00
Sam Minnee
0540bec71f
BUGFIX #4255 sharvey: Fix application of extra db fields by DataObjectDecorators.
...
API CHANGE #4255 sharvey: DataObjectDecorator::extraStatics() can no longer refer to $this because it's called staticly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79430 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 07:01:28 +00:00
Ingo Schommer
14abe5a2e2
BUGFIX Fixed TranslatableTest->testSavePageInCMS(), needed admin login to edit ViewersGroups field
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79278 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 23:49:17 +00:00
Ingo Schommer
da2291c297
MINOR Added TranslatableTest->testSavePageInCMS()
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79273 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 23:34:43 +00:00
Ingo Schommer
20ada72b4d
BUGFIX Don't remove translation groups in Translatable->onBeforeDelete() if the decorated record uses Versioned, as other representations of the record might still exist in other tables (e.g. SiteTree_Live) (see #4219 )
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79208 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 05:02:43 +00:00
Sam Minnee
b2460de140
ENHANCEMENT: Removed circular references from extensions to improve garbage collection.
...
API CHANGE: The result of any extension returned by Object::extInstance() should have setOwner() called on it before calling a method, and clearOwner() after.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78414 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-04 06:48:44 +00:00
Ingo Schommer
4d02ee68d0
MINOR Added CompositeDBFieldTest
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78237 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-02 03:45:38 +00:00
Ingo Schommer
dfa44c055c
API CHANGE Changing DataObject::$changed to private visiblity. Please use getChangedFields() and isChanged()
...
ENHANCEMENT Added DataObject->isChanged() to detect if a field has been changed in this object instance
MINOR Changing call to CompositeDBField->compositeDatabaseFields() in DataObject->hasOwnDatabaseField()
BUGFIX Unsettig "Version" property in DataObject->getChangedField() to allow versioned to write a new version after a call to forceChange()
BUGFIX Introduced $markChanged in Money class
BUGFIX Casting Money->__toString() return value as string
MINOR Changing Member class to use new DataObject->isChanged() API
BUGFIX Using new $markChanged API for CompositeDBFields in DBField::create()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77893 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-27 00:09:23 +00:00
Ingo Schommer
4d55f1e5d7
BUGFIX Fixed Money->Nice() to provide symbol and currency shortname based on Money->getCurrency()
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77754 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 06:03:06 +00:00
Saophalkun Ponlu
ce6402f8d0
ENHANCEMENT: use image file name (without file path and extension) for alt attribute when title is not provided
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77668 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-24 12:16:17 +00:00
Ingo Schommer
9f7bbc57d0
BUGFIX Inspecting the change status of all CompositeDBFields when invoking DataObject->getChangedFields(), as their value setting is not performed through DataObject->setField(), it doesn't trigger the built-in change detection.
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77667 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-23 05:32:16 +00:00
Ingo Schommer
825362bf00
MINOR Added MoneyTest->testLoadFromFixture()
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77633 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 04:45:07 +00:00
Ingo Schommer
a2a507f73c
BUGFIX Fixed Money->writeToManipulation() to correctly overwrite with NULL values
...
ENHANCEMENT Added Money->NiceWithName()
ENHANCEMENT Changed Money->NiceWithShortname() to use Zend_Currency options
BUGFIX Setting isChanged flag on Money individual setters
MINOR Added Money->__toString()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77548 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 04:46:58 +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
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
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
4c94455a4d
ENHANCEMENT Improved TranslatableTest->testCreateTranslationTranslatesUntranslatedParents() to translate two grandchildren - this used to be an issue in branches/2.3 (see #4016 )
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76594 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 00:46: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
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
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
4f90da4fa3
BUGFIX Resetting default language in TranslatableTest - this was breaking VirtualPageTest before
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75936 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 04:28: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
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
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
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
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
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
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
Ingo Schommer
228b976ce1
ENHANCEMENT Adding SapphireTest::set_up_once() and SapphireTest::tear_down_once() for better test performance with state that just needs to be initialized once per test case (not per test method). Added new SapphireTestSuite to support this through PHPUnit.
...
ENHANCEMENT Using set_up_once() in TranslatableTest and TranslatableSearchFormTest for better test run performance
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74941 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-22 03:22:09 +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
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
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
25b19f0ae4
BUGFIX Fixed Hierarchy->Children() testing in TranslatableTest - with the new datamodel you can't call Children() in a different language regardless of Translatable::set_reading_lang(), the Children() call has to be made from a parent in the same language
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73465 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-20 07:58:52 +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
30cef24822
MINOR Added DataObjectSetTest
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72361 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-02 20:26:22 +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
Ingo Schommer
54811abbd2
MINOR More Translatable unit tests
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70320 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-18 22:48:45 +00:00
Ingo Schommer
bcac495926
ENHANCEMENT Recursively creating translations for parent pages to ensure that a translated page is still accessible by traversing the tree, e.g. in "cms translation mode" (in Translatable->onBeforeWrite())
...
ENHANCEMENT Simplified AllChildrenIncludingDeleted() to not require a special augmentAllChildrenIncludingDeleted() implementation: We don't combine untranslated/translated children any longer (which was used in CMS tree view), but rather just show translated records
ENHANCEMENT Ensuring uniqueness of URL segments by appending "-<langcode>" to new translations (in Translatable->onBeforeWrite())
ENHANCEMENT Added Translatable->alternateGetByUrl() as a hook into SiteTree::get_by_url()
ENHANCEMENT Adding link back to original page in CMS editform for translations
BUGFIX Excluding HiddenField instances from Translatable->updateCMSFields()
BUGFIX Don't require a record to be written (through exists()) when checking Translatable->isTranslation() or Translatable->hasTranslation()
MINOR Don't use createMethod() shortcut for Translatable->AllChildrenIncludingDeleted()
MINOR Added Translatable unit tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70306 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-16 04:14:34 +00:00
Ingo Schommer
d5339af47c
BUGFIX Falling back to Translatable::current_lang() if no $context object is given, in augmentAllChildrenIncludingDeleted() and AllChildrenIncludingDeleted()
...
MINOR phpdoc for Translatable
MINOR Added more Translatable unit tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70214 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-15 05:56:25 +00:00
Ingo Schommer
613d13e15d
MINOR More Translatable unit tests
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70140 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-14 04:10:54 +00:00
Ingo Schommer
455ee11b5a
API CHANGE Removed obsolete Translatable::table_exists()
...
ENHANCEMENT Made Translatable constructor arguments optional, as by default all database fields are marked translatable
MINOR More unit tests for Translatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70118 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-13 22:28:24 +00:00
Ingo Schommer
080cd5c99f
ENHANCEMENT Added basic unit tests to new Translatable API
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70073 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-13 04:34:45 +00:00
Ingo Schommer
50ab6ced93
ENHANCEMENT Added TranslatableTest
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69962 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-10 12:38:50 +00:00
Ingo Schommer
117806756c
ENHANCEMENT Added Database->renameField() and Database->dontRequireField()
...
ENHANCEMENT Added DatabaseTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65494 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-09 23:56:24 +00:00