Various last minute bug fixes.

This commit is contained in:
James Cole
2016-05-22 15:48:34 +02:00
parent 41430c3bb2
commit 44960e8e42
13 changed files with 56 additions and 35 deletions

View File

@@ -110,11 +110,11 @@ class TestData
'attachable_type' => $attachment['attachable_type'],
'user_id' => $attachment['user_id'],
'md5' => md5($attachment['content']),
'filename' => $attachment['filename'],
'title' => $attachment['title'],
'description' => $attachment['description'],
'notes' => $attachment['notes'],
'mime' => $attachment['mime'],
'filename' => Crypt::encrypt($attachment['filename']),
'title' => Crypt::encrypt($attachment['title']),
'description' => Crypt::encrypt($attachment['description']),
'notes' => Crypt::encrypt($attachment['notes']),
'mime' => Crypt::encrypt($attachment['mime']),
'size' => strlen($attachment['content']),
'uploaded' => 1,
]
@@ -664,6 +664,18 @@ class TestData
);
}
}
foreach ($this->data['piggy-events'] as $event) {
DB::table('piggy_bank_events')->insert(
[
'created_at' => $this->time,
'updated_at' => $this->time,
'piggy_bank_id' => $event['piggy_bank_id'],
'date' => $event['date'],
'amount' => $event['amount'],
]
);
}
}
/**

View File

@@ -35,9 +35,7 @@ class Preferences
if (Cache::has($fullName)) {
Cache::forget($fullName);
}
/** @var Preference $preference */
$preference = Preference::where('user_id', Auth::user()->id)->where('name', $name)->first();
$preference->delete();
Preference::where('user_id', Auth::user()->id)->where('name', $name)->delete();
return true;
}

View File

@@ -293,7 +293,7 @@ class Journal extends Twig_Extension
$set = Category::distinct()->leftJoin('category_transaction', 'categories.id', '=', 'category_transaction.category_id')
->leftJoin('transactions', 'category_transaction.transaction_id', '=', 'transactions.id')
->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
->where('categories.user_ud', $journal->user_id)
->where('categories.user_id', $journal->user_id)
->where('transaction_journals.id', $journal->id)
->get(['categories.*']);
/** @var Category $category */