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 - - -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": -admin/logs/reseterrorlock/hash- - - -You can manually reset the error report locks by deleting -contents of application/cache/errors/ on your server. - ---------------------------------------------------------------------------- -ERROR MESSAGE ---------------------------------------------------------------------------- - -: - - ---------------------------------------------------------------------------- -REQUEST INFORMATION ---------------------------------------------------------------------------- - -Accessed URL: - -UTC Date: - -IP: - -Agent: - ---------------------------------------------------------------------------- -DEBUG BACKTRACE ---------------------------------------------------------------------------- - - -* - - - ---------------------------------------------------------------------------- -HEADERS ---------------------------------------------------------------------------- - - - ---------------------------------------------------------------------------- - -This is an automatically generated message. -Please do not reply to this email. -PepisCMS v0.2 \ No newline at end of file + + + + Hello! + + + + Error report for + + + + 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": + + + + + You can manually reset the error report locks by deleting + contents of application/cache/errors/ on your server. + + + + Error message + + + + : + + + + REQUEST INFORMATION + + + + + Accessed URL:
+ UTC Date:
+ IP:
+ Agent: + + + + Debug backtrace + + + + + +*
+ + + + + + + Headers + + + + + + + + + + This is an automatically generated message sent from PepisCMS
+ Please do not reply to this email. Date:

+ + + + \ 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 ! + -Your password for has been changed. + + Hello ! + -Login page: admin/login -Login: -Your new password is: + + Your password for has been changed. + -You are encouraged to change your password after you login at admin/changepassword - --- -This is an automatically generated message. -Please do not reply to this email. - \ No newline at end of file + + Login:
+ Your new password is: + + + + You are encouraged to change your password after you login at . + + + + This is an automatically generated message sent from PepisCMS
+ Please do not reply to this email. Date:

+ + + + \ 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 @@ You have been registered as a user for . - - - Login page: . - - + - Login:
- Password:
+ Login page:
+ Login:
+ Your new password is: @@ -22,7 +19,7 @@ - This is an automatically generated message sent from sent from PepisCMS
+ This is an automatically generated message sent from PepisCMS
Please do not reply to this email. Date:

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 ! + -Twoje hasło na stronie zostało zmienione. + + Cześć ! + -Strona logowania: admin/login -Twój login: -Twoje nowe hasło: + + Twoje hasło na stronie zostało zresetowane. + -Po pierwszym logowaniu powinieneś zmienić swoje hasło pod adresem: admin/changepassword - --- -Ta wiadomość została automatycznie wygenerowana. -Prosimy nie odpowiadać na tego maila. - \ No newline at end of file + + Twój login:
+ Twoje nowe hasło:
+ + + + Po pierwszym logowaniu powinieneś ustawić nowe swoje hasło pod adresem . + + + + This is an automatically generated message sent from PepisCMS
+ Please do not reply to this email. Date:

+ + + + 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 @@ - Witaj ! + Cześć ! Zostałeś zarejestrowany jako użytkownik projektu . - + - Strona logowania: . - - - - Twój login:
- Twoje hasło:
+ Strona logowania:
+ Twój login:
+ Twoje nowe hasło:
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

© Copyright Piotr Polak 2007-

