]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
rewrite for settings of sms
[quix0rs-gnu-social.git] / lib / util.php
index 6f6f1dd249121be3f5ccc34a3ebd539a48a105df..62f7abc9ee6799f4c6740a02396c8e83d1cdfdde 100644 (file)
@@ -742,6 +742,8 @@ function common_fancy_url($action, $args=NULL) {
                return common_path('settings/email');
         case 'openidsettings':
                return common_path('settings/openid');
+        case 'smssettings':
+               return common_path('settings/sms');
         case 'newnotice':
                if ($args && $args['replyto']) {
                        return common_path('notice/new?replyto='.$args['replyto']);
@@ -971,7 +973,13 @@ function common_real_broadcast($notice, $remote=false) {
                        common_log(LOG_ERR, 'Error in jabber broadcast for notice ' . $notice->id);
                }
        }
-       // XXX: broadcast notices to SMS
+       if ($success) {
+               require_once(INSTALLDIR.'/lib/mail.php');
+               $success = mail_broadcast_notice_sms($notice);
+               if (!$success) {
+                       common_log(LOG_ERR, 'Error in sms broadcast for notice ' . $notice->id);
+               }
+       }
        // XXX: broadcast notices to other IM
        return $success;
 }