Commit Graph

295 Commits

Author SHA1 Message Date
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
da2fd13b38 FEATURE: Allow you to access nested pages by falling over to a child page in ContentController if one is available.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88483 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:07 +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
3eafee7799 ENHANCEMENT: Added ModelAsController::controller_for() to link a SiteTree object to its controller.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88479 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:02 +00:00
Andrew Short
490835633c ENHANCEMENT: Added HTTPRequest->isMedia() to check if a request is for a common media type.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88478 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:02 +00:00
Andrew Short
cf2cf11b57 ENHANCEMENT: Do not allow access to actions that have not been defined or do not have an action template.
ENHANCEMENT: Added Controller->hasActionTemplate() to check if a template exists for a specific action.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88477 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:01 +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
d81d7593b3 MINOR ajshort: Deprecated un-used HTTPResponse->getLinks() method that duplicated functionality.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88467 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:06:53 +00:00
Sam Minnee
baea4ee2ba BUGFIX #3685: Fixed setting of character set by default when no content negotiator is used.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88218 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-06 21:44:38 +00:00
Geoff Munn
384389e079 MINOR FIX: removed backticks from documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86167 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-13 22:26:23 +00:00
Ingo Schommer
3f751a2cb8 BUGFIX Don't lowercase permission codes contained in $allowed_actions in RequestHandler->checkAccessAction(). Permission checks are case sensitive.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86085 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-10 07:02:54 +00:00
Ingo Schommer
5708f79312 BUGFIX Consistently returning from a Security::permissionFailure() to avoid ambiguous situations when controllers are in ajax mode
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86008 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-10 02:00:42 +00:00
Ingo Schommer
fc03a8608a API CHANGE Don't exempt 'index' controller actions from $allowed_actions check - they might still contain sensitive information (for example ImageEditor). This action has to explicitly allowed on controllers with $allowed_actions defined now.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86002 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-10 01:37:44 +00:00
Ingo Schommer
0cc95bec5f BUGFIX Fixed WidgetControllerTest by adding missing url routing to ContentController (see r85789)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85817 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-07 05:39:43 +00:00
Ingo Schommer
2cc0d016f4 API CHANGE Removed unnecessary WidgetFormProxy class and Widget->FormObjectLink(), broken functionality since the RequestHandler restructuring in 2.3. Use Widget_Controller instead.
FEATURE Added Widget_Controller class to enable nested forms within Wiget class.
ENHANCEMENT Changed WidgetArea.ss to iterate over $WidgetControllers instead of $Widgets, to allow forms rendered within to retain their controller context (through Widget_Controller and $failover mechanisms).
ENHANCEMENT Added handleWidgets() to ContentController to support new Widget_Controller class

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85789 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-07 03:28:23 +00:00
Ingo Schommer
e9d25ca2ce MINOR Moved documentation about Controller and RequestHandler to the right places
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85775 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-07 00:14:11 +00:00
Geoff Munn
a1207e4b94 MINOR FIX: Column names quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85419 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-31 00:22:10 +00:00
Sean Harvey
9e45d960bf MINOR Debug::backtrace() calls now call SSBacktrace::backtrace()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84782 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-19 04:22:36 +00:00
Sam Minnee
2b7572e21a BUGFIX: Removed some code that needed Extension to extend from Object.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84162 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 08:50:32 +00:00
Sam Minnee
6f0a1e9d36 MINOR: Small speed-up of HTTPRequest::match()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84143 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 03:51:17 +00:00
Sam Minnee
63d5691fb2 BUGFIX: Don't make the Director completely fail if there was output prior to session_start() being called.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84063 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-08 03:10:20 +00:00
Sam Minnee
004a1a2f24 MINOR: Removed unnecessary HomepageForDomain query
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83812 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-05 05:30:04 +00:00
Sean Harvey
82a68dd3bd MINOR Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81997 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-16 03:44:15 +00:00
Tom Rix
61ed3df367 MINOR fixed relative URL resolver in Director::test()
MINOR improved documentation in static-main.php

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81749 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-14 01:21:04 +00:00
Tom Rix
39309b1e9a ENHANCEMENT allow Director::test() to cope with absolute URIs
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81680 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-13 04:15:40 +00:00
Sam Minnee
0924d723b6 BUGFIX #3937: Fixed substr_count in HTTPRequest to be mbstring compatible
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80655 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-30 23:21:50 +00:00
Sean Harvey
628a0b7b88 ENHANCEMENT Don't give an error if ContentController::childrenOf() can't find the parent page, since this error isn't that useful
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80341 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-29 04:53:15 +00:00
Sam Minnee
56199e45e7 BUGFIX #3900: Fix Director::forceWWW()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80230 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 13:08:23 +00:00
Sam Minnee
e2dcc48d48 ENHANCEMENT ajshort: Allow a HTTPResponse to be encapsulated in a HTTPResponse_Exception, which can be later caught by the request handler.
MINOR ajshort: Updated RequestHandler->httpError() to interrupt the execution flow by throwing an exception.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80226 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 08:48:44 +00:00
Sam Minnee
f882f55492 BUGFIX #3732: Fixed validation of SilverStripeNavigator HTML
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80219 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 06:41:19 +00:00
Sam Minnee
6fd387c99c API CHANGE ajshort: Deprecated the Director site mode and callback functionality.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80055 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-25 08:15:52 +00:00
Sam Minnee
c52f67aae5 MINOR ajshort: Replaced usage of the deprecated split() function with preg_split().
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79568 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-18 09:34:17 +00:00
Sean Harvey
1168bf07c6 MINOR Removed comment that no longer applies in RequestHandler
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79423 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 06:20:58 +00:00
Sam Minnee
5d67fe14ad BUGFIX: Made 'homepage for domain' feature work on all databases.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79318 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 03:15:01 +00:00
Sam Minnee
87478b2c5e BUGFIX: Don't allow the use of get-var ?isDev=1 when security DB isn't available.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78544 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-07 23:07:25 +00:00
Tom Rix
7323a652bd FEATURE SingleSignOn - First commit, basic functionality. Until we get into a live environment, you can fake $_SERVER['REMOTE_USER'] in the site-wide _config.php.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78035 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-28 00:22:07 +00:00
Sean Harvey
b8ce07f459 BUGFIX Fixed SQL generation in ContentController::PageComments() - '`' (backticks) are not valid in queries on sapphire/trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77811 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 02:08:18 +00:00
Will Rossiter
5448a29835 FEATURE: added ability to display comments even when comments have been disabled. #2081
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77807 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 01:56:21 +00:00
Will Rossiter
9384936c51 MINOR: updated legacy form comment. PATCH #3769
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77599 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 02:49:30 +00:00
Sean Harvey
7cb259f051 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77454 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 00:14:47 +00:00
Sean Harvey
7d0e767db5 MINOR Removed @deprecated notice in FormResponse, replaced with a warning message
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77378 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 06:21:09 +00:00
Sean Harvey
76925990e1 API CHANGE Removed @deprecated 2.3 method ContentController::Section2(): Please use ContentController->Level(2)->URLSegment instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77355 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 05:09:49 +00:00
Ingo Schommer
104470006e API CHANGE Deprecated Translatable::set_reading_lang(), use Translatable::set_current_locale().
MINOR Renamed internal property Translatable::$reading_lang to $current_lang

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77006 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-17 05:36:01 +00:00
Ingo Schommer
67180937ff API CHANGE Deprecated Translatable::current_lang(), use Translatable::get_current_locale()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76853 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 06:05:48 +00:00
Ingo Schommer
f18a9d3cc6 API CHANGE Deprecated ModelAsController->get404Page() with using the URLSegment "404" on a normal page type - please use the ErrorPage class instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75913 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 02:17:29 +00:00
Sean Harvey
a39822712b Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75659 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 07:28:53 +00:00
Sean Harvey
a5e82ddff1 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75590 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 01:20:24 +00:00
Sean Harvey
ec9765d9f2 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75572 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 23:40:35 +00:00
Ingo Schommer
99c1fe9f93 BUGFIX Allowing translated homepages in RootUrlController
BUGFIX Limiting RootURLController to just trigger Translatable if no DomainForHomepage value is found
BUGFIX Using $locale parameter in Translatable::get_homepage_urlsegment_by_locale()
BUGFIX Updated enabling mechanism in Translatable->alternateGetByUrl()
MINOR Removed HTTP_HOST setting in TranslatableTest, wasn't necessary
API CHANGE Deprecated Translatable::get_homepage_urlsegment_by_language(), use get_homepage_urlsegment_by_locale()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75328 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 23:08:39 +00:00