From 6a58dbb207a2635a6fb5f7914089d0a1804890d7 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 16:44:58 +0100 Subject: [PATCH] Generic code cleanup. --- app/Http/Controllers/TagController.php | 29 ++++---------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index 7a790c284a..9ad571c091 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -15,14 +15,12 @@ namespace FireflyIII\Http\Controllers; use FireflyIII\Helpers\Collector\JournalCollector; use FireflyIII\Http\Requests\TagFormRequest; -use FireflyIII\Models\Preference; use FireflyIII\Models\Tag; use FireflyIII\Models\Transaction; use FireflyIII\Repositories\Tag\TagRepositoryInterface; use Illuminate\Support\Collection; use Input; use Preferences; -use Response; use Session; use URL; use View; @@ -170,33 +168,14 @@ class TagController extends Controller return view('tags.edit', compact('tag', 'subTitle', 'subTitleIcon', 'tagOptions')); } - /** - * @param $state - * - * @return \Symfony\Component\HttpFoundation\Response - */ - public function hideTagHelp(string $state) - { - - $newState = $state == 'true' ? true : false; - Preferences::set('hideTagHelp', $newState); - - return Response::json([true]); - } - /** * */ public function index() { - /** @var Preference $helpHiddenPref */ - $helpHiddenPref = Preferences::get('hideTagHelp', false); - $title = 'Tags'; - $mainTitleIcon = 'fa-tags'; - $helpHidden = $helpHiddenPref->data; - - // group years. - $types = ['nothing', 'balancingAct', 'advancePayment']; + $title = 'Tags'; + $mainTitleIcon = 'fa-tags'; + $types = ['nothing', 'balancingAct', 'advancePayment']; // loop each types and get the tags, group them by year. $collection = []; @@ -223,7 +202,7 @@ class TagController extends Controller } } - return view('tags.index', compact('title', 'mainTitleIcon', 'types', 'helpHidden', 'collection')); + return view('tags.index', compact('title', 'mainTitleIcon', 'types', 'collection')); } /**