Hamish Friedlander
2886f6ee14
FIX Session was started every time, even if no data set
...
Session tracks the user agent in the session, to add some detection of
stolen session IDs. However this was causing a session to always be
created, even if this request didnt store any data in the session.
2013-07-07 09:12:10 +12:00
Cam Spiers
0aeb2293bb
Allow module directories to be named with more valid characters ensuring that module names in fragment meta-data are correct.
...
Unit tests for ConfigManifest reference path parsing
2013-07-06 14:16:59 +12:00
Simon Welsh
4b57a343a2
Merge remote-tracking branch 'origin/3.1'
2013-07-05 11:56:31 +12:00
Simon Welsh
ff45f7ce4d
DataListTest should not rely on order of values when not explictly sorting
2013-07-05 11:45:34 +12:00
Simon Welsh
dfc8dbdee0
Merge remote-tracking branch 'origin/3.1'
2013-07-05 10:23:59 +12:00
Simon Welsh
fbce9fd7cd
Merge branch '3.1'
...
Conflicts:
.travis.yml
docs/en/misc/contributing/code.md
javascript/HtmlEditorField.js
2013-07-05 10:22:58 +12:00
Ingo Schommer
c3e9e44204
Merge pull request #2197 from hafriedlander/fix/dbapichange
...
FIX Recent patch to DataObject#db changed API which broke core
2013-07-04 15:20:52 -07:00
Simon Welsh
d844c74e3c
Merge branch '3.0' into 3.1
...
Conflicts:
.travis.yml
control/HTTP.php
email/Mailer.php
tests/control/HTTPTest.php
2013-07-05 10:17:14 +12:00
Hamish Friedlander
ca63e33c19
FIX Recent patch to DataObject#db changed API which broke core
2013-07-05 10:11:35 +12:00
Damian Mooyman
11f4b2c620
API HTTP::urlRewriter with (string)$code deprecated in 3.1. Fixed regressions and CSS urls.
...
urlRewriter will expect a callable as a second parameter,
but will work with the current api and simply raise a deprecation error.
HTTP::absoluteURLs now correctly rewrites urls into absolute urls. Resolves introduced in c56a80d6ce
HTTP::absoluteURLs now handles additional cases where urls were not translated.
Test cases for HTTP::absoluteURLs added for both css and attribute links.
Cleaned up replacement expression and improved documentation.
2013-07-05 09:08:58 +12:00
Ingo Schommer
067a94bd93
Postgres compat in MemberCsvBulkLoaderTest and GroupTest
2013-07-04 22:46:23 +02:00
Ingo Schommer
cf20923fd6
Postgres compat in SQLQueryTest
2013-07-04 22:28:13 +02:00
Hamish Friedlander
dacb2aa638
FIX HtmlEditorField not re-checking sanitisation server side
2013-07-04 08:53:23 +12:00
Jeremy Thomerson
50e9eee2e9
FIX #2174 : SearchFilter needs casting helper for DataObject base fields
...
Commit 964b3f2
fixed an issue where dbObject was returning casting helpers for
fields that were not actually DB objects, but had something in $casting config.
However, because dbObject was no longer calling DataObject->castingHelper, this
exposed a bug that the underlying function db($fieldName) was not returning
field specs for the base fields that are created by SS automatically on all
DataObjects (i.e. Created, LastEdited, etc).
This commit fixes the underlying issue that DataObject->db($fieldName) should
return the field specs for *all* DB fields like its documentation says it will,
including those base fields that are automatically created and do not appear in
$db.
2013-07-03 03:03:40 +00:00
Ingo Schommer
429bbc5223
Merge pull request #2137 from jthomerson/pulls/fix_viewable_data_wrapped_value
...
FIX: ViewableData wasn't setting values when using default cast
2013-07-02 00:40:56 -07:00
Mateusz Uzdowski
21844a8a07
Merge branch 'pr/2173' into 3.1
2013-07-02 15:52:31 +12:00
Mateusz Uzdowski
f9ede95e5b
Add configuration system tests for Only and Except combinations.
2013-07-02 15:51:53 +12:00
Hamish Friedlander
5484283a25
FIX changing environment in config.php changes matched yaml rules
2013-07-02 13:21:27 +12:00
Hamish Friedlander
e74c002647
FIX Only and Except rules in Configs not working
2013-07-01 15:47:37 +12:00
Daniel Hensby
9a40b16496
Adding tests to FormField
and Form
for extra classes
...
Added tests that were missing from `Form` and ones for my new logic
2013-06-29 13:35:34 +01:00
Ingo Schommer
a6c3d1e269
Flag "insert image" behat test as @assets
...
Required in order to run them remotely, which currently
doesn't support file upload through Selenium
2013-06-28 12:21:00 +02:00
Damian Mooyman
feb03f5443
BUG Fixed issue where time value was being parsed incorrectly in some locales
2013-06-28 16:45:33 +12:00
Simon Welsh
aecda4882b
Merge pull request #2150 from hafriedlander/fix/templatevars-v2
...
FIX Arguments to method calls reseting scope
2013-06-25 21:59:14 -07:00
Simon Welsh
e55be50783
FIX: ConfigStaticManifest not handling multipart namespaces
...
Fixes #2126
2013-06-26 16:01:55 +12:00
Hamish Friedlander
ae3e3f3b44
FIX Arguments to method calls reseting scope
2013-06-25 17:35:16 +12:00
Simon Welsh
1edf45fbed
Merge pull request #2130 from chillu/pulls/allowed_actions-deny
...
API Enforce $allowed_actions in RequestHandler->checkAccessAction()
2013-06-24 12:41:15 -07:00
Ingo Schommer
2f9eaeea41
Merge pull request #2021 from jthomerson/fix_if_link_not_working
...
FIX: <% if Link %> wasn't working
2013-06-24 06:16:21 -07:00
Ingo Schommer
fb784af738
API Enforce $allowed_actions in RequestHandler->checkAccessAction()
...
See discussion at https://groups.google.com/forum/?fromgroups#!topic/silverstripe-dev/Dodomh9QZjk
Fixes an access issue where all public methods on FormField were allowed,
and not checked for $allowed_actions. Before this patch you could e.g.
call FormField->Value() on the first field by using action_Value.
Removes the following assertion because it only worked due to RequestHandlingTest_AllowedControllerExtension
*not* having $allowed_extensions declared: "Actions on magic methods are only accessible if explicitly allowed on the controller."
2013-06-24 14:50:40 +02:00
Jeremy Thomerson
e6bfabfd6c
TEST: additional test for ViewableData not wrapping cached strings
2013-06-21 16:20:00 +00:00
CheeseSucker
761eec7736
Unit test for bugfix in ViewableData::obj().
2013-06-21 16:17:22 +00:00
Hamish Friedlander
328467f1b5
FIX: ConfirmedPasswordField used to expose existing hash
2013-06-20 14:09:30 +12:00
Ingo Schommer
2160fb8000
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
admin/javascript/LeftAndMain.js
tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php
tests/control/ControllerTest.php
2013-06-19 14:03:43 +02:00
Ingo Schommer
94b4237372
Merge remote-tracking branch 'origin/3.1'
2013-06-19 11:17:33 +02:00
Sam Minnee
526b40414a
FIX: Ensure that actions inferred from templates with the "_action" suffix also respect allowed_actions.
...
FIX: Ensure SSViewer::hasTemplate() is aware of themes.
To do this, RequestHandler::definingClassForAction() has been created, splitting out the code that looks up the class that defines a given action into its own method. This is then overridden in Controller to look at templates.
2013-06-19 20:11:50 +12:00
Ingo Schommer
1d402dd513
Unset test state in DirectorTest
...
This broke RSSFeedTest when running through 'sake'
2013-06-18 23:24:22 +02:00
Jeremy Thomerson
964b3f2d48
FIX: <% if Link %> wasn't working
...
Since ViewableData was returning a casting helper for Link, but DataObject was
only using $this->$fieldname to set values on that casting helper, you could
not use <% if Link %> (or <% if $Link %>) in your templates because Link is not
a field, and thus had no value to be set on the casting helper, causing
hasValue to think that there was no value. Since DataObject->dbObject says that
"it only matches fields and not methods", it seems safe to have it call db(..)
to get the field spec, and not call ViewableData->castingHelper at all.
2013-06-15 13:44:03 +00:00
Will Rossiter
9775204436
FIX Allow filtering on joined columns
2013-06-15 12:06:24 +12:00
Will Rossiter
0129e185b8
Coding conventions, PHPDoc cleanup
2013-06-15 12:06:24 +12:00
Damian Mooyman
be986c6524
API Allow $summary_fields to support methods on DBFields
2013-06-13 09:41:24 +12:00
Ingo Schommer
71a5615213
Test $allowed_actions on controllers with template name=action conventions
2013-06-10 12:33:30 +02:00
Stig Lindqvist
dbc2b62c69
Merge pull request #2054 from chillu/pulls/dataobject-duplicate-hasone
...
BUG Correct relation saving in DataObject->duplicateRelations()
2013-06-07 22:54:36 -07:00
Mike Parkhill
574c11a834
Behat: "Insert image from web" feature
...
Partially fixes https://github.com/silverstripe/silverstripe-cms/issues/628
Modified a bit by Ingo :)
2013-06-07 16:10:21 +02:00
Ingo Schommer
fd6060e7be
Behat: More robust "field should contain" logic
2013-06-07 16:02:29 +02:00
Ingo Schommer
924664527b
Less assumptions in "HTML field contains" step
...
Not using the loose idea of a "field name" in the NamedSelector
sense of the word as "field with id exists".
2013-06-07 15:46:05 +02:00
Ingo Schommer
7dfe5ccbd2
Limit "should see a button" to actually visible elements
2013-06-07 15:45:15 +02:00
Stig Lindqvist
17bca1db86
Behat: Adding context for 'Given I should not see a "xxx" button'
2013-06-07 12:06:01 +02:00
Ingo Schommer
ff5624c57e
BUG Fixed dropdown step definition for "preview" dropdowns
...
Broke after I optimized it to work with a TreeDropdownField
which assumes <li><a> structures that thie "preview" dropdowns
don't have. I also failed at the recursion assignment, causing
infinite loops...
2013-06-07 11:45:09 +02:00
Ingo Schommer
23e51b871b
BUG Accept $limit=0 in SQLQuery->setLimit()
...
SQLQuery->setLimit(0, 99) should result in "SELECT ... LIMIT 0 OFFSET 1".
In fact it does "SELECT ..." without a LIMIT clause at all,
which is unexpected. This is regardless of the $offset value.
2013-06-06 15:27:14 +02:00
Ingo Schommer
4603378e00
Behat: Fixed step notation
2013-06-06 15:26:50 +02:00
Ingo Schommer
7791f20f49
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php
2013-06-05 15:17:06 +02:00
Ingo Schommer
d3a4161a94
Behat: Backport improved dropdown step handler
2013-06-05 14:59:01 +02:00
Ingo Schommer
1d01347fd3
Behat: Use explicit fixtures
2013-06-05 14:32:42 +02:00
Ingo Schommer
f8b1c08c67
Behat: Copy fixture identifier to "Name" or "Title" by default
...
This makes fixture setup less verbose, particularly for behat
tests (e.g. with "Given a page 'About Us'")
2013-06-05 14:32:42 +02:00
Ingo Schommer
bb92e494d7
Behat fixture refactoring (shared factory instance)
2013-06-05 14:32:42 +02:00
Ingo Schommer
a9ed6b34cb
Behat: Support for TreeDropdownField
2013-06-05 14:32:42 +02:00
Ingo Schommer
a39adb46db
Behat: New fixture notation in "manage files" tests
2013-06-05 14:32:41 +02:00
Ingo Schommer
f61ab7305d
BUG Correct relation saving in DataObject->duplicateRelations()
...
This caused problems when duplicate() was used in the CMS UI
to duplicate a SiteTree object. Since every object of this type
has a ParentID relation, it copied this empty relation into
new "ghost page".
See https://github.com/silverstripe/silverstripe-cms/issues/689
2013-06-03 15:57:20 +02:00
Ingo Schommer
f5f2864024
Merge pull request #2046 from wilr/leftandmain_requirements
...
FIX LeftAndMain::extra_requirements to accept non associative arrays.
2013-06-02 14:35:40 -07:00
Ingo Schommer
f855c146d5
Merge remote-tracking branch 'origin/3.1'
2013-06-02 20:25:32 +02:00
Ingo Schommer
a3c406e4d2
NEW Merge i18nTextCollector with existing ( fixes #1838 )
...
This is a necessity for any further 3.1 pushes of master files to getlocalization.
Because we'd otherwise remove existing master strings for CTF etc,
which means we can no longer backport new translations to 3.0
(and there's no way for users to contribute translations to 3.0 via getlocalization).
It's still a very monolithic class, but at least I've refactored it to return
all collected strings without writing it to files (for easier testing).
2013-06-02 20:17:28 +02:00
Will Rossiter
db85f3ca16
FIX extra_requirements to accept non associative arrays.
...
Added unit tests for extra_requirements_js and extra_requirements_css.
Fixed YAML documentation to indicate list syntax.
2013-06-02 13:37:34 +12:00
Sean Harvey
f5b6c55245
Updating FileTest to use the correct shortcode format with commas
2013-06-01 11:25:10 +12:00
Ingo Schommer
82401b561d
Fixed UploadFieldTest to work with new FormField holder IDs
2013-05-31 20:35:31 +02:00
Ingo Schommer
5a1d476e8d
Merge branch 'idvalidattr' of git://github.com/wilr/sapphire into wilr-idvalidattr
2013-05-31 19:27:19 +02:00
Ingo Schommer
88536998b9
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
.travis.yml
2013-05-31 18:08:59 +02:00
Will Rossiter
5acf2aab94
Use the new form ID selectors for FormTest
2013-05-30 21:05:39 +12:00
Will Rossiter
41974b9632
MoneyTest_Subclass::$db needs to be private.
2013-05-30 21:05:03 +12:00
Loz Calver
4a158454d6
FIX: Convert newlines to <br /> tags in string fields ( fixes #1942 )
2013-05-30 09:26:58 +01:00
Fred Condo
59657d94bb
Use upper case to represent HTTP methods for forms
...
Per [RFC 2616 section 5.1.1][ietf], HTTP methods are case-sensitive.
- Change the internal representation of the form's method to upper case
- Update FormTest to accommodate the case changes
- Change method to lower case for HTML in Form#getAttributesHTML()
[ietf]: http://tools.ietf.org/html/rfc2616#section-5.1.1
2013-05-28 17:51:56 -07:00
Damian Mooyman
163917b83e
Fixed scrutiniser issues
2013-05-27 15:42:10 +12:00
Damian Mooyman
7f057ce343
API UploadField functions on new records
...
Fixed regression from 1e5d40474d
(UploadField::canPreviewFolder).
Merged in pull request #2009 - (6018bdd631
).
Merged pull request #1259 (34bfc862ee
).
2013-05-27 15:22:59 +12:00
Will Rossiter
ca87b8b794
API: Form Field ID attribute should follow HTML specification
...
Fixes: http://open.silverstripe.org/ticket/4431 .
Changes Form and Form Field classes to make use of Convert::raw2htmlid() which follows http://www.w3.org/TR/REC-html40/types.html#type-cdata .
Introduces a FormTemplateHelper class to assist in these sort of updates in the future.
2013-05-26 11:11:55 +12:00
Will Rossiter
736bde8fe5
FEATURE Add Convert::raw2htmlid()
2013-05-26 11:11:53 +12:00
Stephen Shkardoon
d6c2c2e07f
Fixes #1892 - Stop session hijacking with UA check
2013-05-25 19:29:08 +12:00
Simon Erkelens
513270ca48
API: Allow array of fields passed to FieldList::removeByName()
...
Supports passing an array to removeByName(), which is iterate and then removed. Useful for removing fields from a fieldlist that are not on a tab. Similar to removeFieldsFromTab();
This is cleaner than a new function.
2013-05-25 15:31:30 +12:00
Sam Minnée
c26ddee191
Merge pull request #1861 from raket/dataobject-update-orphan
...
Fix: Orphaned records when running DataObject::update
2013-05-24 19:48:48 -07:00
Sam Minnee
d97ca43cd0
Merge branch '3.1'
...
Conflicts:
README.md
dev/install/install.php5
forms/ConfirmedPasswordField.php
tests/forms/FormTest.php
2013-05-23 19:01:58 +12:00
Sam Minnee
738581f0f5
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
.travis.yml
2013-05-23 18:59:34 +12:00
Simon Welsh
b9d5f27194
Add code-sniffs other than line length to scrutinizer
2013-05-23 10:39:01 +12:00
Will Rossiter
5ec4f3146f
Merge pull request #1869 from wilr/open6236
...
FIX: Remove version field from default scaffolded CMS fields.
2013-05-21 03:50:55 -07:00
Will Rossiter
f6cd582dd9
FIX: Remove version field from default scaffolded CMS fields.
2013-05-21 22:47:54 +12:00
Sean Harvey
13e632d053
Merge pull request #1867 from tractorcow/3.1-urlsegmentfilter-fixes
...
BUG Fixes issue with "+" characters in url.
2013-05-20 00:36:18 -07:00
Jeremy Shipman
d21fd1f0bb
FIX: Don't rewrite urls to be absolute, if they are a URI with a protocol.
...
This is determined in this fix by the existence of a colon ':', to show the uri has a protocol.
2013-05-20 11:59:04 +12:00
Ingo Schommer
8bf2f16c75
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
README.md
2013-05-17 13:50:40 +02:00
Damian Mooyman
6e0e3564e1
NEW Added beforeExtending, afterExtending, and beforeUpdateCMSFields to allow user code better control over interaction with extending methods
2013-05-16 10:34:45 +12:00
Sam Minnee
b401d39aec
NEW: Move temp data into a user-specific subfolder, to stop temp-permission bugs from occurring.
...
Anyone who has run "sudo -u www-data ./framework/sake dev/build" knows that SilverStripe's temp
folder permissions can be very brittle. This patch resolves this by making the temp folder
user-specific.
To minimise directory pollution it first creates a chmod 777 parent folder with the same name
as the current folder. It then creates a subfolder of this with the same name as the current
user.
The positive impact of this change is that sake can be used without fear of messing up file
permissions. This means, among other things, that we can put a Composer post-update-cmd into
the installer to run dev/build. Progress!
The negative impact is that you will get two caches if you run sake as a different user. However,
that is much better than the current situation - which is a bunch of bugs - and if you're concerned
about that, you still have the option of running sake as www-data.
2013-05-15 12:54:55 +02:00
Ingo Schommer
7bf790a5fa
Merge pull request #1875 from wilr/open6473
...
FIX: If CSV column mapping maps to function, keep key values
2013-05-14 04:02:01 -07:00
Will Rossiter
c8af0fd7d1
FIX: If CSV column mapping maps to function, keep key value as key.
...
Fixes http://open.silverstripe.org/ticket/6473
When using CSVParser::$columnMapping to map columns to a callback action, it previously used the action name as the key value. This prevented users from defining multiple entries to the same callback. This patch retains those key values and simply runs the callback field name filter later on.
2013-05-14 22:00:52 +12:00
Sean Harvey
bb6283740a
Fixing broken CoreTest when using silverstripe-cache for temp folder
2013-05-13 23:39:52 +12:00
Ingo Schommer
8c02f10c03
Merge pull request #1874 from wilr/open6210
...
API: Add sync_blacklisted_patterns for configuring files to skip in sync()
2013-05-12 15:15:23 -07:00
Will Rossiter
a99dbae012
FIX: NumericField should work with numbers like 54,6
...
Fixes http://open.silverstripe.org/ticket/5577 .
Uses Zend_Locale_Format::isNumber(). Includes unit test for NumericField. Does not include testing work on DBField underlying NumericField to ensure that works consistently.
2013-05-11 22:51:39 +12:00
Will Rossiter
1a36bb628e
API: Add sync_blacklisted_patterns for configuring files to skip in sync tasks
...
Fixes http://open.silverstripe.org/ticket/6210 .
Replaces the hardcoded file patterns from Folder::syncChildren() with a new static Filesystem::$sync_blacklisted_patterns to describe files and folder names to skip when running Folder::sync().
Added unit test for Folder::sync()
Extended Folder::sync() to report on the number of file / folders skipped.
2013-05-11 16:06:14 +12:00
Ingo Schommer
d6733caf14
Merge pull request #1870 from wilr/is_https
...
API: Add Director::is_https()
2013-05-10 05:28:00 -07:00
Will Rossiter
42cf2a95bd
FIX: Add support for multi dimensional source arrays in LookupField (open/6132)
2013-05-11 00:01:39 +12:00
Will Rossiter
718108969b
API: Add ArrayLib::flatten($array, $preserveKeys)
2013-05-11 00:00:31 +12:00
Will Rossiter
1325d736a0
API: Add Director::is_https()
2013-05-10 22:31:38 +12:00
Damian Mooyman
de41a2a75e
BUG Fixes issue with '+' characters in url.
2013-05-10 16:16:31 +12:00
Jeremy Shipman
d47b202697
Restored c4eac5310e
(merge error)
...
FIX: Instead of CsvBulkLoader->findExistingRecord out right failing (i.e. no duplicate found) when the duplicate check field is empty, it will now continue on to check other duplicateCheck fields.
Added extra testing data to CSVBulkLoaderTest so that it fails.
2013-05-09 23:06:02 +02:00
Ingo Schommer
3b02d22989
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
dev/CsvBulkLoader.php
2013-05-09 10:34:20 +02:00
Sam Minnée
9672a22166
Merge pull request #1851 from chillu/pulls/form-strict-method-check
...
Form strict method check
2013-05-08 22:31:40 -07:00
Marcus Dalgren
7f871fa18b
Fix orphaned records when running update
...
When DataObject::update() is run with relation fields and the relationship
is new the relationship ID was not set on the DataObject. This patch fixes
this. Fixes issue 6195 in open.silverstripe.org.
2013-05-09 03:53:53 +02:00
Ingo Schommer
5d9cbae949
Merge pull request #1819 from oddnoc/csvbulkloader-findexisting-3.1
...
Use the correct variable as the key into $record
2013-05-08 04:23:05 -07:00
Ingo Schommer
14c59be85e
API Form::setStrictFormMethodCheck() and strict argument to setFormMethod()
...
Thanks to @sminnee for getting this started
2013-05-08 10:25:13 +02:00
Ingo Schommer
1a52a51195
DataObject->duplicate() test
...
Advanced relationship copying is already tested further down,
but doesn't cover the same basics. Triggered by a CMS bug
which turned out to be unrelated (https://github.com/silverstripe/silverstripe-cms/issues/689 )
2013-05-07 10:06:15 +02:00
Sean Harvey
677122256e
Merge pull request #1837 from simonwelsh/short-array-parse
...
FIX Handle PHP 5.4's short array notation everywhere arrays are parsed.
2013-05-06 20:32:51 -07:00
Sean Harvey
f1a4e7203e
BUG Fixing queries on non-existent table breaking archive site
...
With a many to many relation, e.g. SiteTree_MyRelation, and listing
them in your template then adding ?archiveDate=x in the URL, a SQL
error is shown because Versioned::augmentSQL() tries to query the
non-existent table "SiteTree_MyRelation_versions" assuming there's
versioning setup, but there isn't.
2013-05-07 12:34:46 +12:00
Simon Welsh
835aefbe83
FIX Handle PHP 5.4's short array notation everywhere arrays are parsed.
2013-05-05 13:27:42 +12:00
Simon Welsh
cb0977ce9f
Remove duplicate parse_class_spec method.
2013-05-05 11:43:56 +12:00
Fred Condo
bd5c8520bb
FIX: Use the correct variable as the key into $record
...
It was using $fieldName, which is the CSV field name, not the database
field name. This prevents duplicate detection from working. It now
properly uses $SQL_fieldName.
Update CsvBulkLoaderTest to remove keys that are nonexistent in the CSV
test data. Having them causes the test to fail with an undefined-index
error. This did not previously fail because of the bug in CsvBulkLoader
that this patch fixes. This partially reverts c4eac53
.
2013-05-01 06:50:40 -07:00
Damian Mooyman
4d5bd451bb
Updated HTMLTextTest to test for correct testFirstSentence, specifically a past failing test case. fixes #1422
2013-05-01 16:03:58 +12:00
Ingo Schommer
5efae23cb2
FIX Template discovery on themed Layout templates
...
Was failing when 'main' template only exists in theme,
but 'Layout' template only exists in module.
2013-04-30 15:41:26 +02:00
Ingo Schommer
cef955c8b9
Removed stray ampersand in Requirements ( fixes #1809 )
...
Only happens with suffix_requirements=true
2013-04-30 00:35:25 +02:00
Ingo Schommer
6c2e791a48
Merge remote-tracking branch 'origin/3.1'
2013-04-29 08:59:06 +02:00
Ingo Schommer
0e5b099287
FIX Unquoted shortcodes weren't parsed ( fixes #680 )
...
Since that used to be the default shortcode notation
for our core "insert media" functionality, its important
to have this fixed and keep supporting "legacy" content
created with 3.0.
2013-04-26 01:00:13 +02:00
Nico Haase
5fbb3da661
Enhanced tests for regeneration of images and a bugfix for images that were cached in multiple steps
2013-04-24 10:27:20 +02:00
Zauberfisch
809e0e547a
MINOR: updated and extended Tests
2013-04-22 18:17:31 +00:00
Sam Minnee
9ba26a04c4
Added test for lazy-loading edge-case in Money field.
2013-04-22 11:50:57 +12:00
Jeremy Shipman
c4eac5310e
FIX: Instead of CsvBulkLoader->findExistingRecord out right failing (i.e. no duplicate found) when the duplicate check field is empty, it will now continue on to check other duplicateCheck fields.
...
Added extra testing data to CSVBulkLoaderTest so that it fails.
2013-04-19 16:52:39 +12:00
Che Van Lawrence
d07fb4355d
Merge pull request #1770 from kinglozzer/config-dir-detection-fix
...
FIX: _config/ directories are now correctly detected as modules (fixes #1762 )
2013-04-18 14:48:55 -07:00
Sean Harvey
6e0fa5db45
Merge pull request #1768 from tractorcow/3.1-http-mail-fixes
...
BUG HTTP incorrectly converts mailto links to absolute urls
2013-04-18 14:46:10 -07:00
Loz Calver
0384369acb
FIX: _config/ directories are now correctly detected as modules ( fixes #1762 )
...
DO NOT MERGE: to be reviewed. Only i18n & Deprecation classes use
->getModules() as far as I can see. Given that the method still simply
returns an array of modulename => modulepath, I don't think it's really
an API change
2013-04-18 14:08:03 +01:00
Damian Mooyman
b6fc1d314e
BUG HTTP will now correctly pass over mailto: links when converting relative links to absolute (e.g. in Emails)
2013-04-18 14:25:51 +12:00
Simon Welsh
93a8e6f16e
Merge pull request #1773 from silverstripe-rebelalliance/fix/htmlvalue_attr_escaping
...
FIX We still need XML escaping on href attributes in HTML4Value
2013-04-17 15:05:33 -07:00
Hamish Friedlander
8d26bdbd2e
FIX We still need XML escaping on href attributes in HTML4Value
2013-04-18 09:13:24 +12:00
s-m
acf2ff8ce6
BUG: Fix for #1487
...
The parser could sometimes generate invalid code if the
source-file-comments were enabled, this moves the comments outside the
html-tag to circumvent these problems, update test as well.
2013-04-15 19:54:41 +02:00
Hamish Friedlander
c02d7e4c2e
Merge pull request #1750 from s-m/1660-elseif-parsing
...
BUG: Allow empty else- and else_if-blocks
2013-04-14 14:56:45 -07:00
Ingo Schommer
9eab893e7c
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
model/Image.php
2013-04-12 01:14:55 +02:00
Ingo Schommer
59dc0085d8
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
docs/en/reference/urlvariabletools.md
tests/forms/CheckboxFieldTest.php
2013-04-12 01:13:32 +02:00
Ingo Schommer
933fbf8ea4
l10n key to make "yes" and "no" translatable (see #1749 )
2013-04-12 01:11:24 +02:00
Ingo Schommer
233198c5cb
Fixed filesystem case sensitivity in tests
2013-04-11 11:59:36 +02:00
Ingo Schommer
0343a77d30
Merge remote-tracking branch 'origin/3.1'
2013-04-11 11:42:04 +02:00
s-m
29e6bd513c
BUG: Allow empty else- and else_if-blocks
...
This fix allows empty else and else-if blocks to be processed, fixes #1660
2013-04-10 16:17:44 +02:00
Ingo Schommer
9856fcef21
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
javascript/DateField.js
model/DataQuery.php
model/Versioned.php
tests/forms/RequirementsTest.php
tests/model/DataObjectLazyLoadingTest.php
view/Requirements.php
2013-04-09 14:45:35 +02:00
Ingo Schommer
ba7dfcfd54
Added iShouldSeeAButton assertion
2013-04-09 09:39:06 +02:00
Sam Minnée
a6929f11b2
Merge pull request #1185 from chillu/pulls/augment-lazy-versioned
...
Versioned lazy loading fixes (backport from 3.1)
2013-04-08 16:04:50 -07:00
Ingo Schommer
01f46d039f
NEW Enforce max node counts to avoid excessive resource usage
...
Rendering potentially 1000s of nodes can exceed the CPU and memory constraints
of a normal PHP process, as well as the rendering capabilities of browsers.
Set a hard maximum for the renderable nodes, deferring to a "show as list" action
in the main CMS tree. For TreeDropdownField, we don't have the list fallback option,
so ask the user to search for the node title instead.
Also makes both the "node_threshold_total" and "node_threshold_leaf" values configurable
2013-04-09 10:24:18 +12:00
Sam Minnée
88d77db9e0
Merge pull request #1318 from tractorcow/3.1-api-image-resampling-compatible
...
API Better detection and prevention of image resampling
2013-04-08 15:18:55 -07:00
s-m
6a95db0eff
API: Support inequalities in templates
...
This adds support for <, <=, >, >= in templates
2013-04-08 17:07:39 +02:00
Nico Haase
8908a6bcd7
This is a fixed version for RegenerateCachedImagesTask (former FlushGeneratedImagesTask) such that it regenerates images instead of silently removing them and breaking existing pages
...
The pull request also contains some enhancements and fixes to the corresponding testcases.
Fixes #318
2013-04-06 15:56:27 +02:00
Ingo Schommer
5c82efd61d
Merge pull request #1729 from ajshort/no-rule-match-404
...
API: Return a 404 error when no director rule is matched
2013-04-06 03:09:48 -07:00
Andrew Short
1fc780ce2b
API: Return a 404 error when no director rule is matched
2013-04-06 18:19:03 +11:00
Will Rossiter
1427a0637b
FIX: remove_extension should work on parameterized extensions
2013-04-06 19:29:03 +13:00
Ingo Schommer
0242686a7a
Requirements acces to files with query strings ( fixes #7735 )
...
Originally authored by florian.thoma, tests added
by Ingo Schommer. Also removed query params from
file paths before calling mtime() on it.
See https://github.com/silverstripe/sapphire/pull/1023
2013-04-03 16:39:59 +02:00
Andrew Short
ceb7e3c8a8
Merge pull request #1352 from chillu/pulls/postgres-fixes
...
Postgres fixes
2013-04-03 03:50:08 -07:00
Ingo Schommer
2bc273e2a8
Consistently quote DataObject::$default_sort
...
Strictly speaking, no longer required since we auto-quote simple
field names in DataQuery now, but since the majority of sorts in core is
already quoted we should stay consistent.
2013-04-03 12:11:53 +02:00
Ingo Schommer
e9d55fcaf9
Correctly quote SQL in SQLQueryTest (fixes Postgresql)
2013-04-03 12:11:52 +02:00
Ingo Schommer
2da1de07da
Merge pull request #1359 from halkyon/forcessl_alternate_base_url
...
NEW Allow specifying an alternate domain to Director::forceSSL()
2013-04-03 01:58:28 -07:00
Ingo Schommer
b9f628146a
Fixed query quoting in SQLQueryTest
2013-04-03 10:48:55 +02:00
Sean Harvey
6eda25a090
NEW Allow specifying the secure domain to Director::forceSSL()
2013-04-03 17:47:36 +13:00
Ingo Schommer
ebca1a64ed
Merge pull request #1299 from silverstripe/user-specific-temp-folder
...
NEW: Move temp data into a user-specific subfolder, to stop temp-permission bugs from occurring.
2013-04-02 02:44:53 -07:00
Ingo Schommer
ef3d974821
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
docs/en/misc/contributing/issues.md
2013-04-02 02:05:58 +02:00
Andrew Short
5ec85d06f6
API: Don't allow dots in URL segments
2013-03-30 19:47:17 +11:00
Ingo Schommer
afb8465d05
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
.travis.yml
2013-03-29 17:37:19 +01:00
Ingo Schommer
9ed8eba253
Simplified travis builds (using external script)
2013-03-28 23:49:32 +01:00
Ingo Schommer
4da85dc734
Simplified travis builds (external setup scripts)
2013-03-28 22:39:37 +01:00
Ingo Schommer
31f5e00a56
Simplified travis builds (external setup scripts)
2013-03-28 22:24:03 +01:00
Ingo Schommer
e97c034922
API i18n::$common_languages and i18n::$common_locales converted to Config API
...
They are now accessed via the Config API, and contain associative rather than indexed arrays.
Before: `array('de_DE' => array('German', 'Deutsch'))`, after: `array('de_DE' => array('name' => 'German', 'native' => 'Deutsch'))`.
Also fixed a i18n.js_i18n config accessor
2013-03-27 20:42:46 +01:00
Ingo Schommer
b0d3f7f3a2
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
api/RSSFeed.php
dev/SapphireTest.php
tests/control/RequestHandlingTest.php
2013-03-26 10:46:41 +01:00
Ingo Schommer
3334eafcb1
API Marked statics private, use Config API instead ( #8317 )
...
See "Static configuration properties are now immutable, you must use Config API." in the 3.1 change log for details.
2013-03-24 17:20:53 +01:00
Ingo Schommer
bb52f2a214
FIX Allow FALSE in Config API, call remove() will NULL key on update()
2013-03-24 17:20:36 +01:00
Sam Minnee
5779097939
NEW: Move temp data into a user-specific subfolder, to stop temp-permission bugs from occurring.
...
Anyone who has run "sudo -u www-data ./framework/sake dev/build" knows that SilverStripe's temp
folder permissions can be very brittle. This patch resolves this by making the temp folder
user-specific.
To minimise directory pollution it first creates a chmod 777 parent folder with the same name
as the current folder. It then creates a subfolder of this with the same name as the current
user.
The positive impact of this change is that sake can be used without fear of messing up file
permissions. This means, among other things, that we can put a Composer post-update-cmd into
the installer to run dev/build. Progress!
The negative impact is that you will get two caches if you run sake as a different user. However,
that is much better than the current situation - which is a bunch of bugs - and if you're concerned
about that, you still have the option of running sake as www-data.
2013-03-24 18:39:50 +13:00
Ingo Schommer
bfab74ac6e
Merge pull request #1321 from silverstripe-rebelalliance/feature/config
...
FIX ConfigStaticManifest persisting access level after parsing a static
2013-03-22 02:25:54 -07:00
Sean Harvey
9f35b13b48
Merge pull request #1322 from ajshort/pulls/class-spec-parsing
...
FIX Incorrect parsing of T_STRING values in class spec parsing
2013-03-21 21:20:35 -07:00
Andrew Short
d3e4863f52
FIX Incorrect parsing of T_STRING values in class spec parsing
...
* Due to missing break, the T_STRING case would fall through to array.
* The values were being added to the wrong variable.
* Added missing support for missing null values.
2013-03-22 14:37:55 +11:00
Hamish Friedlander
47edbfe8fc
FIX ConfigStaticManifest persisting access level after parsing a static
2013-03-22 14:26:48 +13:00
Damian Mooyman
dd6aaaf484
ENHANCEMENT Additional image generation functions now self-determine if a modification to the underlying image backend is necessary before generating additional image files.
2013-03-21 12:15:28 +13:00
Ingo Schommer
61dbafc4e5
Merge pull request #1292 from tractorcow/3.1-validationexception-fixes
...
BUG Issue with ValidationException having blank ValidationResult
2013-03-20 03:55:42 -07:00
Ingo Schommer
8538cb9ee2
Removed deprecated YamlFixture->saveIntoDatabase() usage
2013-03-19 12:58:15 +01:00
Ingo Schommer
4f95a07936
Removed deprecated NegationFilter tests, rewrote ExactMatchMultiFilter tests
2013-03-19 12:58:14 +01:00
Ingo Schommer
a44e06992a
Fixed deprecated has_extension() usage
2013-03-19 12:58:14 +01:00
Ingo Schommer
0a9f3b75a9
Fixed deprecated usage of <% control %>
2013-03-19 12:58:14 +01:00
Andrew Short
94f209eb74
Merge branch '3.1'
2013-03-19 22:36:47 +11:00
Andrew Short
b8a51c3792
Merge branch '3.0' into 3.1
2013-03-19 22:27:09 +11:00
Ingo Schommer
b282c9f8f3
Fixed deprecated GD usage
2013-03-19 10:51:39 +01:00
Ingo Schommer
b416e50bff
Fixed deprecations
2013-03-19 10:38:14 +01:00
Ingo Schommer
3932241844
Removed test for deprecated NegationFilter
2013-03-19 10:13:57 +01:00
Ingo Schommer
dd6f33ab37
FIX Respect tree node limits, fix search result node display
...
- Renamed $minNodeCount to more accurate $nodeCountThreshold
- The $minNodeCount attribute wasn't properly respected
during actual querying, so SilverStripe would always traverse
the entire tree (and load all objects into memory),
before then marking nodes as "unexpanded", which prevents
them from actually being rendered.
- Fixes nodes on search results to be expanded by default
- Fixes nodes on search results to correctly ajax-expand
2013-03-19 00:05:14 +01:00
Andrew Short
bc941c18b6
Merge branch '3.1'
2013-03-15 21:58:37 +11:00
Damian Mooyman
cd27bf71fb
BUG Enforced requirement that ValidationException::getResult() is expected to consistently produce a valid ValidationResult object.
2013-03-15 13:56:43 +13:00
Hamish Friedlander
9bd6dd9ade
API Make default_cast Text and not HTMLText
2013-03-14 12:49:03 +13:00
Hamish Friedlander
d2650bbc44
NEW Disable shortcodes in $Layout and $Content in SSViewer
2013-03-14 12:49:03 +13:00
Hamish Friedlander
168f071499
API Make HTMLValue replace-able via DI
...
Extracted common code out to SS_HTMLValue and made abstract, then
put HTML 4 specific code in SS_HTML4Value. Its now possible to
replace HTMLValue with one designed for HTML 5 or XHTML
Requires a code change from new SS_HTMLValue to
Injector::inst()->create(HTMLValue)
2013-03-14 12:49:02 +13:00
Sam Minnée
8b2a911c80
Merge pull request #1280 from silverstripe-rebelalliance/feature/config
...
FIX Parsing heredoc, nowdoc & comments in ConfigStaticManifest
2013-03-12 16:45:11 -07:00
Hamish Friedlander
53595dc930
FIX Parsing docblock comments in ConfigStaticManifest
2013-03-13 11:59:49 +13:00
Hamish Friedlander
60b72edfba
FIX Parsing heredoc, nowdoc & comments in ConfigStaticManifest
2013-03-13 11:26:49 +13:00
Sam Minnée
362ca9b4d5
Merge pull request #1244 from silverstripe-rebelalliance/feature/config
...
Feature/config
2013-03-12 13:19:59 -07:00
g4b0
d32cd5be16
Added some more XHTML replacement and relative unit test. Content_type comfigurable.
2013-03-12 16:06:59 +01:00
Hamish Friedlander
e6352dffbb
FIX Static polution with informational fields
2013-03-12 17:14:12 +13:00
Hamish Friedlander
c52baae3c8
Add some tests for the static parser
2013-03-12 15:32:46 +13:00
g4b0
2f16951634
BUG: ampersand escaping
2013-03-11 09:58:14 +01:00
Robert Curry
b9dc2dc650
Define getIDList on UnsavedRelationList
...
This is to fix a bug that caused CheckboxSetFields to throw an error
when trying to call this function when editing a new DataObject. This
occurred when using the advancedworkflow module.
Thanks to simonwelsh for the majority of the work on this fix.
2013-03-08 12:34:52 +13:00
miiihi
5af35a89ce
ENHANCEMENT Allow multiline comments in SS3 templates
2013-03-07 18:45:07 +01:00
ajshort
b537ee28a2
BUG: Fix ManyManyList->removeAll() when filters are applied to the query
...
In order to be cross-database compatible and support filters, the IDs to
delete must be retrieved in a sub-query.
2013-03-02 17:23:15 +11:00
Hamish Friedlander
80bd38e1e9
FIX DataObjectSchemaGenerationTest trying to modify config statics directly
2013-02-28 09:43:34 +13:00
Hamish Friedlander
c98621977c
Cache the merged version of any Config value in an in-mem LRU cache
2013-02-28 09:43:33 +13:00
Ingo Schommer
ce66bc1eaf
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
tests/travis/before_script
2013-02-27 13:34:03 +01:00
Ingo Schommer
39789529d7
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
tests/control/HTTPResponseTest.php
tests/travis/before_script
2013-02-27 10:27:22 +01:00
Ingo Schommer
af52de97e9
Merge pull request #1161 from chillu/pulls/uploadfield-replacefile
...
NEW Upload->replaceFile setting
2013-02-27 01:24:27 -08:00
Ingo Schommer
e6fffb9ef9
API Remove content-length setting in HTTPResponse
...
It's not reliable. Started in c69381c33
, but only partially reverted.
2013-02-27 10:07:54 +01:00
Ingo Schommer
7c0240cec1
Merge pull request #1238 from ajshort/travis-composer-3.0
...
Travis Composer Integration (3.0.x)
Conflicts:
tests/travis/before_script
2013-02-27 10:02:07 +01:00
ajshort
34d524c09f
Integrate composer in the Travis build process
...
Creates a package definition from the framework version being built,
and uses composer to install it into an installer project, as well
as the required modules for testing.
2013-02-27 00:38:40 +11:00
Sam Minnee
50f36447a9
Merge branch '3.1'
2013-02-25 16:59:37 +13:00
Sam Minnee
efb4760244
Fixed invalid classname in test
2013-02-25 16:44:54 +13:00
Sam Minnee
88b3901a69
Check for object type before calling method, prevent fatal error in failing test.
2013-02-25 16:33:55 +13:00
Hamish Friedlander
7afcd64418
FIX Make ShortcodeParser obey error_behavior in attribute scope
2013-02-22 11:34:15 +13:00
Hamish Friedlander
1ee01c39d4
FIX ShortcodeParser producing bad output after escaped tag
...
Also tightens up matching of shortcodes so we dont match on invalid shortcodes
2013-02-22 10:30:51 +13:00
Ingo Schommer
bb724c43b9
Merge pull request #1142 from chillu/pulls/remove-auto-controller-routing
...
API Removed auto-routing of controller name
2013-02-18 05:30:37 -08:00
Ingo Schommer
957469d770
API Removed auto-routing of controller name
...
Use custom routing rules to achieve this effect (see changelog)
2013-02-18 14:29:47 +01:00
Ingo Schommer
a841f22004
Hardcode travis branch on dependencies, otherwise breaks pull request builds
...
Pull requests are always on a branch, and this branch
typically is not present on the installer.
This changes means we need to be careful when merging into 3.1
and master, but that's a necessary evil.
2013-02-18 14:19:36 +01:00
Ingo Schommer
a86e4ee00c
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
tests/injector/InjectorTest.php
tests/travis/before_script
2013-02-18 14:15:42 +01:00
Ingo Schommer
6c30b80257
Hardcode travis branch on dependencies, otherwise breaks pull request builds
...
Pull requests are always on a branch, and this branch
typically is not present on the installer.
This changes means we need to be careful when merging into 3.1
and master, but that's a necessary evil.
2013-02-18 14:14:30 +01:00
Ingo Schommer
9e2e050f20
Hardcode travis branch on dependencies, otherwise breaks pull request builds
...
Pull requests are always on a branch, and this branch
typically is not present on the installer.
This changes means we need to be careful when merging into 3.1
and master, but that's a necessary evil.
2013-02-18 14:13:07 +01:00
Hamish Friedlander
baf894d84a
FIX CDATA sections in HTML5 are invalid so remove from test
2013-02-18 17:02:11 +13:00
Sean Harvey
db56d17056
Merge pull request #1190 from silverstripe-rebelalliance/feature/shortcodes
...
NEW Make shortcode parser more clever about placement
2013-02-17 19:00:14 -08:00
Hamish Friedlander
9ecea763c3
Merge pull request #1186 from nyeholt/injector_configged_create
...
FIX issue with Injector::create not passing args
2013-02-17 18:38:24 -08:00
Hamish Friedlander
4b54383d68
API change request handling to be more orthogonal
...
RequestHandler#handleAction now exists. It takes the request, and
the action to call on itself. All calls from handleRequest to call an action
will go through this method
Controller#handleAction has had it's signature changed to
match new RequestHandler#handleAction
RequestHandler#findAction has been added, which extracts the
"match URL to rules to find action" portion of RequestHandler#handleRequest
into a separate, overrideable function
GridField#handleAction has beeen renamed to handleAlterAction and
CMSBatchActionHandler#handleAction has been renamed to handleBatchAction to
avoid name clash with new RequestHandler#handleAction
Reason for change: The exact behaviour of request handling depended heavily
on whether you inherited from RequestHandler or Controller, and whether the
rule extracted it's action directly (like "foo/$ID" => 'foo') or dynamically
(like "$Action/$ID" => "handleAction"). This cleans up behaviour so
all calls follow the same path through handleRequest and handleAction, and
the additional behaviour that Controller adds is clear.
2013-02-18 14:56:04 +13:00
Hamish Friedlander
5fd55a50f2
API Tighten up allowed_actions
...
allowed_actions is now only allowed to reference public methods defined
on the same Controller as the allowed_actions static, and
the wildcard "*" has been deprecated
2013-02-18 14:53:33 +13:00
Hamish Friedlander
7efae6b95f
Merge remote-tracking branch 'origin/3.0' into 3.1
2013-02-18 14:31:57 +13:00
Ingo Schommer
30096ee730
BUGFIX Keep Member.PasswordEncryption setting on empty passwords
...
This will prevent empty passwords to set the encryption to 'none',
which in turn will store any subsequent password changes in cleartext.
Reproduceable e.g. with ConfirmedPasswordField and setCanBeEmpty(true).
2013-02-17 23:30:41 +01:00
Ingo Schommer
f06ba70fc9
BUG Undefined $allowed_actions
overrides parent definitions, stricter handling of $allowed_actions on Extension
...
Controller (and subclasses) failed to enforce $allowed_action restrictions
on parent classes if a child class didn't have it explicitly defined.
Controllers which are extended with $allowed_actions (through an Extension)
now deny access to methods defined on the controller, unless this class also has them in its own
$allowed_actions definition.
2013-02-17 23:30:36 +01:00
Hamish Friedlander
2335c074b3
NEW Make shortcode parser more clever about placement
...
Shortcodes have traditionally had a problem that they are inside <p> tags,
but generate block level elements. This breaks HTML compliance.
This makes the shortcode parser now mutate the DOM based on the "class" attribute on
the shortcode to insert the generated block level element at the right place in the DOM
- for "left" and "right" elements it puts them just before the block level
element they are inside
- for "leftAlone" and "center" elements it splits the DOM around the shortcode.
The trade off is that shortcodes are no longer "text level" features. They need
knowledge of the HTML they are in to perform this transformation, so they can
only be used in (valid) HTML
2013-02-18 10:49:52 +13:00
Ingo Schommer
37e10d14f3
Merge pull request #1184 from ajshort/named-services
...
BUG: Fixed the injection of named services.
2013-02-15 10:46:33 -08:00
Ingo Schommer
6ff1f9050d
Merge pull request #1187 from dhensby/restfulservice-improvements
...
API Restfulservice improvements
2013-02-15 10:45:43 -08:00
Daniel Hensby
920fd71a2f
Adding default curl options
...
Because I removed completely the static setting of SSL_VERIFYPEER I've
added the ability to declare default curl options on the class. This
means that users that really want to one line turn off SSL_VERIFYPEER
can do so without needing to pass a custom option in every request()
call.
2013-02-15 11:45:52 +00:00
Daniel Hensby
f003359047
RestfulService_Response now gets response headers
...
Before now, the RestfulService_Response object was never sent the
response headers. For APIs that rely on the response headers to send
back information (signatures, pagination info, etc).
This change makes the curl response have the full HTTP response
(including Headers). We then extract the body and the header information
and assign them to relevant vars and then construct the response as
before (with the addition of the headers array).
This change required two new functions:
extractResponse: This extracts the HTTP Headers and the payload from the
curl response and assigns it to the relevany vars that are passed by
reference
parseRawHeaders: This was designed to mimic http_parse_headers (a
non-standard php class). It converts the headers into an associative
array.
2013-02-15 11:45:36 +00:00
Marcus Nyeholt
428cbe4b03
FIX issue with Injector::create not passing args
...
If creating an object using Injector::create() and constructor arguments
are passed through, in some cases where the object being created had a yml
configuration set for it, the passed in constructor arguments weren't being
passed through to the instantiation of the object.
2013-02-15 10:24:47 +11:00
Ingo Schommer
f4068371fc
Merge pull request #1159 from chillu/pulls/datetimefield-field-setters
...
DatetimeField->setDateField()/setTimeField()
2013-02-14 11:31:31 -08:00
Julian Seidenberg
10199f908a
API Data corruption on Versioned due to lazy loading
...
Lazy loading no longer loads fields from the versions table when querying. This could lead to incorrect data being displayed if the data on the object and the version it pointed to did not match.
API methods to allow setting of the context of the query that generated the DataObject on that object (used by the lazy loading mechanism to correctly query the Stage, Live, or Versions tables)
See https://github.com/silverstripe/sapphire/pull/1178 for context.
2013-02-14 14:28:42 +01:00
jean
e2bf9649f3
FIX 7934 When lazy loading fields respect version of the record
2013-02-14 14:27:44 +01:00
Julian Seidenberg
f931b8d326
API Data corruption on Versioned due to lazy loading
...
Lazy loading no longer loads fields from the versions table when querying. This could lead to incorrect data being displayed if the data on the object and the version it pointed to did not match.
API methods to allow setting of the context of the query that generated the DataObject on that object (used by the lazy loading mechanism to correctly query the Stage, Live, or Versions tables)
See https://github.com/silverstripe/sapphire/pull/1178 for context.
2013-02-14 14:18:10 +01:00
Simon Welsh
be8482aa73
Merge pull request #1173 from ajshort/include-object-argument
...
BUG: Pass named include argument as objects.
2013-02-13 23:44:29 -08:00
ajshort
d3629be344
BUG: Pass named include argument as objects.
...
This means you can pass objects such as lists as named parameters, not
just strings.
2013-02-14 18:31:40 +11:00
ajshort
ff19f3b11a
BUG: Fixed the injection of named services.
2013-02-13 23:06:15 +11:00
Ingo Schommer
b44720179c
Merge pull request #1180 from mateusz/css-combining-media
...
API Add possibility to combine media-targeting stylesheets.
2013-02-12 14:13:45 -08:00
Mateusz Uzdowski
53feb3a5ae
API Add possibility to combine media-targeting stylesheets.
2013-02-13 11:04:05 +13:00
Ingo Schommer
14a56c18e9
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
control/Director.php
2013-02-07 21:45:16 +01:00
Ingo Schommer
083b6b2164
NEW Upload->replaceFile setting
2013-02-05 19:28:24 +01:00
Ingo Schommer
6c22545639
DatetimeField->setDateField()/setTimeField()
...
Useful e.g. to override the time field with the
"silverstripe/timefield" dropdown
2013-02-05 11:03:19 +01:00
Ingo Schommer
d77e06d585
Merge pull request #1123 from chillu/pulls/revert-content-length
...
API Remove Content-Length setting from HTTPResponse (fixes #8010 )
2013-01-31 10:19:17 -08:00
Ingo Schommer
634c91c6ff
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
email/Mailer.php
2013-01-30 12:46:24 +01:00
Sam Minnee
1e1df8c43e
BUGFIX: Improved detection of empty HTMLText fields.
2013-01-29 18:03:47 +01:00
Sam Minnee
d8bfc0bb48
API CHANGE: Added Security::set_login_url() so that you can define an alternative log-in page if you have made one yourself.
2013-01-29 18:03:47 +01:00
Damian Mooyman
1ca15d0399
API HTTP::urlRewriter with (string)$code deprecated in 3.1. Fixed regressions and CSS urls.
...
urlRewriter will expect a callable as a second parameter,
but will work with the current api and simply raise a deprecation error.
HTTP::absoluteURLs now correctly rewrites urls into absolute urls. Resolves introduced in c56a80d6ce
HTTP::absoluteURLs now handles additional cases where urls were not translated.
Test cases for HTTP::absoluteURLs added for both css and attribute links.
Cleaned up replacement expression and improved documentation.
2013-01-24 09:49:44 +01:00
Damian Mooyman
657c14fd82
Added test cases for exception error logging
2013-01-24 09:36:42 +01:00
Ingo Schommer
c69381c33e
API Remove Content-Length setting from HTTPResponse ( fixes #8010 )
...
This reverts commit 356a367eb5
.
We can't use headers_sent() to determine an accurate
content length, since PHP defaults to buffering a couple of bytes
even without ob_start() (see "output_buffering" setting).
This makes the patch harmful, since it breaks any responses relying
on more structure data, like removing closing brackets from JSON.
Which in turn breaks the CMS in horrible ways (see #8010 ).
See #7574 for context.
2013-01-23 15:05:33 +01:00
Ingo Schommer
c11b3918fc
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
admin/css/screen.css
admin/scss/_style.scss
core/PaginatedList.php
email/Mailer.php
2013-01-21 11:14:57 +01:00
Ingo Schommer
27d2f75d9d
Added test for DataList filters with array and modifiers (see #8162 )
2013-01-15 01:11:35 +01:00
micschk
7f605cfb54
NEW Disable items in DropdownField and GroupedDropdownField
2013-01-11 16:32:20 +01:00
Ingo Schommer
3a1df46743
Merge pull request #1055 from stojg/bug-relField
...
BUG Calling DataObject::relField() on a object with an empty relation list
2013-01-11 07:09:55 -08:00
Ingo Schommer
4f39af1a85
Merge pull request #1090 from sminnee/fix-get-one-case
...
FIX: Fix DataObject::get_one() when the classname is passed with imprope...
2013-01-11 01:42:29 -08:00
Ingo Schommer
f3c0669fec
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
_config/uploadfield.yml
css/UploadField.css
forms/UploadField.php
scss/UploadField.scss
templates/UploadField.ss
tests/forms/uploadfield/UploadFieldTest.php
2013-01-11 10:02:39 +01:00
Ingo Schommer
9e82d8e857
Fixed line lengths
2013-01-11 09:59:33 +01:00
Ingo Schommer
212c4f1e51
Fixed UploadField regression from 4da1af9c3
2013-01-11 09:30:21 +01:00
Sam Minnee
cc7318fde4
NEW: Added canAttachExisting config option for UploadField.
...
This is the companion setting to canUpload, letting you control whether existing files from the asset store can be referenced. It's particularly useful when using UploadField on the front-end.
2013-01-11 09:29:02 +01:00
Ingo Schommer
2dfd42795e
NEW Restrict upload abilities in UploadField
...
Conflicts:
css/UploadField.css
templates/UploadField.ss
2013-01-11 09:07:42 +01:00
Sam Minnee
f4efaeefa7
FIX: Fix DataObject::get_one() when the classname is passed with improper casing.
2013-01-11 12:20:57 +13:00
Ingo Schommer
9310b8d86d
NEW Restrict upload abilities in UploadField
2013-01-10 00:15:34 +01:00
Ingo Schommer
e8bfc241fd
Setting SapphireTest::is_running_test() in PHPUnit bootstrap
...
Otherwise conditional logic will only succeed
when run through "sake dev/tests", not when
run through phpunit directly (which is the recommended way now)
2013-01-09 23:31:10 +01:00
g4b0
e53280c650
BUG SQLQuery::aggregate() with limit, groupBy and orderBy ( fixes #8148 )
2012-12-21 15:20:59 +01:00
Ingo Schommer
8ec3641e60
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
admin/javascript/LeftAndMain.FieldHelp.js
lang/en.yml
model/URLSegmentFilter.php
2012-12-21 15:04:17 +01:00
Ingo Schommer
f0f83b26a8
BUG Graceful handling of sprintf with too few params in i18n::_t()
...
Originally discovered as a problem with the 'GridFieldDetailForm.Saved' in nl.yml
2012-12-21 11:46:39 +01:00
Sean Harvey
aa3b358469
Adding test for SortColumn to SQLQueryTest
...
Mostly for the benefit of MSSQLDatabase which is having problems
with subselects and alias functions.
2012-12-20 15:52:46 +13:00
Kirk Mayo
561e629c16
NEW Show the allowed extensions as a toggle tip as per trac 7993
...
NEW Added a behat test for showing extension trac 7993
2012-12-19 17:00:39 +01:00
Stig Lindqvist
22efd3848e
BUG Calling DataObject::relField() on a object with an empty relation list
...
This causes a 'Fatal error: Call to a member function hasMethod() on a non-object'.
This can happen when displaying a field in a gridfield on a belongs_to relationship.
2012-12-19 16:47:07 +13:00
Mateusz Uzdowski
d5a1c3d99a
BUG SS has problems handling + in URLs. Filter them out.
...
+ has a special meaning in the URLs so overall it's a good idea to
strip them out. Otherwise they would need to appear in their ugly url
encoded form "%2B".
Refer: http://open.silverstripe.org/ticket/7929
2012-12-18 09:44:47 +01:00
Sam Minnée
e4198de115
Merge pull request #1047 from simonwelsh/ns_class_parse
...
FIX Handle namespaced classes in Object::parse_class_spec()
2012-12-17 23:55:50 -08:00
Sam Minnée
9460e8704c
Merge pull request #1043 from tractorcow/3.1-deleted-pages-fixes
...
Fix for issue #7975 - Issue with retrieving deleted pages
2012-12-17 19:50:27 -08:00
Simon Welsh
94be5c6d87
FIX Handle namespaced classes in Object::parse_class_spec()
2012-12-18 15:00:45 +13:00
Ingo Schommer
618a3d0314
Requirements acces to files with query strings ( fixes #7735 )
...
Originally authored by florian.thoma, tests added
by Ingo Schommer. Also removed query params from
file paths before calling mtime() on it.
See https://github.com/silverstripe/sapphire/pull/1023
2012-12-18 01:01:19 +01:00
Ingo Schommer
8f239d6373
SimpleXML string casting in tests for older PHPUnit
2012-12-17 15:52:01 +01:00
Ingo Schommer
7950584b3a
SimpleXML string casting in tests for older PHPUnit
2012-12-17 15:46:09 +01:00
Damian Mooyman
6aa16e1f01
BUG Test case for versioned now correctly checks IDs returned from Versioned::get_including_deleted
...
BUG Issue with deleted records not being queried properly.
API DataQuery::expressionForField no longer requires a second parameter. Rather the query object is inferred from the DataQuery itself. This should improve consistency of use of this function.
2012-12-17 17:15:26 +13:00
Ingo Schommer
bbc8e06d49
API Show GridFieldEditButton even without edit permissions (for readonly forms)
2012-12-17 00:47:23 +01:00
Ingo Schommer
1848d7e90a
API Check model permissions in GridField
2012-12-17 00:46:51 +01:00
Ingo Schommer
22eeaa4ac1
BUG Members should not be allowed to delete themselves ( fixes #8121 )
2012-12-16 23:53:45 +01:00
Ingo Schommer
e6bf19928f
Less far-future date assertions, seems to throw off some PHP installs
...
Apparently not all PHPs (Travis) are build to last a 100 years,
who would've thought ;)
2012-12-14 11:25:24 +01:00
Ingo Schommer
d13c53fda6
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
tests/model/DataQueryTest.php
2012-12-14 10:57:28 +01:00
Ingo Schommer
963f02e7a3
Using new description style in MemberDateTimeOptionSetField
2012-12-14 01:58:04 +01:00
Ingo Schommer
559abecd56
API Copying instance props on FormField readonly/disabled transformations
...
Introduced new FormField->castedCopy() method
which tries to replicate the existing form field instance
as closely as possible.
Primarily, the fix was targeted at consistently passing
through FormField->description to all of its variations.
2012-12-14 01:58:04 +01:00
Hamish Friedlander
27113f82c3
API Make DataList and ArrayList immutable
...
In 3.0 there was some confusion about whether DataLists and ArrayLists
were mutable or not. If DataLists were immutable, they'd return the result, and your code
would look like
$list = $list->filter(....);
If DataLists were mutable, they'd operate on themselves, returning nothing, and your code
would look like
$list->filter(....);
This makes all DataLists and ArrayList immutable for all _searching_ operations.
Operations on DataList that modify the underlying SQL data store remain mutating.
- These functions no longer mutate the existing object, and if you do not capture the value
returned by them will have no effect:
ArrayList#reverse
ArrayList#sort
ArrayList#filter
ArrayList#exclude
DataList#dataQuery (use DataList#alterDataQuery to modify dataQuery in a safe manner)
DataList#where
DataList#limit
DataList#sort
DataList#addFilter
DataList#applyFilterContext
DataList#innerJoin
DataList#leftJoin
DataList#find
DataList#byIDs
DataList#reverse
- DataList#setDataQueryParam has been added as syntactic sugar around the most common
cause of accessing the dataQuery directly - setting query parameters
- RelationList#setForeignID has been removed. Always use RelationList#forForeignID
when querying, and overload RelationList#foreignIDList when subclassing.
- Relatedly,the protected variable RelationList->foreignID has been removed, as the ID is
now stored on a query parameter. Use RelationList#getForeignID to read it.
2012-12-14 13:30:35 +13:00
Ingo Schommer
644cc79ebb
API Removed methods previously deprecated in 3.0
2012-12-14 01:16:47 +01:00
Ingo Schommer
c6b1d4aa6b
API Storing alternative DB name in cookie rather than session
...
Session is not initialized by the time we need to use
the setting in DB::connect(). Cookie values get initialized
automatically for each request.
Tightened name format validation to ensure it can only
be used for temporary databases, rather than switching
the browser session to a different production database.
Encrypting token for secure cookie usage.
Added dev/generatesecuretoken to generate this token.
Not storing in YML config directly because of web access issues.
2012-12-13 23:21:48 +01:00
Ingo Schommer
7e4629073a
NEW Date->Ago() with "less than a minute" support
2012-12-13 19:01:27 +01:00
Ingo Schommer
2e9b5e9221
Merge branch 'orm-join-bug' of git://github.com/stojg/sapphire into stojg-orm-join-bug
2012-12-12 15:53:19 +01:00
Ingo Schommer
441bb5f74c
Added travis environment info output
2012-12-12 15:13:26 +01:00
Ingo Schommer
f03ad7b0dd
Merge remote-tracking branch 'origin/3.0' into 3.1
...
Conflicts:
admin/javascript/LeftAndMain.AddForm.js
control/Director.php
control/HTTPResponse.php
dev/Profiler.php
email/Mailer.php
forms/ComplexTableField.php
forms/ManyManyComplexTableField.php
forms/SimpleImageField.php
forms/TableField.php
forms/TableListField.php
javascript/ComplexTableField.js
javascript/ImageFormAction.js
javascript/TableField.js
javascript/TableListField.js
security/Member.php
tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php
tests/forms/TableListFieldTest.php
2012-12-12 10:11:56 +01:00
Ingo Schommer
8fdea7a2ab
Merge pull request #1019 from nyeholt/injector_convert_service_params
...
BUG Fixed issue with convertServiceProperty
2012-12-12 01:07:47 -08:00
Sam Minnée
b618909220
Merge pull request #1007 from simonwelsh/indent-sniff
...
Add codesniffer that ensures indentation is with tabs
2012-12-11 20:46:47 -08:00
Simon Welsh
b0121b541c
Add codesniffer that ensures indentation is with tabs.
2012-12-12 17:33:31 +13:00
Marcus Nyeholt
4f63f91cc8
BUG Fixed issue with convertServiceProperty
...
Fixed issue where convertServiceProperty is called when creating objects
with user-supplied constructor arguments, so that it's only called when
creating objects using injector configuration. This reduces the overhead
of unnecessary calls to convertServiceProperty.
Updated test cases to validate behaviour
2012-12-12 15:22:23 +11:00
Ingo Schommer
6571c17992
Merge remote-tracking branch 'origin/3.0'
2012-12-11 17:16:19 +01:00
Ingo Schommer
e8fbfc0bd1
NEW FixtureFactory separated out from YamlFixture
...
Enables more generic use of the fixture facilities
without dependency on the YAML format, for example
when creating fixtures from Behat step definitions.
Note: The YamlFixture class needs to be created via
Injector::inst()->create('YamlFixture') now,
direct instantiation is no longer supported.
2012-12-11 17:06:27 +01:00
Simon Welsh
fc5dd2994c
Add codesniffer that ensures indentation is with tabs.
2012-12-12 00:12:11 +13:00
Ingo Schommer
98034594e0
Fixed SelectionGroupTest
2012-12-11 11:38:31 +01:00
Ingo Schommer
548ad503ed
API Removed keyed arrays for title/value setting in SelectionGroup
...
Use SelectionGroup_Item class instead. Necessary because
of removal of array key support from ArrayList (see d12b49702
).
2012-12-11 11:06:06 +01:00
Andrew O'Neil
9d74c99e08
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-12-11 10:12:00 +01:00
stojg
efa9ff9b08
API: Queries added by DataList::addInnerJoin() and DataList::leftJoin() come after the base joins, not before.
...
This bug will surface when using the ORM and adding an join to DataList
where a DataObject inherits another DataObject.
If you for example want to restrict the number of pages that only have a
related Staff object:
$list = DataList::create('Page')
->InnerJoin('Staff', '"Staff"."ID" = "Page"."StaffID");
This will create a SQL query where the INNER JOIN is before the
LEFT JOIN of Page and SiteTree in the resulting SQL string. In MySQL
and PostgreSQL this will create an invalid query.
This patch solves the problem by sorting the joins.
2012-12-11 11:04:29 +13:00
Ingo Schommer
0fd6d14f94
Fixed Behat steps for preview feature
2012-12-10 18:06:49 +01:00
Ingo Schommer
fa84c2d705
Merge remote-tracking branch 'origin/3.0'
2012-12-10 17:50:43 +01:00
Ingo Schommer
1e0b0e7f56
More flexible Behat steps for HTML fields
2012-12-10 15:39:20 +01:00
Simon Welsh
aadefbb641
Sort lists that check ordering of results
...
These tests would randomly fail, mostly on Postgres, as the result
is an unordered set, not the ordered set expected.
2012-12-07 08:45:52 +13:00
Will Rossiter
683db8dc1d
API Explicitly load project template files after modules
...
Resolves an issue where if not using the themes directory (i.e just a single app folder) you cannot override module templates.
Changes the SS_TemplateManifest constructor with a new $project argument.
2012-12-04 10:47:37 +01:00
Ingo Schommer
a108f67476
Merge pull request #922 from simonwelsh/rellist-presave
...
NEW: Allows setting of has_many and many_many relations before writing
2012-12-04 01:25:15 -08:00
Damian Mooyman
65002f6b83
BUG GD::greyscale did not correctly preserve alpha component of images Added test cases to test greyscale operation across various image formats Replaced various magic numbers with IMAGETYPE_XXX definitions
2012-12-04 09:47:26 +01:00
Ingo Schommer
fa2057bcd9
Merge remote-tracking branch 'origin/3.0'
...
Conflicts:
search/FulltextSearchable.php
2012-11-30 14:25:06 +01:00
Ingo Schommer
3f67404a8a
Revert "BUGFIX: ArrayList now discards keys of the array passed in and keeps the numerically indexed array sequential."
...
This reverts commit b6017a7c90
.
It breaks SelectionGroup, and its most prominent usage,
the "add page" dialog.
2012-11-30 14:24:03 +01:00
Ingo Schommer
0dba1485a5
Merge remote-tracking branch 'origin/3.0'
2012-11-28 16:36:21 +01:00
Ingo Schommer
9e44672433
Using $TRAVIS_BRANCH again, since its now available on travis-ci.org
2012-11-28 16:35:29 +01:00
Simon Welsh
bbc4443af7
NEW: Allows setting of has_many and many_many relations before writing
...
Adds a new wrapper list, UnsavedRelationList, that maintains the relations until
writing, where it is converted into the correct RelationList.
2012-11-28 09:37:08 +13:00
jean
fbfff8df28
FIX 7934 When lazy loading fields respect version of the record
2012-11-27 17:31:45 +01:00
Ingo Schommer
8108f7f936
NEW Relation search for GridFieldAddExistingAutocompleter
...
Now also searches 1:n relations if they where defined in searchableFields() with dot notation.
2012-11-27 10:51:10 +01:00
Ingo Schommer
c8136f5d4c
NEW Many-many relation data editing in GridFieldDetailForm
...
Also adds GridFieldDetailForm->setFields() for customizing
the displayed form fields (required for adding relational fields).
2012-11-27 10:45:43 +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
Sam Minnée
541e42f922
Merge pull request #887 from tractorcow/3.0-sqlquery-lastrow-fix
...
BUG Fixed isue with SQLQuery->lastRow()
2012-11-15 20:47:33 -08:00
Ingo Schommer
e9d999d648
Support for chosen.js drop downs in behat steps
2012-11-16 15:32:17 +13:00
Ingo Schommer
d86ad20e72
More flexible tabs selection in behat steps
2012-11-16 15:32:17 +13:00
Ingo Schommer
32f829d094
NEW Support for Behat tests, and initial set of tests
2012-11-16 15:31:55 +13:00
Hamish Friedlander
5edf86fe7a
Merge branch '3.0.3' into 3.0
2012-11-16 14:57:50 +13: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
Hamish Friedlander
0dd97a38f6
API: Form#loadDataFrom 2nd arg now sets how existing field data is merged with new data
2012-11-16 12:36:00 +13:00
Sean Harvey
77337ae58c
Removing deprecated TableListField and subclasses
...
These have been moved to a module called "legacytablefields"
located at https://github.com/silverstripe-labs/legacytablefields
2012-11-16 11:04:28 +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
Mateusz Uzdowski
a8b0e44d98
API Hash autologin tokens before storing in the database.
...
Refactor the code to make it clear the distinction is made between a
plaintext token and a hashed version. Rename fields so it is more
obvious what is being written and what sent out to the user.
This reuses the salt and algorithm from the Member, which are kept
constant throughout the Member lifetime in a normal scenario. If they do
change, users will need to re-request so the hashes can be regenerated.
2012-11-09 11:29:42 +01:00
Sean Harvey
88366bf3c8
Adding additional test for populateDefaults() in DataObjectTest
2012-11-07 11:28:36 +13:00
Andrew O'Neil
0c8de0a1de
APICHANGE: Use late static binding for Object::has_extension()
2012-11-07 11:07:55 +13:00
Andrew O'Neil
6dd6a5c188
APICHANGE: Use late static binding for Object::remove_extension()
2012-11-07 11:07:55 +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
Sam Minnée
0238db4182
Merge pull request #898 from TheFrozenFire/feature-ImageBackend
...
ENHANCEMENT: Enable multiple image manipulation back-ends on the Image class
2012-11-04 20:03:57 -08:00
Sean Harvey
fbc6e3366b
Merge branch '3.0'
2012-11-05 15:11:48 +13:00
Will Rossiter
dfd3455802
BUG Only include processed requirements at the top level. ( Fixes #7847 )
...
After each sub template was processed Requirements::includeInHTML() is included which appended requirements again.
2012-11-04 17:54:09 +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
Sean Harvey
2c5c4886b0
Set method visibility to public in FileNameFilterTest
2012-11-02 14:02:22 +13:00
Stig Lindqvist
a29bca3aa4
Merge pull request #901 from halkyon/filenamefilter_underscores_fix
...
BUG FileNameFilter should remove any amount of underscores from start of...
2012-11-01 13:51:51 -07:00
Sean Harvey
cd29b8c74c
Adding additional tests for special characters in FileNameFilterTest
2012-11-02 09:34:34 +13:00
Ingo Schommer
bcbf4636fc
BUG Remove .ss-tabset class from CMS tabs to prevent rogue ajax load ( #7980 )
...
The existence of .ss-tabset triggers JS which applies $.tabs(),
and in turn interprets the first available link as the tab navigation.
jQuery UI subsequently tries to ajax-load this link, which is not
desired. Instead, $.tabs() should *only* be applied to a container
DOM element with .cms-tabset applied.
2012-11-01 00:25:13 +01:00
Ingo Schommer
2d04de0377
BUG FormField->removeExtraClass() works on indexed arrays
...
Was assuming an associative map, which isn't the case
in the current implementations.
2012-10-31 15:44:57 +01:00
Ingo Schommer
da4534bda8
Removed duplicate assertion comments in DropdownFieldTest
2012-10-30 22:46:33 +01:00
Ingo Schommer
666a20fde9
Fixed DropdownFieldTest assertions when tidy is not available
...
It was setting a NULL empty string when constructing the field,
which shouldn't call setEmptyField() in the first place.
This logical error somehow just surfaced when the HTML output
wasn't run through tidy.
See https://github.com/silverstripe/sapphire/pull/886
2012-10-30 22:46:33 +01:00
Ingo Schommer
efabde1416
Merge remote-tracking branch 'origin/3.0'
...
Conflicts:
admin/css/screen.css
admin/scss/_style.scss
security/Member.php
2012-10-30 17:52:49 +01:00
Sean Harvey
1ce279ec9d
BUG FileNameFilter should remove any amount of underscores from start of filename
...
When a user renames a file to "__test.txt" (two underscores or more),
then FileNameFilter will only remove the very first underscore from the
filename. This is not sufficient, as any number of underscores in the
filename will be problematic when Filesystem::sync() is called, it will
remove that File record thinking it's an internal file. This fixes it
so any number of underscores are stripped out at the start of the filename.
2012-10-29 17:07:58 +13:00
Simon Welsh
624f427c2a
Removes line longer than 120c
2012-10-29 10:22:53 +13:00
Will Rossiter
69ea73b4ed
Merge pull request #777 from halkyon/field_edit3
...
Member_ProfileForm respect canEdit() permissions on Member
2012-10-27 20:11:46 -07:00
Simon Welsh
bedb579b07
Merge branch '3.0'
2012-10-23 15:21:20 +13:00
Sean Harvey
f593002b03
Merge pull request #879 from tractorcow/3.0-test-fixes
...
BUG / API Fixes to test cases requiring code for consolidating newlines
2012-10-17 15:24:22 -07:00
Damian Mooyman
0d7816b55d
BUG Fixed issue with Deprecation failing to extract the module from a stacktrace, especially on non-unix systems
...
API Added Convert::nl2os function to normalise end of line characters across systems with tests
BUG Fixed i18n unit tests in non-unix systems constantly failing
BUG Fixed problems with HTMLCleaner tests failing in non-unix systems
2012-10-17 11:57:16 +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
1181ba089a
Merge remote-tracking branch 'origin/3.0'
...
Conflicts:
.travis.yml
2012-10-16 10:26:04 +02:00
Sean Harvey
a171c7e4b0
BUG Fixing regression in 26d70d6fca
with formatted output in SS_HTMLValue
...
If formatOutput is set to TRUE, then the regexes in getContent()
will not match the newlines, and the output will include html, body
and meta tags. Introduce a few new tests to ensure the output is
correct, and fix the regex.
2012-10-16 11:59:30 +13:00
Sean Harvey
f6a90467e4
Merge branch '3.0'
2012-10-15 10:10:01 +13:00
Ingo Schommer
5be3a4c35a
NEW DataList->filterAny()
2012-10-12 15:24:25 +02:00
Robert Curry
4c35c302d2
Exclude test/travis/_config.php from being include in the test manifest.
2012-10-12 17:07:42 +13: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
38e7df2e91
NEW Enable SiteTree::$nested_urls by default
2012-10-08 17:05:05 +02:00
Ingo Schommer
d1ee7612f5
Merge remote-tracking branch 'origin/3.0'
2012-10-08 16:48:52 +02:00
Normann Lou
9aaa6b1a7b
ENHANCEMENT: change those harded-coded 'sapphire' to 'framework' either in javascript code or inline document, or a <a> href propty.
2012-10-05 17:00:39 +13:00
Simon Welsh
5768e421dc
Merge branch '3.0'
2012-10-05 14:40:32 +13:00
Simon Elvery
de36063d15
ENHANCEMENT Make it possible to extend SS_Log
...
Using late static binding makes it possible to override SS_Log to create
logs which are separate to the main Silverstripe log but still use the
built in functionality.
Add test for SS_Log subclassing.
2012-10-04 16:34:20 +10: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
Damian Mooyman
f265595c1e
NEW: GridFieldPageCount control for displaying the current page count/total in the gridview header. Designed to complement a functional pager in the grid footer.
...
NEW: GridFieldPageCount widget to default config settings
FIX: @extend .col_buttons in GridField.scss which was raising a warning
2012-10-03 14:54:37 +13:00
Sam Minnee
b7e7c165ff
NEW Amend Travis build to run a simple PHP_CodeSniffer test.
...
At this stage, the test just checks line-length and line-endings, but previous commits have ensured that framework actually passes those tests. We can add more tests as we actually correct the code to pass those tests, and grow the test suite, as we had for unit tests.
2012-09-30 17:28:46 +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
Ingo Schommer
356a367eb5
BUG Setting response length directly before output ( fixes #7574 )
...
Complying to HTTP1.1/RFC2616 in terms of when to
set 'Content-Length' in the first place
2012-09-29 17:24:33 +02:00
Frank Mullenger
a602ba5941
BUGFIX: Old version of SimpleTest does not recognise input fields of
...
type 'email'.
2012-09-28 12:07:54 +12:00
Damian Mooyman
d54ef36b47
FIXED: CSV Test cases now use platform-correct linebreak characters
2012-09-27 13:54:19 +12:00
Damian Mooyman
5ea2c3dc5a
FIXED: Unnecessarily strict comparison of path separators in windows filenames
2012-09-27 13:41:28 +12:00
Sam Minnee
39952f4a5c
API: Added 'onBeforeHTTPError' and 'onBeforeHTTPError<code>' extension points to RequestHandler::httpError().
...
These APIs are primarily intended to let developers write custom 404 handlers. They can define an onBeforeHTTPError404() method on an Extension that gets added to Controller or RequestHandler.
The SS_HTTPResponse_Exception object has also been tidied up to override the status info of any SS_HTTPResponse object that might get passed. This is mainly to make it easier for callers (such as ContentController and ModelAsController) to use RequestHandler::httpError() more consistently.
2012-09-27 12:26:25 +12:00
Ingo Schommer
33f67e1ad8
Fixed FulltextSearchable regression from 21a6390d
2012-09-26 11:28:25 +02:00
Howard Grigg
aa6f345d1d
API FormField::name_to_label() for unlabelled fields
...
Will convert camel case to spaces, e.g. "TotalAmount"
to "Total Amount".
2012-09-26 11:20:34 +02: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
e44a3558dd
Merge pull request #793 from halkyon/htmlvalue_parsing_fixes
...
BUG HtmlEditorField doesn't save HTML fragments in HTMLValue correctly
2012-09-20 02:09:36 -07:00
Ingo Schommer
e2f073f38a
Method visibility according to coding conventions
2012-09-20 10:46:59 +02:00
Sean Harvey
b075fa29c5
Have tiny_mce_gzip.php use local silverstripe-cache folder if available
...
This is a fix for ticket #7670 . Some hosting situations don't
allow write access to the system temp path. tiny_mce_gzip.php is currently
using sys_get_temp_dir() by default, and not using a local silverstripe-cache
folder that may exist in the SilverStripe project.
This change moves the getTempFolder() function into a common file, and
includes that in core/Core.php, as well as thirdparty/tinymce/tiny_mce_gzip.php
so both locations share the same code to work out the temp path.
2012-09-19 16:43:17 +12:00
Sean Harvey
26d70d6fca
BUG HtmlEditorField doesn't save HTML fragments in HTMLValue correctly
...
The issue was raised in #7628 , where an anchor tag was being changed from
<a name="anchor"></a> to <a name="anchor"/> by SS_HTMLValue, when
HtmlEditorField::saveInto() parses the HTML fragments.
This is because SS_HTMLValue uses DOMDocument::saveXML(), which is fine
for saving an XML document, but not suitable for HTML. This fix changes
that to use DOMDocument::saveHTML() instead.
Note that we can't use the parameter to saveHTML() for selecting a single
node only, as that's only supported in PHP 5.3.6+, SilverStripe 3.0 supports
PHP 5.3.2 as a minimum. The workaround for this shortcoming is to replace
unncessary output by DOMDocument with a regular expression.
2012-09-19 11:39:01 +12:00
Simon Welsh
4e3c684b62
Merge branch 'bugfix/apishortcodes' of https://github.com/elliot-sawyer/sapphire into 3.0
2012-09-18 16:36:11 +12: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
Elliot Sawyer
71758c782f
ISSUE 7833: Invoke ShortcodeParser on RestfulServer output
2012-09-17 17:53:51 +12: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
b0fc1cb16a
Merge branch '3.0.2' into 3.0
2012-09-12 11:05:50 +02:00
Ingo Schommer
99b1bc672b
Don't rely on hardcoded IDs in DataListTest (breaks postgres)
2012-09-12 10:51:40 +02:00
Ingo Schommer
8772eb3e18
Merge branch '3.0.2' into 3.0
2012-09-12 09:50:38 +02:00
Ingo Schommer
d5313aa6a4
BUG Fixed SSViewerTest execution in non-dev environments
2012-09-12 09:50:10 +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
Sean Harvey
e73d28b24e
Fixing unit test to restore extensions after test
2012-09-10 14:09:40 +12:00
Ingo Schommer
1088d044c5
Merge remote-tracking branch 'origin/3.0'
...
Conflicts:
.travis.yml
2012-09-07 17:21:41 +02:00
Sean Harvey
5cbd2dbeb4
BUG CMSProfileController::Member_ProfileForm() respecting canEdit() permissions on Member
...
CMSProfileController currently checks canView() which ensures that a logged in CMS
Member can access the profile controller, but when saving the record on Member_ProfileForm
there is no check for canEdit(), so extended permissions don't get respected.
This adds a check for canEdit() in Member_ProfileForm, and adds some functional tests
to check permissions.
2012-09-07 11:24:47 +12:00
Simon Welsh
4ead89a4d0
API Adds getManipulatedList() method to GridField to get the SS_List after applying Manipulators
2012-09-06 23:42:48 +12:00
Sean Harvey
b6a6c4670e
NEW Allow setting default cache lifetime, and test that it's being used correctly on new caches
2012-09-03 12:55:19 +12:00
Ingo Schommer
2facc31e1f
BUGFIX Case insensitive search filters for PostgreSQL ( fixes #6548 )
2012-09-02 23:02:20 +02:00
Ingo Schommer
a71077c9e9
Merge branch 'aa_function' of git://github.com/simonwelsh/silverstripe-framework into simonwelsh-aa_function
2012-08-29 11:58:02 +02: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
Sam Minnée
c738744c38
Merge pull request #740 from tractorcow/3.0-route-fixes-alt
...
FIXED: Issue where route table arguments would not be accessible without using non deprecated API
2012-08-28 17:41:30 -07:00
Sam Minnee
09e3fa4e6a
Removed pre-emptive dev/build from travis test run, to make it faster.
2012-08-29 12:10:58 +12:00
Simon Welsh
9d2686130c
Merge cd61b61
from master
2012-08-29 11:18:41 +12:00
Sam Minnee
abbce151d9
Updated Travis-CI configuration to have a 4 build grid.
...
The Travis config will now run tests on the following instances
* 5.3 + SQLite
* 5.3 + MySQL
* 5.3 + PostgreSQL
* 5.4 + MySQL
In other words, with the exception of Windows tech (MSSQL + Win server) this is a wide-coverage build config.
2012-08-28 16:25:26 +12:00
Sam Minnee
c2afca2cd8
Merge branch '3.0'
2012-08-28 16:08:57 +12:00
Sam Minnée
93cdb83ac8
Merge pull request #738 from simonwelsh/lsb-53-30
...
FIX Removes version checking for LSB in Object::static_lookup()
2012-08-27 21:07:29 -07:00
Ingo Schommer
a8f335360b
Merge remote-tracking branch 'origin/3.0'
2012-08-27 09:25:59 +02:00
Hamish Friedlander
8b6e4f5a90
Add some basic tests for ConfigManifest#relativeOrder
2012-08-27 16:42:25 +12:00
Damian Mooyman
9b6216d967
FIXED: Error in test case deprecation
2012-08-27 11:04:16 +12:00
Damian Mooyman
c2a8eec43c
APICHANGE: Changed behaviour of HTTP_Request::params to include route table params (as per 2.4 behaviour, see FIX: below).
...
ADDED: HTTP_Request::params() to retrieve all (shifted) params used in the request
FIXED: Issue where route-table level arguments would not be accessible without using non-deprecated API.
ADDED: Test case to test the above items
UPDATED: Extended Director::test to allow for the retrieval of the request object
UPDATED: Deprecated notice on Director::urlParam and Director::urlParams
REMOVED: Unused variable
FIXED: Coding convention conformity
2012-08-27 10:56:59 +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
Simon Welsh
f1db583fb4
NEW Allow arguments to be passed to allowed_action checkers
...
This allows arguments to be passed along in an $allowed_actions deceleration of
the form 'action' => '->method' in the same way that arguments can be passed to
extension constructors when adding them using $extensions or
Object::add_extension.
I.e. 'action' => '->checkerMethod(false, 7, 2, "yesterday") would call the
checkerMethod method with the boolean false the numbers 7 and 2 and the string
"yesterday" as its arguments.
2012-08-23 17:05:12 +12:00
Sam Minnee
824afffd2e
Merge branch '3.0'
2012-08-23 12:39:41 +12:00
Sam Minnee
f6334dd017
Added default sort to test data for better cross-db performance.
2012-08-23 12:38:33 +12:00
Fred Condo
3e0782267c
Allow scheme-relative URLs in requirements
...
The Requirements class currently treats only absolute URLs as URLs, and
tries to interpret anything else as a filesystem path. This prevents
using scheme-relative URLs for requirements.
Example:
<% require javascript(//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js) %>
This forces the unfortunate choice of not using a CDN for common
scripts, always using an https absolute URL, or accepting that some
browsers will throw a security warning when viewing the site in https.
This change allows scheme-relative URLs & updates RequirementsTest.
2012-08-22 16:49:55 -07:00
Sam Minnee
866d9a94ee
Updated Travis-CI configuration to have a 3 database build grid.
2012-08-21 10:42:34 +12:00
Ingo Schommer
4cc82e906b
Merge remote-tracking branch 'origin/3.0'
2012-08-20 10:13:55 +02:00
Sam Minnée
47b56d4ef8
Merge pull request #716 from tractorcow/3.0-versioned-fixes
...
FIXED: Crashed caused by viewing versioned page
2012-08-19 19:02:24 -07: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
Ingo Schommer
6d41cd8d09
Merge pull request #686 from wilr/3.0-rssfeed
...
FIX: use standard template rendering process for RSS feeds
2012-08-16 14:45:44 -07:00
Ingo Schommer
5a2247a440
Merge pull request #589 from simonwelsh/absolute_url
...
FIX Director::is_absolute_url() now ignores query string
2012-08-16 11:50:29 -07:00
Sam Minnee
2dadc77e99
Revert "Make PHPUnit bootstrap add flush=1"
...
This reverts commit e0037967c2
.
Conflicts:
tests/travis/_ss_environment.php
2012-08-14 19:01:30 +12:00
Sam Minnee
fe1434678b
Revert "Make PHPUnit bootstrap add flush=1"
...
This reverts commit e0037967c2
.
Conflicts:
tests/travis/_ss_environment.php
2012-08-14 19:00:57 +12:00
Sam Minnee
2c62dda47a
Fixed Travis CI and make it use SQLite
2012-08-14 17:02:28 +12:00
Sam Minnee
e0037967c2
Make PHPUnit bootstrap add flush=1
2012-08-14 17:02:12 +12:00
Sam Minnee
0e08840ff9
Fixed Travis CI and make it use SQLite
2012-08-14 16:45:13 +12:00
Sam Minnee
4d1c2ed4fc
Make PHPUnit bootstrap add flush=1
2012-08-14 16:44:32 +12:00
Sam Minnee
8d92046769
Added support for Travis CI
2012-08-14 16:06:21 +12:00
Sam Minnee
04e3beddf5
Added support for Travis CI
2012-08-14 16:02:12 +12:00
Will Rossiter
7558d32da6
FIX: use standard template rendering process for RSS feeds
...
This changes the behaviour of output to browser to use the standard SilverStripe rendering process rather than an echo statement to enable easier testability.
2012-07-31 20:38:41 +12:00
Hamish Friedlander
95d0be636c
Merge remote-tracking branch 'origin/3.0'
2012-07-25 11:44:53 +12:00
Hamish Friedlander
36c8fc2e93
Merge pull request #660 from silverstripe-rebelalliance/trac/7673
...
API Prep ArrayList, DataList, forForeignID for immutability in 3.1 per 7673
2012-07-22 21:30:53 -07:00
Hamish Friedlander
e160b76df5
BUG 7362 dont include trailing space in bare string
2012-07-23 15:42:58 +12:00
Hamish Friedlander
b7691077cf
API Prep forForeignID for immutability in 3.1 per 7673
2012-07-23 10:31:47 +12:00
Ingo Schommer
3ae8b0b665
Merge remote-tracking branch 'origin/3.0'
2012-07-18 15:00:06 +02:00
Ingo Schommer
1a91431d39
Query param searches for GridFieldAddExistingAutocompleter
...
Fixes issues with query construction in JS when the search URL
already contains GET paramters (e.g. when using the 'translatable'
module).
2012-07-17 13:26:33 +02: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
712f28bc78
Scoped deprecation messages ( fixes #7645 )
2012-07-13 11:37:35 +02:00
Ingo Schommer
bc1c7f766a
Add sorting to GridFieldDetailFormTest fixtures
...
Broke SQLite3 tests in some cases due to random ordering of results.
2012-07-06 12:42:42 +02:00
Ingo Schommer
64669938da
Warning when running tests without flush=1
...
This is now the default setting for both "sake" and "phpunit"
runs, because of performance reasons (every manifest flush takes
multiple seconds). On the other hand, we want to make errors
like missing classes more obvious to developers.
See discussion in https://github.com/silverstripe/sapphire/pull/620
2012-07-06 12:01:21 +02:00
Ingo Schommer
c072dc4757
Merge pull request #620 from chillu/pull/no-flush-on-tests
...
No flush in framework/tests/bootstrap.php (kills TDD) (for 3.0 branch)
2012-07-06 03:00:57 -07: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
bc99382513
Merge pull request #609 from willrossi/trac6672
...
FIX: improve Director::makeRelative() to ignore SSL changes.
2012-07-05 09:34:23 -07:00
Ingo Schommer
4b9ccabcf6
Merge pull request #603 from willrossi/trac7296
...
FIX: ensure permissions_for_member() accounts for denied permissions
2012-07-05 09:26:04 -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
Ingo Schommer
c8c84b0935
Don't flush manifest in test bootstrap for performance reasons
...
Leave the decision to the phpunit.xml config (via <get> setting),
or to the individual run via "phpunit <folder> '' flush=1".
Flushing takes multiple seconds even on my fast SSD,
which greatly reduces the likelyhood of developers adopting TDD.
2012-07-05 13:33:02 +02:00
Ingo Schommer
85480142c1
CLI bootstrap: Merge existing $_GET and $_REQUEST data
...
Necessary to have the <get name="db" /> directive
working in phpunit.xml definitions, which in turns allows
us to use GET parameters to switch the database connection
for running automated tests.
2012-07-04 15:20:08 +02:00
Sean Harvey
ea910a5174
Merge pull request #608 from willrossi/trac6441
...
API: add api for setting a custom template on RSS feed.
2012-07-01 18:54:33 -07:00
Tim Klein
a67b964267
FIX: improve Director::makeRelative() to ignore SSL changes.
...
See http://open.silverstripe.org/ticket/6672 . Expanded on initial patch with test coverage. Fixes another one of the commented out cases in the test by picking up URL's which do not include a protocol.
2012-07-01 22:08:09 +12:00
Will Rossiter
f1db65d6b6
API: add api for setting a custom template on a RSS feed.
...
See initial idea at http://open.silverstripe.org/ticket/6441 . Added $template property and corresponding getters / setters for customizing the template used. Added relevant unit test.
2012-07-01 21:27:50 +12:00
Will Rossiter
f9ea5430bb
API: add SecurityToken::reset() as a shortcut for regenerating a secure token.
...
See http://open.silverstripe.org/ticket/6303
2012-07-01 20:53:58 +12:00
Will Rossiter
9babb01a4b
FIX: ensure that permissions_for_member() accounts for denied permissions.
...
Taken from http://open.silverstripe.org/ticket/7296 . PermissionTest extended to validate that permissions_for_member() includes permissions denied pre applying patch. PermissionTest passes post patch.
2012-07-01 17:55:20 +12:00
Simon Welsh
e0505406a7
FIX Director::is_absolute_url() now ignores query and fragment strings
...
Director::is_absolute_url() checks for //. It used to include the
entire URI, now it ignores the query and fragment strings.
2012-06-30 23:48:43 +12:00
Ingo Schommer
976f1f5da0
Merge pull request #593 from willrossi/trac3881
...
API: add $includeGetVars flag for SS_HTTPRequest().
2012-06-29 05:41:48 -07:00
Ingo Schommer
8014a67028
Merge pull request #592 from willrossi/trac6156
...
FIX: ensure RestfulServiceTest uses email as the unique identifer field
2012-06-29 05:39:05 -07:00
Ingo Schommer
496c240bc9
Merge pull request #591 from willrossi/sqlquerylimitfix
...
FIX: ensure limits to SQLQuery are passed as positive values
2012-06-29 05:36:24 -07:00
Will Rossiter
16cb504d8e
API: add $includeGetVars flag for SS_HTTPRequest() to return the URL with the attached GET parameters.
2012-06-29 22:02:30 +12: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
4977318f46
FIX: ensure RestfulServiceTest uses email as the unique identifer field for running tests. Fixes : #6156 .
2012-06-29 20:45:57 +12:00
Will Rossiter
4ee709e88d
FIX: ensure limits to SQLQuery are passed as positive values
2012-06-29 19:40:28 +12:00
Michał Ochman
c282190299
ENHANCEMENT Add YamlFixture String argument support
...
Enhanced YamlFixtureTest to cover this addition.
2012-06-29 00:33:00 +02: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
Ingo Schommer
6af3b076be
MINOR Fixed phpdocs
2012-06-20 23:59:57 +02:00
Ingo Schommer
3a7128d00c
MINOR Fixed phpdocs
2012-06-20 23:59:16 +02:00
Will Rossiter
d82b67cf97
ENHANCEMENT: remove dependencies between framework tests and cms module.
2012-06-20 16:28:06 +02:00
Will Rossiter
a4bce3fc44
ENHANCEMENT: remove dependencies between framework tests and cms module.
2012-06-20 16:17:29 +02:00
Ingo Schommer
417c03716c
BUGFIX Avoid Session::set() clearing on existing val ( fixes #7487 )
2012-06-17 23:46:52 +02:00
Ingo Schommer
eff93bdd5b
ENHANCEMENT Disable UploadField when handling unsaved relations ( fixes #7187 )
2012-06-15 17:44: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
Simon Welsh
9bd7765272
API CHANGE Renames Transliterator to SS_Transliterator
...
The intl extension in PHP 5.4 provides a Transliterator class, which
conflicts with the SilverStripe one. This leads to some really weird
ReflectionExceptions about Transliterator's constructor being
private.
2012-06-15 15:54:47 +12:00
Sam Minnee
09e821efc3
MINOR: Don't leave cost=31 blowfish setting dormant in code, causing timeouts.
2012-06-15 13:47:38 +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
Sam Minnée
51af3f6557
Merge pull request #527 from camspiers/9139f737b8c12587e637452a2a388a6c84a90201
...
Added ability to set the cost of the blowfish crypt algorithm.
2012-06-14 16:52:28 -07:00
Sam Minnée
dda9683758
Merge pull request #530 from nyeholt/injector_updates
...
A resubmission of a previous pull request. Contains a couple of bugfixes (including ticket #7448 ) and minor usage enhancements
2012-06-14 16:42:30 -07:00
carlos barberis
856991d644
BUGFIX: Ticket #6069 Checking of URLSegment can end in an infinite loop (when saving Page in CMS)
2012-06-15 11:27:58 +12:00
Marcus Nyeholt
77099ddf9d
BUGFIX Moved initialisation of injector to the start of Core.php to make sure that it is initialised correctly before additional code blocks reference it (in particular some of the code introduced by Sam that is triggered during add_extension).
2012-06-14 20:28:20 +10:00
Marcus Nyeholt
56388ef1d8
BUGFIX Make sure to only construct args for prototype object creation if
...
there are actually args passed through to prevent overwriting with null
args if they're passed
MINOR Added __get alias to remove need for explicit ->get() call
MINOR Added the injector instance as an object that can be injected into other classes
BUGFIX Fixed issue described in http://open.silverstripe.org/ticket/7448 whereby using the injector to create an object of a type already registered as a singleton would actually overwrite the stored singleton object
2012-06-14 18:22:02 +10:00
Cam Spiers
9139f737b8
ENHANCEMENT: Added the ability to set a cost (the property was protected before and there were no setters and getters) and enforced the php requirements on the cost string used in the salt of crypt. Specifically, two digit from 04-31. Updated unit tests for blowfish algorithm to actually use the salt generation function and to test the newly implemented cost setting and getting functionality.
2012-06-14 15:13:11 +12:00
Ingo Schommer
8ecdd0b082
Merge branch 'pjax-set-fragments' of https://github.com/mateusz/sapphire into mateusz-pjax-set-fragments
2012-06-13 10:31:09 +02:00
Will Rossiter
78c15ea882
BUGFIX: Fix correct input type for ImageFormAction replaces.
...
ImageFormAction is deprecated, using the new API results in a submit input rather than an image input being generated. Added hasAttribute helper to FormField as well as test coverage.
2012-06-13 09:57:54 +02:00
Mateusz Uzdowski
377ac50773
ENHNANCEMENT: allow overriding of PJAX fragments included in the response.
2012-06-13 12:57:11 +12:00
Sean Harvey
e1ebb4a8eb
MINOR Fixing broken test for PostgreSQL
2012-06-12 14:54:19 +12:00
Sam Minnee
c41ff29d70
MINOR: Don't rely on singleton() inappropriately in FormScaffolderTest
2012-06-11 22:46:42 +12:00
Sam Minnee
114ebb6953
API CHANGE: Don't have any instance caching in singleton(), rely on Injector for this.
2012-06-11 22:41:12 +12:00
Ingo Schommer
b4fb174809
MINOR Fixed PjaxResponseNegotiatorTest
2012-06-05 14:22:00 +02:00
Ingo Schommer
12f2e1e176
Merge branch 'pjax-multiple'
2012-06-05 14:01:18 +02:00
Ingo Schommer
9e21fb8a4a
API CHANGE Moved SapphireSoapServer and SOAPModelAccess into its own module at https://github.com/silverstripe/silverstripe-soapserver ( fixes #7282 )
2012-06-04 10:22:48 +02: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
5462cdaab2
MINOR Removing "." from the end of validation messages
2012-06-01 13:13:06 +12:00
Ingo Schommer
473eda43cb
ENHANCEMENT Allowing multiple fragments to be returned by PjaxResponseNegotiator through JSON
2012-05-30 15:07:13 +02:00
Sean Harvey
c4a1523fac
Merge pull request #465 from halkyon/aggregate_fixes
...
Deprecated aggregates fix
2012-05-30 02:04:36 -07:00
Ingo Schommer
c3d8d82d52
MINOR Testing languages without fallbacks (related to #7386 )
2012-05-29 13:54:49 +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
Sam Minnee
07c4860031
MINOR: Fixed test
2012-05-28 16:20:28 +12:00
Sam Minnee
db79739023
BUGFIX: Fixed inconsistencies in en vs. en_US handling in i18n
2012-05-28 14:10:58 +12:00
Sean Harvey
ddd2d3af95
MINOR Fixing broken i18nTest
2012-05-28 12:29:50 +12:00
Sam Minnée
1772355ef3
Merge pull request #484 from simonwelsh/multipe-shortcodes
...
BUGFIX: Handle consecutive shortcodes.
2012-05-23 22:56:40 -07:00
Mateusz Uzdowski
5b845248ed
ENHANCEMENT: add test to Oembed
2012-05-24 17:00:22 +12:00
Sean Harvey
60c72c40d9
API CHANGE Use of the DropdownField $emptyString argument is now
...
properly deprecated (has been marked as deprecated since 2.3). Please
use setEmptyString() on the DropdownField instance instead.
2012-05-23 22:59:40 +12:00
Simon Welsh
a172a2e731
BUGFIX: Handle consecutive shortcodes.
2012-05-23 18:18:06 +12:00
Sean Harvey
f446547cd7
MINOR Using Config system instead of Director::addRules() in tests
2012-05-22 17:13:05 +12:00
Sean Harvey
b68e426844
MINOR Removing dodgy conditional tests in SSViewerTest
2012-05-19 18:09:57 +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
Marcus Nyeholt
b269badfbe
FEATURE: Added dependency injector for managing creation of new objects and their dependencies.
...
API CHANGE: Pass Object::create() calls to Injector::create().
API CHANGE: Add "RequestProcessor" injection point in Director, that Director will call preRequest() and postRequest() on.
2012-05-18 12:39:57 +12:00
Normann Lou
5290b81c55
ENHANCEMENT: don't show the paginating elements in the paginator when only one page, and keep 'view 1 - 5 of 5' there
2012-05-18 11:31:33 +12:00
Ingo Schommer
0a6ec3d9c9
Merge pull request #443 from halkyon/sapphire
...
---
2012-05-14 15:33:48 +02:00
Ingo Schommer
45ae2465e8
Merge pull request #438 from ajshort/sapphire
...
---
These are some enhancements + tweaks I made as part of getting the advanced workflow module running in SS3:
* Added a readonly view button and action to GridField.
* Made LeftAndMain::getResponseNegotiator() public so CMS extensions can use it to generate responses.
* Fixed top tab background, made text more readable (http://i.imgur.com/yDmmY.png ).
* Allow fields in the CMS to not be change tracked using ".no-change-track".
* Made all icons 16x16 (some were different sizes, being cut off), and allow them without .ui-state-default.
* Fixed ToggleCompositeField and tweaked field styling.
2012-05-14 14:25:16 +02:00
Sean Harvey
9da92e04cf
API CHANGE Renamed setContainerFieldSet() to setContainerFieldList() to match the FieldList API.
...
API CHANGE Renamed rootFieldSet() to rootFieldList() to match the FieldList API.
2012-05-14 15:16:44 +12:00
Andrew Short
05cde92508
FEATURE: Implemented a view action for GridField, and a record viewing GridFieldConfig.
2012-05-12 18:49:56 +10:00
Ingo Schommer
368081f63c
MINOR Supressing deprecation warnings in FieldListTest for new FieldList->rewriteTabPath() invocations
2012-05-12 09:58:37 +02:00
Sean Harvey
91c356a0c6
MINOR Disabling offending MIME type test case on multiple operating systems. See
...
pull request #432 for more information.
2012-05-12 10:21:23 +12:00
Sean Harvey
0fe0d87d9f
Merge pull request #434 from halkyon/using_non_deprecated_template_controls
...
Replacing use of deprecated <% control %> with <% with %> or <% loop %> as necessary
2012-05-11 15:08:16 -07:00
Ingo Schommer
ffbcf634bb
Merge pull request #420 from chillu/sapphire
...
---
See http://open.silverstripe.org/ticket/7261
2012-05-11 13:42:47 +02:00
Ingo Schommer
13c9011082
Merge pull request #430 from halkyon/getallfields_fixes
...
MINOR Fixing use of deprecated getAllFields(), mark field as deprecated ...
2012-05-11 01:04:38 -07:00
Simon Welsh
ab34688273
BUGFIX: Looping over a PaginatedList in the template caused a seg fault/bus error.
2012-05-11 14:03:31 +12:00
Sean Harvey
6f672e5f36
MINOR Fixing use of <% control %> with <% with %> or <% loop %> as necessary.
2012-05-11 13:49:20 +12:00
Sam Minnée
f27de361d8
Merge pull request #433 from halkyon/use_of_deprecated_code
...
Replacing internal use of deprecated code
2012-05-10 17:16:44 -07:00
Stig Lindqvist
dffae1a2e7
API CHANGE: Do not rely on a specific OS mime type detection, use PHP finfo
...
This also removes the $global_mimetypes that was generating weird errors when both HTTP and Mailer classes tried to modify and use it.
Support of finfo should be straightforward since PHP 5.3 includes that module that default
2012-05-11 11:34:07 +12:00
Sean Harvey
23c93b9a44
MINOR Fixing ArrayDataTest to use toMap() instead of getArray() which is deprecated.
2012-05-11 11:27:36 +12: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
321483f097
Merge pull request #422 from silverstripe-scienceninjas/member-mapInGroup
...
BUGFIX: Member::mapInGroups() throws SQL error
2012-05-09 19:28:29 -07:00
Sean Harvey
56e75b4486
MINOR Revert changes for 5.4
2012-05-10 14:11:33 +12:00
Stig Lindqvist
bbe3879eaa
BUGFIX: Member::mapInGroups() throws SQL error
...
Renamed the Member::mapInGroups() to Member::map_in_groups() since it's a static method and throws deprecation message if using the old variant.
Rewrote the mapInGroups to use a more ORMy way of fetching Members for a set of groups and included a test for.
2012-05-10 13:53:54 +12:00
Sean Harvey
7dcfdb05fa
MINOR Fixing broken test on PHP 5.4
2012-05-10 13:40:35 +12:00
Sean Harvey
68c5066adf
MINOR Remove old _ALL_CLASSES from old manifest builder (has been replaced since)
2012-05-10 13:25:04 +12:00
Ingo Schommer
8c9560d288
ENHANCEMENT FieldList->setTabPathRewrites() for better backwards compatibility (see #7261 )
2012-05-09 17:18:16 +02:00
Sean Harvey
a1d676d353
BUGFIX Ensure PHPUnit 3.6 is available, show a nice message if not
2012-05-09 23:40:25 +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
Sean Harvey
8b607db0a2
BUGFIX Fixing bootstrap.php to work with FakeController properly for
...
running tests using phpunit.xml file.
2012-05-09 23:05:38 +12:00
Ingo Schommer
41b51a17ce
MINOR Isolating testRaw2URL settings
2012-05-08 22:13:03 +02: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
5bce3425b4
Merge pull request #401 from chillu/is-absolute-url
...
Director::is_absolute_url() security fixes
2012-05-07 18:47:03 -07:00
Ingo Schommer
15e8e10f5e
Merge pull request #411 from ajoneil/blowfish
...
MINOR: Fix coding conventions
2012-05-07 15:56:03 -07:00
Andrew O'Neil
0c0a91e3c1
MINOR: Fix coding conventions
2012-05-08 10:33:03 +12: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
Sam Minnée
0a5616a208
Merge pull request #408 from ajoneil/blowfish
...
Fix blowfish encryption
2012-05-06 20:34:46 -07:00
Andrew O'Neil
5cf3720bf0
ENHANCEMENT: Use the best blowfish encryption available - this fixes fragility between PHP versions and system installations
2012-05-07 15:04:09 +12:00
Andrew O'Neil
89fc8e5fdd
APICHANGE: PasswordEncryptor::check() allows for more powerful password checking, deprecating PasswordEncryptor::compare()
2012-05-07 15:03:53 +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
Ingo Schommer
d5b3dbc6fb
SECURITY Return true for Director::is_absolute_url() checks if they're prefixed with two or more slashes (as browsers interpret this as a valid URL)
...
SECURITY More solid URL checks in Director::is_site_url(), using a conservative parse_url() hostname comparison rather than Director::makeRelative(), which is not designed for security purposes
2012-05-04 12:10:59 +02:00
Ingo Schommer
68051fdb96
Merge pull request #371 from halkyon/sapphire
...
---
Dont start the session until its actually necessary, which is to say there is a cookie available with the current PHP session name (or a request variable with the session_name() - typically PHPSESSID.) The latter allows for passing session ID through as an alternative to cookies.
2012-05-03 14:58:09 +02:00
Normann Lou
3b3b515571
API CHANGE Read-only fields no longer include companion hidden fields (see pull request #399 )
...
BUGFIX Remove legacy code and template which is never picked-up so that TextareaField becomes 'readonly' when it is transfered to readonly field. Change TextareaFieldTest test cases to address a 'readonly' textarea field displaying the special html characters correctly.
2012-05-03 14:24:03 +02:00
Sean Harvey
450bc258d8
MINOR Fixing broken SQLQueryTest cases
2012-05-03 13:09:50 +12:00
Sean Harvey
521d436b45
MINOR Fixing broken test in pgsql
2012-05-03 11:22:54 +12:00
Sean Harvey
151abde17d
Merge pull request #388 from chillu/trac/7170-i18n-sprintf-injections
...
#7170 i18n sprintf injections
2012-05-02 16:18:30 -07:00
Sean Harvey
6483cdd204
Merge pull request #382 from chillu/trac/7217-group-default-on-member
...
Group default on member (#7217 )
2012-05-01 21:43:05 -07:00
Andrew O'Neil
fa60f9e8b2
ENHANCEMENT: Implement blowfish encryption and use it by default. ( #7111 )
2012-05-02 13:51:29 +12:00
Ingo Schommer
7b18d9d0da
MINOR Switching _t() calls from sprintf() to using injection parameters ( #7170 )
2012-05-01 22:17:00 +02:00
Ingo Schommer
e949b6f2b0
ENHANCEMENT Backwards compatible $priority parameter for i18n::_t(): Allow numeric arrays as parameters, as well as %s style replacements with a named parameter map (easier transition to new system with existing translation strings)
2012-05-01 22:17:00 +02: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
Ingo Schommer
517a0c9e48
MINOR Moving FakeController class (required for bootstrap.php) into its own file, so that autoloading doesn't execute bootstrap (which is the case when invoking TestRunner->module())
2012-04-30 15:04:59 +02:00
Ingo Schommer
72eadef113
ENHANCEMENT GridFieldDetailForm->setItemEditFormCallback()
2012-04-30 13:46:51 +02:00
Ingo Schommer
fed2785173
ENHANCEMENT Per-instance customisation of GridFieldDetailForm_ItemRequest
2012-04-30 12:31:17 +02:00
Robert Curry
ff6909df97
ENHANCEMENT: Add lazy loading to DataQuery.
2012-04-30 16:12:15 +12:00
Sean Harvey
f63d137d49
ENHANCEMENT Session::start() now only called when there is changed
...
session data to be saved, and started on Director::direct() when there
is a cookie (or request var) containing the current PHP session name.
2012-04-27 16:28:46 +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
Sean Harvey
8a6671d72e
BUGFIX Member::onChangeGroups() should allow ADMIN permission grant if the logged in user is an ADMIN
2012-04-27 12:27:46 +12:00
Sean Harvey
bb20587f01
ENHANCEMENT GridFieldExportButton allows an anon function to return the
...
value of a related object. Useful for handling has_many/many_many data
in a single CSV column.
2012-04-23 20:26:41 +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
Sean Harvey
007ed25c0b
MINOR Fixing broken tests
2012-04-20 15:05:18 +12:00
Sam Minnee
8e48e6e231
API CHANGE: Allow <classname>::get(), eg, Member::get()->byID(5)
2012-04-20 14:58:24 +12:00
Robert Curry
ee53df336d
BUGFIX: Removed assumption in GridFieldDataColumnsTest that Member would always have the same summary fields.
2012-04-20 11:38:06 +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
Robert Curry
842784c8aa
ENHANCEMENT: Fixes #7010 . Move DisplayFields, FieldCasting and FieldFormatting functions from GridField to GridFieldDataColumns.
2012-04-19 12:44:59 +12:00
Mateusz Uzdowski
a9e7de0cf4
BUGFIX: make UploadField aware of relations to derived classes (os7140)
...
UploadField was relying entirely on the File::get_class_for_file_extension to
select a class, so it could only create File or Image objects. This
would break the relationships based on derived objects. Also make it
respect the FileField::relationAutoSetting.
2012-04-19 12:18:36 +12:00
Mateusz Uzdowski
a2c9c409a8
BUGFIX: fixed asserts and file cleanup
...
DataObject::get_one returns false if not found, so better check for
object. Also, the directory would not be cleaned, so on the subsequent
run the files could end up having suffixes.
missed this one
2012-04-19 12:13:02 +12:00
Ingo Schommer
a1327faae4
Merge pull request #344 from halkyon/remove_deprecated_extrastatics_usage
...
ENHANCEMENT Remove use of deprecated extraStatics in core files
2012-04-18 15:42:51 -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
Ingo Schommer
c2797f3ffa
Merge pull request #342 from silverstripe-big-o/sapphire
...
---
This is the new _t syntax. All i18n unit tests pass.
2012-04-18 10:16:23 +02:00
Julian Seidenberg
90ae0ed18d
BUGFIX: reverting back to Ingo's text collector from code, but using the parser to get from templates. Adding special case for _t functions in code that have an array in them. Fixing unit tests for all this.
2012-04-18 17:35:32 +12:00
Julian Seidenberg
0da62b9552
BUGFIX: fixing i18n _t function breaking out of when correct translation found
2012-04-18 17:35:32 +12:00
Julian Seidenberg
192237cb7d
BUGFIX: fixes to i18n Unit Tests
2012-04-18 17:35:31 +12:00
Julian Seidenberg
c314d0b659
API-CHANGE: i18nTextCollector can now extract the new translatable entities (<%t) from templates and populate them in language tables (uses PEG parser)
2012-04-18 17:35:30 +12:00
Julian Seidenberg
189c305c83
API-CHANGE: parser for new i18n syntax
2012-04-18 17:35:30 +12:00
Julian Seidenberg
45c7dfd9f5
ENHANCEMENT: tests for new i18n syntax
2012-04-18 17:35:29 +12:00
Robert Curry
5603fbe153
ENHANCEMENT: Fixes #7059 . Add test for allowedMaxFileNumber to UploadFieldTest.
2012-04-18 14:25:14 +12:00
Sean Harvey
7d84aff01e
Merge pull request #339 from ajoneil/remove-pre-53-support
...
Remove pre 5.3 support
2012-04-17 16:19:23 -07: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
Andrew O'Neil
14c0796617
MINOR: Remove checks for PHP < 5.3.2, as it's no longer supported
2012-04-18 10:38:09 +12:00
Sean Harvey
4a3070757b
MINOR Fixed tests
2012-04-17 10:53:40 +12:00
Robert Curry
5686392a67
BUGFIX: Fixes #7071 . Change gridfield tests to not assume ids are always
...
in order of addition.
2012-04-16 15:47:35 +12:00
Ingo Schommer
d57e864110
MINOR Fixed tests related to i18nLegacyAdapter changes
2012-04-15 18:46:02 +02:00
Ingo Schommer
cbcee57496
ENHANCEMENT New i18nTextCollector_Writer_RailsYaml
2012-04-15 18:08:59 +02:00
Ingo Schommer
fca2c205b7
API CHANGE Removed $priority arguments from _t(), use module priorities instead.
...
ENHANCEMENT Refactored i18nTextCollector collection logic alongside $priority removal, from regex to (slightly more maintainable) PHP tokenizer. Using var_export() for generating PHP, which auto-escapes strings more robustly.
ENHANCEMENT Refactored i18nTextCollector into pluggable writers (in preparation of new YML output format)
2012-04-15 17:17:17 +02:00
Ingo Schommer
d44f6b3e1f
MINOR Removed deprecated usage of $priority argument in _t() calls
2012-04-15 17:17:17 +02:00
Ingo Schommer
bd23a07bba
API CHANGE Using Zend_Translate with YAML translation files, replacing the $lang global and PHP files in the /lang folders.
2012-04-15 17:17:15 +02:00
Ingo Schommer
0a0be63ee2
ENHANCEMENT Added $exclusive flag to SS_ClassLoader->pushManifest() to allow for multiple manifests co-existing (useful for tests which rely on core classes but also want to test their own manifests)
2012-04-15 17:17:15 +02: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
Sean Harvey
01e0ce7b24
MINOR Ensure assertions of RequirementsTest use "framework" as the
...
FRAMEWORK_DIR, otherwise assertions of require() calls in
RequirementsTest_Conditionals template fail
2012-04-15 10:50:20 +12:00
Sean Harvey
c45027d247
MINOR Fix tests to check against dynamic FRAMEWORK_DIR and $project
...
instead of hardcoding these checks
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
Will Rossiter
07d2d5273a
ENHANCEMENT: populate FormField:: on the fly based on class name of field rather than requiring explict definition.
2012-04-14 17:36:19 +12:00
Will Rossiter
907568b182
ENHANCEMENT: move hard coded template HTML for composite field and field group out to separate template files.
2012-04-14 17:36:08 +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
Hamish Friedlander
521742aaf8
ENHANCEMENT: Split arguments passed to SSViewer into underlay and overlay arguments to control precedence. Also fixes breakage of SecurityAdmin
2012-04-13 12:15:34 +12: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
Sam Minnée
d766100335
Merge pull request #304 from halkyon/e_strict_fixes
...
Enable E_STRICT by default for development, fix all E_STRICT errors affected by tests.
2012-04-11 17:54:18 -07:00
Sean Harvey
3c70ea4922
MINOR Fixing broken test MemberDatetimeOptionsetFieldTest, passing in null for $validator argument
2012-04-12 12:20:18 +12:00
Sam Minnée
1189322b41
Merge pull request #302 from robert-h-curry/7113-nested-controls-breaking-last
...
BUGFIX: Issue #7113 : Recalculate itemIteratorCount when popping viewer state.
2012-04-11 17:19:46 -07:00
Robert Curry
695ae711e7
MINOR: Issue #7113 : Add test for nested loops.
2012-04-12 11:56:49 +12:00
Sam Minnée
168eaf72d8
Merge pull request #300 from silverstripe-scienceninjas/feature/ssviewer-enhancements
...
Feature/ssviewer enhancements
2012-04-11 16:29:22 -07:00
Ingo Schommer
e045ffeb29
Merge pull request #205 from AngryPHPNerd/sapphire
...
---
In SS-2.4 you can prefix files with an underscore to exclude them from manifest this can be useful for backups of old classes or huge data files.
I think this behaviour should be readded.
(I will add a unit test for this ...)
2012-04-11 17:32:34 +02:00
Ingo Schommer
6cd91ff449
Merge pull request #299 from ajoneil/sapphire
...
---
Conflicts:
forms/NumericField.php
2012-04-11 15:36:35 +02:00
Ingo Schommer
800d5fbc01
Merge pull request #291 from halkyon/pg_fixes
...
MINOR Fixed failing tests on pgsql
2012-04-11 06:14:57 -07:00
Hamish Friedlander
e4a043ac0b
ENHANCEMENT: Allow arguments to be passed to templates via an array passed to SSViewer#process and via keyword=value pairs in the <% include %> tag
2012-04-11 21:34:27 +12: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
Stig Lindqvist
0d031a5045
API CHANGE Use Config for registering default password encryptors
...
Using the config system for registering password encryptors
Remove the eval on password encryptor construction by using reflection
Throws deprecation messages when using static register / unregister
2012-04-07 19:14:00 +12:00
Sam Minnee
e01b0aa3d0
ENHANCEMENT PjaxResponseNegotiator for more structured partial ajax refreshes, applied in CMS and GridField. Also fixes issues with history.pushState() and pseudo-redirects on form submissions (e.g. from page/add to page/edit/show/<new-record-id>)
2012-04-05 23:00:22 +02:00
Ingo Schommer
a44b67bae2
API CHANGE Moved RequestHandler->isAjax() to SS_HTTPRequest->isAjax()
2012-04-05 23:00:22 +02:00
Ingo Schommer
40d73127ae
MINOR Using late static binding instead of Object::create() calls
2012-04-04 17:10:31 +02: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
8ae474b182
API CHANGE Remove use of Services_JSON and replace with json_encode() and json_decode()
...
API CHANGE Convert::json2array() will convert nested JSON structures to array as well for easier traversal, instead of array with nested objects.
2012-03-31 13:17:36 +13:00
Ingo Schommer
d0d23dc591
Merge pull request #271 from halkyon/group_changes
...
BUGFIX Nested Group records should be removed, along with the parent.
2012-03-28 02:52:52 -07:00
Sean Harvey
bd95bcaf61
BUGFIX Nested Group records should be removed, along with the parent.
2012-03-28 22:49:58 +13:00
Ingo Schommer
f0ee711f52
Merge pull request #275 from halkyon/e_strict_support
...
First round of fixes for E_STRICT compliance
2012-03-28 02:42:26 -07: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
Ingo Schommer
f81ad47239
Merge pull request #272 from halkyon/date_fixes
...
DateField::setValue() with dmyfields sets erroneous date in valueObj
2012-03-28 02:38:03 -07: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
1a36f92bb9
MINOR: Fix tests on PHPUnit 3.4
2012-03-27 15:38:36 +02: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
Sean Harvey
c02b4418bb
BUGFIX Using DateField "dmyfields" option, if you set empty
...
day/month/year values, valueObj on DateField will contain erroneous values.
Check that all the value inputs aren't null or empty values BEFORE
calling Zend_Date on the value.
2012-03-27 14:46:09 +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
Nicolaas
dee3939cf7
BUGFIX: Fix the broken perform readonly transformation which was always showing NO ( #6453 )
2012-03-24 13:35:19 +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
Ingo Schommer
71c026c75a
MINOR Removed SiteTree dependency from SSViewerTest ( fixes #6907 )
2012-03-14 16:11:23 +01:00
Andrew O'Neil
6db08cbc36
MINOR: Fix tests on PHPUnit 3.4
2012-03-14 16:05:19 +13:00
AngryPHPNerd
42f8d9f77a
- Readded check for _config.php in ClassManifest.
...
- Added UnitTest for files with underscore prefix.
2012-03-13 23:38:34 +01:00
Ingo Schommer
73efe8522b
MINOR Fixed hardcoded fixture IDs in GridFieldDetailFormTest
2012-03-12 11:15:06 +01:00
Sam Minnee
7de5bf55e0
API CHANGE: Updated throwExceptionOnBadDataType setter to be standard setThrowExceptionOnBadDataType(), added getThrowExceptionOnBadDataType().
2012-03-10 14:44:12 +13:00
Sam Minnee
f670576cad
MINOR: Fix test to rely less on known test data keys (breaks SQLite)
2012-03-10 14:42:25 +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
Ingo Schommer
4e1c8bdb32
Merge branch 'fieldlist-fortemplate' of https://github.com/sminnee/sapphire
...
Conflicts:
forms/FieldList.php
2012-03-09 17:03:02 +01:00
Sam Minnee
317756d92a
Merge branch 'feature/config' of https://github.com/silverstripe-scienceninjas/sapphire into config
2012-03-09 19:22:34 +13:00
Sam Minnee
d896c7dc03
MINOR: Removed PHP 5.3-only code from SSViewerTest.
2012-03-09 18:32:10 +13:00
Hamish Friedlander
d89544f3f6
MINOR: Disable tests in ObjectStaticTest that break
2012-03-09 18:16:45 +13: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
Hamish Friedlander
d355cd5baf
ENHANCEMENT: Add config layer - the Config access class itself, and the ConfigManfiest builder which parses in the yaml config files
2012-03-09 18:13:56 +13:00
Sam Minnee
37684837b8
MINOR: Fixed tests to suit GridField and DataList API changes
2012-03-09 18:11:50 +13:00
Sam Minnee
f288575919
MINOR: Removed obsolete test.
2012-03-09 18:11:26 +13:00
Sam Minnée
9302137125
Merge pull request #233 from halkyon/master
...
Fixed regression where PasswordEncryption field not set on Member
2012-03-08 20:49:21 -08:00
Sean Harvey
d28da56e19
BUGFIX Fixed regression where Member::PasswordEncryption field wouldn't be set to the default
2012-03-09 17:29:57 +13:00
Stig Lindqvist
34e7e9a05e
MINOR Fix of GridFieldDefaultConfigTest
2012-03-09 17:07:41 +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
Sean Harvey
033a1e593a
MINOR Fixed naming of test classes
2012-03-09 16:55:20 +13:00
Sean Harvey
e78419cef1
MINOR Fixed tests for GridFieldToolbarHeaderTest
2012-03-09 16:47:35 +13:00
Sean Harvey
9b4b34c4f9
MINOR Fixed broken tests in GridFieldDetailFormTest
2012-03-09 16:37:25 +13:00
Stig Lindqvist
2ab12affec
Merge pull request #210 from sminnee/form-visiblefields
...
Form::VisibleFields() and FieldList::VisibleFields()
2012-03-08 19:24:25 -08:00
Sam Minnée
f01982a829
Merge pull request #219 from halkyon/master
...
Fixed HtmlEditorField not inserting file/page links correctly due to broken shortcodes
2012-03-08 18:46:03 -08:00
Sam Minnee
ba93028b01
API CHANGE: Added Form::VisibleFields() and FieldList::VisibleFields(), which list everything except hidden fields, to assist with the creation of custom form layouts.
2012-03-09 15:41:42 +13:00
Sean Harvey
0df958f81d
MINOR Fixed tests to use commas as delimiter for shortcodes, also test spaces still work as well
2012-03-09 15:00:03 +13:00
Sam Minnee
a071456837
Merge branch 'master' of github.com:silverstripe/sapphire
...
Conflicts:
tests/forms/gridfield/GridFieldDetailFormTest.php
tests/forms/gridfield/GridFieldPopupFormsTest.yml
2012-03-09 14:37:32 +13:00
Sean Harvey
49267dbbc4
ENHANCEMENT Shortcodes now support commas as delimiter for attributes (thanks aoneil for help with the regex!) (trac #6868 )
...
BUGFIX HtmlEditorField not inserting shortcodes correctly (trac #6868 )
2012-03-09 14:25:42 +13:00
Stig Lindqvist
09d6fa7bb3
API CHANGE Renamed GridFieldDefaultColumns to GridFieldDataColumns #6921
2012-03-09 14:07:40 +13:00
Stig Lindqvist
6d0b0d6788
API CHANGE Removing GridFieldDeleteAction and moved functionality into GridFieldRemoveButton #6921
2012-03-09 13:55:49 +13:00
Stig Lindqvist
8b82dae06c
API CHANGE: Renaming of gridfield components #6921
2012-03-09 12:54:02 +13:00
Ingo Schommer
e5f02337cd
MINOR Testing nested detail forms in GridField
2012-03-09 00:06:14 +01:00
Stig Lindqvist
8b2213d56c
MINOR Added per-record canView, canDelete, canCreate and canEdit checks on gridfield and gridfield components #6890
2012-03-09 10:58:01 +13:00
Ingo Schommer
f9323b398c
BUGFIX Type-safe checks for Controller::join_links(), allowing arguments with a value of "0"
2012-03-08 22:20:37 +01:00
Sam Minnee
5800db0239
API CHANGE: Allow for the creation of custom GridField fragments. ( #6911 )
2012-03-09 10:03:53 +13:00
Ingo Schommer
e4a6dd5850
Merge branch 'integration'
...
Conflicts:
forms/gridfield/GridField.php
2012-03-08 20:25:21 +01:00
Ingo Schommer
ac20bfaf99
MINOR Renamed GridFieldAction_Edit to GridFieldEditAction, GridFieldAction_Delete to GridFieldDeleteAction, to make it clearer that there's no parent class/concept called "GridFieldAction". There's only the GridFieldActionProvider interface, as well as the GridField_FormAction (which is a related, but different kettle of fish).
2012-03-08 18:22:25 +01:00
Normann Lou
d35d7507ff
FEATURE SSF-25 : enable to remove component from a GridFieldConfig.
2012-03-08 20:29:18 +13:00
Sam Minnee
1fd8d19e28
API CHANGE: FormAction::FieldHolder() now returns just the Field(), so that a FieldList::forTemplate() returns a sensible result for an action list.
2012-03-08 10:02:57 +13:00
Sam Minnee
e4dbf8065b
API CHANGE: Added FieldList::forTemplate(), so that by default a FieldList will be rendered in its template as a concatenation of FieldHolder values.
...
API CHANGE: Removed unnecessary HiddenFieldList class.
2012-03-08 10:00:54 +13:00
Ingo Schommer
8690e531a5
MINOR Reverted MemberTest assertion, previously broken by recent ManyManyList and Member foreign key refactoring
2012-03-07 01:23:41 +01:00
Andrew O'Neil
58309cb2ec
MINOR: Tests for add and edit forms of GridField
2012-03-07 10:48:09 +13: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
1201f6c8bb
BUGFIX Saving records in ListboxField->saveInto() and PermissionCheckboxSetField->saveInto() so we have a database ID to relate to (was previously customised in MemberTableField->saveComplexTableField(), which is now deprecated)
2012-03-06 01:23:34 +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
Julian Seidenberg
a715785a42
ENHANCEMENT: SSF-106 adding the ability to turn off and on the "add new" button on the GridFieldTitle
2012-03-06 11:19:46 +13:00
Hamish Friedlander
374ed19406
API CHANGE: Change variable expose method in TemplateGlobalProvider and TemplateIteratorProvider to (a) not clash with each other and, (b) be less generic
2012-03-06 09:31:57 +13:00
Hamish Friedlander
2c65d3a398
BUGFIX: Add casting support to global and iterator variable injection
2012-03-06 09:31:57 +13:00
Hamish Friedlander
156d2226fc
BUGFIX: Replaced deprecated DataObjectSet use with ArrayLists in SSViewerTest
2012-03-06 09:31:56 +13:00
Hamish Friedlander
91f4ba15f1
ENHANCEMENT: supporting "current scope" loop and with: (with Children) (loop) $Title (end_loop) (end_with)
2012-03-06 09:31:55 +13:00
Hamish Friedlander
28bb83552a
API-CHANGE: moving iterator support from ViewableData to SSViewer. New set of unit tests for iterator support functions.
2012-03-06 09:31:55 +13:00
Hamish Friedlander
927dbbe717
API-CHANGE: Global template variables can now be called directly using SSViewer_DataPresenter instead of needing to inherit off ViewableData
2012-03-06 09:11:46 +13:00
Ingo Schommer
5d565dcfa3
ENHANCEMENT Added ListboxField->setDisabledItems() and setDefaultItems() (similar to CheckboxSetField API)
2012-03-05 16:11:29 +01:00
Ingo Schommer
344899ab77
Revert "ENHANCEMENT Support numeric array values in CheckboxSetField (?Field[]=val1&Field[]=val2 instead of ?Field[val1]=1&Field[val2]=1)" - data handling with numeric/associative arrays too clumsy, fixed up ListboxField instead
...
This reverts commit 8fa266462f
.
2012-03-05 10:55:44 +01:00
Ingo Schommer
6e3ceefbb8
ENHANCEMENT Relationship saving in ListboxField (preparing for chosen.js usage), escaping commas in payload when serialising multiple values into a single field
2012-03-05 10:55:09 +01:00
Sean Harvey
b3d977f0e7
Merge remote-tracking branch 'upstream/master' into file_shortcodes
2012-03-03 10:24:06 +13:00
Ingo Schommer
299bf8b9c6
Merge branch 'integration'
2012-03-02 20:53:06 +01:00
Ingo Schommer
8fa266462f
ENHANCEMENT Support numeric array values in CheckboxSetField (?Field[]=val1&Field[]=val2 instead of ?Field[val1]=1&Field[val2]=1)
2012-03-02 20:46:22 +01:00
Ingo Schommer
e5c4b0a36b
ENHANCEMENT Hierarchy->Breadcrumbs()
2012-03-02 20:46:19 +01:00
Ingo Schommer
424da6abe1
API CHANGE Moved NZGovtPasswordValidator to new 'securityextras' module
2012-03-02 00:28:22 +01:00
Ingo Schommer
88039ffb81
MINOR GridFieldRelationAddTest (SSF-53)
2012-03-01 17:57:14 +01:00
Sean Harvey
898c8f5497
ENHANCEMENT [file_link id=n] shortcode support for file links in HtmlEditorField
2012-03-01 22:20:58 +13:00
Ingo Schommer
586ca7374f
Merge pull request #202 from halkyon/date_changes
...
Date changes
2012-02-29 13:02:30 -08:00
Ingo Schommer
68914efb8d
MINOR SSViewer->testCastingHelpers()
2012-02-29 21:06:43 +01:00
Ingo Schommer
386bbf8095
MINOR Fixed GridFieldTest (broke due to changes in the default config)
2012-02-28 18:20:21 +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
Dominik Beerbohm
edf6cd6d83
API CHANGE: Remove ArrayData::forTemplate(), because it has little usefulness corrupts ViewableData customisation.
2012-02-24 16:35:12 +13:00
Ingo Schommer
3b72f598a2
MINOR Added CSS class for identifying column in GridFieldDefaultColumns
2012-02-23 23:29:58 +01:00
Ingo Schommer
9df1487d8f
ENHANCEMENT Allow to batch-add components via GridFieldConfig->addComponents()
2012-02-23 23:29:57 +01:00
Ingo Schommer
9190bc4893
ENHANCEMENT Support for <legend> tags in CompositeField
2012-02-17 13:35:53 +01:00
Ingo Schommer
b417daf7af
ENHANCEMENT Custom tags for CompositeField, which allows for nesting <fieldset> elements (not possible through the toplevel-only FieldList/FieldSet class)
2012-02-17 13:35:53 +01:00
Will Rossiter
fa1923dfa4
Merge pull request #195 from simonwelsh/html2raw-fix
...
BUGFIX Convert::html2raw() not correctly stripping script and style tags
2012-02-16 14:25:40 -08: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
Simon Welsh
7658e902fc
BUGFIX Convert::html2raw() not correctly stripping script and style tags
2012-02-15 07:55:52 +13:00
Ingo Schommer
5220a46fd0
ENHANCEMENT Inserting image via new dialog with ajax field retrieval and GridField file selection. Rewritten to jQuery.entwine and using the new HTML editor abstraction layer.
2012-02-14 13:53:35 +01:00
Ingo Schommer
c422e06b60
MINOR Removed GridField->requireDefaultCSS() idiom, not used elsewhere (or used for JS in the same class), should be handled through Requirements class instead
2012-02-14 13:53:32 +01:00
Ingo Schommer
3866f561f5
ENHANCEMENT Using GridField for file selection in "insert image" dialog
...
API CHANGE Combined HTMLEditorField_Toolbar->FlashForm() and ImageForm() into new MediaForm() to handle both file types
2012-02-14 13:30:52 +01: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
Ingo Schommer
1d4ac6842f
Merge pull request #184 from chillu/ss-log-tweaks
...
SS_Log: String args, extra data logging, "in line of..." formatting
2012-02-10 14:22:40 -08:00
Ingo Schommer
448c5fd7b9
Merge branch 'story/SSF-28'
2012-02-08 15:35:34 +01:00
Ingo Schommer
c00f0406e9
ENHANCEMENT Attaching files from /assets through UploadField
2012-02-08 15:34:41 +01:00
Ingo Schommer
a0d583291c
MINOR Fixed UploadField->managesRelation() when no record is set
2012-02-08 11:27:10 +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
1b4dda491a
MINOR Moving File->OwnerID setting to model layer
2012-02-08 01:04:56 +01:00
Ingo Schommer
24e2003e35
ENHANCEMENT Allow logging of extra data in SS_Log::log() (currently only displayed through SS_LogEmailWriter)
2012-02-06 23:38:37 +01:00
Ingo Schommer
c0d187071a
ENHANCEMENT New UploadField class to replace FileIframeField, ImageField and SimpleImageField
2012-02-03 01:00:08 +01: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
Ingo Schommer
5fe86be311
ENHANCEMENT Added GridFieldConfig->getComponentsByType() and getComponentByType()
2012-01-30 15:47:26 +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
Ingo Schommer
cb74dbccfc
MINOR Removed overzealous value validation in ListboxField, should silently ignore unknown values (lacking better referential integrity measures in the underlying model layer)
2012-01-19 12:13:18 +01: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 Minnee
b311fbf038
MINOR: Always flush the manifest when using sapphire/test/bootstrap.php
2012-01-10 17:28:11 +13:00
Sam Minnee
65299afd27
MINOR: Removed database coupling from GridFieldTest.
2012-01-10 17:00:02 +13:00
Sam Minnee
6a08a82c9c
MINOR: Removed notice-level errors from form field construction.
2012-01-10 16:58:27 +13:00
Sam Minnee
489191b44f
BUGFIX: Fixed notice-level errors in GridField, exposed by test failures.
2012-01-10 16:39:12 +13:00
Sam Minnée
c2da56d4a1
Merge pull request #136 from simonwelsh/54_fixes
...
BUGFIX Generate valid PHP when $includeDebuggingComments is true.
2012-01-09 19:09:45 -08:00
Sam Minnee
88f645ef59
Merge remote-tracking branch 'refs/remotes/scienceninjas/pull/gridfield-tests'
2012-01-10 16:02:06 +13:00
Sam Minnee
34cc18e66b
MINOR: Added a test for GridField_URLHandler components.
2012-01-10 11:10:38 +13:00
Stig Lindqvist
3c516b7b97
API CHANGE: Refactored GridField modifiers into GridField_ColumnProvider, GridField_HTMLProvider, GridField_ActionProvider, and GridField_DataModifier interfaces, all added as components in the config.
...
API CHANGE: Simplified state handling so that it's just a key store. Affectors are replaced with GridField_ActionProviders. API CHANGE: Removed GridField state manipulation actions instead opting for GridField_ActionProvider actions.
API CHANGE: Removed support for modifiers that add "body" rows, instead having core support for generating the body rows hardcoded into the GridField.
API CHANGE: Allow modification of columns across the whole GridField with the GridField_ColumnProvider interface.
API CHANGE: Renamed GridField_AlterAction to GridField_Action, and added actionName/args parameters, since it can be used for all actions (including batch actions and row actions)
API CHANGE: Removed GridFieldRow class.
2012-01-09 13:30:34 +13:00
Stig Lindqvist
ea4b9fe939
MINOR Added tests for GridField with minor changes to support them
...
MINOR Added docblocks
2012-01-07 04:59:34 +01:00
Sam Minnée
9a1644f9e1
Merge pull request #148 from ajshort/pull-2
...
Added GroupedList
2012-01-06 16:19:20 -08:00
Sam Minnée
2c770a6f8f
Merge pull request #146 from simonwelsh/namespace-manifest
...
BUGFIX Namespaced classes were always having their namespace prepended t...
2012-01-06 15:58:46 -08:00
Sean Harvey
3d8079c1b5
API CHANGE Removed GeoIP functionality from sapphire. This now belongs in a separate "silverstripe-geoip" GitHub repository: https://github.com/silverstripe-labs/silverstripe-geoip
2012-01-02 18:00:36 +01:00
Ingo Schommer
4056b94f75
BUGFIX Improved ClassInfo::ancestry() performance through in-memory caching and removal of unnecessary is_object() check - get_class() will complain if its not passed an object already)
2012-01-02 16:49:33 +01:00
Ingo Schommer
72694d8349
ENHANCEMENT Custom form attributes through Form->setAttribute()
2012-01-02 16:49:33 +01: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
Ingo Schommer
b36ad3b876
MINOR Testing nested if blocks in SSViewerTest
2012-01-02 16:48:13 +01:00
Sean Harvey
19e9b19a1a
BUGFIX Ensure TextareaField template is encoding characters correctly
2012-01-02 16:48:13 +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
Ingo Schommer
b3c08dba12
API CHANGE Deprecated FieldSet-specific methods from Form, namely dateFieldByName(), unsetDataFieldByName(), unsetFieldFromTab(), resetField()
2012-01-02 16:47:59 +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
ajshort
3478e4f9e6
ENHANCEMENT: Made the form enctype configurable via a method Form->setEncType().
...
API CHANGE: Deprecated Form->FormEncType() in favour of Form->getEncType().
MINOR: Added enctypes as constants to the Form class.
2011-12-26 18:36:24 +11:00
Ingo Schommer
565e2ab318
Merge pull request #143 from Innovatif/sapphire
...
---
BUGFIX Having <header tag in HTML causes requirements to double. See http://www.silverstripe.org/general-questions/show/17524
2011-12-23 16:36:01 +01:00
Ingo Schommer
7d245c3803
MINOR Reduced unnecessary autoloading
2011-12-23 10:31:35 +01:00
Simon Welsh
dd546a9888
BUGFIX Merge request arrays recursively
2011-12-23 17:48:49 +13:00
Simon Welsh
27a51ed7ed
BUGFIX Namespaced classes were always having their namespace prepended to their base class
2011-12-23 10:24:42 +13:00
Stig Lindqvist
f59d11c91e
MINOR DataList::sort() can sort by relation name
2011-12-18 04:28:09 +01:00
Simon Welsh
04c8e2b762
BUGFIX Generate valid PHP when $includeDebuggingComments is true.
2011-12-17 17:35:26 +13: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
Hamish Friedlander
45c25e93b4
MINOR: Disable PhpSyntaxTest until we decide whether to re-write it or remove it
2011-12-17 15:40:06 +13:00
Hamish Friedlander
be9286fbc4
Merge pull request #132 from simonwelsh/namespace-manifest
2011-12-17 15:40:06 +13:00
Ingo Schommer
1d92172931
BUGFIX Returning 'first last' in ViewableData->FirstLast() if item is both at the same time
2011-12-17 02:32:21 +01:00
Simon Welsh
97f8cc4ab3
BUGFIX Skip NamespacedClassManifestTest on PHP versions before 5.3
2011-12-17 14:26:03 +13:00
Simon Welsh
3e6a91a07f
ENHANCEMENT Allow ClassManifest to handle classes with namespaces, or that extend classes in namspaces or that implement interfaces in namespaces.
2011-12-17 14:03:53 +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
Sam Minnee
70d40cf4df
BUGFIX: Removed use of base "Exception" class in order to avoid failures on PHPUnit 3.6.
2011-12-17 11:51:40 +13:00
Ingo Schommer
1b544a46a3
MINOR Backported bootstrap.php changes from CI setup (creates a FakeController to avoid empty controller stacks, fake empty session global)
2011-12-04 13:35:06 +01:00
Ingo Schommer
34686ca1dc
BUGFIX Restoring system error handlers in bootstrap.php so running tests through the phpunit binary behaves the same way as TestRunner (specifically to fix DeprecationTest on our CI infrastructure)
2011-12-04 13:10:28 +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
Ingo Schommer
ea7310c36a
MINOR Specifically turning off Transliterator in FileNameFilterTest, was assumed to be on regardless of setting (surfaced by d1ebe1ce9
)
2011-11-14 16:30:53 +01:00
Ingo Schommer
d30b4b1d00
BUGFIX Respecting api_access on has_one relations in RestfulServer
...
BUGFIX Limiting fields according to api_access on relation object (rather than the "root" object) in RestfulServer
BUGFIX Limit listing of has_one relations in RestfulServer to actual relation (was listing all objects before)
BUGFIX Creating correct object instances in RestfulServer->getHandler() for relation queries
2011-11-13 14:09:44 +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
Sam Minnee
7978dd5d40
MINOR: Removed WebserverRoutingTest as it does more harm than good (checked with Stig and Ingo)
2011-10-31 11:45:54 +13: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
Ingo Schommer
96d18efa58
MINOR Replaced calls to deprecated FormField->Name() with getName()
2011-10-29 13:27:11 +02:00
Sean Harvey
f2fba45a77
MINOR Fixed broken GridFieldPresenterTest assuming IDs
2011-10-30 00:13:27 +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
ec73555db4
MINOR: Text fix.
2011-10-29 17:36:38 +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
a49b56a348
MINOR: Removed usage of deprecated FormField::Name()
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
Sam Minnee
4c93c3be19
ENHANCEMENT: Allow Deprecation::notice() to be called without passing release number.
2011-10-29 17:34:31 +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
2c0257e9b9
Cast the header value to string as PHPUnit can't handle it being NULL.
2011-10-29 15:24:06 +13:00
Simon Welsh
c8f1379407
Merge branch 'master' of git://github.com/silverstripe/sapphire
2011-10-29 13:55:50 +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
Sam Minnée
244f0707b1
Merge pull request #82 from silverstripe-scienceninjas/release/gridfield-pagination
...
ENHANCEMENT Release of DataGridPagination
2011-10-28 16:34:33 -07:00
Simon Welsh
1eab669f9b
Fucntion signatures should match when containing arrays (PHP5.4 bug)
2011-10-29 12:07:58 +13:00
Stig Lindqvist
83e90aaafe
ENHANCEMENT Release of DataGridPagination
...
This class extends the DataGridPresenter with the behaviour and looks of a paginated Datagrid.
2011-10-28 17:34:15 +13:00
Hamish Friedlander
cf408d766a
Merge pull request #80 from silverstripe-scienceninjas/release/datagrid-renaming
...
API CHANGE: Rename DataGrid to GridField to be more in line with other field class names
2011-10-27 20:55:30 -07:00
Stig Lindqvist
b229c17e1d
ENHANCEMENT Renamed DataGrid to GridField
2011-10-28 16:35:39 +13:00
Sam Minnée
ca29cf9b72
Merge pull request #72 from stojg/lookupfieldtest
...
MINOR Fix test to use the non deprecated way of fetching database records
2011-10-27 20:13:25 -07:00
Sam Minnée
499f6d4887
Merge pull request #79 from silverstripe-scienceninjas/release/datalist-test-improvements
...
MINOR Added more tests to the DataList to improve the coverage.
2011-10-27 20:11:41 -07:00
Stig Lindqvist
4123d2c6ab
MINOR Added more tests to the DataList to improve the coverage.
2011-10-28 16:07:19 +13:00
Stig Lindqvist
e38dd08ea5
MINOR: Fix docblocks to reference SS_List instead of (now deprecated) DataObjectSet where appropriate
2011-10-28 15:58:55 +13:00
Hamish Friedlander
e5ea2ea94d
ENHANCEMENT: Add Deprecation class to handle throwing deprecation notices nicely on methods that are still in use in framework or cms
2011-10-28 15:58:54 +13:00
Stig Lindqvist
d6f7b55f04
MINOR Fix test to use the non deprecated way of fetching database records
2011-10-22 16:47:39 +02:00
Ingo Schommer
e2bf21ba1a
BUGFIX Escaping base URLs for anchor links rewritten by SSViewer::process() with the 'rewriteHashlinks' option enabled (which is a framework default, and necessary because of the use of a <base> tag). Also added escaping for base URLs rendered through the 'php' variation of 'rewriteHashlinks'
2011-10-18 11:42:55 +02: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
dcf59959d8
MINOR Removed dependency of DatagridFunctionalTest on ContentController (sapphire vs. cms)
2011-10-07 14:37:15 +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
3a5b3af7c6
BUGFIX Fixed tag stacking in Diff.php thirdparty lib (AIR-71)
2011-10-07 14:12:52 +02:00
Ingo Schommer
40db114218
MINOR Resetting date/time defaults for DateFieldTest, TimeFieldTest, DatetimeFieldTest
2011-10-07 14:12:51 +02:00
Ingo Schommer
c89bdbb268
ENHANCEMENT Added user timezone support to DatetimeField
2011-10-07 14:12:50 +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
f37640b493
BUGFIX Added support for array values in LookupField, to ensure it works correctly when used as a readonly representation of ListboxField (AIR-39)
2011-10-07 14:12:49 +02:00
Ingo Schommer
715638333e
API CHANGE Obeying existing memory_limit settings in increase_memory_limmit_to(). Introduced set_increase_memory_limit_max() and set_increase_time_limit_max()
2011-10-07 14:12:48 +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
4d31ac65a0
ENHANCEMENT Allowing array values in ListboxField->setValue(), serialising into comma-separated list of values (AIR-35)
2011-10-07 14:12:47 +02:00
Ingo Schommer
007eb259e0
MINOR Added DataDifferencerTest, starting by testing array-based values (AIR-39)
2011-10-07 14:12:47 +02:00
Ingo Schommer
da0ac49d5f
API CHANGE Rewriting underscores to dashes in files uploaded through Upload->load(), Folder->addUploadToFolder() or Image->loadUploadedImage(). Transliterating non-ASCII characters automatically (turn off via FileNameFilter::$default_use_transliterator=false)
...
ENHANCEMENT New FileNameFilter class for a more customisable way to influence filename filtering in Upload->load(), Folder->addUploadToFolder() or Image->loadUploadedImage()
2011-10-07 14:12:46 +02:00
Ingo Schommer
afeccbc9cb
ENHANCEMENT Added File::get_class_for_file_extension() instead of hardcoding it in Folder->constructChild(). Allows for custom classes in files uploaded through core functionality like the Upload and FileField logic.
2011-10-07 14:12:45 +02:00
Stig Lindqvist
b1b1615a58
ENHANCEMENT Datagrid renders ArrayList according to Datagrid#setModelClass()
2011-09-29 14:15:02 +13:00
Stig Lindqvist
1811fc2746
MINOR Cleaning up code of Datagrid with related classes with more tests
2011-09-29 12:16:15 +13:00
Jean-Fabien
197913842c
ENHANCEMENT First cut at data grid with the data presenter
2011-09-28 17:49:14 +13:00
Stig Lindqvist
85cdb3771c
FEATURE Added initial commit of Datagrid with tests
2011-09-28 12:33:02 +13: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
Will Rossiter
60ea09bb42
BUGFIX: prevent TestRunner from dying when running through sake and loading FullTestSuite
2011-09-26 16:08:31 +13:00
Ingo Schommer
2651a1ba81
MINOR Marking Director::extract_request_headers() public because we can't unit test protected methods in PHP 5.2
2011-09-19 16:01:33 +02:00
ajshort
a60f03f28e
ENHANCEMENT Sapphire Doesn't Read HTTP Headers ( fixes #6311 )
2011-09-19 14:49:55 +02: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
dfb0504d0d
BUGFIX Setting "Content-Length" header in HTTPResponse to avoid problems with proxies timing out
2011-07-26 08:25:09 +02:00
Ingo Schommer
908eeb4811
MINOR Fixed SQL quoting in DbDatetimeTest (broke PostgreSQL)
2011-05-31 08:18:50 +12:00
Ingo Schommer
e1931c107f
MINOR Updated MemberTest to accept new default date formats caused by Zend/CLDR upgrade (from 'MM/dd/yyyy' to a less ambiguous 'MMM d, y')
2011-05-31 07:55:12 +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
Ingo Schommer
0adac9d40b
ENHANCEMENT Allowing filtered arguments on specific functions like mysql_connect() in SS_Backtrace
2011-05-26 22:04:01 +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
4f9065918a
MINOR Fixed CheckboxSetTest (broken by wrossiter in 771e93ef18
)
2011-05-24 08:58:36 +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
67ec23677a
MINOR Fixed RestfulServerTest
2011-05-19 15:17:38 +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
Ingo Schommer
a2d334ca0c
MINOR Fixed fixture ordering in RestfulServerTest to work with PostgreSQL
2011-05-19 11:09:06 +12:00
ajshort
1f6f7f0862
API CHANGE: Deprecated CompositeField->FieldSet() in favour of CompositeField->FieldList().
...
MINOR: Replaced usage of FieldSet with FieldList.
MINOR: Renamed FieldSetTest to FieldListTest.
2011-05-11 17:51:54 +10:00
ajshort
f0676c7d56
API CHANGE: Updated FieldSet to use ArrayList rather then DataObjectSet.
...
MINOR: Updated FieldSetTest since position information is no longer available on iterated objects.
2011-05-06 08:30:54 +10: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
ajshort
04e30243d0
MINOR: Updated MemberTest to work with a standard array iterator.
2011-05-03 12:16:40 +10:00
ajshort
54a5fc6a74
BUGFIX: Fixed the manifest not parsing interfaces which extended from multiple interfaces.
2011-05-02 10:37:26 +10:00
Ingo Schommer
37774d4103
ENHANCEMENT Added ClassManifest->getModules(), and removed limitation to toplevel modules in ClassManifest->handleFile() (necessary to detect new sapphire/admin/ "submodule")
2011-05-01 20:23:07 +12: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
0de6dbc848
BUGFIX: Fixed Permission::add_to_hidden_permissions() and Permission::remove_from_hidden_permissions()
2011-05-01 15:26:28 +12:00
Sam Minnee
7efd19e7cb
BUGFIX: Fixed DataList arrayaccess.
2011-05-01 15:26:28 +12:00
Sam Minnee
4a061fd071
ENHANCEMENT: Refactored MemberTableList field to make better use of DataList and ManyManyList. Refactored ComplexTableField and TableListField to, stripping out as much model logic as possible.
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
319d2f4952
ENHANCEMENT: Refactored TableListField and subclasses to rely on the DataList to handle data manipulatation.
...
API CHANGE: A DataList can be passed as the 2nd argument to the constructor; this is the recommended approach for editing non-relations.
API CHANGE: You can't set a custom query; only a custom DataList.
API CHANGE: You can't have one of these fields editing data that doesn't correspond to a DataList - there must be some kind of DataObject behind it.
API CHANGE: If the field's name corresponds to a relation on the object being edited, then the relation is used as the data set - all the source* parameters are ignored.
API CHANGE: relationAutoSetting only works if your form has had the corresponding data object loaded with $form->loadDataFrom().
API CHANGE: relationAutoSetting can't be turned off; attach a non-relation DataList instead.
2011-05-01 15:25:45 +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
Sam Minnee
3619eae9eb
MINOR: Don't couple GroupTest to the Member_GroupSet object.
2011-05-01 15:25:14 +12:00
Ingo Schommer
79e0634537
Merge branch 'cms-ui-preparation'
2011-04-28 22:48:02 +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
583f669c68
API CHANGE Adjusting to split of SiteTree->getCMSFields() into getSettingsFields(), and new tab paths ("Root.Content" instead of "Root.Content.Main")
2011-04-24 11:46:49 +12:00
Ingo Schommer
d5efacbf56
BUGFIX Less fragile 'newness' check on Group->Code in Group->onBeforeWrite() ( fixes #6595 )
2011-04-14 21:38:07 +12:00