mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-24 15:26:33 -06:00
Introduce version to template. Rename Javascript URI
This commit is contained in:
parent
6e80b2f4c8
commit
436017baee
@ -61,6 +61,7 @@ class Controller extends BaseController
|
||||
View::share('IS_DEMO_SITE', $isDemoSite);
|
||||
View::share('DEMO_USERNAME', env('DEMO_USERNAME', ''));
|
||||
View::share('DEMO_PASSWORD', env('DEMO_PASSWORD', ''));
|
||||
View::share('FF_VERSION', config('firefly.version'));
|
||||
|
||||
|
||||
$this->middleware(
|
||||
@ -117,7 +118,7 @@ class Controller extends BaseController
|
||||
if (!(strpos($identifier, 'delete') === false) && !(strpos($uri, '/show/') === false)) {
|
||||
$uri = route('index');
|
||||
}
|
||||
if (!(strpos($uri, 'javascript') === false)) {
|
||||
if (!(strpos($uri, 'jscript') === false)) {
|
||||
$uri = route('index');
|
||||
}
|
||||
|
||||
|
@ -1,54 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* StartFireflySession.php
|
||||
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Session\Middleware\StartSession;
|
||||
use Illuminate\Session\SessionManager;
|
||||
|
||||
/**
|
||||
* Class StartFireflySession
|
||||
*
|
||||
* @package FireflyIII\Http\Middleware
|
||||
*/
|
||||
class StartFireflySession extends StartSession
|
||||
{
|
||||
|
||||
/**
|
||||
* Create a new session middleware.
|
||||
*
|
||||
* @param \Illuminate\Session\SessionManager $manager
|
||||
*/
|
||||
public function __construct(SessionManager $manager)
|
||||
{
|
||||
parent::__construct($manager);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the current URL for the request if necessary.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Illuminate\Contracts\Session\Session $session
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function storeCurrentUrl(Request $request, $session)
|
||||
{
|
||||
$fullUrl = $request->fullUrl();
|
||||
if ($request->method() === 'GET' && $request->route() && !$request->ajax()) {
|
||||
if (strpos($fullUrl, '/javascript/') === false) {
|
||||
$session->setPreviousUrl($fullUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -423,7 +423,7 @@ Route::group(
|
||||
* Budget Controller
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'prefix' => 'javascript', 'as' => 'javascript.'], function () {
|
||||
['middleware' => 'user-full-auth', 'prefix' => 'jscript', 'as' => 'javascript.'], function () {
|
||||
Route::get('variables', ['uses' => 'JavascriptController@variables', 'as' => 'variables']);
|
||||
Route::get('accounts', ['uses' => 'JavascriptController@accounts', 'as' => 'accounts']);
|
||||
Route::get('currencies', ['uses' => 'JavascriptController@currencies', 'as' => 'currencies']);
|
||||
|
Loading…
Reference in New Issue
Block a user