Added default icon and referrer tracking
This commit is contained in:
@@ -29,6 +29,18 @@ class HTTP_Exception_404 extends Kohana_HTTP_Exception_404 {
|
||||
$ro->date_last_refer = time();
|
||||
$ro->save();
|
||||
|
||||
// Update our referrer info
|
||||
$rfo = $ro->referrer->where('referrer','=',$this->request()->referrer())->find();
|
||||
|
||||
if (! $rfo->loaded()) {
|
||||
$rfo->redir_id = $ro->id;
|
||||
$rfo->referrer = $this->request()->referrer();
|
||||
}
|
||||
|
||||
$rfo->count++;
|
||||
$rfo->date_last_refer = $ro->date_last_refer;
|
||||
$rfo->save();
|
||||
|
||||
// Prepare the response object.
|
||||
$response = Response::factory();
|
||||
|
||||
|
Reference in New Issue
Block a user