BUGFIX Removed unused ComplexTableField->unpagedSourceItems - was already commented out in r70956, and doesn't seem to be used across parent- or subclasses. Added ticket #3484 to re-enable popup pagination, which was broken and disabled due to the deprecation of $unpagedSourceItems (see r53830)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@71348 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-02-04 01:57:15 +00:00 committed by Sam Minnee
parent 479f8c0fa3
commit b515a2f2d7

View File

@ -40,7 +40,7 @@ class ComplexTableField extends TableListField {
protected $detailFormFields;
protected $viewAction, $sourceJoin, $sourceItems, $unpagedSourceItems;
protected $viewAction, $sourceJoin, $sourceItems;
/**
* @var Controller
@ -756,8 +756,6 @@ class ComplexTableField_ItemRequest extends RequestHandler {
return null;
}
// We never use $item afterwards in the function, where we have it here? disable it!
//$item = $this->unpagedSourceItems->First();
$start = 0;
return Controller::join_links($this->Link(), "$this->methodName?ctf[start]={$start}");
}
@ -767,8 +765,6 @@ class ComplexTableField_ItemRequest extends RequestHandler {
return null;
}
// We never use $item afterwards in the function, where we have it here? disable it!
// $item = $this->unpagedSourceItems->Last();
$start = $this->totalCount - 1;
return Controller::join_links($this->Link(), "$this->methodName?ctf[start]={$start}");
}
@ -778,9 +774,6 @@ class ComplexTableField_ItemRequest extends RequestHandler {
return null;
}
// We never use $item afterwards in the function, where we have it here? disable it!
//$item = $this->unpagedSourceItems->getIterator()->getOffset($_REQUEST['ctf']['start'] + 1);
$start = $_REQUEST['ctf']['start'] + 1;
return Controller::join_links($this->Link(), "$this->methodName?ctf[start]={$start}");
}
@ -790,9 +783,6 @@ class ComplexTableField_ItemRequest extends RequestHandler {
return null;
}
// We never use $item afterwards in the function, where we have it here? disable it!
//$item = $this->unpagedSourceItems->getIterator()->getOffset($_REQUEST['ctf']['start'] - 1);
$start = $_REQUEST['ctf']['start'] - 1;
return Controller::join_links($this->Link(), "$this->methodName?ctf[start]={$start}");
}
@ -817,7 +807,6 @@ class ComplexTableField_ItemRequest extends RequestHandler {
}
for($i = $offset;$i <= $offset + $this->pageSize && $i <= $this->totalCount;$i++) {
$start = $i - 1;
$item = $this->unpagedSourceItems->getIterator()->getOffset($i-1);
$links['link'] = Controller::join_links($this->Link() . "$this->methodName?ctf[start]={$start}");
$links['number'] = $i;
$links['active'] = $i == $currentItem ? false : true;