function carrier_delete in SMS Framework 7
Deletes a carrier from the database.
Parameters
string $domain:
2 calls to carrier_delete()
- carrier_save in ./
sms.module - Saves a carrier to database.
- sms_carriers_delete_form_submit in ./
sms.admin.inc - Form submission handler for sms_carriers_delete_form().
File
- ./
sms.module, line 610 - The core of the SMS Framework. Provides gateway management and API for sending and receiving SMS messages.
Code
function carrier_delete($domain) {
db_delete('sms_carriers')
->condition('domain', $domain)
->execute();
//removes carrier from variable
$enabled_carriers = variable_get('sms_enabled_carriers', array());
foreach ($enabled_carriers as $i => $carrier) {
if ($carrier == $domain) {
unset($enabled_carriers[$i]);
break;
}
}
variable_set('sms_enabled_carriers', $enabled_carriers);
}