Commit Graph

2653 Commits

Author SHA1 Message Date
Sam Minnee
ebbcf036ee BUGFIX: Treat _method() as a cacheable method but not __method()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78240 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-02 04:02:28 +00:00
Ingo Schommer
4d02ee68d0 MINOR Added CompositeDBFieldTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78237 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-02 03:45:38 +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
0298ee7d7a MINOR Fixed merge error from r78095 (reverted commit in TableListField made in r77298)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78207 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-02 01:37:53 +00:00
Sean Harvey
8b81dbaa75 MINOR Explicitly set ListboxField::$multiple to be a boolean, added phpDoc to support this
MINOR Added proper phpDoc for ListboxField::__construct() arguments
MINOR Removed $source property on ListboxField. This class inherits from DropdownField, and should inherit it's source propery instead



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78186 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-01 23:37:03 +00:00
Sean Harvey
10e0f6f09b Reverted r78129
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78182 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-01 23:09:03 +00:00
Sam Minnee
30517119d4 ENHANCEMENT: Improve TableListField query generation, so that it checks whether the DataObject has a database field, rather than just checking to see if it *doesn't* have a field or method.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78153 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-31 11:07:28 +00:00
Sam Minnee
f8fff9709d ENHANCEMENT: Added LiteralField::setValue() so that so that LiteralField is more compatible with other field types.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78152 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-31 11:01:30 +00:00
Sean Harvey
4da2743994 MINOR If a FormField hasn't called parent::__construct() properly, throw an error before attempting to call ClassInfo::ancestry() on a NULL value
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78129 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-29 02:11:41 +00:00
Ingo Schommer
b0798db91e MINOR Removed debug output
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78124 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-29 01:06:23 +00:00
Ingo Schommer
e121c2f8fd BUGFIX Prevent relations without $api_access to be shown through RestfulServer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78123 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-29 01:04:40 +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
Sean Harvey
838b6f3785 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78095 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-28 07:08:23 +00:00
Ingo Schommer
4ed5354603 ENHANCEMENT Added translation for Arabic (Saudi Arabia) - thanks to Talal Al Asmari
ENHANCEMENT Added translation for Estonian (Estonia) - thanks to Marti, Tanel, Tiit and Teet
ENHANCEMENT Added translation for Malay (Malaysia) - thanks to castd, Su Yin and Emil

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78079 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-28 04:44:15 +00:00
Sean Harvey
ee2771e99a BUGFIX Slice of extra "OO" if SQL server attempts to set value in DateField
BUGFIX Don't attempt to use JS validation on DateField is javascript handler is "none"


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78065 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-28 04:06:14 +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
Tom Rix
7323a652bd FEATURE SingleSignOn - First commit, basic functionality. Until we get into a live environment, you can fake $_SERVER['REMOTE_USER'] in the site-wide _config.php.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78035 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-28 00:22:07 +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
4a9b100e31 MINOR Fixed PHP notice errors in MoneyField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77906 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-27 00:59:07 +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
Sam Minnee
c22da1500d MINOR: Change repository-root relative external to ../ relative external, so as not to crash svn 1.5.1
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77894 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-27 00:09:53 +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
eeff813be2 API CHANGE: Added SS_DATABASE_CLASS as an option for _ss_environment.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77890 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 23:45:54 +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
Ingo Schommer
fb16563961 BUGFIX Added utf-8 charset meta tag to ComplexTableField_popup.ss (same as LeftAndMain.ss)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77824 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 03:43:19 +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
Sean Harvey
60c5570bf8 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77817 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 02:19:50 +00:00
Sean Harvey
b8ce07f459 BUGFIX Fixed SQL generation in ContentController::PageComments() - '`' (backticks) are not valid in queries on sapphire/trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77811 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 02:08:18 +00:00
Will Rossiter
5448a29835 FEATURE: added ability to display comments even when comments have been disabled. #2081
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77807 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 01:56:21 +00:00
Ingo Schommer
afbac71d31 MINOR Formatting in MoneyField, added @todo
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77791 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-26 01:08:47 +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
Tom Rix
e1f54bc394 MINOR syntax error in TestRunner.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77706 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 02:31:35 +00:00
Ingo Schommer
9c10166381 BUGFIX Failing in TestRunner->init() when PHPUnit is not present, not only in specific method invocations. Previously it was missing checks on only() method
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77704 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-25 02:29:05 +00:00
Ingo Schommer
86388328a1 BUGFIX Fixed SQL syntax error in MATCH AGAINST clause in FulltextFilter
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77672 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-24 21:27:48 +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
Sean Harvey
bb5eff8bed BUGFIX Ensure that any white space is stripped in FieldSet::dataFieldByName() and FieldSet::fieldByName()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77650 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 10:18:15 +00:00
Sean Harvey
c4071d3521 MINOR Code formatting fix in FieldSet
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77649 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 10:11:03 +00:00