Commit Graph

5949 Commits

Author SHA1 Message Date
objecttothis
3da79fc47c Added long running query tag
- Now if queries run for longer than 0.5 s, a tag will be appended to the log [LONG RUNNING QUERY]
- If app.db_log_only_long is set to true in the .env file, the db log will only show long running queries.
2024-06-15 17:19:15 +02:00
objecttothis
e90029dea6 Changed db log file type
- It's inaccurate to log these as .php files since they do not contain php.
2024-06-15 17:19:15 +02:00
objecttothis
ad9645020c Database Logging fixes
- Corrected the event listener names. `post_controller` no longer exists.
- Corrected the db_log_queries function to pull just the most recent query
- Added function to convert time into a more easily understood unit when small
2024-06-15 17:19:15 +02:00
objecttothis
2bb4b7c865 Formatting and naming refactor
- Added `@noinspection PhpUnused` tags to PHPdocs for functions which are called via AJAX.
- removed conversion to array in getResult in favor of returning an array to begin with.
- Refactored variable for clarity.
- declared variable in view coming from controller
- Added PHPdocs
- Refactored nested if/else statements into ternary notation.
- Corrected tab type
- added missing model declaration in view
- Modified query builder to extrapolate out the set() command for clarity
2024-06-15 17:19:15 +02:00
objecttothis
c971e025b8 Fix gitignore
- Removed ignore from master .gitignore
- Added .gitignore to item_pics directory.
- Added .gitignore to uploads directory.
2024-06-15 17:19:15 +02:00
jekkos
05372b96cc Fix string escape (#3468) 2024-06-15 17:19:15 +02:00
objecttothis
086a90b04d Code fixes
- Added PHPdoc tags for the IDE to ignore unused function inspections on AJAX calls.
- set TRUE, FALSE, NULL to true, false, null for PSR-2,12 compliance
2024-06-15 17:19:15 +02:00
objecttothis
6074d984ed Code fixes
- Replaced ternary notation with null coalescing version.
- Removed unnecessary semi-colon
- Replaced `<? echo` with short echo ``<?=`
- declared stay_open explicitly with `let`
- Updated PHPdocs
- Replaced force_download() from the CI3 download helper with CI4 version
- Removed unneeded using statements
- added needed call to db_connect()
- Removed parameter that matches the default value since it's redundant.
2024-06-15 17:19:15 +02:00
objecttothis
20bbe8c783 Formatting fixes 2024-06-15 17:19:15 +02:00
objecttothis
a5cdbe4523 Attributes fixes and warning removal
- Declared variable in view coming down from controller
- refactored javascript variable name to remove duplicate declaration warning
- Import missing class
2024-06-15 17:19:15 +02:00
objecttothis
405583c832 Attributes fixes and warning removal
- when the payments array was folded into sale_data there was an earlier payments[] reference in the foreach loop that didn't get folded in.
- Update PHPdoc
- Added ::class to remove polymorphic call warning
- Removed unreachable 'break;' statement after return statement.
- Added missing return type
- fixed missing assignment of mailchimp_api_key
2024-06-15 17:19:15 +02:00
objecttothis
6a316c56f6 Attributes fixes and warning removal
- missing return type in Events->load_config(), added void
- Dynamic property creation is deprecated starting in php 8.2. The solution is to declare the property in the class before using it.
- Added ::class to model instantiations to remove "potentially polymorphic call" warnings
- Corrected phpdoc
2024-06-15 17:19:15 +02:00
objecttothis
54f5b6fa8f Downgraded laminas/laminas-escaper
- 2.13 drops support for php 7.4 and 8.0
- Fixed 2.12 support for now
2024-06-15 17:19:15 +02:00
objecttothis
e5dcdd5970 Attributes queries fixes
- Minor formatting fixes
- Adding back bitwise equals into query using RawSql()
- Corrected GET method to POST
- Removed if statement causing no attribute values
- Removed param in get() from CI3
- Changed setAttribute to setTextAttribute
- Replaced NULL constant with null keyword PSR-2,12
- Replaced TRUE/FALSE constants with true/false keywords PSR-2,12
- explicit cast to get rid of deprecation warning
2024-06-15 17:19:15 +02:00
jekkos
6b7608fd62 Fix bootstrap tables prefix in conversion 2024-06-15 17:19:15 +02:00
jekkos
43c37da01a Sync language files (#3468) 2024-06-15 17:19:15 +02:00
objecttothis
af21beb19e Resolve issue with item_pics
- item_pics were being escaped by bootstrap-table
2024-06-15 17:19:15 +02:00
objecttothis
0de0f3ec89 bump bootstrap5
- bootstrap5 to 5.3.2
- bootswatch5 to 5.3.2
2024-06-15 17:19:15 +02:00
objecttothis
aa5bfd9b18 bump readable-stream to 4.4.2 2024-06-15 17:19:15 +02:00
objecttothis
3536454638 bump gulp-debug to 5.0.1 2024-06-15 17:19:15 +02:00
objecttothis
08f1318268 bump npm-check-updates to 16.14.6 2024-06-15 17:19:15 +02:00
objecttothis
397194f2ca ignore files in uploads 2024-06-15 17:19:15 +02:00
objecttothis
75d66f62c0 ignore webp files 2024-06-15 17:19:15 +02:00
objecttothis
b19b4818e3 Roll back committed injections 2024-06-15 17:19:15 +02:00
objecttothis
2601fbb7b0 Formatting fixes
- Removed TODOs
- String Interpolation
- Changed quotes in html to match the rest of code
2024-06-15 17:19:15 +02:00
objecttothis
e8e3073553 - Converted statement to ternary notation for readability
- Removed space
- Removed TODO
- Added TODO
2024-06-15 17:19:15 +02:00
objecttothis
6c6b1cb4bc gitignore transient files 2024-06-15 17:19:15 +02:00
objecttothis
8081a98243 gitignore debugbar 2024-06-15 17:19:15 +02:00
objecttothis
3025615ff8 gitignore logs 2024-06-15 17:19:15 +02:00
objecttothis
2fa3ef3c30 Removed non-existent folders from gitignore 2024-06-15 17:19:15 +02:00
objecttothis
aa5fd5d0aa Fixed Thumbnail Generation Endpoint
- String interpolation
- Removed TODO
- Reworked thumbnail creation for CI4
- Corrected capitalization in calling function URL
- Added send() to return the HTTP response
2024-06-15 17:19:15 +02:00
objecttothis
f661284612 fixed out of range segment 2024-06-15 17:19:15 +02:00
objecttothis
fd77dcfc5e Syntax errors
- Deleted extra closing parenthesis
2024-06-15 17:19:15 +02:00
objecttothis
c5c4a528b4 Fixed incorrect session table name 2024-06-15 17:19:15 +02:00
objecttothis
85de6adadb Upgrade CI to 4.4.3
- Bump composer.json/lock to codeigniter 4.4.3
- Fix base_url() call without arguments
- Updated files in the project space
- Bump composer.json/lock to kint 5.0.4
- Update composer.json to include missing CI elements
- Corrected composer.json regarding minimum versions
- Updated README.md to reflect CI4 implementation
- Migrated some Routes.php to Routing.php
- Removed deprecated settings from Config/App.php
2024-06-15 17:19:15 +02:00
objecttothis
93a3788467 Replaced BASEPATH with FCPATH 2024-06-15 17:19:15 +02:00
objecttothis
62cfc67779 add location to gitignore 2024-06-15 17:19:15 +02:00
objecttothis
3072b4c1c0 Remove location from gitignore 2024-06-15 17:19:15 +02:00
jekkos
2c4a2f7af1 Remove Gruntfile.js + bower.json (#3842) 2024-06-15 17:19:15 +02:00
objecttothis
7d791ba59f Corrected keys for Bootstrap_tables.php 2024-06-15 17:19:15 +02:00
objecttothis
74210bead5 Bump to allow php 8.1 2024-06-15 17:19:15 +02:00
Doug Hutcheson
044170b2b1 CI4: Bugfix test sanity of config item
Add a !empty test when dereferencing mailchimp_api_key and mailchimp_list_id from the config array.
2024-06-15 17:19:15 +02:00
Doug Hutcheson
8ea5fc5078 CI4: Bugfix to correct two config issues
Adds 'payment_message' to the app_config table and corrects a typo in Views/login.php where 'Login.form' should have been 'login_form'.
2024-06-15 17:19:15 +02:00
jekkos
b4d117011a Add CI4 language migration scripts (#3468) 2024-06-15 17:19:15 +02:00
Doug Hutcheson
1a465621e0 Ci4 bugfix string interpolation (#3836)
* CI4: Bugfix string interpolation language files

These are the language files with all placeholders converted to CI4 numbered style eg {0}.

* CI4: Bugfix string interpolation source code files

These are the controllers and views which call lang() with parameters to be interpolated.

* CI4: Bugfix string interpolation shell scripts

These are the Linux bash scripts which use the sed (stream editor) utility to convert earlier forms of placeholders to CI4 numeric type. A number of typographical errors in the original Language files were corrected by these scripts.
2024-06-15 17:19:15 +02:00
Edwin Smith
af51e4c735 Clean up work on reports listing view and lang() methods (#3707)
* reworked reports and listing page to handle lang() functions in CI_4

* removed old methods

* update code style

* updated bracket style

---------

Co-authored-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
2024-06-15 17:19:15 +02:00
Doug Hutcheson
310585d8af CI4: Bugfix - add function to remove .env.bak issue #3826
Added function remove_backup() to security_helper.php. Added a call to this from the two places that call check_encryption where the backup is created. Added more defensive code to Config.php to ensure the encrypter  objectexists before it is called to avoid a crash.
2024-06-15 17:19:15 +02:00
jekkos
3690296766 Add CI4 coding standards linter 2024-06-15 17:19:15 +02:00
Doug Hutcheson
9b86ddaac0 CI4: string interpolation changes (#3811)
* Initial setup in a new environment

The result of running the npm build and editing the .env file

* Revert "Initial setup in a new environment"

This reverts commit 23e06dea7f.

* Language interpolation update

I have edited all the interpolations in the en-US tree. To be consistent in using named parameters and not just positional numbers, I also edited the relevant lines in two controllers (Sales.php and Items.php) to send named variables to the lang() calls. The language string 'Sales.invoice_number_duplicate' contains an interploation for 'invoice_number'. This is sent when used by Controllers/Sales.php, but not sent when used by Views/sales/form.php, which means that string will contain a double space where the invoice number should be. The language string 'Customers.csv_import_partially_failed' contains no interpolations but two parameters are not being sent where it is used by Controllers/Customers.php. The string appears to be a near duplicate of 'Items.csv_import_partially_failed' which contains two interpolations. Either the Customers controller needs to be edited, or the Customers language string needs to be revised to look like the Items string.

---------

Co-authored-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
2024-06-15 17:19:15 +02:00
jekkos
d47143bfef Reinstate en-US files (#3468) 2024-06-15 17:19:15 +02:00