Commit Graph

1208 Commits

Author SHA1 Message Date
Andrew Short
204415325e MINOR ajshort: Check that get_magic_quotes_gpc() is defined before calling it (was removed in PHP 6).
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79362 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 11:47:23 +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
5d67fe14ad BUGFIX: Made 'homepage for domain' feature work on all databases.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79318 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 03:15:01 +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
44639ca404 BUGFIX #4150 banal: Fixed PreserveLinks option in Convert::html2raw
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78555 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-08 00:11:22 +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
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
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
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
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
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
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