Smaller travis file. Try to fix the search.

This commit is contained in:
James Cole 2016-02-05 19:12:54 +01:00
parent 1ee72a6ce5
commit b90c7c09b6
3 changed files with 15 additions and 16 deletions

View File

@ -7,8 +7,6 @@ php:
install: install:
- composer selfupdate - composer selfupdate
- composer --version
- composer install --no-dev
- composer update - composer update
- php artisan env - php artisan env
- mv -v .env.testing .env - mv -v .env.testing .env

View File

@ -29,25 +29,25 @@ class SearchController extends Controller
{ {
$subTitle = null; $subTitle = null;
$rawQuery = null; $query = null;
$result = []; $result = [];
$title = trans('firefly.search');
$mainTitleIcon = 'fa-search';
if (!is_null(Input::get('q')) && strlen(Input::get('q')) > 0) { if (!is_null(Input::get('q')) && strlen(Input::get('q')) > 0) {
$rawQuery = trim(Input::get('q')); $query = trim(Input::get('q'));
$words = explode(' ', $rawQuery); $words = explode(' ', $query);
$subTitle = trans('firefly.search_results_for', ['query' => $rawQuery]); $subTitle = trans('firefly.search_results_for', ['query' => $query]);
$transactions = $searcher->searchTransactions($words); $transactions = [];//$searcher->searchTransactions($words);
$accounts = $searcher->searchAccounts($words); $accounts = [];//$searcher->searchAccounts($words);
$categories = $searcher->searchCategories($words); $categories = [];//$searcher->searchCategories($words);
$budgets = $searcher->searchBudgets($words); $budgets = [];//$searcher->searchBudgets($words);
$tags = $searcher->searchTags($words); $tags = [];//$searcher->searchTags($words);
$result = ['transactions' => $transactions, 'accounts' => $accounts, 'categories' => $categories, 'budgets' => $budgets, 'tags' => $tags]; $result = ['transactions' => $transactions, 'accounts' => $accounts, 'categories' => $categories, 'budgets' => $budgets, 'tags' => $tags];
} }
return view('search.index')->with('title', 'Search')->with('subTitle', $subTitle)->with( return view('search.index', compact('title', 'subTitle', 'mainTitleIcon', 'query', 'result'));
'mainTitleIcon', 'fa-search'
)->with('query', $rawQuery)->with('result', $result);
} }
} }

View File

@ -21,6 +21,7 @@ return [
'showEverything' => 'Show everything', 'showEverything' => 'Show everything',
'never' => 'Never', 'never' => 'Never',
'search_results_for' => 'Search results for ":query"', 'search_results_for' => 'Search results for ":query"',
'search' => 'Search',
'bounced_error' => 'The message sent to :email bounced, so no access for you.', 'bounced_error' => 'The message sent to :email bounced, so no access for you.',
'deleted_error' => 'These credentials do not match our records.', 'deleted_error' => 'These credentials do not match our records.',
'general_blocked_error' => 'Your account has been disabled, so you cannot login.', 'general_blocked_error' => 'Your account has been disabled, so you cannot login.',