Commit Graph

1879 Commits

Author SHA1 Message Date
Ingo Schommer
5865fd19d1 MINOR fixed php notice error in DataObject
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64319 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 22:57:33 +00:00
Ingo Schommer
2ddc6f13e8 BUGFIX Fixed DropdownField handling of Iterator objects rather than arrays in the newly created getSource()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64318 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 21:44:38 +00:00
Ingo Schommer
96ec288cd7 BUGFIX Don't use singleton() to create DataFormatter instances, as it will cause weird side-effects with multiple formatter instances with different parameters (broke subsequent test runs of RestfulServerTest and SoapModelAccessTest) - all aboard the failboat!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64313 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 17:27:38 +00:00
Ingo Schommer
7f386f52c8 MINOR Todos for ObjectTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64312 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 17:09:43 +00:00
Ingo Schommer
a90427ff4a ENHANCEMENT Added unit tests for Silverstripe's custom static handling (with lots of commented out failing tests)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64311 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 17:05:46 +00:00
Ingo Schommer
498c3d2af3 FEATURE Allowing for field-level permissions in DataObject::$api_access - respecting those permissions for reading and writing in RestfulServer (#2918)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64308 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 16:18:17 +00:00
Ingo Schommer
442ca098a7 ENHANCEMENT is_array() checks in DataFormatter to respect empty arrays as a form of denying permissions on fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64306 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 15:44:06 +00:00
Ingo Schommer
dada15629a ENHANCEMENT Added BankAccountField::is_valid_array_structure() to avoid PHP Notices when converting empty array values
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64305 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 12:57:17 +00:00
Ingo Schommer
c8c9c2166d ENHANCEMENT Added DropdownField->setEmptyString() and DropdownField->setHasEmptyDefault() to decrease constructor arguments and allow for modification of behaviour after calling construtor. Added DropdownField->getSource() to dynamically include empty defaults at rendering-time rather than construction time. Adjusted DropdownField subclasses to new behaviour
ENHANCEMENT Added DropdownFieldTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64304 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 12:39:09 +00:00
Sigurd Magnusson
3493beec9b MINOR: Added mergeinfo
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64301 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 05:20:15 +00:00
Sigurd Magnusson
85dda8ee7a MINOR: Added mergeinfo
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64300 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 05:18:14 +00:00
Will Rossiter
28bfea28b8 BUGFIX: fixed default_country_value so that it will actually call the default country if IP lookup doesnt work
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64275 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 03:26:24 +00:00
Andrew O'Neil
68aaa32e86 BUGFIX Fix disappearing fields when a field without a name was being pushed onto a FieldSet (eg a CompositeField)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64263 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 01:30:14 +00:00
Ingo Schommer
f58014490c MINOR Moved HTTPRequest constructor to beginning of method definitions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64261 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-15 00:53:09 +00:00
Ingo Schommer
ff93176f70 ENHANCEMENT Making confirmation message in ConfirmedFormAction translatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64252 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 23:07:05 +00:00
Ingo Schommer
3b16fe9b59 BUGFIX Fixed ComplexTableField->saveComplexTableField() success message object link - was assuming same context as ComplexTableField_ItemRequest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64251 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 23:06:22 +00:00
Ingo Schommer
2d33fd160a BUGFIX Adjusted ForeignKey->scaffoldFormField() to new scaffolding notation ("ajaxSafe" instead of "ajax")
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64239 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 21:47:22 +00:00
Ingo Schommer
d5a37d40dd ENHANCEMENT Showing image thumb before input field in a separate block <div class="thumbnail"> in SimpleImageField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64238 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 21:46:52 +00:00
Ingo Schommer
6feab01a6f BUGFIX Fixed FormScaffolder string literal parsing FALE in getFieldSet()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64237 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 21:38:37 +00:00
Ingo Schommer
cb31b1b224 ENHANCEMENT Added unit tests for form session messages and session validation, FormTest->testSessionValidationMessage() and FormTest->testSessionSuccessMessage()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64236 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 21:37:51 +00:00
Sam Minnee
391848f79b FEATURE #2951 simon_w: Use 301 redirect on Director::forceWWW()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64231 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 21:06:15 +00:00
Ingo Schommer
be0d3e37c5 ENHANCEMENT Added Controller->redirectBack()
BUGFIX Storing HTTP "Referer" header from $_SERVER in Director::direct() and passing it along in Director::test()
ENHANCEMENT Storing a "fake referer" in TestSession->lastURL to allow for redirectBack() calls, e.g. after failed form validation

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64229 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 19:59:01 +00:00
Ingo Schommer
155fb9c10f BUGFIX Checking for an empty array for $postVars in Director::test() to determine HTTP method - an existing array should cause POST rather than GET, even if its empty
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64228 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 19:55:55 +00:00
Ingo Schommer
0fac0752a4 BUGFIX Fixed stupid ommission from r64223 which caused HTTPRequest to construct without a proper URL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64227 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 19:53:59 +00:00
Ingo Schommer
524d7a9011 ENHANCEMENT Disrecard $includeRelations setting when scaffolding $has_one relationships in FormScaffolder - use $restrictFields to limit instead
BUGFIX Using fieldLabel() for $has_one relationships in FormScaffolder

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64224 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 19:31:18 +00:00
Ingo Schommer
90f3b87f35 ENHANCEMENT Making URL accessible through HTTPRequest->getURL()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64223 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 18:47:38 +00:00
Ingo Schommer
dcd77d065c BUGFIX Fixed wrong call to scaffoldCMSFields() in Member->getCMSFields(), removed addScaffoldRelationFields() call as this is done by the newly called parent::getCMSFields() already
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64173 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 00:29:16 +00:00
Ingo Schommer
a24ccecb69 FEATURE Added ForeignKey and used it in relation- and databasefield getters in DataObject
FEATURE Added FormScaffolder for more flexible scaffolding of FieldSets from DataObject metadata
API CHANGE Removed DataObject->addScaffoldRelationFields(), now in separate class FormScaffolder
API CHANGE Changed parameters for DataObject->scaffoldSearchFields() to unify them with scaffoldFormFields()
API CHANGE Added optional $params parameter to DataObject->getCMSFields() to be passed on to scaffoldFormFields()
API CHANGE Renamed DataObject->getFormFields() to getFrontEndFields()
ENHANCEMENT Added $params parameter to all DBField->scaffoldFormField() subclasses
API CHANGE Added third optional parameter $object to DBField::create() to comply with ForeignKey and PrimaryKey constructors

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64157 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-13 22:20:41 +00:00
Sam Minnee
57a84d5408 BUGFIX #2906 - Fixed manifest conflict in web-tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64153 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-13 21:34:38 +00:00
Sam Minnee
96e2c82075 Removed #! entry from cli-script.php; its unreliable and cli-script.php should be called as 'php cli-script.php' instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64152 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-13 21:25:30 +00:00
Ingo Schommer
e818f89962 ENHANCEMENT Setting default level for ContentController->getMenu($level = 1) to allow for calls without arguments
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64144 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-13 20:08:59 +00:00
Ingo Schommer
96a448a4b2 BUGFIX fixed ss.i18n.sprintf() call in Validator.js
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64142 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-13 12:26:39 +00:00
Sam Minnee
6fa55568ee BUGFIX #2936: Define STDOUT if it's not already defined...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64124 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-13 01:40:42 +00:00
Hayden Smith
8a1ab89b84 BUGFIX: Fixed order of arguments.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64109 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-12 22:21:35 +00:00
Andrew O'Neil
c26ccdffa0 FEATURE: #2601 - More template handlers
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64103 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-12 21:27:52 +00:00
Ingo Schommer
c11a9949a4 BUGFIX Bad XHTML in en_US language file (#2624) - thanks tiwoc!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64099 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-12 16:25:29 +00:00
Ingo Schommer
97fed5ae57 BUGFIX Director::fileExists() fails on windows with absolute paths (#2935) - thanks to ajshort!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64098 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-12 16:16:25 +00:00
Ingo Schommer
7f40b2b953 BUGFIX Fixed CSSContentParser to only use tidy on CLI mode if its available, and first check for existence of PHP tidy extension. Fixes failing unit tests on standard WAMP windows installations.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64097 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-12 16:15:24 +00:00
Ingo Schommer
c6f1a231a3 BUGFIX Fixed CSVParser assumptions about absolute unix-style filepaths - using Director::absFile() instead now
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64096 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-12 15:53:25 +00:00
Ingo Schommer
ab8c7fbedc BUGFIX Consistent usage of ss.i18n.sprintf() instead of ss.i18n.printf() - the method is returning a string rather than outputting directly, so should be sprintf()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64081 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 21:06:59 +00:00
Ingo Schommer
ec591fc1fe MINOR Documentation in i18n class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64079 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 17:36:31 +00:00
Ingo Schommer
a9abe0e6ca ENHANCEMENT Using $locale in _t() instead of repeatedly calling i18n::get_locale()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64078 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 17:36:13 +00:00
Ingo Schommer
72047aa3a1 BUGFIX Fixing AssetAdmin translations which were previously moved to Folder.php - i18n::include_by_class() doesn't like filenames/namespaces which are in a different folder than the language file they're referenced in (see #2359) - started in r64076
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64077 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 17:35:24 +00:00
Ingo Schommer
17ba4ded80 ENHANCEMENT Replaced hardcoded "en_US" references in i18n class with $default_locale
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 16:13:56 +00:00
Ingo Schommer
b562fcc934 BUGFIX Fixed AssetTableField javascript errors caused by r64049
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64074 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 16:07:01 +00:00
Ingo Schommer
8cc5625708 ENHANCEMENT Ability to add title constructor arguments to Tab and TabSet classes to resolve i18n issues with untranslated or unreferencable Tabs (see #2359)
ENHANCEMENT Support for $field_labels in relation tabs created by DataObject->addScaffoldRelationFields()
ENHANCEMENT Type checking and user errors for Tab and TabSet constructor arguments
ENHANCEMENT Supporting titles in FieldSet->findOrMakeTab()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64073 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 16:00:50 +00:00
Ingo Schommer
daaf05530c BUGFIX Fixed DebugView Breadcrumbs to not include query string as separate link, and don't append an arrow after the last element
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64072 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 13:05:37 +00:00
Ingo Schommer
d4c92e29b4 MINOR Removed CollectionController language strings from master table
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64068 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 12:14:06 +00:00
Ingo Schommer
9d596f6157 ENHANCEMENT Using i18n fieldlabels for column-headlines in TableListField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64067 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 12:13:23 +00:00
Normann Lou
a32b42fe19 BUGFIX: fix the bug that add some rules for summary columns even when they are not there.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64049 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-10 03:21:30 +00:00