Consistency updates for use of viewpath()

This commit is contained in:
Deon George
2011-12-21 12:39:21 +11:00
parent a40ce27a16
commit a893527d77
42 changed files with 125 additions and 125 deletions

View File

@@ -253,17 +253,25 @@ $(document).ready(function() {
}
public static function page($key) {
if ($ids = Session::instance()->get('page_table_view'.$key)) {
$pag = new Pagination(array(
'total_items'=>count($ids),
'items_per_page'=>1,
));
// We have preference for parameters passed to the action.
if (is_null($id = Request::current()->param('id'))) {
return array($ids[$pag->current_first_item()-1],(string)$pag);
if (isset($_POST['id']) AND is_array($_POST['id']))
Table::post($key,'id');
if ($ids = Session::instance()->get('page_table_view'.$key)) {
$pag = new Pagination(array(
'total_items'=>count($ids),
'items_per_page'=>1,
));
return array($ids[$pag->current_first_item()-1],(string)$pag);
}
}
// If we get here, then there is no previous data to retrieve.
} else
return array(NULL,'');
return array($id,'');
}
}
?>