mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT: Ticket 2756: Newsletter performance problem, run out of memory.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@70956 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
66ce174441
commit
2939e33554
@ -755,8 +755,9 @@ class ComplexTableField_ItemRequest extends RequestHandler {
|
||||
if(!isset($_REQUEST['ctf']['start']) || !is_numeric($_REQUEST['ctf']['start']) || $_REQUEST['ctf']['start'] == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$item = $this->unpagedSourceItems->First();
|
||||
|
||||
// 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}");
|
||||
}
|
||||
@ -765,8 +766,9 @@ class ComplexTableField_ItemRequest extends RequestHandler {
|
||||
if(!isset($_REQUEST['ctf']['start']) || !is_numeric($_REQUEST['ctf']['start']) || $_REQUEST['ctf']['start'] == $this->totalCount-1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$item = $this->unpagedSourceItems->Last();
|
||||
|
||||
// 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}");
|
||||
}
|
||||
@ -776,7 +778,8 @@ class ComplexTableField_ItemRequest extends RequestHandler {
|
||||
return null;
|
||||
}
|
||||
|
||||
$item = $this->unpagedSourceItems->getIterator()->getOffset($_REQUEST['ctf']['start'] + 1);
|
||||
// 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}");
|
||||
@ -787,7 +790,8 @@ class ComplexTableField_ItemRequest extends RequestHandler {
|
||||
return null;
|
||||
}
|
||||
|
||||
$item = $this->unpagedSourceItems->getIterator()->getOffset($_REQUEST['ctf']['start'] - 1);
|
||||
// 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}");
|
||||
|
Loading…
x
Reference in New Issue
Block a user