Repository navigation
4.1.1.30
Changes
- Mail: inline images in emails. \extension\ka_extensions\Mail::addInlineImage($filename, $name = '') (it calls addInlineImage($filename, $name) of the OpenCart mail object, the name is required there) adds an image for the html part; it is shown by
where the cid is returned by the static \extension\ka_extensions\Mail::generateCid($filename) ('ka-.', the same for every call). $name is the file name in the email, basename($filename) when empty. The type (png, jpeg, gif, webp) is detected from the file; another file is added as a regular attachment and the method returns false. The patched mail adaptors (mail/mail.php.xml, mail/smtp.php.xml) send inline images as image/* parts with 'Content-Disposition: inline' inside multipart/related together with the text and html parts, other attachments stay in multipart/mixed; an email without an html part gets them as inline image/* parts of multipart/mixed. Emails without inline images are built exactly as before (checked on OpenCart 3.0.0.0, 3.0.4.0, 3.0.5.1 with the mail and smtp engines). A module can check method_exists($mail, 'addInlineImage') and call addAttachment() with older libraries. The kamod cache has to be rebuilt after the update: until then the OpenCart mail object of the old cache has no addInlineImage() and the call stops with a fatal error. The logo and the 'images are enclosed' setting are not changed. See docgen/guides/mail.rst.
- kamod.ini: depends_on, install_before and install_after are read by one function, KamodManager::getManifestModules(). Each field can be a comma-separated string (install_after = "a, b") or an array (install_after[] = "a"), array items can contain commas too; codes are trimmed, empty items and duplicates are dropped, a code without a vendor gets the 'ka_extensions/' prefix, e.g. install_after = "ka_extensions" is read as ka_extensions/ka_extensions (the library itself). Before, install_before and install_after were read as a comma-separated string only and short codes were compared without the prefix. The order of child classes is fixed: install_before listing modules none of which overrides the class dropped the module child class from the chain, install_after in the same case moved it after the first class of the chain; now the class keeps its position. The demo modules mod1, mod3, mod4 use full module codes in the array form. See docgen/guides/kamod_ini.rst.
Pull requests
- Release 4.1.1.30 by @gosha-bot in #21
Full Changelog: v4.1.1.29...v4.1.1.30