Modified:
/framework/trunk/app/core/SwitchYard_Controller.class.php
=======================================
--- /framework/trunk/app/core/SwitchYard_Controller.class.php Mon Oct 5
18:52:47 2009
+++ /framework/trunk/app/core/SwitchYard_Controller.class.php Fri Oct 16
13:51:31 2009
@@ -123,7 +123,11 @@
if (method_exists($this, $callback)) call_user_func_array(array($this,
$callback), array(&$q));
$set = array();
- $this->pager = new Doctrine_Pager($q, $_REQUEST['pn'], $_REQUEST['pp']);
+ $pn = filter_input(INPUT_GET, 'pn', FILTER_VALIDATE_INT);
+ $pp = filter_input(INPUT_GET, 'pp', FILTER_VALIDATE_INT);
+ if ($pn == null) $pn = 1;
+ if ($pn == null) $pp = 10;
+ $this->pager = new Doctrine_Pager($q, $pn, $pp);
foreach ($this->pager->execute() as $row) $set[] = $row;
$this->view->set('pagination',
SwitchYard_Doctrine::pagerLayout($this->pager,
SwitchYard::link($pager_link)));