From 29515b2e01bc41378a886d038e056f3460257c9c Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 19 Oct 2010 03:56:23 +0000 Subject: [PATCH] BUGFIX Removing overloaded TableField->sourceItems() method, which enables features of the underlying TableListField implementation, such as pagination and source item caching (fixed #5965, thanks martijn) (from r111492) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112907 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/TableField.php | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/forms/TableField.php b/forms/TableField.php index 0fa88ba2f..0bd305148 100644 --- a/forms/TableField.php +++ b/forms/TableField.php @@ -150,28 +150,7 @@ class TableField extends TableListField { function ItemCount() { return count($this->fieldList); } - - /** - * Returns the databased saved items, from DataObjects - * - * @return DataObjectSet - */ - function sourceItems() { - if($this->customSourceItems) { - $items = $this->customSourceItems; - } elseif($this->cachedSourceItems) { - $items = $this->cachedSourceItems; - } else { - // get query - $dataQuery = $this->getQuery(); - // get data - $records = $dataQuery->execute(); - $items = singleton($this->sourceClass)->buildDataObjectSet($records); - } - - return $items; - } - + /** * Displays the items from {@link sourceItems()} using the encapsulation object. * If the field value has been set as an array (e.g. after a failed validation),