Skip to content

Conversation

gvozdb
Copy link
Contributor

@gvozdb gvozdb commented Jan 23, 2025

Отправка писем вынесена в отдельный метод miniShop2::shootEmail, где либо подключается планировщик, либо письмо отправляется сразу.

Отправка писем вынесена в отдельный метод `miniShop2::shootEmail`, где либо подключается планировщик, либо письмо отправляется сразу.
Copy link

@TolkIT-team TolkIT-team left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Некоторые моменты бросились в глаза.

* Creating Sheduler's task for sending email
* @return false|object|null
*/
private function createEmailTask()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не очень понял, почему тут удален метод? Как будет исполняется его функционал?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может стоить весь код правок посмотреть, прежде чем задавать такие вопросы?

);
if ($scheduler) {
$sTask = $scheduler->getTask('minishop2', 'ms2_send_email');
if (empty($sTask)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Три вложенных друг в друга if выглядят не очень хорошо.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чиво?)

}

$sTask = null;
if ($force === false && $this->modx->getOption('ms2_use_scheduler', null, false)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут было бы эффективнее написать if (!$force

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Эффективнее?) Про типы данных не слышал, видимо?

@gvozdb
Copy link
Contributor Author

gvozdb commented Jul 9, 2025

Некоторые моменты бросились в глаза.

Прям бросились?) Сорян, не могу по-другому реагировать на подобного рода "замечания")))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants