mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-07 23:35:04 -04:00
Added comments to some controller functions and improved spacing to improve readibility of code (#120)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
class Secure_area extends CI_Controller
|
||||
{
|
||||
|
||||
private $controller_name;
|
||||
|
||||
/*
|
||||
@@ -37,13 +36,15 @@ class Secure_area extends CI_Controller
|
||||
$this->load->vars($data);
|
||||
}
|
||||
|
||||
function get_controller_name() {
|
||||
function get_controller_name()
|
||||
{
|
||||
return strtolower($this->controller_name);
|
||||
}
|
||||
|
||||
function _initialize_pagination($object, $lines_per_page, $limit_from = 0, $total_rows = -1, $function='index', $filter='')
|
||||
{
|
||||
$this->load->library('pagination');
|
||||
|
||||
$config['base_url'] = site_url($this->get_controller_name() . "/$function/" . $filter);
|
||||
$config['total_rows'] = $total_rows > -1 ? $total_rows : call_user_func(array($object, 'get_total_rows'));
|
||||
$config['per_page'] = $lines_per_page;
|
||||
@@ -54,11 +55,12 @@ class Secure_area extends CI_Controller
|
||||
$config['cur_page'] = $limit_from > 0 ? $limit_from : 0;
|
||||
$config['page_query_string'] = FALSE;
|
||||
$config['uri_segment'] = 0;
|
||||
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
return $this->pagination->create_links();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function _remove_duplicate_cookies ()
|
||||
{
|
||||
//php < 5.3 doesn't have header remove so this function will fatal error otherwise
|
||||
|
||||
Reference in New Issue
Block a user