Fixed a bug where the gallery started at 1 instead of 0.
This commit is contained in:
commit
29426b45de
2 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Gallery extends CI_Controller {
|
||||
public function index($start = 1) {
|
||||
public function index($start = 0) {
|
||||
$this->load->model('fileupload');
|
||||
$this->load->library('pagination');
|
||||
|
||||
|
@ -24,4 +24,4 @@ class Gallery extends CI_Controller {
|
|||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -38,7 +38,7 @@ class Fileupload extends CI_Model {
|
|||
}
|
||||
|
||||
function get_uploads($start = false, $count = false) {
|
||||
if($start != false && $count != false) {
|
||||
if($start !== false && $count !== false) {
|
||||
$query = $this->db->get('uploads', $count, $start);
|
||||
} else {
|
||||
$query = $this->db->get('uploads');
|
||||
|
|
Loading…
Reference in a new issue