function carrier_save in SMS Framework 6.2
Same name and namespace in other branches
- 7 sms.module \carrier_save()
Save a carrier.
1 call to carrier_save()
- sms_carriers_edit_form_submit in ./
sms.admin.inc - Form submission handler for sms_carriers_edit_form().
File
- ./
sms.module, line 461 - The core of the SMS Framework. Provides gateway managment and API for sending and receiving SMS messages.
Code
function carrier_save($domain, $edit) {
if (!empty($domain)) {
$carrier = carrier_load($domain);
if ($carrier['type'] == SMS_CARRIER_DEFAULT) {
$edit['status'] = 1;
drupal_write_record('sms_carriers', $edit);
}
else {
if (!empty($edit['domain'])) {
drupal_write_record('sms_carriers', $edit, 'domain');
// TODO: we need more logic to figure out when someone is changing the domain name
}
}
}
else {
$edit['status'] = 1;
drupal_write_record('sms_carriers', $edit);
}
}