Skip to content

Commit

Permalink
Improve send sms
Browse files Browse the repository at this point in the history
  • Loading branch information
voltan committed Dec 21, 2015
1 parent 7f11688 commit 3b4777c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Api/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Api/Sms.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3b4777c

Please sign in to comment.