mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Excluded more files from the "old" libraries and included new ones instead. This should greatly clean up the code base.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Firefly\Exception\FireflyException;
|
use FireflyIII\Exception\FireflyException;
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Firefly\Exception\FireflyException;
|
use FireflyIII\Exception\FireflyException;
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
use Firefly\Exception\FireflyException;
|
use FireflyIII\Exception\FireflyException;
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Firefly\Exception\FireflyException;
|
use FireflyIII\Exception\FireflyException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class GoogleTableController
|
* Class GoogleTableController
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Firefly\Exception\FireflyException;
|
use FireflyIII\Exception\FireflyException;
|
||||||
use FireflyIII\Exception\NotImplementedException;
|
use FireflyIII\Exception\NotImplementedException;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
|
@@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Firefly\Helper\Preferences\PreferencesHelperInterface as PHI;
|
|
||||||
use Firefly\Storage\Account\AccountRepositoryInterface as ARI;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class PreferencesController
|
* Class PreferencesController
|
||||||
*
|
*
|
||||||
@@ -10,20 +7,14 @@ use Firefly\Storage\Account\AccountRepositoryInterface as ARI;
|
|||||||
*/
|
*/
|
||||||
class PreferencesController extends BaseController
|
class PreferencesController extends BaseController
|
||||||
{
|
{
|
||||||
protected $_accounts;
|
|
||||||
protected $_preferences;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ARI $accounts
|
*
|
||||||
* @param PHI $preferences
|
|
||||||
*/
|
*/
|
||||||
public function __construct(ARI $accounts, PHI $preferences)
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->_accounts = $accounts;
|
View::share('title', 'Preferences');
|
||||||
$this->_preferences = $preferences;
|
View::share('mainTitleIcon', 'fa-gear');
|
||||||
View::share('title','Preferences');
|
|
||||||
View::share('mainTitleIcon','fa-gear');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -31,13 +22,16 @@ class PreferencesController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$accounts = $this->_accounts->getDefault();
|
/** @var \FireflyIII\Database\Account $acct */
|
||||||
|
$acct = App::make('FireflyIII\Database\Account');
|
||||||
|
|
||||||
$viewRange = $this->_preferences->get('viewRange', '1M');
|
/** @var \FireflyIII\Shared\Preferences\Preferences $preferences */
|
||||||
|
$preferences = App::make('FireflyIII\Shared\Preferences\Preferences');
|
||||||
|
|
||||||
|
$accounts = $acct->getAssetAccounts();
|
||||||
|
$viewRange = $preferences->get('viewRange', '1M');
|
||||||
$viewRangeValue = $viewRange->data;
|
$viewRangeValue = $viewRange->data;
|
||||||
|
$frontpage = $preferences->get('frontpageAccounts', []);
|
||||||
// pref:
|
|
||||||
$frontpage = $this->_preferences->get('frontpageAccounts', []);
|
|
||||||
|
|
||||||
return View::make('preferences.index')->with('accounts', $accounts)->with('frontpageAccounts', $frontpage)
|
return View::make('preferences.index')->with('accounts', $accounts)->with('frontpageAccounts', $frontpage)
|
||||||
->with('viewRange', $viewRangeValue);
|
->with('viewRange', $viewRangeValue);
|
||||||
@@ -49,15 +43,18 @@ class PreferencesController extends BaseController
|
|||||||
public function postIndex()
|
public function postIndex()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/** @var \FireflyIII\Shared\Preferences\Preferences $preferences */
|
||||||
|
$preferences = App::make('FireflyIII\Shared\Preferences\Preferences');
|
||||||
|
|
||||||
// frontpage accounts
|
// frontpage accounts
|
||||||
$frontpageAccounts = [];
|
$frontpageAccounts = [];
|
||||||
foreach (Input::get('frontpageAccounts') as $id) {
|
foreach (Input::get('frontpageAccounts') as $id) {
|
||||||
$frontpageAccounts[] = intval($id);
|
$frontpageAccounts[] = intval($id);
|
||||||
}
|
}
|
||||||
$this->_preferences->set('frontpageAccounts', $frontpageAccounts);
|
$preferences->set('frontpageAccounts', $frontpageAccounts);
|
||||||
|
|
||||||
// view range:
|
// view range:
|
||||||
$this->_preferences->set('viewRange', Input::get('viewRange'));
|
$preferences->set('viewRange', Input::get('viewRange'));
|
||||||
// forget session values:
|
// forget session values:
|
||||||
Session::forget('start');
|
Session::forget('start');
|
||||||
Session::forget('end');
|
Session::forget('end');
|
||||||
|
@@ -23,9 +23,9 @@ class ProfileController extends BaseController
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return View::make('profile.index')
|
return View::make('profile.index')
|
||||||
->with('title', 'Profile')
|
->with('title', 'Profile')
|
||||||
->with('subTitle', Auth::user()->email)
|
->with('subTitle', Auth::user()->email)
|
||||||
->with('mainTitleIcon', 'fa-user');
|
->with('mainTitleIcon', 'fa-user');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,9 +34,9 @@ class ProfileController extends BaseController
|
|||||||
public function changePassword()
|
public function changePassword()
|
||||||
{
|
{
|
||||||
return View::make('profile.change-password')
|
return View::make('profile.change-password')
|
||||||
->with('title', Auth::user()->email)
|
->with('title', Auth::user()->email)
|
||||||
->with('subTitle', 'Change your password')
|
->with('subTitle', 'Change your password')
|
||||||
->with('mainTitleIcon', 'fa-user');
|
->with('mainTitleIcon', 'fa-user');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
14
app/lib/FireflyIII/Exception/FireflyException.php
Normal file
14
app/lib/FireflyIII/Exception/FireflyException.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace FireflyIII\Exception;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class FireflyException
|
||||||
|
*
|
||||||
|
* @package Firefly\Exception
|
||||||
|
*/
|
||||||
|
class FireflyException extends \Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
11
app/lib/FireflyIII/Exception/ValidationException.php
Normal file
11
app/lib/FireflyIII/Exception/ValidationException.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
namespace FireflyIII\Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class ValidationException
|
||||||
|
*
|
||||||
|
* @package Firefly\Exception
|
||||||
|
*/
|
||||||
|
class ValidationException extends \Exception {
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user