Rename various methods.

This commit is contained in:
James Cole
2018-08-11 19:21:58 +02:00
parent 95ce72fce7
commit a35c6e29b6
15 changed files with 79 additions and 36 deletions

View File

@@ -346,12 +346,12 @@ trait PeriodOverview
$collector = app(TransactionCollectorInterface::class);
$collector->setAllAssetAccounts()->setRange($currentDate['start'], $currentDate['end'])->withOpposingAccount()->setTypes($types);
$collector->removeFilter(InternalTransferFilter::class);
$journals = $collector->getTransactions();
$transactions = $collector->getTransactions();
if ($journals->count() > 0) {
$sums = $this->sumPerCurrency($journals);
if ($transactions->count() > 0) {
$sums = $this->sumPerCurrency($transactions);
$dateName = app('navigation')->periodShow($currentDate['start'], $currentDate['period']);
$sum = $journals->sum('transaction_amount');
$sum = $transactions->sum('transaction_amount');
/** @noinspection PhpUndefinedMethodInspection */
$entries->push(
[

View File

@@ -148,8 +148,8 @@ trait RequestInformation
}
// get help content from Github:
$content = $help->getFromGitHub($route, $language);
$content = $help->getFromGitHub($route, $language);
$originalLanguage = $language;
// content will have 0 length when Github failed. Try en_US when it does:
if ('' === $content) {
$language = 'en_US';
@@ -161,8 +161,11 @@ trait RequestInformation
return $content;
}
$content = $help->getFromGitHub($route, $language);
$baseHref = route('index');
$helpString = sprintf(
'<p><em><img src="%s/images/flags/%s.png" /> %s</em></p>', $baseHref, $originalLanguage, (string)trans('firefly.help_translating')
);
$content = $helpString . $help->getFromGitHub($route, $language);
}
// help still empty?