1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Bug fixes for import page

This commit is contained in:
Hillel Coren 2016-09-25 21:13:14 +03:00
parent b624bb13c3
commit 0d3be448df
3 changed files with 10 additions and 1 deletions

View File

@ -31,6 +31,11 @@ class ImportController extends BaseController
}
}
if ( ! count($files)) {
Session::flash('error', trans('texts.select_file'));
return Redirect::to('/settings/' . ACCOUNT_IMPORT_EXPORT);
}
try {
if ($source === IMPORT_CSV) {
$data = $this->importService->mapCSV($files);

View File

@ -23,6 +23,7 @@ class QueryLogging
// Enable query logging for development
if (Utils::isNinjaDev()) {
DB::enableQueryLog();
$timeStart = microtime(true);
}
$response = $next($request);
@ -32,7 +33,9 @@ class QueryLogging
if (strstr($request->url(), '_debugbar') === false) {
$queries = DB::getQueryLog();
$count = count($queries);
Log::info($request->method() . ' - ' . $request->url() . ": $count queries");
$timeEnd = microtime(true);
$time = $timeEnd - $timeStart;
Log::info($request->method() . ' - ' . $request->url() . ": $count queries - " . $time);
//Log::info($queries);
}
}

View File

@ -92,6 +92,7 @@
<script type="text/javascript">
$(function() {
setFileTypesVisible();
setCheckboxesEnabled();
});