mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
bug fixes
This commit is contained in:
parent
bb3a7b9d1c
commit
d3d4f8a64d
@ -33,17 +33,16 @@ class Activity extends Eloquent
|
||||
return $this->belongsTo('Account');
|
||||
}
|
||||
|
||||
|
||||
private static function getBlank($entity = false)
|
||||
{
|
||||
$activity = new Activity;
|
||||
|
||||
if (Auth::check()) {
|
||||
$activity->user_id = Auth::user()->id;
|
||||
$activity->account_id = Auth::user()->account_id;
|
||||
} else if ($entity) {
|
||||
if ($entity) {
|
||||
$activity->user_id = $entity->user_id;
|
||||
$activity->account_id = $entity->account_id;
|
||||
} else if (Auth::check()) {
|
||||
$activity->user_id = Auth::user()->id;
|
||||
$activity->account_id = Auth::user()->account_id;
|
||||
} else {
|
||||
Utils::fatalError();
|
||||
}
|
||||
|
@ -12,12 +12,12 @@ class EntityModel extends Eloquent
|
||||
$className = get_called_class();
|
||||
$entity = new $className();
|
||||
|
||||
if (Auth::check()) {
|
||||
$entity->user_id = Auth::user()->id;
|
||||
$entity->account_id = Auth::user()->account_id;
|
||||
} else if ($parent) {
|
||||
if ($parent) {
|
||||
$entity->user_id = $parent->user_id;
|
||||
$entity->account_id = $parent->account_id;
|
||||
} else if (Auth::check()) {
|
||||
$entity->user_id = Auth::user()->id;
|
||||
$entity->account_id = Auth::user()->account_id;
|
||||
} else {
|
||||
Utils::fatalError();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user