Commit Graph

57 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
3e205b632f BUGFIX: Added Versioned::on_db_reset() so that Versioned tests would run properly.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77568 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 08:08:01 +00:00
Sam Minnee
9effc74de3 API CHANGE: Allow passing of temporary option to Database::createTable()
BUGFIX: Made Versioned's archive table functions (show deleted pages and show site at a particular date) db agnostic.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77551 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 05:08:11 +00:00
Ingo Schommer
e6ff8e283c BUGFIX Added all columns defined in Versioned extension to decorated or created SELECT statements in "*_versioned" tables. This was necessary because we're now explicitly selecting columns in the ORM, which meant Versioned was missing columns like "WasPublished". See #4050
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76647 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 04:47:56 +00:00
Ingo Schommer
21c295d2e3 BUGFIX Return NULL in Versioned::get_latest_version() if no record was found (fixes #4015)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76603 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 01:55:43 +00:00
Sam Minnee
ed06eb37c0 BUGFIX: Created Versioned's Version field as a proper Dataobject field.
API CHANGE: DataObject's internal $this->record array doesn't import null values, so that they don't get written back out.
API CHANGE: DataObject queries explicitly list columns, rather than using *.  This means that extraneous columns won't be included.
MINOR: Updated tests for db abstraction.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76372 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 06:00:50 +00:00
Sean Harvey
8e62d36c5f MINOR Fixed PHP level notices
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76223 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 04:42:58 +00:00
Sam Minnee
3e18112b32 BUGFIX: Fix notice-level error in 'show deleted pages' function
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76096 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-05 07:24:33 +00:00
Sean Harvey
6f79d66e3a Fixed error merging
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75907 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 01:31:42 +00:00
Sean Harvey
0ccb422d27 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75904 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 01:25:09 +00:00
Sean Harvey
f4eecd4d0d Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75903 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 01:20:12 +00:00
Sean Harvey
9b75cb1987 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75845 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-01 03:49:34 +00:00
Geoff Munn
03acac8e59 API CHANGE: addslashes now DB-specific
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74083 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-05 23:24:56 +00:00
Geoff Munn
8479c88e09 API CHANGE: Versioned fixed to use DB-specific ID auto-increment settings
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72916 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:44:58 +00:00
Geoff Munn
553f2e74af API CHANGE: column names escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72676 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-09 05:14:45 +00:00
Geoff Munn
6a21071e4c API CHANGE: column names escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72426 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-03 21:44:21 +00:00
Geoff Munn
338bb01f1a API CHANGE: Column names escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71983 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-18 03:12:39 +00:00
Andrew O'Neil
60f75c5ca4 Merged changes from 2.3 branch
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71172 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-01 23:49:53 +00:00
Ingo Schommer
33066bffda BUGFIX Reverted special cases for Translatable in Versioned->canBeVersioned() (originally committed in r42119) - was checking for existence of underscores in table names as an indication of the "_lang" suffix, which is no longer needed. It was also a flawed assumption which tripped over classes like TranslatableTest_TestPage
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@70318 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-18 22:46:16 +00:00
Ingo Schommer
bc430a96df ENHANCEMENT Added Versioned::get_versionnumber_by_stage() (used in new CMSMain/SiteTree state checking)
ENHANCEMENT Added Versioned->flushCache() to empty get_versionnumber_by_stage() caches
ENHANCEMENT Making DataObject->flushCache() decoratable

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69409 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-12-17 22:38:47 +00:00
Sam Minnee
2e955b498e BUGFIX: Fixing tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66508 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-24 19:28:46 +00:00
Sam Minnee
96c5be8252 Updating queries to be more DB agnostic
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66507 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-24 09:31:14 +00:00
Sam Minnee
93438e0be2 API CHANGE: Adding double quotes to all table and field references (a work in progress)
API CHANGE: DataObject::get()'s GROUP BY clause is only generated for MySQL as it needs to be improved for other databases to accept it.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66427 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-23 23:28:16 +00:00
Sam Minnee
c7330dd231 Introduced array-based syntax for specifying field types (Merged branches/dbabs into trunk)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66403 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-23 01:01:03 +00:00
Sam Minnee
a3d3fb65a9 Updated SQL queries to be ansi compatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66401 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-23 00:31:06 +00:00
Ingo Schommer
3edc358ead ENHANCEMENT Added fieldLabels() overloading to various DataObject subclasses. Use this method instead of directly calling _t() in getCMSFields(), and use fieldLabel('MyField') to get the label for a specific FormField. This way, we can transparently support formfield scaffolding and re-use the labels for search fields automatically.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65072 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 20:04:10 +00:00
Ingo Schommer
09564b0132 API CHANGE Renamed DataObjectDecorator->loadExtraDBFields() to loadExtraStatics()
API CHANGE Renamed DataObjectDecorator->extraDBFields() to extraStatics()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65065 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-02 00:36:57 +00:00
Sean Harvey
1b09577c31 ENHANCEMENT Versioned::get_one_by_stage() and Versioned::get_by_stage() were missing parameters from their get_one() and get() counterparts in DataObject. Those parameters have been added. See ticket #2965 for the origin of this patch.
MINOR phpDoc for Versioned::get_by_stage() to be consistent with Versioned::get_one_by_stage()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64397 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 10:14:47 +00:00
Ingo Schommer
935ee6d1bc (merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60266 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-10 23:35:11 +00:00
Ingo Schommer
60860cc1b9 MINOR Unified @package PHPdoc (added where missing, removed duplicates)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@56212 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-06-15 13:33:53 +00:00
Sam Minnee
557abf6e60 Merged revisions 50723 via svnmerge from
http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.2

........
  r50723 | ischommer | 2008-03-08 14:57:05 +1300 (Sat, 08 Mar 2008) | 1 line
  
  added database indexes for AuthorID and PublisherID
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50882 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-03-11 03:29:22 +00:00
Matt Peel
7d13ba7fb8 Reverted geoffm's accidental commit to /open
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50107 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-02-25 02:10:37 +00:00
Geoff Munn
bf3c09bec6 First post
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50105 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-02-25 01:06:39 +00:00
Sam Minnee
84d1d57df5 Merged revisions 45654 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.1.0-rc3oriwave2

........
  r45654 | sminnee | 2007-11-26 17:00:26 +1300 (Mon, 26 Nov 2007) | 2 lines
  
  Redirect to legislation section when there are only legislation pages
  Allow selection of folder when inserting files / images
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@49788 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-02-19 00:36:26 +00:00
Sam Minnee
b1d2e3906b API Documentation updates
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47766 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-09 04:18:36 +00:00
Sam Minnee
d27937f448 Updated API documentation package tags
Fixed some whitespace

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47725 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-08 06:37:50 +00:00
Sam Minnee
0c04f14f37 Fixed Versioned::get_latest_version when called on live site (parents upgrade issue)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@45104 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-11-19 04:50:09 +00:00
Sam Minnee
ef5aabf666 Versioned::get_version() didn't work if you were on the live site
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@45079 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-11-19 03:15:11 +00:00
Andrew O'Neil
8360e8f8b8 #1707 - sitemap.xml needs to hide unpublished pages
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44619 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-11-12 02:03:17 +00:00
Sam Minnee
2c8e304294 Trivial fix to coding style
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44554 467b73ca-7a2a-4603-9d3b-597d59a354a9
2007-11-09 03:40:05 +00:00