mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06: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:
parent
5cb9907bf8
commit
638fa9005f
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Firefly\Exception\FireflyException;
|
||||
use FireflyIII\Exception\FireflyException;
|
||||
use Illuminate\Support\MessageBag;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Firefly\Exception\FireflyException;
|
||||
use FireflyIII\Exception\FireflyException;
|
||||
use Illuminate\Support\MessageBag;
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
use Firefly\Exception\FireflyException;
|
||||
use FireflyIII\Exception\FireflyException;
|
||||
use Illuminate\Support\MessageBag;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
use Carbon\Carbon;
|
||||
use Firefly\Exception\FireflyException;
|
||||
use FireflyIII\Exception\FireflyException;
|
||||
|
||||
/**
|
||||
* Class GoogleTableController
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Firefly\Exception\FireflyException;
|
||||
use FireflyIII\Exception\FireflyException;
|
||||
use FireflyIII\Exception\NotImplementedException;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\MessageBag;
|
||||
|
@ -1,8 +1,5 @@
|
||||
<?php
|
||||
|
||||
use Firefly\Helper\Preferences\PreferencesHelperInterface as PHI;
|
||||
use Firefly\Storage\Account\AccountRepositoryInterface as ARI;
|
||||
|
||||
/**
|
||||
* Class PreferencesController
|
||||
*
|
||||
@ -10,20 +7,14 @@ use Firefly\Storage\Account\AccountRepositoryInterface as ARI;
|
||||
*/
|
||||
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;
|
||||
$this->_preferences = $preferences;
|
||||
View::share('title','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()
|
||||
{
|
||||
$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;
|
||||
|
||||
// pref:
|
||||
$frontpage = $this->_preferences->get('frontpageAccounts', []);
|
||||
$frontpage = $preferences->get('frontpageAccounts', []);
|
||||
|
||||
return View::make('preferences.index')->with('accounts', $accounts)->with('frontpageAccounts', $frontpage)
|
||||
->with('viewRange', $viewRangeValue);
|
||||
@ -49,15 +43,18 @@ class PreferencesController extends BaseController
|
||||
public function postIndex()
|
||||
{
|
||||
|
||||
/** @var \FireflyIII\Shared\Preferences\Preferences $preferences */
|
||||
$preferences = App::make('FireflyIII\Shared\Preferences\Preferences');
|
||||
|
||||
// frontpage accounts
|
||||
$frontpageAccounts = [];
|
||||
foreach (Input::get('frontpageAccounts') as $id) {
|
||||
$frontpageAccounts[] = intval($id);
|
||||
}
|
||||
$this->_preferences->set('frontpageAccounts', $frontpageAccounts);
|
||||
$preferences->set('frontpageAccounts', $frontpageAccounts);
|
||||
|
||||
// view range:
|
||||
$this->_preferences->set('viewRange', Input::get('viewRange'));
|
||||
$preferences->set('viewRange', Input::get('viewRange'));
|
||||
// forget session values:
|
||||
Session::forget('start');
|
||||
Session::forget('end');
|
||||
|
@ -23,9 +23,9 @@ class ProfileController extends BaseController
|
||||
public function index()
|
||||
{
|
||||
return View::make('profile.index')
|
||||
->with('title', 'Profile')
|
||||
->with('subTitle', Auth::user()->email)
|
||||
->with('mainTitleIcon', 'fa-user');
|
||||
->with('title', 'Profile')
|
||||
->with('subTitle', Auth::user()->email)
|
||||
->with('mainTitleIcon', 'fa-user');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -34,9 +34,9 @@ class ProfileController extends BaseController
|
||||
public function changePassword()
|
||||
{
|
||||
return View::make('profile.change-password')
|
||||
->with('title', Auth::user()->email)
|
||||
->with('subTitle', 'Change your password')
|
||||
->with('mainTitleIcon', 'fa-user');
|
||||
->with('title', Auth::user()->email)
|
||||
->with('subTitle', 'Change your password')
|
||||
->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 {
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user