From 3b4777c0cd05e47c222c53c01e1e491f8d874303 Mon Sep 17 00:00:00 2001 From: voltan Date: Mon, 21 Dec 2015 09:36:18 +0330 Subject: [PATCH] Improve send sms --- .idea/encodings.xml | 6 ++++++ src/Api/Mail.php | 2 +- src/Api/Sms.php | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .idea/encodings.xml diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/Api/Mail.php b/src/Api/Mail.php index 882d367..e967d94 100644 --- a/src/Api/Mail.php +++ b/src/Api/Mail.php @@ -16,7 +16,7 @@ use Pi\Application\Api\AbstractApi; /* - * Pi::api('mail', 'notification')->send($to, $template, $information, $module); + * Pi::api('mail', 'notification')->send($to, $template, $information, $module, $uid); */ class Mail extends AbstractApi diff --git a/src/Api/Sms.php b/src/Api/Sms.php index cf16a28..3e71b4f 100644 --- a/src/Api/Sms.php +++ b/src/Api/Sms.php @@ -42,10 +42,10 @@ public function send($content, $number) public function sendToAdmin($content, $number = '') { - // Get config - $config = Pi::service('registry')->config->read($this->getModule()); - // Send if (empty($number)) { + // Get config + $config = Pi::service('registry')->config->read($this->getModule()); + // Send $numbers = explode(',', $config['admin_number']); foreach ($numbers as $number) { $this->send($content, $number);