Commit Graph

120 Commits

Author SHA1 Message Date
Ingo Schommer
b3a086e2c9 BUGFIX Fixed ComplexTableField and TableListField GET actions against CSRF attacks (with Form_SecurityToken->checkRequest())
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113276 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:59 +13:00
Ingo Schommer
4298cda6aa API CHANGE Added security token to TableListField->Link() in order to include it in all URL actions automatically. This ensures that field actions bypassing Form->httpSubmission() still get CSRF protection
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113275 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:59 +13:00
Ingo Schommer
3cb553165f MINOR Check in TableListField->HighlightClasses() (fixes #5993, thanks lx)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110837 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Carlos Barberis
6c7349a2d8 BUGFIX: Reverted 107414, wrong patch
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107417 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Carlos Barberis
dc96151348 BUGFIX: TableListField headings i18n translation (ticket #5742)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107414 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Normann Lou
278a198286 BUGFIX: TableListField_Item::SelectOptionClasses() can not use it parent protected variable.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105876 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:29 +13:00
Normann Lou
0d2c22a6b3 BUGFIX: rollback r105858 which introducesa bug
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105875 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:29 +13:00
Will Rossiter
31a7bbc6a3 BUGFIX: updated select options classes to work with the dataobjectset returned by selectoptions rather than the array previously
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105872 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:29 +13:00
Normann Lou
72b93b7502 BUGFIX: TableListField_Item::SelectOptionClasses() can use it parent protected variable.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105858 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:29 +13:00
Saophalkun Ponlu
deb208f15d ENHANCEMENT: Preserve sort options in pagination links in TableListField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105275 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:27 +13:00
Ingo Schommer
ba2aabd702 ENHANCEMENT Allowing batch checkbox selection of TableListField rows with TableListField->Markable and TableListField->addSelectOptions()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@105266 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:27 +13:00
Ingo Schommer
6f0df9eb19 MINOR Fixed phpdoc documentation (from r103385)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103388 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:15 +13:00
Carlos Barberis
7037afc879 BUGFIX: added optional separator for http_build_query in HTTP:setGetVar(). this fixes sorting columns in ModelAdmin (ticket #5325).
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103012 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:12 +13:00
Ingo Schommer
e65e46bd82 BUGFIX Fixed TableListField->print() - was unsetting $cachedSourceItems instead of null'ing it, which breaks later access to the property
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101080 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:01 +13:00
Ingo Schommer
470e53f2d1 ENHANCEMENT Allowing custom popup requirements in ComplexTableField without subclassing through $requirementsForPopupCallback
MINOR Added getParentController() to TableListField_ItemRequest and ComplexTableField_Popup
MINOR Extending ComplexTableField_ItemRequest from TableListField_ItemRequest to avoid redundant code

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100774 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:52 +13:00
Sean Harvey
055bb06429 MINOR Removed useless third argument to instantiation of itemClass in TableListField::generateExportFileData()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98544 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:29 +13:00
Sean Harvey
67e2157052 BUGFIX Fixed missing third argument to ComplexTableField_Item when the parent class instantiates it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98448 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:28 +13:00
Sean Harvey
8b1367794e ENHANCEMENT Allow overriding TableListField_Item on TableListField by setting the property itemClass
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98428 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:27 +13:00
Sam Minnee
392c5effb7 MINOR set Print flag correctly on TLF
MINOR custom print template for SSReport TLF's that exposes the report title, and filters set (from r97138)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98154 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:24 +13:00
Sam Minnee
e764dec48d MINOR: Fixed TableListField tests that don't set $_REQUEST['url'] (from r97127)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98153 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:23 +13:00
Sam Minnee
59cf48db87 BUGFIX pagination was being applied (with a limit of NULL) to print and export actions. This was due to $_REQUEST['methodname'] not existing. (from r97114)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98152 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:23 +13:00
Sam Minnee
962dae2dc7 MINOR move sort column&direction into their own vars, otherwise, canSortBy(Date DESC) will always return false, since DESC is not part of the column name. (from r96411)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98137 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:23 +13:00
Sam Minnee
298735506a BUGFIX still use the correct methods to get a value, even if we're generating a CSV ($xmlSafe = false) (from r96212)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98136 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Sam Minnee
4492109749 MINOR fix field escaping in CSV export of TableListField (from r96157)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98135 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Sam Minnee
ff1e605de9 BUGFIX: Don't default to sorted descending if you already have a different column sorted ascending. (from r96061)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98134 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Sam Minnee
55423c1547 BUGFIX: Make TableListField sort checking use SQLQuery::canSortBy() to let SSReprot_FakeQuery work.
ENHANCEMENT: Allow sort descending as well as ascending. (from r96054)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98132 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:22 +13:00
Sam Minnee
a03e43c8b2 API CHANGE: Refactored test for whether a SQLQuery can be sorted by a particular column into SQLQuery::canSortBy($fieldName) (from r95850)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98096 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:21 +13:00
Sam Minnee
ce4067608c BUGFIX: Make TableListField rely on SQLQuery for its count-generation.
BUGFIX: Make SQLQuery return an appropriate count if a HAVING clause is used. (from r95814)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98094 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:21 +13:00
Sam Minnee
ef0b9be1da MINOR: Boundary condition check in TableListField for more helpful errors. (from r95543)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98088 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:20 +13:00
Sam Minnee
9f9c572306 BUGFIX: Use Controller::join_links() for all TableListField and ComplexTableField link building, to support form URLs with querystrings.
BUGFIX: If ComplexTableField::getParentRecord() can't find a record, just return null rather than erroring. (from r96555) (from r96649)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96775 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:08 +13:00
Andrew O'Neil
f53a30f69c BUGFIX: Fix fatal error when exporting a csv from a tablefield with a custom query
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@95108 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:00 +13:00
Ingo Schommer
03c5caea72 MINOR Updated paths from jsparty to sapphire/thirdparty, cms/thirdparty and sapphire/javascript
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93611 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:52 +13:00
Andrew Short
79773042be API CHANGE: Renamed conflicting classes to have an "SS_" namespace, and renamed existing "SS" namespace to "SS_". The affected classes are: HTTPRequest, HTTPResponse, Query, Database, SSBacktrace, SSCli, SSDatetime, SSDatetimeTest, SSLog, SSLogTest, SSLogEmailWriter, SSLogErrorEmailFormatter, SSLogErrorFileFormatter, SSLogFileWriter and SSZendLog.
MINOR: Replaced usage of renamed classes with the new namespaced name.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 03:06:31 +00:00
Sean Harvey
7f7e3a0ba3 API CHANGE: TableListField customQuery and customCsvQuery won't automatically include ID, ClassName, and RecordClassName fields (from r87354)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89726 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-21 02:36:33 +00:00
Sam Minnee
96e449225e BUGFIX: If a CTF without a show action is made readonly, don't add the show action back. (from r88960)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89204 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 22:39:07 +00:00
Sam Minnee
7dd6d10cde MINOR added more documentation around SiteConfig. Also wrote unit tests for permissions inheritance off it. (from r86132)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89164 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-15 21:53:15 +00:00
Andrew Short
f29eceecff API CHANGE #3724: Unified the Link() method to accept an action parameter.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88495 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:16 +00:00
Geoff Munn
69563972e5 MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86528 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:18:43 +00:00
Ingo Schommer
f86bc6f715 ENHANCEMENT Added TableListField->paginationBaseLink
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86338 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-15 04:11:13 +00:00
Sam Minnee
73cfe3ab84 API CHANGE: Added increase_time_limit_to(), which respects safe_mode.
API CHANGE: Added no-arg option to increase_memory_limit_to()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80241 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-28 02:36:46 +00:00
Sam Minnee
ab9c826ba2 BUGFIX: Fixed TableListField SQL generation so as not to add redundant duplicate columns. This builds on the change made in r50945, and keeps the behaviour the same as that, but note that r50945 removed the ability to include columns selected from a joined table, which was the original purpose of this code block.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79312 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-16 03:05:15 +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
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
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
90ebeaf741 API CHANGE Automatically using DBField->Nice() in tabular view of TableListFields (and subclasses like ComplexTableField) instead of using the scalar value. This means for example values casted as Boolean will render as "Yes"/"No" rather than "1"/"0"
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77549 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 04:48:24 +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
f7a974ccd4 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77245 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 10:32:06 +00:00
Sean Harvey
619c570801 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77066 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-18 05:30:26 +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
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