-
-
Notifications
You must be signed in to change notification settings - Fork 129
Added a new method miniShop2::shootEmail
#933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Отправка писем вынесена в отдельный метод `miniShop2::shootEmail`, где либо подключается планировщик, либо письмо отправляется сразу.
There was a problem hiding this 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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не очень понял, почему тут удален метод? Как будет исполняется его функционал?
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Три вложенных друг в друга if выглядят не очень хорошо.
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут было бы эффективнее написать if (!$force
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Эффективнее?) Про типы данных не слышал, видимо?
Прям бросились?) Сорян, не могу по-другому реагировать на подобного рода "замечания"))) |
Отправка писем вынесена в отдельный метод
miniShop2::shootEmail
, где либо подключается планировщик, либо письмо отправляется сразу.