mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 23:28:20 +00:00
Various last minute bug fixes.
This commit is contained in:
@@ -83,7 +83,6 @@ class BudgetController extends Controller
|
||||
$currentEnd->subDay();
|
||||
$spent = $repository->spentInPeriod($budgetCollection, new Collection, $currentStart, $currentEnd);
|
||||
$entry = [$first, ($spent * -1)];
|
||||
|
||||
$entries->push($entry);
|
||||
$first = Navigation::addPeriod($first, $range, 0);
|
||||
}
|
||||
@@ -128,7 +127,7 @@ class BudgetController extends Controller
|
||||
|
||||
$start->addDay();
|
||||
}
|
||||
$data = $this->generator->budgetLimit($entries, 'monthAndDay');
|
||||
$data = $this->generator->budgetLimit($entries, 'month_and_day');
|
||||
$cache->store($data);
|
||||
|
||||
return Response::json($data);
|
||||
|
||||
@@ -170,12 +170,23 @@ class HomeController extends Controller
|
||||
|
||||
$name = $route->getName();
|
||||
$methods = $route->getMethods();
|
||||
$search = ['{account}', '{what}', '{rule}', '{tj}'];
|
||||
$replace = [1, 'asset', 1, 1];
|
||||
$url = str_replace($search, $replace, $route->getUri());
|
||||
$search = [
|
||||
'{account}', '{what}', '{rule}', '{tj}', '{category}', '{budget}', '{code}', '{date}', '{attachment}', '{bill}', '{limitrepetition}',
|
||||
'{currency}', '{jobKey}', '{piggyBank}', '{ruleGroup}', '{rule}', '{route}', '{unfinishedJournal}',
|
||||
'{reportType}', '{start_date}', '{end_date}', '{accountList}','{tag}','{journalList}'
|
||||
|
||||
];
|
||||
$replace = [1, 'asset', 1, 1, 1, 1, 'abc', '2016-01-01', 1, 1, 1, 1, 1, 1, 1, 1, 'index', 1,
|
||||
'default', '20160101', '20160131', '1,2',1,'1,2'
|
||||
];
|
||||
if (count($search) != count($replace)) {
|
||||
echo 'count';
|
||||
exit;
|
||||
}
|
||||
$url = str_replace($search, $replace, $route->getUri());
|
||||
|
||||
if (!is_null($name) && in_array('GET', $methods) && !$this->startsWithAny($ignore, $name)) {
|
||||
echo '<a href="/' . $url . '" title="' . $name . '">' . $name . '</a><br>';
|
||||
echo '<a href="/' . $url . '" title="' . $name . '">' . $name . '</a><br>' . "\n";
|
||||
|
||||
}
|
||||
}
|
||||
@@ -190,7 +201,10 @@ class HomeController extends Controller
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function startsWithAny(array $array, string $needle): bool
|
||||
private
|
||||
function startsWithAny(
|
||||
array $array, string $needle
|
||||
): bool
|
||||
{
|
||||
foreach ($array as $entry) {
|
||||
if ((substr($needle, 0, strlen($entry)) === $entry)) {
|
||||
|
||||
@@ -44,7 +44,7 @@ class ReportController extends Controller
|
||||
*/
|
||||
public function info(Request $request)
|
||||
{
|
||||
$attributes = $request->get('attributes');
|
||||
$attributes = $request->get('attributes') ?? [];
|
||||
$attributes = $this->parseAttributes($attributes);
|
||||
|
||||
View::share('start', $attributes['startDate']);
|
||||
|
||||
@@ -548,12 +548,14 @@ class RuleController extends Controller
|
||||
'rule-trigger-values' => $request->get('rule-trigger-value'),
|
||||
'rule-trigger-stop' => $request->get('rule-trigger-stop'),
|
||||
];
|
||||
foreach ($data['rule-triggers'] as $index => $triggerType) {
|
||||
$triggers[] = [
|
||||
'type' => $triggerType,
|
||||
'value' => $data['rule-trigger-values'][$index],
|
||||
'stopProcessing' => intval($data['rule-trigger-stop'][$index]) === 1 ? true : false,
|
||||
];
|
||||
if (is_array($data['rule-triggers'])) {
|
||||
foreach ($data['rule-triggers'] as $index => $triggerType) {
|
||||
$triggers[] = [
|
||||
'type' => $triggerType,
|
||||
'value' => $data['rule-trigger-values'][$index],
|
||||
'stopProcessing' => intval($data['rule-trigger-stop'][$index]) === 1 ? true : false,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $triggers;
|
||||
|
||||
@@ -92,7 +92,7 @@ class TagController extends Controller
|
||||
*/
|
||||
public function delete(Tag $tag)
|
||||
{
|
||||
$subTitle = trans('firefly.delete_tag', ['name' => $tag->tag]);
|
||||
$subTitle = trans('breadcrumbs.delete_tag', ['tag' => e($tag->tag)]);
|
||||
|
||||
// put previous url in session
|
||||
Session::put('tags.delete.url', URL::previous());
|
||||
|
||||
Reference in New Issue
Block a user