mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Added ip to activities table
This commit is contained in:
parent
463d0546af
commit
d13a377ff7
@ -291,7 +291,6 @@ class PaymentController extends \BaseController
|
||||
'returnUrl' => URL::to('complete'),
|
||||
'cancelUrl' => $invitation->getLink(),
|
||||
'description' => trans('texts.' . $invoice->getEntityType()) . " {$invoice->invoice_number}",
|
||||
'transactionId' => $invoice->invoice_number,
|
||||
];
|
||||
} else {
|
||||
return $data;
|
||||
|
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddIpToActivity extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('activities', function($table)
|
||||
{
|
||||
$table->string('ip')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('activities', function($table)
|
||||
{
|
||||
$table->dropColumn('ip');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -264,7 +264,7 @@ Route::filter('csrf', function()
|
||||
|
||||
if (Session::token() != $token)
|
||||
{
|
||||
Session::flash('warning', trans('texts.session_expired'));
|
||||
Session::flash('warning', trans('texts.session_expired'));
|
||||
|
||||
return Redirect::to('/');
|
||||
//throw new Illuminate\Session\TokenMismatchException;
|
||||
|
@ -35,6 +35,7 @@ class Activity extends Eloquent
|
||||
}
|
||||
|
||||
$activity->token_id = Session::get('token_id', null);
|
||||
$activity->ip = Request::getClientIp();
|
||||
|
||||
return $activity;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user