/** * * 发送mo短信分享 * @param string $type * @param string $objid * @param array $at */ public function mo_sms($type, $feedid, $commentid, $at2mo, $moid = '', $mouid = 0, $auto = false) { $at_count = count($at2mo); if (count($at2mo) > 0) { $sms_count = sns::getsmscount($this->uid); if ($at_count > $sms_count) { return false; } $sent_mo = array(); foreach ($at2mo as $k => $v) { if ($mouid) { if ($mouid != $v['id']) { continue; } } if ($v['id'] == Kohana::config('uap.xiaomo')) { continue; } if (!in_array($v['id'], $sent_mo)) { $sent_mo[] = $v['id']; //动态mo短信 if ($type == 'feed') { $this->mo_sms_feed($feedid, $v['id'], $v['name'], $moid, $auto); } //评论mo短信 if ($type == 'comment') { $this->mo_sms_comment($commentid, $feedid, $v['id'], $v['name'], $moid, $auto); } } } return true; } }