1
0
Fork 0

Fixed a bug where the gallery started at 1 instead of 0.

This commit is contained in:
Andrew Tomaka 2012-02-27 16:33:30 -05:00
commit 29426b45de
2 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,7 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Gallery extends CI_Controller { class Gallery extends CI_Controller {
public function index($start = 1) { public function index($start = 0) {
$this->load->model('fileupload'); $this->load->model('fileupload');
$this->load->library('pagination'); $this->load->library('pagination');
@ -24,4 +24,4 @@ class Gallery extends CI_Controller {
} }
?> ?>

View file

@ -38,7 +38,7 @@ class Fileupload extends CI_Model {
} }
function get_uploads($start = false, $count = false) { function get_uploads($start = false, $count = false) {
if($start != false && $count != false) { if($start !== false && $count !== false) {
$query = $this->db->get('uploads', $count, $start); $query = $this->db->get('uploads', $count, $start);
} else { } else {
$query = $this->db->get('uploads'); $query = $this->db->get('uploads');