Skip to content

4.1.1.27

Choose a tag to compare

@gosha-bot gosha-bot released this 25 Oct 02:50
· 126 commits to main since this release
2494cbf

Changes

  • UrlParams: an array in the URL (e.g. 'filter_name[]=x') gave a fatal error on PHP 8. Fixed: arrays are accepted only for parameters with an array default value, otherwise the default value is used.
  • ControllerList: a negative or non-numeric 'page' value gave a negative LIMIT and an SQL error. Fixed: the page is at least 1, ModelRecordset::getRecords() never uses a negative start.
  • ModelRecordset: added the optional getSortWhitelist() method ('sort code' => 'SQL column or expression'). When a child class defines it, only the listed sort values are accepted, sorting by expressions is possible; by default (null or empty) the sorting works as before, only plain column names like 'name' or 't.name' are accepted.
  • UrlParams: parameter values in the built URLs were not encoded, e.g. a filter 'a+b@x.com' became 'a b@x.com' on the next page of a list. Fixed: values are URL-encoded (rawurlencode), array values become 'name[key]=value' pairs, placeholders like '{page}' are kept.
  • ControllerSettings: the template name is in the $settings_template property, a module can set its own template.
  • ControllerSettings: the settings page shows the module version and author line for the 'ka_extensions' vendor (the vendor was not passed to the template).
  • ControllerSettings: a successful save shows 'Settings have been stored sucessfully.' on the extensions page, a validation error shows a general warning above the form. A message the module has already added is not shown twice.
  • ControllerList: added the $complete_records property. true (default) - every record of the list is read again with getRecord() as before, false - the records of getRecords() are used as they are, without one more query per row.

Pull requests

  • Docs: FAQ, twig, settings page, mail guides and DEVELOPMENT.md by @gosha-bot in #4
  • Safe mode: changed code takes effect at once (opcache) by @gosha-bot in #5
  • Remove tests/safe_mode.sh, exclude tests/ from the build by @gosha-bot in #6
  • Docs: mark as OpenCart 3 only by @gosha-bot in #7
  • Show uninstall messages on OpenCart 3.0.3.9+ by @gosha-bot in #8
  • Docs: All Documentation, GitHub and Releases links by @gosha-bot in #9
  • UrlParams/ControllerList/ControllerSettings fixes, optional sort whitelist, complete_records flag by @gosha-bot in #10
  • Release 4.1.1.27 by @gosha-bot in #11

Full Changelog: v4.1.1.26...v4.1.1.27