mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-16 17:57:29 +00:00
Compare commits
72 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
87c8b3d7c6 | ||
|
fd571abbb0 | ||
|
64ae56757e | ||
|
7d75f00696 | ||
|
451c86e431 | ||
|
c8c71da903 | ||
|
423f3a9296 | ||
|
7658b7d9a6 | ||
|
0d0906c5e2 | ||
|
e0aa7f3ff5 | ||
|
59fdf5b77a | ||
|
e28cfade8d | ||
|
19710c3eab | ||
|
0782354160 | ||
|
22bc6d507e | ||
|
bf3c74e65f | ||
|
71fb9d8fa5 | ||
|
9a461fc7b7 | ||
|
e0d87aa11e | ||
|
b273af341c | ||
|
2117fc2a5a | ||
|
58e55dc789 | ||
|
ac9b8b8c30 | ||
|
4dcc66238e | ||
|
90c0aa6360 | ||
|
1594335487 | ||
|
2517674849 | ||
|
c00bc2a1f3 | ||
|
f999be81c2 | ||
|
e2530c5486 | ||
|
7526f13ca9 | ||
|
ed08d299de | ||
|
b6ea2f1c64 | ||
|
9ee14374bb | ||
|
925401682b | ||
|
53c71bb7a2 | ||
|
3c036ae021 | ||
|
bf89d9956d | ||
|
71104f375c | ||
|
4c94820cf4 | ||
|
8998c9a672 | ||
|
ccf60f4cdc | ||
|
c5af1d363c | ||
|
c6e3b54705 | ||
|
4f274a290e | ||
|
1774bcbabe | ||
|
492c11784b | ||
|
21ddbd220a | ||
|
e4a95e55ed | ||
|
3a0eb5a428 | ||
|
e55fd968cf | ||
|
d41be08b48 | ||
|
a18272513d | ||
|
e88061199c | ||
|
d0d7c437f2 | ||
|
a1ac1a4a29 | ||
|
41d22876c4 | ||
|
e1bb0298cb | ||
|
1ec2772255 | ||
|
40d77d82cd | ||
|
311d51464d | ||
|
d63c9c9aea | ||
|
f1e83f240e | ||
|
b0f847959f | ||
|
d3d4439b03 | ||
|
0e1da3f797 | ||
|
def95df49e | ||
|
73c8c6de37 | ||
|
25b2b43a38 | ||
|
1fc2c998de | ||
|
b7a577cc4c | ||
|
2cdedd9c29 |
@@ -3,16 +3,20 @@
|
||||
# build image
|
||||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||
|
||||
|
||||
|
||||
if [ "$TRAVIS_BRANCH" == "develop" ]; then
|
||||
echo "Build develop amd64"
|
||||
docker build -t jc5x/firefly-iii:develop-amd -f Dockerfile .
|
||||
docker push jc5x/firefly-iii:develop-amd
|
||||
docker build -t jc5x/firefly-iii:develop-amd64 -f Dockerfile.amd64 .
|
||||
docker tag jc5x/firefly-iii:develop-amd64 jc5x/firefly-iii:develop-$VERSION-amd64
|
||||
docker push jc5x/firefly-iii:develop-amd64
|
||||
docker push jc5x/firefly-iii:develop-$VERSION-amd64
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS_BRANCH" == "master" ]; then
|
||||
echo "Build master amd64"
|
||||
docker build -t jc5x/firefly-iii:latest-amd -f Dockerfile .
|
||||
docker tag jc5x/firefly-iii:latest-amd jc5x/firefly-iii:release-$VERSION-amd
|
||||
docker push jc5x/firefly-iii:latest-amd
|
||||
docker push jc5x/firefly-iii:release-$VERSION-amd
|
||||
docker build -t jc5x/firefly-iii:latest-amd64 -f Dockerfile.amd64 .
|
||||
docker tag jc5x/firefly-iii:latest-amd64 jc5x/firefly-iii:release-$VERSION-amd64
|
||||
docker push jc5x/firefly-iii:latest-amd64
|
||||
docker push jc5x/firefly-iii:release-$VERSION-amd64
|
||||
fi
|
@@ -15,13 +15,15 @@ echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||
|
||||
if [ "$TRAVIS_BRANCH" == "develop" ]; then
|
||||
echo "Build develop arm"
|
||||
docker build --tag jc5x/firefly-iii:develop-arm --file Dockerfile-ARM .
|
||||
docker build --tag jc5x/firefly-iii:develop-arm --file Dockerfile.arm .
|
||||
docker tag jc5x/firefly-iii:develop-arm jc5x/firefly-iii:develop-$VERSION-arm
|
||||
docker push jc5x/firefly-iii:develop-arm
|
||||
docker push jc5x/firefly-iii:develop-$VERSION-arm
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS_BRANCH" == "master" ]; then
|
||||
echo "Build master arm"
|
||||
docker build --tag jc5x/firefly-iii:latest-arm --file Dockerfile-ARM .
|
||||
docker build --tag jc5x/firefly-iii:latest-arm --file Dockerfile.arm .
|
||||
docker tag jc5x/firefly-iii:latest-arm jc5x/firefly-iii:release-$VERSION-arm
|
||||
docker push jc5x/firefly-iii:latest-arm
|
||||
docker push jc5x/firefly-iii:release-$VERSION-arm
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
echo "Now in entrypoint.sh for Firefly III"
|
||||
|
||||
lscpu
|
||||
|
||||
# make sure the correct directories exists (suggested by @chrif):
|
||||
echo "Making directories..."
|
||||
mkdir -p $FIREFLY_PATH/storage/app/public
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$TRAVIS_BRANCH" == "develop" ]; then
|
||||
TARGET=jc5x/firefly-iii:develop
|
||||
ARM=jc5x/firefly-iii:develop-arm
|
||||
AMD=jc5x/firefly-iii:develop-amd
|
||||
AMD=jc5x/firefly-iii:develop-amd64
|
||||
|
||||
docker manifest create $TARGET $AMD $ARM
|
||||
docker manifest annotate $TARGET $ARM --arch arm --os linux
|
||||
@@ -15,7 +16,7 @@ echo "The version is $VERSION"
|
||||
if [ "$TRAVIS_BRANCH" == "master" ]; then
|
||||
TARGET=jc5x/firefly-iii:latest
|
||||
ARM=jc5x/firefly-iii:latest-arm
|
||||
AMD=jc5x/firefly-iii:latest-amd
|
||||
AMD=jc5x/firefly-iii:latest-amd64
|
||||
|
||||
docker manifest create $TARGET $AMD $ARM
|
||||
docker manifest annotate $TARGET $ARM --arch arm --os linux
|
||||
@@ -25,7 +26,7 @@ if [ "$TRAVIS_BRANCH" == "master" ]; then
|
||||
# and another one for version specific:
|
||||
TARGET=jc5x/firefly-iii:release-$VERSION
|
||||
ARM=jc5x/firefly-iii:release-$VERSION-arm
|
||||
AMD=jc5x/firefly-iii:release-$VERSION-amd
|
||||
AMD=jc5x/firefly-iii:release-$VERSION-amd64
|
||||
|
||||
docker manifest create $TARGET $AMD $ARM
|
||||
docker manifest annotate $TARGET $ARM --arch arm --os linux
|
||||
|
@@ -112,7 +112,7 @@ ANALYTICS_ID=${ANALYTICS_ID}
|
||||
USE_ENCRYPTION=true
|
||||
|
||||
# Firefly III has two options for user authentication. "eloquent" is the default,
|
||||
# and "adldap" for LDAP servers.
|
||||
# and "ldap" for LDAP servers.
|
||||
# For full instructions on these settings please visit:
|
||||
# https://firefly-iii.readthedocs.io/en/latest/installation/authentication.html
|
||||
LOGIN_PROVIDER=${LOGIN_PROVIDER}
|
||||
@@ -135,8 +135,6 @@ ADLDAP_ADMIN_PASSWORD="${ADLDAP_ADMIN_PASSWORD}"
|
||||
|
||||
ADLDAP_ACCOUNT_PREFIX="${ADLDAP_ACCOUNT_PREFIX}"
|
||||
ADLDAP_ACCOUNT_SUFFIX="${ADLDAP_ACCOUNT_SUFFIX}"
|
||||
ADLDAP_ADMIN_ACCOUNT_PREFIX="${ADLDAP_ADMIN_ACCOUNT_PREFIX}"
|
||||
ADLDAP_ADMIN_ACCOUNT_SUFFIX="${ADLDAP_ADMIN_ACCOUNT_SUFFIX}"
|
||||
|
||||
# LDAP authentication settings.
|
||||
ADLDAP_PASSWORD_SYNC=${ADLDAP_PASSWORD_SYNC}
|
||||
|
@@ -112,7 +112,7 @@ ANALYTICS_ID=
|
||||
USE_ENCRYPTION=true
|
||||
|
||||
# Firefly III has two options for user authentication. "eloquent" is the default,
|
||||
# and "adldap" for LDAP servers.
|
||||
# and "ldap" for LDAP servers.
|
||||
# For full instructions on these settings please visit:
|
||||
# https://firefly-iii.readthedocs.io/en/latest/installation/authentication.html
|
||||
LOGIN_PROVIDER=eloquent
|
||||
@@ -136,8 +136,6 @@ ADLDAP_ADMIN_PASSWORD=
|
||||
|
||||
ADLDAP_ACCOUNT_PREFIX=
|
||||
ADLDAP_ACCOUNT_SUFFIX=
|
||||
ADLDAP_ADMIN_ACCOUNT_PREFIX=
|
||||
ADLDAP_ADMIN_ACCOUNT_SUFFIX=
|
||||
|
||||
# LDAP authentication settings.
|
||||
ADLDAP_PASSWORD_SYNC=false
|
||||
|
@@ -112,7 +112,7 @@ ANALYTICS_ID=
|
||||
USE_ENCRYPTION=true
|
||||
|
||||
# Firefly III has two options for user authentication. "eloquent" is the default,
|
||||
# and "adldap" for LDAP servers.
|
||||
# and "ldap" for LDAP servers.
|
||||
# For full instructions on these settings please visit:
|
||||
# https://firefly-iii.readthedocs.io/en/latest/installation/authentication.html
|
||||
LOGIN_PROVIDER=eloquent
|
||||
@@ -136,8 +136,6 @@ ADLDAP_ADMIN_PASSWORD=
|
||||
|
||||
ADLDAP_ACCOUNT_PREFIX=
|
||||
ADLDAP_ACCOUNT_SUFFIX=
|
||||
ADLDAP_ADMIN_ACCOUNT_PREFIX=
|
||||
ADLDAP_ADMIN_ACCOUNT_SUFFIX=
|
||||
|
||||
# LDAP authentication settings.
|
||||
ADLDAP_PASSWORD_SYNC=false
|
||||
|
@@ -112,7 +112,7 @@ ANALYTICS_ID=
|
||||
USE_ENCRYPTION=true
|
||||
|
||||
# Firefly III has two options for user authentication. "eloquent" is the default,
|
||||
# and "adldap" for LDAP servers.
|
||||
# and "ldap" for LDAP servers.
|
||||
# For full instructions on these settings please visit:
|
||||
# https://firefly-iii.readthedocs.io/en/latest/installation/authentication.html
|
||||
LOGIN_PROVIDER=eloquent
|
||||
@@ -136,8 +136,6 @@ ADLDAP_ADMIN_PASSWORD=
|
||||
|
||||
ADLDAP_ACCOUNT_PREFIX=
|
||||
ADLDAP_ACCOUNT_SUFFIX=
|
||||
ADLDAP_ADMIN_ACCOUNT_PREFIX=
|
||||
ADLDAP_ADMIN_ACCOUNT_SUFFIX=
|
||||
|
||||
# LDAP authentication settings.
|
||||
ADLDAP_PASSWORD_SYNC=false
|
||||
|
@@ -112,7 +112,7 @@ ANALYTICS_ID=
|
||||
USE_ENCRYPTION=false
|
||||
|
||||
# Firefly III has two options for user authentication. "eloquent" is the default,
|
||||
# and "adldap" for LDAP servers.
|
||||
# and "ldap" for LDAP servers.
|
||||
# For full instructions on these settings please visit:
|
||||
# https://firefly-iii.readthedocs.io/en/latest/installation/authentication.html
|
||||
LOGIN_PROVIDER=eloquent
|
||||
@@ -136,8 +136,6 @@ ADLDAP_ADMIN_PASSWORD=
|
||||
|
||||
ADLDAP_ACCOUNT_PREFIX=
|
||||
ADLDAP_ACCOUNT_SUFFIX=
|
||||
ADLDAP_ADMIN_ACCOUNT_PREFIX=
|
||||
ADLDAP_ADMIN_ACCOUNT_SUFFIX=
|
||||
|
||||
# LDAP authentication settings.
|
||||
ADLDAP_PASSWORD_SYNC=false
|
||||
|
@@ -1,3 +1,24 @@
|
||||
# 4.7.12
|
||||
- 4.7.12 was released to fix several shortcomings in v4.7.11's Docker image. Those in turn were caused by me. My apologies.
|
||||
- [Issue 2085](https://github.com/firefly-iii/firefly-iii/issues/2085) Upgraded the LDAP code. To keep using LDAP, set the `LOGIN_PROVIDER` to `ldap`.
|
||||
- [Issue 2061](https://github.com/firefly-iii/firefly-iii/issues/2061) Some users reported empty update popups.
|
||||
- [Issue 2070](https://github.com/firefly-iii/firefly-iii/issues/2070) A cache issue prevented rules from being applied correctly.
|
||||
- [Issue 2071](https://github.com/firefly-iii/firefly-iii/issues/2071) Several issues with Postgres and date values with time zone information in them.
|
||||
- [Issue 2081](https://github.com/firefly-iii/firefly-iii/issues/2081) Rules were not being applied when importing using FinTS.
|
||||
- [Issue 2082](https://github.com/firefly-iii/firefly-iii/issues/2082) The mass-editor changed all dates to today.
|
||||
|
||||
# 4.7.11
|
||||
- Experimental audit logging channel to track important events (separate from debug logging).
|
||||
- [Issue 2003](https://github.com/firefly-iii/firefly-iii/issues/2003), [issue 2006](https://github.com/firefly-iii/firefly-iii/issues/2006) Transactions can be stored with a timestamp. The user-interface does not support this yet. But the API does.
|
||||
- Docker image tags a new manifest for arm and amd64.
|
||||
- [skuzzle](https://github.com/skuzzle) removed an annoying console.log statement.
|
||||
- [Issue 2048](https://github.com/firefly-iii/firefly-iii/issues/2048) Fix "Are you sure?" popup, thanks to @nescafe2002!
|
||||
- [Issue 2049](https://github.com/firefly-iii/firefly-iii/issues/2049) Empty preferences would crash Firefly III.
|
||||
- [Issue 2052](https://github.com/firefly-iii/firefly-iii/issues/2052) Rules could not auto-covert to liabilities.
|
||||
- Webbased upgrade routine will also decrypt the database.
|
||||
- Last use date for categories was off.
|
||||
- The `date`-field in any transaction object now returns a ISO 8601 timestamp instead of a date.
|
||||
|
||||
# 4.7.10
|
||||
- [Issue 2037](https://github.com/firefly-iii/firefly-iii/issues/2037) Added some new magic keywords to reports.
|
||||
- Added a new currency exchange rate service, [ratesapi.io](https://ratesapi.io/), that does not require expensive API keys. Built by [@BoGnY](https://github.com/BoGnY).
|
||||
|
@@ -163,6 +163,8 @@ lib/x86_64-linux-gnu/libattr.so.1
|
||||
lib/x86_64-linux-gnu/libattr.so.1.1.0
|
||||
lib/x86_64-linux-gnu/libbsd.so.0
|
||||
lib/x86_64-linux-gnu/libbsd.so.0.7.0
|
||||
lib/x86_64-linux-gnu/libbz2.so.1.0
|
||||
lib/x86_64-linux-gnu/libbz2.so.1.0.4
|
||||
lib/x86_64-linux-gnu/libc-2.19.so
|
||||
lib/x86_64-linux-gnu/libc.so.6
|
||||
lib/x86_64-linux-gnu/libcom_err.so.2
|
||||
@@ -220,8 +222,6 @@ lib/x86_64-linux-gnu/libwrap.so.0.7.6
|
||||
lib/x86_64-linux-gnu/libz.so.1
|
||||
lib/x86_64-linux-gnu/libz.so.1.2.8
|
||||
lib64/ld-linux-x86-64.so.2
|
||||
opt
|
||||
opt/app
|
||||
opt/app/.env
|
||||
opt/app/.env.docker
|
||||
opt/app/.env.example
|
||||
@@ -240,6 +240,7 @@ opt/app/.sandstorm/.vagrant/machines/default/virtualbox/index_uuid
|
||||
opt/app/.sandstorm/.vagrant/machines/default/virtualbox/private_key
|
||||
opt/app/.sandstorm/.vagrant/machines/default/virtualbox/synced_folders
|
||||
opt/app/.sandstorm/.vagrant/machines/default/virtualbox/vagrant_cwd
|
||||
opt/app/.sandstorm/.vagrant/rgloader/loader.rb
|
||||
opt/app/.sandstorm/Vagrantfile
|
||||
opt/app/.sandstorm/app-graphics/firefly-iii-128.png
|
||||
opt/app/.sandstorm/app-graphics/firefly-iii-150.png
|
||||
@@ -261,6 +262,9 @@ opt/app/.sandstorm/service-config/mime.types
|
||||
opt/app/.sandstorm/service-config/nginx.conf
|
||||
opt/app/.sandstorm/setup.sh
|
||||
opt/app/.sandstorm/stack
|
||||
opt/app/Dockerfile.amd64
|
||||
opt/app/Dockerfile.arm
|
||||
opt/app/Dockerfile.arm64
|
||||
opt/app/LICENSE
|
||||
opt/app/app.json
|
||||
opt/app/app/Api/V1/Controllers/AboutController.php
|
||||
@@ -271,6 +275,9 @@ opt/app/app/Api/V1/Controllers/BillController.php
|
||||
opt/app/app/Api/V1/Controllers/BudgetController.php
|
||||
opt/app/app/Api/V1/Controllers/BudgetLimitController.php
|
||||
opt/app/app/Api/V1/Controllers/CategoryController.php
|
||||
opt/app/app/Api/V1/Controllers/Chart/AccountController.php
|
||||
opt/app/app/Api/V1/Controllers/Chart/AvailableBudgetController.php
|
||||
opt/app/app/Api/V1/Controllers/Chart/CategoryController.php
|
||||
opt/app/app/Api/V1/Controllers/ConfigurationController.php
|
||||
opt/app/app/Api/V1/Controllers/Controller.php
|
||||
opt/app/app/Api/V1/Controllers/CurrencyController.php
|
||||
@@ -282,6 +289,7 @@ opt/app/app/Api/V1/Controllers/PreferenceController.php
|
||||
opt/app/app/Api/V1/Controllers/RecurrenceController.php
|
||||
opt/app/app/Api/V1/Controllers/RuleController.php
|
||||
opt/app/app/Api/V1/Controllers/RuleGroupController.php
|
||||
opt/app/app/Api/V1/Controllers/SummaryController.php
|
||||
opt/app/app/Api/V1/Controllers/TagController.php
|
||||
opt/app/app/Api/V1/Controllers/TransactionController.php
|
||||
opt/app/app/Api/V1/Controllers/TransactionLinkController.php
|
||||
@@ -312,12 +320,12 @@ opt/app/app/Console/Commands/CreateExport.php
|
||||
opt/app/app/Console/Commands/CreateImport.php
|
||||
opt/app/app/Console/Commands/Cron.php
|
||||
opt/app/app/Console/Commands/DecryptAttachment.php
|
||||
opt/app/app/Console/Commands/DecryptDatabase.php
|
||||
opt/app/app/Console/Commands/EncryptFile.php
|
||||
opt/app/app/Console/Commands/Import.php
|
||||
opt/app/app/Console/Commands/ScanAttachments.php
|
||||
opt/app/app/Console/Commands/UpgradeDatabase.php
|
||||
opt/app/app/Console/Commands/UpgradeFireflyInstructions.php
|
||||
opt/app/app/Console/Commands/UseEncryption.php
|
||||
opt/app/app/Console/Commands/VerifiesAccessToken.php
|
||||
opt/app/app/Console/Commands/VerifyDatabase.php
|
||||
opt/app/app/Console/Kernel.php
|
||||
@@ -575,9 +583,8 @@ opt/app/app/Import/Converter/Amount.php
|
||||
opt/app/app/Import/Converter/AmountCredit.php
|
||||
opt/app/app/Import/Converter/AmountDebit.php
|
||||
opt/app/app/Import/Converter/AmountNegated.php
|
||||
opt/app/app/Import/Converter/BankDebitCredit.php
|
||||
opt/app/app/Import/Converter/ConverterInterface.php
|
||||
opt/app/app/Import/Converter/INGDebitCredit.php
|
||||
opt/app/app/Import/Converter/RabobankDebitCredit.php
|
||||
opt/app/app/Import/JobConfiguration/BunqJobConfiguration.php
|
||||
opt/app/app/Import/JobConfiguration/FakeJobConfiguration.php
|
||||
opt/app/app/Import/JobConfiguration/FileJobConfiguration.php
|
||||
@@ -664,6 +671,7 @@ opt/app/app/Models/RuleTrigger.php
|
||||
opt/app/app/Models/Tag.php
|
||||
opt/app/app/Models/Transaction.php
|
||||
opt/app/app/Models/TransactionCurrency.php
|
||||
opt/app/app/Models/TransactionGroup.php
|
||||
opt/app/app/Models/TransactionJournal.php
|
||||
opt/app/app/Models/TransactionJournalLink.php
|
||||
opt/app/app/Models/TransactionJournalMeta.php
|
||||
@@ -728,6 +736,7 @@ opt/app/app/Repositories/User/UserRepositoryInterface.php
|
||||
opt/app/app/Rules/BelongsUser.php
|
||||
opt/app/app/Rules/IsAssetAccountId.php
|
||||
opt/app/app/Rules/IsBoolean.php
|
||||
opt/app/app/Rules/IsDateOrTime.php
|
||||
opt/app/app/Rules/IsValidAttachmentModel.php
|
||||
opt/app/app/Rules/UniqueIban.php
|
||||
opt/app/app/Rules/ValidRecurrenceRepetitionType.php
|
||||
@@ -739,6 +748,7 @@ opt/app/app/Services/Bunq/MonetaryAccount.php
|
||||
opt/app/app/Services/Bunq/Payment.php
|
||||
opt/app/app/Services/Currency/ExchangeRateInterface.php
|
||||
opt/app/app/Services/Currency/FixerIOv2.php
|
||||
opt/app/app/Services/Currency/RatesApiIOv1.php
|
||||
opt/app/app/Services/Github/Object/GithubObject.php
|
||||
opt/app/app/Services/Github/Object/Release.php
|
||||
opt/app/app/Services/Github/Request/GithubRequest.php
|
||||
@@ -747,6 +757,7 @@ opt/app/app/Services/IP/IPRetrievalInterface.php
|
||||
opt/app/app/Services/IP/IpifyOrg.php
|
||||
opt/app/app/Services/Internal/Destroy/AccountDestroyService.php
|
||||
opt/app/app/Services/Internal/Destroy/BillDestroyService.php
|
||||
opt/app/app/Services/Internal/Destroy/BudgetDestroyService.php
|
||||
opt/app/app/Services/Internal/Destroy/CategoryDestroyService.php
|
||||
opt/app/app/Services/Internal/Destroy/CurrencyDestroyService.php
|
||||
opt/app/app/Services/Internal/Destroy/JournalDestroyService.php
|
||||
@@ -823,8 +834,11 @@ opt/app/app/Support/FireflyConfig.php
|
||||
opt/app/app/Support/Http/Api/AccountFilter.php
|
||||
opt/app/app/Support/Http/Api/TransactionFilter.php
|
||||
opt/app/app/Support/Http/Controllers/AugumentData.php
|
||||
opt/app/app/Support/Http/Controllers/AutoCompleteCollector.php
|
||||
opt/app/app/Support/Http/Controllers/BasicDataSupport.php
|
||||
opt/app/app/Support/Http/Controllers/ChartGeneration.php
|
||||
opt/app/app/Support/Http/Controllers/CreateStuff.php
|
||||
opt/app/app/Support/Http/Controllers/CronRunner.php
|
||||
opt/app/app/Support/Http/Controllers/DateCalculation.php
|
||||
opt/app/app/Support/Http/Controllers/GetConfigurationData.php
|
||||
opt/app/app/Support/Http/Controllers/ModelInformation.php
|
||||
@@ -886,8 +900,13 @@ opt/app/app/Support/Import/Routine/Ynab/StageGetAccessHandler.php
|
||||
opt/app/app/Support/Import/Routine/Ynab/StageGetBudgetsHandler.php
|
||||
opt/app/app/Support/Import/Routine/Ynab/StageGetTransactionsHandler.php
|
||||
opt/app/app/Support/Import/Routine/Ynab/StageMatchAccountsHandler.php
|
||||
opt/app/app/Support/Logging/AuditLogger.php
|
||||
opt/app/app/Support/Logging/AuditProcessor.php
|
||||
opt/app/app/Support/Navigation.php
|
||||
opt/app/app/Support/Preferences.php
|
||||
opt/app/app/Support/Repositories/Recurring/CalculateRangeOccurrences.php
|
||||
opt/app/app/Support/Repositories/Recurring/CalculateXOccurrences.php
|
||||
opt/app/app/Support/Repositories/Recurring/FiltersWeekends.php
|
||||
opt/app/app/Support/Search/Modifier.php
|
||||
opt/app/app/Support/Search/Search.php
|
||||
opt/app/app/Support/Search/SearchInterface.php
|
||||
@@ -1052,6 +1071,8 @@ opt/app/database/migrations/2018_04_29_174524_changes_for_v474.php
|
||||
opt/app/database/migrations/2018_06_08_200526_changes_for_v475.php
|
||||
opt/app/database/migrations/2018_09_05_195147_changes_for_v477.php
|
||||
opt/app/database/migrations/2018_11_06_172532_changes_for_v479.php
|
||||
opt/app/database/migrations/2019_01_28_193833_changes_for_v4710.php
|
||||
opt/app/database/migrations/2019_02_05_055516_changes_for_v4711.php
|
||||
opt/app/database/seeds/AccountTypeSeeder.php
|
||||
opt/app/database/seeds/ConfigSeeder.php
|
||||
opt/app/database/seeds/DatabaseSeeder.php
|
||||
@@ -1061,7 +1082,6 @@ opt/app/database/seeds/TransactionCurrencySeeder.php
|
||||
opt/app/database/seeds/TransactionTypeSeeder.php
|
||||
opt/app/docker-compose.yml
|
||||
opt/app/index.php
|
||||
opt/app/package-lock.json
|
||||
opt/app/public/.htaccess
|
||||
opt/app/public/.well-known/security.txt
|
||||
opt/app/public/android-chrome-192x192.png
|
||||
@@ -1093,6 +1113,7 @@ opt/app/public/mstile-70x70.png
|
||||
opt/app/public/robots.txt
|
||||
opt/app/public/safari-pinned-tab.svg
|
||||
opt/app/public/site.webmanifest
|
||||
opt/app/public/undefined.js
|
||||
opt/app/public/v1/css/.htaccess
|
||||
opt/app/public/v1/css/bootstrap-multiselect.css
|
||||
opt/app/public/v1/css/bootstrap-sortable.css
|
||||
@@ -2054,9 +2075,6 @@ opt/app/resources/assets/js/components/passport/Clients.vue
|
||||
opt/app/resources/assets/js/components/passport/PersonalAccessTokens.vue
|
||||
opt/app/resources/assets/sass/_variables.scss
|
||||
opt/app/resources/assets/sass/app.scss
|
||||
opt/app/resources/js/app.js
|
||||
opt/app/resources/js/bootstrap.js
|
||||
opt/app/resources/js/components/Example.js
|
||||
opt/app/resources/lang/de_DE/auth.php
|
||||
opt/app/resources/lang/de_DE/bank.php
|
||||
opt/app/resources/lang/de_DE/breadcrumbs.php
|
||||
@@ -2226,6 +2244,21 @@ opt/app/resources/lang/tr_TR/list.php
|
||||
opt/app/resources/lang/tr_TR/pagination.php
|
||||
opt/app/resources/lang/tr_TR/passwords.php
|
||||
opt/app/resources/lang/tr_TR/validation.php
|
||||
opt/app/resources/lang/zh_CN/auth.php
|
||||
opt/app/resources/lang/zh_CN/bank.php
|
||||
opt/app/resources/lang/zh_CN/breadcrumbs.php
|
||||
opt/app/resources/lang/zh_CN/components.php
|
||||
opt/app/resources/lang/zh_CN/config.php
|
||||
opt/app/resources/lang/zh_CN/csv.php
|
||||
opt/app/resources/lang/zh_CN/demo.php
|
||||
opt/app/resources/lang/zh_CN/firefly.php
|
||||
opt/app/resources/lang/zh_CN/form.php
|
||||
opt/app/resources/lang/zh_CN/import.php
|
||||
opt/app/resources/lang/zh_CN/intro.php
|
||||
opt/app/resources/lang/zh_CN/list.php
|
||||
opt/app/resources/lang/zh_CN/pagination.php
|
||||
opt/app/resources/lang/zh_CN/passwords.php
|
||||
opt/app/resources/lang/zh_CN/validation.php
|
||||
opt/app/resources/lang/zh_TW/auth.php
|
||||
opt/app/resources/lang/zh_TW/bank.php
|
||||
opt/app/resources/lang/zh_TW/breadcrumbs.php
|
||||
@@ -2241,8 +2274,6 @@ opt/app/resources/lang/zh_TW/list.php
|
||||
opt/app/resources/lang/zh_TW/pagination.php
|
||||
opt/app/resources/lang/zh_TW/passwords.php
|
||||
opt/app/resources/lang/zh_TW/validation.php
|
||||
opt/app/resources/sass/_variables.scss
|
||||
opt/app/resources/sass/app.scss
|
||||
opt/app/resources/stubs/binary.bin
|
||||
opt/app/resources/stubs/csv.csv
|
||||
opt/app/resources/stubs/demo-configuration.json
|
||||
@@ -4023,6 +4054,7 @@ opt/app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/Hides
|
||||
opt/app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php
|
||||
opt/app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php
|
||||
opt/app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php
|
||||
opt/app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php
|
||||
opt/app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php
|
||||
opt/app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php
|
||||
opt/app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php
|
||||
@@ -4746,9 +4778,11 @@ opt/app/vendor/laravel/passport/src/Http/Controllers/RetrievesAuthRequestFromSes
|
||||
opt/app/vendor/laravel/passport/src/Http/Controllers/ScopeController.php
|
||||
opt/app/vendor/laravel/passport/src/Http/Controllers/TransientTokenController.php
|
||||
opt/app/vendor/laravel/passport/src/Http/Middleware/CheckClientCredentials.php
|
||||
opt/app/vendor/laravel/passport/src/Http/Middleware/CheckClientCredentialsForAnyScope.php
|
||||
opt/app/vendor/laravel/passport/src/Http/Middleware/CheckForAnyScope.php
|
||||
opt/app/vendor/laravel/passport/src/Http/Middleware/CheckScopes.php
|
||||
opt/app/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php
|
||||
opt/app/vendor/laravel/passport/src/Http/Rules/RedirectRule.php
|
||||
opt/app/vendor/laravel/passport/src/Passport.php
|
||||
opt/app/vendor/laravel/passport/src/PassportServiceProvider.php
|
||||
opt/app/vendor/laravel/passport/src/PersonalAccessClient.php
|
||||
@@ -5023,6 +5057,7 @@ opt/app/vendor/league/flysystem-replicate-adapter/phpunit.php
|
||||
opt/app/vendor/league/flysystem-replicate-adapter/readme.md
|
||||
opt/app/vendor/league/flysystem-replicate-adapter/src/ReplicateAdapter.php
|
||||
opt/app/vendor/league/flysystem-replicate-adapter/tests/ReplicateAdapterTests.php
|
||||
opt/app/vendor/league/flysystem-sftp/LICENSE
|
||||
opt/app/vendor/league/flysystem-sftp/composer.json
|
||||
opt/app/vendor/league/flysystem-sftp/readme.md
|
||||
opt/app/vendor/league/flysystem-sftp/src/SftpAdapter.php
|
||||
@@ -5512,8 +5547,6 @@ opt/app/vendor/nesbot/carbon/src/Carbon/Translator.php
|
||||
opt/app/vendor/nesbot/carbon/src/JsonSerializable.php
|
||||
opt/app/vendor/nexmo/client/LICENSE.txt
|
||||
opt/app/vendor/nexmo/client/composer.json
|
||||
opt/app/vendor/nexmo/client/examples/fetch_recording.php
|
||||
opt/app/vendor/nexmo/client/examples/send.php
|
||||
opt/app/vendor/nexmo/client/phpcs.xml
|
||||
opt/app/vendor/nexmo/client/src/Account/Balance.php
|
||||
opt/app/vendor/nexmo/client/src/Account/Client.php
|
||||
@@ -5611,6 +5644,10 @@ opt/app/vendor/nexmo/client/src/Message/MessageInterface.php
|
||||
opt/app/vendor/nexmo/client/src/Message/Query.php
|
||||
opt/app/vendor/nexmo/client/src/Message/Response/Collection.php
|
||||
opt/app/vendor/nexmo/client/src/Message/Response/Message.php
|
||||
opt/app/vendor/nexmo/client/src/Message/Shortcode.php
|
||||
opt/app/vendor/nexmo/client/src/Message/Shortcode/Alert.php
|
||||
opt/app/vendor/nexmo/client/src/Message/Shortcode/Marketing.php
|
||||
opt/app/vendor/nexmo/client/src/Message/Shortcode/TwoFactor.php
|
||||
opt/app/vendor/nexmo/client/src/Message/Text.php
|
||||
opt/app/vendor/nexmo/client/src/Message/Unicode.php
|
||||
opt/app/vendor/nexmo/client/src/Message/Vcal.php
|
||||
@@ -6567,6 +6604,7 @@ opt/app/vendor/symfony/console/Tests/Output/ConsoleSectionOutputTest.php
|
||||
opt/app/vendor/symfony/console/Tests/Output/NullOutputTest.php
|
||||
opt/app/vendor/symfony/console/Tests/Output/OutputTest.php
|
||||
opt/app/vendor/symfony/console/Tests/Output/StreamOutputTest.php
|
||||
opt/app/vendor/symfony/console/Tests/Question/ConfirmationQuestionTest.php
|
||||
opt/app/vendor/symfony/console/Tests/Style/SymfonyStyleTest.php
|
||||
opt/app/vendor/symfony/console/Tests/TerminalTest.php
|
||||
opt/app/vendor/symfony/console/Tests/Tester/ApplicationTesterTest.php
|
||||
@@ -6710,7 +6748,7 @@ opt/app/vendor/symfony/debug/Tests/Fixtures/ClassWithAnnotatedParameters.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/DeprecatedClass.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/DeprecatedInterface.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/ExtendedFinalMethod.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/FinalClass.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/FinalClasses.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/FinalMethod.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/FinalMethod2Trait.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/InterfaceWithAnnotatedParameters.php
|
||||
@@ -6718,6 +6756,7 @@ opt/app/vendor/symfony/debug/Tests/Fixtures/InternalClass.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/InternalInterface.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/InternalTrait.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/InternalTrait2.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/LoggerThatSetAnErrorHandler.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/NonDeprecatedInterface.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/PEARClass.php
|
||||
opt/app/vendor/symfony/debug/Tests/Fixtures/SubClassWithAnnotatedParameters.php
|
||||
@@ -7816,6 +7855,8 @@ opt/app/vendor/symfony/var-dumper/Tests/Caster/StubCasterTest.php
|
||||
opt/app/vendor/symfony/var-dumper/Tests/Caster/XmlReaderCasterTest.php
|
||||
opt/app/vendor/symfony/var-dumper/Tests/Cloner/DataTest.php
|
||||
opt/app/vendor/symfony/var-dumper/Tests/Cloner/VarClonerTest.php
|
||||
opt/app/vendor/symfony/var-dumper/Tests/Command/Descriptor/CliDescriptorTest.php
|
||||
opt/app/vendor/symfony/var-dumper/Tests/Command/Descriptor/HtmlDescriptorTest.php
|
||||
opt/app/vendor/symfony/var-dumper/Tests/Dumper/CliDumperTest.php
|
||||
opt/app/vendor/symfony/var-dumper/Tests/Dumper/FunctionsTest.php
|
||||
opt/app/vendor/symfony/var-dumper/Tests/Dumper/HtmlDumperTest.php
|
||||
@@ -8353,6 +8394,7 @@ opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/comparison.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/dotdot.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/floats.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/grouping.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/literals.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test
|
||||
@@ -8544,6 +8586,7 @@ opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks_parent_only.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_inheritance.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_as_template_wrapper.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_change.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_in_a_block.test
|
||||
opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_isolation.test
|
||||
@@ -8704,6 +8747,7 @@ opt/app/vendor/vlucas/phpdotenv/src/Exception/InvalidFileException.php
|
||||
opt/app/vendor/vlucas/phpdotenv/src/Exception/InvalidPathException.php
|
||||
opt/app/vendor/vlucas/phpdotenv/src/Exception/ValidationException.php
|
||||
opt/app/vendor/vlucas/phpdotenv/src/Loader.php
|
||||
opt/app/vendor/vlucas/phpdotenv/src/Parser.php
|
||||
opt/app/vendor/vlucas/phpdotenv/src/Validator.php
|
||||
opt/app/vendor/zendframework/zend-diactoros/.coveralls.yml
|
||||
opt/app/vendor/zendframework/zend-diactoros/CHANGELOG.md
|
||||
@@ -8754,6 +8798,7 @@ opt/app/vendor/zendframework/zend-diactoros/src/functions/marshal_uri_from_sapi.
|
||||
opt/app/vendor/zendframework/zend-diactoros/src/functions/normalize_server.php
|
||||
opt/app/vendor/zendframework/zend-diactoros/src/functions/normalize_uploaded_files.php
|
||||
opt/app/vendor/zendframework/zend-diactoros/src/functions/parse_cookie_header.php
|
||||
opt/app/yarn.lock
|
||||
proc/cpuinfo
|
||||
sandstorm-http-bridge
|
||||
sandstorm-http-bridge-config
|
||||
@@ -8872,7 +8917,7 @@ usr/lib/x86_64-linux-gnu/librtmp.so.1
|
||||
usr/lib/x86_64-linux-gnu/libsasl2.so.2
|
||||
usr/lib/x86_64-linux-gnu/libsasl2.so.2.0.25
|
||||
usr/lib/x86_64-linux-gnu/libsodium.so.23
|
||||
usr/lib/x86_64-linux-gnu/libsodium.so.23.1.0
|
||||
usr/lib/x86_64-linux-gnu/libsodium.so.23.2.0
|
||||
usr/lib/x86_64-linux-gnu/libssh2.so.1
|
||||
usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1
|
||||
usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
|
||||
@@ -8891,8 +8936,8 @@ usr/lib/x86_64-linux-gnu/libxml2.so.2
|
||||
usr/lib/x86_64-linux-gnu/libxml2.so.2.9.1
|
||||
usr/lib/x86_64-linux-gnu/libxslt.so.1
|
||||
usr/lib/x86_64-linux-gnu/libxslt.so.1.1.28
|
||||
usr/lib/x86_64-linux-gnu/libzip.so.5
|
||||
usr/lib/x86_64-linux-gnu/libzip.so.5.0.0
|
||||
usr/lib/x86_64-linux-gnu/libzip.so.4
|
||||
usr/lib/x86_64-linux-gnu/libzip.so.4.0
|
||||
usr/sbin/mysqld
|
||||
usr/sbin/nginx
|
||||
usr/sbin/php-fpm7.2
|
||||
|
@@ -15,8 +15,8 @@ const pkgdef :Spk.PackageDefinition = (
|
||||
|
||||
manifest = (
|
||||
appTitle = (defaultText = "Firefly III"),
|
||||
appVersion = 20,
|
||||
appMarketingVersion = (defaultText = "4.7.10"),
|
||||
appVersion = 22,
|
||||
appMarketingVersion = (defaultText = "4.7.12"),
|
||||
|
||||
actions = [
|
||||
# Define your "new document" handlers here.
|
||||
|
12
.travis.yml
12
.travis.yml
@@ -1,23 +1,29 @@
|
||||
sudo: required
|
||||
language: bash
|
||||
env:
|
||||
- VERSION=4.7.12
|
||||
|
||||
dist: xenial
|
||||
|
||||
# safelist
|
||||
branches:
|
||||
only:
|
||||
- develop
|
||||
- master
|
||||
|
||||
env:
|
||||
- VERSION=4.7.10
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
script:
|
||||
# enable experimental features.
|
||||
- echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
|
||||
- mkdir $HOME/.docker
|
||||
- touch $HOME/.docker/config.json
|
||||
- echo '{"experimental":"enabled"}' | sudo tee $HOME/.docker/config.json
|
||||
- sudo service docker restart
|
||||
- docker version -f '{{.Server.Experimental}}'
|
||||
- docker version
|
||||
# build everything
|
||||
- .deploy/docker/build-amd64.sh
|
||||
- .deploy/docker/build-arm.sh
|
||||
- .deploy/docker/manifest.sh
|
51
Dockerfile.amd64
Normal file
51
Dockerfile.amd64
Normal file
@@ -0,0 +1,51 @@
|
||||
FROM php:7.2-apache
|
||||
ARG ARCH
|
||||
ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1
|
||||
LABEL version="1.3" maintainer="thegrumpydictator@gmail.com"
|
||||
|
||||
# Create volumes
|
||||
VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload
|
||||
|
||||
# Install some stuff
|
||||
RUN apt-get update && apt-get install -y libpng-dev \
|
||||
libicu-dev \
|
||||
unzip \
|
||||
gettext-base \
|
||||
libldap2-dev \
|
||||
libpq-dev \
|
||||
locales \
|
||||
libmemcached-dev && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy in Firefly III source
|
||||
WORKDIR $FIREFLY_PATH
|
||||
ADD . $FIREFLY_PATH
|
||||
|
||||
# copy ca certs to correct location
|
||||
COPY ./.deploy/docker/cacert.pem /usr/local/ssl/cert.pem
|
||||
|
||||
# copy Apache config to correct spot.
|
||||
COPY ./.deploy/docker/apache2.conf /etc/apache2/apache2.conf
|
||||
|
||||
# Enable default site (Firefly III)
|
||||
COPY ./.deploy/docker/apache-firefly.conf /etc/apache2/sites-available/000-default.conf
|
||||
|
||||
# Run a lot of installation commands:
|
||||
RUN chown -R www-data:www-data /var/www && \
|
||||
chmod -R 775 $FIREFLY_PATH/storage && \
|
||||
a2enmod rewrite && a2enmod ssl && \
|
||||
docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ && \
|
||||
docker-php-ext-install -j$(nproc) zip bcmath ldap gd pdo_pgsql pdo_mysql intl opcache && \
|
||||
pecl install memcached-3.1.3 && \
|
||||
docker-php-ext-enable memcached && \
|
||||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
|
||||
echo "de_DE.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen && \
|
||||
locale-gen && \
|
||||
composer install --prefer-dist --no-dev --no-scripts --no-suggest
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Run entrypoint thing
|
||||
ENTRYPOINT [".deploy/docker/entrypoint.sh"]
|
@@ -1,5 +1,5 @@
|
||||
FROM arm32v7/php:7.2.8-apache-stretch
|
||||
ARG TARGETPLATFORM
|
||||
ARG ARCH
|
||||
COPY tmp/qemu-arm-static /usr/bin/qemu-arm-static
|
||||
ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1
|
||||
LABEL version="1.3" maintainer="thegrumpydictator@gmail.com"
|
50
Dockerfile.arm64
Normal file
50
Dockerfile.arm64
Normal file
@@ -0,0 +1,50 @@
|
||||
FROM arm32v7/php:7.2.8-apache-stretch
|
||||
ARG ARCH
|
||||
COPY tmp/qemu-arm-static /usr/bin/qemu-arm-static
|
||||
ENV FIREFLY_PATH=/var/www/firefly-iii COMPOSER_ALLOW_SUPERUSER=1
|
||||
LABEL version="1.3" maintainer="thegrumpydictator@gmail.com"
|
||||
|
||||
# Create volumes
|
||||
VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload
|
||||
|
||||
# Install some stuff
|
||||
RUN apt-get update && apt-get install -y libpng-dev \
|
||||
libicu-dev \
|
||||
unzip \
|
||||
gettext-base \
|
||||
libldap2-dev \
|
||||
libpq-dev \
|
||||
locales \
|
||||
libmemcached-dev
|
||||
|
||||
# Copy in Firefly III source
|
||||
WORKDIR $FIREFLY_PATH
|
||||
ADD . $FIREFLY_PATH
|
||||
|
||||
# copy ca certs to correct location
|
||||
COPY ./.deploy/docker/cacert.pem /usr/local/ssl/cert.pem
|
||||
|
||||
# copy Apache config to correct spot.
|
||||
COPY ./.deploy/docker/apache2.conf /etc/apache2/apache2.conf
|
||||
|
||||
# Enable default site (Firefly III)
|
||||
COPY ./.deploy/docker/apache-firefly.conf /etc/apache2/sites-available/000-default.conf
|
||||
|
||||
# Run a lot of installation commands:
|
||||
RUN chown -R www-data:www-data /var/www && \
|
||||
chmod -R 775 $FIREFLY_PATH/storage && \
|
||||
a2enmod rewrite && a2enmod ssl && \
|
||||
docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ && \
|
||||
docker-php-ext-install -j$(nproc) zip bcmath ldap gd pdo_pgsql pdo_mysql intl opcache && \
|
||||
pecl install memcached-3.1.3 && \
|
||||
docker-php-ext-enable memcached && \
|
||||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
|
||||
echo "de_DE.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\nzh_CN.UTF-8 UTF-8\n\n" > /etc/locale.gen && \
|
||||
locale-gen && \
|
||||
composer install --prefer-dist --no-dev --no-scripts --no-suggest
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Run entrypoint thing
|
||||
ENTRYPOINT [".deploy/docker/entrypoint.sh"]
|
@@ -60,7 +60,7 @@ class AboutController extends Controller
|
||||
'driver' => $currentDriver,
|
||||
];
|
||||
|
||||
return response()->json(['data' => $data], 200)->header('Content-Type', 'application/vnd.api+json');
|
||||
return response()->json(['data' => $data])->header('Content-Type', 'application/vnd.api+json');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -100,7 +100,7 @@ class AttachmentController extends Controller
|
||||
$quoted = sprintf('"%s"', addcslashes(basename($attachment->filename), '"\\'));
|
||||
|
||||
/** @var LaravelResponse $response */
|
||||
$response = response($content, 200);
|
||||
$response = response($content);
|
||||
$response
|
||||
->header('Content-Description', 'File Transfer')
|
||||
->header('Content-Type', 'application/octet-stream')
|
||||
|
@@ -24,12 +24,10 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers;
|
||||
|
||||
use FireflyIII\Api\V1\Requests\AvailableBudgetRequest;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Factory\TransactionCurrencyFactory;
|
||||
use FireflyIII\Models\AvailableBudget;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\Transformers\AvailableBudgetTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
@@ -48,8 +46,6 @@ use League\Fractal\Serializer\JsonApiSerializer;
|
||||
*/
|
||||
class AvailableBudgetController extends Controller
|
||||
{
|
||||
/** @var CurrencyRepositoryInterface The currency repository */
|
||||
private $currencyRepository;
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
private $repository;
|
||||
|
||||
@@ -62,9 +58,8 @@ class AvailableBudgetController extends Controller
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
$this->repository = app(BudgetRepositoryInterface::class);
|
||||
$this->currencyRepository = app(CurrencyRepositoryInterface::class);
|
||||
$user = auth()->user();
|
||||
$this->repository = app(BudgetRepositoryInterface::class);
|
||||
$this->repository->setUser($user);
|
||||
|
||||
return $next($request);
|
||||
@@ -103,16 +98,18 @@ class AvailableBudgetController extends Controller
|
||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
||||
|
||||
// get list of available budgets. Count it and split it.
|
||||
$collection = $this->repository->getAvailableBudgets();
|
||||
$collection = $this->repository->getAvailableBudgets();
|
||||
|
||||
// filter list on start and end date, if present.
|
||||
// TODO: put this in the query.
|
||||
$start = $this->parameters->get('start');
|
||||
$end = $this->parameters->get('end');
|
||||
if(null !== $start && null !== $end) {
|
||||
$collection = $collection->filter(function(AvailableBudget $availableBudget) use ($start, $end) {
|
||||
return $availableBudget->start_date->gte($start) && $availableBudget->end_date->lte($end);
|
||||
});
|
||||
$end = $this->parameters->get('end');
|
||||
if (null !== $start && null !== $end) {
|
||||
$collection = $collection->filter(
|
||||
function (AvailableBudget $availableBudget) use ($start, $end) {
|
||||
return $availableBudget->start_date->gte($start) && $availableBudget->end_date->lte($end);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
$count = $collection->count();
|
||||
@@ -164,7 +161,6 @@ class AvailableBudgetController extends Controller
|
||||
* @param AvailableBudgetRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function store(AvailableBudgetRequest $request): JsonResponse
|
||||
{
|
||||
|
@@ -1,4 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AccountController.php
|
||||
* Copyright (c) 2019 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Chart;
|
||||
@@ -135,94 +156,6 @@ class AccountController extends Controller
|
||||
return response()->json($chartData);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function revenueOverview(Request $request): JsonResponse
|
||||
{
|
||||
// parameters for chart:
|
||||
$start = (string)$request->get('start');
|
||||
$end = (string)$request->get('end');
|
||||
if ('' === $start || '' === $end) {
|
||||
throw new FireflyException('Start and end are mandatory parameters.');
|
||||
}
|
||||
|
||||
$start = Carbon::createFromFormat('Y-m-d', $start);
|
||||
$end = Carbon::createFromFormat('Y-m-d', $end);
|
||||
$start->subDay();
|
||||
|
||||
// prep some vars:
|
||||
$currencies = [];
|
||||
$chartData = [];
|
||||
$tempData = [];
|
||||
|
||||
// grab all accounts and names
|
||||
$accounts = $this->repository->getAccountsByType([AccountType::REVENUE]);
|
||||
$accountNames = $this->extractNames($accounts);
|
||||
$startBalances = app('steam')->balancesPerCurrencyByAccounts($accounts, $start);
|
||||
$endBalances = app('steam')->balancesPerCurrencyByAccounts($accounts, $end);
|
||||
|
||||
// loop the end balances. This is an array for each account ($expenses)
|
||||
foreach ($endBalances as $accountId => $expenses) {
|
||||
$accountId = (int)$accountId;
|
||||
// loop each expense entry (each entry can be a different currency).
|
||||
foreach ($expenses as $currencyId => $endAmount) {
|
||||
$currencyId = (int)$currencyId;
|
||||
|
||||
// see if there is an accompanying start amount.
|
||||
// grab the difference and find the currency.
|
||||
$startAmount = $startBalances[$accountId][$currencyId] ?? '0';
|
||||
$diff = bcsub($endAmount, $startAmount);
|
||||
$currencies[$currencyId] = $currencies[$currencyId] ?? $this->currencyRepository->findNull($currencyId);
|
||||
if (0 !== bccomp($diff, '0')) {
|
||||
// store the values in a temporary array.
|
||||
$tempData[] = [
|
||||
'name' => $accountNames[$accountId],
|
||||
'difference' => bcmul($diff,'-1'),
|
||||
'diff_float' => (float)$diff * -1,
|
||||
'currency_id' => $currencyId,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// sort temp array by amount.
|
||||
$amounts = array_column($tempData, 'diff_float');
|
||||
array_multisort($amounts, SORT_DESC, $tempData);
|
||||
|
||||
// loop all found currencies and build the data array for the chart.
|
||||
/**
|
||||
* @var int $currencyId
|
||||
* @var TransactionCurrency $currency
|
||||
*/
|
||||
foreach ($currencies as $currencyId => $currency) {
|
||||
$currentSet = [
|
||||
'label' => trans('firefly.box_earned_in_currency', ['currency' => $currency->symbol]),
|
||||
'currency_id' => $currency->id,
|
||||
'currency_code' => $currency->code,
|
||||
'currency_symbol' => $currency->symbol,
|
||||
'currency_decimal_places' => $currency->decimal_places,
|
||||
'type' => 'bar', // line, area or bar
|
||||
'yAxisID' => 0, // 0, 1, 2
|
||||
'entries' => $this->expandNames($tempData),
|
||||
];
|
||||
$chartData[$currencyId] = $currentSet;
|
||||
}
|
||||
|
||||
// loop temp data and place data in correct array:
|
||||
foreach ($tempData as $entry) {
|
||||
$currencyId = $entry['currency_id'];
|
||||
$name = $entry['name'];
|
||||
$chartData[$currencyId]['entries'][$name] = round($entry['difference'], $chartData[$currencyId]['currency_decimal_places']);
|
||||
}
|
||||
$chartData = array_values($chartData);
|
||||
|
||||
return response()->json($chartData);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
*
|
||||
@@ -287,6 +220,94 @@ class AccountController extends Controller
|
||||
return response()->json($chartData);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function revenueOverview(Request $request): JsonResponse
|
||||
{
|
||||
// parameters for chart:
|
||||
$start = (string)$request->get('start');
|
||||
$end = (string)$request->get('end');
|
||||
if ('' === $start || '' === $end) {
|
||||
throw new FireflyException('Start and end are mandatory parameters.');
|
||||
}
|
||||
|
||||
$start = Carbon::createFromFormat('Y-m-d', $start);
|
||||
$end = Carbon::createFromFormat('Y-m-d', $end);
|
||||
$start->subDay();
|
||||
|
||||
// prep some vars:
|
||||
$currencies = [];
|
||||
$chartData = [];
|
||||
$tempData = [];
|
||||
|
||||
// grab all accounts and names
|
||||
$accounts = $this->repository->getAccountsByType([AccountType::REVENUE]);
|
||||
$accountNames = $this->extractNames($accounts);
|
||||
$startBalances = app('steam')->balancesPerCurrencyByAccounts($accounts, $start);
|
||||
$endBalances = app('steam')->balancesPerCurrencyByAccounts($accounts, $end);
|
||||
|
||||
// loop the end balances. This is an array for each account ($expenses)
|
||||
foreach ($endBalances as $accountId => $expenses) {
|
||||
$accountId = (int)$accountId;
|
||||
// loop each expense entry (each entry can be a different currency).
|
||||
foreach ($expenses as $currencyId => $endAmount) {
|
||||
$currencyId = (int)$currencyId;
|
||||
|
||||
// see if there is an accompanying start amount.
|
||||
// grab the difference and find the currency.
|
||||
$startAmount = $startBalances[$accountId][$currencyId] ?? '0';
|
||||
$diff = bcsub($endAmount, $startAmount);
|
||||
$currencies[$currencyId] = $currencies[$currencyId] ?? $this->currencyRepository->findNull($currencyId);
|
||||
if (0 !== bccomp($diff, '0')) {
|
||||
// store the values in a temporary array.
|
||||
$tempData[] = [
|
||||
'name' => $accountNames[$accountId],
|
||||
'difference' => bcmul($diff, '-1'),
|
||||
'diff_float' => (float)$diff * -1,
|
||||
'currency_id' => $currencyId,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// sort temp array by amount.
|
||||
$amounts = array_column($tempData, 'diff_float');
|
||||
array_multisort($amounts, SORT_DESC, $tempData);
|
||||
|
||||
// loop all found currencies and build the data array for the chart.
|
||||
/**
|
||||
* @var int $currencyId
|
||||
* @var TransactionCurrency $currency
|
||||
*/
|
||||
foreach ($currencies as $currencyId => $currency) {
|
||||
$currentSet = [
|
||||
'label' => trans('firefly.box_earned_in_currency', ['currency' => $currency->symbol]),
|
||||
'currency_id' => $currency->id,
|
||||
'currency_code' => $currency->code,
|
||||
'currency_symbol' => $currency->symbol,
|
||||
'currency_decimal_places' => $currency->decimal_places,
|
||||
'type' => 'bar', // line, area or bar
|
||||
'yAxisID' => 0, // 0, 1, 2
|
||||
'entries' => $this->expandNames($tempData),
|
||||
];
|
||||
$chartData[$currencyId] = $currentSet;
|
||||
}
|
||||
|
||||
// loop temp data and place data in correct array:
|
||||
foreach ($tempData as $entry) {
|
||||
$currencyId = $entry['currency_id'];
|
||||
$name = $entry['name'];
|
||||
$chartData[$currencyId]['entries'][$name] = round($entry['difference'], $chartData[$currencyId]['currency_decimal_places']);
|
||||
}
|
||||
$chartData = array_values($chartData);
|
||||
|
||||
return response()->json($chartData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Small helper function for the revenue and expense account charts.
|
||||
* TODO should include Trait instead of doing this.
|
||||
@@ -324,4 +345,4 @@ class AccountController extends Controller
|
||||
return $return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AvailableBudgetController.php
|
||||
* Copyright (c) 2019 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Chart;
|
||||
@@ -9,7 +30,6 @@ use FireflyIII\Models\AvailableBudget;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
@@ -39,13 +59,11 @@ class AvailableBudgetController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
*
|
||||
* @param AvailableBudget $availableBudget
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function overview(Request $request, AvailableBudget $availableBudget): JsonResponse
|
||||
public function overview(AvailableBudget $availableBudget): JsonResponse
|
||||
{
|
||||
$currency = $availableBudget->transactionCurrency;
|
||||
$budgets = $this->repository->getActiveBudgets();
|
||||
@@ -90,4 +108,4 @@ class AvailableBudgetController extends Controller
|
||||
return response()->json($chartData);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* CategoryController.php
|
||||
* Copyright (c) 2019 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers\Chart;
|
||||
@@ -185,4 +206,4 @@ class CategoryController extends Controller
|
||||
|
||||
return response()->json($chartData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -54,7 +54,6 @@ class ConfigurationController extends Controller
|
||||
$admin = auth()->user();
|
||||
|
||||
if (!$this->repository->hasRole($admin, 'owner')) {
|
||||
/** @noinspection ExceptionsAnnotatingAndHandlingInspection */
|
||||
throw new FireflyException('No access to method.'); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
@@ -72,7 +71,7 @@ class ConfigurationController extends Controller
|
||||
{
|
||||
$configData = $this->getConfigData();
|
||||
|
||||
return response()->json(['data' => $configData], 200)->header('Content-Type', 'application/vnd.api+json');
|
||||
return response()->json(['data' => $configData])->header('Content-Type', 'application/vnd.api+json');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,7 +81,6 @@ class ConfigurationController extends Controller
|
||||
* @param string $name
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*/
|
||||
public function update(ConfigurationRequest $request, string $name): JsonResponse
|
||||
@@ -91,7 +89,7 @@ class ConfigurationController extends Controller
|
||||
app('fireflyconfig')->set($name, $data['value']);
|
||||
$configData = $this->getConfigData();
|
||||
|
||||
return response()->json(['data' => $configData], 200)->header('Content-Type', 'application/vnd.api+json');
|
||||
return response()->json(['data' => $configData])->header('Content-Type', 'application/vnd.api+json');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -104,7 +104,7 @@ class Controller extends BaseController
|
||||
$obj = null;
|
||||
if (null !== $date) {
|
||||
try {
|
||||
$obj = new Carbon($date);
|
||||
$obj = Carbon::parse($date);
|
||||
} catch (InvalidDateException $e) {
|
||||
// don't care
|
||||
Log::error(sprintf('Invalid date exception in API controller: %s', $e->getMessage()));
|
||||
|
@@ -263,7 +263,9 @@ class CurrencyController extends Controller
|
||||
/**
|
||||
* List all budget limits
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Request $request
|
||||
*
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -489,7 +491,9 @@ class CurrencyController extends Controller
|
||||
/**
|
||||
* List all recurring transactions.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Request $request
|
||||
*
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return JsonResponse]
|
||||
*/
|
||||
|
@@ -127,6 +127,7 @@ class ImportController extends Controller
|
||||
/**
|
||||
* Show all transactions
|
||||
*
|
||||
* @param Request $request
|
||||
* @param ImportJob $importJob
|
||||
*
|
||||
* @return JsonResponse
|
||||
|
@@ -90,7 +90,7 @@ class LinkTypeController extends Controller
|
||||
if (false === $linkType->editable) {
|
||||
throw new FireflyException(sprintf('You cannot delete this link type (#%d, "%s")', $linkType->id, $linkType->name));
|
||||
}
|
||||
$this->repository->destroy($linkType, null);
|
||||
$this->repository->destroy($linkType);
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
@@ -190,6 +190,7 @@ class LinkTypeController extends Controller
|
||||
/**
|
||||
* Delete the resource.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param LinkType $linkType
|
||||
*
|
||||
* @return JsonResponse
|
||||
|
@@ -59,7 +59,7 @@ class PreferenceController extends Controller
|
||||
// an important fallback is that the frontPageAccount array gets refilled automatically
|
||||
// when it turns up empty.
|
||||
$frontPageAccounts = app('preferences')->getForUser($user, 'frontPageAccounts', [])->data;
|
||||
if (\count($frontPageAccounts) === 0) {
|
||||
if (0 === \count($frontPageAccounts)) {
|
||||
/** @var Collection $accounts */
|
||||
$accounts = $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]);
|
||||
$accountIds = $accounts->pluck('id')->toArray();
|
||||
|
@@ -247,7 +247,7 @@ class RecurrenceController extends Controller
|
||||
return response()->json([], 204);
|
||||
}
|
||||
if (true === $result) {
|
||||
return response()->json([], 200);
|
||||
return response()->json();
|
||||
}
|
||||
|
||||
return response()->json([], 418); // @codeCoverageIgnore
|
||||
|
@@ -1,4 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SummaryController.php
|
||||
* Copyright (c) 2019 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers;
|
||||
@@ -84,6 +105,7 @@ class SummaryController extends Controller
|
||||
$spentData = $this->getLeftToSpendInfo($start, $end);
|
||||
$networthData = $this->getNetWorthInfo($start, $end);
|
||||
$total = array_merge($balanceData, $billData, $spentData, $networthData);
|
||||
|
||||
// TODO: liabilities with icon line-chart
|
||||
|
||||
return response()->json($total);
|
||||
@@ -340,8 +362,11 @@ class SummaryController extends Controller
|
||||
*/
|
||||
private function getNetWorthInfo(Carbon $start, Carbon $end): array
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
$date = Carbon::create()->startOfDay();
|
||||
|
||||
|
||||
// start and end in the future? use $end
|
||||
if ($this->notInDateRange($date, $start, $end)) {
|
||||
/** @var Carbon $date */
|
||||
@@ -350,7 +375,7 @@ class SummaryController extends Controller
|
||||
|
||||
/** @var NetWorthInterface $netWorthHelper */
|
||||
$netWorthHelper = app(NetWorthInterface::class);
|
||||
$netWorthHelper->setUser(auth()->user());
|
||||
$netWorthHelper->setUser($user);
|
||||
$allAccounts = $this->accountRepository->getActiveAccountsByType([AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE]);
|
||||
|
||||
// filter list on preference of being included.
|
||||
@@ -368,7 +393,7 @@ class SummaryController extends Controller
|
||||
/** @var TransactionCurrency $currency */
|
||||
$currency = $data['currency'];
|
||||
$amount = round($data['balance'], $currency->decimal_places);
|
||||
if ($amount === 0.0) {
|
||||
if (0.0 === $amount) {
|
||||
continue;
|
||||
}
|
||||
// return stuff
|
||||
@@ -389,4 +414,4 @@ class SummaryController extends Controller
|
||||
return $return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -179,7 +179,7 @@ class TransactionController extends Controller
|
||||
$baseUrl = $request->getSchemeAndHttpHost() . '/api/v1';
|
||||
$manager->setSerializer(new JsonApiSerializer($baseUrl));
|
||||
|
||||
$events = $this->repository->getPiggyBankEventsByTr($transaction);
|
||||
$events = $this->repository->getPiggyBankEventsbyTr($transaction);
|
||||
|
||||
/** @var PiggyBankEventTransformer $transformer */
|
||||
$transformer = app(PiggyBankEventTransformer::class);
|
||||
|
@@ -29,7 +29,6 @@ use FireflyIII\Models\TransactionJournalLink;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
|
||||
use FireflyIII\Support\Http\Api\TransactionFilter;
|
||||
use FireflyIII\Transformers\JournalLinkTransformer;
|
||||
use FireflyIII\Transformers\TransactionLinkTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
@@ -52,7 +52,7 @@ class BillRequest extends Request
|
||||
public function getAll(): array
|
||||
{
|
||||
$active = true;
|
||||
if(null !== $this->get('active')) {
|
||||
if (null !== $this->get('active')) {
|
||||
$active = $this->boolean('active');
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Requests;
|
||||
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Rules\IsBoolean;
|
||||
|
||||
/**
|
||||
* Class CategoryRequest
|
||||
@@ -50,7 +49,7 @@ class CategoryRequest extends Request
|
||||
public function getAll(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->string('name')
|
||||
'name' => $this->string('name'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -62,7 +61,7 @@ class CategoryRequest extends Request
|
||||
public function rules(): array
|
||||
{
|
||||
$rules = [
|
||||
'name' => 'required|between:1,100|uniqueObjectForUser:categories,name'
|
||||
'name' => 'required|between:1,100|uniqueObjectForUser:categories,name',
|
||||
];
|
||||
switch ($this->method()) {
|
||||
default:
|
||||
|
@@ -25,6 +25,7 @@ namespace FireflyIII\Api\V1\Requests;
|
||||
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Validation\Validator;
|
||||
|
||||
/**
|
||||
@@ -98,13 +99,15 @@ class TransactionLinkRequest extends Request
|
||||
*/
|
||||
private function validateExistingLink(Validator $validator): void
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
/** @var LinkTypeRepositoryInterface $repository */
|
||||
$repository = app(LinkTypeRepositoryInterface::class);
|
||||
$repository->setUser(auth()->user());
|
||||
$repository->setUser($user);
|
||||
|
||||
/** @var JournalRepositoryInterface $journalRepos */
|
||||
$journalRepos = app(JournalRepositoryInterface::class);
|
||||
$journalRepos->setUser(auth()->user());
|
||||
$journalRepos->setUser($user);
|
||||
|
||||
$data = $validator->getData();
|
||||
$inwardId = (int)($data['inward_id'] ?? 0);
|
||||
|
@@ -26,6 +26,7 @@ namespace FireflyIII\Api\V1\Requests;
|
||||
|
||||
use FireflyIII\Rules\BelongsUser;
|
||||
use FireflyIII\Rules\IsBoolean;
|
||||
use FireflyIII\Rules\IsDateOrTime;
|
||||
use FireflyIII\Validation\TransactionValidation;
|
||||
use Illuminate\Validation\Validator;
|
||||
|
||||
@@ -59,7 +60,7 @@ class TransactionRequest extends Request
|
||||
{
|
||||
$data = [
|
||||
'type' => $this->string('type'),
|
||||
'date' => $this->date('date'),
|
||||
'date' => $this->dateTime('date'),
|
||||
'description' => $this->string('description'),
|
||||
'piggy_bank_id' => $this->integer('piggy_bank_id'),
|
||||
'piggy_bank_name' => $this->string('piggy_bank_name'),
|
||||
@@ -103,7 +104,7 @@ class TransactionRequest extends Request
|
||||
// basic fields for journal:
|
||||
'type' => 'required|in:withdrawal,deposit,transfer,opening-balance,reconciliation',
|
||||
'description' => 'between:1,255',
|
||||
'date' => 'required|date',
|
||||
'date' => ['required', new IsDateOrTime],
|
||||
'piggy_bank_id' => ['numeric', 'nullable', 'mustExist:piggy_banks,id', new BelongsUser],
|
||||
'piggy_bank_name' => ['between:1,255', 'nullable', new BelongsUser],
|
||||
'bill_id' => ['numeric', 'nullable', 'mustExist:bills,id', new BelongsUser],
|
||||
|
@@ -41,6 +41,7 @@ use Illuminate\Support\Collection;
|
||||
/**
|
||||
*
|
||||
* Class ApplyRules
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class ApplyRules extends Command
|
||||
@@ -184,6 +185,8 @@ class ApplyRules extends Command
|
||||
private function applyRuleSelection(Collection $rules, Collection $transactions, bool $breakProcessing): void
|
||||
{
|
||||
$bar = $this->output->createProgressBar($rules->count() * $transactions->count());
|
||||
|
||||
/** @var Rule $rule */
|
||||
foreach ($rules as $rule) {
|
||||
/** @var Processor $processor */
|
||||
$processor = app(Processor::class);
|
||||
@@ -191,7 +194,7 @@ class ApplyRules extends Command
|
||||
|
||||
/** @var Transaction $transaction */
|
||||
foreach ($transactions as $transaction) {
|
||||
/** @var Rule $rule */
|
||||
/** @noinspection DisconnectedForeachInstructionInspection */
|
||||
$bar->advance();
|
||||
$result = $processor->handleTransaction($transaction);
|
||||
if (true === $result) {
|
||||
@@ -210,6 +213,7 @@ class ApplyRules extends Command
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
*/
|
||||
private function grabAllRules(): void
|
||||
{
|
||||
@@ -226,6 +230,7 @@ class ApplyRules extends Command
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
*/
|
||||
private function parseDates(): void
|
||||
{
|
||||
|
@@ -134,8 +134,8 @@ class CreateExport extends Command
|
||||
}
|
||||
|
||||
$processor->createZipFile();
|
||||
$disk = Storage::disk('export');
|
||||
$fileName = sprintf('export-%s.zip', date('Y-m-d_H-i-s'));
|
||||
$disk = Storage::disk('export');
|
||||
$fileName = sprintf('export-%s.zip', date('Y-m-d_H-i-s'));
|
||||
$localPath = storage_path('export') . '/' . $job->key . '.zip';
|
||||
|
||||
// "move" from local to export disk
|
||||
|
@@ -97,7 +97,7 @@ class CreateImport extends Command
|
||||
|
||||
return 1;
|
||||
}
|
||||
if (\strlen($configuration) > 0) {
|
||||
if ('' !== $configuration) {
|
||||
$configurationData = json_decode(file_get_contents($configuration), true);
|
||||
if (null === $configurationData) {
|
||||
$this->errorLine(sprintf('Firefly III cannot read the contents of configuration file "%s" (working directory: "%s").', $configuration, $cwd));
|
||||
@@ -136,7 +136,7 @@ class CreateImport extends Command
|
||||
}
|
||||
|
||||
// store file as attachment.
|
||||
if (\strlen($file) > 0) {
|
||||
if ('' !== $file) {
|
||||
$messages = $jobRepository->storeCLIUpload($importJob, 'import_file', $file);
|
||||
if ($messages->count() > 0) {
|
||||
$this->errorLine($messages->first());
|
||||
|
@@ -48,16 +48,6 @@ class Cron extends Command
|
||||
*/
|
||||
protected $signature = 'firefly:cron';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@@ -1,5 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* DecryptDatabase.php
|
||||
* Copyright (c) 2019 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands;
|
||||
|
||||
use Crypt;
|
||||
@@ -91,7 +113,7 @@ class DecryptDatabase extends Command
|
||||
$configName = sprintf('is_decrypted_%s', $table);
|
||||
$configVar = FireflyConfig::get($configName, false);
|
||||
if (null !== $configVar) {
|
||||
return $configVar->data;
|
||||
return (bool)$configVar->data;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -108,7 +130,7 @@ class DecryptDatabase extends Command
|
||||
try {
|
||||
$value = Crypt::decrypt($value);
|
||||
} catch (DecryptException $e) {
|
||||
//Log::debug(sprintf('Could not decrypt. %s', $e->getMessage()));
|
||||
Log::debug(sprintf('Could not decrypt. %s', $e->getMessage()));
|
||||
}
|
||||
|
||||
return $value;
|
||||
|
@@ -35,6 +35,7 @@ use FireflyIII\Models\AccountMeta;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\Attachment;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
use FireflyIII\Models\Note;
|
||||
use FireflyIII\Models\Preference;
|
||||
@@ -130,7 +131,7 @@ class UpgradeDatabase extends Command
|
||||
$currency = TransactionCurrency::where('code', $currencyPreference->data)->first();
|
||||
if (null === $currency) {
|
||||
$this->line('Fall back to default currency in migrateBillsToRules().');
|
||||
$currency = app('amount')->getDefaultCurrency();
|
||||
$currency = app('amount')->getDefaultCurrencyByUser($user);
|
||||
}
|
||||
|
||||
if (null === $ruleGroup) {
|
||||
@@ -272,6 +273,7 @@ class UpgradeDatabase extends Command
|
||||
->whereNull('transactions.deleted_at')
|
||||
->groupBy(['transaction_journals.id'])
|
||||
->select(['transaction_journals.id', DB::raw('COUNT(transactions.id) AS t_count')]);
|
||||
/** @noinspection PhpStrictTypeCheckingInspection */
|
||||
$result = DB::table(DB::raw('(' . $subQuery->toSql() . ') AS derived'))
|
||||
->mergeBindings($subQuery->getQuery())
|
||||
->where('t_count', '>', 2)
|
||||
@@ -448,11 +450,12 @@ class UpgradeDatabase extends Command
|
||||
/** @var BudgetLimit $budgetLimit */
|
||||
foreach ($budgetLimits as $budgetLimit) {
|
||||
if (null === $budgetLimit->transaction_currency_id) {
|
||||
/** @var Budget $budget */
|
||||
$budget = $budgetLimit->budget;
|
||||
if (null !== $budget) {
|
||||
$user = $budget->user;
|
||||
if (null !== $user) {
|
||||
$currency = \Amount::getDefaultCurrencyByUser($user);
|
||||
$currency = app('amount')->getDefaultCurrencyByUser($user);
|
||||
$budgetLimit->transaction_currency_id = $currency->id;
|
||||
$budgetLimit->save();
|
||||
$this->line(
|
||||
@@ -464,6 +467,9 @@ class UpgradeDatabase extends Command
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createNewTypes(): void
|
||||
{
|
||||
// create transaction type "Reconciliation".
|
||||
@@ -490,7 +496,7 @@ class UpgradeDatabase extends Command
|
||||
|
||||
// move description:
|
||||
$description = (string)$att->description;
|
||||
if (\strlen($description) > 0) {
|
||||
if ('' !== $description) {
|
||||
// find or create note:
|
||||
$note = $att->notes()->first();
|
||||
if (null === $note) {
|
||||
@@ -541,19 +547,19 @@ class UpgradeDatabase extends Command
|
||||
*/
|
||||
private function removeCCLiabilities(): void
|
||||
{
|
||||
$ccType = AccountType::where('type', AccountType::CREDITCARD)->first();
|
||||
$debtType =AccountType::where('type', AccountType::DEBT)->first();
|
||||
if(null === $ccType || null === $debtType) {
|
||||
$ccType = AccountType::where('type', AccountType::CREDITCARD)->first();
|
||||
$debtType = AccountType::where('type', AccountType::DEBT)->first();
|
||||
if (null === $ccType || null === $debtType) {
|
||||
return;
|
||||
}
|
||||
/** @var Collection $accounts */
|
||||
$accounts = Account::where('account_type_id', $ccType->id)->get();
|
||||
foreach($accounts as $account) {
|
||||
foreach ($accounts as $account) {
|
||||
$account->account_type_id = $debtType->id;
|
||||
$account->save();
|
||||
$this->line(sprintf('Converted credit card liability account "%s" (#%d) to generic debt liability.', $account->name, $account->id));
|
||||
}
|
||||
if($accounts->count() > 0) {
|
||||
if ($accounts->count() > 0) {
|
||||
$this->info('Credit card liability types are no longer supported and have been converted to generic debts. See: http://bit.ly/FF3-credit-cards');
|
||||
}
|
||||
}
|
||||
|
@@ -25,7 +25,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands;
|
||||
|
||||
use Crypt;
|
||||
use DB;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountMeta;
|
||||
@@ -42,10 +41,8 @@ use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Schema;
|
||||
use stdClass;
|
||||
|
||||
|
@@ -30,6 +30,7 @@ use Log;
|
||||
|
||||
/**
|
||||
* File to make sure commands work.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Kernel extends ConsoleKernel
|
||||
@@ -54,7 +55,9 @@ class Kernel extends ConsoleKernel
|
||||
{
|
||||
$schedule->call(
|
||||
function () {
|
||||
Log::error('Firefly III no longer users the Laravel scheduler to do cron jobs! Please read the instructions at https://firefly-iii.readthedocs.io/en/latest/');
|
||||
Log::error(
|
||||
'Firefly III no longer users the Laravel scheduler to do cron jobs! Please read the instructions at https://firefly-iii.readthedocs.io/en/latest/'
|
||||
);
|
||||
echo "\n";
|
||||
echo '------------';
|
||||
echo "\n";
|
||||
|
@@ -30,6 +30,7 @@ use Log;
|
||||
|
||||
/**
|
||||
* Class AdminRequestedTestMessage.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class AdminRequestedTestMessage extends Event
|
||||
|
@@ -26,6 +26,7 @@ namespace FireflyIII\Events;
|
||||
|
||||
/**
|
||||
* Class Event.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
abstract class Event
|
||||
|
@@ -29,6 +29,7 @@ use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
* Class RegisteredUser.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class RegisteredUser extends Event
|
||||
|
@@ -29,6 +29,7 @@ use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
* Class RequestedNewPassword.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class RequestedNewPassword extends Event
|
||||
|
@@ -46,6 +46,6 @@ class StoredTransactionJournal extends Event
|
||||
*/
|
||||
public function __construct(TransactionJournal $journal)
|
||||
{
|
||||
$this->journal = $journal;
|
||||
$this->journal = $journal;
|
||||
}
|
||||
}
|
||||
|
@@ -28,6 +28,7 @@ use Crypt;
|
||||
use FireflyIII\Models\Attachment;
|
||||
use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Illuminate\Contracts\Filesystem\FileNotFoundException;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Storage;
|
||||
@@ -102,6 +103,7 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return bool
|
||||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
|
||||
*/
|
||||
private function exportAttachment(Attachment $attachment): bool
|
||||
{
|
||||
@@ -110,7 +112,7 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface
|
||||
if ($this->uploadDisk->exists($file)) {
|
||||
try {
|
||||
$decrypted = Crypt::decrypt($this->uploadDisk->get($file));
|
||||
} catch (DecryptException $e) {
|
||||
} catch (DecryptException|FileNotFoundException $e) {
|
||||
Log::error('Catchable error: could not decrypt attachment #' . $attachment->id . ' because: ' . $e->getMessage());
|
||||
|
||||
return false;
|
||||
|
@@ -110,7 +110,7 @@ class UploadCollector extends BasicCollector implements CollectorInterface
|
||||
Log::error(sprintf('Could not decrypt old import file "%s". Skipped because: %s', $key, $e->getMessage()));
|
||||
}
|
||||
|
||||
if (\strlen($content) > 0) {
|
||||
if ('' !== $content) {
|
||||
// add to export disk.
|
||||
$date = $job->created_at->format('Y-m-d');
|
||||
$file = sprintf('%s-Old %s import dated %s.%s', $this->job->key, strtoupper($job->file_type), $date, $job->file_type);
|
||||
|
@@ -49,48 +49,24 @@ use FireflyIII\Models\Transaction;
|
||||
*/
|
||||
final class Entry
|
||||
{
|
||||
/** @var int ID of the journal */
|
||||
public $journal_id;
|
||||
/** @var int ID of the transaction */
|
||||
public $transaction_id = 0;
|
||||
/** @var string The date. */
|
||||
public $date;
|
||||
/** @var string The description */
|
||||
public $description;
|
||||
/** @var string The currency code. */
|
||||
public $currency_code;
|
||||
/** @var string The amount. */
|
||||
public $amount;
|
||||
/** @var string The foreign currency code */
|
||||
public $foreign_currency_code = '';
|
||||
/** @var string Foreign amount */
|
||||
public $foreign_amount = '0';
|
||||
/** @var string Transaction type */
|
||||
public $transaction_type;
|
||||
/** @var string Asset account BIC */
|
||||
public $asset_account_bic;
|
||||
/** @var string Asset account IBAN */
|
||||
public $asset_account_iban;
|
||||
/** @var string Asset account ID */
|
||||
public $asset_account_id;
|
||||
/** @var string Asset account name */
|
||||
public $asset_account_name;
|
||||
/** @var string Asset account IBAN */
|
||||
public $asset_account_iban;
|
||||
/** @var string Asset account BIC */
|
||||
public $asset_account_bic;
|
||||
/** @var string Asset account number */
|
||||
public $asset_account_number;
|
||||
/** @var string Asset account currency code */
|
||||
public $asset_currency_code;
|
||||
/** @var string Opposing account ID */
|
||||
public $opposing_account_id;
|
||||
/** @var string Opposing account name */
|
||||
public $opposing_account_name;
|
||||
/** @var string Opposing account IBAN */
|
||||
public $opposing_account_iban;
|
||||
/** @var string Opposing account BIC */
|
||||
public $opposing_account_bic;
|
||||
/** @var string Opposing account number */
|
||||
public $opposing_account_number;
|
||||
/** @var string Opposing account code */
|
||||
public $opposing_currency_code;
|
||||
/** @var string Bill ID */
|
||||
public $bill_id;
|
||||
/** @var string Bill name */
|
||||
public $bill_name;
|
||||
/** @var string Budget ID */
|
||||
public $budget_id;
|
||||
/** @var string Budget name */
|
||||
@@ -99,14 +75,38 @@ final class Entry
|
||||
public $category_id;
|
||||
/** @var string Category name */
|
||||
public $category_name;
|
||||
/** @var string Bill ID */
|
||||
public $bill_id;
|
||||
/** @var string Bill name */
|
||||
public $bill_name;
|
||||
/** @var string The currency code. */
|
||||
public $currency_code;
|
||||
/** @var string The date. */
|
||||
public $date;
|
||||
/** @var string The description */
|
||||
public $description;
|
||||
/** @var string Foreign amount */
|
||||
public $foreign_amount = '0';
|
||||
/** @var string The foreign currency code */
|
||||
public $foreign_currency_code = '';
|
||||
/** @var int ID of the journal */
|
||||
public $journal_id;
|
||||
/** @var string Notes */
|
||||
public $notes;
|
||||
/** @var string Opposing account BIC */
|
||||
public $opposing_account_bic;
|
||||
/** @var string Opposing account IBAN */
|
||||
public $opposing_account_iban;
|
||||
/** @var string Opposing account ID */
|
||||
public $opposing_account_id;
|
||||
/** @var string Opposing account name */
|
||||
public $opposing_account_name;
|
||||
/** @var string Opposing account number */
|
||||
public $opposing_account_number;
|
||||
/** @var string Opposing account code */
|
||||
public $opposing_currency_code;
|
||||
/** @var string Tags */
|
||||
public $tags;
|
||||
/** @var int ID of the transaction */
|
||||
public $transaction_id = 0;
|
||||
/** @var string Transaction type */
|
||||
public $transaction_type;
|
||||
|
||||
/**
|
||||
* Entry constructor.
|
||||
@@ -132,7 +132,7 @@ final class Entry
|
||||
$entry->transaction_id = $transaction->id;
|
||||
$entry->date = $transaction->date->format('Ymd');
|
||||
$entry->description = $transaction->description;
|
||||
if (\strlen((string)$transaction->transaction_description) > 0) {
|
||||
if ('' !== (string)$transaction->transaction_description) {
|
||||
$entry->description = $transaction->transaction_description . '(' . $transaction->description . ')';
|
||||
}
|
||||
$entry->currency_code = $transaction->transactionCurrency->code;
|
||||
|
@@ -25,7 +25,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Export;
|
||||
|
||||
use Crypt;
|
||||
use DB;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Export\Collector\AttachmentCollector;
|
||||
@@ -41,8 +40,8 @@ use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Log;
|
||||
use ZipArchive;
|
||||
|
||||
/**
|
||||
@@ -193,8 +192,8 @@ class ExpandedProcessor implements ProcessorInterface
|
||||
*/
|
||||
public function createZipFile(): bool
|
||||
{
|
||||
$zip = new ZipArchive;
|
||||
$file = $this->job->key . '.zip';
|
||||
$zip = new ZipArchive;
|
||||
$file = $this->job->key . '.zip';
|
||||
$localPath = storage_path('export') . '/' . $file;
|
||||
|
||||
if (true !== $zip->open($localPath, ZipArchive::CREATE)) {
|
||||
@@ -339,7 +338,7 @@ class ExpandedProcessor implements ProcessorInterface
|
||||
$return = [];
|
||||
/** @var Note $note */
|
||||
foreach ($notes as $note) {
|
||||
if (\strlen(trim((string)$note->text)) > 0) {
|
||||
if ('' !== trim((string)$note->text)) {
|
||||
$id = (int)$note->noteable_id;
|
||||
$return[$id] = $note->text;
|
||||
}
|
||||
|
@@ -25,8 +25,8 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Export\Exporter;
|
||||
|
||||
use FireflyIII\Export\Entry\Entry;
|
||||
use League\Csv\Writer;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use League\Csv\Writer;
|
||||
|
||||
/**
|
||||
* Class CsvExporter.
|
||||
|
@@ -49,6 +49,7 @@ class AccountFactory
|
||||
|
||||
/**
|
||||
* AccountFactory constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function __construct()
|
||||
@@ -103,7 +104,7 @@ class AccountFactory
|
||||
// use default currency:
|
||||
$currency = app('amount')->getDefaultCurrencyByUser($this->user);
|
||||
}
|
||||
$currency->enabled =true;
|
||||
$currency->enabled = true;
|
||||
$currency->save();
|
||||
|
||||
unset($data['currency_code']);
|
||||
|
@@ -43,6 +43,7 @@ class AccountMetaFactory
|
||||
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', \get_class($this)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*
|
||||
@@ -73,6 +74,7 @@ class AccountMetaFactory
|
||||
// if $data has field and $entry is null, create new one:
|
||||
if (null === $entry) {
|
||||
Log::debug(sprintf('Created meta-field "%s":"%s" for account #%d ("%s") ', $field, $value, $account->id, $account->name));
|
||||
|
||||
return $this->create(['account_id' => $account->id, 'name' => $field, 'data' => $value]);
|
||||
}
|
||||
|
||||
@@ -89,6 +91,7 @@ class AccountMetaFactory
|
||||
} catch (Exception $e) { // @codeCoverageIgnore
|
||||
Log::debug(sprintf('Could not delete entry: %s', $e->getMessage())); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@@ -38,6 +38,9 @@ class BillFactory
|
||||
{
|
||||
use BillServiceTrait;
|
||||
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
@@ -48,9 +51,6 @@ class BillFactory
|
||||
}
|
||||
}
|
||||
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*
|
||||
@@ -63,7 +63,7 @@ class BillFactory
|
||||
/** @var TransactionCurrency $currency */
|
||||
$currency = $factory->find((int)($data['currency_id'] ?? null), (string)($data['currency_code'] ?? null));
|
||||
|
||||
if(null === $currency) {
|
||||
if (null === $currency) {
|
||||
// use default currency:
|
||||
$currency = app('amount')->getDefaultCurrencyByUser($this->user);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ class BillFactory
|
||||
}
|
||||
|
||||
// then find by name:
|
||||
if (null === $bill && \strlen($billName) > 0) {
|
||||
if (null === $bill && '' !== $billName) {
|
||||
$bill = $this->findByName($billName);
|
||||
}
|
||||
|
||||
|
@@ -34,6 +34,9 @@ use Log;
|
||||
*/
|
||||
class BudgetFactory
|
||||
{
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
@@ -44,10 +47,6 @@ class BudgetFactory
|
||||
}
|
||||
}
|
||||
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
|
||||
/**
|
||||
* @param int|null $budgetId
|
||||
* @param null|string $budgetName
|
||||
|
@@ -34,6 +34,9 @@ use Log;
|
||||
*/
|
||||
class CategoryFactory
|
||||
{
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
@@ -44,9 +47,6 @@ class CategoryFactory
|
||||
}
|
||||
}
|
||||
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
@@ -94,7 +94,7 @@ class CategoryFactory
|
||||
}
|
||||
}
|
||||
|
||||
if (\strlen($categoryName) > 0) {
|
||||
if ('' !== $categoryName) {
|
||||
$category = $this->findByName($categoryName);
|
||||
if (null !== $category) {
|
||||
return $category;
|
||||
|
@@ -33,6 +33,9 @@ use Log;
|
||||
*/
|
||||
class PiggyBankFactory
|
||||
{
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
@@ -43,9 +46,6 @@ class PiggyBankFactory
|
||||
}
|
||||
}
|
||||
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* @param int|null $piggyBankId
|
||||
* @param null|string $piggyBankName
|
||||
@@ -70,7 +70,7 @@ class PiggyBankFactory
|
||||
}
|
||||
|
||||
// then find by name:
|
||||
if (\strlen($piggyBankName) > 0) {
|
||||
if ('' !== $piggyBankName) {
|
||||
/** @var PiggyBank $piggyBank */
|
||||
$piggyBank = $this->findByName($piggyBankName);
|
||||
if (null !== $piggyBank) {
|
||||
|
@@ -39,6 +39,11 @@ use Log;
|
||||
*/
|
||||
class RecurrenceFactory
|
||||
{
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
use TransactionTypeTrait, TransactionServiceTrait, RecurringTransactionTrait;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
@@ -49,11 +54,6 @@ class RecurrenceFactory
|
||||
}
|
||||
}
|
||||
|
||||
use TransactionTypeTrait, TransactionServiceTrait, RecurringTransactionTrait;
|
||||
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*
|
||||
|
@@ -38,6 +38,7 @@ class TransactionCurrencyFactory
|
||||
{
|
||||
/**
|
||||
* TransactionCurrencyFactory constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function __construct()
|
||||
@@ -100,7 +101,7 @@ class TransactionCurrencyFactory
|
||||
Log::warning(sprintf('Currency ID is %d but found nothing!', $currencyId));
|
||||
}
|
||||
// then by code:
|
||||
if (\strlen($currencyCode) > 0) {
|
||||
if ('' !== $currencyCode) {
|
||||
$currency = TransactionCurrency::whereCode($currencyCode)->first();
|
||||
if (null !== $currency) {
|
||||
return $currency;
|
||||
|
@@ -115,7 +115,7 @@ class TransactionFactory
|
||||
$currency = $currency ?? $defaultCurrency;
|
||||
|
||||
// enable currency:
|
||||
if(false === $currency->enabled) {
|
||||
if (false === $currency->enabled) {
|
||||
$currency->enabled = true;
|
||||
$currency->save();
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Factory;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Services\Internal\Support\JournalServiceTrait;
|
||||
@@ -70,14 +71,18 @@ class TransactionJournalFactory
|
||||
Log::debug(sprintf('Going to store a %s', $type->type));
|
||||
$description = app('steam')->cleanString($data['description']);
|
||||
$description = str_replace(["\n", "\t", "\r"], "\x20", $description);
|
||||
$journal = TransactionJournal::create(
|
||||
/** @var Carbon $carbon */
|
||||
$carbon = $data['date'];
|
||||
$carbon->setTimezone(config('app.timezone'));
|
||||
|
||||
$journal = TransactionJournal::create(
|
||||
[
|
||||
'user_id' => $data['user'],
|
||||
'transaction_type_id' => $type->id,
|
||||
'bill_id' => null,
|
||||
'transaction_currency_id' => $defaultCurrency->id,
|
||||
'description' => $description,
|
||||
'date' => $data['date']->format('Y-m-d'),
|
||||
'date' => $carbon->format('Y-m-d H:i:s'),
|
||||
'order' => 0,
|
||||
'tag_count' => 0,
|
||||
'completed' => 0,
|
||||
@@ -92,7 +97,7 @@ class TransactionJournalFactory
|
||||
/** @var TransactionFactory $factory */
|
||||
$factory = app(TransactionFactory::class);
|
||||
$factory->setUser($this->user);
|
||||
$totalAmount= '0';
|
||||
$totalAmount = '0';
|
||||
Log::debug(sprintf('Found %d transactions in array.', \count($data['transactions'])));
|
||||
/** @var array $trData */
|
||||
foreach ($data['transactions'] as $index => $trData) {
|
||||
|
@@ -27,6 +27,7 @@ namespace FireflyIII\Factory;
|
||||
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class TransactionTypeFactory
|
||||
*/
|
||||
|
@@ -24,6 +24,7 @@ namespace FireflyIII\Generator\Chart\Basic;
|
||||
|
||||
use FireflyIII\Support\ChartColour;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class ChartJsGenerator.
|
||||
*/
|
||||
@@ -39,6 +40,46 @@ class ChartJsGenerator implements GeneratorInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Expects data as:.
|
||||
*
|
||||
* key => [value => x, 'currency_symbol' => 'x']
|
||||
*
|
||||
* @param array $data
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function multiCurrencyPieChart(array $data): array
|
||||
{
|
||||
$chartData = [
|
||||
'datasets' => [
|
||||
0 => [],
|
||||
],
|
||||
'labels' => [],
|
||||
];
|
||||
|
||||
$amounts = array_column($data, 'amount');
|
||||
$next = next($amounts);
|
||||
$sortFlag = SORT_ASC;
|
||||
if (!\is_bool($next) && 1 === bccomp((string)$next, '0')) {
|
||||
$sortFlag = SORT_DESC;
|
||||
}
|
||||
array_multisort($amounts, $sortFlag, $data);
|
||||
unset($next, $sortFlag, $amounts);
|
||||
|
||||
$index = 0;
|
||||
foreach ($data as $key => $valueArray) {
|
||||
// make larger than 0
|
||||
$chartData['datasets'][0]['data'][] = (float)app('steam')->positive((string)$valueArray['amount']);
|
||||
$chartData['datasets'][0]['backgroundColor'][] = ChartColour::getColour($index);
|
||||
$chartData['datasets'][0]['currency_symbol'][] = $valueArray['currency_symbol'];
|
||||
$chartData['labels'][] = $key;
|
||||
++$index;
|
||||
}
|
||||
|
||||
return $chartData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will generate a Chart JS compatible array from the given input. Expects this format.
|
||||
*
|
||||
@@ -150,46 +191,6 @@ class ChartJsGenerator implements GeneratorInterface
|
||||
return $chartData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expects data as:.
|
||||
*
|
||||
* key => [value => x, 'currency_symbol' => 'x']
|
||||
*
|
||||
* @param array $data
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function multiCurrencyPieChart(array $data): array
|
||||
{
|
||||
$chartData = [
|
||||
'datasets' => [
|
||||
0 => [],
|
||||
],
|
||||
'labels' => [],
|
||||
];
|
||||
|
||||
$amounts = array_column($data, 'amount');
|
||||
$next = next($amounts);
|
||||
$sortFlag = SORT_ASC;
|
||||
if (!\is_bool($next) && 1 === bccomp((string)$next, '0')) {
|
||||
$sortFlag = SORT_DESC;
|
||||
}
|
||||
array_multisort($amounts, $sortFlag, $data);
|
||||
unset($next, $sortFlag, $amounts);
|
||||
|
||||
$index = 0;
|
||||
foreach ($data as $key => $valueArray) {
|
||||
// make larger than 0
|
||||
$chartData['datasets'][0]['data'][] = (float)app('steam')->positive((string)$valueArray['amount']);
|
||||
$chartData['datasets'][0]['backgroundColor'][] = ChartColour::getColour($index);
|
||||
$chartData['datasets'][0]['currency_symbol'][] = $valueArray['currency_symbol'];
|
||||
$chartData['labels'][] = $key;
|
||||
++$index;
|
||||
}
|
||||
|
||||
return $chartData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will generate a (ChartJS) compatible array from the given input. Expects this format:.
|
||||
*
|
||||
|
@@ -24,6 +24,7 @@ namespace FireflyIII\Generator\Report\Audit;
|
||||
|
||||
/**
|
||||
* Class MultiYearReportGenerator.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class MultiYearReportGenerator extends MonthReportGenerator
|
||||
|
@@ -24,6 +24,7 @@ namespace FireflyIII\Generator\Report\Audit;
|
||||
|
||||
/**
|
||||
* Class YearReportGenerator.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class YearReportGenerator extends MonthReportGenerator
|
||||
|
@@ -24,6 +24,7 @@ namespace FireflyIII\Generator\Report\Budget;
|
||||
|
||||
/**
|
||||
* Class MultiYearReportGenerator.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class MultiYearReportGenerator extends MonthReportGenerator
|
||||
|
@@ -24,6 +24,7 @@ namespace FireflyIII\Generator\Report\Budget;
|
||||
|
||||
/**
|
||||
* Class YearReportGenerator.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class YearReportGenerator extends MonthReportGenerator
|
||||
|
@@ -40,6 +40,7 @@ use Throwable;
|
||||
|
||||
/**
|
||||
* Class MonthReportGenerator.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class MonthReportGenerator extends Support implements ReportGeneratorInterface
|
||||
|
@@ -24,6 +24,7 @@ namespace FireflyIII\Generator\Report\Category;
|
||||
|
||||
/**
|
||||
* Class MultiYearReportGenerator.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class MultiYearReportGenerator extends MonthReportGenerator
|
||||
|
@@ -24,6 +24,7 @@ namespace FireflyIII\Generator\Report\Category;
|
||||
|
||||
/**
|
||||
* Class YearReportGenerator.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class YearReportGenerator extends MonthReportGenerator
|
||||
|
@@ -27,6 +27,7 @@ use FireflyIII\Exceptions\FireflyException;
|
||||
|
||||
/**
|
||||
* Class ReportGeneratorFactory.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class ReportGeneratorFactory
|
||||
|
@@ -31,6 +31,7 @@ use Throwable;
|
||||
|
||||
/**
|
||||
* Class MonthReportGenerator.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class MonthReportGenerator implements ReportGeneratorInterface
|
||||
|
@@ -30,6 +30,7 @@ use Throwable;
|
||||
|
||||
/**
|
||||
* Class MonthReportGenerator.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class MultiYearReportGenerator implements ReportGeneratorInterface
|
||||
|
@@ -30,6 +30,7 @@ use Throwable;
|
||||
|
||||
/**
|
||||
* Class MonthReportGenerator.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class YearReportGenerator implements ReportGeneratorInterface
|
||||
|
@@ -31,6 +31,7 @@ use Illuminate\Support\Collection;
|
||||
* Class Support.
|
||||
* @method Collection getExpenses()
|
||||
* @method Collection getIncome()
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Support
|
||||
|
@@ -24,6 +24,7 @@ namespace FireflyIII\Generator\Report\Tag;
|
||||
|
||||
/**
|
||||
* Class MultiYearReportGenerator.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class MultiYearReportGenerator extends MonthReportGenerator
|
||||
|
@@ -24,6 +24,7 @@ namespace FireflyIII\Generator\Report\Tag;
|
||||
|
||||
/**
|
||||
* Class YearReportGenerator.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class YearReportGenerator extends MonthReportGenerator
|
||||
|
@@ -49,7 +49,7 @@ class StoredJournalEventHandler
|
||||
/** @var RuleGroupRepositoryInterface $ruleGroupRepos */
|
||||
$ruleGroupRepos = app(RuleGroupRepositoryInterface::class);
|
||||
$ruleGroupRepos->setUser($journal->user);
|
||||
$groups = $ruleGroupRepos->getActiveGroups($journal->user);
|
||||
$groups = $ruleGroupRepos->getActiveGroups($journal->user);
|
||||
|
||||
/** @var RuleGroup $group */
|
||||
foreach ($groups as $group) {
|
||||
|
@@ -50,7 +50,7 @@ class UpdatedJournalEventHandler
|
||||
$ruleGroupRepos = app(RuleGroupRepositoryInterface::class);
|
||||
$ruleGroupRepos->setUser($journal->user);
|
||||
|
||||
$groups = $ruleGroupRepos->getActiveGroups($journal->user);
|
||||
$groups = $ruleGroupRepos->getActiveGroups($journal->user);
|
||||
|
||||
/** @var RuleGroup $group */
|
||||
foreach ($groups as $group) {
|
||||
|
@@ -146,6 +146,7 @@ class UserEventHandler
|
||||
} catch (Exception $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return true;
|
||||
@@ -172,6 +173,7 @@ class UserEventHandler
|
||||
} catch (Exception $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return true;
|
||||
@@ -199,6 +201,7 @@ class UserEventHandler
|
||||
} catch (Exception $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return true;
|
||||
|
@@ -26,11 +26,12 @@ use Crypt;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Attachment;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Illuminate\Contracts\Filesystem\FileNotFoundException;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\MessageBag;
|
||||
use Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
|
||||
/**
|
||||
@@ -85,7 +86,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
|
||||
try {
|
||||
$content = Crypt::decrypt($this->uploadDisk->get(sprintf('at-%d.data', $attachment->id)));
|
||||
} catch (DecryptException $e) {
|
||||
} catch (DecryptException|FileNotFoundException $e) {
|
||||
Log::error(sprintf('Could not decrypt data of attachment #%d: %s', $attachment->id, $e->getMessage()));
|
||||
$content = '';
|
||||
}
|
||||
@@ -102,8 +103,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
*/
|
||||
public function getAttachmentLocation(Attachment $attachment): string
|
||||
{
|
||||
$path = sprintf('%sat-%d.data', DIRECTORY_SEPARATOR, (int)$attachment->id);
|
||||
return $path;
|
||||
return sprintf('%sat-%d.data', DIRECTORY_SEPARATOR, (int)$attachment->id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,11 +186,11 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
* @param array|null $files
|
||||
*
|
||||
* @return bool
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function saveAttachmentsForModel(object $model, ?array $files): bool
|
||||
{
|
||||
if(!($model instanceof Model)) {
|
||||
if (!($model instanceof Model)) {
|
||||
return false; // @codeCoverageIgnore
|
||||
}
|
||||
Log::debug(sprintf('Now in saveAttachmentsForModel for model %s', \get_class($model)));
|
||||
@@ -265,10 +265,10 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
$attachment->save();
|
||||
Log::debug('Created attachment:', $attachment->toArray());
|
||||
|
||||
$fileObject = $file->openFile('r');
|
||||
$fileObject = $file->openFile();
|
||||
$fileObject->rewind();
|
||||
|
||||
if(0 === $file->getSize()) {
|
||||
if (0 === $file->getSize()) {
|
||||
throw new FireflyException('Cannot upload empty or non-existent file.'); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
|
@@ -145,15 +145,6 @@ interface TransactionCollectorInterface
|
||||
*/
|
||||
public function setAllAssetAccounts(): TransactionCollectorInterface;
|
||||
|
||||
/**
|
||||
* Set the required currency (local or foreign)
|
||||
*
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return TransactionCollectorInterface
|
||||
*/
|
||||
public function setCurrency(TransactionCurrency $currency): TransactionCollectorInterface;
|
||||
|
||||
/**
|
||||
* Collect transactions before a specific date.
|
||||
*
|
||||
@@ -208,6 +199,15 @@ interface TransactionCollectorInterface
|
||||
*/
|
||||
public function setCategory(Category $category): TransactionCollectorInterface;
|
||||
|
||||
/**
|
||||
* Set the required currency (local or foreign)
|
||||
*
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return TransactionCollectorInterface
|
||||
*/
|
||||
public function setCurrency(TransactionCurrency $currency): TransactionCollectorInterface;
|
||||
|
||||
/**
|
||||
* Set the journal IDs to filter on.
|
||||
*
|
||||
|
@@ -31,6 +31,7 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class CountAttachmentsFilter
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class CountAttachmentsFilter implements FilterInterface
|
||||
|
@@ -26,6 +26,7 @@ use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class TransferFilter.
|
||||
*
|
||||
|
@@ -25,7 +25,6 @@ namespace FireflyIII\Helpers\Help;
|
||||
use Cache;
|
||||
use Exception;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use League\CommonMark\CommonMarkConverter;
|
||||
use Log;
|
||||
use Route;
|
||||
@@ -87,14 +86,14 @@ class Help implements HelpInterface
|
||||
$res = $client->request('GET', $uri, $opt);
|
||||
$statusCode = $res->getStatusCode();
|
||||
$content = trim($res->getBody()->getContents());
|
||||
} catch (GuzzleException|Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
Log::info($e->getMessage());
|
||||
Log::info($e->getTraceAsString());
|
||||
}
|
||||
|
||||
Log::debug(sprintf('Status code is %d', $statusCode));
|
||||
|
||||
if (\strlen($content) > 0) {
|
||||
if ('' !== $content) {
|
||||
Log::debug('Content is longer than zero. Expect something.');
|
||||
$converter = new CommonMarkConverter();
|
||||
$content = $converter->convertToHtml($content);
|
||||
@@ -153,7 +152,7 @@ class Help implements HelpInterface
|
||||
public function putInCache(string $route, string $language, string $content): void
|
||||
{
|
||||
$key = sprintf(self::CACHEKEY, $route, $language);
|
||||
if (\strlen($content) > 0) {
|
||||
if ('' !== $content) {
|
||||
Log::debug(sprintf('Will store entry in cache: %s', $key));
|
||||
Cache::put($key, $content, 10080); // a week.
|
||||
|
||||
|
@@ -25,7 +25,6 @@ namespace FireflyIII\Helpers\Report;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
|
@@ -31,6 +31,7 @@ use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class PopupReport.
|
||||
*
|
||||
@@ -186,7 +187,7 @@ class PopupReport implements PopupReportInterface
|
||||
$collector->setAccounts(new Collection([$account]))->setRange($attributes['startDate'], $attributes['endDate'])
|
||||
->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER]);
|
||||
$transactions = $collector->getTransactions();
|
||||
$report = $attributes['accounts']->pluck('id')->toArray(); // accounts used in this report
|
||||
$report = $attributes['accounts']->pluck('id')->toArray(); // accounts used in this report
|
||||
|
||||
// filter the set so the destinations outside of $attributes['accounts'] are not included.
|
||||
$transactions = $transactions->filter(
|
||||
|
@@ -33,6 +33,7 @@ use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class ReportHelper.
|
||||
*
|
||||
|
@@ -50,6 +50,8 @@ trait UpdateTrait
|
||||
$request->call();
|
||||
} catch (FireflyException $e) {
|
||||
Log::error(sprintf('Could not check for updates: %s', $e->getMessage()));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// get releases from array.
|
||||
@@ -79,19 +81,22 @@ trait UpdateTrait
|
||||
public function parseResult(int $versionCheck, Release $release = null): string
|
||||
{
|
||||
Log::debug(sprintf('Now in parseResult(%d)', $versionCheck));
|
||||
$current = (string)config('firefly.version');
|
||||
$return = '';
|
||||
$current = (string)config('firefly.version');
|
||||
$return = '';
|
||||
$triggered = false;
|
||||
if ($versionCheck === -2) {
|
||||
Log::debug('-2, so give error.');
|
||||
$return = (string)trans('firefly.update_check_error');
|
||||
$return = (string)trans('firefly.update_check_error');
|
||||
$triggered = true;
|
||||
}
|
||||
if ($versionCheck === -1 && null !== $release) {
|
||||
$triggered = true;
|
||||
Log::debug('New version!');
|
||||
// there is a new FF version!
|
||||
// has it been released for at least three days?
|
||||
$today = new Carbon;
|
||||
$releaseDate = $release->getUpdated();
|
||||
if ($today->diffInDays($releaseDate, true) > 3) {
|
||||
if ($today->diffInDays($releaseDate) > 3) {
|
||||
Log::debug('New version is older than 3 days!');
|
||||
$monthAndDayFormat = (string)trans('config.month_and_day');
|
||||
$return = (string)trans(
|
||||
@@ -106,16 +111,23 @@ trait UpdateTrait
|
||||
}
|
||||
|
||||
if (0 === $versionCheck) {
|
||||
$triggered = true;
|
||||
Log::debug('User is running current version.');
|
||||
// you are running the current version!
|
||||
$return = (string)trans('firefly.update_current_version_alert', ['version' => $current]);
|
||||
}
|
||||
if (1 === $versionCheck && null !== $release) {
|
||||
$triggered = true;
|
||||
Log::debug('User is running NEWER version.');
|
||||
// you are running a newer version!
|
||||
$return = (string)trans('firefly.update_newer_version_alert', ['your_version' => $current, 'new_version' => $release->getTitle()]);
|
||||
}
|
||||
|
||||
if (false === $triggered) {
|
||||
Log::debug('No option was triggered.');
|
||||
$return = (string)trans('firefly.update_check_error');
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -131,6 +143,7 @@ trait UpdateTrait
|
||||
Log::debug('Now in versionCheck()');
|
||||
if (null === $release) {
|
||||
Log::debug('Release is null, return -2.');
|
||||
|
||||
return -2;
|
||||
}
|
||||
$current = (string)config('firefly.version');
|
||||
|
@@ -84,9 +84,9 @@ class CreateController extends Controller
|
||||
$loan = $this->repository->getAccountTypeByType(AccountType::LOAN);
|
||||
$mortgage = $this->repository->getAccountTypeByType(AccountType::MORTGAGE);
|
||||
$liabilityTypes = [
|
||||
$debt->id => (string)trans('firefly.account_type_' . AccountType::DEBT),
|
||||
$loan->id => (string)trans('firefly.account_type_' . AccountType::LOAN),
|
||||
$mortgage->id => (string)trans('firefly.account_type_' . AccountType::MORTGAGE),
|
||||
$debt->id => (string)trans('firefly.account_type_' . AccountType::DEBT),
|
||||
$loan->id => (string)trans('firefly.account_type_' . AccountType::LOAN),
|
||||
$mortgage->id => (string)trans('firefly.account_type_' . AccountType::MORTGAGE),
|
||||
];
|
||||
asort($liabilityTypes);
|
||||
|
||||
@@ -111,6 +111,7 @@ class CreateController extends Controller
|
||||
$this->rememberPreviousUri('accounts.create.uri');
|
||||
}
|
||||
$request->session()->forget('accounts.create.fromStore');
|
||||
Log::channel('audit')->info('Create new account.');
|
||||
|
||||
return view('accounts.create', compact('subTitleIcon', 'what', 'interestPeriods', 'subTitle', 'roles', 'liabilityTypes'));
|
||||
}
|
||||
@@ -131,7 +132,7 @@ class CreateController extends Controller
|
||||
$request->session()->flash('success', (string)trans('firefly.stored_new_account', ['name' => $account->name]));
|
||||
app('preferences')->mark();
|
||||
|
||||
|
||||
Log::channel('audit')->info('Store new account.', $data);
|
||||
|
||||
// update preferences if necessary:
|
||||
$frontPage = app('preferences')->get('frontPageAccounts', [])->data;
|
||||
|
@@ -91,9 +91,9 @@ class EditController extends Controller
|
||||
$loan = $this->repository->getAccountTypeByType(AccountType::LOAN);
|
||||
$mortgage = $this->repository->getAccountTypeByType(AccountType::MORTGAGE);
|
||||
$liabilityTypes = [
|
||||
$debt->id => (string)trans('firefly.account_type_' . AccountType::DEBT),
|
||||
$loan->id => (string)trans('firefly.account_type_' . AccountType::LOAN),
|
||||
$mortgage->id => (string)trans('firefly.account_type_' . AccountType::MORTGAGE),
|
||||
$debt->id => (string)trans('firefly.account_type_' . AccountType::DEBT),
|
||||
$loan->id => (string)trans('firefly.account_type_' . AccountType::LOAN),
|
||||
$mortgage->id => (string)trans('firefly.account_type_' . AccountType::MORTGAGE),
|
||||
];
|
||||
asort($liabilityTypes);
|
||||
|
||||
|
@@ -145,7 +145,6 @@ class ShowController extends Controller
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|View
|
||||
*
|
||||
* @throws FireflyException
|
||||
*
|
||||
*/
|
||||
public function showAll(Request $request, Account $account)
|
||||
@@ -177,7 +176,7 @@ class ShowController extends Controller
|
||||
|
||||
return view(
|
||||
'accounts.show',
|
||||
compact('account', 'showAll','isLiability', 'currency', 'today', 'chartUri', 'periods', 'subTitleIcon', 'transactions', 'subTitle', 'start', 'end')
|
||||
compact('account', 'showAll', 'isLiability', 'currency', 'today', 'chartUri', 'periods', 'subTitleIcon', 'transactions', 'subTitle', 'start', 'end')
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -27,8 +27,8 @@ use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Middleware\IsDemoUser;
|
||||
use FireflyIII\Http\Middleware\IsSandStormUser;
|
||||
use FireflyIII\Http\Requests\ConfigurationRequest;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class ConfigurationController.
|
||||
@@ -64,10 +64,12 @@ class ConfigurationController extends Controller
|
||||
$subTitle = (string)trans('firefly.instance_configuration');
|
||||
$subTitleIcon = 'fa-wrench';
|
||||
|
||||
Log::channel('audit')->info('User visits admin config index.');
|
||||
|
||||
// all available configuration and their default value in case
|
||||
// they don't exist yet.
|
||||
$singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
|
||||
$isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
|
||||
$singleUserMode = app('fireflyconfig')->get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
|
||||
$isDemoSite = app('fireflyconfig')->get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
|
||||
$siteOwner = config('firefly.site_owner');
|
||||
|
||||
return view(
|
||||
@@ -88,9 +90,11 @@ class ConfigurationController extends Controller
|
||||
// get config values:
|
||||
$data = $request->getConfigurationData();
|
||||
|
||||
Log::channel('audit')->info('User updates global configuration.', $data);
|
||||
|
||||
// store config values
|
||||
FireflyConfig::set('single_user_mode', $data['single_user_mode']);
|
||||
FireflyConfig::set('is_demo_site', $data['is_demo_site']);
|
||||
app('fireflyconfig')->set('single_user_mode', $data['single_user_mode']);
|
||||
app('fireflyconfig')->set('is_demo_site', $data['is_demo_site']);
|
||||
|
||||
// flash message
|
||||
session()->flash('success', (string)trans('firefly.configuration_updated'));
|
||||
|
@@ -52,6 +52,7 @@ class HomeController extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
Log::channel('audit')->info('User visits admin index.');
|
||||
$title = (string)trans('firefly.administration');
|
||||
$mainTitleIcon = 'fa-hand-spock-o';
|
||||
$sandstorm = 1 === (int)getenv('SANDSTORM');
|
||||
@@ -68,6 +69,7 @@ class HomeController extends Controller
|
||||
*/
|
||||
public function testMessage(Request $request)
|
||||
{
|
||||
Log::channel('audit')->info('User sends test message.');
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
$ipAddress = $request->ip();
|
||||
|
@@ -28,6 +28,7 @@ use FireflyIII\Http\Requests\LinkTypeFormRequest;
|
||||
use FireflyIII\Models\LinkType;
|
||||
use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
use View;
|
||||
|
||||
/**
|
||||
@@ -63,6 +64,8 @@ class LinkController extends Controller
|
||||
$subTitle = (string)trans('firefly.create_new_link_type');
|
||||
$subTitleIcon = 'fa-link';
|
||||
|
||||
Log::channel('audit')->info('User visits link index.');
|
||||
|
||||
// put previous url in session if not redirect from store (not "create another").
|
||||
if (true !== session('link-types.create.fromStore')) {
|
||||
$this->rememberPreviousUri('link-types.create.uri');
|
||||
@@ -88,6 +91,8 @@ class LinkController extends Controller
|
||||
return redirect(route('admin.links.index'));
|
||||
}
|
||||
|
||||
Log::channel('audit')->info(sprintf('User wants to delete link type #%d', $linkType->id));
|
||||
|
||||
$subTitle = (string)trans('firefly.delete_link_type', ['name' => $linkType->name]);
|
||||
$otherTypes = $repository->get();
|
||||
$count = $repository->countJournals($linkType);
|
||||
@@ -116,6 +121,7 @@ class LinkController extends Controller
|
||||
*/
|
||||
public function destroy(Request $request, LinkTypeRepositoryInterface $repository, LinkType $linkType)
|
||||
{
|
||||
Log::channel('audit')->info(sprintf('User destroyed link type #%d', $linkType->id));
|
||||
$name = $linkType->name;
|
||||
$moveTo = $repository->findNull((int)$request->get('move_link_type_before_delete'));
|
||||
$repository->destroy($linkType, $moveTo);
|
||||
@@ -144,6 +150,8 @@ class LinkController extends Controller
|
||||
$subTitle = (string)trans('firefly.edit_link_type', ['name' => $linkType->name]);
|
||||
$subTitleIcon = 'fa-link';
|
||||
|
||||
Log::channel('audit')->info(sprintf('User wants to edit link type #%d', $linkType->id));
|
||||
|
||||
// put previous url in session if not redirect from store (not "return_to_edit").
|
||||
if (true !== session('link-types.edit.fromUpdate')) {
|
||||
$this->rememberPreviousUri('link-types.edit.uri'); // @codeCoverageIgnore
|
||||
@@ -165,6 +173,8 @@ class LinkController extends Controller
|
||||
$subTitle = (string)trans('firefly.journal_link_configuration');
|
||||
$subTitleIcon = 'fa-link';
|
||||
$linkTypes = $repository->get();
|
||||
|
||||
Log::channel('audit')->info('User on index of link types in admin.');
|
||||
$linkTypes->each(
|
||||
function (LinkType $linkType) use ($repository) {
|
||||
$linkType->journalCount = $repository->countJournals($linkType);
|
||||
@@ -187,6 +197,8 @@ class LinkController extends Controller
|
||||
$subTitleIcon = 'fa-link';
|
||||
$links = $linkType->transactionJournalLinks()->get();
|
||||
|
||||
Log::channel('audit')->info(sprintf('User viewing link type #%d', $linkType->id));
|
||||
|
||||
return view('admin.link.show', compact('subTitle', 'subTitleIcon', 'linkType', 'links'));
|
||||
}
|
||||
|
||||
@@ -206,6 +218,9 @@ class LinkController extends Controller
|
||||
'outward' => $request->string('outward'),
|
||||
];
|
||||
$linkType = $repository->store($data);
|
||||
|
||||
Log::channel('audit')->info('User stored new link type.', $linkType->toArray());
|
||||
|
||||
$request->session()->flash('success', (string)trans('firefly.stored_new_link_type', ['name' => $linkType->name]));
|
||||
$redirect = redirect($this->getPreviousUri('link-types.create.uri'));
|
||||
if (1 === (int)$request->get('create_another')) {
|
||||
@@ -243,6 +258,8 @@ class LinkController extends Controller
|
||||
];
|
||||
$repository->update($linkType, $data);
|
||||
|
||||
Log::channel('audit')->info(sprintf('User update link type #%d.', $linkType->id), $data);
|
||||
|
||||
$request->session()->flash('success', (string)trans('firefly.updated_link_type', ['name' => $linkType->name]));
|
||||
app('preferences')->mark();
|
||||
$redirect = redirect($this->getPreviousUri('link-types.edit.uri'));
|
||||
|
@@ -23,12 +23,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Admin;
|
||||
|
||||
use FireflyConfig;
|
||||
use FireflyIII\Helpers\Update\UpdateTrait;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Middleware\IsDemoUser;
|
||||
use FireflyIII\Http\Middleware\IsSandStormUser;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class HomeController.
|
||||
@@ -87,8 +87,8 @@ class UpdateController extends Controller
|
||||
public function post(Request $request)
|
||||
{
|
||||
$checkForUpdates = (int)$request->get('check_for_updates');
|
||||
FireflyConfig::set('permission_update_check', $checkForUpdates);
|
||||
FireflyConfig::set('last_update_check', time());
|
||||
app('fireflyconfig')->set('permission_update_check', $checkForUpdates);
|
||||
app('fireflyconfig')->set('last_update_check', time());
|
||||
session()->flash('success', (string)trans('firefly.configuration_updated'));
|
||||
|
||||
return redirect(route('admin.update-check'));
|
||||
@@ -102,12 +102,13 @@ class UpdateController extends Controller
|
||||
$latestRelease = $this->getLatestRelease();
|
||||
$versionCheck = $this->versionCheck($latestRelease);
|
||||
$resultString = $this->parseResult($versionCheck, $latestRelease);
|
||||
Log::debug(sprintf('Result string is: "%s"', $resultString));
|
||||
|
||||
if (0 !== $versionCheck && '' !== $resultString) {
|
||||
// flash info
|
||||
session()->flash('info', $resultString);
|
||||
}
|
||||
FireflyConfig::set('last_update_check', time());
|
||||
app('fireflyconfig')->set('last_update_check', time());
|
||||
|
||||
return response()->json(['result' => $resultString]);
|
||||
}
|
||||
|
@@ -178,7 +178,7 @@ class UserController extends Controller
|
||||
$data = $request->getUserData();
|
||||
|
||||
// update password
|
||||
if (\strlen($data['password']) > 0) {
|
||||
if ('' !== $data['password']) {
|
||||
$repository->changePassword($user, $data['password']);
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user