Commit Graph

1430 Commits

Author SHA1 Message Date
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
f882f55492 BUGFIX #3732: Fixed validation of SilverStripeNavigator HTML
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80219 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 06:41:19 +00:00
Sam Minnee
f6c8f6bd54 BUGFIX #4239: Check that project folder exists and throw a more helpful warning.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80212 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 06:03:30 +00:00
Sam Minnee
bcbe95b825 BUGFIX: Ignore deprecation errors for improved PHP 5.3 support.
BUGFIX: Fix behaviour of FILE_TO_URL_MAPPING on Windows.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80131 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-26 02:46:14 +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
Sean Harvey
9272a28050 BUGFIX Object::add_extension() should only load statics for extensions of DataObject, since it is specific to DataObjectDecorator
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79433 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 08:37:05 +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
Sean Harvey
1168bf07c6 MINOR Removed comment that no longer applies in RequestHandler
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79423 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-17 06:20:58 +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
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
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
9384936c51 MINOR: updated legacy form comment. PATCH #3769
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77599 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 02:49:30 +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
7cb259f051 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77454 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 00:14:47 +00:00
Ingo Schommer
a7e93c3099 BUGFIX Moved set_include_path() directive for including sapphire/thirdparty from sapphire/_config.php to Core class - needs to be loaded before other _config.php files are parsed, to enable e.g. usage of the Money class in a static context
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77435 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 23:19:08 +00:00
Sean Harvey
310a85cd9e BUGFIX Fixed Convert::json2array() from dying if Convert::json2obj() returns false
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77428 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 22:52:33 +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
7d0e767db5 MINOR Removed @deprecated notice in FormResponse, replaced with a warning message
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77378 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 06:21:09 +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
2e742d0399 API CHANGE Removed @deprecated 2.3 function HTTP::sendFileToBrowser(): Please use HTTPRequest::send_file() instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77357 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 05:16:00 +00:00
Sean Harvey
76925990e1 API CHANGE Removed @deprecated 2.3 method ContentController::Section2(): Please use ContentController->Level(2)->URLSegment instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77355 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 05:09:49 +00:00
Sean Harvey
12bf0a1cae API CHANGE Removed @deprecated 2.3 functions from Convert
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77338 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 04:50:16 +00:00
Sean Harvey
9dd77371a7 MINOR Code formatting fixes for Convert::recursiveXMLToArray()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77324 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 04:18:28 +00:00
Sean Harvey
e768d955df ENHANCEMENT #3677 Added more rules for escaping reserved characters in XML to their proper entities e.g. ' => &apos;
BUGFIX When exporting data from TableListField to a CSV via TableListField_Item->Fields(), don't convert the values to XML
MINOR Added test class ConvertTest with tests for various Convert functions



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77298 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-20 03:09:50 +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
Geoff Munn
a4cf64f105 Formatting fixed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77099 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-18 21:24:33 +00:00
Geoff Munn
b0a56e7d37 Enum values now include table name
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77098 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-18 21:24:02 +00:00
Ingo Schommer
2dd58c8a66 BUGFIX Added base javascript requirements to SiteTree->getCMSFields() to avoid it failing when used outside of CMS context (e.g. in our frameworktest project)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77093 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-18 20:55:10 +00:00
Sean Harvey
161e7a35c7 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77020 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-17 23:15:31 +00:00
Sean Harvey
4ded1f4930 Merged r77016 from sapphire/branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77017 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-17 22:59:48 +00:00
Sam Minnee
8d4e1dd6e0 ENHANCEMENT ajshort: Major refactoring of FileIFrameField and ImageField to use the new URL handler. Access control to the field is now controlled by the form, and ImageField now uses a codebase much more aligned with FileIFrameField.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77012 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-17 22:06:59 +00:00
Ingo Schommer
104470006e API CHANGE Deprecated Translatable::set_reading_lang(), use Translatable::set_current_locale().
MINOR Renamed internal property Translatable::$reading_lang to $current_lang

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77006 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-17 05:36:01 +00:00
Sean Harvey
be8f29c5e9 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76915 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-15 00:11:25 +00:00
Ingo Schommer
ab42c551fb BUGFIX Using Translatable::set_default_lang() for the deprecated i18n::set_default_lang() - this should trigger lang->locale convertion, and fix issues with running a 2.2->2.3 database schema migration (see #4009)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76872 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 21:35:30 +00:00
Ingo Schommer
9790c4832a BUGFIX Fixed default locale setting in SiteTree_Live through Translatable->requireDefaultRecords()
BUGFIX Added translation groups for existing entries the first time Translatable is switched on through Translatable->requireDefaultRecords() (see #4051)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76866 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 21:05:48 +00:00
Ingo Schommer
1b76ac9130 MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76862 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 06:58:04 +00:00
Ingo Schommer
67180937ff API CHANGE Deprecated Translatable::current_lang(), use Translatable::get_current_locale()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76853 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 06:05:48 +00:00
Sean Harvey
b1018f5864 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76846 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 05:26:47 +00:00
Ingo Schommer
5b0ee9678f API CHANGE Deprecated Translatable->getTranslatedLangs(), use getTranslatedLocales()
ENHANCEMENT Added Translatable::$allowed_locales to limit the available locales in the CMS for page translations. Added Translatable->canTranslate() and Translatable->canEdit() to determine if a translation is allowed.
ENHANCEMENT Added $instance parameter to LanguageDropdownField to call instance-specific canTranslate() on it (optionally)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76839 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-14 05:16:49 +00:00
Ingo Schommer
84089a1b7d BUGFIX Increased decimal precision of Money->Amount database column to support currencies with a greater precision than 2 digits.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76743 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-13 22:21:17 +00:00
Ingo Schommer
261ab10e00 MINOR Class naming in Translatable (see #4060)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76737 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-13 21:39:32 +00:00
Ingo Schommer
4085b3e654 BUGFIX Added Money->addToQuery() to work around changes in the ORM which require database columns to be explcitly selected
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76664 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 05:29:59 +00:00
Sean Harvey
2b042be1ff MINOR Fixed merging error in SiteTree
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76662 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 05:13:32 +00:00
Sean Harvey
0a5f4de51c Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76661 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 05:12:47 +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
d3b95a0009 BUGFIX Fixed "Translations" tab display in CMS - no more duplication of original language and translated tab - see #4020
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76613 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 02:33:59 +00:00
Sean Harvey
9ff495188f MINOR Moved protected variables brokenOnWrite and brokenOnDelete to top of DataObject for consistency
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76607 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-12 01:58:45 +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
Sean Harvey
7c99e3306d ENHANCEMENT Added ability to call Image::SetRatioSize() which is a more versatile way of generating images
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76574 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-11 22:42:01 +00:00
Sean Harvey
b9e72a89f8 BUGFIX Don't attempt to rewrite hash links in SSViewer if rewriteHashlinks set to false
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76529 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-11 03:52:16 +00:00
Ingo Schommer
3fbdbd50d0 BUGFIX Closing <link type="alternate"> tags for XHTML compliance on Translatable->MetaTags(). Use ContentNegotiator to transform them back to HTML markup. See #3989
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76517 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-11 02:47:20 +00:00
Sam Minnee
b2b7481f04 ENHANCEMENT: Added Database::USE_ANSI_SQL to make it easier to write code that's compatible with both 2.3 and 2.4
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76509 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-10 23:55:38 +00:00
Sam Minnee
28b04eaec8 ENHANCEMENT: Exclude assets from manifest build.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76459 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-08 03:29:41 +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
Sam Minnee
32ed6da54c BUGFIX: Don't use _SortColumn syntax when randomly sorting.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76370 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 06:00:02 +00:00
Sam Minnee
f296534380 BUGFIX: Fixed SiteTree::doRestoreToStage() for db abstraction.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76369 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 05:59:24 +00:00
Sam Minnee
29afa282b9 BUGFIX: Added default values for Money's component fields, to work with more picky databases.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76368 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 05:58:10 +00:00
Sam Minnee
edf59a8667 BUGFIX: Made Hierarchy::liveChildren() db-agnostic
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76366 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 05:57:34 +00:00
Sam Minnee
f7155ff580 API CHANGE: Database::tableList() no longer returns lowercase table names
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76355 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 04:30:54 +00:00
Sam Minnee
392608b0fa ENHANCEMENT: Added db-abstraction for test database creation and removal.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76345 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 03:49:15 +00:00
Sam Minnee
e4efbcb78c BUGFIX: Removed 2nd and 3rd full-text indexes from SiteTree, because these confuse MSSQL, and are kind of a MySQL-specific hack anyway.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76344 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 03:48:47 +00:00
Ingo Schommer
0cab3bf61e MINOR Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76306 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 23:50:19 +00:00
Normann Lou
b50d564a5c BUGFIX: pass-in the params in right order when constructing of Zend_Currency in Money Constructor. Add NiceWithShortname function.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76299 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 23:32:57 +00:00
Sean Harvey
b20b6e0f95 Merged from 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76269 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 06:36:16 +00:00
Normann Lou
7a4320f339 ENHANCEMENT: set the DBField name to its scaffoldFormField id, so that we could get if from other places.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76257 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 05:50:18 +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
Normann Lou
d9ea21c68e MINOR: delete debug info
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76145 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-06 01:07:03 +00:00
Ingo Schommer
5e8e47ef77 FEATURE Added Money class for managing monetary amounts with currencies through the Money design pattern. Uses the CompositeDBField interface to contain multiple database columns in a single DBField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76100 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-05 08:10:51 +00:00
Ingo Schommer
b4ec97506a BUGFIX Only loading value in a CompositeDBField through DataObject->getField() if either the value exists, or the record was previously saved
ENHANCEMENT Getting composite db field definitions in DataObject->hasOwnTableDatabaseField() when dealing with a CompositeDBField class

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76097 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-05 07:55:46 +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
Ingo Schommer
aafaee660b BUGFIX Removing ParentType and ParentID fields in Translatable->updateCMSFields() as they are causing js problems when set to readonly. These fields should only be set on the original record anyway (at least as long as we don't have a multi-language capable TreeMultiSelectField).
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75984 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 09:01:14 +00:00
Ingo Schommer
3fcb2a336a BUGFIX Fixed TranslatableTest URLSegment detection
BUGFIX Removed URLSegment detection from Translatable->onBeforeWrite() - it was always preceeded by SiteTree->onBeforeWrite() which already alters the URL, so the appending of locale values to disambiguate the URL was pointless (never triggered)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75983 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 08:48:14 +00:00
Ingo Schommer
896b39b800 BUGFIX Fixed undefined var error in VirtualPage
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75926 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 03:42:55 +00:00
Ingo Schommer
681380424a BUGFIX Fixed empty ErrorPage types in output by setting status code in init() instead of index() and checking for "index" action - introduced in r75096 (see #3960)
BUGIFX Changed ErrorPage->publish() to doPublish->doPublish() - the publication of static HTML into the /assets directory was lagging one version behind the actual published content
BUGFIX Fixed wrong parameter in ErrorPage::get_static_filepath()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75915 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 02:20:57 +00:00
Ingo Schommer
f18a9d3cc6 API CHANGE Deprecated ModelAsController->get404Page() with using the URLSegment "404" on a normal page type - please use the ErrorPage class instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75913 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-04 02:17:29 +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
Ingo Schommer
4965352bc3 BUGFIX Limiting all SQL queries going through Translatable->augmentSQL() to the Locale of the current object (if set), otherwise falling back to default locale. This fixes lots of problems with the Versioned extension in combination with Translatable, for example showing and comparing versions in the CMS sidebar (see #3886)
BUGFIX Removing the appended querying for NULL or empty Locale values in Translatable->augmentSQL() - this should no longer be necessary as we set default locales to all records through Translatable->requireDefaultRecords()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75826 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-01 03:18:40 +00:00
Ingo Schommer
7e41cc2b8e BUGFIX Fixed ErrorPage::get_filepath_for_errorcode() to work with locale values instead of short language subtags
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75791 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 23:51:55 +00:00
Ingo Schommer
d0761a3e78 BUGFIX Fixed some wrongly duplicated locale values in i18n::$common_languages and i18n::$common_locales
BUGFIX Unified locale values between i18n::$all_locales and $common_locales - the common locales should be a subset of all locales, without any additional ones as this might cause side-effects with LanguageDropdownField (see #3958)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75782 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 22:56:56 +00:00
Ingo Schommer
c28c90b708 MINOR Re-added Translatable->extendWithSuffix()
BUGFIX Fixed DBLocaleTest

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75745 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 08:39:49 +00:00
Ingo Schommer
c1c920cca0 ENHANCEMENT Added DBLocale class for Translatable extension
API CHANGE Deprecated Translatable::get_langs_by_id() - use getTranslations()
MINOR Removed Translatable::is_default_locale() - no deprecation necessary, was recently added
MINOR Removed commented out methods in Translatable: augmentNumChildrenCountQuery(), augmentAllChildrenIncludingDeleted() and augmentStageChildren()
MINOR Removed fieldsInExtraTables() and extendWithSuffix()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75742 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 07:37:09 +00:00
Ingo Schommer
f2efb12bdd MINOR Updated Translatable and i18n documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75707 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-30 02:51:17 +00:00
Ingo Schommer
332e231529 ENHANCEMENT Added Versioned support to Translatable::getTranslation() and getTranslations()
ENHANCEMENT Marking 2.1-style "_lang" tables obsolete in Translatable::requireDefaultRecords()
ENHANCEMENT Added override flag to Translatable::addTranslationGroups()
MINOR Disabled Translatable->TranslationMasterID - not implemented yet

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75677 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 23:18:17 +00:00
Ingo Schommer
3d0c4a1615 BUGFIX Fixed i18n::get_locale_from_lang() to return original parameter if it detects a fully qualified locale that shouldn't be converted
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75675 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 23:15:38 +00:00
Sean Harvey
a39822712b Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75659 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 07:28:53 +00:00
Sean Harvey
4615fd74b3 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75591 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 01:21:38 +00:00
Sean Harvey
a5e82ddff1 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75590 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 01:20:24 +00:00
Sean Harvey
13b358a8dd Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75582 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 00:07:39 +00:00
Sean Harvey
56fbe55a47 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75580 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 23:55:53 +00:00
Sean Harvey
76b5adc979 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75579 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 23:52:15 +00:00
Sean Harvey
ec9765d9f2 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75572 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 23:40:35 +00:00
Ingo Schommer
908ef4c1b7 ENHANCEMENT Auto-update locale values in Translatable->requireDefaultRecords() with default language when Translatable is first enabled
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75421 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 03:12:57 +00:00
Ingo Schommer
c07f20b9a7 MINOR Partially merged r66168 from branches/2.3 - the last merge was ignoring SiteTreeDecorator.php file which was necessary for the new googlesitemaps module compatiblity
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75380 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 01:40:24 +00:00
Ingo Schommer
a8028df67e ENHANCEMENT Added Translatable->MetaTags() to automatically insert <link rel="alternate" hreflang="...> tags into the page template
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75349 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 00:08:14 +00:00
Ingo Schommer
99c1fe9f93 BUGFIX Allowing translated homepages in RootUrlController
BUGFIX Limiting RootURLController to just trigger Translatable if no DomainForHomepage value is found
BUGFIX Using $locale parameter in Translatable::get_homepage_urlsegment_by_locale()
BUGFIX Updated enabling mechanism in Translatable->alternateGetByUrl()
MINOR Removed HTTP_HOST setting in TranslatableTest, wasn't necessary
API CHANGE Deprecated Translatable::get_homepage_urlsegment_by_language(), use get_homepage_urlsegment_by_locale()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75328 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 23:08:39 +00:00
Geoff Munn
eb86cc1b07 Re-enabled searchable fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75297 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 21:38:46 +00:00
Geoff Munn
f326047536 basic templates
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75295 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 21:37:35 +00:00
Geoff Munn
3022c7a908 Removed Database Abstraction TODO notice
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75291 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 21:35:20 +00:00
Ingo Schommer
ca24365c6f BUGFIX Fixed Translatable->onBeforeWrite() to change ClassNames on all translations when the "master page" (default language) changes its class to avoid inconsistencies with saving translations (see #3487)
BUGFIX Correctly showing the available languages dropdown in Translatable->getCMSFields()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75249 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 05:57:11 +00:00
Ingo Schommer
e55f3126fa BUGFIX Changed DataObject->newClassInstance() to only force changes if a differing classname was set. Setting ClassName property on new instance to trigger change detection (required for Translatable->onBeforeWrite())
BUGFIX Only force DataObject->forceChange() on fields which aren't already marked as changed

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75248 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 05:55:25 +00:00
Ingo Schommer
f5d578ff8c BUGFIX Setting Classname and RecordClassname properties on internal $record map when constructing a DataObject without passing $record into it. This ensures that getChangedFields() works on ClassName as well, which is required for Translatable->onBeforeWrite()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75156 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 01:36:15 +00:00
Ingo Schommer
bc14dd3b80 MINOR Fixed case of SQL commands in Database class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75155 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 01:34:23 +00:00
Sam Minnee
b165bde578 BUGFIX #3919: Fix DataObject::dbObject() for decorated fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75150 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 00:44:10 +00:00
Sam Minnee
8fcdcfa2eb BUGFIX: Don't load SapphireTest unnecessarily, as this is a slow operation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75147 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-27 00:19:16 +00:00
Ingo Schommer
bac89fd2c5 BUGFIX Setting the correct ParentID for children with existing parents in Translatable->createTranslation() - see #3861
BUGFIX Fixed Locale duplication detection for queries in Translatable->augmentSQL()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75027 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-23 04:41:49 +00:00
Sean Harvey
16293cf1d4 ENHANCEMENT DataObjectSet::groupBy() now supports use of a method name to group objects
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74996 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-23 02:37:44 +00:00
Sean Harvey
515f7b1587 ENHANCEMENT Allow calling Format() on a Time DB field type to specify the formatting type
MINOR Code formatting fixes for Date and Time classes
MINOR Added phpDoc comments to methods



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74786 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-20 22:32:13 +00:00
Normann Lou
eb0b76840c BUGFIX: RequestHandler::checkAccessAction() breaks when $this->class is null, this happens when you delete a DataObject from ResultForm (list view) in DataAdmin. We use safer call get_class($this) instead.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74633 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-16 22:41:14 +00:00
Mark Rickerby
1bd388ee92 fixing alteration message to output plaintext if executed via cli
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74337 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-11 05:00:41 +00:00
Sean Harvey
2199a581e1 BUGFIX SSViewer::getTemplateContent() now gracefully continues to operate if the file name can't be found to get unparsed content from.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74294 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-08 23:36:05 +00:00
Geoff Munn
66ca0daa61 BUG FIX: Fulltext search fields restored
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74085 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-05 23:37:17 +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
Ingo Schommer
183d5e6336 API CHANGE Deprecated Translatable::choose_site_lang(), use choose_site_locale()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74070 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-03 21:23:51 +00:00
Ingo Schommer
301180d491 BUGFIX Fixed legacy handling of Translatable::enable(),Translatable::disable() and Translatable::is_enabled() - applying extension to SiteTree instead of Page to avoid datamodel clashes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74069 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-03 20:43:01 +00:00
Ingo Schommer
c31a7e748a BUGFIX Fixed HTTPResponse->output() to only show Debug::friendlyError() if an error status code is set *and* the response body is empty. This prevented 404 ErrorPages to show in live modes, HTTPResponse always returned a generic "friendly" error
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74068 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-03 18:57:17 +00:00
Ingo Schommer
7d8186f247 BUGFIX Limiting ?debug_memory parameter to development environments through using Debug::message() instead of a straight echo()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74067 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-03 18:40:19 +00:00
Ingo Schommer
740dfef39e API CHANGE Removed SiteTree->LegacyURL property - it was never evaluated as a fallback in controllers anyway, and is just confusing to have without any functionality or edit interface attached to it (originally committed in r22189)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74066 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-03 17:41:10 +00:00
Ingo Schommer
033e51c280 BUGFIX Re-added Translatable->isTranslation() for more friendly deprecation (originally removed in r73338)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74065 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-03 16:38:51 +00:00
Ingo Schommer
a92413f1b7 MINOR Re-added Translatable::default_lang() for more graceful fallback to Translatable::default_locale()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74030 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-02 22:41:26 +00:00
Ingo Schommer
50fc4959a2 ENHANCEMENT Improved deprecated fallbacks in Translatable by auto-converting short language codes to long locales and vice versa through i18n::get_lang_from_locale()/i18n::get_locale_from_lang()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74017 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-02 21:49:40 +00:00
Ingo Schommer
a9a12e51d6 MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74012 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-02 17:17:04 +00:00
Ingo Schommer
e0ec30dcc8 ENHANCEMENT Allowing usage of global settings via asterisk (*) in RequestHandler->$allowed_actions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74009 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-02 16:34:27 +00:00
Ingo Schommer
e482ada014 API CHANGE Deprecated Translatable::enable() and i18n::enable()- use Object::add_extension('SiteTree','Translatable'), Deprecated Translatable::disable() and i18n::disable() - use Object::remove_extension('SiteTree','Translatable'), Deprecated Translatable::enabled() - use $myPage->hasExtension('Translatable')
API CHANGE Removed Translatable::creating_from() - doesn't apply any longer
ENHANCEMENT Translatable extension is no longer hooked up to SiteTree by default, which should improve performance and memory usage for sites not using Translatable. Please use Object::add_extension('SiteTree','Translatable') in your _config.php instead. Adjusted several classes (Image, ErrorPage, RootURLController) to the new behaviour.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73951 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-01 16:35:32 +00:00
Ingo Schommer
9f0be3eb7b API CHANGE Deprecated Object->extInstance(), use getExtensionInstance() instead
ENHANCEMENT Added Object->getExtensionInstances()
ENHANCEMENT Added Object::get_extensions()
ENHANCEMENT Unsetting class caches when using Object::add_extension() to avoid problems with defineMethods etc.
BUGFIX Fixed extension comparison with case sensitivity and stripping arguments in Object::has_extension()
BUGFIX Unsetting all cached singletons in Object::remove_extension() to avoid outdated extension_instances
MINOR Documentation in Object

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73900 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-31 22:27:53 +00:00
Ingo Schommer
d2d04d950a BUGFIX Consistently returning boolean values in DataObject->hasDatabaseField()
MINOR Documentation in DataObject

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73885 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-31 19:34:37 +00:00
Ingo Schommer
9eb57d064e ENHANCEMENT Added Extension::get_classname_without_arguments()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73884 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-31 19:32:51 +00:00
Ingo Schommer
23fc9380f2 BUGFIX Making $_SINGLETONS a global instead of a static in Core.php so it can be re-used in other places
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73883 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-31 19:32:19 +00:00
Ingo Schommer
697703aff8 ENHANCEMENT Added DataObjectDecorator->setOwner()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73882 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-31 19:31:21 +00:00
Ingo Schommer
9886aef57d BUGFIX Removed version number from <meta> generator tag - opt for security by obscurity in this case (originally committed in r70422 and r71172)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73836 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-30 16:34:38 +00:00
Ingo Schommer
496ada9c9d BUGFIX Fixed wrong reference in RequirementsBackend::unblock_all() (see #3587)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73749 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-29 01:31:44 +00:00
Ingo Schommer
e0b4a1a837 MINOR Fixed spelling, grammar and example code (#3796, thanks bgribaudo)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73748 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-29 00:58:44 +00:00
Geoff Munn
6a53df681f BUG FIX: Fulltext fields restored in SiteTree.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73659 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-25 22:56:43 +00:00
Sean Harvey
7cc578a603 BUGFIX Allow empty value passed to Database::manipulate() (merged from r61324)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73656 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-25 22:26:03 +00:00
Geoff Munn
50ca8ff01a MSSQL enabled for GW metlink
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73647 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-25 21:06:06 +00:00
Sean Harvey
6d561f3a3c removed accidental character
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73616 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-25 03:18:09 +00:00
Sean Harvey
7db4f61c6c BUGFIX Fixed undefined index notice error in Database
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73615 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-25 03:17:19 +00:00
Geoff Munn
3164b7ff67 API CHANGE: backticks removed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73543 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-23 04:18:41 +00:00
Sean Harvey
41e2ea0629 BUGFIX Fix call to undefined "_12Hour" function
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73532 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-23 02:49:22 +00:00
Sean Harvey
b004149267 BUGFIX Check if the index_alt variable is set on the indexList() return before checking if it's an array
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73517 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-23 01:00:33 +00:00
Ingo Schommer
b12a00c391 MINOR phpdoc documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73509 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-22 22:59:14 +00:00
Sam Minnee
a28ea0a69e ENHANCEMENT: Added Object::combined_static(), which gets all values of a static property from each class in the hierarchy
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73473 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-21 05:10:05 +00:00
Sam Minnee
6b2cf2a48e BUGFIX: Fixed translatable test execution by making protected methods public
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73472 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-21 04:30:04 +00:00
Ingo Schommer
7ad7f8dcf2 ENHANCEMENT Adjusted SearchForm, Debug, ErrorPage, SiteTree to using locales instead of lang codes
API CHANGE Changed Translatable datamodel to use locales ("en_US") instead of lang values ("en).
API CHANGE Changed Translatable::$default_lang to $default_locale, Translatable::$reading_lang to $reading_locale
API CHANGE Using "locale" instead of "lang" in Translatable::choose_site_lang() to auto-detect language from cookies or GET parameters
API CHANGE Deprecated Translatable::is_default_lang(), set_default_lang(), get_default_lang(), current_lang(), set_reading_lang(), get_reading_lang(), get_by_lang(), get_one_by_lang()
API CHANGE Removed Translatable::get_original() - with the new "translation groups" concept there no longer is an original for a translation
BUGFIX Updated MigrateTranslatableTask to new Locale based datamodel

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73468 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-20 08:47:06 +00:00
Ingo Schommer
c14b71dfc0 ENHANCEMENT Added Translatable::get_locale_from_lang(), Translatable::get_common_locales(), $common_locales and $likely_subtags in preparation to switch Translatable from using short "lang" codes to proper long locales
API CHANGE Deprecated Translatable::set_default_lang(), Translatable::default_lang()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73466 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-20 08:36:40 +00:00
Ingo Schommer
fceb53eae6 MINOR documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73464 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-20 07:51:00 +00:00
Sam Minnee
19406d904c Merged r73261 from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73403 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-19 23:04:48 +00:00
Ingo Schommer
93bb76dd10 BUGFIX Setting ParentID of translated record if recursively creating parents in Translatable::onBeforeWrite()
BUGFIX Fixing inline form action for "create translation"
BUGFIX Removed link to "original page" for a translation - no longer valid
MINOR documentation for Translatable

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73342 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-18 17:13:23 +00:00
Ingo Schommer
fef49abefa BUGFIX Disabled "untranslated" CSS class for SiteTree elements - doesn't apply any longer with the new "translation groups" concept
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73339 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-18 16:15:46 +00:00
Ingo Schommer
103c6e8d68 API CHANGE Added concept of "translation groups" to Translatable- every page can belong to a group of related translations, rather than having an explicit "original", meaning you can have pages in "non-default" languages which have no representation in other language trees. This group is recorded in a new table "<classname>_translationgroups". Translatable->createTranslation() and Translatable->onBeforeWrite() will automatically associate records in this groups. Added Translatable->addTranslationGroup(), Translatable->removeTranslationGroup(), Translatable->getTranslationGroup()
API CHANGE Removed Translatable->isTranslation() - after the new "translation group" model, every page is potentially a translation
API CHANGE Translatable->findOriginalIDs(), Translatable->setOriginalPage(), Translatable->getOriginalPage()
ENHANCEMENT Translatable->getCMSFields() will now always show the "create translation" option, not only on default languages - meaning you can create translations based on other translations
ENHANCEMENT Translatable language dropdown in CMS will always show all available languages, rather than filtering by already existing translations
ENHANCEMENT Added check for an existing record in Translatable->createTranslation()
BUGFIX Removed Translatable->getLang() which overloaded the $db property - it was causing side effects during creation of SiteTree default records.
BUGFIX Added check in Translatable->augmentSQL() to avoid reapplying "Lang = ..." filter twice
BUGFIX Removed bypass in Translatable->AllChildrenIncludingDeleted()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73338 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-18 16:13:40 +00:00
Ingo Schommer
8c2d1beb7e MINOR Merged r73298,r73299,r73301,r73304,r73318 from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73334 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-18 10:16:15 +00:00
Ingo Schommer
44d213e0b2 BUGFIX Using $allowed_actions in Image_Uploader
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73255 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 22:26:52 +00:00
Ingo Schommer
a96ca0eacc BUGFIX Checking for Director::is_site_url() before redirecting in Controller->redirectBack() and MemberLoginForm
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73252 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 22:24:50 +00:00
Ingo Schommer
ad3d9ae29a BUGFIX Added isDev() and Permission::check() directives to DatabaseAdmin and DevelopmentAdmin
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73251 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 22:23:52 +00:00
Ingo Schommer
47f2deee7f BUGFIX Fixed Director::makeRelative() to accept https:// protocol
BUGFIX Fixed GET-parameter replacement in Director::is_absolute_url()
ENHANCEMENT Added Director::is_relative_url() and Director::is_site_url()
BUGFIX Validating $_FILES array in Director::direct()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73250 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 22:22:55 +00:00
Geoff Munn
e76d876b73 API CHANGE: Postgres support for T-search indexes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73249 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 22:22:46 +00:00
Ingo Schommer
2a2e83f8e3 MINOR Documentaion
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73234 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 20:21:21 +00:00
Ingo Schommer
a2f6d82379 MINOR documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73233 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 20:20:43 +00:00
Geoff Munn
ec09946ae8 BUG FIX: modifyIndex function now present (was indexOrIndexAlt())
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73231 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 19:56:11 +00:00
Ingo Schommer
68fc0bab0b MINOR Temporarily disabled broken method reference from r73214
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73229 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 12:07:18 +00:00
Geoff Munn
ac06b8dd20 API CHANGE: index logic changed for MSSQL compatibility
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73214 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 05:02:40 +00:00
Sam Minnee
b09fac7f9b BUGFIX: Don't throw an error if a non-existent cache file is cleared
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73089 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-16 04:31:53 +00:00
Sam Minnee
67a1c6cda3 ENHANCEMENT: Added Object::clearCache() to clear a cache
BUGFIX: Make object cache testing more robust

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73059 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-15 01:09:59 +00:00