diff --git a/app/Api/V1/Controllers/Controller.php b/app/Api/V1/Controllers/Controller.php index 55b1058762..9250a7cc2a 100644 --- a/app/Api/V1/Controllers/Controller.php +++ b/app/Api/V1/Controllers/Controller.php @@ -73,7 +73,7 @@ abstract class Controller extends BaseController } /** - * Method to grab all parameters from the URI. + * Method to grab all parameters from the URL. * * @return ParameterBag * @throws ContainerExceptionInterface @@ -148,7 +148,7 @@ abstract class Controller extends BaseController /** - * Method to help build URI's. + * Method to help build URL's. * * @return string */ diff --git a/app/Api/V1/Controllers/Models/TransactionCurrency/ListController.php b/app/Api/V1/Controllers/Models/TransactionCurrency/ListController.php index 21b4ec9880..50d4e3c704 100644 --- a/app/Api/V1/Controllers/Models/TransactionCurrency/ListController.php +++ b/app/Api/V1/Controllers/Models/TransactionCurrency/ListController.php @@ -103,7 +103,7 @@ class ListController extends Controller { $manager = $this->getManager(); - // read type from URI + // read type from URL $type = $request->get('type') ?? 'all'; $this->parameters->set('type', $type); diff --git a/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php b/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php index 7d34561c7b..c54b08610d 100644 --- a/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php +++ b/app/Api/V1/Controllers/Models/TransactionLink/ShowController.php @@ -79,7 +79,7 @@ class ShowController extends Controller { // create some objects: $manager = $this->getManager(); - // read type from URI + // read type from URL $name = $request->get('name'); // types to get, page size: diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.php index c34caedf9b..0ab87f833e 100644 --- a/app/Handlers/Events/UserEventHandler.php +++ b/app/Handlers/Events/UserEventHandler.php @@ -230,9 +230,9 @@ class UserEventHandler $oldEmail = $event->oldEmail; $user = $event->user; $token = app('preferences')->getForUser($user, 'email_change_confirm_token', 'invalid'); - $uri = route('profile.confirm-email-change', [$token->data]); + $url = route('profile.confirm-email-change', [$token->data]); try { - Mail::to($newEmail)->send(new ConfirmEmailChangeMail($newEmail, $oldEmail, $uri)); + Mail::to($newEmail)->send(new ConfirmEmailChangeMail($newEmail, $oldEmail, $url)); } catch (Exception $e) { // @phpstan-ignore-line Log::error($e->getMessage()); @@ -256,9 +256,9 @@ class UserEventHandler $user = $event->user; $token = app('preferences')->getForUser($user, 'email_change_undo_token', 'invalid'); $hashed = hash('sha256', sprintf('%s%s', (string) config('app.key'), $oldEmail)); - $uri = route('profile.undo-email-change', [$token->data, $hashed]); + $url = route('profile.undo-email-change', [$token->data, $hashed]); try { - Mail::to($oldEmail)->send(new UndoEmailChangeMail($newEmail, $oldEmail, $uri)); + Mail::to($oldEmail)->send(new UndoEmailChangeMail($newEmail, $oldEmail, $url)); } catch (Exception $e) { // @phpstan-ignore-line Log::error($e->getMessage()); @@ -308,7 +308,7 @@ class UserEventHandler if ($sendMail) { // get the email address $email = $event->user->email; - $uri = route('index'); + $url = route('index'); // see if user has alternative email address: $pref = app('preferences')->getForUser($event->user, 'remote_guard_alt_email'); @@ -318,7 +318,7 @@ class UserEventHandler // send email. try { - Mail::to($email)->send(new RegisteredUserMail($uri)); + Mail::to($email)->send(new RegisteredUserMail($url)); } catch (Exception $e) { // @phpstan-ignore-line Log::error($e->getMessage()); diff --git a/app/Http/Controllers/Account/CreateController.php b/app/Http/Controllers/Account/CreateController.php index 5aed064c3e..9a6d8c9e5e 100644 --- a/app/Http/Controllers/Account/CreateController.php +++ b/app/Http/Controllers/Account/CreateController.php @@ -119,7 +119,7 @@ class CreateController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('accounts.create.fromStore')) { - $this->rememberPreviousUri('accounts.create.uri'); + $this->rememberPreviousUrl('accounts.create.url'); } $request->session()->forget('accounts.create.fromStore'); Log::channel('audit')->info('Creating new account.'); @@ -171,7 +171,7 @@ class CreateController extends Controller } // redirect to previous URL. - $redirect = redirect($this->getPreviousUri('accounts.create.uri')); + $redirect = redirect($this->getPreviousUrl('accounts.create.url')); if (1 === (int) $request->get('create_another')) { // set value so create routine will not overwrite URL: $request->session()->put('accounts.create.fromStore', true); diff --git a/app/Http/Controllers/Account/DeleteController.php b/app/Http/Controllers/Account/DeleteController.php index 7ea322e34b..35901e59b7 100644 --- a/app/Http/Controllers/Account/DeleteController.php +++ b/app/Http/Controllers/Account/DeleteController.php @@ -82,7 +82,7 @@ class DeleteController extends Controller unset($accountList[$account->id]); // put previous url in session - $this->rememberPreviousUri('accounts.delete.uri'); + $this->rememberPreviousUrl('accounts.delete.url'); return view('accounts.delete', compact('account', 'subTitle', 'accountList', 'objectType')); } @@ -111,7 +111,7 @@ class DeleteController extends Controller $request->session()->flash('success', (string) trans(sprintf('firefly.%s_deleted', $typeName), ['name' => $name])); app('preferences')->mark(); - return redirect($this->getPreviousUri('accounts.delete.uri')); + return redirect($this->getPreviousUrl('accounts.delete.url')); } } diff --git a/app/Http/Controllers/Account/EditController.php b/app/Http/Controllers/Account/EditController.php index c3975a210c..d51232e5cf 100644 --- a/app/Http/Controllers/Account/EditController.php +++ b/app/Http/Controllers/Account/EditController.php @@ -118,7 +118,7 @@ class EditController extends Controller // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('accounts.edit.fromUpdate')) { - $this->rememberPreviousUri('accounts.edit.uri'); + $this->rememberPreviousUrl('accounts.edit.url'); } $request->session()->forget('accounts.edit.fromUpdate'); @@ -211,7 +211,7 @@ class EditController extends Controller } // redirect - $redirect = redirect($this->getPreviousUri('accounts.edit.uri')); + $redirect = redirect($this->getPreviousUrl('accounts.edit.url')); if (1 === (int) $request->get('return_to_edit')) { // set value so edit routine will not overwrite URL: $request->session()->put('accounts.edit.fromUpdate', true); diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.php index 9b9cc02afe..63d804caf1 100644 --- a/app/Http/Controllers/Account/ReconcileController.php +++ b/app/Http/Controllers/Account/ReconcileController.php @@ -134,9 +134,9 @@ class ReconcileController extends Controller $subTitle = (string) trans('firefly.reconcile_account', ['account' => $account->name]); // various links - $transactionsUri = route('accounts.reconcile.transactions', [$account->id, '%start%', '%end%']); - $overviewUri = route('accounts.reconcile.overview', [$account->id, '%start%', '%end%']); - $indexUri = route('accounts.reconcile', [$account->id, '%start%', '%end%']); + $transactionsUrl = route('accounts.reconcile.transactions', [$account->id, '%start%', '%end%']); + $overviewUrl = route('accounts.reconcile.overview', [$account->id, '%start%', '%end%']); + $indexUrl = route('accounts.reconcile', [$account->id, '%start%', '%end%']); $objectType = 'asset'; return view( @@ -151,9 +151,9 @@ class ReconcileController extends Controller 'subTitle', 'startBalance', 'endBalance', - 'transactionsUri', - 'overviewUri', - 'indexUri' + 'transactionsUrl', + 'overviewUrl', + 'indexUrl' ) ); } diff --git a/app/Http/Controllers/Account/ShowController.php b/app/Http/Controllers/Account/ShowController.php index e3823a4771..4083d4100d 100644 --- a/app/Http/Controllers/Account/ShowController.php +++ b/app/Http/Controllers/Account/ShowController.php @@ -114,7 +114,7 @@ class ShowController extends Controller $fStart = $start->isoFormat($this->monthAndDayFormat); $fEnd = $end->isoFormat($this->monthAndDayFormat); $subTitle = (string) trans('firefly.journals_in_period_for_account', ['name' => $account->name, 'start' => $fStart, 'end' => $fEnd]); - $chartUri = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]); + $chartUrl = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]); $firstTransaction = $this->repository->oldestJournalDate($account) ?? $start; $periods = $this->getAccountPeriodOverview($account, $firstTransaction, $end); @@ -152,7 +152,7 @@ class ShowController extends Controller 'subTitle', 'start', 'end', - 'chartUri', + 'chartUrl', 'location', 'balance' ) @@ -194,7 +194,7 @@ class ShowController extends Controller $collector->setAccounts(new Collection([$account]))->setLimit($pageSize)->setPage($page)->withAccountInformation()->withCategoryInformation(); $groups = $collector->getPaginatedGroups(); $groups->setPath(route('accounts.show.all', [$account->id])); - $chartUri = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]); + $chartUrl = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]); $showAll = true; $balance = app('steam')->balance($account, $end); @@ -209,7 +209,7 @@ class ShowController extends Controller 'attachments', 'currency', 'today', - 'chartUri', + 'chartUrl', 'periods', 'subTitleIcon', 'groups', diff --git a/app/Http/Controllers/Admin/LinkController.php b/app/Http/Controllers/Admin/LinkController.php index fcb7815f2f..2104abcc6e 100644 --- a/app/Http/Controllers/Admin/LinkController.php +++ b/app/Http/Controllers/Admin/LinkController.php @@ -76,7 +76,7 @@ class LinkController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('link-types.create.fromStore')) { - $this->rememberPreviousUri('link-types.create.uri'); + $this->rememberPreviousUrl('link-types.create.url'); } return view('admin.link.create', compact('subTitle', 'subTitleIcon')); @@ -113,7 +113,7 @@ class LinkController extends Controller } // put previous url in session - $this->rememberPreviousUri('link-types.delete.uri'); + $this->rememberPreviousUrl('link-types.delete.url'); return view('admin.link.delete', compact('linkType', 'subTitle', 'moveTo', 'count')); } @@ -136,7 +136,7 @@ class LinkController extends Controller $request->session()->flash('success', (string) trans('firefly.deleted_link_type', ['name' => $name])); app('preferences')->mark(); - return redirect($this->getPreviousUri('link-types.delete.uri')); + return redirect($this->getPreviousUrl('link-types.delete.url')); } /** @@ -161,7 +161,7 @@ class LinkController extends Controller // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('link-types.edit.fromUpdate')) { - $this->rememberPreviousUri('link-types.edit.uri'); + $this->rememberPreviousUrl('link-types.edit.url'); } $request->session()->forget('link-types.edit.fromUpdate'); @@ -226,7 +226,7 @@ class LinkController extends Controller Log::channel('audit')->info('User stored new link type.', $linkType->toArray()); $request->session()->flash('success', (string) trans('firefly.stored_new_link_type', ['name' => $linkType->name])); - $redirect = redirect($this->getPreviousUri('link-types.create.uri')); + $redirect = redirect($this->getPreviousUrl('link-types.create.url')); if (1 === (int) $request->get('create_another')) { // set value so create routine will not overwrite URL: $request->session()->put('link-types.create.fromStore', true); @@ -265,7 +265,7 @@ class LinkController extends Controller $request->session()->flash('success', (string) trans('firefly.updated_link_type', ['name' => $linkType->name])); app('preferences')->mark(); - $redirect = redirect($this->getPreviousUri('link-types.edit.uri')); + $redirect = redirect($this->getPreviousUrl('link-types.edit.url')); if (1 === (int) $request->get('return_to_edit')) { // set value so edit routine will not overwrite URL: $request->session()->put('link-types.edit.fromUpdate', true); diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index b2f265e0dd..cde875d4d7 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -117,7 +117,7 @@ class UserController extends Controller } // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('users.edit.fromUpdate')) { - $this->rememberPreviousUri('users.edit.uri'); + $this->rememberPreviousUrl('users.edit.url'); } session()->forget('users.edit.fromUpdate'); @@ -217,7 +217,7 @@ class UserController extends Controller session()->flash('success', (string) trans('firefly.updated_user', ['email' => $user->email])); app('preferences')->mark(); - $redirect = redirect($this->getPreviousUri('users.edit.uri')); + $redirect = redirect($this->getPreviousUrl('users.edit.url')); if (1 === (int) $request->get('return_to_edit')) { session()->put('users.edit.fromUpdate', true); diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php index 15cb83e236..2fe07a7d0f 100644 --- a/app/Http/Controllers/AttachmentController.php +++ b/app/Http/Controllers/AttachmentController.php @@ -77,7 +77,7 @@ class AttachmentController extends Controller $subTitle = (string) trans('firefly.delete_attachment', ['name' => $attachment->filename]); // put previous url in session - $this->rememberPreviousUri('attachments.delete.uri'); + $this->rememberPreviousUrl('attachments.delete.url'); return view('attachments.delete', compact('attachment', 'subTitle')); } @@ -99,7 +99,7 @@ class AttachmentController extends Controller $request->session()->flash('success', (string) trans('firefly.attachment_deleted', ['name' => $name])); app('preferences')->mark(); - return redirect($this->getPreviousUri('attachments.delete.uri')); + return redirect($this->getPreviousUrl('attachments.delete.url')); } /** @@ -150,7 +150,7 @@ class AttachmentController extends Controller // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('attachments.edit.fromUpdate')) { - $this->rememberPreviousUri('attachments.edit.uri'); + $this->rememberPreviousUrl('attachments.edit.url'); } $request->session()->forget('attachments.edit.fromUpdate'); $preFilled = [ @@ -196,7 +196,7 @@ class AttachmentController extends Controller $request->session()->flash('success', (string) trans('firefly.attachment_updated', ['name' => $attachment->filename])); app('preferences')->mark(); - $redirect = redirect($this->getPreviousUri('attachments.edit.uri')); + $redirect = redirect($this->getPreviousUrl('attachments.edit.url')); if (1 === (int) $request->get('return_to_edit')) { $request->session()->put('attachments.edit.fromUpdate', true); diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 38b86ca230..80dfe094d1 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -169,11 +169,11 @@ class LoginController extends Controller public function logout(Request $request) { $authGuard = config('firefly.authentication_guard'); - $logoutUri = config('firefly.custom_logout_url'); - if ('remote_user_guard' === $authGuard && '' !== $logoutUri) { - return redirect($logoutUri); + $logoutUrl = config('firefly.custom_logout_url'); + if ('remote_user_guard' === $authGuard && '' !== $logoutUrl) { + return redirect($logoutUrl); } - if ('remote_user_guard' === $authGuard && '' === $logoutUri) { + if ('remote_user_guard' === $authGuard && '' === $logoutUrl) { session()->flash('error', trans('firefly.cant_logout_guard')); } diff --git a/app/Http/Controllers/Bill/CreateController.php b/app/Http/Controllers/Bill/CreateController.php index 123f9d2b62..4520d73561 100644 --- a/app/Http/Controllers/Bill/CreateController.php +++ b/app/Http/Controllers/Bill/CreateController.php @@ -84,7 +84,7 @@ class CreateController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('bills.create.fromStore')) { - $this->rememberPreviousUri('bills.create.uri'); + $this->rememberPreviousUrl('bills.create.url'); } $request->session()->forget('bills.create.fromStore'); diff --git a/app/Http/Controllers/Bill/DeleteController.php b/app/Http/Controllers/Bill/DeleteController.php index cc5c3155f8..ada888dec3 100644 --- a/app/Http/Controllers/Bill/DeleteController.php +++ b/app/Http/Controllers/Bill/DeleteController.php @@ -72,7 +72,7 @@ class DeleteController extends Controller public function delete(Bill $bill) { // put previous url in session - $this->rememberPreviousUri('bills.delete.uri'); + $this->rememberPreviousUrl('bills.delete.url'); $subTitle = (string) trans('firefly.delete_bill', ['name' => $bill->name]); return view('bills.delete', compact('bill', 'subTitle')); @@ -94,6 +94,6 @@ class DeleteController extends Controller $request->session()->flash('success', (string) trans('firefly.deleted_bill', ['name' => $name])); app('preferences')->mark(); - return redirect($this->getPreviousUri('bills.delete.uri')); + return redirect($this->getPreviousUrl('bills.delete.url')); } } diff --git a/app/Http/Controllers/Bill/EditController.php b/app/Http/Controllers/Bill/EditController.php index 14a7d62a3b..0c4f459045 100644 --- a/app/Http/Controllers/Bill/EditController.php +++ b/app/Http/Controllers/Bill/EditController.php @@ -85,7 +85,7 @@ class EditController extends Controller // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('bills.edit.fromUpdate')) { - $this->rememberPreviousUri('bills.edit.uri'); + $this->rememberPreviousUrl('bills.edit.url'); } $currency = app('amount')->getDefaultCurrency(); @@ -141,7 +141,7 @@ class EditController extends Controller if (count($this->attachments->getMessages()->get('attachments')) > 0) { $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } - $redirect = redirect($this->getPreviousUri('bills.edit.uri')); + $redirect = redirect($this->getPreviousUrl('bills.edit.url')); if (1 === (int) $request->get('return_to_edit')) { diff --git a/app/Http/Controllers/Budget/CreateController.php b/app/Http/Controllers/Budget/CreateController.php index 63aaa7db44..03bda94126 100644 --- a/app/Http/Controllers/Budget/CreateController.php +++ b/app/Http/Controllers/Budget/CreateController.php @@ -98,7 +98,7 @@ class CreateController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('budgets.create.fromStore')) { - $this->rememberPreviousUri('budgets.create.uri'); + $this->rememberPreviousUrl('budgets.create.url'); } $request->session()->forget('budgets.create.fromStore'); $subTitle = (string) trans('firefly.create_new_budget'); @@ -136,7 +136,7 @@ class CreateController extends Controller $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } - $redirect = redirect($this->getPreviousUri('budgets.create.uri')); + $redirect = redirect($this->getPreviousUrl('budgets.create.url')); if (1 === (int) $request->get('create_another')) { diff --git a/app/Http/Controllers/Budget/DeleteController.php b/app/Http/Controllers/Budget/DeleteController.php index 56a2ad3da7..11deeaa906 100644 --- a/app/Http/Controllers/Budget/DeleteController.php +++ b/app/Http/Controllers/Budget/DeleteController.php @@ -73,7 +73,7 @@ class DeleteController extends Controller $subTitle = (string) trans('firefly.delete_budget', ['name' => $budget->name]); // put previous url in session - $this->rememberPreviousUri('budgets.delete.uri'); + $this->rememberPreviousUrl('budgets.delete.url'); return view('budgets.delete', compact('budget', 'subTitle')); } @@ -93,7 +93,7 @@ class DeleteController extends Controller $request->session()->flash('success', (string) trans('firefly.deleted_budget', ['name' => $name])); app('preferences')->mark(); - return redirect($this->getPreviousUri('budgets.delete.uri')); + return redirect($this->getPreviousUrl('budgets.delete.url')); } } diff --git a/app/Http/Controllers/Budget/EditController.php b/app/Http/Controllers/Budget/EditController.php index d2c77668ea..da94091bc4 100644 --- a/app/Http/Controllers/Budget/EditController.php +++ b/app/Http/Controllers/Budget/EditController.php @@ -108,7 +108,7 @@ class EditController extends Controller // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('budgets.edit.fromUpdate')) { - $this->rememberPreviousUri('budgets.edit.uri'); + $this->rememberPreviousUrl('budgets.edit.url'); } $request->session()->forget('budgets.edit.fromUpdate'); $request->session()->flash('preFilled', $preFilled); @@ -133,7 +133,7 @@ class EditController extends Controller $this->repository->cleanupBudgets(); app('preferences')->mark(); - $redirect = redirect($this->getPreviousUri('budgets.edit.uri')); + $redirect = redirect($this->getPreviousUrl('budgets.edit.url')); // store new attachment(s): $files = $request->hasFile('attachments') ? $request->file('attachments') : null; diff --git a/app/Http/Controllers/Category/CreateController.php b/app/Http/Controllers/Category/CreateController.php index 3ebd4b6c10..d29d739735 100644 --- a/app/Http/Controllers/Category/CreateController.php +++ b/app/Http/Controllers/Category/CreateController.php @@ -73,7 +73,7 @@ class CreateController extends Controller public function create(Request $request) { if (true !== session('categories.create.fromStore')) { - $this->rememberPreviousUri('categories.create.uri'); + $this->rememberPreviousUrl('categories.create.url'); } $request->session()->forget('categories.create.fromStore'); $subTitle = (string) trans('firefly.create_new_category'); diff --git a/app/Http/Controllers/Category/DeleteController.php b/app/Http/Controllers/Category/DeleteController.php index 5648f90e81..4f0a44464e 100644 --- a/app/Http/Controllers/Category/DeleteController.php +++ b/app/Http/Controllers/Category/DeleteController.php @@ -72,7 +72,7 @@ class DeleteController extends Controller $subTitle = (string) trans('firefly.delete_category', ['name' => $category->name]); // put previous url in session - $this->rememberPreviousUri('categories.delete.uri'); + $this->rememberPreviousUrl('categories.delete.url'); return view('categories.delete', compact('category', 'subTitle')); } @@ -93,6 +93,6 @@ class DeleteController extends Controller $request->session()->flash('success', (string) trans('firefly.deleted_category', ['name' => $name])); app('preferences')->mark(); - return redirect($this->getPreviousUri('categories.delete.uri')); + return redirect($this->getPreviousUrl('categories.delete.url')); } } diff --git a/app/Http/Controllers/Category/EditController.php b/app/Http/Controllers/Category/EditController.php index 420c7c4974..0038532d0e 100644 --- a/app/Http/Controllers/Category/EditController.php +++ b/app/Http/Controllers/Category/EditController.php @@ -78,7 +78,7 @@ class EditController extends Controller // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('categories.edit.fromUpdate')) { - $this->rememberPreviousUri('categories.edit.uri'); + $this->rememberPreviousUrl('categories.edit.url'); } $request->session()->forget('categories.edit.fromUpdate'); @@ -117,7 +117,7 @@ class EditController extends Controller if (count($this->attachments->getMessages()->get('attachments')) > 0) { $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } - $redirect = redirect($this->getPreviousUri('categories.edit.uri')); + $redirect = redirect($this->getPreviousUrl('categories.edit.url')); if (1 === (int) $request->get('return_to_edit')) { diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 2fd0eb6eeb..6b8e669766 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -41,7 +41,7 @@ abstract class Controller extends BaseController protected string $dateTimeFormat; protected string $monthAndDayFormat; protected string $monthFormat; - protected string $redirectUri = '/'; + protected string $redirectUrl = '/'; /** * Controller constructor. @@ -63,10 +63,10 @@ abstract class Controller extends BaseController // share custom auth guard info. $authGuard = config('firefly.authentication_guard'); - $logoutUri = config('firefly.custom_logout_url'); + $logoutUrl = config('firefly.custom_logout_url'); app('view')->share('authGuard', $authGuard); - app('view')->share('logoutUri', $logoutUri); + app('view')->share('logoutUrl', $logoutUrl); // upload size $maxFileSize = app('steam')->phpBytes(ini_get('upload_max_filesize')); diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index f8b7c71e50..b1e39e62d7 100644 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -88,7 +88,7 @@ class CurrencyController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('currencies.create.fromStore')) { - $this->rememberPreviousUri('currencies.create.uri'); + $this->rememberPreviousUrl('currencies.create.url'); } $request->session()->forget('currencies.create.fromStore'); @@ -157,7 +157,7 @@ class CurrencyController extends Controller } // put previous url in session - $this->rememberPreviousUri('currencies.delete.uri'); + $this->rememberPreviousUrl('currencies.delete.url'); $subTitle = (string) trans('form.delete_currency', ['name' => $currency->name]); Log::channel('audit')->info(sprintf('Visit page to delete currency %s.', $currency->code)); @@ -204,7 +204,7 @@ class CurrencyController extends Controller $request->session()->flash('success', (string) trans('firefly.deleted_currency', ['name' => $currency->name])); - return redirect($this->getPreviousUri('currencies.delete.uri')); + return redirect($this->getPreviousUrl('currencies.delete.url')); } /** @@ -297,7 +297,7 @@ class CurrencyController extends Controller // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('currencies.edit.fromUpdate')) { - $this->rememberPreviousUri('currencies.edit.uri'); + $this->rememberPreviousUrl('currencies.edit.url'); } $request->session()->forget('currencies.edit.fromUpdate'); @@ -375,7 +375,7 @@ class CurrencyController extends Controller Log::error('User ' . auth()->user()->id . ' is not admin, but tried to store a currency.'); Log::channel('audit')->info('Tried to create (POST) currency without admin rights.', $data); - return redirect($this->getPreviousUri('currencies.create.uri')); + return redirect($this->getPreviousUrl('currencies.create.url')); } @@ -388,7 +388,7 @@ class CurrencyController extends Controller $request->session()->flash('error', (string) trans('firefly.could_not_store_currency')); $currency = null; } - $redirect = redirect($this->getPreviousUri('currencies.create.uri')); + $redirect = redirect($this->getPreviousUrl('currencies.create.url')); if (null !== $currency) { $request->session()->flash('success', (string) trans('firefly.created_currency', ['name' => $currency->name])); @@ -443,6 +443,6 @@ class CurrencyController extends Controller } - return redirect($this->getPreviousUri('currencies.edit.uri')); + return redirect($this->getPreviousUrl('currencies.edit.url')); } } diff --git a/app/Http/Controllers/Json/ReconcileController.php b/app/Http/Controllers/Json/ReconcileController.php index 6ff13ad21f..5968f060e4 100644 --- a/app/Http/Controllers/Json/ReconcileController.php +++ b/app/Http/Controllers/Json/ReconcileController.php @@ -168,7 +168,7 @@ class ReconcileController extends Controller } $return = [ - 'post_uri' => $route, + 'post_url' => $route, 'html' => $view, ]; diff --git a/app/Http/Controllers/ObjectGroup/DeleteController.php b/app/Http/Controllers/ObjectGroup/DeleteController.php index c2341289d8..00b6f521b3 100644 --- a/app/Http/Controllers/ObjectGroup/DeleteController.php +++ b/app/Http/Controllers/ObjectGroup/DeleteController.php @@ -72,7 +72,7 @@ class DeleteController extends Controller $piggyBanks = $objectGroup->piggyBanks()->count(); // put previous url in session - $this->rememberPreviousUri('object-groups.delete.uri'); + $this->rememberPreviousUrl('object-groups.delete.url'); return view('object-groups.delete', compact('objectGroup', 'subTitle', 'piggyBanks')); } @@ -90,7 +90,7 @@ class DeleteController extends Controller app('preferences')->mark(); $this->repository->destroy($objectGroup); - return redirect($this->getPreviousUri('object-groups.delete.uri')); + return redirect($this->getPreviousUrl('object-groups.delete.url')); } } diff --git a/app/Http/Controllers/ObjectGroup/EditController.php b/app/Http/Controllers/ObjectGroup/EditController.php index c389328adc..7771052f50 100644 --- a/app/Http/Controllers/ObjectGroup/EditController.php +++ b/app/Http/Controllers/ObjectGroup/EditController.php @@ -75,7 +75,7 @@ class EditController extends Controller $subTitleIcon = 'fa-pencil'; if (true !== session('object-groups.edit.fromUpdate')) { - $this->rememberPreviousUri('object-groups.edit.uri'); + $this->rememberPreviousUrl('object-groups.edit.url'); } session()->forget('object-groups.edit.fromUpdate'); @@ -98,7 +98,7 @@ class EditController extends Controller session()->flash('success', (string) trans('firefly.updated_object_group', ['title' => $objectGroup->title])); app('preferences')->mark(); - $redirect = redirect($this->getPreviousUri('object-groups.edit.uri')); + $redirect = redirect($this->getPreviousUrl('object-groups.edit.url')); if (1 === (int) $request->get('return_to_edit')) { diff --git a/app/Http/Controllers/PiggyBank/CreateController.php b/app/Http/Controllers/PiggyBank/CreateController.php index 556c7e39b3..80a59610c7 100644 --- a/app/Http/Controllers/PiggyBank/CreateController.php +++ b/app/Http/Controllers/PiggyBank/CreateController.php @@ -76,7 +76,7 @@ class CreateController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('piggy-banks.create.fromStore')) { - $this->rememberPreviousUri('piggy-banks.create.uri'); + $this->rememberPreviousUrl('piggy-banks.create.url'); } session()->forget('piggy-banks.create.fromStore'); @@ -115,7 +115,7 @@ class CreateController extends Controller if (count($this->attachments->getMessages()->get('attachments')) > 0) { $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } - $redirect = redirect($this->getPreviousUri('piggy-banks.create.uri')); + $redirect = redirect($this->getPreviousUrl('piggy-banks.create.url')); if (1 === (int) $request->get('create_another')) { diff --git a/app/Http/Controllers/PiggyBank/DeleteController.php b/app/Http/Controllers/PiggyBank/DeleteController.php index 726b081775..b4f374e7c5 100644 --- a/app/Http/Controllers/PiggyBank/DeleteController.php +++ b/app/Http/Controllers/PiggyBank/DeleteController.php @@ -72,7 +72,7 @@ class DeleteController extends Controller $subTitle = (string) trans('firefly.delete_piggy_bank', ['name' => $piggyBank->name]); // put previous url in session - $this->rememberPreviousUri('piggy-banks.delete.uri'); + $this->rememberPreviousUrl('piggy-banks.delete.url'); return view('piggy-banks.delete', compact('piggyBank', 'subTitle')); } @@ -90,6 +90,6 @@ class DeleteController extends Controller app('preferences')->mark(); $this->piggyRepos->destroy($piggyBank); - return redirect($this->getPreviousUri('piggy-banks.delete.uri')); + return redirect($this->getPreviousUrl('piggy-banks.delete.url')); } } diff --git a/app/Http/Controllers/PiggyBank/EditController.php b/app/Http/Controllers/PiggyBank/EditController.php index 4dba83a586..ad8337f00c 100644 --- a/app/Http/Controllers/PiggyBank/EditController.php +++ b/app/Http/Controllers/PiggyBank/EditController.php @@ -102,7 +102,7 @@ class EditController extends Controller // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('piggy-banks.edit.fromUpdate')) { - $this->rememberPreviousUri('piggy-banks.edit.uri'); + $this->rememberPreviousUrl('piggy-banks.edit.url'); } session()->forget('piggy-banks.edit.fromUpdate'); @@ -138,7 +138,7 @@ class EditController extends Controller if (count($this->attachments->getMessages()->get('attachments')) > 0) { $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } - $redirect = redirect($this->getPreviousUri('piggy-banks.edit.uri')); + $redirect = redirect($this->getPreviousUrl('piggy-banks.edit.url')); if (1 === (int) $request->get('return_to_edit')) { diff --git a/app/Http/Controllers/Recurring/CreateController.php b/app/Http/Controllers/Recurring/CreateController.php index 6b7b755e4d..1590949ab6 100644 --- a/app/Http/Controllers/Recurring/CreateController.php +++ b/app/Http/Controllers/Recurring/CreateController.php @@ -94,7 +94,7 @@ class CreateController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('recurring.create.fromStore')) { - $this->rememberPreviousUri('recurring.create.uri'); + $this->rememberPreviousUrl('recurring.create.url'); } $request->session()->forget('recurring.create.fromStore'); $repetitionEnds = [ @@ -139,7 +139,7 @@ class CreateController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('recurring.create.fromStore')) { - $this->rememberPreviousUri('recurring.create.uri'); + $this->rememberPreviousUrl('recurring.create.url'); } $request->session()->forget('recurring.create.fromStore'); $repetitionEnds = [ @@ -253,7 +253,7 @@ class CreateController extends Controller $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } - $redirect = redirect($this->getPreviousUri('recurring.create.uri')); + $redirect = redirect($this->getPreviousUrl('recurring.create.url')); if (1 === (int) $request->get('create_another')) { // set value so create routine will not overwrite URL: $request->session()->put('recurring.create.fromStore', true); diff --git a/app/Http/Controllers/Recurring/DeleteController.php b/app/Http/Controllers/Recurring/DeleteController.php index 67793ce6ef..712555899f 100644 --- a/app/Http/Controllers/Recurring/DeleteController.php +++ b/app/Http/Controllers/Recurring/DeleteController.php @@ -73,7 +73,7 @@ class DeleteController extends Controller { $subTitle = (string) trans('firefly.delete_recurring', ['title' => $recurrence->title]); // put previous url in session - $this->rememberPreviousUri('recurrences.delete.uri'); + $this->rememberPreviousUrl('recurrences.delete.url'); $journalsCreated = $this->recurring->getTransactions($recurrence)->count(); @@ -95,7 +95,7 @@ class DeleteController extends Controller $request->session()->flash('success', (string) trans('firefly.' . 'recurrence_deleted', ['title' => $recurrence->title])); app('preferences')->mark(); - return redirect($this->getPreviousUri('recurrences.delete.uri')); + return redirect($this->getPreviousUrl('recurrences.delete.url')); } } diff --git a/app/Http/Controllers/Recurring/EditController.php b/app/Http/Controllers/Recurring/EditController.php index ab4fd9d231..fc75d33572 100644 --- a/app/Http/Controllers/Recurring/EditController.php +++ b/app/Http/Controllers/Recurring/EditController.php @@ -112,7 +112,7 @@ class EditController extends Controller // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('recurrences.edit.fromUpdate')) { - $this->rememberPreviousUri('recurrences.edit.uri'); + $this->rememberPreviousUrl('recurrences.edit.url'); } $request->session()->forget('recurrences.edit.fromUpdate'); @@ -186,7 +186,7 @@ class EditController extends Controller $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); } app('preferences')->mark(); - $redirect = redirect($this->getPreviousUri('recurrences.edit.uri')); + $redirect = redirect($this->getPreviousUrl('recurrences.edit.url')); if (1 === (int) $request->get('return_to_edit')) { // set value so edit routine will not overwrite URL: $request->session()->put('recurrences.edit.fromUpdate', true); diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 49b5219120..f964375e52 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -377,7 +377,7 @@ class ReportController extends Controller return view('error')->with('message', (string) trans('firefly.end_after_start_date')); } - $uri = match ($reportType) { + $url = match ($reportType) { default => route('reports.report.default', [$accounts, $start, $end]), 'category' => route('reports.report.category', [$accounts, $categories, $start, $end]), 'audit' => route('reports.report.audit', [$accounts, $start, $end]), @@ -386,7 +386,7 @@ class ReportController extends Controller 'double' => route('reports.report.double', [$accounts, $double, $start, $end]), }; - return redirect($uri); + return redirect($url); } /** diff --git a/app/Http/Controllers/Rule/CreateController.php b/app/Http/Controllers/Rule/CreateController.php index f9f8be07a8..c5095b6274 100644 --- a/app/Http/Controllers/Rule/CreateController.php +++ b/app/Http/Controllers/Rule/CreateController.php @@ -122,7 +122,7 @@ class CreateController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('rules.create.fromStore')) { - $this->rememberPreviousUri('rules.create.uri'); + $this->rememberPreviousUrl('rules.create.url'); } session()->forget('rules.create.fromStore'); @@ -175,7 +175,7 @@ class CreateController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('rules.create.fromStore')) { - $this->rememberPreviousUri('rules.create.uri'); + $this->rememberPreviousUrl('rules.create.url'); } session()->forget('rules.create.fromStore'); @@ -225,7 +225,7 @@ class CreateController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('rules.create.fromStore')) { - $this->rememberPreviousUri('rules.create.uri'); + $this->rememberPreviousUrl('rules.create.url'); } session()->forget('rules.create.fromStore'); @@ -272,10 +272,10 @@ class CreateController extends Controller // redirect to new bill creation. if ((int) $request->get('bill_id') > 0) { - return redirect($this->getPreviousUri('bills.create.uri')); + return redirect($this->getPreviousUrl('bills.create.url')); } - $redirect = redirect($this->getPreviousUri('rules.create.uri')); + $redirect = redirect($this->getPreviousUrl('rules.create.url')); if (1 === (int) $request->get('create_another')) { diff --git a/app/Http/Controllers/Rule/DeleteController.php b/app/Http/Controllers/Rule/DeleteController.php index 7d89bd123f..6d8cf7471b 100644 --- a/app/Http/Controllers/Rule/DeleteController.php +++ b/app/Http/Controllers/Rule/DeleteController.php @@ -71,7 +71,7 @@ class DeleteController extends Controller $subTitle = (string) trans('firefly.delete_rule', ['title' => $rule->title]); // put previous url in session - $this->rememberPreviousUri('rules.delete.uri'); + $this->rememberPreviousUrl('rules.delete.url'); return view('rules.rule.delete', compact('rule', 'subTitle')); } @@ -91,7 +91,7 @@ class DeleteController extends Controller session()->flash('success', (string) trans('firefly.deleted_rule', ['title' => $title])); app('preferences')->mark(); - return redirect($this->getPreviousUri('rules.delete.uri')); + return redirect($this->getPreviousUrl('rules.delete.url')); } } diff --git a/app/Http/Controllers/Rule/EditController.php b/app/Http/Controllers/Rule/EditController.php index a7aeec0682..c5a14153d4 100644 --- a/app/Http/Controllers/Rule/EditController.php +++ b/app/Http/Controllers/Rule/EditController.php @@ -127,7 +127,7 @@ class EditController extends Controller // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('rules.edit.fromUpdate')) { - $this->rememberPreviousUri('rules.edit.uri'); + $this->rememberPreviousUrl('rules.edit.url'); } session()->forget('rules.edit.fromUpdate'); @@ -193,7 +193,7 @@ class EditController extends Controller session()->flash('success', (string) trans('firefly.updated_rule', ['title' => $rule->title])); app('preferences')->mark(); - $redirect = redirect($this->getPreviousUri('rules.edit.uri')); + $redirect = redirect($this->getPreviousUrl('rules.edit.url')); if (1 === (int) $request->get('return_to_edit')) { session()->put('rules.edit.fromUpdate', true); diff --git a/app/Http/Controllers/RuleGroup/CreateController.php b/app/Http/Controllers/RuleGroup/CreateController.php index 4e58e6a68b..f57446bec5 100644 --- a/app/Http/Controllers/RuleGroup/CreateController.php +++ b/app/Http/Controllers/RuleGroup/CreateController.php @@ -72,7 +72,7 @@ class CreateController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('rule-groups.create.fromStore')) { - $this->rememberPreviousUri('rule-groups.create.uri'); + $this->rememberPreviousUrl('rule-groups.create.url'); } session()->forget('rule-groups.create.fromStore'); @@ -94,7 +94,7 @@ class CreateController extends Controller session()->flash('success', (string) trans('firefly.created_new_rule_group', ['title' => $ruleGroup->title])); app('preferences')->mark(); - $redirect = redirect($this->getPreviousUri('rule-groups.create.uri')); + $redirect = redirect($this->getPreviousUrl('rule-groups.create.url')); if (1 === (int) $request->get('create_another')) { session()->put('rule-groups.create.fromStore', true); diff --git a/app/Http/Controllers/RuleGroup/DeleteController.php b/app/Http/Controllers/RuleGroup/DeleteController.php index d21000ea80..fbe0116b7b 100644 --- a/app/Http/Controllers/RuleGroup/DeleteController.php +++ b/app/Http/Controllers/RuleGroup/DeleteController.php @@ -73,7 +73,7 @@ class DeleteController extends Controller $subTitle = (string) trans('firefly.delete_rule_group', ['title' => $ruleGroup->title]); // put previous url in session - $this->rememberPreviousUri('rule-groups.delete.uri'); + $this->rememberPreviousUrl('rule-groups.delete.url'); return view('rules.rule-group.delete', compact('ruleGroup', 'subTitle')); } @@ -97,7 +97,7 @@ class DeleteController extends Controller session()->flash('success', (string) trans('firefly.deleted_rule_group', ['title' => $title])); app('preferences')->mark(); - return redirect($this->getPreviousUri('rule-groups.delete.uri')); + return redirect($this->getPreviousUrl('rule-groups.delete.url')); } } diff --git a/app/Http/Controllers/RuleGroup/EditController.php b/app/Http/Controllers/RuleGroup/EditController.php index d87122cc64..360a19362e 100644 --- a/app/Http/Controllers/RuleGroup/EditController.php +++ b/app/Http/Controllers/RuleGroup/EditController.php @@ -80,7 +80,7 @@ class EditController extends Controller ]; // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('rule-groups.edit.fromUpdate')) { - $this->rememberPreviousUri('rule-groups.edit.uri'); + $this->rememberPreviousUrl('rule-groups.edit.url'); } session()->forget('rule-groups.edit.fromUpdate'); session()->flash('preFilled', $preFilled); @@ -140,7 +140,7 @@ class EditController extends Controller session()->flash('success', (string) trans('firefly.updated_rule_group', ['title' => $ruleGroup->title])); app('preferences')->mark(); - $redirect = redirect($this->getPreviousUri('rule-groups.edit.uri')); + $redirect = redirect($this->getPreviousUrl('rule-groups.edit.url')); if (1 === (int) $request->get('return_to_edit')) { session()->put('rule-groups.edit.fromUpdate', true); diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index fc8e26e495..57e7a6684c 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -52,7 +52,7 @@ class TagController extends Controller public function __construct() { parent::__construct(); - $this->redirectUri = route('tags.index'); + $this->redirectUrl = route('tags.index'); $this->middleware( function ($request, $next) { @@ -90,7 +90,7 @@ class TagController extends Controller // put previous url in session if not redirect from store (not "create another"). if (true !== session('tags.create.fromStore')) { - $this->rememberPreviousUri('tags.create.uri'); + $this->rememberPreviousUrl('tags.create.url'); } session()->forget('tags.create.fromStore'); @@ -109,7 +109,7 @@ class TagController extends Controller $subTitle = (string) trans('breadcrumbs.delete_tag', ['tag' => $tag->tag]); // put previous url in session - $this->rememberPreviousUri('tags.delete.uri'); + $this->rememberPreviousUrl('tags.delete.url'); return view('tags.delete', compact('tag', 'subTitle')); } @@ -129,7 +129,7 @@ class TagController extends Controller session()->flash('success', (string) trans('firefly.deleted_tag', ['tag' => $tagName])); app('preferences')->mark(); - return redirect($this->getPreviousUri('tags.delete.uri')); + return redirect($this->getPreviousUrl('tags.delete.url')); } /** @@ -160,7 +160,7 @@ class TagController extends Controller // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('tags.edit.fromUpdate')) { - $this->rememberPreviousUri('tags.edit.uri'); + $this->rememberPreviousUrl('tags.edit.url'); } session()->forget('tags.edit.fromUpdate'); @@ -333,7 +333,7 @@ class TagController extends Controller if (count($this->attachmentsHelper->getMessages()->get('attachments')) > 0) { $request->session()->flash('info', $this->attachmentsHelper->getMessages()->get('attachments')); } - $redirect = redirect($this->getPreviousUri('tags.create.uri')); + $redirect = redirect($this->getPreviousUrl('tags.create.url')); if (1 === (int) $request->get('create_another')) { session()->put('tags.create.fromStore', true); @@ -374,7 +374,7 @@ class TagController extends Controller if (count($this->attachmentsHelper->getMessages()->get('attachments')) > 0) { $request->session()->flash('info', $this->attachmentsHelper->getMessages()->get('attachments')); } - $redirect = redirect($this->getPreviousUri('tags.edit.uri')); + $redirect = redirect($this->getPreviousUrl('tags.edit.url')); if (1 === (int) $request->get('return_to_edit')) { session()->put('tags.edit.fromUpdate', true); diff --git a/app/Http/Controllers/Transaction/BulkController.php b/app/Http/Controllers/Transaction/BulkController.php index 326251eed0..975345da44 100644 --- a/app/Http/Controllers/Transaction/BulkController.php +++ b/app/Http/Controllers/Transaction/BulkController.php @@ -76,7 +76,7 @@ class BulkController extends Controller { $subTitle = (string) trans('firefly.mass_bulk_journals'); - $this->rememberPreviousUri('transactions.bulk-edit.uri'); + $this->rememberPreviousUrl('transactions.bulk-edit.url'); // make amounts positive. @@ -121,7 +121,7 @@ class BulkController extends Controller $request->session()->flash('success', (string) trans_choice('firefly.mass_edited_transactions_success', $count)); // redirect to previous URL: - return redirect($this->getPreviousUri('transactions.bulk-edit.uri')); + return redirect($this->getPreviousUrl('transactions.bulk-edit.url')); } /** diff --git a/app/Http/Controllers/Transaction/CreateController.php b/app/Http/Controllers/Transaction/CreateController.php index cd8ae3c017..becc4d6614 100644 --- a/app/Http/Controllers/Transaction/CreateController.php +++ b/app/Http/Controllers/Transaction/CreateController.php @@ -121,7 +121,7 @@ class CreateController extends Controller $allowedOpposingTypes = config('firefly.allowed_opposing_types'); $accountToTypes = config('firefly.account_to_transaction'); $defaultCurrency = app('amount')->getDefaultCurrency(); - $previousUrl = $this->rememberPreviousUri('transactions.create.uri'); + $previousUrl = $this->rememberPreviousUrl('transactions.create.url'); $parts = parse_url($previousUrl); $search = sprintf('?%s', $parts['query'] ?? ''); $previousUrl = str_replace($search, '', $previousUrl); diff --git a/app/Http/Controllers/Transaction/DeleteController.php b/app/Http/Controllers/Transaction/DeleteController.php index 9941c1e23e..c62c7bb5c9 100644 --- a/app/Http/Controllers/Transaction/DeleteController.php +++ b/app/Http/Controllers/Transaction/DeleteController.php @@ -85,8 +85,8 @@ class DeleteController extends Controller $subTitle = (string) trans('firefly.delete_' . $objectType, ['description' => $group->title ?? $journal->description]); $previous = app('steam')->getSafePreviousUrl(route('index')); // put previous url in session - Log::debug('Will try to remember previous URI'); - $this->rememberPreviousUri('transactions.delete.uri'); + Log::debug('Will try to remember previous URL'); + $this->rememberPreviousUrl('transactions.delete.url'); return view('transactions.delete', compact('group', 'journal', 'subTitle', 'objectType', 'previous')); } @@ -115,6 +115,6 @@ class DeleteController extends Controller app('preferences')->mark(); - return redirect($this->getPreviousUri('transactions.delete.uri')); + return redirect($this->getPreviousUrl('transactions.delete.url')); } } diff --git a/app/Http/Controllers/Transaction/EditController.php b/app/Http/Controllers/Transaction/EditController.php index f7351aac60..03ae906813 100644 --- a/app/Http/Controllers/Transaction/EditController.php +++ b/app/Http/Controllers/Transaction/EditController.php @@ -80,7 +80,7 @@ class EditController extends Controller $defaultCurrency = app('amount')->getDefaultCurrency(); $cash = $repository->getCashAccount(); - $previousUrl = $this->rememberPreviousUri('transactions.edit.uri'); + $previousUrl = $this->rememberPreviousUrl('transactions.edit.url'); $parts = parse_url($previousUrl); $search = sprintf('?%s', $parts['query'] ?? ''); $previousUrl = str_replace($search, '', $previousUrl); diff --git a/app/Http/Controllers/Transaction/LinkController.php b/app/Http/Controllers/Transaction/LinkController.php index 531dcc8c1c..48627302d4 100644 --- a/app/Http/Controllers/Transaction/LinkController.php +++ b/app/Http/Controllers/Transaction/LinkController.php @@ -76,7 +76,7 @@ class LinkController extends Controller { $subTitleIcon = 'fa-link'; $subTitle = (string) trans('breadcrumbs.delete_journal_link'); - $this->rememberPreviousUri('journal_links.delete.uri'); + $this->rememberPreviousUrl('journal_links.delete.url'); return view('transactions.links.delete', compact('link', 'subTitle', 'subTitleIcon')); } @@ -95,7 +95,7 @@ class LinkController extends Controller session()->flash('success', (string) trans('firefly.deleted_link')); app('preferences')->mark(); - return redirect((string) session('journal_links.delete.uri')); + return redirect((string) session('journal_links.delete.url')); } /** diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.php index 541a75e5cb..decccf47f3 100644 --- a/app/Http/Controllers/Transaction/MassController.php +++ b/app/Http/Controllers/Transaction/MassController.php @@ -82,7 +82,7 @@ class MassController extends Controller $subTitle = (string) trans('firefly.mass_delete_journals'); // put previous url in session - $this->rememberPreviousUri('transactions.mass-delete.uri'); + $this->rememberPreviousUrl('transactions.mass-delete.url'); return view('transactions.mass.delete', compact('journals', 'subTitle')); } @@ -115,7 +115,7 @@ class MassController extends Controller session()->flash('success', (string) trans_choice('firefly.mass_deleted_transactions_success', $count)); // redirect to previous URL: - return redirect($this->getPreviousUri('transactions.mass-delete.uri')); + return redirect($this->getPreviousUrl('transactions.mass-delete.url')); } /** @@ -151,7 +151,7 @@ class MassController extends Controller null : app('steam')->positive($journal['foreign_amount']); } - $this->rememberPreviousUri('transactions.mass-edit.uri'); + $this->rememberPreviousUrl('transactions.mass-edit.url'); return view('transactions.mass.edit', compact('journals', 'subTitle', 'withdrawalSources', 'depositDestinations', 'budgets')); } @@ -187,7 +187,7 @@ class MassController extends Controller session()->flash('success', (string) trans_choice('firefly.mass_edited_transactions_success', $count)); // redirect to previous URL: - return redirect($this->getPreviousUri('transactions.mass-edit.uri')); + return redirect($this->getPreviousUrl('transactions.mass-edit.url')); } /** diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 27474d02af..90f7fb65bb 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -60,8 +60,6 @@ class Kernel extends HttpKernel /** * The application's global HTTP middleware stack. * - * These middleware are run during every request to your application. - * * @var array */ protected $middleware diff --git a/app/Http/Middleware/Installer.php b/app/Http/Middleware/Installer.php index b5f6cee268..4a25d79114 100644 --- a/app/Http/Middleware/Installer.php +++ b/app/Http/Middleware/Installer.php @@ -53,7 +53,7 @@ class Installer */ public function handle($request, Closure $next) { - Log::debug(sprintf('Installer middleware for URI %s', $request->url())); + Log::debug(sprintf('Installer middleware for URL %s', $request->url())); // ignore installer in test environment. if ('testing' === config('app.env')) { return $next($request); diff --git a/app/Services/FireflyIIIOrg/Update/UpdateRequest.php b/app/Services/FireflyIIIOrg/Update/UpdateRequest.php index a569d497cc..6a25fa44ee 100644 --- a/app/Services/FireflyIIIOrg/Update/UpdateRequest.php +++ b/app/Services/FireflyIIIOrg/Update/UpdateRequest.php @@ -79,8 +79,8 @@ class UpdateRequest implements UpdateRequestInterface 'message' => (string) trans('firefly.unknown_error'), ]; - $uri = config('firefly.update_endpoint'); - Log::debug(sprintf('Going to call %s', $uri)); + $url = config('firefly.update_endpoint'); + Log::debug(sprintf('Going to call %s', $url)); try { $client = new Client; $options = [ @@ -89,7 +89,7 @@ class UpdateRequest implements UpdateRequestInterface ], 'timeout' => 3.1415, ]; - $res = $client->request('GET', $uri, $options); + $res = $client->request('GET', $url, $options); } catch (GuzzleException $e) { Log::error('Ran into Guzzle error.'); Log::error($e->getMessage()); diff --git a/app/Services/Password/PwndVerifierV2.php b/app/Services/Password/PwndVerifierV2.php index 8c286f08c7..8dc0f56784 100644 --- a/app/Services/Password/PwndVerifierV2.php +++ b/app/Services/Password/PwndVerifierV2.php @@ -48,7 +48,7 @@ class PwndVerifierV2 implements Verifier $hash = sha1($password); $prefix = substr($hash, 0, 5); $rest = substr($hash, 5); - $uri = sprintf('https://api.pwnedpasswords.com/range/%s', $prefix); + $url = sprintf('https://api.pwnedpasswords.com/range/%s', $prefix); $opt = [ 'headers' => [ 'User-Agent' => sprintf('Firefly III v%s', config('firefly.version')), @@ -61,7 +61,7 @@ class PwndVerifierV2 implements Verifier try { $client = new Client(); - $res = $client->request('GET', $uri, $opt); + $res = $client->request('GET', $url, $opt); } catch (GuzzleException|RequestException $e) { Log::error(sprintf('Could not verify password security: %s', $e->getMessage())); diff --git a/app/Support/Http/Controllers/RequestInformation.php b/app/Support/Http/Controllers/RequestInformation.php index a39eb32d21..13c5f972f7 100644 --- a/app/Support/Http/Controllers/RequestInformation.php +++ b/app/Support/Http/Controllers/RequestInformation.php @@ -157,7 +157,7 @@ trait RequestInformation } /** - * Parses attributes from URI. + * Parses attributes from URL * * @param array $attributes * diff --git a/app/Support/Http/Controllers/UserNavigation.php b/app/Support/Http/Controllers/UserNavigation.php index 72dd2829ee..7368e1d4a7 100644 --- a/app/Support/Http/Controllers/UserNavigation.php +++ b/app/Support/Http/Controllers/UserNavigation.php @@ -43,15 +43,15 @@ trait UserNavigation /** * Functionality:. * - * - If the $identifier contains the word "delete" then a remembered uri with the text "/show/" in it will not be returned but instead the index (/) + * - If the $identifier contains the word "delete" then a remembered url with the text "/show/" in it will not be returned but instead the index (/) * will be returned. - * - If the remembered uri contains "jscript/" the remembered uri will not be returned but instead the index (/) will be returned. + * - If the remembered url contains "jscript/" the remembered url will not be returned but instead the index (/) will be returned. * * @param string $identifier * * @return string */ - final protected function getPreviousUri(string $identifier): string + final protected function getPreviousUrl(string $identifier): string { Log::debug(sprintf('Trying to retrieve URL stored under "%s"', $identifier)); $url = (string) session($identifier); @@ -161,7 +161,7 @@ trait UserNavigation * * @return string|null */ - final protected function rememberPreviousUri(string $identifier): ?string + final protected function rememberPreviousUrl(string $identifier): ?string { $return = app('steam')->getSafePreviousUrl(); session()->put($identifier, $return); diff --git a/public/v1/js/ff/accounts/reconcile.js b/public/v1/js/ff/accounts/reconcile.js index bba8540fe2..2e161144e7 100644 --- a/public/v1/js/ff/accounts/reconcile.js +++ b/public/v1/js/ff/accounts/reconcile.js @@ -18,8 +18,6 @@ * along with this program. If not, see . */ -/** global: overviewUri, transactionsUri, indexUri,accounting */ - var balanceDifference = 0; var difference = 0; var selectedAmount = 0; @@ -142,10 +140,10 @@ function storeReconcile() { journals: ids, cleared: cleared, }; - var uri = overviewUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val()); + var url = overviewUrl.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val()); - $.getJSON(uri, variables).done(function (data) { + $.getJSON(url, variables).done(function (data) { $('#defaultModal').empty().html(data.html).modal('show'); }); } @@ -197,11 +195,11 @@ function getTransactionsForRange() { console.log('in getTransactionsForRange()'); // clear out the box: $('#transactions_holder').empty().append($('

').addClass('text-center').html('')); - var uri = transactionsUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val()); - var index = indexUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val()); + var url = transactionsUrl.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val()); + var index = indexUrl.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val()); window.history.pushState('object or string', "Reconcile account", index); - $.getJSON(uri).done(placeTransactions).catch(exceptionHandling) + $.getJSON(url).done(placeTransactions).catch(exceptionHandling) } function exceptionHandling() { $('#transactions_holder').empty().append($('

').addClass('text-center lead').html(selectRangeAndBalance)); diff --git a/public/v1/js/ff/accounts/show.js b/public/v1/js/ff/accounts/show.js index ae2fa13ee6..0ad69d3f61 100644 --- a/public/v1/js/ff/accounts/show.js +++ b/public/v1/js/ff/accounts/show.js @@ -18,8 +18,6 @@ * along with this program. If not, see . */ -/** global: chartUri, incomeCategoryUri, showAll, expenseCategoryUri, expenseBudgetUri, token */ - var fixHelper = function (e, tr) { "use strict"; var $originals = tr.children(); @@ -33,12 +31,12 @@ var fixHelper = function (e, tr) { $(function () { "use strict"; - //lineChart(chartUri, 'overview-chart'); - lineNoStartZeroChart(chartUri, 'overview-chart'); + //lineChart(chartUrl, 'overview-chart'); + lineNoStartZeroChart(chartUrl, 'overview-chart'); if (!showAll) { - multiCurrencyPieChart(incomeCategoryUri, 'account-cat-in'); - multiCurrencyPieChart(expenseCategoryUri, 'account-cat-out'); - multiCurrencyPieChart(expenseBudgetUri, 'account-budget-out'); + multiCurrencyPieChart(incomeCategoryUrl, 'account-cat-in'); + multiCurrencyPieChart(expenseCategoryUrl, 'account-cat-out'); + multiCurrencyPieChart(expenseBudgetUrl, 'account-budget-out'); } // sortable! diff --git a/public/v1/js/ff/admin/update/index.js b/public/v1/js/ff/admin/update/index.js index de2096ff70..ff742b8da2 100644 --- a/public/v1/js/ff/admin/update/index.js +++ b/public/v1/js/ff/admin/update/index.js @@ -18,8 +18,6 @@ * along with this program. If not, see . */ -/** global: updateCheckUri */ - $(function () { "use strict"; diff --git a/public/v1/js/ff/bills/show.js b/public/v1/js/ff/bills/show.js index d49e608f3d..f5e4ade6b9 100644 --- a/public/v1/js/ff/bills/show.js +++ b/public/v1/js/ff/bills/show.js @@ -18,11 +18,9 @@ * along with this program. If not, see . */ -/** global: billUri */ - $(function () { "use strict"; configAccounting(billCurrencySymbol); - columnChart(billUri, 'bill-overview'); + columnChart(billUrl, 'bill-overview'); } ); \ No newline at end of file diff --git a/public/v1/js/ff/budgets/index.js b/public/v1/js/ff/budgets/index.js index e772587102..1e48156aa6 100644 --- a/public/v1/js/ff/budgets/index.js +++ b/public/v1/js/ff/budgets/index.js @@ -44,8 +44,8 @@ $(function () { $('.selectPeriod').change(function (e) { var selected = $(e.currentTarget); if (selected.find(":selected").val() !== "x") { - var newUri = budgetIndexUri.replace("START", selected.find(":selected").data('start')).replace('END', selected.find(":selected").data('end')); - window.location.assign(newUri); + var newUrl = budgetIndexUrl.replace("START", selected.find(":selected").data('start')).replace('END', selected.find(":selected").data('end')); + window.location.assign(newUrl); } }); @@ -85,7 +85,7 @@ function updateBudgetedAmount(e) { var currencyId = parseInt(input.data('currency')); input.prop('disabled', true); if (0 === budgetLimitId) { - $.post(storeBudgetLimitUri, { + $.post(storeBudgetLimitUrl, { _token: token, budget_id: budgetId, transaction_currency_id: currencyId, @@ -108,7 +108,7 @@ function updateBudgetedAmount(e) { console.error('I failed :('); }); } else { - $.post(updateBudgetLimitUri.replace('REPLACEME', budgetLimitId.toString()), { + $.post(updateBudgetLimitUrl.replace('REPLACEME', budgetLimitId.toString()), { _token: token, amount: input.val(), }).done(function (data) { @@ -134,7 +134,7 @@ function updateTotalBudgetedAmount(currencyId) { }); // get new amount: - $.get(totalBudgetedUri.replace('REPLACEME', currencyId)).done(function (data) { + $.get(totalBudgetedUrl.replace('REPLACEME', currencyId)).done(function (data) { // set thing: $('span.budgeted_amount[data-currency="' + currencyId + '"]') .html(data.budgeted_formatted) @@ -201,7 +201,7 @@ function sortStop(event, ui) { function createBudgetLimit(e) { var button = $(e.currentTarget); var budgetId = button.data('id'); - $('#defaultModal').empty().load(createBudgetLimitUri.replace('REPLACEME', budgetId.toString()), function () { + $('#defaultModal').empty().load(createBudgetLimitUrl.replace('REPLACEME', budgetId.toString()), function () { $('#defaultModal').modal('show'); }); return false; @@ -220,7 +220,7 @@ function deleteBudgetLimit(e) { } function createAltAvailableBudget(e) { - $('#defaultModal').empty().load(createAltAvailableBudgetUri, function () { + $('#defaultModal').empty().load(createAltAvailableBudgetUrl, function () { $('#defaultModal').modal('show'); }); return false; @@ -230,13 +230,13 @@ function updateAvailableBudget(e) { var button = $(e.currentTarget); var abId = parseInt(button.data('id')); if (0 === abId) { - $('#defaultModal').empty().load(createAvailableBudgetUri, function () { + $('#defaultModal').empty().load(createAvailableBudgetUrl, function () { $('#defaultModal').modal('show'); }); } if (abId > 0) { // edit URL. - $('#defaultModal').empty().load(editAvailableBudgetUri.replace('REPLACEME', abId), function () { + $('#defaultModal').empty().load(editAvailableBudgetUrl.replace('REPLACEME', abId), function () { $('#defaultModal').modal('show'); }); } diff --git a/public/v1/js/ff/budgets/show.js b/public/v1/js/ff/budgets/show.js index 44683f7284..fa9ccd482b 100644 --- a/public/v1/js/ff/budgets/show.js +++ b/public/v1/js/ff/budgets/show.js @@ -18,20 +18,18 @@ * along with this program. If not, see . */ -/** global: budgetChartUri, expenseCategoryUri, expenseAssetUri, expenseExpenseUri, budgetLimitID */ - $(function () { "use strict"; if (budgetLimitID > 0) { - otherCurrencyLineChart(budgetChartUri, 'budgetOverview', currencySymbol); - multiCurrencyPieChart(expenseCategoryUri, 'budget-cat-out'); - multiCurrencyPieChart(expenseAssetUri, 'budget-asset-out'); - multiCurrencyPieChart(expenseExpenseUri, 'budget-expense-out'); + otherCurrencyLineChart(budgetChartUrl, 'budgetOverview', currencySymbol); + multiCurrencyPieChart(expenseCategoryUrl, 'budget-cat-out'); + multiCurrencyPieChart(expenseAssetUrl, 'budget-asset-out'); + multiCurrencyPieChart(expenseExpenseUrl, 'budget-expense-out'); } if (budgetLimitID === 0) { - columnChart(budgetChartUri, 'budgetOverview'); - multiCurrencyPieChart(expenseCategoryUri, 'budget-cat-out'); - multiCurrencyPieChart(expenseAssetUri, 'budget-asset-out'); - multiCurrencyPieChart(expenseExpenseUri, 'budget-expense-out'); + columnChart(budgetChartUrl, 'budgetOverview'); + multiCurrencyPieChart(expenseCategoryUrl, 'budget-cat-out'); + multiCurrencyPieChart(expenseAssetUrl, 'budget-asset-out'); + multiCurrencyPieChart(expenseExpenseUrl, 'budget-expense-out'); } }); diff --git a/public/v1/js/ff/charts.js b/public/v1/js/ff/charts.js index 7decfc2ae5..57bc4ff9ce 100644 --- a/public/v1/js/ff/charts.js +++ b/public/v1/js/ff/charts.js @@ -76,25 +76,25 @@ function colorizeData(data) { /** * Function to draw a line chart: - * @param URI + * @param URL * @param container */ -function lineChart(URI, container) { +function lineChart(URL, container) { "use strict"; var colorData = true; var options = $.extend(true, {}, defaultChartOptions); var chartType = 'line'; - drawAChart(URI, container, chartType, options, colorData); + drawAChart(URL, container, chartType, options, colorData); } /** * Function to draw a line chart that doesn't start at ZERO. - * @param URI + * @param URL * @param container */ -function lineNoStartZeroChart(URI, container) { +function lineNoStartZeroChart(URL, container) { "use strict"; var colorData = true; @@ -102,16 +102,16 @@ function lineNoStartZeroChart(URI, container) { var chartType = 'line'; options.scales.yAxes[0].ticks.beginAtZero = false; - drawAChart(URI, container, chartType, options, colorData); + drawAChart(URL, container, chartType, options, colorData); } /** * Overrules the currency the line chart is drawn in. * - * @param URI + * @param URL * @param container */ -function otherCurrencyLineChart(URI, container, currencySymbol) { +function otherCurrencyLineChart(URL, container, currencySymbol) { "use strict"; var colorData = true; @@ -153,16 +153,16 @@ function otherCurrencyLineChart(URI, container, currencySymbol) { console.log(options); var chartType = 'line'; - drawAChart(URI, container, chartType, options, colorData); + drawAChart(URL, container, chartType, options, colorData); } /** * Function to draw a chart with double Y Axes and stacked columns. * - * @param URI + * @param URL * @param container */ -function doubleYChart(URI, container) { +function doubleYChart(URL, container) { "use strict"; var colorData = true; @@ -203,16 +203,16 @@ function doubleYChart(URI, container) { var chartType = 'bar'; - drawAChart(URI, container, chartType, options, colorData); + drawAChart(URL, container, chartType, options, colorData); } /** * Function to draw a chart with double Y Axes and non stacked columns. * - * @param URI + * @param URL * @param container */ -function doubleYNonStackedChart(URI, container) { +function doubleYNonStackedChart(URL, container) { "use strict"; var colorData = true; @@ -250,47 +250,47 @@ function doubleYNonStackedChart(URI, container) { ]; var chartType = 'bar'; - drawAChart(URI, container, chartType, options, colorData); + drawAChart(URL, container, chartType, options, colorData); } /** * - * @param URI + * @param URL * @param container */ -function columnChart(URI, container) { +function columnChart(URL, container) { "use strict"; var colorData = true; var options = $.extend(true, {}, defaultChartOptions); var chartType = 'bar'; - drawAChart(URI, container, chartType, options, colorData); + drawAChart(URL, container, chartType, options, colorData); } /** * - * @param URI + * @param URL * @param container */ -function columnChartCustomColours(URI, container) { +function columnChartCustomColours(URL, container) { "use strict"; var colorData = false; var options = $.extend(true, {}, defaultChartOptions); var chartType = 'bar'; - drawAChart(URI, container, chartType, options, colorData); + drawAChart(URL, container, chartType, options, colorData); } /** * - * @param URI + * @param URL * @param container */ -function stackedColumnChart(URI, container) { +function stackedColumnChart(URL, container) { "use strict"; var colorData = true; @@ -302,60 +302,60 @@ function stackedColumnChart(URI, container) { var chartType = 'bar'; - drawAChart(URI, container, chartType, options, colorData); + drawAChart(URL, container, chartType, options, colorData); } /** * - * @param URI + * @param URL * @param container */ -function pieChart(URI, container) { +function pieChart(URL, container) { "use strict"; var colorData = false; var options = $.extend(true, {}, defaultPieOptions); var chartType = 'pie'; - drawAChart(URI, container, chartType, options, colorData); + drawAChart(URL, container, chartType, options, colorData); } /** * - * @param URI + * @param URL * @param container */ -function multiCurrencyPieChart(URI, container) { +function multiCurrencyPieChart(URL, container) { "use strict"; var colorData = false; var options = $.extend(true, {}, pieOptionsWithCurrency); var chartType = 'pie'; - drawAChart(URI, container, chartType, options, colorData); + drawAChart(URL, container, chartType, options, colorData); } /** - * @param URI + * @param URL * @param container * @param chartType * @param options * @param colorData * @param today */ -function drawAChart(URI, container, chartType, options, colorData) { +function drawAChart(URL, container, chartType, options, colorData) { var containerObj = $('#' + container); if (containerObj.length === 0) { return; } - $.getJSON(URI).done(function (data) { + $.getJSON(URL).done(function (data) { containerObj.removeClass('general-chart-error'); // if result is empty array, or the labels array is empty, show error. - // console.log(URI); + // console.log(URL); // console.log(data.length); // console.log(typeof data.labels); // console.log(data.labels.length); diff --git a/public/v1/js/ff/firefly.js b/public/v1/js/ff/firefly.js index 91ee63eaeb..dd74610e09 100644 --- a/public/v1/js/ff/firefly.js +++ b/public/v1/js/ff/firefly.js @@ -69,7 +69,7 @@ $(function () { function (start, end, label) { // send post. - $.post(dateRangeMeta.uri, { + $.post(dateRangeMeta.url, { start: start.format('YYYY-MM-DD'), end: end.format('YYYY-MM-DD'), label: label, diff --git a/public/v1/js/ff/index.js b/public/v1/js/ff/index.js index 60b42df9ae..5f963c126a 100644 --- a/public/v1/js/ff/index.js +++ b/public/v1/js/ff/index.js @@ -18,7 +18,6 @@ * along with this program. If not, see . */ -/** global: accountFrontpageUri, today, piggyInfoUri, token, billCount, accountExpenseUri, accountRevenueUri */ $(function () { "use strict"; @@ -29,15 +28,15 @@ $(function () { function drawChart() { "use strict"; - lineChart(accountFrontpageUri, 'accounts-chart'); + lineChart(accountFrontpageUrl, 'accounts-chart'); if (billCount > 0) { multiCurrencyPieChart('chart/bill/frontpage', 'bills-chart'); } stackedColumnChart('chart/budget/frontpage', 'budgets-chart'); columnChart('chart/category/frontpage', 'categories-chart'); - columnChart(accountExpenseUri, 'expense-accounts-chart'); - columnChart(accountRevenueUri, 'revenue-accounts-chart'); + columnChart(accountExpenseUrl, 'expense-accounts-chart'); + columnChart(accountRevenueUrl, 'revenue-accounts-chart'); // get balance box: getBalanceBox(); @@ -53,7 +52,7 @@ function drawChart() { * */ function getPiggyBanks() { - $.getJSON(piggyInfoUri).done(function (data) { + $.getJSON(piggyInfoUrl).done(function (data) { if (data.html.length > 0) { $('#piggy_bank_overview').html(data.html); } diff --git a/public/v1/js/ff/install/index.js b/public/v1/js/ff/install/index.js index 3232a52a98..a26d547ccd 100644 --- a/public/v1/js/ff/install/index.js +++ b/public/v1/js/ff/install/index.js @@ -34,7 +34,7 @@ function startRunningCommands() { } function runCommand(index) { - $.post(runCommandUri, {_token: token, index: index}).done(function (data) { + $.post(runCommandUrl, {_token: token, index: index}).done(function (data) { if (data.error === false) { // increase index index++; @@ -60,7 +60,7 @@ function runCommand(index) { function startMigration() { - $.post(migrateUri, {_token: token}).done(function (data) { + $.post(migrateUrl, {_token: token}).done(function (data) { if (data.error === false) { // move to decrypt routine. startDecryption(); @@ -75,7 +75,7 @@ function startMigration() { function startDecryption() { $('#status-box').html(' Setting up DB #2...'); - $.post(decryptUri, {_token: token}).done(function (data) { + $.post(decryptUrl, {_token: token}).done(function (data) { if (data.error === false) { // move to decrypt routine. startPassport(); @@ -93,7 +93,7 @@ function startDecryption() { */ function startPassport() { $('#status-box').html(' Setting up OAuth2...'); - $.post(keysUri, {_token: token}).done(function (data) { + $.post(keysUrl, {_token: token}).done(function (data) { if (data.error === false) { startUpgrade(); } else { @@ -110,7 +110,7 @@ function startPassport() { */ function startUpgrade() { $('#status-box').html(' Upgrading database...'); - $.post(upgradeUri, {_token: token}).done(function (data) { + $.post(upgradeUrl, {_token: token}).done(function (data) { if (data.error === false) { startVerify(); } else { @@ -126,7 +126,7 @@ function startUpgrade() { */ function startVerify() { $('#status-box').html(' Verify database integrity...'); - $.post(verifyUri, {_token: token}).done(function (data) { + $.post(verifyUrl, {_token: token}).done(function (data) { if (data.error === false) { completeDone(); } else { @@ -143,7 +143,7 @@ function startVerify() { function completeDone() { $('#status-box').html(' Installation + upgrade complete! Wait to be redirected...'); setTimeout(function () { - window.location = homeUri; + window.location = homeUrl; }, 3000); } diff --git a/public/v1/js/ff/intro/intro.js b/public/v1/js/ff/intro/intro.js index e279abb84a..713e409ab7 100644 --- a/public/v1/js/ff/intro/intro.js +++ b/public/v1/js/ff/intro/intro.js @@ -18,11 +18,10 @@ * along with this program. If not, see . */ -/** global: nextLabel, prevLabel,skipLabel,doneLabel routeForTour, token, routeStepsUri, routeForFinishedTour, forceDemoOff */ $(function () { "use strict"; if (!forceDemoOff) { - $.getJSON(routeStepsUri).done(setupIntro) + $.getJSON(routeStepsUrl).done(setupIntro) } }); diff --git a/public/v1/js/ff/recurring/create.js b/public/v1/js/ff/recurring/create.js index 1c0e465a63..a0e98757f6 100644 --- a/public/v1/js/ff/recurring/create.js +++ b/public/v1/js/ff/recurring/create.js @@ -65,19 +65,19 @@ $(document).ready(function () { function showRepCalendar() { // pre-append URL with repetition info: - var newEventsUri = eventsUri + '?type=' + $('#ffInput_repetition_type').val(); - newEventsUri += '&skip=' + $('#ffInput_skip').val(); - newEventsUri += '&ends=' + $('#ffInput_repetition_end').val(); - newEventsUri += '&end_date=' + $('#ffInput_repeat_until').val(); - newEventsUri += '&reps=' + $('#ffInput_repetitions').val(); - newEventsUri += '&first_date=' + $('#ffInput_first_date').val(); - newEventsUri += '&weekend=' + $('#ffInput_weekend').val(); + var newEventsUrl = eventsUrl + '?type=' + $('#ffInput_repetition_type').val(); + newEventsUrl += '&skip=' + $('#ffInput_skip').val(); + newEventsUrl += '&ends=' + $('#ffInput_repetition_end').val(); + newEventsUrl += '&end_date=' + $('#ffInput_repeat_until').val(); + newEventsUrl += '&reps=' + $('#ffInput_repetitions').val(); + newEventsUrl += '&first_date=' + $('#ffInput_first_date').val(); + newEventsUrl += '&weekend=' + $('#ffInput_weekend').val(); // remove all event sources from calendar: calendar.fullCalendar('removeEventSources'); // add a new one: - calendar.fullCalendar('addEventSource', newEventsUri); + calendar.fullCalendar('addEventSource', newEventsUrl); $('#calendarModal').modal('show'); return false; @@ -116,7 +116,7 @@ function respondToFirstDateChange() { preSelected = select.val(); } - $.getJSON(suggestUri, {date: date,pre_select: preSelected}).fail(function () { + $.getJSON(suggestUrl, {date: date,pre_select: preSelected}).fail(function () { console.error('Could not load repetition suggestions'); alert('Could not load repetition suggestions'); }).done(parseRepetitionSuggestions); diff --git a/public/v1/js/ff/recurring/edit.js b/public/v1/js/ff/recurring/edit.js index 66d15bdda8..acf1bd9e2e 100644 --- a/public/v1/js/ff/recurring/edit.js +++ b/public/v1/js/ff/recurring/edit.js @@ -65,19 +65,19 @@ $(document).ready(function () { function showRepCalendar() { // pre-append URL with repetition info: - var newEventsUri = eventsUri + '?type=' + $('#ffInput_repetition_type').val(); - newEventsUri += '&skip=' + $('#ffInput_skip').val(); - newEventsUri += '&ends=' + $('#ffInput_repetition_end').val(); - newEventsUri += '&end_date=' + $('#ffInput_repeat_until').val(); - newEventsUri += '&reps=' + $('#ffInput_repetitions').val(); - newEventsUri += '&first_date=' + $('#ffInput_first_date').val(); - newEventsUri += '&weekend=' + $('#ffInput_weekend').val(); + var newEventsUrl = eventsUrl + '?type=' + $('#ffInput_repetition_type').val(); + newEventsUrl += '&skip=' + $('#ffInput_skip').val(); + newEventsUrl += '&ends=' + $('#ffInput_repetition_end').val(); + newEventsUrl += '&end_date=' + $('#ffInput_repeat_until').val(); + newEventsUrl += '&reps=' + $('#ffInput_repetitions').val(); + newEventsUrl += '&first_date=' + $('#ffInput_first_date').val(); + newEventsUrl += '&weekend=' + $('#ffInput_weekend').val(); // remove all event sources from calendar: calendar.fullCalendar('removeEventSources'); // add a new one: - calendar.fullCalendar('addEventSource', newEventsUri); + calendar.fullCalendar('addEventSource', newEventsUrl); $('#calendarModal').modal('show'); return false; @@ -117,7 +117,7 @@ function respondToFirstDateChange() { preSelected = select.val(); } - $.getJSON(suggestUri, {date: date, pre_select: preSelected, past: true}).fail(function () { + $.getJSON(suggestUrl, {date: date, pre_select: preSelected, past: true}).fail(function () { console.error('Could not load repetition suggestions'); alert('Could not load repetition suggestions'); }).done(parseRepetitionSuggestions); diff --git a/public/v1/js/ff/reports/all.js b/public/v1/js/ff/reports/all.js index bf525cc941..9d5ab49818 100644 --- a/public/v1/js/ff/reports/all.js +++ b/public/v1/js/ff/reports/all.js @@ -18,16 +18,16 @@ * along with this program. If not, see . */ /** global: startDate, endDate, accountIds */ -function loadAjaxPartial(holder, uri) { +function loadAjaxPartial(holder, url) { "use strict"; - $.get(uri).done(function (data) { + $.get(url).done(function (data) { displayAjaxPartial(data, holder); }).fail(function () { - failAjaxPartial(uri, holder); + failAjaxPartial(url, holder); }); } -function failAjaxPartial(uri, holder) { +function failAjaxPartial(url, holder) { "use strict"; var holderObject = $('#' + holder); holderObject.parent().find('.overlay').remove(); diff --git a/public/v1/js/ff/reports/budget/month.js b/public/v1/js/ff/reports/budget/month.js index e4b7070c1d..83826cde94 100644 --- a/public/v1/js/ff/reports/budget/month.js +++ b/public/v1/js/ff/reports/budget/month.js @@ -22,12 +22,12 @@ $(function () { "use strict"; drawChart(); - loadAjaxPartial('accountsHolder', accountsUri); - loadAjaxPartial('budgetsHolder', budgetsUri); - loadAjaxPartial('accountPerbudgetHolder', accountPerBudgetUri); + loadAjaxPartial('accountsHolder', accountsUrl); + loadAjaxPartial('budgetsHolder', budgetsUrl); + loadAjaxPartial('accountPerbudgetHolder', accountPerBudgetUrl); - loadAjaxPartial('topExpensesHolder', topExpensesUri); - loadAjaxPartial('avgExpensesHolder', avgExpensesUri); + loadAjaxPartial('topExpensesHolder', topExpensesUrl); + loadAjaxPartial('avgExpensesHolder', avgExpensesUrl); }); @@ -42,15 +42,15 @@ function drawChart() { }); // draw pie chart of income, depending on "show other transactions too": - redrawPieChart('budgets-out-pie-chart', budgetExpenseUri); - redrawPieChart('categories-out-pie-chart', categoryExpenseUri); - redrawPieChart('source-accounts-pie-chart', sourceExpenseUri); - redrawPieChart('dest-accounts-pie-chart', destinationExpenseUri); + redrawPieChart('budgets-out-pie-chart', budgetExpenseUrl); + redrawPieChart('categories-out-pie-chart', categoryExpenseUrl); + redrawPieChart('source-accounts-pie-chart', sourceExpenseUrl); + redrawPieChart('dest-accounts-pie-chart', destinationExpenseUrl); } -function redrawPieChart(container, uri) { +function redrawPieChart(container, url) { "use strict"; - multiCurrencyPieChart(uri, container); + multiCurrencyPieChart(url, container); } diff --git a/public/v1/js/ff/reports/category/month.js b/public/v1/js/ff/reports/category/month.js index 838c7b4093..c0919e0016 100644 --- a/public/v1/js/ff/reports/category/month.js +++ b/public/v1/js/ff/reports/category/month.js @@ -20,26 +20,26 @@ $(function () { "use strict"; - loadAjaxPartial('accountsHolder', accountsUri); - loadAjaxPartial('categoriesHolder', categoriesUri); - loadAjaxPartial('accountPerCategoryHolder', accountPerCategoryUri); + loadAjaxPartial('accountsHolder', accountsUrl); + loadAjaxPartial('categoriesHolder', categoriesUrl); + loadAjaxPartial('accountPerCategoryHolder', accountPerCategoryUrl); $.each($('.main_category_canvas'), function (i, v) { var canvas = $(v); columnChart(canvas.data('url'), canvas.attr('id')); }); - multiCurrencyPieChart(categoryOutUri, 'category-out-pie-chart'); - multiCurrencyPieChart(categoryInUri, 'category-in-pie-chart'); - multiCurrencyPieChart(budgetsOutUri, 'budgets-out-pie-chart'); - multiCurrencyPieChart(sourceOutUri, 'source-out-pie-chart'); - multiCurrencyPieChart(sourceInUri, 'source-in-pie-chart'); - multiCurrencyPieChart(destOutUri, 'dest-out-pie-chart'); - multiCurrencyPieChart(destInUri, 'dest-in-pie-chart'); + multiCurrencyPieChart(categoryOutUrl, 'category-out-pie-chart'); + multiCurrencyPieChart(categoryInUrl, 'category-in-pie-chart'); + multiCurrencyPieChart(budgetsOutUrl, 'budgets-out-pie-chart'); + multiCurrencyPieChart(sourceOutUrl, 'source-out-pie-chart'); + multiCurrencyPieChart(sourceInUrl, 'source-in-pie-chart'); + multiCurrencyPieChart(destOutUrl, 'dest-out-pie-chart'); + multiCurrencyPieChart(destInUrl, 'dest-in-pie-chart'); - loadAjaxPartial('topExpensesHolder', topExpensesUri); - loadAjaxPartial('avgExpensesHolder', avgExpensesUri); - loadAjaxPartial('topIncomeHolder', topIncomeUri); - loadAjaxPartial('avgIncomeHolder', avgIncomeUri); + loadAjaxPartial('topExpensesHolder', topExpensesUrl); + loadAjaxPartial('avgExpensesHolder', avgExpensesUrl); + loadAjaxPartial('topIncomeHolder', topIncomeUrl); + loadAjaxPartial('avgIncomeHolder', avgIncomeUrl); }); \ No newline at end of file diff --git a/public/v1/js/ff/reports/default/all.js b/public/v1/js/ff/reports/default/all.js index 22767a711e..52c8773c99 100644 --- a/public/v1/js/ff/reports/default/all.js +++ b/public/v1/js/ff/reports/default/all.js @@ -18,19 +18,17 @@ * along with this program. If not, see . */ -/** global: accountReportUri, incomeReportUri, expenseReportUri, incExpReportUri, startDate, endDate, accountIds */ - $(function () { "use strict"; // load the account report, which this report shows: - loadAjaxPartial('accountReport', accountReportUri); + loadAjaxPartial('accountReport', accountReportUrl); // load income and expense reports: - loadAjaxPartial('incomeReport', incomeReportUri); - loadAjaxPartial('expenseReport', expenseReportUri); - loadAjaxPartial('incomeVsExpenseReport', incExpReportUri); - loadAjaxPartial('billReport', billReportUri); + loadAjaxPartial('incomeReport', incomeReportUrl); + loadAjaxPartial('expenseReport', expenseReportUrl); + loadAjaxPartial('incomeVsExpenseReport', incExpReportUrl); + loadAjaxPartial('billReport', billReportUrl); }); diff --git a/public/v1/js/ff/reports/default/month.js b/public/v1/js/ff/reports/default/month.js index 64b4e80aa5..401def9702 100644 --- a/public/v1/js/ff/reports/default/month.js +++ b/public/v1/js/ff/reports/default/month.js @@ -18,14 +18,12 @@ * along with this program. If not, see . */ -/** global: categoryReportUri, budgetReportUri, balanceReportUri, accountChartUri */ - $(function () { "use strict"; - lineChart(accountChartUri, 'account-balances-chart'); + lineChart(accountChartUrl, 'account-balances-chart'); - loadAjaxPartial('categoryReport', categoryReportUri); - loadAjaxPartial('budgetReport', budgetReportUri); - loadAjaxPartial('balanceReport', balanceReportUri); + loadAjaxPartial('categoryReport', categoryReportUrl); + loadAjaxPartial('budgetReport', budgetReportUrl); + loadAjaxPartial('balanceReport', balanceReportUrl); }); diff --git a/public/v1/js/ff/reports/default/multi-year.js b/public/v1/js/ff/reports/default/multi-year.js index 969dbcb0c6..1cb4c84874 100644 --- a/public/v1/js/ff/reports/default/multi-year.js +++ b/public/v1/js/ff/reports/default/multi-year.js @@ -18,15 +18,13 @@ * along with this program. If not, see . */ -/** global: budgetPeriodReportUri, categoryExpenseUri, categoryIncomeUri, netWorthUri, opChartUri */ - $(function () { "use strict"; - lineChart(netWorthUri, 'net-worth'); - columnChartCustomColours(opChartUri, 'income-expenses-chart'); + lineChart(netWorthUrl, 'net-worth'); + columnChartCustomColours(opChartUrl, 'income-expenses-chart'); - loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUri); - loadAjaxPartial('categoryExpense', categoryExpenseUri); - loadAjaxPartial('categoryIncome', categoryIncomeUri); + loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUrl); + loadAjaxPartial('categoryExpense', categoryExpenseUrl); + loadAjaxPartial('categoryIncome', categoryIncomeUrl); }); diff --git a/public/v1/js/ff/reports/default/year.js b/public/v1/js/ff/reports/default/year.js index 21caf20aa9..70e53d6ff6 100644 --- a/public/v1/js/ff/reports/default/year.js +++ b/public/v1/js/ff/reports/default/year.js @@ -18,15 +18,13 @@ * along with this program. If not, see . */ -/** global: budgetPeriodReportUri, categoryExpenseUri, categoryIncomeUri, netWorthUri, opChartUri */ - $(function () { "use strict"; - lineChart(netWorthUri, 'net-worth'); - columnChartCustomColours(opChartUri, 'income-expenses-chart'); + lineChart(netWorthUrl, 'net-worth'); + columnChartCustomColours(opChartUrl, 'income-expenses-chart'); - loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUri); - loadAjaxPartial('categoryExpense', categoryExpenseUri); - loadAjaxPartial('categoryIncome', categoryIncomeUri); + loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUrl); + loadAjaxPartial('categoryExpense', categoryExpenseUrl); + loadAjaxPartial('categoryIncome', categoryIncomeUrl); }); diff --git a/public/v1/js/ff/reports/double/month.js b/public/v1/js/ff/reports/double/month.js index 42bc66a657..7a528810fd 100644 --- a/public/v1/js/ff/reports/double/month.js +++ b/public/v1/js/ff/reports/double/month.js @@ -20,24 +20,24 @@ $(function () { "use strict"; - loadAjaxPartial('opsAccounts', opsAccountsUri); - loadAjaxPartial('opsAccountsAsset', opsAccountsAssetUri); + loadAjaxPartial('opsAccounts', opsAccountsUrl); + loadAjaxPartial('opsAccountsAsset', opsAccountsAssetUrl); - multiCurrencyPieChart(categoryOutUri, 'category-out-pie-chart'); - multiCurrencyPieChart(categoryInUri, 'category-in-pie-chart'); - multiCurrencyPieChart(budgetsOutUri, 'budgets-out-pie-chart'); - multiCurrencyPieChart(tagOutUri, 'tag-out-pie-chart'); - multiCurrencyPieChart(tagInUri, 'tag-in-pie-chart'); + multiCurrencyPieChart(categoryOutUrl, 'category-out-pie-chart'); + multiCurrencyPieChart(categoryInUrl, 'category-in-pie-chart'); + multiCurrencyPieChart(budgetsOutUrl, 'budgets-out-pie-chart'); + multiCurrencyPieChart(tagOutUrl, 'tag-out-pie-chart'); + multiCurrencyPieChart(tagInUrl, 'tag-in-pie-chart'); $.each($('.main_double_canvas'), function (i, v) { var canvas = $(v); columnChart(canvas.data('url'), canvas.attr('id')); }); - loadAjaxPartial('topExpensesHolder', topExpensesUri); - loadAjaxPartial('avgExpensesHolder', avgExpensesUri); - loadAjaxPartial('topIncomeHolder', topIncomeUri); - loadAjaxPartial('avgIncomeHolder', avgIncomeUri); + loadAjaxPartial('topExpensesHolder', topExpensesUrl); + loadAjaxPartial('avgExpensesHolder', avgExpensesUrl); + loadAjaxPartial('topIncomeHolder', topIncomeUrl); + loadAjaxPartial('avgIncomeHolder', avgIncomeUrl); }); diff --git a/public/v1/js/ff/reports/tag/month.js b/public/v1/js/ff/reports/tag/month.js index 0247d5a50e..4f4578e96f 100644 --- a/public/v1/js/ff/reports/tag/month.js +++ b/public/v1/js/ff/reports/tag/month.js @@ -20,29 +20,29 @@ $(function () { "use strict"; - loadAjaxPartial('accountsHolder', accountsUri); - loadAjaxPartial('tagsHolder', tagsUri); - loadAjaxPartial('accountPerTagHolder', accountPerTagUri); + loadAjaxPartial('accountsHolder', accountsUrl); + loadAjaxPartial('tagsHolder', tagsUrl); + loadAjaxPartial('accountPerTagHolder', accountPerTagUrl); $.each($('.main_tag_canvas'), function (i, v) { var canvas = $(v); columnChart(canvas.data('url'), canvas.attr('id')); }); - multiCurrencyPieChart(tagOutUri, 'tag-out-pie-chart'); - multiCurrencyPieChart(tagInUri, 'tag-in-pie-chart'); - multiCurrencyPieChart(categoryOutUri, 'category-out-pie-chart'); - multiCurrencyPieChart(categoryInUri, 'category-in-pie-chart'); - multiCurrencyPieChart(budgetsOutUri, 'budgets-out-pie-chart'); - multiCurrencyPieChart(sourceOutUri, 'source-out-pie-chart'); - multiCurrencyPieChart(sourceInUri, 'source-in-pie-chart'); - multiCurrencyPieChart(destOutUri, 'dest-out-pie-chart'); - multiCurrencyPieChart(destInUri, 'dest-in-pie-chart'); + multiCurrencyPieChart(tagOutUrl, 'tag-out-pie-chart'); + multiCurrencyPieChart(tagInUrl, 'tag-in-pie-chart'); + multiCurrencyPieChart(categoryOutUrl, 'category-out-pie-chart'); + multiCurrencyPieChart(categoryInUrl, 'category-in-pie-chart'); + multiCurrencyPieChart(budgetsOutUrl, 'budgets-out-pie-chart'); + multiCurrencyPieChart(sourceOutUrl, 'source-out-pie-chart'); + multiCurrencyPieChart(sourceInUrl, 'source-in-pie-chart'); + multiCurrencyPieChart(destOutUrl, 'dest-out-pie-chart'); + multiCurrencyPieChart(destInUrl, 'dest-in-pie-chart'); - loadAjaxPartial('topExpensesHolder', topExpensesUri); - loadAjaxPartial('avgExpensesHolder', avgExpensesUri); - loadAjaxPartial('topIncomeHolder', topIncomeUri); - loadAjaxPartial('avgIncomeHolder', avgIncomeUri); + loadAjaxPartial('topExpensesHolder', topExpensesUrl); + loadAjaxPartial('avgExpensesHolder', avgExpensesUrl); + loadAjaxPartial('topIncomeHolder', topIncomeUrl); + loadAjaxPartial('avgIncomeHolder', avgIncomeUrl); }); diff --git a/public/v1/js/ff/rules/create-edit.js b/public/v1/js/ff/rules/create-edit.js index 656746a822..f454473eac 100644 --- a/public/v1/js/ff/rules/create-edit.js +++ b/public/v1/js/ff/rules/create-edit.js @@ -376,14 +376,14 @@ function updateTriggerInput(selectList) { /** * Create actual autocomplete * @param input - * @param URI + * @param URL */ -function createAutoComplete(input, URI) { - console.log('Now in createAutoComplete("' + URI + '").'); +function createAutoComplete(input, URL) { + console.log('Now in createAutoComplete("' + URL + '").'); input.typeahead('destroy'); - // append URI: - var lastChar = URI[URI.length -1]; + // append URL: + var lastChar = URL[URL.length -1]; var urlParamSplit = '?'; if('&' === lastChar) { urlParamSplit = ''; @@ -392,7 +392,7 @@ function createAutoComplete(input, URI) { datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'), queryTokenizer: Bloodhound.tokenizers.whitespace, prefetch: { - url: URI + urlParamSplit + 'uid=' + uid, + url: URL + urlParamSplit + 'uid=' + uid, filter: function (list) { return $.map(list, function (item) { return {name: item.name}; @@ -400,7 +400,7 @@ function createAutoComplete(input, URI) { } }, remote: { - url: URI + urlParamSplit + 'query=%QUERY&uid=' + uid, + url: URL + urlParamSplit + 'query=%QUERY&uid=' + uid, wildcard: '%QUERY', filter: function (list) { return $.map(list, function (item) { diff --git a/public/v1/js/ff/search/index.js b/public/v1/js/ff/search/index.js index 8c22d08923..6d26fbd683 100644 --- a/public/v1/js/ff/search/index.js +++ b/public/v1/js/ff/search/index.js @@ -18,8 +18,6 @@ * along with this program. If not, see . */ -/** global: searchQuery,searchUri,token */ - $(function () { @@ -29,7 +27,7 @@ $(function () { }); function startSearch(query) { - $.post(searchUri, {query: query, _token: token}).done(presentSearchResults).fail(searchFailure); + $.post(searchUrl, {query: query, _token: token}).done(presentSearchResults).fail(searchFailure); } function searchFailure() { diff --git a/public/v1/js/ff/transactions/index.js b/public/v1/js/ff/transactions/index.js index 1ce056df8d..acb72fcdcf 100644 --- a/public/v1/js/ff/transactions/index.js +++ b/public/v1/js/ff/transactions/index.js @@ -21,9 +21,9 @@ $(function () { "use strict"; if (!showAll) { - multiCurrencyPieChart(categoryChartUri, 'category_chart'); - multiCurrencyPieChart(budgetChartUri, 'budget_chart'); - multiCurrencyPieChart(destinationChartUri, 'destination_chart'); - multiCurrencyPieChart(sourceChartUri, 'source_chart'); + multiCurrencyPieChart(categoryChartUrl, 'category_chart'); + multiCurrencyPieChart(budgetChartUrl, 'budget_chart'); + multiCurrencyPieChart(destinationChartUrl, 'destination_chart'); + multiCurrencyPieChart(sourceChartUrl, 'source_chart'); } }); \ No newline at end of file diff --git a/public/v1/js/ff/transactions/show.js b/public/v1/js/ff/transactions/show.js index 72ad1490b3..30abedea19 100644 --- a/public/v1/js/ff/transactions/show.js +++ b/public/v1/js/ff/transactions/show.js @@ -18,8 +18,6 @@ * along with this program. If not, see . */ -/** global: autoCompleteUri */ - $(function () { "use strict"; $('.link-modal').click(getLinkModal); @@ -33,7 +31,7 @@ $(function () { function getLinkModal(e) { var button = $(e.currentTarget); var journalId = parseInt(button.data('journal')); - var url = modalDialogURI.replace('%JOURNAL%', journalId); + var url = modalDialogURL.replace('%JOURNAL%', journalId); console.log(url); $.get(url).done(function (data) { $('#linkJournalModal').html(data).modal('show'); @@ -53,7 +51,7 @@ function makeAutoComplete() { datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'), queryTokenizer: Bloodhound.tokenizers.whitespace, prefetch: { - url: acURI + '?uid=' + uid, + url: acURL + '?uid=' + uid, filter: function (list) { return $.map(list, function (item) { return item; @@ -61,7 +59,7 @@ function makeAutoComplete() { } }, remote: { - url: acURI + '?query=%QUERY&uid=' + uid, + url: acURL + '?query=%QUERY&uid=' + uid, wildcard: '%QUERY', filter: function (list) { return $.map(list, function (item) { @@ -78,7 +76,7 @@ function makeAutoComplete() { function selectedJournal(event, journal) { $('#journal-selector').hide(); $('#journal-selection').show(); - $('#selected-journal').html('' + journal.description + '').show(); + $('#selected-journal').html('' + journal.description + '').show(); $('input[name="opposing"]').val(journal.id); } diff --git a/resources/views/accounts/reconcile/index.twig b/resources/views/accounts/reconcile/index.twig index 9e9fe81280..9beff7101a 100644 --- a/resources/views/accounts/reconcile/index.twig +++ b/resources/views/accounts/reconcile/index.twig @@ -128,9 +128,9 @@ var accountID = {{ account.id }}; var startBalance = {{ startBalance }}; var endBalance = {{ endBalance }}; - var transactionsUri = '{{ transactionsUri }}'; - var overviewUri = '{{ overviewUri }}'; - var indexUri = '{{ indexUri }}'; + var transactionsUrl = '{{ transactionsUrl }}'; + var overviewUrl = '{{ overviewUrl }}'; + var indexUrl = '{{ indexUrl }}'; var selectRangeAndBalance = '{{ 'select_range_and_balance'|_|escape('js') }}'; diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig index 6eb878e1a8..9c729d03aa 100644 --- a/resources/views/accounts/show.twig +++ b/resources/views/accounts/show.twig @@ -182,14 +182,14 @@ var showAll = true; currencySymbol = "{{ currency.symbol }}"; var accountID = {{ account.id }}; - var chartUri = '{{ chartUri }}'; + var chartUrl = '{{ chartUrl }}'; {% if not showAll %} showAll = false; - // uri's for charts: + // url's for charts: - var incomeCategoryUri = '{{ route('chart.account.income-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; - var expenseCategoryUri = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; - var expenseBudgetUri = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; + var incomeCategoryUrl = '{{ route('chart.account.income-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseCategoryUrl = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseBudgetUrl = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; var drawVerticalLine = ''; {# render vertical line with text "today" #} {% if start.lte(today) and end.gte(today) %} diff --git a/resources/views/admin/update/index.twig b/resources/views/admin/update/index.twig index 4ee57116f3..9655a7fe14 100644 --- a/resources/views/admin/update/index.twig +++ b/resources/views/admin/update/index.twig @@ -69,7 +69,7 @@ {% endblock %} {% block scripts %} {% endblock %} diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig index 556c9e872d..dacf29fb9d 100644 --- a/resources/views/bills/show.twig +++ b/resources/views/bills/show.twig @@ -166,7 +166,7 @@ {% block scripts %} diff --git a/resources/views/budgets/index.twig b/resources/views/budgets/index.twig index 3494c525b1..3394388f82 100644 --- a/resources/views/budgets/index.twig +++ b/resources/views/budgets/index.twig @@ -458,20 +458,20 @@ diff --git a/resources/views/index.twig b/resources/views/index.twig index 5d7b5c9bea..9460cc2342 100644 --- a/resources/views/index.twig +++ b/resources/views/index.twig @@ -170,10 +170,10 @@ {% block scripts %} {% endblock %} diff --git a/resources/views/javascript/variables.twig b/resources/views/javascript/variables.twig index 9e7a18fcd5..71a0c84137 100644 --- a/resources/views/javascript/variables.twig +++ b/resources/views/javascript/variables.twig @@ -7,7 +7,7 @@ var ranges = {}; // date range meta configuration var dateRangeMeta = { title: "{{ dateRangeTitle }}", -uri: "{{ route('daterange') }}", +url: "{{ route('daterange') }}", labels: { apply: "{{ 'apply'|_ }}", cancel: "{{ 'cancel'|_ }}", diff --git a/resources/views/layout/default.twig b/resources/views/layout/default.twig index a558b85f6f..555140d32c 100644 --- a/resources/views/layout/default.twig +++ b/resources/views/layout/default.twig @@ -201,7 +201,7 @@ {% if not shownDemo %} diff --git a/resources/views/recurring/create.twig b/resources/views/recurring/create.twig index 7ae34eafa5..fa075fdec8 100644 --- a/resources/views/recurring/create.twig +++ b/resources/views/recurring/create.twig @@ -208,8 +208,8 @@ diff --git a/resources/views/recurring/edit.twig b/resources/views/recurring/edit.twig index 059800d2b6..6e241238b8 100644 --- a/resources/views/recurring/edit.twig +++ b/resources/views/recurring/edit.twig @@ -205,8 +205,8 @@ diff --git a/resources/views/reports/budget/month.twig b/resources/views/reports/budget/month.twig index d0a4276859..e4511f7abf 100644 --- a/resources/views/reports/budget/month.twig +++ b/resources/views/reports/budget/month.twig @@ -161,18 +161,17 @@ var accountIds = '{{ accountIds }}'; var budgetIds = '{{ budgetIds }}'; - // html block URI's: - var accountsUri = '{{ route('report-data.budget.accounts', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var budgetsUri = '{{ route('report-data.budget.budgets', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var accountPerBudgetUri = '{{ route('report-data.budget.account-per-budget', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var avgExpensesUri = '{{ route('report-data.budget.avg-expenses', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var topExpensesUri = '{{ route('report-data.budget.top-expenses', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; + // html block URL's: + var accountsUrl = '{{ route('report-data.budget.accounts', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var budgetsUrl = '{{ route('report-data.budget.budgets', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var accountPerBudgetUrl = '{{ route('report-data.budget.account-per-budget', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var avgExpensesUrl = '{{ route('report-data.budget.avg-expenses', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var topExpensesUrl = '{{ route('report-data.budget.top-expenses', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; - // chart uri's - var budgetExpenseUri = '{{ route('chart.budget.budget-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var categoryExpenseUri = '{{ route('chart.budget.category-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var sourceExpenseUri = '{{ route('chart.budget.source-account-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var destinationExpenseUri = '{{ route('chart.budget.destination-account-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var budgetExpenseUrl = '{{ route('chart.budget.budget-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryExpenseUrl = '{{ route('chart.budget.category-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var sourceExpenseUrl = '{{ route('chart.budget.source-account-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var destinationExpenseUrl = '{{ route('chart.budget.destination-account-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}'; diff --git a/resources/views/reports/category/month.twig b/resources/views/reports/category/month.twig index b912668647..c6a02692f2 100644 --- a/resources/views/reports/category/month.twig +++ b/resources/views/reports/category/month.twig @@ -227,25 +227,24 @@ var accountIds = '{{ accountIds }}'; var categoryIds = '{{ categoryIds }}'; - // html block URI's: - var accountsUri = '{{ route('report-data.category.accounts', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var categoriesUri = '{{ route('report-data.category.categories', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var accountPerCategoryUri = '{{ route('report-data.category.account-per-category', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var accountsUrl = '{{ route('report-data.category.accounts', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoriesUrl = '{{ route('report-data.category.categories', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var accountPerCategoryUrl = '{{ route('report-data.category.account-per-category', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; // pie charts: - var categoryOutUri = '{{ route('chart.category.category-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var categoryInUri = '{{ route('chart.category.category-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var budgetsOutUri = '{{ route('chart.category.budget-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var sourceOutUri = '{{ route('chart.category.source-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var sourceInUri = '{{ route('chart.category.source-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var destOutUri = '{{ route('chart.category.dest-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var destInUri = '{{ route('chart.category.dest-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryOutUrl = '{{ route('chart.category.category-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryInUrl = '{{ route('chart.category.category-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var budgetsOutUrl = '{{ route('chart.category.budget-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var sourceOutUrl = '{{ route('chart.category.source-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var sourceInUrl = '{{ route('chart.category.source-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var destOutUrl = '{{ route('chart.category.dest-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var destInUrl = '{{ route('chart.category.dest-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var avgExpensesUri = '{{ route('report-data.category.avg-expenses', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var topExpensesUri = '{{ route('report-data.category.top-expenses', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var avgIncomeUri = '{{ route('report-data.category.avg-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var topIncomeUri = '{{ route('report-data.category.top-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var avgExpensesUrl = '{{ route('report-data.category.avg-expenses', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var topExpensesUrl = '{{ route('report-data.category.top-expenses', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var avgIncomeUrl = '{{ route('report-data.category.avg-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var topIncomeUrl = '{{ route('report-data.category.top-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}'; diff --git a/resources/views/reports/default/month.twig b/resources/views/reports/default/month.twig index 13d21012fe..687c45a1d4 100644 --- a/resources/views/reports/default/month.twig +++ b/resources/views/reports/default/month.twig @@ -160,18 +160,16 @@ var reportType = '{{ reportType }}'; var accountIds = '{{ accountIds }}'; - // uri's for data - var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var categoryReportUri = '{{ route('report-data.category.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var budgetReportUri = '{{ route('report-data.budget.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var balanceReportUri = '{{ route('report-data.balance.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var incomeReportUri = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var expenseReportUri = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var incExpReportUri = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var billReportUri = '{{ route('report-data.bills.overview', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var accountReportUrl = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryReportUrl = '{{ route('report-data.category.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var budgetReportUrl = '{{ route('report-data.budget.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var balanceReportUrl = '{{ route('report-data.balance.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incomeReportUrl = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseReportUrl = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incExpReportUrl = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var billReportUrl = '{{ route('report-data.bills.overview', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - // uri's for charts: - var accountChartUri = '{{ route('chart.account.report', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var accountChartUrl = '{{ route('chart.account.report', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; diff --git a/resources/views/reports/default/multi-year.twig b/resources/views/reports/default/multi-year.twig index 9db34f8f86..be76587ad0 100644 --- a/resources/views/reports/default/multi-year.twig +++ b/resources/views/reports/default/multi-year.twig @@ -202,20 +202,18 @@ var endDate = '{{ end.format('Ymd') }}'; var accountIds = '{{ accountIds }}'; - // report uri's - var opChartUri = '{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var netWorthUri = '{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var opChartUrl = '{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var netWorthUrl = '{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - // data uri's - var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var incomeReportUri = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var expenseReportUri = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var incExpReportUri = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var accountReportUrl = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incomeReportUrl = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseReportUrl = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incExpReportUrl = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var budgetPeriodReportUri = '{{ route('report-data.budget.period', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var categoryExpenseUri = '{{ route('report-data.category.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var categoryIncomeUri = '{{ route('report-data.category.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var billReportUri = ''; + var budgetPeriodReportUrl = '{{ route('report-data.budget.period', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryExpenseUrl = '{{ route('report-data.category.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryIncomeUrl = '{{ route('report-data.category.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var billReportUrl = ''; diff --git a/resources/views/reports/default/year.twig b/resources/views/reports/default/year.twig index 3381ddc1b9..a11196ffb5 100644 --- a/resources/views/reports/default/year.twig +++ b/resources/views/reports/default/year.twig @@ -196,20 +196,18 @@ var endDate = '{{ end.format('Ymd') }}'; var accountIds = '{{ accountIds }}'; - // report uri's - var opChartUri = '{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var netWorthUri = '{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var opChartUrl = '{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var netWorthUrl = '{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - // data uri's - var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var incomeReportUri = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var expenseReportUri = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var incExpReportUri = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var accountReportUrl = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incomeReportUrl = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseReportUrl = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incExpReportUrl = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var budgetPeriodReportUri = '{{ route('report-data.budget.period', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var categoryExpenseUri = '{{ route('report-data.category.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var categoryIncomeUri = '{{ route('report-data.category.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var billReportUri = ''; + var budgetPeriodReportUrl = '{{ route('report-data.budget.period', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryExpenseUrl = '{{ route('report-data.category.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryIncomeUrl = '{{ route('report-data.category.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var billReportUrl = ''; diff --git a/resources/views/reports/double/report.twig b/resources/views/reports/double/report.twig index 753c8dc942..602d2b1de2 100644 --- a/resources/views/reports/double/report.twig +++ b/resources/views/reports/double/report.twig @@ -204,24 +204,22 @@ var accountIds = '{{ accountIds }}'; var doubleIds = '{{ doubleIds }}'; - // chart uri's - {#var mainUri = '{{ route('chart.expense.main', [accountIds, expenseIds, start.format('Ymd'), end.format('Ymd')]) }}';#} // html blocks. - var opsAccountsUri = '{{ route('report-data.double.operations', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var opsAccountsAssetUri = '{{ route('report-data.double.ops-asset', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var opsAccountsUrl = '{{ route('report-data.double.operations', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var opsAccountsAssetUrl = '{{ route('report-data.double.ops-asset', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; // pie charts: - var categoryOutUri = '{{ route('chart.double.category-expense', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var categoryInUri = '{{ route('chart.double.category-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var budgetsOutUri = '{{ route('chart.double.budget-expense', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var tagOutUri = '{{ route('chart.double.tag-expense', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var tagInUri = '{{ route('chart.double.tag-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryOutUrl = '{{ route('chart.double.category-expense', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryInUrl = '{{ route('chart.double.category-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var budgetsOutUrl = '{{ route('chart.double.budget-expense', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var tagOutUrl = '{{ route('chart.double.tag-expense', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var tagInUrl = '{{ route('chart.double.tag-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var avgExpensesUri = '{{ route('report-data.double.avg-expenses', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var topExpensesUri = '{{ route('report-data.double.top-expenses', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var avgIncomeUri = '{{ route('report-data.double.avg-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var topIncomeUri = '{{ route('report-data.double.top-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var avgExpensesUrl = '{{ route('report-data.double.avg-expenses', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var topExpensesUrl = '{{ route('report-data.double.top-expenses', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var avgIncomeUrl = '{{ route('report-data.double.avg-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var topIncomeUrl = '{{ route('report-data.double.top-income', [accountIds, doubleIds, start.format('Ymd'), end.format('Ymd')]) }}'; diff --git a/resources/views/reports/tag/month.twig b/resources/views/reports/tag/month.twig index b346b3348c..56ffbf775b 100644 --- a/resources/views/reports/tag/month.twig +++ b/resources/views/reports/tag/month.twig @@ -258,27 +258,26 @@ var accountIds = '{{ accountIds }}'; var tagIds = '{{ tagIds }}'; - // html block URI's: - var accountsUri = '{{ route('report-data.tag.accounts', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var tagsUri = '{{ route('report-data.tag.tags', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var accountPerTagUri = '{{ route('report-data.tag.account-per-tag', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var accountsUrl = '{{ route('report-data.tag.accounts', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var tagsUrl = '{{ route('report-data.tag.tags', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var accountPerTagUrl = '{{ route('report-data.tag.account-per-tag', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; // pie charts: - var tagOutUri = '{{ route('chart.tag.tag-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var tagInUri = '{{ route('chart.tag.tag-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var categoryOutUri = '{{ route('chart.tag.category-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var categoryInUri = '{{ route('chart.tag.category-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var budgetsOutUri = '{{ route('chart.tag.budget-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var sourceOutUri = '{{ route('chart.tag.source-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var sourceInUri = '{{ route('chart.tag.source-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var destOutUri = '{{ route('chart.tag.dest-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var destInUri = '{{ route('chart.tag.dest-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var tagOutUrl = '{{ route('chart.tag.tag-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var tagInUrl = '{{ route('chart.tag.tag-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryOutUrl = '{{ route('chart.tag.category-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryInUrl = '{{ route('chart.tag.category-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var budgetsOutUrl = '{{ route('chart.tag.budget-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var sourceOutUrl = '{{ route('chart.tag.source-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var sourceInUrl = '{{ route('chart.tag.source-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var destOutUrl = '{{ route('chart.tag.dest-expense', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var destInUrl = '{{ route('chart.tag.dest-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var avgExpensesUri = '{{ route('report-data.tag.avg-expenses', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var topExpensesUri = '{{ route('report-data.tag.top-expenses', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var avgIncomeUri = '{{ route('report-data.tag.avg-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var topIncomeUri = '{{ route('report-data.tag.top-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var avgExpensesUrl = '{{ route('report-data.tag.avg-expenses', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var topExpensesUrl = '{{ route('report-data.tag.top-expenses', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var avgIncomeUrl = '{{ route('report-data.tag.avg-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var topIncomeUrl = '{{ route('report-data.tag.top-income', [accountIds, tagIds, start.format('Ymd'), end.format('Ymd')]) }}'; diff --git a/resources/views/search/index.twig b/resources/views/search/index.twig index 589597e089..a053d03b20 100644 --- a/resources/views/search/index.twig +++ b/resources/views/search/index.twig @@ -143,7 +143,7 @@ var edit_bulk_selected_txt = "{{ trans('firefly.bulk_edit')|escape('js') }}"; var searchQuery = "{{ fullQuery|escape('js') }}"; - var searchUri = "{{ route('search.search') }}?page={{ page }}"; + var searchUrl = "{{ route('search.search') }}?page={{ page }}"; var searchPage = {{ page }}; var cloneGroupUrl = '{{ route('transactions.clone') }}'; diff --git a/resources/views/transactions/index.twig b/resources/views/transactions/index.twig index d6dcf3ccaf..fd0fef5ff2 100644 --- a/resources/views/transactions/index.twig +++ b/resources/views/transactions/index.twig @@ -125,10 +125,10 @@ diff --git a/resources/views/transactions/show.twig b/resources/views/transactions/show.twig index 202e5b52b6..48e0394a24 100644 --- a/resources/views/transactions/show.twig +++ b/resources/views/transactions/show.twig @@ -295,12 +295,12 @@ {{ trans('list.'~metaField) }} {% if 'external_url' == metaField %} - {% set uri = journalGetMetaField(journal.transaction_journal_id, metaField) %} - - {% if uri|length > 60 %} - {{ uri|slice(0, 60) ~ '...' }} + {% set url = journalGetMetaField(journal.transaction_journal_id, metaField) %} + + {% if url|length > 60 %} + {{ url|slice(0, 60) ~ '...' }} {% else %} - {{ uri }} + {{ url }} {% endif %} {% endif %} @@ -425,9 +425,9 @@ {% endblock %} {% block scripts %}