diff --git a/CHANGELOG.md b/CHANGELOG.md
index 626c34b..ed18072 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+## New in version 1.0.5-dev (xx.xx.2024)
+
+ * Improved email templates, email contents are now HTML escaped
+ * Added `fake-smtp` to the development setup
+ * Added information about the default icon set source and license
+ * Fixed logs module not displaying session messages
+ * New email helper functions `email_code`, `email_code_open`, `email_code_close`
+ * `Logger::getDebugTrace()` is now static - does not cause warnings under newer versions of PHP
+
## New in version 1.0.4 (26.04.2023)
* SQL Admin - fix for uppercase internal MySQL names
@@ -10,7 +19,7 @@
### Bugfixes and version updates
* PHP 7.4 and PHP 8.0 compatibility improvements
- * Removed DMESG module
+ * Removed `DMESG` module
* Improved MariaDB compatibility of the SQL scripts
* `ip_info` helper switched to use http://www.geoplugin.net/
* Fixed sorting in the `groups` module grid
@@ -135,7 +144,7 @@
### New features
* Improved translator module that now invalidates optcache of edited translation files under PHP 5.6
- * FormBuilder refactored usage of get_instance(), fixed an issue introduced in the previous release
+ * FormBuilder refactored usage of `get_instance()`, fixed an issue introduced in the previous release
* SimpleSessionMessage and its related code refactored
## 0.2.4.1 (02.07.2015)
@@ -164,7 +173,7 @@ A mature version of 0.2.3 with minimal backward incompatibility, CodeIgniter upg
* Introduced unit test for selected components
* Brand new SQL Console module
* Application theme improved (menu dropdown, buttons realign, titles/bubbles fixed and removed when not needed)
- * Rewriten and compacted JavaScript UI
+ * Rewritten and compacted JavaScript UI
* Application translation improved, removed outdated Romanian translation for administration panel
* Extended configuration tests
* New dashboard containing grouped links and configuration tests
@@ -204,7 +213,7 @@ A mature version of 0.2.3 with minimal backward incompatibility, CodeIgniter upg
* `$this->lang->getEnabledLanguages()` renamed to `$this->lang->getEnabledAdminLanguages()`;
* File `array_model.php` becomes `Array_model.php`, check all the includes/requires
* Removed unused `MY_URI`
- * Check your validation rules and remove xss_clean and trim - this will cause issues when the field is not required and empty
+ * Check your validation rules and remove `xss_clean` and trim - this will cause issues when the field is not required and empty
* `$this->lang->load()` for module languages changed into `$this->lang->loadForModule()`
* Method `MY_Upload:do_multiple_upload()` removed
* Removed deprecated library `ReportBuilder`
@@ -215,10 +224,10 @@ A mature version of 0.2.3 with minimal backward incompatibility, CodeIgniter upg
* New methods `ModuleRunner::isModuleDisplayedInMenu($name)` and `ModuleRunner::isModuleDisplayedInUtilities($name)`
* `MY_Email::set_header()` removed as it has been implemented in the original CI_Email library
* Changed icon paths (!) some icons will not work
- * CSS identifiers convention changed to lowercase_underscore
- * Changed file path pepiscms/theme/back_12.png -> pepiscms/theme/img/dialog/actions/back_16.png
- * Changed file path pepiscms/theme/star.png -> pepiscms/theme/img/dialog/actions/action_16.png
- * Changed file path pepiscms/theme/add.png -> pepiscms/theme/img/dialog/actions/add_16.png
+ * CSS identifiers convention changed to `lowercase_underscore`
+ * Changed file path `pepiscms/theme/back_12.png` -> `pepiscms/theme/img/dialog/actions/back_16.png`
+ * Changed file path `pepiscms/theme/star.png` -> `pepiscms/theme/img/dialog/actions/action_16.png`
+ * Changed file path `pepiscms/theme/add.png` -> `pepiscms/theme/img/dialog/actions/add_16.png`
* CSS selectors `.fileTree` -> `.file_tree`
* Removed legacy CSS `a.add` and `a.action`
* Removed deprecated FormBuilder code
@@ -292,13 +301,13 @@ A mature version of 0.2.3 with minimal backward incompatibility, CodeIgniter upg
* More restrictive CAS Auth driver
* Improved Generic_model
* Reviewed and improved users module, added possibility to check CAS user status directly from admin panel
- * Added html_customization module that allows injecting code into HTML template of the administration panel
- * Added email_html helper
+ * Added `html_customization` module that allows injecting code into HTML template of the administration panel
+ * Added `email_htm`l helper
* Modified DisplayPage public controller, added possibility to define `mainpage_module` and `mainpage_module_method` for handeling mainpage request by the specified module
* Module generator now generates improved filters for date fields
* CMS modules groups and users now renamed to cms_groups and cms_users
* Improved Google chart generator
- * DataGrid got new method getAdvancedFeed() that acts as a proxy to feed object.
+ * DataGrid got new method `getAdvancedFeed()` that acts as a proxy to feed object.
* Upgraded SQL console module, fixed UTF-8 encoding in data view
* Improved import procedure in `AdminCRUDController`
* Fixed upload for CSV files
@@ -384,7 +393,7 @@ A mature version of 0.2.3 with minimal backward incompatibility, CodeIgniter upg
* Spreadsheet library method parseCSV now uses native mechanism for reading CSV files
* Improvements to CLI
* Improved widget compatibility
- * Fixed an error that was introduced during query builder usage refractoring some minor versions ago, in User_model and Menu_model
+ * Fixed an error that was introduced during query builder usage refactoring some minor versions ago, in User_model and Menu_model
* Added Array_model that allows building abstract models for CRUD from any source (XML, CSV, web services)
* Added BasicDataFeedableInterface and Moveable interfaces
@@ -392,7 +401,7 @@ A mature version of 0.2.3 with minimal backward incompatibility, CodeIgniter upg
### New features
- * IMPORTANT: CBACL will now throw an error and block access when project ID is set but no API KEY is present
+ * IMPORTANT: `CBACL` will now throw an error and block access when project ID is set but no API KEY is present
* Localized CAS driver error messages
* Code inspection and reformat
* Added Composer package description
@@ -415,7 +424,7 @@ A mature version of 0.2.3 with minimal backward incompatibility, CodeIgniter upg
* Improved translator interface
* Fixed CAS logout
* EmailSender is got the possibility to overwrite the default config
- * Addedd possibility to define FormBuilder field's options
+ * Added possibility to define FormBuilder field's options
* Updated CKE to the latest version 3.6.6.1
## 0.2.2.4 (15.08.2013)
@@ -427,8 +436,8 @@ A mature version of 0.2.3 with minimal backward incompatibility, CodeIgniter upg
* Added logs performance tests
* System backup now sends correct headers for SQL file
* Improved string_helper `niceuri()`
- * Added dmesg module
- * Interface JavaScript refractored
+ * Added `dmesg` module
+ * Interface JavaScript refactored
* Remote models retested and improved
* Changed order of instructions in `Generic_model::getAdvancedFeed()`
* CAS upgraded to 1.3.2+
@@ -525,7 +534,7 @@ ALTER TABLE `modules` DROP COLUMN `is_displayed_in_sitemap`;
* Improved datagrid pagination
* Improved Spreadsheet library
-## 0.2.1.0 (18.06.2012
+## 0.2.1.0 (18.06.2012)
### New features
@@ -543,12 +552,12 @@ ALTER TABLE `modules` DROP COLUMN `is_displayed_in_sitemap`;
### API Changes in 0.2.1.x branch
* Database changes, module names can have longer values, user can now have a separate login
- ```sql
+ ```sql
ALTER TABLE `logs` CHANGE COLUMN `module` `module` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NULL DEFAULT NULL ;
ALTER TABLE `modules` CHANGE COLUMN `name` `name` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL , CHANGE COLUMN `label` `label` VARCHAR(64) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci' NOT NULL;
ALTER TABLE `users` ADD COLUMN `user_login` VARCHAR(128) NULL DEFAULT NULL AFTER `user_email`;
DELETE FROM group2entity WHERE entity=0 AND access=0;
- ```
+ ```
## 0.2.0.0 (11.01.2012)
@@ -593,7 +602,7 @@ DELETE FROM group2entity WHERE entity=0 AND access=0;
* Added SQL dump utility
* Improved user interface, icons and layout facelift
* SQL console and Translator now as builtin modules
- * New siteconfig utility
+ * New `siteconfig` utility
* Rewritten page management
* Dynamic base_url
* Added URL helper functions
@@ -631,7 +640,7 @@ DELETE FROM group2entity WHERE entity=0 AND access=0;
### New features
* Fixed load language procedure to detect user language
- * FormRenderable gets a new method for overloading the default error formatting delimiters
+ * `FormRenderable` gets a new method for overloading the default error formatting delimiters
* Added new validation methods to form_validation: min, max, even, odd
* Added translation service for PHPTAL that takes translations from PepisCMS config files
* Lang::load now detects language both for front-end and backend
@@ -646,18 +655,18 @@ DELETE FROM group2entity WHERE entity=0 AND access=0;
### New features
* Added upload allowed types wildcard
- * Added Dispatcher::getUriPrefix() and Dispatcher::getSiteLanguage() methods
+ * Added `Dispatcher::getUriPrefix()` and `Dispatcher::getSiteLanguage()` methods
## 0.1.4.8 (15.02.2011)
### New features
- * Added support for PHPTAL via Template class
- * EnhancedController::getParam is now alias to URI::getParam
- * URI::shift is implemented
+ * Added support for `PHPTAL` via Template class
+ * `EnhancedController::getParam` is now alias to `URI::getParam`
+ * `URI::shift` is implemented
* Updated jQuery UI Datepicker and it's style
* DataGrid and FormBuilder support now definitions and foreign keys
- * Added "apply" button to FormBuilder. Note, if you use SimpleSessionMessage, the message must be read/assigned after the form is generated!
+ * Added "apply" button to `FormBuilder`. Note, if you use `SimpleSessionMessage`, the message must be read/assigned after the form is generated!
* Improved ModuleRunner debug
* Added complete Russian translation
* `AdminModuleController::display()` now supports absolute file paths
@@ -668,7 +677,7 @@ DELETE FROM group2entity WHERE entity=0 AND access=0;
### New features
- * EnhancedController methods getControllerName() and getMethodName() implemented
+ * `EnhancedController` methods `getControllerName()` and `getMethodName()` implemented
* Extended and fixed system info
* Better support for Cyrillic alphabet, automatic generation of latin URLs using niceuri
* Backup restore has been fixed
@@ -693,7 +702,7 @@ It took 7 months and 26 betas to release this version :)
* Module registration introduced. Every single module must be enabled by system administrator in order to be run. Module configuration files are now storied in application/config/modules/ folder (however, old method might work as well).
* System logs along with notifications for critical errors implemented
* DataGrid component now got the possibility od displaying user configurable filers and default data feed model for simple tables
- * DataGrid default feed fix (posibility to apply = instead of LIKE)
+ * DataGrid default feed fix (possibility to apply = instead of LIKE)
* Database changes: all the database tables' engine is changed to MYISAM, from now on all the timestamps are storied using UTC timestamp
* Simplified database structure, removed view menu_view
* Dropped support for MySQL 4
@@ -703,12 +712,12 @@ It took 7 months and 26 betas to release this version :)
* CKE Editor upgraded to version 3.5
* Fixed admin menu highlights
* Add possibility to add branding to the top of CMS page
- * Modified Loader::config behavior. Now it is simpler to extend configuration as default config values are read from the library path
+ * Modified `Loader::config` behavior. Now it is simpler to extend configuration as default config values are read from the library path
* Rewritten system Loader
### API Changes in 0.1.4.x branch
- * NOTE: All PHP timestamps are now in UTC (time() now returns UTC value), please use UTC_TIMESTAMP() for MySQL
+ * NOTE: All PHP timestamps are now in UTC (`time()` now returns UTC value), please use `UTC_TIMESTAMP()` for MySQL
* NOTE: Please change `$config['uri_protocol'] = "AUTO";` to `$config['uri_protocol'] = "QUERY_STRING";` in your config file
* NOTE: `$config['permitted_uri_chars'] must be changed to 'a-z 0-9~%.:_&=-',` otherwise you can get "The URI you submitted has disallowed characters" error.
* NOTE: `ModuleController getSitemapLinks()` is now called in static manner
@@ -725,7 +734,7 @@ It took 7 months and 26 betas to release this version :)
### New features
- * Updated niceuri plugin
+ * Updated `niceuri` plugin
## 0.1.3.11 (01.04.2010)
@@ -749,7 +758,7 @@ A Maintenance update.
### New features
- * New ajax based file manager
+ * New AJAX based file manager
* Improved user interface, added search box and simple view for pages, new page edit view
* Basic configuration tests implemented (displayed in utilities and settings)
* Module runner improvements
diff --git a/README.md b/README.md
index adeef02..78ad73f 100644
--- a/README.md
+++ b/README.md
@@ -402,20 +402,27 @@ The following BASH variables can be used to control the installation parameters:
```bash
# The variable values are empty by default. The below values are taken from docker-compose.yml file
-PEPIS_CMS_DATABASE_CONFIG_TYPE=native
-PEPIS_CMS_DATABASE_HOSTNAME=db
-PEPIS_CMS_DATABASE_USERNAME=pepiscms
-PEPIS_CMS_DATABASE_PASSWORD=pepiscms
-PEPIS_CMS_DATABASE_DATABASE=pepiscms
-PEPIS_CMS_AUTH_DRIVER=native
-PEPIS_CMS_AUTH_EMAIL=demo@example.com
-PEPIS_CMS_AUTH_PASSWORD=demodemo
-PEPIS_CMS_SITE_EMAIL=demo@example.com
-PEPIS_CMS_SITE_NAME=Demonstration
-PEPIS_CMS_OBJECT_CACHE_OBJECT_IS_ENABLED=true # Set false for cloud deployment
-PEPIS_CMS_IS_UNATTENDED_INSTALL=true # Set false for manual installer
+PEPIS_CMS_DATABASE_CONFIG_TYPE: native
+PEPIS_CMS_DATABASE_HOSTNAME: db
+PEPIS_CMS_DATABASE_USERNAME: pepiscms
+PEPIS_CMS_DATABASE_PASSWORD: pepiscms
+PEPIS_CMS_DATABASE_DATABASE: pepiscms
+PEPIS_CMS_AUTH_DRIVER: native
+PEPIS_CMS_AUTH_EMAIL: demo@example.com
+PEPIS_CMS_AUTH_PASSWORD: demodemo
+PEPIS_CMS_SITE_EMAIL: demo@example.com
+PEPIS_CMS_SITE_NAME: Demonstration
+PEPIS_CMS_OBJECT_CACHE_OBJECT_IS_ENABLED: true # Set false for cloud deployment
+PEPIS_CMS_IS_UNATTENDED_INSTALL: true # Set false for manual installer
+PEPIS_CMS_EMAIL_USE_SMTP: true
+PEPIS_CMS_EMAIL_SMTP_HOST: fake-smtp
+PEPIS_CMS_EMAIL_SMTP_USER: fake-smtp
+PEPIS_CMS_EMAIL_SMTP_PASS: fake-smtp
+PEPIS_CMS_EMAIL_SMTP_PORT: 25
```
+Email console is available under [http://localhost:60500](http://localhost:60500)
+
The command line for unattended installation:
```bash
@@ -1619,4 +1626,7 @@ composer require piotrpolak/codeigniter-symfony2-bridge --update-no-dev
```bash
composer require twig/twig 1.* --update-no-dev
-```
\ No newline at end of file
+```
+
+## Icon set
+Farm Fresh Icons Pack https://fatcow.com/free-icons licensed under [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/).
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index 219fa01..d4a760e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -14,6 +14,11 @@ services:
PEPIS_CMS_SITE_NAME: Demonstration
PEPIS_CMS_OBJECT_CACHE_OBJECT_IS_ENABLED: 'true'
PEPIS_CMS_IS_UNATTENDED_INSTALL: 'true' # Set it to false to test manual installation
+ PEPIS_CMS_EMAIL_USE_SMTP: 'true'
+ PEPIS_CMS_EMAIL_SMTP_HOST: fake-smtp
+ PEPIS_CMS_EMAIL_SMTP_USER: fake-smtp
+ PEPIS_CMS_EMAIL_SMTP_PASS: fake-smtp
+ PEPIS_CMS_EMAIL_SMTP_PORT: 25
ports:
- "80:80"
links:
@@ -58,4 +63,22 @@ services:
# - ./mysql:/var/lib/mysql
# Uncomment this to connect to MySQL from the host machine
# ports:
-# - "3306:3306"
\ No newline at end of file
+# - "3306:3306"
+ fake-smtp:
+ image: munkyboy/fakesmtp
+ container_name: fake-smtp
+ ports:
+ - "2525:25"
+ volumes:
+ - ./tmp/fake-smtp-emails:/var/mail
+ fake-smtp-web:
+ image: mjstewart/fakesmtp-web:1.3
+ container_name: fake-smtp-web
+ ports:
+ - "60500:8080"
+ volumes:
+ - ./tmp/fake-smtp-emails:/var/mail
+ environment:
+ - EMAIL_INPUT_DIR_POLL_RATE_SECONDS=10
+ depends_on:
+ - fake-smtp
\ No newline at end of file
diff --git a/pepiscms/application/emails/english/error_report.php b/pepiscms/application/emails/english/error_report.php
index 6c3182f..908d13a 100644
--- a/pepiscms/application/emails/english/error_report.php
+++ b/pepiscms/application/emails/english/error_report.php
@@ -1,51 +1,72 @@
-Error report for =$site_name?>
-
-
-Please note the error reporting system will not
-send you any more reports concerning this issue
-unless you click the following link and reset the "lock":
-=$base_url?>admin/logs/reseterrorlock/hash-=$hash?>
-
-
-You can manually reset the error report locks by deleting
-contents of application/cache/errors/ on your server.
-
----------------------------------------------------------------------------
-ERROR MESSAGE
----------------------------------------------------------------------------
-
-=$collection?>: =htmlentities($message);?>
-
-
----------------------------------------------------------------------------
-REQUEST INFORMATION
----------------------------------------------------------------------------
-
-Accessed URL: =$url?>
-
-UTC Date: =$date?>
-
-IP: =$ip?>
-
-Agent: =$agent?>
-
----------------------------------------------------------------------------
-DEBUG BACKTRACE
----------------------------------------------------------------------------
-
-
-* =$message?>
-
-
-
----------------------------------------------------------------------------
-HEADERS
----------------------------------------------------------------------------
-
-=print_r($headers)?>
-
----------------------------------------------------------------------------
-
-This is an automatically generated message.
-Please do not reply to this email.
-PepisCMS v0.2
\ No newline at end of file
+=email_html_open()?>
+
+ =email_h1_open()?>
+ Hello!
+ =email_h1_close()?>
+
+ =email_p_open()?>
+ Error report for =$site_name?>
+ =email_p_close()?>
+
+ =email_p_open()?>
+ Please note the error reporting system will not
+ send you any more reports concerning this issue
+ unless you click the following link and reset the "lock":
+ =email_a_open(module_url('logs').'reseterrorlock/hash-'.$hash)?>=module_url('logs').'reseterrorlock/hash-'.$hash?>=email_a_close()?>
+ =email_p_close()?>
+
+ =email_p_open()?>
+ You can manually reset the error report locks by deleting
+ contents of application/cache/errors/
on your server.
+ =email_p_close()?>
+
+ =email_h2_open()?>
+ Error message
+ =email_h2_close()?>
+
+ =email_p_open()?>
+ =$collection?>: =htmlentities($message);?>
+ =email_p_close()?>
+
+ =email_h2_open()?>
+ REQUEST INFORMATION
+ =email_h2_close()?>
+
+
+ =email_p_open()?>
+ Accessed URL: =$url?>
+ UTC Date: =$date?>
+ IP: =$ip?>
+ Agent: =$agent?>
+ =email_p_close()?>
+
+ =email_h2_open()?>
+ Debug backtrace
+ =email_h2_close()?>
+
+ =email_p_open()?>
+ =email_code_open()?>
+
+* =htmlentities($message)?>
+
+ =email_code_close()?>
+ =email_p_close()?>
+
+
+ =email_h2_open()?>
+ Headers
+ =email_h2_close()?>
+
+ =email_p_open()?>
+ =email_code_open()?>
+ =htmlentities(print_r($headers))?>
+ =email_code_close()?>
+ =email_p_close()?>
+
+ =email_html_footer_open()?>
+ This is an automatically generated message sent from PepisCMS =PEPISCMS_VERSION?>
+ Please do not reply to this email. Date: =$date?>
+ =$site_name?>
+ =email_html_footer_close()?>
+
+=email_html_close()?>
\ No newline at end of file
diff --git a/pepiscms/application/emails/english/new_password.php b/pepiscms/application/emails/english/new_password.php
index faf1017..447de77 100644
--- a/pepiscms/application/emails/english/new_password.php
+++ b/pepiscms/application/emails/english/new_password.php
@@ -1,14 +1,26 @@
-Hello =$display_name?>!
+=email_html_open()?>
-Your password for =$site_name?> has been changed.
+ =email_h1_open()?>
+ Hello =$display_name?>!
+ =email_h1_close()?>
-Login page: =$base_url?>admin/login
-Login: =$user_email."\n"?>
-Your new password is: =$password."\n"?>
+ =email_p_open()?>
+ Your password for =$site_name?> has been changed.
+ =email_p_close()?>
-You are encouraged to change your password after you login at =$base_url?>admin/changepassword
-
---
-This is an automatically generated message.
-Please do not reply to this email.
-=$site_name?>
\ No newline at end of file
+ =email_p_open()?>
+ Login: =email_code($user_email)?>
+ Your new password is: =email_code($password)?>
+ =email_p_close()?>
+
+ =email_p_open()?>
+ You are encouraged to change your password after you login at =email_a_open(admin_url().'changepassword')?>=admin_url().'changepassword'?>=email_a_close()?>.
+ =email_p_close()?>
+
+ =email_html_footer_open()?>
+ This is an automatically generated message sent from PepisCMS =PEPISCMS_VERSION?>
+ Please do not reply to this email. Date: =$date?>
+ =$site_name?>
+ =email_html_footer_close()?>
+
+=email_html_close()?>
\ No newline at end of file
diff --git a/pepiscms/application/emails/english/register.php b/pepiscms/application/emails/english/register.php
index 95da567..cae30a0 100644
--- a/pepiscms/application/emails/english/register.php
+++ b/pepiscms/application/emails/english/register.php
@@ -7,14 +7,11 @@
=email_p_open()?>
You have been registered as a user for =$site_name?>.
=email_p_close()?>
-
- =email_p_open()?>
- Login page: =email_a_open(admin_url())?>=admin_url()?>=email_a_close()?>.
- =email_p_close()?>
-
+
=email_p_open()?>
- Login: =$user_email."\n"?>
- Password: =$password."\n"?>
+ Login page: =email_a_open(admin_url())?>=admin_url()?>=email_a_close()?>
+ Login: =email_code($user_email)?>
+ Your new password is: =email_code($password)?>
=email_p_close()?>
=email_p_open()?>
@@ -22,7 +19,7 @@
=email_p_close()?>
=email_html_footer_open()?>
- This is an automatically generated message sent from sent from PepisCMS =PEPISCMS_VERSION?>
+ This is an automatically generated message sent from PepisCMS =PEPISCMS_VERSION?>
Please do not reply to this email. Date: =$date?>
=$site_name?>
=email_html_footer_close()?>
diff --git a/pepiscms/application/emails/polish/new_password.php b/pepiscms/application/emails/polish/new_password.php
index 387cc0b..8e6df1c 100644
--- a/pepiscms/application/emails/polish/new_password.php
+++ b/pepiscms/application/emails/polish/new_password.php
@@ -1,14 +1,26 @@
-Witaj =$display_name?>!
+=email_html_open()?>
-Twoje hasło na stronie =$site_name?> zostało zmienione.
+ =email_h1_open()?>
+ Cześć =$display_name?>!
+ =email_h1_close()?>
-Strona logowania: =$base_url?>admin/login
-Twój login: =$user_email."\n"?>
-Twoje nowe hasło: =$password."\n"?>
+ =email_p_open()?>
+ Twoje hasło na stronie =$site_name?> zostało zresetowane.
+ =email_p_close()?>
-Po pierwszym logowaniu powinieneś zmienić swoje hasło pod adresem: =$base_url?>admin/changepassword
-
---
-Ta wiadomość została automatycznie wygenerowana.
-Prosimy nie odpowiadać na tego maila.
-=$site_name?>
\ No newline at end of file
+ =email_p_open()?>
+ Twój login: =email_code($user_email)?>
+ Twoje nowe hasło: =email_code($password)?>
+ =email_p_close()?>
+
+ =email_p_open()?>
+ Po pierwszym logowaniu powinieneś ustawić nowe swoje hasło pod adresem =email_a_open(admin_url().'changepassword')?>=admin_url().'changepassword'?>=email_a_close()?>.
+ =email_p_close()?>
+
+ =email_html_footer_open()?>
+ This is an automatically generated message sent from PepisCMS =PEPISCMS_VERSION?>
+ Please do not reply to this email. Date: =$date?>
+ =$site_name?>
+ =email_html_footer_close()?>
+
+=email_html_close()?>
diff --git a/pepiscms/application/emails/polish/register.php b/pepiscms/application/emails/polish/register.php
index d206c9d..3d7a363 100644
--- a/pepiscms/application/emails/polish/register.php
+++ b/pepiscms/application/emails/polish/register.php
@@ -1,20 +1,17 @@
=email_html_open()?>
=email_h1_open()?>
- Witaj =$display_name?>!
+ Cześć =$display_name?>!
=email_h1_close()?>
=email_p_open()?>
Zostałeś zarejestrowany jako użytkownik projektu =$site_name?>.
=email_p_close()?>
-
+
=email_p_open()?>
- Strona logowania: =email_a_open(admin_url())?>=admin_url()?>=email_a_close()?>.
- =email_p_close()?>
-
- =email_p_close()?>
- Twój login: =$user_email."\n"?>
- Twoje hasło: =$password."\n"?>
+ Strona logowania: =email_a_open(admin_url())?>=admin_url()?>=email_a_close()?>
+ Twój login: =email_code($user_email)?>
+ Twoje nowe hasło: =email_code($password)?>
=email_p_close()?>
=email_p_open()?>
diff --git a/pepiscms/application/helpers/email_html_helper.php b/pepiscms/application/helpers/email_html_helper.php
index 19eebc7..1110f25 100644
--- a/pepiscms/application/helpers/email_html_helper.php
+++ b/pepiscms/application/helpers/email_html_helper.php
@@ -114,3 +114,24 @@ function email_html_footer_close()
?>
($data['cms_instance_type'] != self::DEFAULT_INTRANET_APPLICATION_NO_FRONTEND ? 'true' : 'false'),
'TEMPLATE_CMS_ENABLE_UTILITIES' => 'true',
'TEMPLATE_CMS_ENABLE_FILEMANAGER' => 'true',
- 'TEMPLATE_EMAIL_USE_SMTP' => 'false',
- 'TEMPLATE_EMAIL_SMTP_HOST' => '',
- 'TEMPLATE_EMAIL_SMTP_USER' => '',
- 'TEMPLATE_EMAIL_SMTP_PASS' => '',
- 'TEMPLATE_EMAIL_SMTP_PORT' => '25',
+ 'TEMPLATE_EMAIL_USE_SMTP' => $data['email_use_smtp'],
+ 'TEMPLATE_EMAIL_SMTP_HOST' => $data['email_smtp_host'],
+ 'TEMPLATE_EMAIL_SMTP_USER' => $data['email_smtp_user'],
+ 'TEMPLATE_EMAIL_SMTP_PASS' => $data['email_smtp_pass'],
+ 'TEMPLATE_EMAIL_SMTP_PORT' => $data['email_smtp_port'],
'TEMPLATE_DEBUG_LOG_PHP_DEPRECATED' => 'false',
'TEMPLATE_DEBUG_LOG_PHP_WARNING' => 'false',
'TEMPLATE_DEBUG_LOG_PHP_ERROR' => 'false',
@@ -211,6 +216,11 @@ public function getDefaultInstallationValues()
'admin_email' => getenv(self::ENV_PEPIS_CMS_AUTH_EMAIL) ?: '',
'admin_password' => getenv(self::ENV_PEPIS_CMS_AUTH_PASSWORD) ?: '',
'cache_object_is_enabled' => getenv(self::ENV_PEPIS_CMS_OBJECT_CACHE_OBJECT_IS_ENABLED) ?: 'true',
+ 'email_use_smtp' => getenv(self::ENV_PEPIS_CMS_EMAIL_USE_SMTP) ?: 'false',
+ 'email_smtp_host' => getenv(self::ENV_PEPIS_CMS_EMAIL_SMTP_HOST) ?: '',
+ 'email_smtp_user' => getenv(self::ENV_PEPIS_CMS_EMAIL_SMTP_USER) ?: '',
+ 'email_smtp_pass' => getenv(self::ENV_PEPIS_CMS_EMAIL_SMTP_PASS) ?: '',
+ 'email_smtp_port' => getenv(self::ENV_PEPIS_CMS_EMAIL_SMTP_PORT) ?: '25',
);
}
diff --git a/pepiscms/application/libraries/Logger.php b/pepiscms/application/libraries/Logger.php
index 0c640b4..050118c 100644
--- a/pepiscms/application/libraries/Logger.php
+++ b/pepiscms/application/libraries/Logger.php
@@ -184,7 +184,7 @@ public static function error($message, $collection = 'SYSTEM', $resource_id = fa
);
//$CI->emailsender->debug();
- if ($CI->emailsender->sendSystemTemplate($to_email, $from_email, $from_name, $subject, 'error_report', $edata, false, 'english')) {
+ if ($CI->emailsender->sendSystemTemplate($to_email, $from_email, $from_name, $subject, 'error_report', $edata, true, 'english')) {
$message .= '; error report sent by email';
} else {
$message .= '; unable to send report by email';
@@ -267,7 +267,7 @@ public static function errorHandlerWithLogging($errno, $errstr, $errfile, $errli
*
* @return array
*/
- public function getDebugTrace()
+ public static function getDebugTrace()
{
$debug_backtrace = debug_backtrace();
diff --git a/pepiscms/application/models/User_model.php b/pepiscms/application/models/User_model.php
index 433d3f7..45a0642 100644
--- a/pepiscms/application/models/User_model.php
+++ b/pepiscms/application/models/User_model.php
@@ -208,7 +208,7 @@ public function register($display_name, $user_email, $user_login = false, $passw
'base_url' => base_url(),
'password' => $password,
'site_name' => $site_name,
- 'date' => date('Y-m-d'),
+ 'date' => date('Y-m-d, H:i:s'),
);
$email_language = $this->lang->getCurrentLanguage();
@@ -521,7 +521,7 @@ public function resetPasswordByUserId($user_id)
return false;
}
// Generate a new password
- $password = $this->generateAcceptablePassword($this->getMinimumAllowedPasswordLenght());
+ $password = $this->generateAcceptablePassword($this->getMinimumAllowedPasswordLenght() + 4);
// Try to change user password
if ($this->changePasswordByUserId($user_id, $password, true)) {
@@ -533,7 +533,8 @@ public function resetPasswordByUserId($user_id)
'user_email' => $user->user_email,
'base_url' => $this->input->is_cli_request() ? '' : base_url(), // TODO find nice solution for finding out the URL
'password' => $password,
- 'site_name' => $site_name
+ 'site_name' => $site_name,
+ 'date' => date('Y-m-d, H:i:s'),
);
$email_language = $this->lang->getCurrentLanguage();
@@ -542,7 +543,7 @@ public function resetPasswordByUserId($user_id)
$email_subject = sprintf($this->lang->line('email_reset_password_subject'), $site_name);
$success = $this->emailsender->sendSystemTemplate($user->user_email, $this->config->item('site_email'),
- $this->config->item('site_name'), $email_subject, 'new_password', $email_data, false, $email_language);
+ $this->config->item('site_name'), $email_subject, 'new_password', $email_data, true, $email_language);
// Logging
if ($success) {
diff --git a/pepiscms/application/views/admin/about_index.php b/pepiscms/application/views/admin/about_index.php
index 4498614..0494826 100644
--- a/pepiscms/application/views/admin/about_index.php
+++ b/pepiscms/application/views/admin/about_index.php
@@ -8,7 +8,9 @@
PepisCMS is an extensible web based content management system developed by Piotr Polak www.polak.ro.
-PepisCMS is written in PHP on top of extended CodeIgniter framework.
+PepisCMS is written in PHP on top of extended CodeIgniter 3 framework.
+GitHub project: https://github.com/piotrpolak/pepiscms
+Farm Fresh Icons Pack https://fatcow.com/free-icons
licensed under Creative Commons Attribution 4.0 License.
© Copyright Piotr Polak 2007-= date('Y') ?>