Commit Graph

1052 Commits

Author SHA1 Message Date
Sean Harvey
559bbfcca8 BUGFIX #4605 DataObject::newClassInstance() should repopulate it's defaults after changing to an instance of a different class, otherwise databases will complain of NULL values being written to columns that don't accept NULL values.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88956 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-14 06:35:45 +00:00
Andrew Short
b59507414f API CHANGE: SSViewer and SQLQuery 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@88700 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-12 22:28:47 +00:00
Andrew Short
5c316aa1c0 MINOR: Removed unnecessary check in DataObject->hasField() and optimised DataObject->db() call.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88699 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-12 22:28:30 +00:00
Sam Minnee
24435fbbf7 BUGFIX: Fixed bugs in ViewableData casting system.
From: Sam Minnee <sam@silverstripe.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88664 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-12 06:58:40 +00:00
Sam Minnee
cad7d5e859 ENHANCEMENT: Make base tag in 404 page dynamic (from r72282)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88633 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-12 03:23:10 +00:00
Sam Minnee
5680cc97e6 MINOR: Properly quoted column name in SiteTree->validURLSegment() for postgresql support
From: Sam Minnee <sam@silverstripe.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88528 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 10:31:19 +00:00
Andrew Short
8546a6d194 MINOR: Updated SiteTree->ElementName() to generate the identifier from the full link rather than the URLSegment.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88509 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
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
Normann Lou
74b2307ca8 MINOR: Revert r86510 since it doesn't fit MySQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86830 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-21 04:29:44 +00:00
Sean Harvey
b77d088d47 Merged in parent::__construct() additions from branches/2.3 - r83580 and r83587
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86676 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-18 03:02:19 +00:00
Sean Harvey
2fdb548594 Merged Text::ContextSummary() changes from branches/2.3 - r82035 and r82036
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86669 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-18 02:53:46 +00:00
Geoff Munn
0a953ba4e5 BUG FIX: missplaced quotes were ruining unit tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86556 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 03:24:15 +00:00
Geoff Munn
a98a415849 BUG FIX: $params variable removed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86532 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:24:36 +00:00
Geoff Munn
844330a63d MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86513 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:09:23 +00:00
Geoff Munn
c62c93999f MINOR FIX: precision values now handled better
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86512 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:08:57 +00:00
Geoff Munn
5c0b83f046 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86511 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:08:21 +00:00
Geoff Munn
9678b7ed48 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86510 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:07:45 +00:00
Geoff Munn
5b2eb11d4b MINOR FIX: columns quoted properly + database agnostic version of RANDOM() created
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86509 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:07:32 +00:00
Geoff Munn
9ec8c5c310 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86508 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:06:12 +00:00
Geoff Munn
05c17d6f91 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86507 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:05:52 +00:00
Geoff Munn
a20818b529 ENHANCEMENT: Database specific version of RANDOM() created
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86506 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:05:23 +00:00
Ingo Schommer
d834223142 ENHANCEMENT Supporting full parameter signature in Versioned->Versions(), allVersions()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86216 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-14 05:15:49 +00:00
Geoff Munn
ab735c70d0 BUG FIX: ID column in delete function now quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86170 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-13 22:28:19 +00:00
Geoff Munn
664aaacb21 MINOR FIX: column names quoted properly, full text search column now named
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86168 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-13 22:27:47 +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
Julian Seidenberg
8b73690f23 ENHANCEMENT: Ticket #3910 - MySQL Time Zone support (alternative time zone to that of the website to which the server is set to)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85716 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-04 01:38:29 +00:00
Julian Seidenberg
43e27fd596 ENHANCEMENT: Ticket #4297 - Use Director::baseFolder instead of relative links in sapphire/core/Image.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85700 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-03 23:30:08 +00:00
Geoff Munn
95e50bd78f MINOR FIX: column names quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85418 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-31 00:21:46 +00:00
Ingo Schommer
42d12d75b8 MINOR Wording
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85396 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-30 20:59:32 +00:00
Ingo Schommer
fec369531c MINOR Added SiteTree::reset() to unset any in-memory caches (see DataObject::reset()). Using reset() in SapphireTest to avoid caches persisting across multiple tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85337 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-27 06:55:32 +00:00
Ingo Schommer
1193aed711 BUGFIX Fixed SiteTree::can_edit_multiple() and canEdit() to collect permissions from different Versioned tables, which fixes querying a SiteTree record which has been deleted from stage for its permissions (e.g. in SiteTreeActionsTest)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85336 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-27 06:53:28 +00:00
Ingo Schommer
83aa90f1b2 MINOR Returning a HTTPResponse object from RedirectorPage_Controller to avoid generating output in TestRunner
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85328 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-27 04:44:27 +00:00
Ingo Schommer
2767592d9f MINOR Removed debug code
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85327 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-27 04:43:40 +00:00
Ingo Schommer
685cd996a6 MINOR More robust RedirectorPageTest implementation that doesn't rely on _t() calls which are mysteriously failing on all subsequent calls in PHPUnit
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85311 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-27 03:10:13 +00:00
Normann Lou
c8753a99d3 BUGFIX: Fix the bug in buildSQL() by trying to join an table with non-exsiting composite db field like "Money"
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85120 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-24 23:51:53 +00:00
Sam Minnee
e4ca69dc3f BUGFIX #4463: Set AuthorID and PublisherID correctly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85086 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-24 07:35:05 +00:00
Sean Harvey
a1d20b8ae9 BUGFIX #3228 Fixed undefined offset error in Text::BigSummary() if trying to summarise text that is smaller than the requested word limit
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85076 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-24 06:16:56 +00:00
Sam Minnee
dfbd16e140 BUGFIX: Fixed querying of composite fields (broken due to inappropriate optimisation of hasField)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84796 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-19 04:59:40 +00:00
Sam Minnee
e0e12aeb40 BUGFIX: Reverted some changes from r84163 because they broke cases where you have two fields of the same name on different subclasses.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84789 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-19 04:34:28 +00:00
Tom Rix
e7e0e9424d MINOR added better handling of pages that result in no URLSegment
MINOR added QuarterHourly scheduled tasks, tidied documentation a little bit

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84569 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-17 22:30:27 +00:00
Tom Rix
a79452e23a FEATURE concurrent editing alerts. if two users are editing a page, the will get a notice. If Bob deletes/saves the page Alice is working on, Alice will be notified.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84231 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-12 21:19:04 +00:00
Sam Minnee
a74129b5a6 ENHANCEMENT: Improved performance of DataObject::hasField()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84165 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 08:57:14 +00:00
Sam Minnee
07871f81e1 ENHANCMENT: Low-level performance improvements in database access.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84163 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 08:51:05 +00:00
Sam Minnee
5790ddf708 API CHANGE: Added DataObject::is_composite_field() and DataObject::composite_fields() to efficiently keep track of which fields are composite.
API CHANGE: Deprecated DataObject::databaseFields() in favour of the static DataObject::database_fields()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84161 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 08:49:52 +00:00
Sam Minnee
d8113a667e API CHANGE: Extension no longer inherits from Object.
ENHANCEMENT: Object::__construct() performance improved slightly.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84160 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 08:35:14 +00:00
Sam Minnee
d5cf940d69 API CHANGE: Make Object::uninherited_static() have a separate execution path to Object::get_static(), for more reliable operation. The intention is that for any given static, you either use Object::get_static() or you use Object::uninherited_static() - not both.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84151 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 05:01:17 +00:00
Sam Minnee
bdccbdfbcf MINOR: Fixed notice-level error
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84148 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 04:46:47 +00:00
Sam Minnee
5f6bee22ba BUGFIX: Added static resetting methods for more reliable test execution.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84147 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 04:45:54 +00:00
Sam Minnee
788b435821 BUGFIX: Fixed SQLQuery::filtersOnID() for cases where a ClassName filter is inserted before the ID filter.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84093 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-10 04:36:17 +00:00
Sam Minnee
50176c631b BUGFIX: Fixed filtering by archive date
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84092 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-10 04:35:50 +00:00
Normann Lou
5c68bb3bde BUGFIX: an time field input between 12:00pm to 12:59pm can't save back to database or always save as 00:00:00.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84086 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-10 03:56:59 +00:00
Tom Rix
fbbffb5f90 BUGFIX VirtualPages won't call SiteTree_Controller anymore.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84079 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-10 00:11:28 +00:00
Tom Rix
63e2d4d72e ENHANCEMENT added new permission, SITETREE_REORGANISE
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84073 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-09 22:29:45 +00:00
Sam Minnee
5903fcaa05 MINOR: Fixed typo
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84069 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-08 04:29:06 +00:00
Sam Minnee
3c47db80d8 BUGFIX: Fixed other parts of core in response to the changing of MySQLDatabase to not inherit from object.
BUGFIX: Restored SiteTree::canView() functionality.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84068 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-08 04:23:05 +00:00
Sam Minnee
be2fea38dd API CHANGE: Database and Query no longer inherit from Object, since they shouldn't be extended with Extensions.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84061 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-08 02:55:32 +00:00
Tom Rix
5a7c217ea6 BUGFIX prevent a nasty permissions situation where no one but an admin can edit a new page
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84000 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-06 23:31:16 +00:00
Tom Rix
7a35596c28 BUGFIX prevent a nasty permissions situation where no one but an admin can edit a new page
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83999 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-06 23:30:17 +00:00
Ingo Schommer
26d7985877 MINOR Documentation in DBLocale
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83968 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-06 21:24:15 +00:00
Tom Rix
c65c6f40b6 MINOR don't use 'SiteTree_Controller', but 'ContentController'
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83967 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-06 20:50:46 +00:00
Sam Minnee
3c5f477b6e BUGFIX: Dealt with some undefined vairable bugs in SiteTree::can_edit_multiple
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83494 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-03 03:13:17 +00:00
Will Rossiter
49e7ca8e7c MINOR: added empty array to prevent notice level error about can_delete_multiple when accessing the cms
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83451 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-01 23:54:36 +00:00
Sam Minnee
43ad2ad6b5 ENHANCEMENT: Dramatically improved performance of large-scale canEdit() and canDelete() checks, so that big sites can be supported in the CMS.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83442 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-31 05:43:41 +00:00
Sam Minnee
51e28f078c ENHANCEMENT: Improved performance of DataObject::buildSQL(), by caching a suitable interim piece.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83441 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-31 05:41:59 +00:00
Will Rossiter
1b4eed87ec BUGFIX: Allow percentage fields to store 100%. Merged From 2.2 r83164
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83179 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-29 23:58:27 +00:00
Tom Rix
1eb80b7498 MAJOR ENHANCEMENT VirtualPages now pass all unknown method calls, and property gets on to the original item if the virtual page doesn't have it/them.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83160 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-29 23:21:59 +00:00
Normann Lou
ce9a4b158d FEATURE: plug in Postful mailling function to Process, making faking process for testing the postful mail functions. The two faking processes is implemented in two functions LotTicketedBased::fakepopulate() and ISSOrderDecorator::fakepopulatepayment().
FEATURE: customise OrderAdmin by ISSOrderAdmin.
ENHANCEMENT: refactoring Preview feature for PostfulMail.
ENHANCEMENT: add hasAmount to Menoy Class

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82629 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-24 03:16:20 +00:00
Tom Rix
012427d6c8 BUGFIX a VirtualPage will now use the correct template
BUGFIX a VirtualPage can now access the custom fields of its parent

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82591 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-24 00:23:12 +00:00
Tom Rix
d5d8cf15f6 MINOR make sure DataObject::setField() can only be pased a scalar, or a DBField.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82486 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-23 00:31:52 +00:00
Ingo Schommer
f233d00072 BUGFIX Fixed missing iteration check in DataObject?->getChangedFields() (merged from branches/2.3-nzct)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82058 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-16 23:47:50 +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
Sam Minnee
6a52153b9f BUGFIX #4285: Fixed application of decorators when add_extension not used.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81676 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-13 03:56:26 +00:00
Sam Minnee
a738dc2027 BUGFIX: returns duplicated number of the same sentences (from r78773, r78778)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81472 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 06:14:04 +00:00
Sam Minnee
3614e7b1ee BUGFIX In Versioned->augmentDatabase(), only create AuthorID, PublisherID and WasPublished columns on the root table, to avoid redundant information on sub tables. Limit writing in Versioned->augmentWrite() accordingly. This caused problems with the publication status not being reflected in the "Versions" report as the "WasPublished" attribute on the subtable was set to 0, while the root table was 1. (from r78358)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81469 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 06:00:07 +00:00
Sam Minnee
51e6ce6727 MINOR Passing through DB->dontRequireField() to Database->dontRequireField() (from r78357)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81468 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 05:55:56 +00:00
Sam Minnee
ff254355e7 BUGFIX Fixed Hierarchy->markChildren() to only mark nodes as unexpanded if they actually have children. This avoids UI glitches with "plus"-icons beside unexpandable nodes, and prevents batch actions and TreeNode->open() to trigger ajaxExpansion on nodes without children (from r78339)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81467 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 05:55:34 +00:00
Sam Minnee
c280542b9b BUGFIX Only trigger BackLinkTracking updates in SiteTree->onBeforeWrite() if the URLSegment is an actual change (type 2), not only a type change. This messed up batch publications, are previously published pages were marked as changed in subsequent write calls to the same object. (from r78337)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81466 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 05:55:17 +00:00
Sam Minnee
ceb0afeb78 ENHANCEMENT Passing $minNodeCount through Hierarchy->getChildrenAsUL() and Hierarchy->markPartialTree() (from r78305)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81465 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-09 05:53:40 +00:00
Sam Minnee
e1fa960775 MINOR: Replaced mysql_escape_string() with mysql_real_escape_string()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81382 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-08 23:05:01 +00:00
Ingo Schommer
6c505e5ede MINOR Moving user_error() invocations for missing fixtures from YamlFixture into SapphireTest - we shouldn't error out of a single fixture, as the object in question might be contained in another fixture on the same test
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81310 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-08 02:36:05 +00:00
Ingo Schommer
f3959b038d API CHANGE Deprecated use of SapphireTest->fixture to access YML fixtures, please use gateway methods on SapphireTest instead (e.g. $this->objFromFixture() instead of $this->fixture->objFromFixture())
ENHANCEMENT Allowing multiple fixtures to be defined in SapphireTest::$fixture_file through array notation. 
BUGFIX Disabling DataObject validation in YamlFixture->saveIntoDatabase() instead of SapphireTest->setUp()
MINOR Adapted sapphire unit tests to deprecated $this->fixture usage

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81286 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-08 00:06:16 +00:00
Sam Minnee
7f77bc4733 BUGFIX: Removed double-call to augmentSQL in DataObject::get
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80961 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-03 03:45:11 +00:00
Sam Minnee
2b61c12adc BUGFIX #4325: Fixed publishing of empty values by fixing DataObject::forceChange()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80934 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-03 01:21:48 +00:00
Sam Minnee
57bb3c09d7 BUGFIX: Fixed Versioned::publish() when the class name is bad, for example after a module has been removed.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80933 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-03 01:21:13 +00:00
Sam Minnee
f41e2b474c ENHANCEMENT: Improved performance of admin/assets area.
BUGFIX: Fixed bug in 'sake interactive' error handling.
BUGFIX: Fixed bugs with MSSQL and Windows support.
API CHANGE: Added FormAction::setButtonContent()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80782 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-01 22:27:18 +00:00
Sam Minnee
73cfe3ab84 API CHANGE: Added increase_time_limit_to(), which respects safe_mode.
API CHANGE: Added no-arg option to increase_memory_limit_to()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80241 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-28 02:36:46 +00:00
Sam Minnee
43abccf15d MINOR: Bugfix to previous commit.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80233 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 13:36:01 +00:00
Sam Minnee
96250e0136 ENHANCEMENT: Added MySQLDatabase::set_connection_charset() so that utf8 data can be stored properly in the MySQL database.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80231 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 13:26:31 +00:00
Sam Minnee
038d1ecec2 ENHANCEMENT #4041: Improved performance of SQLQuery::renameTable()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80229 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 13:00:51 +00:00
Sam Minnee
86ccd8cb96 API CHANGE: Removed DB::getNextID(), which was deprecated some time ago
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80224 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 08:36:10 +00:00
Sam Minnee
2926b34e50 API CHANGE: Removed unused and unnecessary PDODatabase. For mssql and postgres support, see the relevant modules.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80223 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 08:30:17 +00:00
Sam Minnee
ef82fe2859 MINOR #3776: Fixed documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80222 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 07:42:31 +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
Saophalkun Ponlu
121a92a86a FEATURE: Single instance only page (in the site tree). OS ticket #1554
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79868 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-23 17:45:55 +00:00
Sam Minnee
e0fbc7ac83 BUGFIX: Added explicit DataObjectDecorator::load_extra_statics() calls as a workaround for issues with extensions defined directly in-object.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79720 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-22 02:42:42 +00:00
Sam Minnee
d6f804d379 ENHANCEMENT: Added 'completed' message to dev/build
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79710 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-22 02:14:19 +00:00
Andrew O'Neil
742984cb49 BUGFIX: Allow extraDBFields() on decorators for compatibility, throw a deprecated notice
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79599 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-19 00:58:02 +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
Ingo Schommer
6fa83caae6 ENHANCEMENT Making SSDatetime mockable through SSDatetime::set_mock_now()
ENHANCEMENT SSDatetime::now()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79503 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-18 00:10:02 +00:00
Sam Minnee
6bd759b4ca MINOR: Updated API docs for DataObjectDecorator explaining that they're not actually decorators.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79452 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 22:21:43 +00:00
Sean Harvey
6c754d29e9 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79438 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 11:36:49 +00:00
Sam Minnee
0540bec71f BUGFIX #4255 sharvey: Fix application of extra db fields by DataObjectDecorators.
API CHANGE #4255 sharvey: DataObjectDecorator::extraStatics() can no longer refer to $this because it's called staticly


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79430 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 07:01:28 +00:00
Sam Minnee
dfc1598de0 ENHANCEMENT: Added better support for using DataDifferencer to look at new records.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79404 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 03:42:24 +00:00
Sam Minnee
7e3652216b ENHANCEMENT: Added better support for using DataDifferencer to look at new records.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79400 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 03:17:29 +00:00
Sam Minnee
546a5b2c89 ENHANCEMENT: Added better error message if defaults are a bad format.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79382 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 02:13:02 +00:00
Sean Harvey
5affa62e6c BUGFIX Made date fixes for MSSQLDatabase more robust in DataObject::__construct()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79375 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 23:31:12 +00:00
Sam Minnee
4df21d29e0 BUGFIX: Fixed date field manipulation.
MINOR: Added sorts to TableListFieldTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79327 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 04:03:47 +00:00
Sam Minnee
b536ecd610 BUGFIX: Fixed MSSQL date tweak to not accidentally generate default values for dates.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79311 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 02:59:36 +00:00
Sam Minnee
add7d31d8b BUGFIX: Fixed Sean's MSSQL date fix to work for both Date and Datetime
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79310 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 02:57:22 +00:00
Ingo Schommer
a145ebf8d2 BUGFIX Marking has_many() and many_many() fields as Translatable fields
BUGFIX Excluding Access fields on SiteTree from Translatable->updateCMSFields(), as their original values break the javascript logic for showing/hiding the fields

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79269 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 23:29:53 +00:00
Sam Minnee
60096fe48f MINOR: Implemented the Countable interface on DataObjectSet.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79236 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 11:27:51 +00:00
Ingo Schommer
20ada72b4d BUGFIX Don't remove translation groups in Translatable->onBeforeDelete() if the decorated record uses Versioned, as other representations of the record might still exist in other tables (e.g. SiteTree_Live) (see #4219)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79208 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 05:02:43 +00:00
Ingo Schommer
de23d55a8b BUGFIX Writing Locale in Translatable->onBeforeWrite() regardless of the record ID existing (see #4232). This is more in line with Translatable->requireDefaultRecords() which automatically updates all NULL locale values anyway.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79194 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-15 04:34:03 +00:00
Sam Minnee
116d2a38db MINOR: Removed documentation that is no longer relevant since ajshort's Object::get_static change.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79107 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-13 04:41:46 +00:00
Sean Harvey
46c135c1d8 MINOR Updated note on MSSQLDatabase specific functionality in DataObject::__construct()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78964 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-11 07:54:42 +00:00
Sean Harvey
26606fd01d BUGFIX MSSQLDatabase returns strange formatted Datetime values, removed hacks from DateField and PopupDateTimeField and put it in DataObject::__construct() so that it fixes the problem at the source
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78963 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-11 07:18:10 +00:00
Ingo Schommer
601672cdff BUGFIX Fixed Translatable->requireDefaultRecords() for non-SiteTree objects (was assuming Versioned to be present)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78729 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-09 21:00:11 +00:00
Ingo Schommer
2f020b5c83 MINOR Typo in DataObject->__destroy() (#4210)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78727 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-09 20:42:42 +00:00
Sam Minnee
bdeda543c9 BUGFIX: Don't let $dataObject->ClassName be set to an improper value.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78678 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-09 03:29:24 +00:00
Sam Minnee
fb470bc53d ENHANCEMENT: Added SITETREE_VIEW_ALL and SITETREE_EDIT_ALL permission code, which provide better performance for editors that can edit everything but who aren't ADMINs.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78630 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-08 07:00:37 +00:00
Sam Minnee
c803dd6350 API CHANGE #3548 ajshort: Allow a column argument for Query::column()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78557 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-08 00:17:37 +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
bfaa938897 BUGFIX fixing the build, making the code happier
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78497 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-05 04:37:45 +00:00
Tom Rix
d064eeb36b FEATURE Microsoft Sequel Server fulltext searching.
FEATURE sqlsrv_num_rows emulation (set $query->forceNumRows = true;)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78493 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-05 03:44:28 +00:00
Sam Minnee
b2460de140 ENHANCEMENT: Removed circular references from extensions to improve garbage collection.
API CHANGE: The result of any extension returned by Object::extInstance() should have setOwner() called on it before calling a method, and clearOwner() after.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78414 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-04 06:48:44 +00:00
Sean Harvey
11d6f3c0b0 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78410 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-04 06:20:32 +00:00
Sam Minnee
99d12ac936 ENHANCEMENT: Added API docs and changedFieldNames() method to DataDifferencer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78329 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-03 09:45:05 +00:00
Sam Minnee
c542ec0de9 BUGFIX: Prevent infinite recursion in certain object instantiation cases
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78253 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-02 06:08:46 +00:00
Ingo Schommer
8efc00598a MINOR Renamed parameter in DataObject->db() to $fieldName
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78236 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-02 03:45:22 +00:00
Ingo Schommer
634ff10c89 BUGFIX Excluding names of CompositeDBFields from DataObject::custom_database_fields() and including the actually generated columns in CompositeDBField->compositeDatabaseFields(). This is necessary for DataObject->hasField() to work correctly and avoid generated queries with wrong column identifiers
BUGFIX Querying db() in DataObject->hasField() in addition to hasDatabaseField(), as the two might differ when CompositeDBFields are used
MINOR Added DataObjectTest->hasDatabaseField()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78235 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-02 03:43:45 +00:00
Ingo Schommer
e1e9295fb5 MINOR Simplified definition on Money::$composite_db - the ORM doesn't handle array-style definitions currently, which means DataObject::custom_database_fields() etc. will fail
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78234 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-02 03:41:26 +00:00
Ingo Schommer
173711531e MINOR Reverted r77823, it causes infinite loops whenver DataObject->getField() etc. are used within __construct(). This is the case with Translatable and other modules, and breaks things like schema building
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78121 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-28 23:18:01 +00:00
Sam Minnee
a338a8d6a9 ENHANCEMENT: Don't unncessarily call seek() on Query; this helps use make use of forward-only recordsets.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78045 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-28 02:06:12 +00:00
Ingo Schommer
f7b019bff6 MINOR Improved DataObject->debug() formatting
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77923 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-27 03:22:52 +00:00
Ingo Schommer
c1d59185a9 BUGFIX Using new DBField->isChanged() in VirtualPage and SiteTree
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77914 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-27 02:09:18 +00:00
Ingo Schommer
30165bd1da BUGFIX Passing $cache parameter from DataObject:.get_by_id() to DataObject::get_one()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77896 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-27 00:33:02 +00:00
Ingo Schommer
7bef503953 MINOR Documentation for CompositeDBField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77895 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-27 00:32:37 +00:00
Ingo Schommer
dfa44c055c API CHANGE Changing DataObject::$changed to private visiblity. Please use getChangedFields() and isChanged()
ENHANCEMENT Added DataObject->isChanged() to detect if a field has been changed in this object instance
MINOR Changing call to CompositeDBField->compositeDatabaseFields() in DataObject->hasOwnDatabaseField()
BUGFIX Unsettig "Version" property in DataObject->getChangedField() to allow versioned to write a new version after a call to forceChange()
BUGFIX Introduced $markChanged in Money class
BUGFIX Casting Money->__toString() return value as string
MINOR Changing Member class to use new DataObject->isChanged() API
BUGFIX Using new $markChanged API for CompositeDBFields in DBField::create()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77893 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-27 00:09:23 +00:00
Ingo Schommer
c7768d8820 API CHANGE Added interface methods to CompositeDBField
MINOR Documented CompositeDBField

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77892 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-27 00:05:10 +00:00
Sam Minnee
2370dd0b38 BUGFIX: Fixed edge-case reliability with extension application.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77828 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 03:46:04 +00:00
Sam Minnee
6eb61e0844 BUGFIX: Don't break CMS tree if HTML gets into MenuTitle
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77826 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 03:45:12 +00:00
Sam Minnee
ccb4916d19 BUGFIX: Ensure that statics are updated by decorators before static variables are interrogated by static methods.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77823 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 03:25:51 +00:00
Ingo Schommer
2a58703ecf BUGFIX Money->setValue() was not working when loading $value and $record parameters, and only $record had a
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77790 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 01:08:27 +00:00
Sam Minnee
d8b46e5501 ENHANCEMENT: Allow altering of DataObject:$api_access by decorators.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77787 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 00:52:54 +00:00
Ingo Schommer
b478c8be34 FEATURE Added MoneyField as a form field to edit Money values
ENHANCEMENT Using MoneyField in Money->scaffoldFormField()
BUGFIX Fixed Money->setValue() to respect $value parameter over $record to avoid wrongly updated values from stale $record values instead of new $value

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77772 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 22:21:02 +00:00
Sean Harvey
75ba6a1ab9 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77764 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 06:59:21 +00:00
Ingo Schommer
4d55f1e5d7 BUGFIX Fixed Money->Nice() to provide symbol and currency shortname based on Money->getCurrency()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77754 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 06:03:06 +00:00
Saophalkun Ponlu
ce6402f8d0 ENHANCEMENT: use image file name (without file path and extension) for alt attribute when title is not provided
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77668 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-24 12:16:17 +00:00
Ingo Schommer
9f7bbc57d0 BUGFIX Inspecting the change status of all CompositeDBFields when invoking DataObject->getChangedFields(), as their value setting is not performed through DataObject->setField(), it doesn't trigger the built-in change detection.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77667 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-23 05:32:16 +00:00
Sam Minnee
cc93959d7f ENHANCEMENT: Updated Versioned::compareVersions() to use DataDifferencer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77660 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-23 03:29:33 +00:00
Sam Minnee
82f803601a API CHANGE: Added DataDifferencer, for comparing data objects (merged from r77658)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77659 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-23 03:28:18 +00:00