mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Code cleanup. Moving closer to new release.
This commit is contained in:
@@ -152,17 +152,17 @@ class RuleController extends Controller
|
||||
*/
|
||||
public function edit(RuleRepositoryInterface $repository, Rule $rule)
|
||||
{
|
||||
$oldTriggers = $this->getCurrentTriggers($rule);
|
||||
$triggerCount = count($oldTriggers);
|
||||
$oldActions = $this->getCurrentActions($rule);
|
||||
$actionCount = count($oldActions);
|
||||
|
||||
// has old input?
|
||||
if (Input::old()) {
|
||||
$oldTriggers = $this->getPreviousTriggers();
|
||||
$triggerCount = count($oldTriggers);
|
||||
$oldActions = $this->getPreviousActions();
|
||||
$actionCount = count($oldActions);
|
||||
} else {
|
||||
$oldTriggers = $this->getCurrentTriggers($rule);
|
||||
$triggerCount = count($oldTriggers);
|
||||
$oldActions = $this->getCurrentActions($rule);
|
||||
$actionCount = count($oldActions);
|
||||
}
|
||||
|
||||
// get rule trigger for update / store-journal:
|
||||
@@ -306,10 +306,9 @@ class RuleController extends Controller
|
||||
$warning = '';
|
||||
if (count($matchingTransactions) == $limit) {
|
||||
$warning = trans('firefly.warning_transaction_subset', ['max_num_transactions' => $limit]);
|
||||
} else {
|
||||
if (count($matchingTransactions) == 0) {
|
||||
$warning = trans('firefly.warning_no_matching_transactions', ['num_transactions' => $range]);
|
||||
}
|
||||
}
|
||||
if (count($matchingTransactions) == 0) {
|
||||
$warning = trans('firefly.warning_no_matching_transactions', ['num_transactions' => $range]);
|
||||
}
|
||||
|
||||
// Return json response
|
||||
|
Reference in New Issue
Block a user