1
0
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:
Hillel Coren 2015-03-09 17:15:28 +02:00
parent 463d0546af
commit d13a377ff7
4 changed files with 36 additions and 2 deletions

View File

@ -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;

View File

@ -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');
});
}
}

View File

@ -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;

View File

@ -35,6 +35,7 @@ class Activity extends Eloquent
}
$activity->token_id = Session::get('token_id', null);
$activity->ip = Request::getClientIp();
return $activity;
}