1
0
Fork 0

Revert back to redirects for random and latest links.

This commit is contained in:
Andrew Tomaka 2011-11-08 14:41:16 -05:00
parent ceb54c28f7
commit b2287b8c10
2 changed files with 5 additions and 4 deletions

View File

@ -41,9 +41,10 @@
$route['default_controller'] = "upload";
$route['404_override'] = '';
$route['random'] = 'view/random';
$route['latest'] = 'view/latest';
$route['[0-9]+'] = 'view/specific/$1';
$route['random'] = 'view/specific';
$route['latest'] = 'view/specific';
/* End of file routes.php */

View File

@ -54,13 +54,13 @@ class View extends CI_Controller {
$id = rand(1,$total_uploads);
redirect('/view/specific/' . $id);
redirect($id);
}
public function latest() {
$this->load->model('fileupload');
$total_uploads = $this->fileupload->count_uploads();
redirect('/view/specific/' . $total_uploads);
redirect($total_uploads);
}
}