Commit Graph

726 Commits

Author SHA1 Message Date
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
Ingo Schommer
265b4184f7 BUGFIX Fixed DataObject->write() for CompositeDBFields - wasn't calling setValue() on those fields, which meant that CompositeDBFields like Money were overwriting the values set in DataObject::$record (e.g. "MoneyCurrency" for a "Money" field) with empty values through CompositeDBField->addToManipulation(), as the dbfield itself doesn't have any values.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77640 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 09:07:08 +00:00
Sean Harvey
ee072565ec API CHANGE Removed @deprecated method Text::LimitWordCountPlainText(): Please use Text::LimitWordCount() instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77635 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 04:54:51 +00:00
Sean Harvey
cd2a6e0608 MINOR Added message to the top of DevelopmentAdmin::build() in red (if run from the web) to warn the user of deprecation, and that they should use dev/build instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77634 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 04:48:05 +00:00
Will Rossiter
cf35533a78 EHANCHMENT: update the regular expression to disregard any underscores directly before a capital letter, as well as using the PCRE functions and adding a small test. PATCH: #4081
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77612 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 03:49:15 +00:00
Sean Harvey
0923b5825e MINOR Removed references to ManifestBuilder::compileManifest() that has since been removed (bgribaudo)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77609 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 03:31:26 +00:00
Will Rossiter
1640844189 MINOR: changed MetaDescription to text field as the optiomal SEO guides Description to be up to 744 characters. MINOR: changed MetaKeywords textbox to 2 rows high to provide a visual cue for amount of keywords to use.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77588 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 00:53:53 +00:00
Sean Harvey
5886d4578b BUGFIX Fixed undefined variables in MySQLDatabase::indexList()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77581 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 23:17:25 +00:00
Sam Minnee
b5a0b94b96 MINOR: Updated obsolete PDODatabase not to have a parse error
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77570 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 09:14:15 +00:00
Sam Minnee
86c7c2a3bd BUGFIX: Fixed engine selection option default, so that it works on windows.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77569 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 08:42:18 +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
a2a507f73c BUGFIX Fixed Money->writeToManipulation() to correctly overwrite with NULL values
ENHANCEMENT Added Money->NiceWithName()
ENHANCEMENT Changed Money->NiceWithShortname() to use Zend_Currency options
BUGFIX Setting isChanged flag on Money individual setters
MINOR Added Money->__toString()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77548 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 04:46:58 +00:00
Sean Harvey
6369bb80de API CHANGE Removed @deprecated 2.3 GhostPage and SiteTree::MultipleParents() which used it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77383 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 06:45:32 +00:00
Sean Harvey
ed39a9e369 API CHANGE Removed @deprecated 2.3 method Varchar::Attr() on Varchar: Please use Varchar::ATT_val() instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77380 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 06:25:15 +00:00
Sean Harvey
e27f41238d API CHANGE Removed @deprecated 2.3 method DataObject::filledOut(): Please use custom code instead for checking values
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77379 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 06:22:33 +00:00
Sean Harvey
0ad370ac30 MINOR Removed user_error messages on DataObjectDecorator
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77371 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 05:53:11 +00:00
Sean Harvey
7bf69a8689 MINOR Changed @deprecated 2.3 functions to @deprecated 2.4 and throw a notice if they are used
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77370 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 05:48:46 +00:00
Sean Harvey
5e8b144318 BUGFIX #2719 Image::deleteFormattedImages() doesn't delete all formatted images properly (banal)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77276 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 23:42:40 +00:00
Sean Harvey
834c143e61 MINOR #3888 Added name to HomepageForDomain literal field in SiteTree so it can be manipulated later on (bgribaudo)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77272 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 23:16:20 +00:00
Sean Harvey
a62cf00061 BUGFIX #3777 DataObjectSet_Iterator->getOffset() shouldn't die if trying to seek past the set (mobiusnz)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77270 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 23:11:38 +00:00
Sam Minnee
83613ee0d3 ENHANCEMENT: Added databse name to output of dev/build
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77265 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 22:30:50 +00:00
Sean Harvey
08b651bd2d Merged r77256 from sapphire/branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77257 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 22:02:44 +00:00
Ingo Schommer
4e8735b10e MINOR Marked new $create_table_options API as experimental
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77170 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 04:44:33 +00:00
Ingo Schommer
336bce8bf8 ENHANCEMENT Added DataObject::$create_table_options to pass through special options to Database->requireTable(). Contains a keyed array by database driver. Example use is specifying different storage engines for MySQL: array('MySQLDatabase'=>'ENGINE=InnoDB')
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77160 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 03:55:14 +00:00
Ingo Schommer
7a18cd8bec BUGFIX Fixed quoting in Money
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77132 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 01:58:29 +00:00
Sean Harvey
5322ecc692 ENHANCEMENT SSDatetime->setValue() can now set a timestamp, consistently working the same as Date does
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77120 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 00:35:15 +00:00