Commit Graph

734 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
eb5cd150d8 BUGFIX YamlFixture->saveIntoDatabase(): In order to support reflexive relations which need a valid object ID, the record is written twice: first after populating all non-relational fields, then again after populating all relations (has_one, has_many, many_many). Fixes a bug where FileTest was testing onBeforeWrite() behaviour
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64005 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 15:14:03 +00:00
Ingo Schommer
320c30ba5d BUGFIX Writing record from yml before parsing relations in YamlFixture->saveIntoDatabase() to avoid missing lookups for reflexive relations on the same object
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64004 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 15:07:34 +00:00
Ingo Schommer
4134f92dad BUGFIX Moved RecordController and CollectionController to external module (see r63905)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64002 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 14:41:22 +00:00
Ingo Schommer
5f50fee5e9 BUGFIX Making sure that DataObject->has*Field() methods always return an array, in order not to fail any array_key_exists() checks
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64000 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 14:39:24 +00:00
Ingo Schommer
b1b909103e BUGFIX Fixing DataObject->hasField() to find fields in inherited database tables by using hasDatabaseField().
BUGFIX Fixing DataObject->hasField() to detect dynamic getters by using hasMethod("get$fieldName") 
ENHANCEMENT Re-enabled two test cases in DataObjectSet as a result of the above fixes 


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63999 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 14:38:46 +00:00
Ingo Schommer
62e4870c7b API CHANGE Deprecated GhostPage
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63997 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 14:36:04 +00:00
Sean Harvey
4da7a70cdd BUGFIX: Allow use of ClassInfo methods in _config.php when manifest is being rebuilt
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63981 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 05:29:34 +00:00
Sam Minnee
866853f31a BUGFIX: Improved RedirectorPage's handling of invalid configuration options to prevent infinite loops and segfaults
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63939 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 01:46:17 +00:00
Josh Kosmala
3d4d4d0c42 BUGFIX: Fix broken breadcrumbs
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63920 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-09 00:28:36 +00:00
Andrew O'Neil
e5f3982058 BGFIX: #2587 Fix HTTPS detection on IIS (mackeyn)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63912 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 22:53:20 +00:00
Sam Minnee
571e8d2b2c BUGFIX: Prevent misconfigured redirector pages from breaking static publishing
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63909 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 22:35:22 +00:00
Andrew O'Neil
bd1b9e4f73 BGFIX: #2527 - Fix mysql version detection on hosts with custom mysql version names (HakTom)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63904 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 22:05:56 +00:00
Andrew O'Neil
015385c526 MINOR: Add warning for deprecated function.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63898 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 21:33:43 +00:00
Hayden Smith
3f6a86738b Added PHP doc for the ValidationException thrown by DataObject::write
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63892 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 20:50:28 +00:00
Hayden Smith
fc2c16efdf DataObject::write now throws a ValidationException rather than calling user_error if the call to DataObject::validate fails. This allows the validation exception to be caught and handled by tests or other controllers.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63891 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 20:42:09 +00:00
Hayden Smith
d8dd8097e1 BUGFIX: Validation result was ignoring the $valid flag passed as the first argument.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63890 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 20:40:11 +00:00
Sam Minnee
7741fdb155 BUGFIX: Don't let Director::test() clobber current stage
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63825 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 03:37:33 +00:00
Sam Minnee
09cb773f5c BUGFIX: SiteTree::onAfterPublish() will still pass an object to the handlers on the first publish
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63823 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 03:36:38 +00:00
Hayden Smith
f2474a0ae2 Moved error_reporting setting from main.php to Core.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63821 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 03:35:28 +00:00
Sean Harvey
9f0718f6df BUGFIX: Fixed array_key_exists check in DataObject->setField that was failing when DataObject->record was not yet initialised by DataObject->setField.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63813 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 02:25:26 +00:00
Hayden Smith
634ed7b70c Merged from branches/nzct-trunk. Use 'svn log -c <changeset> -g' for full commit message. Merge includes stability fixes and minor refactor of TableListField and ComplexTableField.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63806 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-08 02:00:12 +00:00
Sam Minnee
09cbef9146 BUGFIX: Fixed bug in getCMSFields scaffolding of relations
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63739 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-07 04:03:24 +00:00
Ingo Schommer
54234219d1 BUGFIX Only include i18n.js if javascript files are included - and to be safe, include the required prototype.js along with the library
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63698 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-07 00:27:46 +00:00
Ingo Schommer
711de868c9 BUGFIX Enabled Link() methods for RecordController and CollectionController, and adjusted url handling to ModelAdmin counterparts to avoid linkage handling problems
BUGFIX Requiring a parentController for RecordController
ENHANCEMENT Custom getViewer() methods to use Page main templates if CollectionController is nested in a ContentController

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63681 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-06 19:29:04 +00:00
Ingo Schommer
6878171375 ENHANCEMENT Added SSViewer->getTemplateFileByType() and SSViewer->setTemplateFile()
MINOR Documentation and formatting in SSViewer and Controller

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63680 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-06 19:25:45 +00:00
Ingo Schommer
802317c705 FEATURE Added HTTP method override support to HTTPRequest and Form (through $_POST['_method'] or $_SERVER['X-HTTP-Method-Override']), incl. unit tests
ENHANCEMENT Added Form->FormHttpMethod()
ENHANCEMENT Added HTTPRequest->httpMethod()
ENHANCEMENT Added HTTPRequest::detect_method()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63679 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-06 14:58:01 +00:00
Ingo Schommer
d543305882 FEATURE Frontend CRUD scaffolding with RecordController and CollectionController (not fully functional yet, needs correct Link() methods)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63659 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-06 00:48:25 +00:00
Ingo Schommer
78469b86e6 MINOR Documentation for HTTPRequest and RequestHandlingData
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63657 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-05 22:35:14 +00:00
Ingo Schommer
1bb708377d MINOR Documentation for HTTPRequest and RequestHandlingData
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63655 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-05 22:16:07 +00:00
Ingo Schommer
52ae575630 ENHANCEMENT Added Controller->getRequest()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63653 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-05 19:45:38 +00:00
Ingo Schommer
d53bbb0df1 ENHANCEMENT Added Controller->render($params) as a shortcut for Controller->customise($params)->renderWith(array('MyTemplate','MySubTemplate')) - templates are auto-detected by Controller->getViewer() and Controller->getAction()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63652 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-05 19:27:21 +00:00
Ingo Schommer
e1e2329c90 ENHANCEMENT Consistently allowing for $restrictFields and $fieldClasses parameters passed to DataObject->scaffoldFormFields(), DataObject->scaffoldSearchFields(), DataObject->scaffoldCMSFields()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63651 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-05 19:22:54 +00:00
Ingo Schommer
09e3d91956 ENHANCEMENT Added support for customize parameters to ViewableData->renderWith() to avoid unnecessary chaining ($this->customize($params)->renderWith($template))
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63648 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-05 19:19:07 +00:00
Ingo Schommer
1b6821e430 BUGFIX Automatically including sapphire/javascript/i18n.js in Requirements::process_i18n_javascript() to avoid errors when Requirements are manually overwritten
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63640 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-04 17:44:54 +00:00