Merged revisions 53188 via svnmerge from

http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.2

........
  r53188 | aoneil | 2008-04-22 14:17:32 +1200 (Tue, 22 Apr 2008) | 2 lines
  
  MINOR: Fixed some php notices
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@53528 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-04-26 06:54:38 +00:00
parent 1b78044780
commit d8b65304d4

View File

@ -295,7 +295,7 @@ JS
function sourceItems() {
$SQL_limit = ($this->pageSize) ? "{$this->pageSize}" : "0";
if(is_numeric($_REQUEST['ctf'][$this->Name()]['start'])) {
if(isset($_REQUEST['ctf'][$this->Name()]['start']) && is_numeric($_REQUEST['ctf'][$this->Name()]['start'])) {
$SQL_start = (isset($_REQUEST['ctf'][$this->Name()]['start'])) ? intval($_REQUEST['ctf'][$this->Name()]['start']) : "0";
}
if(isset($this->customSourceItems)) {
@ -311,7 +311,7 @@ JS
$dataQuery = $this->getQuery();
// we don't limit when doing certain actions
if(!in_array($_REQUEST['methodName'],array('printall','export'))) {
if(!isset($_REQUEST['methodName']) || !in_array($_REQUEST['methodName'],array('printall','export'))) {
$dataQuery->limit = $SQL_limit;
if(isset($SQL_start)) {
$dataQuery->limit .= " OFFSET {$SQL_start}";