Commit Graph

895 Commits

Author SHA1 Message Date
Andrew Short
06fbb96f88 API CHANGE: Decoupled ErrorPage::response_for() from the request and updated it so it will only return a response if an appropriate error page can be found.
MINOR: Updated ContentController->httpError() to use Controller->httpError() if there is no error page.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88507 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:25 +00:00
Andrew Short
da4b65c749 FEATURE: Added RequestHandler->hasAction() and Controller->hasAction() to check if a specific action is defined on a controller.
ENHANCEMENT: Updated ContentController->handleRequest() to use Controller->hasAction() to check whether to fall over to a child page, rather than relying on an error response from Controller->handleRequest().

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88505 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:23 +00:00
Andrew Short
ea906a50a8 FEATURE: Implemented Translatable::get_homepage_link_by_locale() to enable translated home pages to function.
FEATURE: Updated SiteTree::get_by_link() to integrate with translatable, and allow it to work across languages by implementing Translatable->alternateGetByLink().
API CHANGE: Moved lang_filter enabling & disabling into static methods on Translatable, and renamed to locale_filter.
BUGFIX: Fixed viewing a translatable page by URL without explicitly setting a Locale in ContentController->handleRequest().

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88503 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:22 +00:00
Andrew Short
80c8780b6f ENHANCEMENT: Updated the SiteTree URLSegment conflict resolver to work with nested URLs.
MINOR: Added tests for SiteTree->validURLSegment().

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88502 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:21 +00:00
Andrew Short
0ddef87117 ENHANCEMENT: Updated SiteTree CMS fields to be in line with nested URL changes.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88501 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:20 +00:00
Andrew Short
3a0f809387 MINOR: Removed link rewriting methods on SiteTree that are no longer necessary due to linking changes.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88497 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:18 +00:00
Andrew Short
ad7194cc40 FEATURE: Refactored RootURLController to allow nested home pages.
MINOR: Deprecated RootURLController::get_homepage_urlsegment() in favour of get_homepage_link().
MINOR: Updated SiteTree->RelativeLink() to return a link to the site root for the home page.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88496 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:17 +00:00
Andrew Short
f29eceecff API CHANGE #3724: Unified the Link() method to accept an action parameter.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88495 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:16 +00:00
Andrew Short
bc143c8c1e MINOR: Updated SiteTree->generateURLSegment() to trim the link of dashes before returning.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88490 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:12 +00:00
Andrew Short
cb35b13905 ENHANCEMENT: Updated the SiteTree link and section code to derive data from the current page, rather than relying on its own cache.
MINOR: Added tests for the link and section code.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88489 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:11 +00:00
Andrew Short
3defa4931c ENHANCEMENT: Added Hierachy->getAncestors() to return all the parent objects of the class in a DataObjectSet.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88488 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:10 +00:00
Andrew Short
bf50f560df ENHANCEMENT: Update ContentController to manually set the current Director page in handleRequest().
MINOR: Deprecated Director::currentPage() in favour of Director::get_current_page().

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88487 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:10 +00:00
Andrew Short
d4fb917825 MINOR: Replaced usage of the deprecated SiteTree::get_by_url() with get_by_link().
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88485 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:08 +00:00
Andrew Short
57f9a957bc FEATURE: Added SiteTree::get_by_link() to fetch the SiteTree object associated with a nested link.
MINOR : Deprecated SiteTree::get_by_url().

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88484 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:08 +00:00
Andrew Short
4a054c0cc5 FEATURE: Allow you to link to SiteTree? objects in HTMLText or HTMLVarchar fields by using a "[sitetree_link id=n]" shortcode.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88481 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:04 +00:00
Andrew Short
acc063984b ENHANCEMENT: Added ErrorPage::response_for() to get a response for a HTTP error code and request.
MINOR: Updated ModelAsController to generate errors with ErrorPage.
MINOR: Updated ContentController to generate HTTP errors with ErrorPage.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88480 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:03 +00:00
Andrew Short
3599a105fd ENHANCEMENT: Updated SiteTree linking methods to generate nested URLs.
MINOR: Updated ContentController->Link() to force links generated by a controller to always be returned in their full form.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88476 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:00 +00:00
Andrew Short
55408946a6 MINOR: Parse HTMLText and HTMLVarchar values with ShortcodeParser before inserting into a template.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88475 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:06:59 +00:00
Andrew Short
365b4784a9 FEATURE: Refactored ViewableData. The main changes are:
* Values are not always casted before being rendered into a template.
	* Casting information can by dynamically provided by $casting_properties, rather than being hardcoded to $casting and $db.
	* Removed unneeded ViewableData_Iterator - ArrayIterator is instead used.
	* Removed ViewableData_ObjectCustomised - now just uses ViewableData_Customised.
ENHANCEMENT: Added template and value methods to database fields.
MINOR: Added ViewableDataTest and extended DataObjectTest.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88474 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:06:58 +00:00
Andrew Short
bd5b134c37 FEATURE: Added utility methods to enable and disable nested URLs to SiteTree.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88468 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:06:54 +00:00
Geoff Munn
84ec644448 API CHANGE: support for advanced database options now included
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88296 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-08 01:22:06 +00:00
Geoff Munn
f552743006 API CHANGE: The advancedOptions variable now passed to the database connection
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88295 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-08 01:21:41 +00:00
Geoff Munn
084e3801c5 API CHANGE: $database_extensions static variable now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88294 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-08 01:21:24 +00:00
Geoff Munn
e31b4abb7b API CHANGE: The advancedOptions variable now passed to the database connection
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88293 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-08 01:20:30 +00:00
Ingo Schommer
54824945f5 MINOR Don't invoke Translatable->providePermissions() if its not enabled
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88137 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 20:39:57 +00:00
Ingo Schommer
2506816ad6 ENHANCEMENT Added Translatable->getAllowedLocalesForMember()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88125 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 20:07:03 +00:00
Ingo Schommer
0faf03ee4e API CHANGE Requiring TRANSLATE_ALL or TRANSLATE_<locale> permission for authors without administrative access to edit translations
ENHANCEMENT Added Translatable->providePermissions()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88123 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-05 10:33:36 +00:00
Geoff Munn
ddfc0613ad MINOR CHANGE: numeric datatypes changed to support array types
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87895 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 21:03:52 +00:00
Geoff Munn
611af45993 API CHANGE: Transaction stubs created
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87893 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 21:02:00 +00:00
Ingo Schommer
bb2b79e959 ENHANCEMENT Added ComponentSet->getComponentInfo() (#4587, thanks rorschach)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87777 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-30 22:19:25 +00:00
Geoff Munn
1be70c9ffc MINOR CHANGE: HistoricalChildren now ordered by ID
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87763 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-30 21:21:30 +00:00
Geoff Munn
acba65eaaa API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87568 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:02:35 +00:00
Geoff Munn
c2cb8dd4b9 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87567 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:02:28 +00:00
Geoff Munn
05014765e6 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87566 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:01:59 +00:00
Geoff Munn
dd31eb1754 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87565 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:01:51 +00:00
Geoff Munn
e0334112f9 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87564 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:01:41 +00:00
Geoff Munn
fa4be08785 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87563 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:01:30 +00:00
Geoff Munn
d07871c372 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87562 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:01:15 +00:00
Geoff Munn
c1e32fb3db API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87561 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:01:06 +00:00
Geoff Munn
9cb252d976 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87560 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:00:56 +00:00
Geoff Munn
acbff3b95a API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87559 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:00:45 +00:00
Geoff Munn
8cd96982c9 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87558 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:00:36 +00:00
Geoff Munn
772c1136d4 API CHANGE: array data type now supported
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87557 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:00:27 +00:00
Geoff Munn
1eb7d14033 MINOR FIX: column names escaped properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87556 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 22:00:00 +00:00
Geoff Munn
262129a8b5 API CHANGE: array data types now supported by dev/build
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87555 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 21:59:39 +00:00
Sam Minnee
f85a95f3aa BUGFIX #4579: Translatable's call to new LanguageDropdownField() broked
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87456 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-29 01:04:37 +00:00
Sam Minnee
2402f308e1 BUGFIX: Fixed bug in recent changes to Hierarchy::liveChildren() to do with Translatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87228 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-24 06:11:02 +00:00
Sam Minnee
45fb4e0182 BUGFIX: Fixed Hierarchy::liveChildren() to work on PostgreSQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87210 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-24 05:22:12 +00:00
Sam Minnee
b8617a5cab BUGFIX: Don't throw a notice-level error in DB::getConn() if connection hasn't been set yet, to mimic previous behaviour.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87131 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-23 03:35:05 +00:00
Sam Minnee
47e3d28c89 API CHANGE: Added name argument to DB::getConn() and DB::setConn(), so that you can store multiple named connections.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87087 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-22 23:48:54 +00:00