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:
- composer selfupdate
- composer --version
- composer install --no-dev
- composer update
- php artisan env
- mv -v .env.testing .env

View File

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

View File

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