diff --git a/pepiscms/modules/cms_users/controllers/Cms_usersAdmin.php b/pepiscms/modules/cms_users/controllers/Cms_usersAdmin.php index c53b23b..6280714 100644 --- a/pepiscms/modules/cms_users/controllers/Cms_usersAdmin.php +++ b/pepiscms/modules/cms_users/controllers/Cms_usersAdmin.php @@ -436,7 +436,7 @@ public function reset_password() if ($this->User_model->resetPasswordByUserId($user_id)) { $this->simplesessionmessage->setFormattingFunction(SimpleSessionMessage::FUNCTION_SUCCESS) - ->setMessage('global_header_success'); + ->setMessage('users_email_reset_success'); } else { $this->simplesessionmessage->setFormattingFunction(SimpleSessionMessage::FUNCTION_ERROR) ->setRawMessage('Unable to reset password. Please try again.'); diff --git a/pepiscms/modules/cms_users/language/english/cms_users_lang.php b/pepiscms/modules/cms_users/language/english/cms_users_lang.php index 95460f1..f5adbdf 100644 --- a/pepiscms/modules/cms_users/language/english/cms_users_lang.php +++ b/pepiscms/modules/cms_users/language/english/cms_users_lang.php @@ -38,7 +38,8 @@ $lang['cms_users_title'] = 'Title'; $lang['cms_users_unlock'] = 'Unlock account'; $lang['cms_users_user_email'] = 'E-mail'; -$lang['cms_users_user_email_description'] = 'Email address is used as the main user identificator, user email must be unique within the system'; +$lang['cms_users_user_email_description'] = 'Email address is used as the main user ID, user email must be unique within the system'; $lang['cms_users_user_login'] = 'Login'; $lang['cms_users_user_login_description'] = 'User can login using email or alternative login. Alternative login is not compulsory, when specified, it must be unique within the system.'; -$lang['cms_users_warning_non_standard_account'] = 'The selected account is non-standard thus cannot be edited using the buildin module'; \ No newline at end of file +$lang['cms_users_warning_non_standard_account'] = 'The selected account is non-standard thus cannot be edited using the builtin module'; +$lang['users_email_reset_success'] = 'User password has been successfully reset! The new password has been sent to the user\'s email address.'; \ No newline at end of file diff --git a/pepiscms/modules/cms_users/language/polish/cms_users_lang.php b/pepiscms/modules/cms_users/language/polish/cms_users_lang.php index d5aaaf4..6509adb 100644 --- a/pepiscms/modules/cms_users/language/polish/cms_users_lang.php +++ b/pepiscms/modules/cms_users/language/polish/cms_users_lang.php @@ -42,4 +42,5 @@ $lang['cms_users_user_email_description'] = 'Adres email jest wykorzystywany jako główny identyfikator użytkownika i musi być unikalny'; $lang['cms_users_user_login'] = 'Login'; $lang['cms_users_user_login_description'] = 'Użytkownik może się zalogować za pomocą adresu email lub alternatywnego loginu. Alternatywny login nie jest obowiązkowy ale musi być unikalny w systemie.'; -$lang['cms_users_warning_non_standard_account'] = 'Wybrane konto jest kontem niestandardowym i nie może być zarządzane za pomocą wbudowanego modułu'; \ No newline at end of file +$lang['cms_users_warning_non_standard_account'] = 'Wybrane konto jest kontem niestandardowym i nie może być zarządzane za pomocą wbudowanego modułu'; +$lang['users_email_reset_success'] = 'Hasło użytkownika zostało zresetowane! Nowe hasło zostało wysłane w powiadomieniu na adres email użytkownika.'; \ No newline at end of file diff --git a/pepiscms/modules/development/DevelopmentDescriptor.php b/pepiscms/modules/development/DevelopmentDescriptor.php index ece81a4..11a3057 100644 --- a/pepiscms/modules/development/DevelopmentDescriptor.php +++ b/pepiscms/modules/development/DevelopmentDescriptor.php @@ -105,6 +105,12 @@ public function getAdminSubmenuElements($language) ->withLabel($this->lang->line($this->module_name . '_send_test_email')) ->withIconUrl(module_resources_url($this->module_name) . 'send_test_email_16.png') ->end() + ->addItem() + ->withController($this->module_name) + ->withMethod('emulate_system_error') + ->withLabel($this->lang->line($this->module_name . '_emulate_system_error')) + ->withIconUrl(module_resources_url($this->module_name) . 'emulate_error_16.png') + ->end() ->addItem() ->withController($this->module_name) ->withMethod('switch_user') diff --git a/pepiscms/modules/development/controllers/DevelopmentAdmin.php b/pepiscms/modules/development/controllers/DevelopmentAdmin.php index 6454ac5..8feb0f8 100644 --- a/pepiscms/modules/development/controllers/DevelopmentAdmin.php +++ b/pepiscms/modules/development/controllers/DevelopmentAdmin.php @@ -176,6 +176,14 @@ public function send_test_email() redirect(module_url()); } + public function emulate_system_error() + { + \LOGGER::error('Some emulated error (please ignore) ' . time(), 'DEVELOPMENT'); + $this->simplesessionmessage->setFormattingFunction(SimpleSessionMessage::FUNCTION_SUCCESS); + $this->simplesessionmessage->setMessage('Error message written to logs. Expect an email to be sent (assuming site configuration is configured properly and the lock was not present already)!'); + + redirect(module_url()); + } public function switch_user() { diff --git a/pepiscms/modules/development/language/english/development_lang.php b/pepiscms/modules/development/language/english/development_lang.php index 30c6d39..4ca6b86 100644 --- a/pepiscms/modules/development/language/english/development_lang.php +++ b/pepiscms/modules/development/language/english/development_lang.php @@ -28,4 +28,5 @@ $lang['development_switch_user_tip'] = 'Use with caution. Switching to another account will be logged. Only roots can switch to another account.'; $lang['development_translations'] = 'Translations'; $lang['development_unable_to_generate_module_for_table'] = 'Unable to generate module for table %s. The table might not exist or does not have any fields.'; -$lang['development_you_must_be_root'] = 'You must be root to do that'; \ No newline at end of file +$lang['development_you_must_be_root'] = 'You must be root to do that'; +$lang['development_emulate_system_error'] = 'Emulate system error'; \ No newline at end of file diff --git a/pepiscms/modules/development/language/polish/development_lang.php b/pepiscms/modules/development/language/polish/development_lang.php index 6348196..c3bbbda 100644 --- a/pepiscms/modules/development/language/polish/development_lang.php +++ b/pepiscms/modules/development/language/polish/development_lang.php @@ -28,4 +28,5 @@ $lang['development_switch_user_tip'] = 'Zachowaj ostrożność. Przełączenie się na konto innego użytkownika zostanie odnotowane w logach systemowych. Tylko użytkownicy root mogą przełączać się na inne konta.'; $lang['development_translations'] = 'Tłumaczenia'; $lang['development_unable_to_generate_module_for_table'] = 'Nie można wygenerować modułu dla tabeli %s. Sprawdź czy podana tabela istnieje i czy zawiera pola.'; -$lang['development_you_must_be_root'] = 'Musisz być zalogowany jako root żeby móc wykonać tę akcję'; \ No newline at end of file +$lang['development_you_must_be_root'] = 'Musisz być zalogowany jako root żeby móc wykonać tę akcję'; +$lang['development_emulate_system_error'] = 'Zasymuluj błąd systemowy'; \ No newline at end of file diff --git a/pepiscms/modules/development/resources/emulate_error_16.png b/pepiscms/modules/development/resources/emulate_error_16.png new file mode 100644 index 0000000..17290ea Binary files /dev/null and b/pepiscms/modules/development/resources/emulate_error_16.png differ diff --git a/pepiscms/modules/development/views/emails/test_email.php b/pepiscms/modules/development/views/emails/test_email.php index efa48bb..a248ef0 100644 --- a/pepiscms/modules/development/views/emails/test_email.php +++ b/pepiscms/modules/development/views/emails/test_email.php @@ -24,15 +24,21 @@ Lorem ipsum dolor sit amet + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nisl eros, lacinia ut eros eget, facilisis dignissim arcu. Nullam nec tellus sed magna pulvinar tempus rutrum eu nisl. Cras fermentum accumsan lectus, porttitor fringilla turpis blandit eget. Praesent et neque quis lacus dictum fermentum sed eu tortor. Aenean pellentesque urna euismod est hendrerit eleifend at vitae arcu. Nullam blandit, sapien ac convallis vehicula, purus enim lobortis neque, in scelerisque tortor turpis eget tellus. In tellus mi, rutrum vitae ligula sed, sollicitudin mattis arcu. Fusce sollicitudin rutrum mi euismod sollicitudin. Etiam at mi quis massa tincidunt consequat vel eu risus. Proin est neque, bibendum non bibendum in, adipiscing egestas justo. Sed lacinia nisi ullamcorper lectus lacinia posuere. + + + + + This a debug email sent from PepisCMS administration panel. Please do not reply to this message - most probably it will not be read by a human. - Have a nice day :)
- + Have a nice day :)
+ URL:
IP: , Server date:
diff --git a/pepiscms/modules/logs/controllers/LogsAdmin.php b/pepiscms/modules/logs/controllers/LogsAdmin.php index 30616cb..fd68642 100644 --- a/pepiscms/modules/logs/controllers/LogsAdmin.php +++ b/pepiscms/modules/logs/controllers/LogsAdmin.php @@ -114,8 +114,7 @@ public function index() } $this->datagrid->setDefinition($definition); - $this->assign('datagrid', $this->datagrid->generate()) - ->assign('simple_session_message', $this->simplesessionmessage->getLocalizedMessage()); + $this->assign('datagrid', $this->datagrid->generate()); $this->display(); } @@ -254,7 +253,7 @@ public function reseterrorlock() $this->load->library('SimpleSessionMessage'); $this->simplesessionmessage->setFormattingFunction(SimpleSessionMessage::FUNCTION_SUCCESS); - $this->simplesessionmessage->setMessage('global_header_success'); + $this->simplesessionmessage->setMessage('logs_reset_lock_success'); redirect(module_url('logs')); } diff --git a/pepiscms/modules/logs/language/english/logs_lang.php b/pepiscms/modules/logs/language/english/logs_lang.php index 6930ac7..ddf7c84 100644 --- a/pepiscms/modules/logs/language/english/logs_lang.php +++ b/pepiscms/modules/logs/language/english/logs_lang.php @@ -28,4 +28,4 @@ $lang['logs_view_all'] = 'View all system logs'; $lang['users_user_ips'] = 'User IPs'; $lang['users_using_this_ip'] = 'Other users using this IP'; -$lang['logs_referer'] = 'Referer'; \ No newline at end of file +$lang['logs_reset_lock_success'] = 'The lock has been successfully removed!'; \ No newline at end of file diff --git a/pepiscms/modules/logs/language/polish/logs_lang.php b/pepiscms/modules/logs/language/polish/logs_lang.php index abc5dae..a7e8e49 100644 --- a/pepiscms/modules/logs/language/polish/logs_lang.php +++ b/pepiscms/modules/logs/language/polish/logs_lang.php @@ -28,4 +28,5 @@ $lang['logs_view_all'] = 'Zobacz wszystkie logi systemowe'; $lang['users_user_ips'] = 'Adresy IP powiązane z użytkownikiem'; $lang['users_using_this_ip'] = 'Inni użytkownicy korzystający z tego samego IP'; -$lang['logs_referer'] = 'Referer'; \ No newline at end of file +$lang['logs_referer'] = 'Referer'; +$lang['logs_reset_lock_success'] = 'Lock został pomyślnie usunięty!'; \ No newline at end of file