Consistency updates for use of viewpath()
This commit is contained in:
@@ -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,'');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user