Commit Graph

343 Commits

Author SHA1 Message Date
Andrew O'Neil
508316a19c BUGFIX: Don't force SSL when running from CLI
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98272 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:25 +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
Sam Minnee
5efb72ce26 BUGFIX: Let ModelAsController::init() extensions trigger redirections. (from r97767)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98221 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:24 +13:00
Normann Lou
7c84d2f60b BUGFIX: remove the possibility that Director::isDev() could be recursively called when putting isDev=1 in $_GET, addressed in ticket #4978 (http://open.silverstripe.org/ticket/4978)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97926 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:18 +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
Ingo Schommer
bf35a7bc48 BUGFIX Checking that URL controller in HTTPRequest->match() is a subclass of Controller, not RequestHandler (which would include nested controllers like Form or FormField subclasses that shouldn't be accessible on their own toplevel URL namespace)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97881 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:17 +13:00
Sam Minnee
c212f40bb5 BUGFIX Use BASE_PATH and BASE_URL instead of data from $_SERVER.
API CHANGE: Determine default BASE_PATH/BASE_URL from the __FILE__ content, so that the script that initiated the Sapphire process doesn't matter.  This means that index.php doesn't need to manipulate those variables.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97731 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +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
Andrew Short
46a8083e57 BUGFIX: Fixed nested URLs operation for pages more than 4 levels deep.
From: Andrew Short <andrewjshort@gmail.com> (from r95902)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97433 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:12 +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
Sam Minnee
cfb2c2c027 BUGFIX: Amended some references to HTTPResponse, replacing with SS_HTTPResponse
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96746 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:05 +13:00
Sam Minnee
2b717a1ea5 BUGFIX: Added better handling of rendering SiteTree objects, to prevent test errors. (from r89963)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96729 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:03 +13:00
Sean Harvey
060c54370e BUGFIX Fixed ModelAsController::findOldPage() failing on MSSQLDatabase using "sqlsrv" driver
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94885 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:59 +13:00
Andreas Piening
999995b83a MINOR: added cookies to Director::test()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94684 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:58 +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
Will Rossiter
40f448f824 API CHANGE: removed Director::Link(). Use Controller::join_links() instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93785 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:54 +13:00
Sean Harvey
d93ee14be1 MINOR Removed calls to ContentNegotiator::disable() since it's disabled by default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93682 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:53 +13:00
Sean Harvey
24ed6150cf MINOR Removed ContentNegoitator::disable() from FormResponse - it's disabled already
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93659 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:53 +13:00
Sean Harvey
bd37d67a48 MINOR Moved static functions in ContentNegotiator above the instance methods
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93641 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:52 +13:00
Sean Harvey
b26b7e1228 API CHANGE Removed deprecated static function ContentNegotiator::disable() - it's disabled by default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93640 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:52 +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
Sean Harvey
f76acee01c BUGFIX Fixed dev/build not redirecting properly on first install of SS website on IIS
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93259 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:38 +13:00
Sam Minnee
723d075ffd API CHANGE: Replaced BasicAuth::enable() with BasicAuth::protect_entire_site()
API CHANGE: BasicAuth::requireLogin() no longer has an option to automatically log you in.  You can call logIn() on the object returned, instead. (from r91603)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91612 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:36 +13:00
Andrew O'Neil
e2a3cb2e20 BUGFIX: Return correct error when 404 page doesn't exist and page is not found.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91209 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:35 +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
Sam Minnee
bd452e1579 BUGFIX #4063: Corrected base tag for IE6
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90547 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-31 00:16:54 +00:00
Sean Harvey
3d6c6a58d0 MINOR Security text whitespace change to be consistent with eachother when the site is accessed with BasicAuth enabled
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90224 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-27 07:27:22 +00: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
Sam Minnee
b25427c732 BUGFIX: Fixed generation of static cache files in subdirectories. (from r88569)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89183 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 22:24:29 +00:00
Ingo Schommer
b930149c3a BUGFIX Fixed RequestHandler->allowedActions() lowercasing of actions - was applying the logic, but not writing it back to the $actions array.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89163 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 21:50:02 +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
2be58d19f3 BUGFIX: Updated ModelAsController->findOldPage() query to be cross-database compatible.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88799 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-13 02:43:39 +00:00
Andrew Short
94d2913f09 API CHANGE: HTTPRequest and HTTPResponse no longer inherit from Object, since they should not be extended.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88797 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-13 02:43:30 +00:00
Sam Minnee
68279be998 BUGFIX: Fix regression in r88521 that prevented the index action from being explictly disabled by setting the * key in allowed_actions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88523 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 09:15:51 +00:00
Sam Minnee
1fce2e614b BUGFIX: Ensure that the index action works even if allowed_actions is set.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88521 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 05:16:18 +00:00
Andrew Short
72592d8c14 FEATURE: Added RequestHandler->allowedActions() to return a unified representation (including extensions) of all allowed actions on a controller.
BUGFIX: Updated Controller->hasAction() to use RequestHandler->allowedActions() so that extension actions are recognised.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88508 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:26 +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
53450e1221 MINOR: Updated Controller to return a 404 on actions that don't exist, rather than a 403.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88506 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:24 +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
ajshort
97ac0008b3 ENHANCEMENT: Cached the value for RootURLController::get_homepage_link() between calls.
From: ajshort <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88504 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:22 +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
beebf785b5 ENHANCEMENT: Refactored ModelAsController to only grab the first page of a request, then pass control on to it.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88499 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:19 +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
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
c1c7973b95 BUGFIX: Fixed Controller::join_links() to properly handle multiple consecutive slashes.
From: Andrew Short <andrewjshort@gmail.com>

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