Commit Graph

101 Commits

Author SHA1 Message Date
Sean Harvey
47227a9395 BUGFIX ContentController::SiteConfig() should look to the SiteTree record so an alternate SiteConfig is considered, if this method doesn't exist on the data record then fall back to the default SiteConfig
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111255 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:53 +13:00
Sam Minnee
bb5a333837 BUGFIX: Generate stage/live links using Controller::join_links() instead of string concatenation.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104581 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:21 +13:00
Ingo Schommer
c8163eb609 BUGFIX Renamed Nested URLs are automatically redirected to their new location with 301 HTTP status code in ModelAsController/ContentController (fixes #5393, thanks cbarberis)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103461 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:15 +13:00
Ingo Schommer
0b44d49167 MINOR Using canView() instead of deprecated can('view') in ContentController
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@102909 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:12 +13:00
Ingo Schommer
3588f6cf16 BUGFIX Using i18n::get_locale() in ContentController->ContentLocale() to ensure the correct locale can be used in templates withouth Translatable enabled (broken in r97207, thanks DesignCity) (from r102544)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@102545 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:12 +13:00
Will Rossiter
28c0d8171b MINOR: fixed notice level error
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101600 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:06 +13:00
Sean Harvey
4a516d8eed MINOR Removed rewritest.php places in sapphire since it's no longer part of the phpinstaller/branches/2.4 package
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101353 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:05 +13:00
Ingo Schommer
a3812e28a5 MINOR Fixed missing closing <div> in ContentController->successfullyinstalled()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101254 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:04 +13:00
Ingo Schommer
7028a42658 BUGFIX Don't delete index.php after successful installation - in ContentController->deleteinstallfiles(). URL routing might rely on it without mod_rewrite.
BUGFIX Require ADMIN permissions for ContentController->deleteinstallfiles() - together with retaining index.php this removed a vulnerability where unauthenticated users can disrupt mod_rewrite-less URL routing. 

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101227 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:04 +13:00
Ingo Schommer
c79a9d5a03 ENHANCEMENT Redirecting to translated page when original is requested with a 'locale' GET parameter (e.g. 'about-us/?locale=de_DE' will redirect to 'ueber-uns' with a 301 HTTP response). Implemented in ContentController->handleRequest(). (see #5001)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100937 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:57 +13:00
Ingo Schommer
2cbbcfe3ab MINOR SilverStripeNavigator.js used jquery.live instead of livequery, and doesn't include unnecessary behaviour.js
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100883 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:55 +13:00
Ingo Schommer
61d880ce68 MINOR Added Requirements for SilverStripeNavigator (see r99080)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99097 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:37 +13:00
Ingo Schommer
7f4a515649 BUGFIX: Fix navigator links not opening in new windows. (from r97510)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99086 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:36 +13:00
Ingo Schommer
2805cfabdb FEATURE: Add Link to silverstripe navigator (from r97407)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99080 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:36 +13:00
Ingo Schommer
ed8e75ea8d APICHANGE: Use the same navigator items in the CMS that are used on the frontend (from r97395)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99079 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:36 +13:00
Ingo Schommer
76b366e760 FEATURE: Make navigator items more overloadable (from r97376)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99047 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:34 +13:00
Ingo Schommer
1f60bde524 FEATURE: Refactor links in $SilverStripeNavigator so modules can add extras (from r97299)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99046 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:34 +13:00
Sean Harvey
d5683eda56 BUGFIX Fixed quoting on ContentController::successfullyinstaller() - this broke certain databases like PostgreSQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98777 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:31 +13:00
Ingo Schommer
6a1b88aaf1 BUGFIX Fixed ContentController->deleteinstallfiles (added to $allowed_actions, see #5040)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98324 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:26 +13:00
Sam Minnee
60f93644a0 BUGFIX: Updated SiteConfig-based theme selection to remove inappropriate coupling from SSViewer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98263 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:25 +13:00
Carlos Barberis
263e9acf61 ENHANCEMENT: 2.4 tickets (#4670), new permission code to view draft stage w/o CMS access
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97895 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:17 +13:00
Sam Minnee
9ac547d32d BUGFIX: Don't rely on the current working directory for any file access; use BASE_PATH.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97728 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +13:00
Ingo Schommer
ccd9ecd230 API CHANGE Deprecated ContentController->LangAttributes(). Use ContentLocale() instead and write attribute names suitable to XHTML/HTML templates directly in the template.
ENHANCEMENT Added ContentController->ContentLocale() to allow XHTML/HTML specific lang= attribute settings in custom template code (see #4858). Removed <meta http-equiv="Content-Language"...> tag in SiteTree->MetaTags().
ENHANCEMENT Updated blackcandy theme to use new $ContentLocale attribute to set the locale of the current page (in Page.ss)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97207 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:10 +13:00
Andrew O'Neil
4bbf2bc040 MINOR: Use jquery instead of prototype for silverstripenavigator
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93966 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:54 +13:00
Ingo Schommer
03c5caea72 MINOR Updated paths from jsparty to sapphire/thirdparty, cms/thirdparty and sapphire/javascript
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93611 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:52 +13:00
Ingo Schommer
3b794bb97a MINOR Changed silverstripe.com references to silverstripe.org
MINOR Fixed broken wiki links (#4672)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@90886 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:31 +13:00
Ingo Schommer
8cf532f623 BUGFIX Added ContentController->successfullyinstalled() to $allowed_actions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@90876 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:31 +13:00
Andrew Short
79773042be API CHANGE: Renamed conflicting classes to have an "SS_" namespace, and renamed existing "SS" namespace to "SS_". The affected classes are: HTTPRequest, HTTPResponse, Query, Database, SSBacktrace, SSCli, SSDatetime, SSDatetimeTest, SSLog, SSLogTest, SSLogEmailWriter, SSLogErrorEmailFormatter, SSLogErrorFileFormatter, SSLogFileWriter and SSZendLog.
MINOR: Replaced usage of renamed classes with the new namespaced name.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 03:06:31 +00:00
Sam Minnee
ae24151fe5 FEATURE SiteConfig (from r85339)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89190 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 22:30:34 +00:00
Andrew Short
7277ada137 BUGFIX: Added PageComments to ContentController::$allowed_actions so commenting works.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89003 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 00:49:49 +00:00
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
4cc56abecb MINOR: Updated ContentController->ChildrenOf() to use new SiteTree functions, and added tests.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88498 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:19 +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
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
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
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
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
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
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
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
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
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
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