Revert back to redirects for random and latest links.
This commit is contained in:
parent
ceb54c28f7
commit
b2287b8c10
2 changed files with 5 additions and 4 deletions
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue